From 7dab3372fb703cd26cea45aee0b22098f0762ec8 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 26 Nov 2021 20:11:15 +0100 Subject: [PATCH 001/175] work --- .eslintrc.js => .eslintrc.cjs | 2 +- bin/asc | 20 - bin/asc.js | 28 + bin/{asinit => asinit.js} | 28 +- cli/asc.d.ts | 26 +- cli/asc.generated.js | 546 ++++++ cli/asc.js | 332 ++-- cli/shim/README.md | 1 - cli/shim/fs.js | 1 - cli/shim/path.js | 531 ------ cli/transform.js | 2 +- cli/util/browser/fs.js | 2 + cli/util/browser/module.js | 5 + cli/util/browser/path.js | 520 ++++++ cli/{shim => util/browser}/process.js | 33 +- cli/util/colors.d.ts | 47 +- cli/util/colors.js | 52 +- cli/util/fetch.d.ts | 5 + cli/util/fetch.js | 26 + cli/util/find.d.ts | 2 +- cli/util/find.js | 7 +- cli/util/mkdirp.js | 8 +- cli/util/node.d.ts | 10 + cli/util/node.js | 36 + cli/util/options.js | 42 +- cli/util/utf8.js | 66 +- index.d.ts | 4 +- index.js | 16 +- index.release.d.ts | 2 - index.release.js | 1 - package-lock.json | 2217 ++++++------------------- package.json | 24 +- scripts/build-diagnostics.js | 18 +- scripts/build-dts.js | 47 +- scripts/build-sdk.js | 2 + scripts/build.js | 161 +- scripts/clean.js | 8 +- src/glue/binaryen.d.ts | 5 - src/glue/binaryen.js | 632 ++++++- src/glue/js/i64.js | 2 +- src/index-js.ts | 2 + src/index.ts | 2 +- src/module.ts | 74 +- src/passes/shadowstack.ts | 2 +- src/tsconfig.json | 3 +- src/util.ts | 12 + src/util/index.ts | 12 - tests/browser-asc.js | 2 +- tests/compiler.js | 194 +-- tests/compiler/package.json | 3 + tests/decompiler.js | 29 - tests/{require => import}/index.ts | 3 - tests/parser.js | 33 +- tests/require/index-release.ts | 6 - tests/tokenizer.js | 22 +- tests/util-path.js | 20 +- tests/util/diff.js | 12 +- tsconfig-docs.json | 9 - webpack.config.js | 135 -- 59 files changed, 2925 insertions(+), 3167 deletions(-) rename .eslintrc.js => .eslintrc.cjs (99%) delete mode 100755 bin/asc create mode 100644 bin/asc.js rename bin/{asinit => asinit.js} (95%) mode change 100755 => 100644 create mode 100644 cli/asc.generated.js delete mode 100644 cli/shim/README.md delete mode 100644 cli/shim/fs.js delete mode 100644 cli/shim/path.js create mode 100644 cli/util/browser/fs.js create mode 100644 cli/util/browser/module.js create mode 100644 cli/util/browser/path.js rename cli/{shim => util/browser}/process.js (86%) create mode 100644 cli/util/fetch.d.ts create mode 100644 cli/util/fetch.js create mode 100644 cli/util/node.d.ts create mode 100644 cli/util/node.js delete mode 100644 index.release.d.ts delete mode 100644 index.release.js create mode 100644 src/index-js.ts create mode 100644 src/util.ts delete mode 100644 src/util/index.ts create mode 100644 tests/compiler/package.json delete mode 100644 tests/decompiler.js rename tests/{require => import}/index.ts (57%) delete mode 100644 tests/require/index-release.ts delete mode 100644 tsconfig-docs.json delete mode 100644 webpack.config.js diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 99% rename from .eslintrc.js rename to .eslintrc.cjs index 24129405b9..341d8286f8 100644 --- a/.eslintrc.js +++ b/.eslintrc.cjs @@ -1,4 +1,4 @@ -module.exports = { +module.exports = { // eslint-disable-line no-undef root: true, parser: "@typescript-eslint/parser", plugins: [ diff --git a/bin/asc b/bin/asc deleted file mode 100755 index 0b08d513b4..0000000000 --- a/bin/asc +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -const tailArgs = process.argv.indexOf("--"); -if (~tailArgs) { - require("child_process").spawnSync( - process.argv[0], - process.argv.slice(tailArgs + 1).concat( - process.argv.slice(1, tailArgs) - ), - { stdio: "inherit" } - ); - return; -} - -try { require("source-map-support").install(); } catch (e) {} - -const asc = module.exports = require("../cli/asc.js"); -if (/\basc$/.test(process.argv[1])) { - asc.ready.then(() => process.exitCode = asc.main(process.argv.slice(2))); -} diff --git a/bin/asc.js b/bin/asc.js new file mode 100644 index 0000000000..687467fa0a --- /dev/null +++ b/bin/asc.js @@ -0,0 +1,28 @@ +#!/usr/bin/env node + +import childProcess from "child_process"; + +function tryApplyNodeArguments() { + const argv = process.argv; + const tail = argv.indexOf("--"); + if (~tail) { + childProcess.spawnSync( + argv[0], + argv.slice(tail + 1).concat(argv.slice(1, tail)), + { stdio: "inherit" } + ); + return true; + } + return false; +} + +var asc; + +if (!tryApplyNodeArguments()) { + global.binaryen = (await import("binaryen")).default; + global.assemblyscript = (await import("../index.js")).default; + asc = await import("../cli/asc.js"); + process.exitCode = asc.main(process.argv.slice(2)); +} + +export default asc; diff --git a/bin/asinit b/bin/asinit.js old mode 100755 new mode 100644 similarity index 95% rename from bin/asinit rename to bin/asinit.js index 9b38303e2f..fa90e24a93 --- a/bin/asinit +++ b/bin/asinit.js @@ -1,10 +1,15 @@ #!/usr/bin/env node -const fs = require("fs"); -const path = require("path"); -const colors = require("../cli/util/colors"); -const version = require("../package.json").version; -const options = require("../cli/util/options"); +import fs from "fs"; +import path from "path"; +import { createRequire } from "module"; +import { fileURLToPath } from "url"; +import colors from "../cli/util/colors.js"; +import options from "../cli/util/options.js"; + +const dirname = path.dirname(fileURLToPath(import.meta.url)); +const require = createRequire(import.meta.url); +const version = require("../package.json").version; // TODO const npmDefaultTest = "echo \"Error: no test specified\" && exit 1"; @@ -79,9 +84,8 @@ function printHelp() { process.exit(0); } +const compilerDir = path.join(dirname, ".."); const projectDir = path.resolve(cliOptions.arguments[0]); -const compilerDir = path.join(__dirname, ".."); -const compilerVersion = require(path.join(compilerDir, "package.json")).version; const assemblyDir = path.join(projectDir, "assembly"); const tsconfigFile = path.join(assemblyDir, "tsconfig.json"); const asconfigFile = path.join(projectDir, "asconfig.json"); @@ -356,11 +360,11 @@ function ensurePackageJson() { }, ...(useNode && { "dependencies": { - "@assemblyscript/loader": "^" + compilerVersion + "@assemblyscript/loader": "^" + version } }), "devDependencies": { - "assemblyscript": "^" + compilerVersion + "assemblyscript": "^" + version } }, null, 2)); console.log(colors.green(" Created: ") + packageFile); @@ -382,13 +386,13 @@ function ensurePackageJson() { } let dependencies = pkg["dependencies"] || {}; if (!dependencies["@assemblyscript/loader"] && useNode) { - dependencies["@assemblyscript/loader"] = "^" + compilerVersion; + dependencies["@assemblyscript/loader"] = "^" + version; pkg["dependencies"] = dependencies; updated = true; } let devDependencies = pkg["devDependencies"] || {}; if (!devDependencies["assemblyscript"]) { - devDependencies["assemblyscript"] = "^" + compilerVersion; + devDependencies["assemblyscript"] = "^" + version; pkg["devDependencies"] = devDependencies; updated = true; } @@ -480,4 +484,4 @@ function ensureIndexHtml() { console.log(colors.yellow(" Exists: ") + indexHtml); } console.log(); -} \ No newline at end of file +} diff --git a/cli/asc.d.ts b/cli/asc.d.ts index 3887d60105..528e31e1e1 100644 --- a/cli/asc.d.ts +++ b/cli/asc.d.ts @@ -7,32 +7,14 @@ import { OptionDescription } from "./util/options"; export { OptionDescription }; import { Transform } from "./transform"; -/** Ready promise resolved once/if the compiler is ready. */ -export const ready: Promise; - -/** Whether this is a webpack bundle or not. */ -export const isBundle: boolean; - -/** Whether asc runs the sources directly or not. */ -export const isDev: boolean; - /** AssemblyScript version. */ export const version: string; /** Available CLI options. */ export const options: { [key: string]: OptionDescription }; -/** Common root used in source maps. */ -export var sourceMapRoot: string; - /** Prefix used for library files. */ -export var libraryPrefix: string; - -/** Default Binaryen optimization level. */ -export var defaultOptimizeLevel: number; - -/** Default Binaryen shrink level. */ -export var defaultShrinkLevel: number; +export const libraryPrefix: string; /** Bundled library files. */ export const libraryFiles: { [key: string]: string }; @@ -40,6 +22,12 @@ export const libraryFiles: { [key: string]: string }; /** Bundled definition files. */ export const definitionFiles: { assembly: string, portable: string }; +/** Default Binaryen optimization level. */ +export const defaultOptimizeLevel: number; + +/** Default Binaryen shrink level. */ +export const defaultShrinkLevel: number; + /** A compatible output stream. */ export interface OutputStream { /** Writes another chunk of data to the stream. */ diff --git a/cli/asc.generated.js b/cli/asc.generated.js new file mode 100644 index 0000000000..8d694e7906 --- /dev/null +++ b/cli/asc.generated.js @@ -0,0 +1,546 @@ +// GENERATED FILE. DO NOT EDIT. +export const version = "0.0.0"; +export const options = { + "version": { + "category": "General", + "description": "Prints just the compiler's version and exits.", + "type": "b", + "alias": "v" + }, + "help": { + "category": "General", + "description": "Prints this message and exits.", + "type": "b", + "alias": "h" + }, + "noColors": { + "category": "General", + "description": "Disables terminal colors.", + "type": "b", + "default": false + }, + "config": { + "category": "General", + "description": "Configuration file to apply. CLI arguments take precedence.", + "type": "s", + "cliOnly": true + }, + "target": { + "category": "General", + "description": "Target configuration to use. Defaults to 'release'.", + "type": "s", + "cliOnly": true + }, + "optimize": { + "category": "Optimization", + "description": [ + "Optimizes the module. Typical shorthands are:", + "", + " Default optimizations -O", + " Make a release build -O --noAssert", + " Make a debug build --debug", + " Optimize for speed -Ospeed", + " Optimize for size -Osize", + "" + ], + "type": "b", + "alias": "O" + }, + "optimizeLevel": { + "category": "Optimization", + "description": "How much to focus on optimizing code. [0-3]", + "type": "i" + }, + "shrinkLevel": { + "category": "Optimization", + "description": "How much to focus on shrinking code size. [0-2, s=1, z=2]", + "type": "i" + }, + "converge": { + "category": "Optimization", + "description": "Re-optimizes until no further improvements can be made.", + "type": "b", + "default": false + }, + "noAssert": { + "category": "Optimization", + "description": "Replaces assertions with just their value without trapping.", + "type": "b", + "default": false + }, + "outFile": { + "category": "Output", + "description": "Specifies the output file. File extension indicates format.", + "type": "s", + "alias": "o", + "isPath": true + }, + "binaryFile": { + "category": "Output", + "description": "Specifies the binary output file (.wasm).", + "type": "s", + "alias": "b", + "isPath": true + }, + "textFile": { + "category": "Output", + "description": "Specifies the text output file (.wat).", + "type": "s", + "alias": "t", + "isPath": true + }, + "jsFile": { + "category": "Output", + "description": "Specifies the JavaScript (via wasm2js) output file (.js).", + "type": "s", + "alias": "j", + "isPath": true + }, + "idlFile": { + "category": "Output", + "description": "Specifies the WebIDL output file (.webidl).", + "type": "s", + "alias": "i", + "isPath": true + }, + "tsdFile": { + "category": "Output", + "description": "Specifies the TypeScript definition output file (.d.ts).", + "type": "s", + "alias": "d", + "isPath": true + }, + "sourceMap": { + "category": "Debugging", + "description": [ + "Enables source map generation. Optionally takes the URL", + "used to reference the source map from the binary file." + ], + "type": "s" + }, + "debug": { + "category": "Debugging", + "description": "Enables debug information in emitted binaries.", + "type": "b", + "default": false + }, + "importMemory": { + "category": "Features", + "description": "Imports the memory from 'env.memory'.", + "type": "b", + "default": false + }, + "noExportMemory": { + "category": "Features", + "description": "Does not export the memory as 'memory'.", + "type": "b", + "default": false + }, + "initialMemory": { + "category": "Features", + "description": "Sets the initial memory size in pages.", + "type": "i", + "default": 0 + }, + "maximumMemory": { + "category": "Features", + "description": "Sets the maximum memory size in pages.", + "type": "i", + "default": 0 + }, + "sharedMemory": { + "category": "Features", + "description": "Declare memory as shared. Requires maximumMemory.", + "type": "b", + "default": false + }, + "zeroFilledMemory": { + "category": "Features", + "description": "Assume that imported memory is zero filled. Requires importMemory.", + "type": "b", + "default": false + }, + "importTable": { + "category": "Features", + "description": "Imports the function table from 'env.table'.", + "type": "b", + "default": false + }, + "exportTable": { + "category": "Features", + "description": "Exports the function table as 'table'.", + "type": "b", + "default": false + }, + "runtime": { + "category": "Features", + "description": [ + "Specifies the runtime variant to include in the program.", + "", + " incremental TLSF + incremental GC (default)", + " minimal TLSF + lightweight GC invoked externally", + " stub Minimal runtime stub (never frees)", + " ... Path to a custom runtime implementation", + "" + ], + "type": "s", + "default": "incremental" + }, + "exportRuntime": { + "category": "Features", + "description": "Exports the runtime helpers (__new, __collect etc.).", + "type": "b", + "default": false + }, + "stackSize": { + "category": "Features", + "description": [ + "Overrides the stack size. Only relevant for incremental GC", + "or when using a custom runtime that requires stack space.", + "Defaults to 0 without and to 16384 with incremental GC." + ], + "default": 0, + "type": "i" + }, + "explicitStart": { + "category": "Features", + "description": "Exports an explicit '_start' function to call.", + "type": "b", + "default": false + }, + "enable": { + "category": "Features", + "description": [ + "Enables WebAssembly features being disabled by default.", + "", + " nontrapping-f2i Non-trapping float to integer ops.", + " bulk-memory Bulk memory operations.", + " simd SIMD types and operations.", + " threads Threading and atomic operations.", + " reference-types Reference types and operations.", + " gc Garbage collection (WIP).", + "" + ], + "TODO_doesNothingYet": [ + " exception-handling Exception handling.", + " tail-calls Tail call operations.", + " multi-value Multi value types.", + " memory64 Memory64 operations." + ], + "type": "S", + "mutuallyExclusive": "disable" + }, + "disable": { + "category": "Features", + "description": [ + "Disables WebAssembly features being enabled by default.", + "", + " mutable-globals Mutable global imports and exports.", + " sign-extension Sign-extension operations", + "" + ], + "type": "S", + "mutuallyExclusive": "enable" + }, + "use": { + "category": "Features", + "description": [ + "Aliases a global object under another name, e.g., to switch", + "the default 'Math' implementation used: --use Math=JSMath", + "Can also be used to introduce an integer constant." + ], + "type": "S", + "alias": "u" + }, + "lowMemoryLimit": { + "category": "Features", + "description": "Enforces very low (<64k) memory constraints.", + "default": 0, + "type": "i" + }, + "memoryBase": { + "category": "Linking", + "description": "Sets the start offset of emitted memory segments.", + "type": "i", + "default": 0 + }, + "tableBase": { + "category": "Linking", + "description": "Sets the start offset of emitted table elements.", + "type": "i", + "default": 0 + }, + "transform": { + "category": "API", + "description": "Specifies the path to a custom transform to 'require'.", + "type": "S", + "isPath": true, + "useNodeResolution": true + }, + "trapMode": { + "category": "Binaryen", + "description": [ + "Sets the trap mode to use.", + "", + " allow Allow trapping operations. This is the default.", + " clamp Replace trapping operations with clamping semantics.", + " js Replace trapping operations with JS semantics.", + "" + ], + "type": "s", + "default": "allow" + }, + "runPasses": { + "category": "Binaryen", + "description": [ + "Specifies additional Binaryen passes to run after other", + "optimizations, if any. See: Binaryen/src/passes/pass.cpp" + ], + "type": "s" + }, + "noValidate": { + "category": "Binaryen", + "description": "Skips validating the module using Binaryen.", + "type": "b", + "default": false + }, + "baseDir": { + "description": "Specifies the base directory of input and output files.", + "type": "s", + "default": "." + }, + "extension": { + "description": "Specifies an alternative file extension to use.", + "type": "s", + "cliOnly": true + }, + "noUnsafe": { + "description": [ + "Disallows the use of unsafe features in user code.", + "Does not affect library files and external modules." + ], + "type": "b", + "default": false + }, + "noEmit": { + "description": "Performs compilation as usual but does not emit code.", + "type": "b", + "default": false + }, + "showConfig": { + "description": "Print computed compiler options and exit.", + "type": "b", + "default": false + }, + "measure": { + "description": "Prints measuring information on I/O and compile times.", + "type": "b", + "default": false + }, + "pedantic": { + "description": "Make yourself sad for no good reason.", + "type": "b", + "default": false + }, + "lib": { + "description": [ + "Adds one or multiple paths to custom library components and", + "uses exports of all top-level files at this path as globals." + ], + "type": "S", + "isPath": true + }, + "path": { + "description": [ + "Adds one or multiple paths to package resolution, similar", + "to node_modules. Prefers an 'ascMain' entry in a package's", + "package.json and falls back to an inner 'assembly/' folder." + ], + "type": "S", + "isPath": true + }, + "traceResolution": { + "description": "Enables tracing of package resolution.", + "type": "b", + "default": false + }, + "listFiles": { + "description": "Lists files to be compiled and exits.", + "type": "b", + "default": false + }, + "wasm": { + "description": "Uses the specified Wasm binary of the compiler.", + "type": "s" + }, + " ...": { + "description": "Specifies node.js options (CLI only). See: node --help" + }, + "-Os": { + "value": { + "optimizeLevel": 0, + "shrinkLevel": 1 + } + }, + "-Oz": { + "value": { + "optimizeLevel": 0, + "shrinkLevel": 2 + } + }, + "-O0": { + "value": { + "optimizeLevel": 0, + "shrinkLevel": 0 + } + }, + "-O1": { + "value": { + "optimizeLevel": 1, + "shrinkLevel": 0 + } + }, + "-O2": { + "value": { + "optimizeLevel": 2, + "shrinkLevel": 0 + } + }, + "-O3": { + "value": { + "optimizeLevel": 3, + "shrinkLevel": 0 + } + }, + "-O0s": { + "value": { + "optimizeLevel": 0, + "shrinkLevel": 1 + } + }, + "-O1s": { + "value": { + "optimizeLevel": 1, + "shrinkLevel": 1 + } + }, + "-O2s": { + "value": { + "optimizeLevel": 2, + "shrinkLevel": 1 + } + }, + "-O3s": { + "value": { + "optimizeLevel": 3, + "shrinkLevel": 1 + } + }, + "-O0z": { + "value": { + "optimizeLevel": 0, + "shrinkLevel": 2 + } + }, + "-O1z": { + "value": { + "optimizeLevel": 1, + "shrinkLevel": 2 + } + }, + "-O2z": { + "value": { + "optimizeLevel": 2, + "shrinkLevel": 2 + } + }, + "-O3z": { + "value": { + "optimizeLevel": 3, + "shrinkLevel": 2 + } + }, + "-Ospeed": { + "value": { + "optimizeLevel": 3, + "shrinkLevel": 0 + } + }, + "-Osize": { + "value": { + "optimizeLevel": 0, + "shrinkLevel": 2, + "converge": true + } + } +}; +export const definitionFiles = { + "assembly": "/**\n * Environment definitions for compiling AssemblyScript to WebAssembly using asc.\n * @module std/assembly\n *//***/\n\n/// \n\n// Types\n\n/** An 8-bit signed integer. */\ndeclare type i8 = number;\n/** A 16-bit signed integer. */\ndeclare type i16 = number;\n/** A 32-bit signed integer. */\ndeclare type i32 = number;\n/** A 64-bit signed integer. */\ndeclare type i64 = number;\n/** A 32-bit signed integer when targeting 32-bit WebAssembly or a 64-bit signed integer when targeting 64-bit WebAssembly. */\ndeclare type isize = number;\n/** An 8-bit unsigned integer. */\ndeclare type u8 = number;\n/** A 16-bit unsigned integer. */\ndeclare type u16 = number;\n/** A 32-bit unsigned integer. */\ndeclare type u32 = number;\n/** A 64-bit unsigned integer. */\ndeclare type u64 = number;\n/** A 32-bit unsigned integer when targeting 32-bit WebAssembly or a 64-bit unsigned integer when targeting 64-bit WebAssembly. */\ndeclare type usize = number;\n/** A 1-bit unsigned integer. */\ndeclare type bool = boolean | number;\n/** A 32-bit float. */\ndeclare type f32 = number;\n/** A 64-bit float. */\ndeclare type f64 = number;\n/** A 128-bit vector. */\ndeclare type v128 = object;\n/** Function reference. */\ndeclare type funcref = object | null;\n/** External reference. */\ndeclare type externref = object | null;\n/** Any reference. */\ndeclare type anyref = object | null;\n/** Equatable reference. */\ndeclare type eqref = object | null;\n/** 31-bit integer reference. */\ndeclare type i31ref = object | null;\n/** Data reference. */\ndeclare type dataref = object | null;\n\n// Compiler hints\n\n/** Compiler target. 0 = JS, 1 = WASM32, 2 = WASM64. */\ndeclare const ASC_TARGET: i32;\n/** Runtime type. 0 = Stub, 1 = Minimal, 2 = Incremental. */\ndeclare const ASC_RUNTIME: i32;\n/** Provided noAssert option. */\ndeclare const ASC_NO_ASSERT: bool;\n/** Provided memoryBase option. */\ndeclare const ASC_MEMORY_BASE: i32;\n/** Provided tableBase option. */\ndeclare const ASC_TABLE_BASE: i32;\n/** Provided optimizeLevel option. */\ndeclare const ASC_OPTIMIZE_LEVEL: i32;\n/** Provided shrinkLevel option. */\ndeclare const ASC_SHRINK_LEVEL: i32;\n/** Provided lowMemoryLimit option. */\ndeclare const ASC_LOW_MEMORY_LIMIT: i32;\n/** Provided noExportRuntime option. */\ndeclare const ASC_NO_EXPORT_RUNTIME: i32;\n/** Whether the sign extension feature is enabled. */\ndeclare const ASC_FEATURE_SIGN_EXTENSION: bool;\n/** Whether the mutable globals feature is enabled. */\ndeclare const ASC_FEATURE_MUTABLE_GLOBALS: bool;\n/** Whether the non-trapping float-to-int feature is enabled. */\ndeclare const ASC_FEATURE_NONTRAPPING_F2I: bool;\n/** Whether the bulk memory feature is enabled. */\ndeclare const ASC_FEATURE_BULK_MEMORY: bool;\n/** Whether the SIMD feature is enabled. */\ndeclare const ASC_FEATURE_SIMD: bool;\n/** Whether the threads feature is enabled. */\ndeclare const ASC_FEATURE_THREADS: bool;\n/** Whether the exception handling feature is enabled. */\ndeclare const ASC_FEATURE_EXCEPTION_HANDLING: bool;\n/** Whether the tail calls feature is enabled. */\ndeclare const ASC_FEATURE_TAIL_CALLS: bool;\n/** Whether the reference types feature is enabled. */\ndeclare const ASC_FEATURE_REFERENCE_TYPES: bool;\n/** Whether the multi value types feature is enabled. */\ndeclare const ASC_FEATURE_MULTI_VALUE: bool;\n/** Whether the garbage collection feature is enabled. */\ndeclare const ASC_FEATURE_GC: bool;\n/** Whether the memory64 feature is enabled. */\ndeclare const ASC_FEATURE_MEMORY64: bool;\n/** Major version of the compiler. */\ndeclare const ASC_VERSION_MAJOR: i32;\n/** Minor version of the compiler. */\ndeclare const ASC_VERSION_MINOR: i32;\n/** Patch version of the compiler. */\ndeclare const ASC_VERSION_PATCH: i32;\n\n// Builtins\n\n/** Performs the sign-agnostic count leading zero bits operation on a 32-bit or 64-bit integer. All zero bits are considered leading if the value is zero. */\ndeclare function clz(value: T): T;\n/** Performs the sign-agnostic count tailing zero bits operation on a 32-bit or 64-bit integer. All zero bits are considered trailing if the value is zero. */\ndeclare function ctz(value: T): T;\n/** Performs the sign-agnostic count number of one bits operation on a 32-bit or 64-bit integer. */\ndeclare function popcnt(value: T): T;\n/** Performs the sign-agnostic rotate left operation on a 32-bit or 64-bit integer. */\ndeclare function rotl(value: T, shift: T): T;\n/** Performs the sign-agnostic rotate right operation on a 32-bit or 64-bit integer. */\ndeclare function rotr(value: T, shift: T): T;\n/** Computes the absolute value of an integer or float. */\ndeclare function abs(value: T): T;\n/** Determines the maximum of two integers or floats. If either operand is `NaN`, returns `NaN`. */\ndeclare function max(left: T, right: T): T;\n/** Determines the minimum of two integers or floats. If either operand is `NaN`, returns `NaN`. */\ndeclare function min(left: T, right: T): T;\n/** Performs the ceiling operation on a 32-bit or 64-bit float. */\ndeclare function ceil(value: T): T;\n/** Composes a 32-bit or 64-bit float from the magnitude of `x` and the sign of `y`. */\ndeclare function copysign(x: T, y: T): T;\n/** Performs the floor operation on a 32-bit or 64-bit float. */\ndeclare function floor(value: T): T;\n/** Rounds to the nearest integer tied to even of a 32-bit or 64-bit float. */\ndeclare function nearest(value: T): T;\n/** Reinterprets the bits of the specified value as type `T`. Valid reinterpretations are u32/i32 to/from f32 and u64/i64 to/from f64. */\ndeclare function reinterpret(value: number): T;\n/** Selects one of two pre-evaluated values depending on the condition. */\ndeclare function select(ifTrue: T, ifFalse: T, condition: bool): T;\n/** Calculates the square root of a 32-bit or 64-bit float. */\ndeclare function sqrt(value: T): T;\n/** Rounds to the nearest integer towards zero of a 32-bit or 64-bit float. */\ndeclare function trunc(value: T): T;\n/** Computes the sum of two integers or floats. */\ndeclare function add(left: T, right: T): T;\n/** Computes the difference of two integers or floats. */\ndeclare function sub(left: T, right: T): T;\n/** Computes the product of two integers or floats. */\ndeclare function mul(left: T, right: T): T;\n/** Computes the quotient of two integers or floats. */\ndeclare function div(left: T, right: T): T;\n/** Loads a value of the specified type from memory. Equivalent to dereferncing a pointer in other languages. */\ndeclare function load(ptr: usize, immOffset?: usize, immAlign?: usize): T;\n/** Stores a value of the specified type to memory. Equivalent to dereferencing a pointer in other languages when assigning a value. */\ndeclare function store(ptr: usize, value: T, immOffset?: usize, immAlign?: usize): void;\n/** Emits an unreachable operation that results in a runtime error when executed. Both a statement and an expression. */\ndeclare function unreachable(): never;\n\n/** NaN (not a number) as a 32-bit or 64-bit float depending on context. */\ndeclare const NaN: f32 | f64;\n/** Positive infinity as a 32-bit or 64-bit float depending on context. */\ndeclare const Infinity: f32 | f64;\n/** Data end offset. */\ndeclare const __data_end: usize;\n/** Stack pointer offset. */\ndeclare var __stack_pointer: usize;\n/** Heap base offset. */\ndeclare const __heap_base: usize;\n/** Determines the byte size of the specified underlying core type. Compiles to a constant. */\ndeclare function sizeof(): usize;\n/** Determines the alignment (log2) of the specified underlying core type. Compiles to a constant. */\ndeclare function alignof(): usize;\n/** Determines the end offset of the given class type. Compiles to a constant. */\ndeclare function offsetof(): usize;\n/** Determines the offset of the specified field within the given class type. Compiles to a constant. */\ndeclare function offsetof(fieldName: keyof T | string): usize;\n/** Determines the offset of the specified field within the given class type. Returns the class type's end offset if field name has been omitted. Compiles to a constant. */\ndeclare function offsetof(fieldName?: string): usize;\n/** Determines the name of a given type. */\ndeclare function nameof(value?: T): string;\n/** Determines the unique runtime id of a class type. Compiles to a constant. */\ndeclare function idof(): u32;\n/** Changes the type of any value of `usize` kind to another one of `usize` kind. Useful for casting class instances to their pointer values and vice-versa. Beware that this is unsafe.*/\ndeclare function changetype(value: any): T;\n/** Explicitly requests no bounds checks on the provided expression. Useful for array accesses. */\ndeclare function unchecked(value: T): T;\n/** Emits a `call_indirect` instruction, calling the specified function in the function table by index with the specified arguments. Does result in a runtime error if the arguments do not match the called function. */\ndeclare function call_indirect(index: u32, ...args: unknown[]): T;\n/** Instantiates a new instance of `T` using the specified constructor arguments. */\ndeclare function instantiate(...args: any[]): T;\n/** Tests if a 32-bit or 64-bit float is `NaN`. */\ndeclare function isNaN(value: T): bool;\n/** Tests if a 32-bit or 64-bit float is finite, that is not `NaN` or +/-`Infinity`. */\ndeclare function isFinite(value: T): bool;\n/** Tests if the specified type *or* expression is of an integer type and not a reference. Compiles to a constant. */\ndeclare function isInteger(value?: any): value is number;\n/** Tests if the specified type *or* expression is of a float type. Compiles to a constant. */\ndeclare function isFloat(value?: any): value is number;\n/** Tests if the specified type *or* expression is of a boolean type. */\ndeclare function isBoolean(value?: any): value is number;\n/** Tests if the specified type *or* expression can represent negative numbers. Compiles to a constant. */\ndeclare function isSigned(value?: any): value is number;\n/** Tests if the specified type *or* expression is of a reference type. Compiles to a constant. */\ndeclare function isReference(value?: any): value is object | string;\n/** Tests if the specified type *or* expression can be used as a string. Compiles to a constant. */\ndeclare function isString(value?: any): value is string | String;\n/** Tests if the specified type *or* expression can be used as an array. Compiles to a constant. */\ndeclare function isArray(value?: any): value is Array;\n/** Tests if the specified type *or* expression can be used as an array like object. Compiles to a constant. */\ndeclare function isArrayLike(value?: any): value is ArrayLike;\n/** Tests if the specified type *or* expression is of a function type. Compiles to a constant. */\ndeclare function isFunction(value?: any): value is (...args: any) => any;\n/** Tests if the specified type *or* expression is of a nullable reference type. Compiles to a constant. */\ndeclare function isNullable(value?: any): bool;\n/** Tests if the specified expression resolves to a defined element. Compiles to a constant. */\ndeclare function isDefined(expression: any): bool;\n/** Tests if the specified expression evaluates to a constant value. Compiles to a constant. */\ndeclare function isConstant(expression: any): bool;\n/** Tests if the specified type *or* expression is of a managed type. Compiles to a constant. */\ndeclare function isManaged(value?: any): bool;\n/** Tests if the specified type is void. Compiles to a constant. */\ndeclare function isVoid(): bool;\n/** Traps if the specified value is not true-ish, otherwise returns the (non-nullable) value. */\ndeclare function assert(isTrueish: T, message?: string): T & (object | string | number); // any better way to model `: T != null`?\n/** Parses an integer string to a 64-bit float. */\ndeclare function parseInt(str: string, radix?: i32): f64;\n/** Parses a string to a 64-bit float. */\ndeclare function parseFloat(str: string): f64;\n/** Returns the 64-bit floating-point remainder of `x/y`. */\ndeclare function fmod(x: f64, y: f64): f64;\n/** Returns the 32-bit floating-point remainder of `x/y`. */\ndeclare function fmodf(x: f32, y: f32): f32;\n/** Returns the number of parameters in the given function signature type. */\ndeclare function lengthof any>(func?: T): i32;\n/** Encodes a text string as a valid Uniform Resource Identifier (URI). */\ndeclare function encodeURI(str: string): string;\n/** Encodes a text string as a valid component of a Uniform Resource Identifier (URI). */\ndeclare function encodeURIComponent(str: string): string;\n/** Decodes a Uniform Resource Identifier (URI) previously created by encodeURI. */\ndeclare function decodeURI(str: string): string;\n/** Decodes a Uniform Resource Identifier (URI) component previously created by encodeURIComponent. */\ndeclare function decodeURIComponent(str: string): string;\n\n/** Atomic operations. */\ndeclare namespace atomic {\n /** Atomically loads an integer value from memory and returns it. */\n export function load(ptr: usize, immOffset?: usize): T;\n /** Atomically stores an integer value to memory. */\n export function store(ptr: usize, value: T, immOffset?: usize): void;\n /** Atomically adds an integer value in memory. */\n export function add(ptr: usize, value: T, immOffset?: usize): T;\n /** Atomically subtracts an integer value in memory. */\n export function sub(ptr: usize, value: T, immOffset?: usize): T;\n /** Atomically performs a bitwise AND operation on an integer value in memory. */\n export function and(ptr: usize, value: T, immOffset?: usize): T;\n /** Atomically performs a bitwise OR operation on an integer value in memory. */\n export function or(ptr: usize, value: T, immOffset?: usize): T;\n /** Atomically performs a bitwise XOR operation on an integer value in memory. */\n export function xor(ptr: usize, value: T, immOffset?: usize): T;\n /** Atomically exchanges an integer value in memory. */\n export function xchg(ptr: usize, value: T, immOffset?: usize): T;\n /** Atomically compares and exchanges an integer value in memory if the condition is met. */\n export function cmpxchg(ptr: usize, expected: T, replacement: T, immOffset?: usize): T;\n /** Performs a wait operation on an address in memory suspending this agent if the integer condition is met. */\n export function wait(ptr: usize, expected: T, timeout?: i64): AtomicWaitResult;\n /** Performs a notify operation on an address in memory waking up suspended agents. */\n export function notify(ptr: usize, count?: i32): i32;\n /** Performs a fence operation, preserving synchronization guarantees of higher level languages. */\n export function fence(): void;\n}\n\n/** Describes the result of an atomic wait operation. */\ndeclare enum AtomicWaitResult {\n /** Woken by another agent. */\n OK,\n /** Loaded value did not match the expected value. */\n NOT_EQUAL,\n /** Not woken before the timeout expired. */\n TIMED_OUT\n}\n\n/** Converts any other numeric value to an 8-bit signed integer. */\ndeclare function i8(value: any): i8;\ndeclare namespace i8 {\n /** Smallest representable value. */\n export const MIN_VALUE: i8;\n /** Largest representable value. */\n export const MAX_VALUE: i8;\n}\n/** Converts any other numeric value to a 16-bit signed integer. */\ndeclare function i16(value: any): i16;\ndeclare namespace i16 {\n /** Smallest representable value. */\n export const MIN_VALUE: i16;\n /** Largest representable value. */\n export const MAX_VALUE: i16;\n}\n/** Converts any other numeric value to a 32-bit signed integer. */\ndeclare function i32(value: any): i32;\ndeclare namespace i32 {\n /** Smallest representable value. */\n export const MIN_VALUE: i32;\n /** Largest representable value. */\n export const MAX_VALUE: i32;\n /** Loads an 8-bit signed integer value from memory and returns it as a 32-bit integer. */\n export function load8_s(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n /** Loads an 8-bit unsigned integer value from memory and returns it as a 32-bit integer. */\n export function load8_u(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n /** Loads a 16-bit signed integer value from memory and returns it as a 32-bit integer. */\n export function load16_s(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n /** Loads a 16-bit unsigned integer value from memory and returns it as a 32-bit integer. */\n export function load16_u(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n /** Loads a 32-bit integer value from memory. */\n export function load(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n /** Stores a 32-bit integer value to memory as an 8-bit integer. */\n export function store8(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n /** Stores a 32-bit integer value to memory as a 16-bit integer. */\n export function store16(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n /** Stores a 32-bit integer value to memory. */\n export function store(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n /** Performs the sign-agnostic count leading zero bits operation on a 32-bit integer. All zero bits are considered leading if the value is zero. */\n export function clz(value: i32): i32;\n /** Performs the sign-agnostic count tailing zero bits operation on a 32-bit integer. All zero bits are considered trailing if the value is zero. */\n export function ctz(value: i32): i32;\n /** Performs the sign-agnostic count number of one bits operation on a 32-bit integer. */\n export function popcnt(value: i32): i32;\n /** Performs the sign-agnostic rotate left operation on a 32-bit integer. */\n export function rotl(value: i32, shift: i32): i32;\n /** Performs the sign-agnostic rotate right operation on a 32-bit integer. */\n export function rotr(value: i32, shift: i32): i32;\n /** Reinterprets the bits of the specified 32-bit float as a 32-bit integer. */\n export function reinterpret_f32(value: f32): i32;\n /** Computes the sum of two 32-bit integers. */\n export function add(left: i32, right: i32): i32;\n /** Computes the difference of two 32-bit integers. */\n export function sub(left: i32, right: i32): i32;\n /** Computes the product of two 32-bit integers. */\n export function mul(left: i32, right: i32): i32;\n /** Computes the signed quotient of two 32-bit integers. */\n export function div_s(left: i32, right: i32): i32;\n /** Computes the unsigned quotient of two 32-bit integers. */\n export function div_u(left: i32, right: i32): i32;\n /** Atomic 32-bit integer operations. */\n export namespace atomic {\n /** Atomically loads an 8-bit unsigned integer value from memory and returns it as a 32-bit integer. */\n export function load8_u(ptr: usize, immOffset?: usize): i32;\n /** Atomically loads a 16-bit unsigned integer value from memory and returns it as a 32-bit integer. */\n export function load16_u(ptr: usize, immOffset?: usize): i32;\n /** Atomically loads a 32-bit integer value from memory and returns it. */\n export function load(ptr: usize, immOffset?: usize): i32;\n /** Atomically stores a 32-bit integer value to memory as an 8-bit integer. */\n export function store8(ptr: usize, value: i32, immOffset?: usize): void;\n /** Atomically stores a 32-bit integer value to memory as a 16-bit integer. */\n export function store16(ptr: usize, value: i32, immOffset?: usize): void;\n /** Atomically stores a 32-bit integer value to memory. */\n export function store(ptr: usize, value: i32, immOffset?: usize): void;\n /** Performs a wait operation on a 32-bit integer value in memory suspending this agent if the condition is met. */\n export function wait(ptr: usize, expected: i32, timeout?: i64): AtomicWaitResult;\n /** Atomic 32-bit integer read-modify-write operations on 8-bit values. */\n export namespace rmw8 {\n /** Atomically adds an 8-bit unsigned integer value in memory. */\n export function add_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically subtracts an 8-bit unsigned integer value in memory. */\n export function sub_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise AND operation an 8-bit unsigned integer value in memory. */\n export function and_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise OR operation an 8-bit unsigned integer value in memory. */\n export function or_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise XOR operation an 8-bit unsigned integer value in memory. */\n export function xor_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically exchanges an 8-bit unsigned integer value in memory. */\n export function xchg_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically compares and exchanges an 8-bit unsigned integer value in memory if the condition is met. */\n export function cmpxchg_u(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n /** Atomic 32-bit integer read-modify-write operations on 16-bit values. */\n export namespace rmw16 {\n /** Atomically adds a 16-bit unsigned integer value in memory. */\n export function add_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically adds a 16-bit unsigned integer value in memory. */\n export function sub_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise AND operation a 16-bit unsigned integer value in memory. */\n export function and_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise OR operation a 16-bit unsigned integer value in memory. */\n export function or_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise XOR operation a 16-bit unsigned integer value in memory. */\n export function xor_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically exchanges a 16-bit unsigned integer value in memory. */\n export function xchg_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically compares and exchanges a 16-bit unsigned integer value in memory if the condition is met. */\n export function cmpxchg_u(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n /** Atomic 32-bit integer read-modify-write operations. */\n export namespace rmw {\n /** Atomically adds a 32-bit integer value in memory. */\n export function add(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically subtracts a 32-bit integer value in memory. */\n export function sub(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise AND operation a 32-bit integer value in memory. */\n export function and(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise OR operation a 32-bit integer value in memory. */\n export function or(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise XOR operation a 32-bit integer value in memory. */\n export function xor(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically exchanges a 32-bit integer value in memory. */\n export function xchg(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically compares and exchanges a 32-bit integer value in memory if the condition is met. */\n export function cmpxchg(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n }\n}\n/** Converts any other numeric value to a 64-bit signed integer. */\ndeclare function i64(value: any): i64;\ndeclare namespace i64 {\n /** Smallest representable value. */\n export const MIN_VALUE: i64;\n /** Largest representable value. */\n export const MAX_VALUE: i64;\n /** Loads an 8-bit signed integer value from memory and returns it as a 64-bit integer. */\n export function load8_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n /** Loads an 8-bit unsigned integer value from memory and returns it as a 64-bit integer. */\n export function load8_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n /** Loads a 16-bit signed integer value from memory and returns it as a 64-bit integer. */\n export function load16_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n /** Loads a 16-bit unsigned integer value from memory and returns it as a 64-bit integer. */\n export function load16_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n /** Loads a 32-bit signed integer value from memory and returns it as a 64-bit integer. */\n export function load32_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n /** Loads a 32-bit unsigned integer value from memory and returns it as a 64-bit integer. */\n export function load32_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n /** Loads a 64-bit unsigned integer value from memory. */\n export function load(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n /** Stores a 64-bit integer value to memory as an 8-bit integer. */\n export function store8(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n /** Stores a 64-bit integer value to memory as a 16-bit integer. */\n export function store16(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n /** Stores a 64-bit integer value to memory as a 32-bit integer. */\n export function store32(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n /** Stores a 64-bit integer value to memory. */\n export function store(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n /** Performs the sign-agnostic count leading zero bits operation on a 64-bit integer. All zero bits are considered leading if the value is zero. */\n export function clz(value: i64): i64;\n /** Performs the sign-agnostic count tailing zero bits operation on a 64-bit integer. All zero bits are considered trailing if the value is zero. */\n export function ctz(value: i64): i64;\n /** Performs the sign-agnostic count number of one bits operation on a 64-bit integer. */\n export function popcnt(value: i64): i64;\n /** Performs the sign-agnostic rotate left operation on a 64-bit integer. */\n export function rotl(value: i64, shift: i64): i64;\n /** Performs the sign-agnostic rotate right operation on a 64-bit integer. */\n export function rotr(value: i64, shift: i64): i64;\n /** Reinterprets the bits of the specified 64-bit float as a 64-bit integer. */\n export function reinterpret_f64(value: f64): i64;\n /** Computes the sum of two 64-bit integers. */\n export function add(left: i64, right: i64): i64;\n /** Computes the difference of two 64-bit integers. */\n export function sub(left: i64, right: i64): i64;\n /** Computes the product of two 64-bit integers. */\n export function mul(left: i64, right: i64): i64;\n /** Computes the signed quotient of two 64-bit integers. */\n export function div_s(left: i64, right: i64): i64;\n /** Computes the unsigned quotient of two 64-bit integers. */\n export function div_u(left: i64, right: i64): i64;\n /** Atomic 64-bit integer operations. */\n export namespace atomic {\n /** Atomically loads an 8-bit unsigned integer value from memory and returns it as a 64-bit integer. */\n export function load8_u(ptr: usize, immOffset?: usize): i64;\n /** Atomically loads a 16-bit unsigned integer value from memory and returns it as a 64-bit integer. */\n export function load16_u(ptr: usize, immOffset?: usize): i64;\n /** Atomically loads a 32-bit unsigned integer value from memory and returns it as a 64-bit integer. */\n export function load32_u(ptr: usize, immOffset?: usize): i64;\n /** Atomically loads a 64-bit integer value from memory and returns it. */\n export function load(ptr: usize, immOffset?: usize): i64;\n /** Atomically stores a 64-bit integer value to memory as an 8-bit integer. */\n export function store8(ptr: usize, value: i64, immOffset?: usize): void;\n /** Atomically stores a 64-bit integer value to memory as a 16-bit integer. */\n export function store16(ptr: usize, value: i64, immOffset?: usize): void;\n /** Atomically stores a 64-bit integer value to memory as a 32-bit integer. */\n export function store32(ptr: usize, value: i64, immOffset?: usize): void;\n /** Atomically stores a 64-bit integer value to memory. */\n export function store(ptr: usize, value: i64, immOffset?: usize): void;\n /** Performs a wait operation on a 64-bit integer value in memory suspending this agent if the condition is met. */\n export function wait(ptr: usize, expected: i64, timeout?: i64): AtomicWaitResult;\n /** Atomic 64-bit integer read-modify-write operations on 8-bit values. */\n export namespace rmw8 {\n /** Atomically adds an 8-bit unsigned integer value in memory. */\n export function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically subtracts an 8-bit unsigned integer value in memory. */\n export function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise AND operation on an 8-bit unsigned integer value in memory. */\n export function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise OR operation on an 8-bit unsigned integer value in memory. */\n export function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise XOR operation on an 8-bit unsigned integer value in memory. */\n export function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically exchanges an 8-bit unsigned integer value in memory. */\n export function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically compares and exchanges an 8-bit unsigned integer value in memory if the condition is met. */\n export function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n /** Atomic 64-bit integer read-modify-write operations on 16-bit values. */\n export namespace rmw16 {\n /** Atomically adds a 16-bit unsigned integer value in memory. */\n export function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically subtracts a 16-bit unsigned integer value in memory. */\n export function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise AND operation on a 16-bit unsigned integer value in memory. */\n export function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise OR operation on a 16-bit unsigned integer value in memory. */\n export function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise XOR operation on a 16-bit unsigned integer value in memory. */\n export function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically exchanges a 16-bit unsigned integer value in memory. */\n export function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically compares and exchanges a 16-bit unsigned integer value in memory if the condition is met. */\n export function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n /** Atomic 64-bit integer read-modify-write operations on 32-bit values. */\n export namespace rmw32 {\n /** Atomically adds a 32-bit unsigned integer value in memory. */\n export function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically subtracts a 32-bit unsigned integer value in memory. */\n export function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise AND operation on a 32-bit unsigned integer value in memory. */\n export function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise OR operation on a 32-bit unsigned integer value in memory. */\n export function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise XOR operation on a 32-bit unsigned integer value in memory. */\n export function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically exchanges a 32-bit unsigned integer value in memory. */\n export function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically compares and exchanges a 32-bit unsigned integer value in memory if the condition is met. */\n export function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n /** Atomic 64-bit integer read-modify-write operations. */\n export namespace rmw {\n /** Atomically adds a 64-bit integer value in memory. */\n export function add(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically subtracts a 64-bit integer value in memory. */\n export function sub(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise AND operation on a 64-bit integer value in memory. */\n export function and(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise OR operation on a 64-bit integer value in memory. */\n export function or(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise XOR operation on a 64-bit integer value in memory. */\n export function xor(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically exchanges a 64-bit integer value in memory. */\n export function xchg(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically compares and exchanges a 64-bit integer value in memory if the condition is met. */\n export function cmpxchg(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n }\n}\n/** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) signed integer. */\ndeclare var isize: typeof i32 | typeof i64;\n/** Converts any other numeric value to an 8-bit unsigned integer. */\ndeclare function u8(value: any): u8;\ndeclare namespace u8 {\n /** Smallest representable value. */\n export const MIN_VALUE: u8;\n /** Largest representable value. */\n export const MAX_VALUE: u8;\n}\n/** Converts any other numeric value to a 16-bit unsigned integer. */\ndeclare function u16(value: any): u16;\ndeclare namespace u16 {\n /** Smallest representable value. */\n export const MIN_VALUE: u16;\n /** Largest representable value. */\n export const MAX_VALUE: u16;\n}\n/** Converts any other numeric value to a 32-bit unsigned integer. */\ndeclare function u32(value: any): u32;\ndeclare namespace u32 {\n /** Smallest representable value. */\n export const MIN_VALUE: u32;\n /** Largest representable value. */\n export const MAX_VALUE: u32;\n}\n/** Converts any other numeric value to a 64-bit unsigned integer. */\ndeclare function u64(value: any): u64;\ndeclare namespace u64 {\n /** Smallest representable value. */\n export const MIN_VALUE: u64;\n /** Largest representable value. */\n export const MAX_VALUE: u64;\n}\n/** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) unsigned integer. */\ndeclare var usize: typeof u32 | typeof u64;\n/** Converts any other numeric value to a 1-bit unsigned integer. */\ndeclare function bool(value: any): bool;\ndeclare namespace bool {\n /** Smallest representable value. */\n export const MIN_VALUE: bool;\n /** Largest representable value. */\n export const MAX_VALUE: bool;\n}\n/** Converts any other numeric value to a 32-bit float. */\ndeclare function f32(value: any): f32;\ndeclare namespace f32 {\n /** Smallest representable value. */\n export const MIN_VALUE: f32;\n /** Largest representable value. */\n export const MAX_VALUE: f32;\n /** Smallest normalized positive value. */\n export const MIN_NORMAL_VALUE: f32;\n /** Smallest safely representable integer value. */\n export const MIN_SAFE_INTEGER: f32;\n /** Largest safely representable integer value. */\n export const MAX_SAFE_INTEGER: f32;\n /** Positive infinity value. */\n export const POSITIVE_INFINITY: f32;\n /** Negative infinity value. */\n export const NEGATIVE_INFINITY: f32;\n /** Not a number value. */\n export const NaN: f32;\n /** Difference between 1 and the smallest representable value greater than 1. */\n export const EPSILON: f32;\n /** Loads a 32-bit float from memory. */\n export function load(ptr: usize, immOffset?: usize, immAlign?: usize): f32;\n /** Stores a 32-bit float to memory. */\n export function store(ptr: usize, value: f32, immOffset?: usize, immAlign?: usize): void;\n /** Computes the sum of two 32-bit floats. */\n export function add(left: f32, right: f32): f32;\n /** Computes the difference of two 32-bit floats. */\n export function sub(left: f32, right: f32): f32;\n /** Computes the product of two 32-bit floats. */\n export function mul(left: f32, right: f32): f32;\n /** Computes the quotient of two 32-bit floats. */\n export function div(left: f32, right: f32): f32;\n /** Computes the absolute value of a 32-bit float. */\n export function abs(value: f32): f32;\n /** Determines the maximum of two 32-bit floats. If either operand is `NaN`, returns `NaN`. */\n export function max(left: f32, right: f32): f32;\n /** Determines the minimum of two 32-bit floats. If either operand is `NaN`, returns `NaN`. */\n export function min(left: f32, right: f32): f32;\n /** Performs the ceiling operation on a 32-bit float. */\n export function ceil(value: f32): f32;\n /** Composes a 32-bit float from the magnitude of `x` and the sign of `y`. */\n export function copysign(x: f32, y: f32): f32;\n /** Performs the floor operation on a 32-bit float. */\n export function floor(value: f32): f32;\n /** Rounds to the nearest integer tied to even of a 32-bit float. */\n export function nearest(value: f32): f32;\n /** Reinterprets the bits of the specified 32-bit integer as a 32-bit float. */\n export function reinterpret_i32(value: i32): f32;\n /** Calculates the square root of a 32-bit float. */\n export function sqrt(value: f32): f32;\n /** Rounds to the nearest integer towards zero of a 32-bit float. */\n export function trunc(value: f32): f32;\n}\n/** Converts any other numeric value to a 64-bit float. */\ndeclare function f64(value: any): f64;\ndeclare namespace f64 {\n /** Smallest representable value. */\n export const MIN_VALUE: f64;\n /** Largest representable value. */\n export const MAX_VALUE: f64;\n /** Smallest normalized positive value. */\n export const MIN_NORMAL_VALUE: f64;\n /** Smallest safely representable integer value. */\n export const MIN_SAFE_INTEGER: f64;\n /** Largest safely representable integer value. */\n export const MAX_SAFE_INTEGER: f64;\n /** Positive infinity value. */\n export const POSITIVE_INFINITY: f64;\n /** Negative infinity value. */\n export const NEGATIVE_INFINITY: f64;\n /** Not a number value. */\n export const NaN: f64;\n /** Difference between 1 and the smallest representable value greater than 1. */\n export const EPSILON: f64;\n /** Loads a 64-bit float from memory. */\n export function load(ptr: usize, immOffset?: usize, immAlign?: usize): f64;\n /** Stores a 64-bit float to memory. */\n export function store(ptr: usize, value: f64, immOffset?: usize, immAlign?: usize): void;\n /** Computes the sum of two 64-bit floats. */\n export function add(left: f64, right: f64): f64;\n /** Computes the difference of two 64-bit floats. */\n export function sub(left: f64, right: f64): f64;\n /** Computes the product of two 64-bit floats. */\n export function mul(left: f64, right: f64): f64;\n /** Computes the quotient of two 64-bit floats. */\n export function div(left: f64, right: f64): f64;\n /** Computes the absolute value of a 64-bit float. */\n export function abs(value: f64): f64;\n /** Determines the maximum of two 64-bit floats. If either operand is `NaN`, returns `NaN`. */\n export function max(left: f64, right: f64): f64;\n /** Determines the minimum of two 64-bit floats. If either operand is `NaN`, returns `NaN`. */\n export function min(left: f64, right: f64): f64;\n /** Performs the ceiling operation on a 64-bit float. */\n export function ceil(value: f64): f64;\n /** Composes a 64-bit float from the magnitude of `x` and the sign of `y`. */\n export function copysign(x: f64, y: f64): f64;\n /** Performs the floor operation on a 64-bit float. */\n export function floor(value: f64): f64;\n /** Rounds to the nearest integer tied to even of a 64-bit float. */\n export function nearest(value: f64): f64;\n /** Reinterprets the bits of the specified 64-bit integer as a 64-bit float. */\n export function reinterpret_i64(value: i64): f64;\n /** Calculates the square root of a 64-bit float. */\n export function sqrt(value: f64): f64;\n /** Rounds to the nearest integer towards zero of a 64-bit float. */\n export function trunc(value: f64): f64;\n}\n/** Initializes a 128-bit vector from sixteen 8-bit integer values. Arguments must be compile-time constants. */\ndeclare function v128(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8): v128;\ndeclare namespace v128 {\n /** Creates a vector with identical lanes. */\n export function splat(x: T): v128;\n /** Extracts one lane as a scalar. */\n export function extract_lane(x: v128, idx: u8): T;\n /** Replaces one lane. */\n export function replace_lane(x: v128, idx: u8, value: T): v128;\n /** Selects lanes from either vector according to the specified lane indexes. */\n export function shuffle(a: v128, b: v128, ...lanes: u8[]): v128;\n /** Selects 8-bit lanes from the first vector according to the indexes [0-15] specified by the 8-bit lanes of the second vector. */\n export function swizzle(a: v128, s: v128): v128;\n /** Loads a vector from memory. */\n export function load(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Creates a vector by loading the lanes of the specified type and extending each to the next larger type. */\n export function load_ext(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Creates a vector by loading a value of the specified type into the lowest bits and initializing all other bits of the vector to zero. */\n export function load_zero(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a single lane from memory into the specified lane of the given vector. Other lanes are bypassed as is. */\n export function load_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Stores the single lane at the specified index of the given vector to memory. */\n export function store_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Creates a vector with eight 16-bit integer lanes by loading and sign extending eight 8-bit integers. */\n export function load8x8_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n /** Creates a vector with eight 16-bit integer lanes by loading and zero extending eight 8-bit integers. */\n export function load8x8_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n /** Creates a vector with four 32-bit integer lanes by loading and sign extending four 16-bit integers. */\n export function load16x4_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n /** Creates a vector with four 32-bit integer lanes by loading and zero extending four 16-bit integers. */\n export function load16x4_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n /** Creates a vector with two 64-bit integer lanes by loading and sign extending two 32-bit integers. */\n export function load32x2_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n /** Creates a vector with two 64-bit integer lanes by loading and zero extending two 32-bit integers. */\n export function load32x2_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n /** Creates a vector with identical lanes by loading the splatted value. */\n export function load_splat(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Loads an 8-bit integer and splats it sixteen times forming a new vector. */\n export function load8_splat(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a 16-bit integer and splats it eight times forming a new vector. */\n export function load16_splat(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a 32-bit integer and splats it four times forming a new vector. */\n export function load32_splat(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a 64-bit integer and splats it two times forming a new vector. */\n export function load64_splat(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Creates a vector by loading a 32-bit value into the lowest bits and initializing all other bits of the vector to zero. */\n export function load32_zero(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Creates a vector by loading a 64-bit value into the lowest bits and initializing all other bits of the vector to zero. */\n export function load64_zero(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a single 8-bit lane from memory into the specified lane of the given vector. Other lanes are bypassed as is. */\n export function load8_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a single 16-bit lane from memory into the specified lane of the given vector. Other lanes are bypassed as is. */\n export function load16_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a single 32-bit lane from memory into the specified lane of the given vector. Other lanes are bypassed as is. */\n export function load32_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a single 64-bit lane from memory into the specified lane of the given vector. Other lanes are bypassed as is. */\n export function load64_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Stores the 8-bit lane at the specified lane of the given vector to memory. */\n export function store8_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Stores the 16-bit lane at the specified lane of the given vector to memory. */\n export function store16_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Stores the 32-bit lane at the specified lane of the given vector to memory. */\n export function store32_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Stores the 64-bit lane at the specified lane of the given vector to memory. */\n export function store64_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Stores a vector to memory. */\n export function store(ptr: usize, value: v128, immOffset?: usize, immAlign?: usize): void;\n /** Adds each lane. */\n export function add(a: v128, b: v128): v128;\n /** Subtracts each lane. */\n export function sub(a: v128, b: v128): v128;\n /** Multiplies each lane. */\n export function mul(a: v128, b: v128): v128; // except i64\n /** Divides each lane. */\n export function div(a: v128, b: v128): v128;\n /** Negates each lane of a vector. */\n export function neg(a: v128): v128;\n /** Adds each lane using saturation. */\n export function add_sat(a: v128, b: v128): v128;\n /** Subtracts each lane using saturation. */\n export function sub_sat(a: v128, b: v128): v128;\n /** Performs a bitwise left shift on each lane of a vector by a scalar. */\n export function shl(a: v128, b: i32): v128;\n /** Performs a bitwise right shift on each lane of a vector by a scalar. */\n export function shr(a: v128, b: i32): v128;\n /** Performs the bitwise AND operation on two vectors. */\n export function and(a: v128, b: v128): v128;\n /** Performs the bitwise OR operation on two vectors. */\n export function or(a: v128, b: v128): v128;\n /** Performs the bitwise XOR operation on two vectors. */\n export function xor(a: v128, b: v128): v128;\n /** Performs the bitwise ANDNOT operation on two vectors. */\n export function andnot(a: v128, b: v128): v128;\n /** Performs the bitwise NOT operation on a vector. */\n export function not(a: v128): v128;\n /** Selects bits of either vector according to the specified mask. */\n export function bitselect(v1: v128, v2: v128, mask: v128): v128;\n /** Reduces a vector to a scalar indicating whether any lane is considered `true`. */\n export function any_true(a: v128): bool;\n /** Reduces a vector to a scalar indicating whether all lanes are considered `true`. */\n export function all_true(a: v128): bool;\n /** Extracts the high bit of each lane and produces a scalar mask with all bits concatenated. */\n export function bitmask(a: v128): i32;\n /** Counts the number of bits set to one within each lane. */\n export function popcnt(a: v128): v128;\n /** Computes the minimum of each lane. */\n export function min(a: v128, b: v128): v128;\n /** Computes the maximum of each lane. */\n export function max(a: v128, b: v128): v128;\n /** Computes the pseudo-minimum of each lane. */\n export function pmin(a: v128, b: v128): v128;\n /** Computes the pseudo-maximum of each lane. */\n export function pmax(a: v128, b: v128): v128;\n /** Computes the dot product of two lanes each, yielding lanes one size wider than the input. */\n export function dot(a: v128, b: v128): v128;\n /** Computes the average of each lane. */\n export function avgr(a: v128, b: v128): v128;\n /** Computes the absolute value of each lane. */\n export function abs(a: v128): v128;\n /** Computes the square root of each lane. */\n export function sqrt(a: v128): v128;\n /** Performs the ceiling operation on each lane. */\n export function ceil(a: v128): v128;\n /** Performs the floor operation on each lane. */\n export function floor(a: v128): v128;\n /** Rounds to the nearest integer towards zero of each lane. */\n export function trunc(a: v128): v128;\n /** Rounds to the nearest integer tied to even of each lane. */\n export function nearest(a: v128): v128;\n /** Computes which lanes are equal. */\n export function eq(a: v128, b: v128): v128;\n /** Computes which lanes are not equal. */\n export function ne(a: v128, b: v128): v128;\n /** Computes which lanes of the first vector are less than those of the second. */\n export function lt(a: v128, b: v128): v128;\n /** Computes which lanes of the first vector are less than or equal those of the second. */\n export function le(a: v128, b: v128): v128;\n /** Computes which lanes of the first vector are greater than those of the second. */\n export function gt(a: v128, b: v128): v128;\n /** Computes which lanes of the first vector are greater than or equal those of the second. */\n export function ge(a: v128, b: v128): v128;\n /** Converts each lane of a vector from integer to single-precision floating point. */\n export function convert(a: v128): v128;\n /** Converts the low lanes of a vector from integer to double-precision floating point. */\n export function convert_low(a: v128): v128;\n /** Truncates each lane of a vector from single-precision floating point to integer with saturation. Takes the target type. */\n export function trunc_sat(a: v128): v128;\n /** Truncates each lane of a vector from double-precision floating point to integer with saturation. Takes the target type. */\n export function trunc_sat_zero(a: v128): v128;\n /** Narrows each lane to their respective narrower lanes. */\n export function narrow(a: v128, b: v128): v128;\n /** Extends the low lanes of a vector to their respective wider lanes. */\n export function extend_low(a: v128): v128;\n /** Extends the high lanes of a vector to their respective wider lanes. */\n export function extend_high(a: v128): v128;\n /** Adds lanes pairwise producing twice wider extended results. */\n export function extadd_pairwise(a: v128): v128;\n /** Demotes each float lane to lower precision. The higher lanes of the result are initialized to zero. */\n export function demote_zero(a: v128): v128;\n /** Promotes the lower float lanes to higher precision. */\n export function promote_low(a: v128): v128;\n /** Performs the line-wise saturating rounding multiplication in Q15 format. */\n export function q15mulr_sat(a: v128, b: v128): v128;\n /** Performs the lane-wise integer extended multiplication of the lower lanes producing a twice wider result than the inputs. */\n export function extmul_low(a: v128, b: v128): v128;\n /** Performs the lane-wise integer extended multiplication of the higher lanes producing a twice wider result than the inputs. */\n export function extmul_high(a: v128, b: v128): v128;\n}\n/** Initializes a 128-bit vector from sixteen 8-bit integer values. Arguments must be compile-time constants. */\ndeclare function i8x16(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8): v128;\ndeclare namespace i8x16 {\n /** Creates a vector with sixteen identical 8-bit integer lanes. */\n export function splat(x: i8): v128;\n /** Extracts one 8-bit integer lane as a signed scalar. */\n export function extract_lane_s(x: v128, idx: u8): i8;\n /** Extracts one 8-bit integer lane as an unsigned scalar. */\n export function extract_lane_u(x: v128, idx: u8): u8;\n /** Replaces one 8-bit integer lane. */\n export function replace_lane(x: v128, idx: u8, value: i8): v128;\n /** Adds each 8-bit integer lane. */\n export function add(a: v128, b: v128): v128;\n /** Subtracts each 8-bit integer lane. */\n export function sub(a: v128, b: v128): v128;\n /** Computes the signed minimum of each 8-bit integer lane. */\n export function min_s(a: v128, b: v128): v128;\n /** Computes the unsigned minimum of each 8-bit integer lane. */\n export function min_u(a: v128, b: v128): v128;\n /** Computes the signed maximum of each 8-bit integer lane. */\n export function max_s(a: v128, b: v128): v128;\n /** Computes the unsigned maximum of each 8-bit integer lane. */\n export function max_u(a: v128, b: v128): v128;\n /** Computes the unsigned average of each 8-bit integer lane. */\n export function avgr_u(a: v128, b: v128): v128;\n /** Computes the absolute value of each 8-bit integer lane. */\n export function abs(a: v128): v128;\n /** Negates each 8-bit integer lane. */\n export function neg(a: v128): v128;\n /** Adds each 8-bit integer lane using signed saturation. */\n export function add_sat_s(a: v128, b: v128): v128;\n /** Adds each 8-bit integer lane using unsigned saturation. */\n export function add_sat_u(a: v128, b: v128): v128;\n /** Subtracts each 8-bit integer lane using signed saturation. */\n export function sub_sat_s(a: v128, b: v128): v128;\n /** Subtracts each 8-bit integer lane using unsigned saturation. */\n export function sub_sat_u(a: v128, b: v128): v128;\n /** Performs a bitwise left shift on each 8-bit integer lane by a scalar. */\n export function shl(a: v128, b: i32): v128;\n /** Performs a bitwise arithmetic right shift on each 8-bit integer lane by a scalar. */\n export function shr_s(a: v128, b: i32): v128;\n /** Performs a bitwise logical right shift on each 8-bit integer lane by a scalar. */\n export function shr_u(a: v128, b: i32): v128;\n /** Reduces a vector to a scalar indicating whether all 8-bit integer lanes are considered `true`. */\n export function all_true(a: v128): bool;\n /** Extracts the high bit of each 8-bit integer lane and produces a scalar mask with all bits concatenated. */\n export function bitmask(a: v128): i32;\n /** Counts the number of bits set to one within each 8-bit integer lane. */\n export function popcnt(a: v128): v128;\n /** Computes which 8-bit integer lanes are equal. */\n export function eq(a: v128, b: v128): v128;\n /** Computes which 8-bit integer lanes are not equal. */\n export function ne(a: v128, b: v128): v128;\n /** Computes which 8-bit signed integer lanes of the first vector are less than those of the second. */\n export function lt_s(a: v128, b: v128): v128;\n /** Computes which 8-bit unsigned integer lanes of the first vector are less than those of the second. */\n export function lt_u(a: v128, b: v128): v128;\n /** Computes which 8-bit signed integer lanes of the first vector are less than or equal those of the second. */\n export function le_s(a: v128, b: v128): v128;\n /** Computes which 8-bit unsigned integer lanes of the first vector are less than or equal those of the second. */\n export function le_u(a: v128, b: v128): v128;\n /** Computes which 8-bit signed integer lanes of the first vector are greater than those of the second. */\n export function gt_s(a: v128, b: v128): v128;\n /** Computes which 8-bit unsigned integer lanes of the first vector are greater than those of the second. */\n export function gt_u(a: v128, b: v128): v128;\n /** Computes which 8-bit signed integer lanes of the first vector are greater than or equal those of the second. */\n export function ge_s(a: v128, b: v128): v128;\n /** Computes which 8-bit unsigned integer lanes of the first vector are greater than or equal those of the second. */\n export function ge_u(a: v128, b: v128): v128;\n /** Narrows each 16-bit signed integer lane to 8-bit signed integer lanes. */\n export function narrow_i16x8_s(a: v128, b: v128): v128;\n /** Narrows each 16-bit signed integer lane to 8-bit unsigned integer lanes. */\n export function narrow_i16x8_u(a: v128, b: v128): v128;\n /** Selects 8-bit lanes from either vector according to the specified [0-15] respectively [16-31] lane indexes. */\n export function shuffle(a: v128, b: v128, l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8, l8: u8, l9: u8, l10: u8, l11: u8, l12: u8, l13: u8, l14: u8, l15: u8): v128;\n /** Selects 8-bit lanes from the first vector according to the indexes [0-15] specified by the 8-bit lanes of the second vector. */\n export function swizzle(a: v128, s: v128): v128;\n}\n/** Initializes a 128-bit vector from eight 16-bit integer values. Arguments must be compile-time constants. */\ndeclare function i16x8(a: i16, b: i16, c: i16, d: i16, e: i16, f: i16, g: i16, h: i16): v128;\ndeclare namespace i16x8 {\n /** Creates a vector with eight identical 16-bit integer lanes. */\n export function splat(x: i16): v128;\n /** Extracts one 16-bit integer lane as a signed scalar. */\n export function extract_lane_s(x: v128, idx: u8): i16;\n /** Extracts one 16-bit integer lane as an unsigned scalar. */\n export function extract_lane_u(x: v128, idx: u8): u16;\n /** Replaces one 16-bit integer lane. */\n export function replace_lane(x: v128, idx: u8, value: i16): v128;\n /** Adds each 16-bit integer lane. */\n export function add(a: v128, b: v128): v128;\n /** Subtracts each 16-bit integer lane. */\n export function sub(a: v128, b: v128): v128;\n /** Multiplies each 16-bit integer lane. */\n export function mul(a: v128, b: v128): v128;\n /** Computes the signed minimum of each 16-bit integer lane. */\n export function min_s(a: v128, b: v128): v128;\n /** Computes the unsigned minimum of each 16-bit integer lane. */\n export function min_u(a: v128, b: v128): v128;\n /** Computes the signed maximum of each 16-bit integer lane. */\n export function max_s(a: v128, b: v128): v128;\n /** Computes the unsigned maximum of each 16-bit integer lane. */\n export function max_u(a: v128, b: v128): v128;\n /** Computes the unsigned average of each 16-bit integer lane. */\n export function avgr_u(a: v128, b: v128): v128;\n /** Computes the absolute value of each 16-bit integer lane. */\n export function abs(a: v128): v128;\n /** Negates each 16-bit integer lane. */\n export function neg(a: v128): v128;\n /** Adds each 16-bit integer lane using signed saturation. */\n export function add_sat_s(a: v128, b: v128): v128;\n /** Adds each 16-bit integer lane using unsigned saturation. */\n export function add_sat_u(a: v128, b: v128): v128;\n /** Subtracts each 16-bit integer lane using signed saturation. */\n export function sub_sat_s(a: v128, b: v128): v128;\n /** Subtracts each 16-bit integer lane using unsigned saturation. */\n export function sub_sat_u(a: v128, b: v128): v128;\n /** Performs a bitwise left shift on each 16-bit integer lane by a scalar. */\n export function shl(a: v128, b: i32): v128;\n /** Performs a bitwise arithmetic right shift each 16-bit integer lane by a scalar. */\n export function shr_s(a: v128, b: i32): v128;\n /** Performs a bitwise logical right shift on each 16-bit integer lane by a scalar. */\n export function shr_u(a: v128, b: i32): v128;\n /** Reduces a vector to a scalar indicating whether all 16-bit integer lanes are considered `true`. */\n export function all_true(a: v128): bool;\n /** Extracts the high bit of each 16-bit integer lane and produces a scalar mask with all bits concatenated. */\n export function bitmask(a: v128): i32;\n /** Computes which 16-bit integer lanes are equal. */\n export function eq(a: v128, b: v128): v128;\n /** Computes which 16-bit integer lanes are not equal. */\n export function ne(a: v128, b: v128): v128;\n /** Computes which 16-bit signed integer lanes of the first vector are less than those of the second. */\n export function lt_s(a: v128, b: v128): v128;\n /** Computes which 16-bit unsigned integer lanes of the first vector are less than those of the second. */\n export function lt_u(a: v128, b: v128): v128;\n /** Computes which 16-bit signed integer lanes of the first vector are less than or equal those of the second. */\n export function le_s(a: v128, b: v128): v128;\n /** Computes which 16-bit unsigned integer lanes of the first vector are less than or equal those of the second. */\n export function le_u(a: v128, b: v128): v128;\n /** Computes which 16-bit signed integer lanes of the first vector are greater than those of the second. */\n export function gt_s(a: v128, b: v128): v128;\n /** Computes which 16-bit unsigned integer lanes of the first vector are greater than those of the second. */\n export function gt_u(a: v128, b: v128): v128;\n /** Computes which 16-bit signed integer lanes of the first vector are greater than or equal those of the second. */\n export function ge_s(a: v128, b: v128): v128;\n /** Computes which 16-bit unsigned integer lanes of the first vector are greater than or equal those of the second. */\n export function ge_u(a: v128, b: v128): v128;\n /** Narrows each 32-bit signed integer lane to 16-bit signed integer lanes. */\n export function narrow_i32x4_s(a: v128, b: v128): v128;\n /** Narrows each 32-bit signed integer lane to 16-bit unsigned integer lanes. */\n export function narrow_i32x4_u(a: v128, b: v128): v128;\n /** Extends the low 8-bit signed integer lanes to 16-bit signed integer lanes. */\n export function extend_low_i8x16_s(a: v128): v128;\n /** Extends the low 8-bit unsigned integer lanes to 16-bit unsigned integer lanes. */\n export function extend_low_i8x16_u(a: v128): v128;\n /** Extends the high 8-bit signed integer lanes to 16-bit signed integer lanes. */\n export function extend_high_i8x16_s(a: v128): v128;\n /** Extends the high 8-bit unsigned integer lanes to 16-bit unsigned integer lanes. */\n export function extend_high_i8x16_u(a: v128): v128;\n /** Adds the sixteen 8-bit signed integer lanes pairwise producing eight 16-bit signed integer results. */\n export function extadd_pairwise_i8x16_s(a: v128): v128;\n /** Adds the sixteen 8-bit unsigned integer lanes pairwise producing eight 16-bit unsigned integer results. */\n export function extadd_pairwise_i8x16_u(a: v128): v128;\n /** Performs the line-wise 16-bit signed integer saturating rounding multiplication in Q15 format. */\n export function q15mulr_sat_s(a: v128, b: v128): v128;\n /** Performs the lane-wise 8-bit signed integer extended multiplication of the eight lower lanes producing twice wider 16-bit integer results. */\n export function extmul_low_i8x16_s(a: v128, b: v128): v128;\n /** Performs the lane-wise 8-bit unsigned integer extended multiplication of the eight lower lanes producing twice wider 16-bit integer results. */\n export function extmul_low_i8x16_u(a: v128, b: v128): v128;\n /** Performs the lane-wise 8-bit signed integer extended multiplication of the eight higher lanes producing twice wider 16-bit integer results. */\n export function extmul_high_i8x16_s(a: v128, b: v128): v128;\n /** Performs the lane-wise 8-bit unsigned integer extended multiplication of the eight higher lanes producing twice wider 16-bit integer results. */\n export function extmul_high_i8x16_u(a: v128, b: v128): v128;\n}\n/** Initializes a 128-bit vector from four 32-bit integer values. Arguments must be compile-time constants. */\ndeclare function i32x4(a: i32, b: i32, c: i32, d: i32): v128;\ndeclare namespace i32x4 {\n /** Creates a vector with four identical 32-bit integer lanes. */\n export function splat(x: i32): v128;\n /** Extracts one 32-bit integer lane as a scalar. */\n export function extract_lane(x: v128, idx: u8): i32;\n /** Replaces one 32-bit integer lane. */\n export function replace_lane(x: v128, idx: u8, value: i32): v128;\n /** Adds each 32-bit integer lane. */\n export function add(a: v128, b: v128): v128;\n /** Subtracts each 32-bit integer lane. */\n export function sub(a: v128, b: v128): v128;\n /** Multiplies each 32-bit integer lane. */\n export function mul(a: v128, b: v128): v128;\n /** Computes the signed minimum of each 32-bit integer lane. */\n export function min_s(a: v128, b: v128): v128;\n /** Computes the unsigned minimum of each 32-bit integer lane. */\n export function min_u(a: v128, b: v128): v128;\n /** Computes the signed maximum of each 32-bit integer lane. */\n export function max_s(a: v128, b: v128): v128;\n /** Computes the unsigned maximum of each 32-bit integer lane. */\n export function max_u(a: v128, b: v128): v128;\n /** Computes the dot product of two 16-bit integer lanes each, yielding 32-bit integer lanes. */\n export function dot_i16x8_s(a: v128, b: v128): v128;\n /** Computes the absolute value of each 32-bit integer lane. */\n export function abs(a: v128): v128;\n /** Negates each 32-bit integer lane. */\n export function neg(a: v128): v128;\n /** Performs a bitwise left shift on each 32-bit integer lane by a scalar. */\n export function shl(a: v128, b: i32): v128;\n /** Performs a bitwise arithmetic right shift on each 32-bit integer lane by a scalar. */\n export function shr_s(a: v128, b: i32): v128;\n /** Performs a bitwise logical right shift on each 32-bit integer lane by a scalar. */\n export function shr_u(a: v128, b: i32): v128;\n /** Reduces a vector to a scalar indicating whether all 32-bit integer lanes are considered `true`. */\n export function all_true(a: v128): bool;\n /** Extracts the high bit of each 32-bit integer lane and produces a scalar mask with all bits concatenated. */\n export function bitmask(a: v128): i32;\n /** Computes which 32-bit integer lanes are equal. */\n export function eq(a: v128, b: v128): v128;\n /** Computes which 32-bit integer lanes are not equal. */\n export function ne(a: v128, b: v128): v128;\n /** Computes which 32-bit signed integer lanes of the first vector are less than those of the second. */\n export function lt_s(a: v128, b: v128): v128;\n /** Computes which 32-bit unsigned integer lanes of the first vector are less than those of the second. */\n export function lt_u(a: v128, b: v128): v128;\n /** Computes which 32-bit signed integer lanes of the first vector are less than or equal those of the second. */\n export function le_s(a: v128, b: v128): v128;\n /** Computes which 32-bit unsigned integer lanes of the first vector are less than or equal those of the second. */\n export function le_u(a: v128, b: v128): v128;\n /** Computes which 32-bit signed integer lanes of the first vector are greater than those of the second. */\n export function gt_s(a: v128, b: v128): v128;\n /** Computes which 32-bit unsigned integer lanes of the first vector are greater than those of the second. */\n export function gt_u(a: v128, b: v128): v128;\n /** Computes which 32-bit signed integer lanes of the first vector are greater than or equal those of the second. */\n export function ge_s(a: v128, b: v128): v128;\n /** Computes which 32-bit unsigned integer lanes of the first vector are greater than or equal those of the second. */\n export function ge_u(a: v128, b: v128): v128;\n /** Truncates each 32-bit float lane to a signed integer with saturation. */\n export function trunc_sat_f32x4_s(a: v128): v128;\n /** Truncates each 32-bit float lane to an unsigned integer with saturation. */\n export function trunc_sat_f32x4_u(a: v128): v128;\n /** Truncates the two 64-bit float lanes to the two lower signed integer lanes with saturation. The two higher integer lanes of the result are initialized to zero. */\n export function trunc_sat_f64x2_s_zero(a: v128): v128;\n /** Truncates the two 64-bit float lanes to the two lower unsigned integer lanes with saturation. The two higher integer lanes of the result are initialized to zero. */\n export function trunc_sat_f64x2_u_zero(a: v128): v128;\n /** Extends the low 16-bit signed integer lanes to 32-bit signed integer lanes. */\n export function extend_low_i16x8_s(a: v128): v128;\n /** Extends the low 16-bit unsigned integer lane to 32-bit unsigned integer lanes. */\n export function extend_low_i16x8_u(a: v128): v128;\n /** Extends the high 16-bit signed integer lanes to 32-bit signed integer lanes. */\n export function extend_high_i16x8_s(a: v128): v128;\n /** Extends the high 16-bit unsigned integer lanes to 32-bit unsigned integer lanes. */\n export function extend_high_i16x8_u(a: v128): v128;\n /** Adds the eight 16-bit signed integer lanes pairwise producing four 32-bit signed integer results. */\n export function extadd_pairwise_i16x8_s(a: v128): v128;\n /** Adds the eight 16-bit unsigned integer lanes pairwise producing four 32-bit unsigned integer results. */\n export function extadd_pairwise_i16x8_u(a: v128): v128;\n /** Performs the lane-wise 16-bit signed integer extended multiplication of the four lower lanes producing twice wider 32-bit integer results. */\n export function extmul_low_i16x8_s(a: v128, b: v128): v128;\n /** Performs the lane-wise 16-bit unsigned integer extended multiplication of the four lower lanes producing twice wider 32-bit integer results. */\n export function extmul_low_i16x8_u(a: v128, b: v128): v128;\n /** Performs the lane-wise 16-bit signed integer extended multiplication of the four higher lanes producing twice wider 32-bit integer results. */\n export function extmul_high_i16x8_s(a: v128, b: v128): v128;\n /** Performs the lane-wise 16-bit unsigned integer extended multiplication of the four higher lanes producing twice wider 32-bit integer results. */\n export function extmul_high_i16x8_u(a: v128, b: v128): v128;\n}\n/** Initializes a 128-bit vector from two 64-bit integer values. Arguments must be compile-time constants. */\ndeclare function i64x2(a: i64, b: i64): v128;\ndeclare namespace i64x2 {\n /** Creates a vector with two identical 64-bit integer lanes. */\n export function splat(x: i64): v128;\n /** Extracts one 64-bit integer lane as a scalar. */\n export function extract_lane(x: v128, idx: u8): i64;\n /** Replaces one 64-bit integer lane. */\n export function replace_lane(x: v128, idx: u8, value: i64): v128;\n /** Adds each 64-bit integer lane. */\n export function add(a: v128, b: v128): v128;\n /** Subtracts each 64-bit integer lane. */\n export function sub(a: v128, b: v128): v128;\n /** Multiplies each 64-bit integer lane. */\n export function mul(a: v128, b: v128): v128;\n /** Computes the absolute value of each 64-bit integer lane. */\n export function abs(a: v128): v128;\n /** Negates each 64-bit integer lane. */\n export function neg(a: v128): v128;\n /** Performs a bitwise left shift on each 64-bit integer lane by a scalar. */\n export function shl(a: v128, b: i32): v128;\n /** Performs a bitwise arithmetic right shift on each 64-bit integer lane by a scalar. */\n export function shr_s(a: v128, b: i32): v128;\n /** Performs a bitwise logical right shift on each 64-bit integer lane by a scalar. */\n export function shr_u(a: v128, b: i32): v128;\n /** Reduces a vector to a scalar indicating whether all 64-bit integer lanes are considered `true`. */\n export function all_true(a: v128): bool;\n /** Extracts the high bit of each 64-bit integer lane and produces a scalar mask with all bits concatenated. */\n export function bitmask(a: v128): i32;\n /** Computes which 64-bit integer lanes are equal. */\n export function eq(a: v128, b: v128): v128;\n /** Computes which 64-bit integer lanes are not equal. */\n export function ne(a: v128, b: v128): v128;\n /** Computes which 64-bit signed integer lanes of the first vector are less than those of the second. */\n export function lt_s(a: v128, b: v128): v128;\n /** Computes which 64-bit signed integer lanes of the first vector are less than or equal those of the second. */\n export function le_s(a: v128, b: v128): v128;\n /** Computes which 64-bit signed integer lanes of the first vector are greater than those of the second. */\n export function gt_s(a: v128, b: v128): v128;\n /** Computes which 64-bit signed integer lanes of the first vector are greater than or equal those of the second. */\n export function ge_s(a: v128, b: v128): v128;\n /** Extends the low 32-bit signed integer lanes to 64-bit signed integer lanes. */\n export function extend_low_i32x4_s(a: v128): v128;\n /** Extends the low 32-bit unsigned integer lane to 64-bit unsigned integer lanes. */\n export function extend_low_i32x4_u(a: v128): v128;\n /** Extends the high 32-bit signed integer lanes to 64-bit signed integer lanes. */\n export function extend_high_i32x4_s(a: v128): v128;\n /** Extends the high 32-bit unsigned integer lanes to 64-bit unsigned integer lanes. */\n export function extend_high_i32x4_u(a: v128): v128;\n /** Performs the lane-wise 32-bit signed integer extended multiplication of the two lower lanes producing twice wider 64-bit integer results. */\n export function extmul_low_i32x4_s(a: v128, b: v128): v128;\n /** Performs the lane-wise 32-bit unsigned integer extended multiplication of the two lower lanes producing twice wider 64-bit integer results. */\n export function extmul_low_i32x4_u(a: v128, b: v128): v128;\n /** Performs the lane-wise 32-bit signed integer extended multiplication of the two higher lanes producing twice wider 64-bit integer results. */\n export function extmul_high_i32x4_s(a: v128, b: v128): v128;\n /** Performs the lane-wise 32-bit unsigned integer extended multiplication of the two higher lanes producing twice wider 64-bit integer results. */\n export function extmul_high_i32x4_u(a: v128, b: v128): v128;\n}\n/** Initializes a 128-bit vector from four 32-bit float values. Arguments must be compile-time constants. */\ndeclare function f32x4(a: f32, b: f32, c: f32, d: f32): v128;\ndeclare namespace f32x4 {\n /** Creates a vector with four identical 32-bit float lanes. */\n export function splat(x: f32): v128;\n /** Extracts one 32-bit float lane as a scalar. */\n export function extract_lane(x: v128, idx: u8): f32;\n /** Replaces one 32-bit float lane. */\n export function replace_lane(x: v128, idx: u8, value: f32): v128;\n /** Adds each 32-bit float lane. */\n export function add(a: v128, b: v128): v128;\n /** Subtracts each 32-bit float lane. */\n export function sub(a: v128, b: v128): v128;\n /** Multiplies each 32-bit float lane. */\n export function mul(a: v128, b: v128): v128;\n /** Divides each 32-bit float lane. */\n export function div(a: v128, b: v128): v128;\n /** Negates each 32-bit float lane. */\n export function neg(a: v128): v128;\n /** Computes the minimum of each 32-bit float lane. */\n export function min(a: v128, b: v128): v128;\n /** Computes the maximum of each 32-bit float lane. */\n export function max(a: v128, b: v128): v128;\n /** Computes the pseudo-minimum of each 32-bit float lane. */\n export function pmin(a: v128, b: v128): v128;\n /** Computes the pseudo-maximum of each 32-bit float lane. */\n export function pmax(a: v128, b: v128): v128;\n /** Computes the absolute value of each 32-bit float lane. */\n export function abs(a: v128): v128;\n /** Computes the square root of each 32-bit float lane. */\n export function sqrt(a: v128): v128;\n /** Performs the ceiling operation on each 32-bit float lane. */\n export function ceil(a: v128): v128;\n /** Performs the floor operation on each each 32-bit float lane. */\n export function floor(a: v128): v128;\n /** Rounds to the nearest integer towards zero of each 32-bit float lane. */\n export function trunc(a: v128): v128;\n /** Rounds to the nearest integer tied to even of each 32-bit float lane. */\n export function nearest(a: v128): v128;\n /** Computes which 32-bit float lanes are equal. */\n export function eq(a: v128, b: v128): v128;\n /** Computes which 32-bit float lanes are not equal. */\n export function ne(a: v128, b: v128): v128;\n /** Computes which 32-bit float lanes of the first vector are less than those of the second. */\n export function lt(a: v128, b: v128): v128;\n /** Computes which 32-bit float lanes of the first vector are less than or equal those of the second. */\n export function le(a: v128, b: v128): v128;\n /** Computes which 32-bit float lanes of the first vector are greater than those of the second. */\n export function gt(a: v128, b: v128): v128;\n /** Computes which 32-bit float lanes of the first vector are greater than or equal those of the second. */\n export function ge(a: v128, b: v128): v128;\n /** Converts each 32-bit signed integer lane of a vector to single-precision floating point. */\n export function convert_i32x4_s(a: v128): v128;\n /** Converts each 32-bit unsigned integer lane of a vector to single-precision floating point. */\n export function convert_i32x4_u(a: v128): v128;\n /** Demotes each 64-bit float lane of a vector to single-precision. The higher lanes of the result are initialized to zero. */\n export function demote_f64x2_zero(a: v128): v128;\n}\n/** Initializes a 128-bit vector from two 64-bit float values. Arguments must be compile-time constants. */\ndeclare function f64x2(a: f64, b: f64): v128;\ndeclare namespace f64x2 {\n /** Creates a vector with two identical 64-bit float lanes. */\n export function splat(x: f64): v128;\n /** Extracts one 64-bit float lane as a scalar. */\n export function extract_lane(x: v128, idx: u8): f64;\n /** Replaces one 64-bit float lane. */\n export function replace_lane(x: v128, idx: u8, value: f64): v128;\n /** Adds each 64-bit float lane. */\n export function add(a: v128, b: v128): v128;\n /** Subtracts each 64-bit float lane. */\n export function sub(a: v128, b: v128): v128;\n /** Multiplies each 64-bit float lane. */\n export function mul(a: v128, b: v128): v128;\n /** Divides each 64-bit float lane. */\n export function div(a: v128, b: v128): v128;\n /** Negates each 64-bit float lane. */\n export function neg(a: v128): v128;\n /** Computes the minimum of each 64-bit float lane. */\n export function min(a: v128, b: v128): v128;\n /** Computes the maximum of each 64-bit float lane. */\n export function max(a: v128, b: v128): v128;\n /** Computes the pseudo-minimum of each 64-bit float lane. */\n export function pmin(a: v128, b: v128): v128;\n /** Computes the pseudo-maximum of each 64-bit float lane. */\n export function pmax(a: v128, b: v128): v128;\n /** Computes the absolute value of each 64-bit float lane. */\n export function abs(a: v128): v128;\n /** Computes the square root of each 64-bit float lane. */\n export function sqrt(a: v128): v128;\n /** Performs the ceiling operation on each 64-bit float lane. */\n export function ceil(a: v128): v128;\n /** Performs the floor operation on each each 64-bit float lane. */\n export function floor(a: v128): v128;\n /** Rounds to the nearest integer towards zero of each 64-bit float lane. */\n export function trunc(a: v128): v128;\n /** Rounds to the nearest integer tied to even of each 64-bit float lane. */\n export function nearest(a: v128): v128;\n /** Computes which 64-bit float lanes are equal. */\n export function eq(a: v128, b: v128): v128;\n /** Computes which 64-bit float lanes are not equal. */\n export function ne(a: v128, b: v128): v128;\n /** Computes which 64-bit float lanes of the first vector are less than those of the second. */\n export function lt(a: v128, b: v128): v128;\n /** Computes which 64-bit float lanes of the first vector are less than or equal those of the second. */\n export function le(a: v128, b: v128): v128;\n /** Computes which 64-bit float lanes of the first vector are greater than those of the second. */\n export function gt(a: v128, b: v128): v128;\n /** Computes which 64-bit float lanes of the first vector are greater than or equal those of the second. */\n export function ge(a: v128, b: v128): v128;\n /** Converts the low 32-bit signed integer lanes of a vector to double-precision floating point. */\n export function convert_low_i32x4_s(a: v128): v128;\n /** Converts the low 32-bit unsigned integer lanes of a vector to double-precision floating point. */\n export function convert_low_i32x4_u(a: v128): v128;\n /** Promotes the low 32-bit float lanes of a vector to double-precision. */\n export function promote_low_f32x4(a: v128): v128;\n}\n\ndeclare abstract class i31 {\n /** Creates a new i31ref from the specified integer value. */\n static new(value: i32): i31ref;\n /** Gets the integer value of an i31ref. */\n static get(i31expr: i31ref): i32;\n}\n\n/** Macro type evaluating to the underlying native WebAssembly type. */\ndeclare type native = T;\n/** Special type evaluating the indexed access index type. */\ndeclare type indexof = keyof T;\n/** Special type evaluating the indexed access value type. */\ndeclare type valueof = T[0];\n/** A special type evaluated to the return type of T if T is a callable function. */\ndeclare type ReturnType any> = T extends (...args: any) => infer R ? R : any;\n/** A special type evaluated to the return type of T if T is a callable function. */\ndeclare type returnof any> = ReturnType;\n/** A special type that excludes null and undefined from T. */\ndeclare type NonNullable = T extends null | undefined ? never : T;\n/** A special type that excludes null and undefined from T. */\ndeclare type nonnull = NonNullable;\n\n/** Pseudo-class representing the backing class of integer types. */\n/** @internal */\ndeclare class _Integer {\n /** Smallest representable value. */\n static readonly MIN_VALUE: number;\n /** Largest representable value. */\n static readonly MAX_VALUE: number;\n /** Converts a string to an integer of this type. */\n static parseInt(value: string, radix?: number): number;\n /** Converts this integer to a string. */\n toString(radix?: number): string;\n}\n\n/** Pseudo-class representing the backing class of floating-point types. */\n/** @internal */\ndeclare class _Float {\n /** Difference between 1 and the smallest representable value greater than 1. */\n static readonly EPSILON: f32 | f64;\n /** Smallest representable value. */\n static readonly MIN_VALUE: f32 | f64;\n /** Largest representable value. */\n static readonly MAX_VALUE: f32 | f64;\n /** Smallest safely representable integer value. */\n static readonly MIN_SAFE_INTEGER: f32 | f64;\n /** Largest safely representable integer value. */\n static readonly MAX_SAFE_INTEGER: f32 | f64;\n /** Value representing positive infinity. */\n static readonly POSITIVE_INFINITY: f32 | f64;\n /** Value representing negative infinity. */\n static readonly NEGATIVE_INFINITY: f32 | f64;\n /** Value representing 'not a number'. */\n static readonly NaN: f32 | f64;\n /** Returns a boolean value that indicates whether a value is the reserved value NaN (not a number). */\n static isNaN(value: f32 | f64): bool;\n /** Returns true if passed value is finite. */\n static isFinite(value: f32 | f64): bool;\n /** Returns true if the value passed is a safe integer. */\n static isSafeInteger(value: f32 | f64): bool;\n /** Returns true if the value passed is an integer, false otherwise. */\n static isInteger(value: f32 | f64): bool;\n /** Converts a string to an integer. */\n static parseInt(value: string, radix?: i32): f32 | f64;\n /** Converts a string to a floating-point number. */\n static parseFloat(value: string): f32 | f64;\n /** Converts this floating-point number to a string. */\n toString(radix?: number): string;\n}\n\n/** Backing class of signed 8-bit integers. */\ndeclare const I8: typeof _Integer;\n/** Backing class of signed 16-bit integers. */\ndeclare const I16: typeof _Integer;\n/** Backing class of signed 32-bit integers. */\ndeclare const I32: typeof _Integer;\n/** Backing class of signed 64-bit integers. */\ndeclare const I64: typeof _Integer;\n/** Backing class of signed size integers. */\ndeclare const Isize: typeof _Integer;\n/** Backing class of unsigned 8-bit integers. */\ndeclare const U8: typeof _Integer;\n/** Backing class of unsigned 16-bit integers. */\ndeclare const U16: typeof _Integer;\n/** Backing class of unsigned 32-bit integers. */\ndeclare const U32: typeof _Integer;\n/** Backing class of unsigned 64-bit integers. */\ndeclare const U64: typeof _Integer;\n/** Backing class of unsigned size integers. */\ndeclare const Usize: typeof _Integer;\n/** Backing class of 32-bit floating-point values. */\ndeclare const F32: typeof _Float;\n/** Backing class of 64-bit floating-point values. */\ndeclare const F64: typeof _Float;\n\n// User-defined diagnostic macros\n\n/** Emits a user-defined diagnostic error when encountered. */\ndeclare function ERROR(message?: any): never;\n/** Emits a user-defined diagnostic warning when encountered. */\ndeclare function WARNING(message?: any): void;\n/** Emits a user-defined diagnostic info when encountered. */\ndeclare function INFO(message?: any): void;\n\n// Polyfills\n\n/** Performs the sign-agnostic reverse bytes **/\ndeclare function bswap(value: T): T;\n/** Performs the sign-agnostic reverse bytes only for last 16-bit **/\ndeclare function bswap16(value: T): T;\n\n// Standard library\n\n/** Memory operations. */\ndeclare namespace memory {\n /** Whether the memory managed interface is implemented. */\n export const implemented: bool;\n /** Returns the current memory size in units of pages. One page is 64kb. */\n export function size(): i32;\n /** Grows linear memory by a given unsigned delta of pages. One page is 64kb. Returns the previous memory size in units of pages or `-1` on failure. */\n export function grow(value: i32): i32;\n /** Sets n bytes beginning at the specified destination in memory to the specified byte value. */\n export function fill(dst: usize, value: u8, count: usize): void;\n /** Copies n bytes from the specified source to the specified destination in memory. These regions may overlap. */\n export function copy(dst: usize, src: usize, n: usize): void;\n /** Repeats `src` of length `srcLength` `count` times at `dst`. */\n export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void;\n /** Copies elements from a passive element segment to a table. */\n export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void;\n /** Prevents further use of a passive element segment. */\n export function drop(segmentIndex: u32): void;\n /** Compares two chunks of memory. Returns `0` if equal, otherwise the difference of the first differing bytes. */\n export function compare(vl: usize, vr: usize, n: usize): i32;\n /** Gets a pointer to a zeroed static chunk of memory of the given size. Alignment defaults to `16`. Arguments must be compile-time constants. */\n export function data(size: i32, align?: i32): usize;\n /** Gets a pointer to a pre-initialized static chunk of memory. Alignment defaults to the size of `T`. Arguments must be compile-time constants. */\n export function data(values: T[], align?: i32): usize;\n}\n\n/** Heap memory interface. */\ndeclare namespace heap {\n /** Allocates a chunk of memory of at least the specified size. */\n export function alloc(size: usize): usize;\n /** Reallocates a chunk of memory to have at least the specified size. */\n export function realloc(ptr: usize, size: usize): usize;\n /** Frees a chunk of memory. Does hardly anything (most recent block only) with the stub/none runtime. */\n export function free(ptr: usize): void;\n}\n\n/** Table operations. */\ndeclare namespace table {\n /** Copies elements from a passive element segment to a table. */\n export function init(elementIndex: u32, srcOffset: u32, dstOffset: u32, n: u32): void;\n /** Prevents further use of a passive element segment. */\n export function drop(elementIndex: u32): void;\n /** Copies elements from one region of a table to another region. */\n export function copy(dest: u32, src: u32, n: u32): void;\n}\n\ndeclare namespace Atomics {\n export function load(array: TypedArray, index: i32): T;\n export function store(array: TypedArray, index: i32, value: T): void;\n export function add(array: TypedArray, index: i32, value: T): T;\n export function sub(array: TypedArray, index: i32, value: T): T;\n export function and(array: TypedArray, index: i32, value: T): T;\n export function or(array: TypedArray, index: i32, value: T): T;\n export function xor(array: TypedArray, index: i32, value: T): T;\n export function exchange(array: TypedArray, index: i32, value: T): T;\n export function compareExchange(array: TypedArray, index: i32, expectedValue: T, replacementValue: T): T;\n export function wait(array: TypedArray, value: T, timeout?: i64): AtomicWaitResult;\n export function notify(array: TypedArray, index: i32, count?: i32): i32;\n /** The static Atomics.isLockFree() method is used to determine whether to use locks or atomic operations. It returns true, if the given size is one of the BYTES_PER_ELEMENT */\n export function isLockFree(size: usize): bool;\n}\n\n/** Class representing a generic, fixed-length raw binary data buffer. */\ndeclare class ArrayBuffer {\n /** The size, in bytes, of the array. */\n readonly byteLength: i32;\n /** Returns true if value is one of the ArrayBuffer views, such as typed array or a DataView **/\n static isView(value: T): bool;\n /** Constructs a new array buffer of the given length in bytes. */\n constructor(length: i32);\n /** Returns a copy of this array buffer's bytes from begin, inclusive, up to end, exclusive. */\n slice(begin?: i32, end?: i32): ArrayBuffer;\n /** Returns a string representation of ArrayBuffer. */\n toString(): string;\n}\n\n/** The `DataView` view provides a low-level interface for reading and writing multiple number types in a binary `ArrayBuffer`, without having to care about the platform's endianness. */\ndeclare class DataView {\n /** The `buffer` accessor property represents the `ArrayBuffer` or `SharedArrayBuffer` referenced by the `DataView` at construction time. */\n readonly buffer: ArrayBuffer;\n /** The `byteLength` accessor property represents the length (in bytes) of this view from the start of its `ArrayBuffer` or `SharedArrayBuffer`. */\n readonly byteLength: i32;\n /** The `byteOffset` accessor property represents the offset (in bytes) of this view from the start of its `ArrayBuffer` or `SharedArrayBuffer`. */\n readonly byteOffset: i32;\n /** Constructs a new `DataView` with the given properties */\n constructor(buffer: ArrayBuffer, byteOffset?: i32, byteLength?: i32);\n /** The `getFloat32()` method gets a signed 32-bit float (float) at the specified byte offset from the start of the `DataView`. */\n getFloat32(byteOffset: i32, littleEndian?: bool): f32;\n /** The `getFloat64()` method gets a signed 64-bit float (double) at the specified byte offset from the start of the `DataView`. */\n getFloat64(byteOffset: i32, littleEndian?: bool): f64;\n /** The `getInt8()` method gets a signed 8-bit integer (byte) at the specified byte offset from the start of the `DataView`. */\n getInt8(byteOffset: i32): i8;\n /** The `getInt16()` method gets a signed 16-bit integer (short) at the specified byte offset from the start of the `DataView`. */\n getInt16(byteOffset: i32, littleEndian?: bool): i16;\n /** The `getInt32()` method gets a signed 32-bit integer (long) at the specified byte offset from the start of the `DataView`. */\n getInt32(byteOffset: i32, littleEndian?: bool): i32;\n /** The `getInt64()` method gets a signed 64-bit integer (long long) at the specified byte offset from the start of the `DataView`. */\n getInt64(byteOffset: i32, littleEndian?: bool): i64;\n /** The `getUint8()` method gets an unsigned 8-bit integer (unsigned byte) at the specified byte offset from the start of the `DataView`. */\n getUint8(byteOffset: i32): u8;\n /** The `getUint16()` method gets an unsigned 16-bit integer (unsigned short) at the specified byte offset from the start of the `DataView`. */\n getUint16(byteOffset: i32, littleEndian?: bool): u16;\n /** The `getUint32()` method gets an unsigned 32-bit integer (unsigned long) at the specified byte offset from the start of the `DataView`. */\n getUint32(byteOffset: i32, littleEndian?: bool): u32;\n /** The `getUint64()` method gets an unsigned 64-bit integer (unsigned long long) at the specified byte offset from the start of the `DataView`. */\n getUint64(byteOffset: i32, littleEndian?: bool): u64;\n /** The `setFloat32()` method stores a signed 32-bit float (float) value at the specified byte offset from the start of the `DataView`. */\n setFloat32(byteOffset: i32, value: f32, littleEndian?: bool): void;\n /** The `setFloat64()` method stores a signed 64-bit float (double) value at the specified byte offset from the start of the `DataView`. */\n setFloat64(byteOffset: i32, value: f64, littleEndian?: bool): void;\n /** The `setInt8()` method stores a signed 8-bit integer (byte) value at the specified byte offset from the start of the `DataView`. */\n setInt8(byteOffset: i32, value: i8): void;\n /** The `setInt16()` method stores a signed 16-bit integer (short) value at the specified byte offset from the start of the `DataView`. */\n setInt16(byteOffset: i32, value: i16, littleEndian?: bool): void;\n /** The `setInt32()` method stores a signed 32-bit integer (long) value at the specified byte offset from the start of the `DataView`. */\n setInt32(byteOffset: i32, value: i32, littleEndian?: bool): void;\n /** The `setInt64()` method stores a signed 64-bit integer (long long) value at the specified byte offset from the start of the `DataView`. */\n setInt64(byteOffset: i32, value: i64, littleEndian?: bool): void;\n /** The `setUint8()` method stores an unsigned 8-bit integer (byte) value at the specified byte offset from the start of the `DataView`. */\n setUint8(byteOffset: i32, value: u8): void;\n /** The `setUint16()` method stores an unsigned 16-bit integer (unsigned short) value at the specified byte offset from the start of the `DataView`. */\n setUint16(byteOffset: i32, value: u16, littleEndian?: bool): void;\n /** The `setUint32()` method stores an unsigned 32-bit integer (unsigned long) value at the specified byte offset from the start of the `DataView`. */\n setUint32(byteOffset: i32, value: u32, littleEndian?: bool): void;\n /** The `setUint64()` method stores an unsigned 64-bit integer (unsigned long long) value at the specified byte offset from the start of the `DataView`. */\n setUint64(byteOffset: i32, value: u64, littleEndian?: bool): void;\n /** Returns a string representation of DataView. */\n toString(): string;\n}\n\ninterface ArrayLike {\n [key: number]: T;\n length: i32;\n}\n\n/** Interface for a typed view on an array buffer. */\ninterface ArrayBufferView {\n /** The {@link ArrayBuffer} referenced by this view. */\n readonly buffer: ArrayBuffer;\n /** The offset in bytes from the start of the referenced {@link ArrayBuffer}. */\n readonly byteOffset: i32;\n /** The length in bytes from the start of the referenced {@link ArrayBuffer}. */\n readonly byteLength: i32;\n /** Returns raw pointer to data storage including offset (unsafe). */\n readonly dataStart: usize;\n}\n\n/** @internal */\ndeclare abstract class TypedArray implements ArrayBufferView {\n [key: number]: T;\n /** Number of bytes per element. */\n static readonly BYTES_PER_ELEMENT: usize;\n /** Constructs a new typed array. */\n constructor(length: i32);\n /** The {@link ArrayBuffer} referenced by this view. */\n readonly buffer: ArrayBuffer;\n /** The offset in bytes from the start of the referenced {@link ArrayBuffer}. */\n readonly byteOffset: i32;\n /** The length in bytes from the start of the referenced {@link ArrayBuffer}. */\n readonly byteLength: i32;\n /** Returns raw pointer to data storage including offset (unsafe). */\n readonly dataStart: usize;\n /** The length (in elements). */\n readonly length: i32;\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): T;\n /** The includes() method determines whether a typed array includes a certain element, returning true or false as appropriate. */\n includes(searchElement: T, fromIndex?: i32): bool;\n /** The indexOf() method returns the first index at which a given element can be found in the typed array, or -1 if it is not present. */\n indexOf(searchElement: T, fromIndex?: i32): i32;\n /** The lastIndexOf() method returns the last index at which a given element can be found in the typed array, or -1 if it is not present. The typed array is searched backwards, starting at fromIndex. */\n lastIndexOf(searchElement: T, fromIndex?: i32): i32;\n /** Returns copied section of an TypedArray from begin inclusive to end exclusive */\n slice(begin?: i32, end?: i32): TypedArray;\n /** Returns a new TypedArray of this type on the same ArrayBuffer from begin inclusive to end exclusive. */\n subarray(begin?: i32, end?: i32): TypedArray;\n /** The copyWithin() method copies the sequence of array elements within the array to the position starting at target. The copy is taken from the index positions of the second and third arguments start and end. The end argument is optional and defaults to the length of the array. */\n copyWithin(target: i32, start: i32, end?: i32): this;\n /** The reduce() method applies a function against an accumulator and each value of the typed array (from left-to-right) has to reduce it to a single value. This method has the same algorithm as Array.prototype.reduce(). */\n reduce(callbackfn: (accumulator: U, value: T, index: i32, self: this) => U, initialValue: U): U;\n /** The reduceRight() method applies a function against an accumulator and each value of the typed array (from left-to-right) has to reduce it to a single value, starting from the end of the array. This method has the same algorithm as Array.prototype.reduceRight(). */\n reduceRight(callbackfn: (accumulator: U, value: T, index: i32, self: this) => U, initialValue: U): U;\n /** The some() method tests whether some element in the typed array passes the test implemented by the provided function. This method has the same algorithm as Array.prototype.some().*/\n some(callbackfn: (value: T, index: i32, self: this) => bool): bool;\n /** The map() method creates a new typed array with the results of calling a provided function on every element in this typed array. This method has the same algorithm as Array.prototype.map().*/\n map(callbackfn: (value: T, index: i32, self: this) => T): TypedArray;\n /** The filter() method creates a new typed array with all elements that pass the test implemented by the provided function. This method has the same algorithm as Array.prototype.filter(). */\n filter(callbackfn: (value: T, index: i32, self: this) => bool): TypedArray;\n /** The sort() method sorts the elements of a typed array numerically in place and returns the typed array. This method has the same algorithm as Array.prototype.sort(), except that sorts the values numerically instead of as strings. TypedArray is one of the typed array types here. */\n sort(callback?: (a: T, b: T) => i32): this;\n /** The fill() method fills all the elements of a typed array from a start index to an end index with a static value. This method has the same algorithm as Array.prototype.fill(). */\n fill(value: T, start?: i32, end?: i32): this;\n /** The findIndex() method returns an index in the typed array, if an element in the typed array satisfies the provided testing function. Otherwise -1 is returned. See also the find() [not implemented] method, which returns the value of a found element in the typed array instead of its index. */\n findIndex(callbackfn: (value: T, index: i32, self: this) => bool): i32;\n /** The findLastIndex() method returns an index start searching from the end in the typed array, if an element in the typed array satisfies the provided testing function. Otherwise -1 is returned. See also the find() [not implemented] method, which returns the value of a found element in the typed array instead of its index. */\n findLastIndex(callbackfn: (value: T, index: i32, self: this) => bool): i32;\n /** The every() method tests whether all elements in the typed array pass the test implemented by the provided function. This method has the same algorithm as Array.prototype.every(). */\n every(callbackfn: (value: T, index: i32, self: this) => bool): bool;\n /** The forEach() method executes a provided function once per array element. This method has the same algorithm as Array.prototype.forEach().*/\n forEach(callbackfn: (value: T, index: i32, self: this) => void): void;\n /** The reverse() method reverses a typed array in place. The first typed array element becomes the last and the last becomes the first. This method has the same algorithm as Array.prototype.reverse(). */\n reverse(): this;\n /** The join() method joins all elements of an array into a string. This method has the same algorithm as Array.prototype.join(). */\n join(separator?: string): string;\n /** The set() method stores multiple values in the typed array, reading input values from a specified array. */\n set(source: U, offset?: i32): void\n /** The toString() method returns a string representing the specified array and its elements. This method has the same algorithm as Array.prototype.toString() */\n toString(): string;\n}\n\n/** An array of twos-complement 8-bit signed integers. */\ndeclare class Int8Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Int8Array;\n}\n/** An array of 8-bit unsigned integers. */\ndeclare class Uint8Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint8Array;\n}\n/** A clamped array of 8-bit unsigned integers. */\ndeclare class Uint8ClampedArray extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint8ClampedArray;\n}\n/** An array of twos-complement 16-bit signed integers. */\ndeclare class Int16Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Int16Array;\n}\n/** An array of 16-bit unsigned integers. */\ndeclare class Uint16Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint16Array;\n}\n/** An array of twos-complement 32-bit signed integers. */\ndeclare class Int32Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Int32Array;\n}\n/** An array of 32-bit unsigned integers. */\ndeclare class Uint32Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint32Array;\n}\n/** An array of twos-complement 64-bit signed integers. */\ndeclare class Int64Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Int64Array;\n}\n/** An array of 64-bit unsigned integers. */\ndeclare class Uint64Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint64Array;\n}\n/** An array of 32-bit floating point numbers. */\ndeclare class Float32Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Float32Array;\n}\n/** An array of 64-bit floating point numbers. */\ndeclare class Float64Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Float64Array;\n}\n\n/** Class representing a sequence of values of type `T`. */\ndeclare class Array {\n\n /** Tests if a value is an array. */\n static isArray(value: any): value is Array;\n\n [key: number]: T;\n /** Current length of the array. */\n length: i32;\n /** Returns raw pointer to data storage (unsafe). */\n readonly dataStart: usize;\n /** Constructs a new array. */\n constructor(length?: i32);\n at(index: i32): T;\n fill(value: T, start?: i32, end?: i32): this;\n findIndex(callbackfn: (value: T, index: i32, array: Array) => bool): i32;\n findLastIndex(callbackfn: (value: T, index: i32, array: Array) => bool): i32;\n includes(searchElement: T, fromIndex?: i32): bool;\n indexOf(searchElement: T, fromIndex?: i32): i32;\n lastIndexOf(searchElement: T, fromIndex?: i32): i32;\n push(element: T): i32;\n concat(items: T[]): T[];\n copyWithin(target: i32, start: i32, end?: i32): this;\n pop(): T;\n forEach(callbackfn: (value: T, index: i32, array: Array) => void): void;\n map(callbackfn: (value: T, index: i32, array: Array) => U): Array;\n filter(callbackfn: (value: T, index: i32, array: Array) => bool): Array;\n reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array) => U, initialValue: U): U;\n reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array) => U, initialValue: U): U;\n every(callbackfn: (value: T, index: i32, array: Array) => bool): bool;\n some(callbackfn: (value: T, index: i32, array: Array) => bool): bool;\n shift(): T;\n unshift(element: T): i32;\n slice(from: i32, to?: i32): Array;\n splice(start: i32, deleteCount?: i32): Array;\n sort(comparator?: (a: T, b: T) => i32): this;\n join(separator?: string): string;\n reverse(): this;\n /** Flattens an array of arrays. If any null entries exist in the array, they are ignored, unlike JavaScript's version of Array#flat(). */\n flat(): T extends unknown[] ? T : never;\n toString(): string;\n}\n\n/** Class representing a static (not resizable) sequence of values of type `T`. This class is @final. */\ndeclare class StaticArray {\n [key: number]: T;\n static fromArray(source: Array): StaticArray;\n static concat(source: StaticArray, other: StaticArray): StaticArray;\n static slice(source: StaticArray, start?: i32, end?: i32): StaticArray;\n readonly length: i32;\n constructor(length?: i32);\n at(index: i32): T;\n fill(value: T, start?: i32, end?: i32): this;\n findIndex(callbackfn: (value: T, index: i32, array: StaticArray) => bool): i32;\n findLastIndex(callbackfn: (value: T, index: i32, array: StaticArray) => bool): i32;\n copyWithin(target: i32, start: i32, end?: i32): this;\n includes(searchElement: T, fromIndex?: i32): bool;\n indexOf(searchElement: T, fromIndex?: i32): i32;\n lastIndexOf(searchElement: T, fromIndex?: i32): i32;\n forEach(callbackfn: (value: T, index: i32, array: StaticArray) => void): void;\n map(callbackfn: (value: T, index: i32, array: StaticArray) => U): Array;\n filter(callbackfn: (value: T, index: i32, array: StaticArray) => bool): Array;\n reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray) => U, initialValue: U): U;\n reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray) => U, initialValue: U): U;\n every(callbackfn: (value: T, index: i32, array: StaticArray) => bool): bool;\n some(callbackfn: (value: T, index: i32, array: StaticArray) => bool): bool;\n concat(items: Array): Array;\n slice(from: i32, to?: i32): Array;\n sort(comparator?: (a: T, b: T) => i32): this;\n join(separator?: string): string;\n reverse(): this;\n toString(): string;\n}\n\n/** Class representing a sequence of characters. */\ndeclare class String {\n static fromCharCode(ls: i32, hs?: i32): string;\n static fromCharCodes(arr: u16[]): string;\n static fromCodePoint(code: i32): string;\n static fromCodePoints(arr: i32[]): string;\n static raw(parts: TemplateStringsArray, ...args: any[]): string;\n readonly length: i32;\n at(index: i32): string;\n charAt(index: i32): string;\n charCodeAt(index: i32): i32;\n codePointAt(index: i32): i32;\n concat(other: string): string;\n endsWith(other: string): bool;\n indexOf(other: string, fromIndex?: i32): i32;\n lastIndexOf(other: string, fromIndex?: i32): i32;\n localeCompare(other: string): i32;\n includes(other: string): bool;\n startsWith(other: string): bool;\n substr(start: i32, length?: i32): string;\n substring(start: i32, end?: i32): string;\n trim(): string;\n trimLeft(): string;\n trimRight(): string;\n trimStart(): string;\n trimEnd(): string;\n padStart(targetLength: i32, padString?: string): string;\n padEnd(targetLength: i32, padString?: string): string;\n repeat(count?: i32): string;\n replace(search: string, replacement: string): string;\n replaceAll(search: string, replacement: string): string;\n slice(beginIndex: i32, endIndex?: i32): string;\n split(separator?: string, limit?: i32): string[];\n toLowerCase(): string;\n toUpperCase(): string;\n toString(): string;\n}\n\ndeclare namespace String {\n /** Encoding helpers for UTF-8. */\n export namespace UTF8 {\n /** UTF-8 encoding error modes. */\n export const enum ErrorMode {\n /** Keeps unpaired surrogates as of WTF-8. This is the default. */\n WTF8,\n /** Replaces unpaired surrogates with the replacement character (U+FFFD). */\n REPLACE,\n /** Throws an error on unpaired surrogates. */\n ERROR\n }\n /** Calculates the byte length of the specified string when encoded as UTF-8, optionally null terminated. */\n export function byteLength(str: string, nullTerminated?: bool): i32;\n /** Encodes the specified string to UTF-8 bytes, optionally null terminated. ErrorMode defaults to WTF-8. */\n export function encode(str: string, nullTerminated?: bool, errorMode?: ErrorMode): ArrayBuffer;\n /** Encodes the specified raw string to UTF-8 bytes, opionally null terminated. ErrorMode defaults to WTF-8. Returns the number of bytes written. */\n export function encodeUnsafe(str: usize, len: i32, buf: usize, nullTerminated?: bool, errorMode?: ErrorMode): usize;\n /** Decodes the specified buffer from UTF-8 bytes to a string, optionally null terminated. */\n export function decode(buf: ArrayBuffer, nullTerminated?: bool): string;\n /** Decodes raw UTF-8 bytes to a string, optionally null terminated. */\n export function decodeUnsafe(buf: usize, len: usize, nullTerminated?: bool): string;\n }\n /** Encoding helpers for UTF-16. */\n export namespace UTF16 {\n /** Calculates the byte length of the specified string when encoded as UTF-16. */\n export function byteLength(str: string): i32;\n /** Encodes the specified string to UTF-16 bytes. */\n export function encode(str: string): ArrayBuffer;\n /** Encodes the specified raw string to UTF-16 bytes. Returns the number of bytes written. */\n export function encodeUnsafe(str: usize, len: i32, buf: usize): usize;\n /** Decodes the specified buffer from UTF-16 bytes to a string. */\n export function decode(buf: ArrayBuffer): string;\n /** Decodes raw UTF-16 bytes to a string. */\n export function decodeUnsafe(buf: usize, len: usize): string;\n }\n}\n\ndeclare class TemplateStringsArray extends Array {\n readonly raw: string[];\n}\n\ndeclare class Object {\n /** The Object.is() method determines whether two values are the same value. */\n static is(value1: T, value2: T): bool;\n}\n\ndeclare class Date {\n /** Returns the UTC timestamp in milliseconds of the specified date. */\n static UTC(\n year: i32,\n month: i32,\n day: i32,\n hour: i32,\n minute: i32,\n second: i32,\n millisecond: i32\n ): i64;\n /** Returns the current UTC timestamp in milliseconds. */\n static now(): i64;\n /** Parses a string representation of a date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC. */\n static parse(dateString: string): Date;\n static fromString(dateString: string): Date;\n /** Constructs a new date object from an UTC timestamp in milliseconds. */\n constructor(value: i64);\n /** Returns the UTC timestamp of this date in milliseconds. */\n getTime(): i64;\n /** Sets the UTC timestamp of this date in milliseconds. */\n setTime(value: i64): i64;\n\n getUTCFullYear(): i32;\n getUTCMonth(): i32;\n getUTCDate(): i32;\n getUTCDay(): i32;\n getUTCHours(): i32;\n getUTCMinutes(): i32;\n getUTCSeconds(): i32;\n getUTCMilliseconds(): i32;\n\n setUTCFullYear(value: i32): void;\n setUTCMonth(value: i32): void;\n setUTCDate(value: i32): void;\n setUTCHours(value: i32): void;\n setUTCMinutes(value: i32): void;\n setUTCSeconds(value: i32): void;\n setUTCMilliseconds(value: i32): void;\n\n toString(): string;\n toISOString(): string;\n toUTCString(): string;\n toDateString(): string;\n toTimeString(): string;\n}\n\n/** Class for representing a runtime error. Base class of all errors. */\ndeclare class Error {\n\n /** Error name. */\n name: string;\n\n /** Message provided on construction. */\n message: string;\n\n /** Stack trace. */\n stack?: string;\n\n /** Constructs a new error, optionally with a message. */\n constructor(message?: string);\n\n /** Method returns a string representing the specified Error class. */\n toString(): string;\n}\n\n/** Class for indicating an error when a value is not in the set or range of allowed values. */\ndeclare class RangeError extends Error { }\n\n/** Class for indicating an error when a value is not of the expected type. */\ndeclare class TypeError extends Error { }\n\n/** Class for indicating an error when trying to interpret syntactically invalid code. */\ndeclare class SyntaxError extends Error { }\n\n/** Class for indicating an error when a global URI handling function was used in a wrong way. */\ndeclare class URIError extends Error { }\n\ninterface Boolean {\n toString(radix?: number): string;\n}\n\ninterface Number {\n toString(radix?: number): string;\n}\n\ninterface Function {\n /** Function table index. */\n readonly index: u32;\n /** Function name. Always an empty string. */\n readonly name: string;\n /** Number of expected parameters. */\n readonly length: u32;\n /** Calls this function indirectly with the specified arguments. */\n call(thisArg: unknown, ...args: unknown[]): any;\n /** Returns a string representation of this function. */\n toString(): string;\n}\ninterface IArguments {}\ninterface RegExp {}\n\ndeclare class Map {\n readonly size: i32;\n has(key: K): bool;\n set(key: K, value: V): this;\n get(key: K): V;\n delete(key: K): bool;\n clear(): void;\n keys(): K[]; // preliminary\n values(): V[]; // preliminary\n toString(): string;\n}\n\ndeclare class Set {\n readonly size: i32;\n has(value: K): bool;\n add(value: K): this;\n delete(value: K): bool;\n clear(): void;\n values(): K[]; // preliminary\n toString(): string;\n}\n\ninterface SymbolConstructor {\n readonly hasInstance: symbol;\n readonly isConcatSpreadable: symbol;\n readonly isRegExp: symbol;\n readonly iterator: symbol;\n readonly match: symbol;\n readonly replace: symbol;\n readonly search: symbol;\n readonly species: symbol;\n readonly split: symbol;\n readonly toPrimitive: symbol;\n readonly toStringTag: symbol;\n readonly unscopables: symbol;\n (description?: string | null): symbol;\n for(key: string): symbol;\n keyFor(sym: symbol): string | null;\n}\n\ndeclare const Symbol: SymbolConstructor;\n\n/** @internal */\ninterface IMath {\n /** The base of natural logarithms, e, approximately 2.718. */\n readonly E: T;\n /** The natural logarithm of 2, approximately 0.693. */\n readonly LN2: T;\n /** The natural logarithm of 10, approximately 2.302. */\n readonly LN10: T;\n /** The base 2 logarithm of e, approximately 1.442. */\n readonly LOG2E: T;\n /** The base 10 logarithm of e, approximately 0.434. */\n readonly LOG10E: T;\n /** The ratio of the circumference of a circle to its diameter, approximately 3.14159. */\n readonly PI: T;\n /** The square root of 1/2, approximately 0.707. */\n readonly SQRT1_2: T;\n /** The square root of 2, approximately 1.414. */\n readonly SQRT2: T;\n /** Returns the absolute value of `x`. */\n abs(x: T): T;\n /** Returns the arccosine (in radians) of `x`. */\n acos(x: T): T;\n /** Returns the hyperbolic arc-cosine of `x`. */\n acosh(x: T): T;\n /** Returns the arcsine (in radians) of `x`. */\n asin(x: T): T;\n /** Returns the hyperbolic arcsine of `x`. */\n asinh(x: T): T;\n /** Returns the arctangent (in radians) of `x`. */\n atan(x: T): T;\n /** Returns the arctangent of the quotient of its arguments. */\n atan2(y: T, x: T): T;\n /** Returns the hyperbolic arctangent of `x`. */\n atanh(x: T): T;\n /** Returns the cube root of `x`. */\n cbrt(x: T): T;\n /** Returns the smallest integer greater than or equal to `x`. */\n ceil(x: T): T;\n /** Returns the number of leading zero bits in the 32-bit binary representation of `x`. */\n clz32(x: T): T;\n /** Returns the cosine (in radians) of `x`. */\n cos(x: T): T;\n /** Returns the hyperbolic cosine of `x`. */\n cosh(x: T): T;\n /** Returns e to the power of `x`. */\n exp(x: T): T;\n /** Returns e to the power of `x`, minus 1. */\n expm1(x: T): T;\n /** Returns the largest integer less than or equal to `x`. */\n floor(x: T): T;\n /** Returns the nearest 32-bit single precision float representation of `x`. */\n fround(x: T): T;\n /** Returns the square root of the sum of squares of its arguments. */\n hypot(value1: T, value2: T): T; // TODO: rest\n /** Returns the result of the C-like 32-bit multiplication of `a` and `b`. */\n imul(a: T, b: T): T;\n /** Returns the natural logarithm (base e) of `x`. */\n log(x: T): T;\n /** Returns the base 10 logarithm of `x`. */\n log10(x: T): T;\n /** Returns the natural logarithm (base e) of 1 + `x`. */\n log1p(x: T): T;\n /** Returns the base 2 logarithm of `x`. */\n log2(x: T): T;\n /** Returns the largest-valued number of its arguments. */\n max(value1: T, value2: T): T; // TODO: rest\n /** Returns the lowest-valued number of its arguments. */\n min(value1: T, value2: T): T; // TODO: rest\n /** Returns `base` to the power of `exponent`. */\n pow(base: T, exponent: T): T;\n /** Returns a pseudo-random number in the range from 0.0 inclusive up to but not including 1.0. */\n random(): T;\n /** Returns the value of `x` rounded to the nearest integer. */\n round(x: T): T;\n /** Returns the sign of `x`, indicating whether the number is positive, negative or zero. */\n sign(x: T): T;\n /** Returns whether the sign bit of `x` is set. */\n signbit(x: T): bool;\n /** Returns the sine of `x`. */\n sin(x: T): T;\n /** Returns the hyperbolic sine of `x`. */\n sinh(x: T): T;\n /** Returns the square root of `x`. */\n sqrt(x: T): T;\n /** Returns the tangent of `x`. */\n tan(x: T): T;\n /** Returns the hyperbolic tangent of `x`. */\n tanh(x: T): T;\n /** Returns the integer part of `x` by removing any fractional digits. */\n trunc(x: T): T;\n}\n\n/** @internal */\ninterface INativeMath extends IMath {\n /** Contains sin value produced after Math/Mathf.sincos */\n sincos_sin: T;\n /** Contains cos value produced after Math/Mathf.sincos */\n sincos_cos: T;\n /** Seeds the random number generator. */\n seedRandom(value: i64): void;\n /** Multiplies a floating point `x` by 2 raised to power exp `n`. */\n scalbn(x: T, n: i32): T;\n /** Returns the floating-point remainder of `x / y` (rounded towards zero). */\n mod(x: T, y: T): T;\n /** Returns the floating-point remainder of `x / y` (rounded to nearest). */\n rem(x: T, y: T): T;\n /** Returns sin and cos simultaneously for same angle. Results stored to `sincos_s32/64` and `sincos_c32/64` globals */\n sincos(x: T): void;\n /** Returns 2 raised to the given power x. Equivalent to 2 ** x. */\n exp2(x: T): T;\n}\n\n/** Double precision math imported from JavaScript. */\ndeclare const JSMath: IMath;\n/** Double precision math implemented natively. */\ndeclare const NativeMath: INativeMath;\n/** Single precision math implemented natively. */\ndeclare const NativeMathf: INativeMath;\n/** Alias of {@link NativeMath} or {@link JSMath} respectively. Defaults to `NativeMath`. */\ndeclare const Math: IMath;\n/** Alias of {@link NativeMathf} or {@link JSMath} respectively. Defaults to `NativeMathf`. */\ndeclare const Mathf: IMath;\n\n/** Environmental abort function. */\ndeclare function abort(msg?: string | null, fileName?: string | null, lineNumber?: i32, columnNumber?: i32): never;\n/** Environmental tracing function. */\ndeclare function trace(msg: string, n?: i32, a0?: f64, a1?: f64, a2?: f64, a3?: f64, a4?: f64): void;\n/** Environmental seeding function. */\ndeclare function seed(): f64;\n\n/** Node-like process on top of WASI. */\ndeclare namespace process {\n /** String representing the CPU architecture for which the binary was compiled. Either `wasm32` or `wasm64`. */\n export const arch: string;\n /** String representing the operating system platform for which the binary was compiled. Always `wasm`. */\n export const platform: string;\n /** Array of command line arguments passed to the binary upon instantiation. */\n export const argv: string[];\n /** Map of variables in the binary's user environment. */\n export const env: Map;\n /** Process exit code to use when the process exits gracefully. Defaults to `0`. */\n export var exitCode: i32;\n /** Terminates the process with either the given exit code, or `process.exitCode` if omitted. */\n export function exit(code?: i32): void;\n /** Stream connected to `stdin` (fd `0`). */\n export const stdin: ReadableStream;\n /** Stream connected to `stdout` (fd `1`). */\n export const stdout: WritableStream;\n /** Stream connected to `stderr` (fd `2`). */\n export const stderr: WritableStream;\n /** Obtains the system's current time of day, in milliseconds since Unix epoch. */\n export function time(): i64;\n /** Obtains the system's monotonic high resolution time, in nanoseconds since an arbitrary time in the past. */\n export function hrtime(): u64;\n\n interface Stream {\n /** Closes the stream. Throws if already closed or if the stream cannot be closed. */\n close(): void;\n }\n interface ReadableStream extends Stream {\n /** Reads available data from the stream, into `buffer` at offset `offset`, returning the number of bytes read. */\n read(buffer: ArrayBuffer, offset?: isize): i32;\n }\n interface WritableStream extends Stream {\n /** Writes string or buffer to the stream. */\n write(data: T): void;\n }\n}\n\n/** Browser-like console on top of WASI. */\ndeclare namespace console {\n /** Logs `message` to console if `assertion` is false-ish. */\n export function assert(assertion: T, message?: string): void;\n /** Outputs `message` to the console. */\n export function log(message?: string): void;\n /** Outputs `message` to the console, prefixed with \"Debug:\". */\n export function debug(message?: string): void;\n /** Outputs `message` to the console, prefixed with \"Info:\". */\n export function info(message?: string): void;\n /** Outputs `message` to the console, prefixed with \"Warning:\". */\n export function warn(message?: string): void;\n /** Outputs `message` to the console, prefixed with \"Error:\". */\n export function error(message?: string): void;\n /** Starts a new timer using the specified `label`. */\n export function time(label?: string): void;\n /** Logs the current value of a timer previously started with `console.time`. */\n export function timeLog(label?: string): void;\n /** Logs the current value of a timer previously started with `console.time` and discards the timer. */\n export function timeEnd(label?: string): void;\n}\n\n/** Browser-like crypto utilities on top of WASI. */\ndeclare namespace crypto {\n /** Fills `array` with cryptographically strong random values. */\n export function getRandomValues(array: Uint8Array): void;\n}\n\n// Decorators\n\ninterface TypedPropertyDescriptor {\n configurable?: boolean;\n enumerable?: boolean;\n writable?: boolean;\n value?: T;\n get?(): T;\n set?(value: T): void;\n}\n\n/** Annotates a method as a binary operator overload for the specified `token`. */\ndeclare function operator(token:\n \"[]\" | \"[]=\" | \"{}\" | \"{}=\" | \"==\" | \"!=\" | \">\" | \"<\" | \"<=\" | \">=\" |\n \">>\" | \">>>\" | \"<<\" | \"&\" | \"|\" | \"^\" | \"+\" | \"-\" | \"*\" | \"**\" | \"/\" | \"%\"\n): (\n target: any,\n propertyKey: string,\n descriptor: TypedPropertyDescriptor\n) => TypedPropertyDescriptor | void;\n\ndeclare namespace operator {\n /** Annotates a method as a binary operator overload for the specified `token`. */\n export function binary(token:\n \"[]\" | \"[]=\" | \"{}\" | \"{}=\" | \"==\" | \"!=\" | \">\" | \"<\" | \"<=\" | \">=\" |\n \">>\" | \">>>\" | \"<<\" | \"&\" | \"|\" | \"^\" | \"+\" | \"-\" | \"*\" | \"**\" | \"/\" | \"%\"\n ): (\n target: any,\n propertyKey: string,\n descriptor: TypedPropertyDescriptor\n ) => TypedPropertyDescriptor | void;\n /** Annotates a method as an unary prefix operator overload for the specified `token`. */\n export function prefix(token: \"!\" | \"~\" | \"+\" | \"-\" | \"++\" | \"--\"): (\n target: any,\n propertyKey: string,\n descriptor: TypedPropertyDescriptor\n ) => TypedPropertyDescriptor | void;\n /** Annotates a method as an unary postfix operator overload for the specified `token`. */\n export function postfix(token: \"++\" | \"--\"): (\n target: any,\n propertyKey: string,\n descriptor: TypedPropertyDescriptor\n ) => TypedPropertyDescriptor | void;\n}\n\n/** Annotates an element as a program global. */\ndeclare function global(...args: any[]): any;\n\n/** Annotates a class as being unmanaged with limited capabilities. */\ndeclare function unmanaged(constructor: Function): void;\n\n/** Annotates a class as being final / non-derivable. */\ndeclare function final(constructor: Function): void;\n\n/** Annotates a method, function or constant global as always inlined. */\ndeclare function inline(...args: any[]): any;\n\n/** Annotates a method, function or constant global as unsafe. */\ndeclare function unsafe(...args: any[]): any;\n\n/** Annotates an explicit external name of a function or global. */\ndeclare function external(...args: any[]): any;\n\n/** Annotates a global for lazy compilation. */\ndeclare function lazy(...args: any[]): any;\n", + "portable": "/**\n * Environment definitions for compiling AssemblyScript to JavaScript using tsc.\n *\n * Note that semantic differences require additional explicit conversions for full compatibility.\n * For example, when casting an i32 to an u8, doing `(someI32 & 0xff)` will yield the same\n * result when compiling to WebAssembly or JS while `someI32` alone does nothing in JS.\n *\n * Note that i64's are not portable (JS numbers are IEEE754 doubles with a maximum safe integer\n * value of 2^53-1) and instead require a compatibility layer to work in JS as well, as for example\n * {@link glue/js/i64} respectively {@link glue/wasm/i64}.\n *\n * @module std/portable\n *//***/\n\n// Types\n\ndeclare type bool = boolean;\ndeclare type i8 = number;\ndeclare type i16 = number;\ndeclare type i32 = number;\ndeclare type isize = number;\ndeclare type u8 = number;\ndeclare type u16 = number;\ndeclare type u32 = number;\ndeclare type usize = number;\ndeclare type f32 = number;\ndeclare type f64 = number;\n\n/** Special type evaluating the indexed access index type. */\ndeclare type indexof = keyof T;\n/** Special type evaluating the indexed access value type. */\ndeclare type valueof = T[0];\n\n// Compiler hints\n\n/** Compiler target. 0 = JS, 1 = WASM32, 2 = WASM64. */\ndeclare const ASC_TARGET: i32;\n/** Runtime type. 0 = Stub, 1 = Minimal, 2 = Incremental. */\ndeclare const ASC_RUNTIME: i32;\n/** Provided noAssert option. */\ndeclare const ASC_NO_ASSERT: bool;\n/** Provided memoryBase option. */\ndeclare const ASC_MEMORY_BASE: i32;\n/** Provided optimizeLevel option. */\ndeclare const ASC_OPTIMIZE_LEVEL: i32;\n/** Provided shrinkLevel option. */\ndeclare const ASC_SHRINK_LEVEL: i32;\n/** Whether the mutable global feature is enabled. */\ndeclare const ASC_FEATURE_MUTABLE_GLOBAL: bool;\n/** Whether the sign extension feature is enabled. */\ndeclare const ASC_FEATURE_SIGN_EXTENSION: bool;\n\n// Builtins\n\n/** Performs the sign-agnostic count leading zero bits operation on a 32-bit integer. All zero bits are considered leading if the value is zero. */\ndeclare function clz(value: T): T;\n/** Performs the sign-agnostic count tailing zero bits operation on a 32-bit integer. All zero bits are considered trailing if the value is zero. */\ndeclare function ctz(value: T): T;\n/** Performs the sign-agnostic count number of one bits operation on a 32-bit integer. */\ndeclare function popcnt(value: T): T;\n/** Performs the sign-agnostic rotate left operation on a 32-bit integer. */\ndeclare function rotl(value: T, shift: T): T;\n/** Performs the sign-agnostic rotate right operation on a 32-bit integer. */\ndeclare function rotr(value: T, shift: T): T;\n/** Computes the absolute value of an integer or float. */\ndeclare function abs(value: T): T;\n/** Determines the maximum of two integers or floats. If either operand is `NaN`, returns `NaN`. */\ndeclare function max(left: T, right: T): T;\n/** Determines the minimum of two integers or floats. If either operand is `NaN`, returns `NaN`. */\ndeclare function min(left: T, right: T): T;\n/** Composes a 32-bit or 64-bit float from the magnitude of `x` and the sign of `y`. */\ndeclare function copysign(x: T, y: T): T;\n/** Performs the ceiling operation on a 32-bit or 64-bit float. */\ndeclare function ceil(value: T): T;\n/** Performs the floor operation on a 32-bit or 64-bit float. */\ndeclare function floor(value: T): T;\n/** Rounds to the nearest integer tied to even of a 32-bit or 64-bit float. */\ndeclare function nearest(value: T): T;\n/** Selects one of two pre-evaluated values depending on the condition. */\ndeclare function select(ifTrue: T, ifFalse: T, condition: bool): T;\n/** Calculates the square root of a 32-bit or 64-bit float. */\ndeclare function sqrt(value: T): T;\n/** Rounds to the nearest integer towards zero of a 32-bit or 64-bit float. */\ndeclare function trunc(value: T): T;\n/** Emits an unreachable operation that results in a runtime error when executed. */\ndeclare function unreachable(): any; // sic\n\n/** Changes the type of any value of `usize` kind to another one of `usize` kind. Useful for casting class instances to their pointer values and vice-versa. Beware that this is unsafe.*/\ndeclare function changetype(value: any): T;\n/** Explicitly requests no bounds checks on the provided expression. Useful for array accesses. */\ndeclare function unchecked(value: T): T;\n/** Tests if the specified value is a valid integer. Can't distinguish an integer from an integral float. */\ndeclare function isInteger(value: any): value is number;\n/** Tests if the specified value is a valid float. Can't distinguish a float from an integer. */\ndeclare function isFloat(value: any): value is number;\n/** Tests if the specified value is of a nullable reference type. */\ndeclare function isNullable(value: any): bool;\n/** Tests if the specified value is of a reference type. */\ndeclare function isReference(value: any): value is object | string;\n/** Tests if the specified value is of a function type */\ndeclare function isFunction(value: any): value is Function;\n/** Tests if the specified value can be used as a string. */\ndeclare function isString(value: any): value is string | String;\n/** Tests if the specified value can be used as an array. */\ndeclare function isArray(value: any): value is Array;\n/** Tests if the specified type *or* expression can be used as an array like object. */\ndeclare function isArrayLike(value: any): value is ArrayLike;\n/** Tests if the specified expression resolves to a defined element. */\ndeclare function isDefined(expression: any): bool;\n/** Tests if the specified expression evaluates to a constant value. */\ndeclare function isConstant(expression: any): bool;\n/** Traps if the specified value is not true-ish, otherwise returns the value. */\ndeclare function assert(isTrueish: T, message?: string): T & (object | string | number); // any better way to model `: T != null`?\n/** Parses an integer string to a 64-bit float. */\ndeclare function parseInt(str: string, radix?: i32): f64;\n/** Parses a floating point string to a 64-bit float. */\ndeclare function parseFloat(str: string): f64;\n/** Returns the 64-bit floating-point remainder of `x/y`. */\ndeclare function fmod(x: f64, y: f64): f64;\n/** Returns the 32-bit floating-point remainder of `x/y`. */\ndeclare function fmodf(x: f32, y: f32): f32;\n\n/** Converts any other numeric value to an 8-bit signed integer. */\ndeclare function i8(value: any): i8;\ndeclare namespace i8 {\n /** Smallest representable value. */\n export const MIN_VALUE: i8;\n /** Largest representable value. */\n export const MAX_VALUE: i8;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): i8;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): i8;\n}\n/** Converts any other numeric value to a 16-bit signed integer. */\ndeclare function i16(value: any): i16;\ndeclare namespace i16 {\n /** Smallest representable value. */\n export const MIN_VALUE: i16;\n /** Largest representable value. */\n export const MAX_VALUE: i16;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): i16;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): i16;\n}\n/** Converts any other numeric value to a 32-bit signed integer. */\ndeclare function i32(value: any): i32;\ndeclare namespace i32 {\n /** Smallest representable value. */\n export const MIN_VALUE: i32;\n /** Largest representable value. */\n export const MAX_VALUE: i32;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): i32;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): i32;\n}\n/** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) signed integer. */\ndeclare function isize(value: any): isize;\ndeclare namespace isize {\n /** Smallest representable value. */\n export const MIN_VALUE: isize;\n /** Largest representable value. */\n export const MAX_VALUE: isize;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): isize;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): isize;\n}\n/** Converts any other numeric value to an 8-bit unsigned integer. */\ndeclare function u8(value: any): u8;\ndeclare namespace u8 {\n /** Smallest representable value. */\n export const MIN_VALUE: u8;\n /** Largest representable value. */\n export const MAX_VALUE: u8;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): u8;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): u8;\n}\n/** Converts any other numeric value to a 16-bit unsigned integer. */\ndeclare function u16(value: any): u16;\ndeclare namespace u16 {\n /** Smallest representable value. */\n export const MIN_VALUE: u16;\n /** Largest representable value. */\n export const MAX_VALUE: u16;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): u16;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): u16;\n}\n/** Converts any other numeric value to a 32-bit unsigned integer. */\ndeclare function u32(value: any): u32;\ndeclare namespace u32 {\n /** Smallest representable value. */\n export const MIN_VALUE: u32;\n /** Largest representable value. */\n export const MAX_VALUE: u32;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): u32;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): u32;\n}\n/** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) unsigned integer. */\ndeclare function usize(value: any): isize;\ndeclare namespace usize {\n /** Smallest representable value. */\n export const MIN_VALUE: usize;\n /** Largest representable value. */\n export const MAX_VALUE: usize;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): usize;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): usize;\n}\n/** Converts any other numeric value to a 1-bit unsigned integer. */\ndeclare function bool(value: any): bool;\ndeclare namespace bool {\n /** Smallest representable value. */\n export const MIN_VALUE: bool;\n /** Largest representable value. */\n export const MAX_VALUE: bool;\n}\n/** Converts any other numeric value to a 32-bit float. */\ndeclare function f32(value: any): f32;\ndeclare namespace f32 {\n /** Smallest representable value. */\n export const MIN_VALUE: f32;\n /** Largest representable value. */\n export const MAX_VALUE: f32;\n /** Smallest normalized positive value. */\n export const MIN_NORMAL_VALUE: f32;\n /** Smallest safely representable integer value. */\n export const MIN_SAFE_INTEGER: f32;\n /** Largest safely representable integer value. */\n export const MAX_SAFE_INTEGER: f32;\n /** Positive infinity value. */\n export const POSITIVE_INFINITY: f32;\n /** Negative infinity value. */\n export const NEGATIVE_INFINITY: f32;\n /** Not a number value. */\n /* eslint no-shadow-restricted-names: \"off\" */\n export const NaN: f32;\n /** Difference between 1 and the smallest representable value greater than 1. */\n export const EPSILON: f32;\n /** Returns a boolean value that indicates whether a value is the reserved value NaN (not a number). */\n export function isNaN(value: f32): bool;\n /** Returns true if passed value is finite. */\n export function isFinite(value: f32): bool;\n /** Returns true if the value passed is a safe integer. */\n export function isSafeInteger(value: f32): bool;\n /** Returns true if the value passed is an integer, false otherwise. */\n export function isInteger(value: f32): bool;\n /** Converts a string to a floating-point number. */\n export function parseFloat(string: string): f32;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): f32;\n}\n/** Converts any other numeric value to a 64-bit float. */\ndeclare function f64(value: any): f64;\ndeclare namespace f64 {\n /** Smallest representable value. */\n export const MIN_VALUE: f64;\n /** Largest representable value. */\n export const MAX_VALUE: f64;\n /** Smallest normalized positive value. */\n export const MIN_NORMAL_VALUE: f64;\n /** Smallest safely representable integer value. */\n export const MIN_SAFE_INTEGER: f64;\n /** Largest safely representable integer value. */\n export const MAX_SAFE_INTEGER: f64;\n /** Positive infinity value. */\n export const POSITIVE_INFINITY: f64;\n /** Negative infinity value. */\n export const NEGATIVE_INFINITY: f64;\n /** Not a number value. */\n /* eslint no-shadow-restricted-names: \"off\" */\n export const NaN: f64;\n /** Difference between 1 and the smallest representable value greater than 1. */\n export const EPSILON: f64;\n /** Returns a boolean value that indicates whether a value is the reserved value NaN (not a number). */\n export function isNaN(value: f32): bool;\n /** Returns true if passed value is finite. */\n export function isFinite(value: f32): bool;\n /** Returns true if the value passed is a safe integer. */\n export function isSafeInteger(value: f64): bool;\n /** Returns true if the value passed is an integer, false otherwise. */\n export function isInteger(value: f64): bool;\n /** Converts a string to a floating-point number. */\n export function parseFloat(string: string): f64;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): f64;\n}\n\n// Polyfills\n\n/** [Polyfill] Performs the sign-agnostic reverse bytes **/\ndeclare function bswap(value: T): T;\n/** [Polyfill] Performs the sign-agnostic reverse bytes only for last 16-bit **/\ndeclare function bswap16(value: T): T;\n\n// Standard library\n\ndeclare const Mathf: typeof Math;\ndeclare const JSMath: typeof Math;\n\ndeclare interface StringConstructor {\n /** Equivalent to calling `String.fromCharCode` with multiple arguments. */\n fromCharCodes(arr: u16[]): string;\n /** Equivalent to calling `String.fromCodePoint` with multiple arguments. */\n fromCodePoints(arr: i32[]): string;\n}\n\ndeclare interface String {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): string;\n}\n\n/** Annotates a class as being unmanaged with limited capabilities. */\ndeclare function unmanaged(constructor: Function): void;\n\n/** Environmental tracing function. */\ndeclare function trace(msg: string, n?: i32, a0?: f64, a1?: f64, a2?: f64, a3?: f64, a4?: f64): void;\n\ndeclare interface Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): T;\n /** Returns an index start searching from the end in the array */\n findLastIndex(callbackfn: (value: T, index: i32, self: Array) => bool): i32;\n}\n\ndeclare interface Int8ArrayConstructor {\n /** Equivalent to calling `new Int8Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Int8Array;\n}\n\ndeclare interface Int8Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): i8;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: i8, index: i32, self: Int8Array) => bool): i32;\n}\n\ndeclare interface Uint8ArrayConstructor {\n /** Equivalent to calling `new Uint8Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint8Array;\n}\n\ndeclare interface Uint8Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): u8;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: u8, index: i32, self: Uint8Array) => bool): i32;\n}\n\ndeclare interface Uint8ClampedArrayConstructor {\n /** Equivalent to calling `new Uint8ClampedArray` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint8ClampedArray;\n}\n\ndeclare interface Uint8ClampedArray {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): u8;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: u8, index: i32, self: Uint8ClampedArray) => bool): i32;\n}\n\ndeclare interface Int16ArrayConstructor {\n /** Equivalent to calling `new Int16Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Int16Array;\n}\n\ndeclare interface Int16Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): i16;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: i16, index: i32, self: Int16Array) => bool): i32;\n}\n\ndeclare interface Uint16ArrayConstructor {\n /** Equivalent to calling `new Uint16Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint16Array;\n}\n\ndeclare interface Uint16Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): u16;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: u16, index: i32, self: Uint16Array) => bool): i32;\n}\n\ndeclare interface Int32ArrayConstructor {\n /** Equivalent to calling `new Int32Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Int32Array;\n}\n\ndeclare interface Int32Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): i32;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: i32, index: i32, self: Int32Array) => bool): i32;\n}\n\ndeclare interface Uint32ArrayConstructor {\n /** Equivalent to calling `new Uint32Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint32Array;\n}\n\ndeclare interface Uint32Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): u32;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: u32, index: i32, self: Uint32Array) => bool): i32;\n}\n\ndeclare interface Float32ArrayConstructor {\n /** Equivalent to calling `new Float32Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Float32Array;\n}\n\ndeclare interface Float32Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): f32;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: f32, index: i32, self: Float32Array) => bool): i32;\n}\n\ndeclare interface Float64ArrayConstructor {\n /** Equivalent to calling `new Float64Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Float64Array;\n}\n\ndeclare interface Float64Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): f64;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: f64, index: i32, self: Float64Array) => bool): i32;\n}\n\n// FIXME: remove\ndeclare function offsetof(fieldName?: string): usize;\ndeclare function idof(): u32;\n" +}; +export const libraryFiles = { + "array": "/// \n\nimport { BLOCK_MAXSIZE } from \"./rt/common\";\nimport { Runtime } from \"shared/runtime\";\nimport { COMPARATOR, SORT } from \"./util/sort\";\nimport { REVERSE } from \"./util/bytes\";\nimport { joinBooleanArray, joinIntegerArray, joinFloatArray, joinStringArray, joinReferenceArray } from \"./util/string\";\nimport { idof, isArray as builtin_isArray } from \"./builtins\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_ILLEGALGENTYPE, E_EMPTYARRAY, E_HOLEYARRAY } from \"./util/error\";\n\n// @ts-ignore: decorator\n@inline @lazy const MIN_SIZE: usize = 8;\n\n/** Ensures that the given array has _at least_ the specified backing size. */\nfunction ensureCapacity(array: usize, newSize: usize, alignLog2: u32, canGrow: bool = true): void {\n // Depends on the fact that Arrays mimic ArrayBufferView\n var oldCapacity = changetype(array).byteLength;\n if (newSize > oldCapacity >>> alignLog2) {\n if (newSize > BLOCK_MAXSIZE >>> alignLog2) throw new RangeError(E_INVALIDLENGTH);\n let oldData = changetype(changetype(array).buffer);\n // Grows old capacity by factor of two.\n // Make sure we don't reach BLOCK_MAXSIZE for new growed capacity.\n let newCapacity = max(newSize, MIN_SIZE) << alignLog2;\n if (canGrow) newCapacity = max(min(oldCapacity << 1, BLOCK_MAXSIZE), newCapacity);\n let newData = __renew(oldData, newCapacity);\n // __new / __renew already init memory range as zeros in Incremental runtime.\n // So try to avoid this.\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(newData + oldCapacity, 0, newCapacity - oldCapacity);\n }\n if (newData !== oldData) { // oldData has been free'd\n store(array, newData, offsetof(\"buffer\"));\n store(array, newData, offsetof(\"dataStart\"));\n __link(array, changetype(newData), false);\n }\n store(array, newCapacity, offsetof(\"byteLength\"));\n }\n}\n\nexport class Array {\n [key: number]: T;\n\n // Mimicking ArrayBufferView isn't strictly necessary here but is done to allow glue code\n // to work with typed and normal arrays interchangeably. Technically, normal arrays do not need\n // `dataStart` (equals `buffer`) and `byteLength` (equals computed `buffer.byteLength`), but the\n // block is 16 bytes anyway so it's fine to have a couple extra fields in there.\n\n private buffer: ArrayBuffer;\n @unsafe readonly dataStart: usize;\n private byteLength: i32; // Uses here as capacity\n\n // Also note that Array with non-nullable T must guard against uninitialized null values\n // whenever an element is accessed. Otherwise, the compiler wouldn't be able to guarantee\n // type-safety anymore. For lack of a better word, such an array is \"holey\".\n\n private length_: i32;\n\n static isArray(value: U): bool {\n return isReference() ? builtin_isArray(value) && value !== null : false;\n }\n\n static create(capacity: i32 = 0): Array {\n WARNING(\"'Array.create' is deprecated. Use 'new Array' instead, making sure initial elements are initialized.\");\n var array = new Array(capacity);\n array.length = 0;\n return array;\n }\n\n constructor(length: i32 = 0) {\n if (length > BLOCK_MAXSIZE >>> alignof()) throw new RangeError(E_INVALIDLENGTH);\n // reserve capacity for at least MIN_SIZE elements\n var bufferSize = max(length, MIN_SIZE) << alignof();\n var buffer = changetype(__new(bufferSize, idof()));\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(changetype(buffer), 0, bufferSize);\n }\n this.buffer = buffer; // links\n this.dataStart = changetype(buffer);\n this.byteLength = bufferSize;\n this.length_ = length;\n }\n\n get length(): i32 {\n return this.length_;\n }\n\n set length(newLength: i32) {\n ensureCapacity(changetype(this), newLength, alignof(), false);\n this.length_ = newLength;\n }\n\n every(fn: (value: T, index: i32, array: Array) => bool): bool {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n if (!fn(load(this.dataStart + (i << alignof())), i, this)) return false;\n }\n return true;\n }\n\n findIndex(fn: (value: T, index: i32, array: Array) => bool): i32 {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n if (fn(load(this.dataStart + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n findLastIndex(fn: (value: T, index: i32, array: Array) => bool): i32 {\n for (let i = this.length_ - 1; i >= 0; --i) {\n if (fn(load(this.dataStart + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n @operator(\"[]\") private __get(index: i32): T {\n if (index >= this.length_) throw new RangeError(E_INDEXOUTOFRANGE);\n var value = load(this.dataStart + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n @unsafe @operator(\"{}\") private __uget(index: i32): T {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\") private __set(index: i32, value: T): void {\n if (index >= this.length_) {\n if (index < 0) throw new RangeError(E_INDEXOUTOFRANGE);\n ensureCapacity(changetype(this), index + 1, alignof());\n this.length_ = index + 1;\n }\n this.__uset(index, value);\n }\n\n @unsafe @operator(\"{}=\") private __uset(index: i32, value: T): void {\n store(this.dataStart + (index << alignof()), value);\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n }\n\n at(index: i32): T {\n var len = this.length_;\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n var value = load(this.dataStart + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): this {\n var ptr = this.dataStart;\n var len = this.length_;\n start = start < 0 ? max(len + start, 0) : min(start, len);\n end = end < 0 ? max(len + end, 0) : min(end, len);\n if (isManaged()) {\n for (; start < end; ++start) {\n store(ptr + (start << alignof()), changetype(value));\n __link(changetype(this), changetype(value), true);\n }\n } else if (sizeof() == 1) {\n if (start < end) {\n memory.fill(\n ptr + start,\n u8(value),\n (end - start)\n );\n }\n } else {\n for (; start < end; ++start) {\n store(ptr + (start << alignof()), value);\n }\n }\n return this;\n }\n\n includes(value: T, fromIndex: i32 = 0): bool {\n if (isFloat()) {\n let len = this.length_;\n if (len == 0 || fromIndex >= len) return false;\n if (fromIndex < 0) fromIndex = max(len + fromIndex, 0);\n let ptr = this.dataStart;\n while (fromIndex < len) {\n let elem = load(ptr + (fromIndex << alignof()));\n // @ts-ignore\n if (elem == value || isNaN(elem) & isNaN(value)) return true;\n ++fromIndex;\n }\n return false;\n } else {\n return this.indexOf(value, fromIndex) >= 0;\n }\n }\n\n indexOf(value: T, fromIndex: i32 = 0): i32 {\n var len = this.length_;\n if (len == 0 || fromIndex >= len) return -1;\n if (fromIndex < 0) fromIndex = max(len + fromIndex, 0);\n var ptr = this.dataStart;\n while (fromIndex < len) {\n if (load(ptr + (fromIndex << alignof())) == value) return fromIndex;\n ++fromIndex;\n }\n return -1;\n }\n\n lastIndexOf(value: T, fromIndex: i32 = this.length_): i32 {\n var len = this.length_;\n if (len == 0) return -1;\n if (fromIndex < 0) fromIndex = len + fromIndex;\n else if (fromIndex >= len) fromIndex = len - 1;\n var ptr = this.dataStart;\n while (fromIndex >= 0) {\n if (load(ptr + (fromIndex << alignof())) == value) return fromIndex;\n --fromIndex;\n }\n return -1;\n }\n\n push(value: T): i32 {\n var oldLen = this.length_;\n var len = oldLen + 1;\n ensureCapacity(changetype(this), len, alignof());\n if (isManaged()) {\n store(this.dataStart + (oldLen << alignof()), changetype(value));\n __link(changetype(this), changetype(value), true);\n } else {\n store(this.dataStart + (oldLen << alignof()), value);\n }\n this.length_ = len;\n return len;\n }\n\n concat(other: Array): Array {\n var thisLen = this.length_;\n var otherLen = select(0, other.length_, other === null);\n var outLen = thisLen + otherLen;\n if (outLen > BLOCK_MAXSIZE >>> alignof()) throw new Error(E_INVALIDLENGTH);\n var out = changetype>(__newArray(outLen, alignof(), idof>()));\n var outStart = out.dataStart;\n var thisSize = thisLen << alignof();\n if (isManaged()) {\n let thisStart = this.dataStart;\n for (let offset: usize = 0; offset < thisSize; offset += sizeof()) {\n let ref = load(thisStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n outStart += thisSize;\n let otherStart = other.dataStart;\n let otherSize = otherLen << alignof();\n for (let offset: usize = 0; offset < otherSize; offset += sizeof()) {\n let ref = load(otherStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(outStart, this.dataStart, thisSize);\n memory.copy(outStart + thisSize, other.dataStart, otherLen << alignof());\n }\n return out;\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): this {\n var ptr = this.dataStart;\n var len = this.length_;\n\n end = min(end, len);\n\n var to = target < 0 ? max(len + target, 0) : min(target, len);\n var from = start < 0 ? max(len + start, 0) : min(start, len);\n var last = end < 0 ? max(len + end, 0) : min(end, len);\n var count = min(last - from, len - to);\n\n memory.copy( // is memmove\n ptr + (to << alignof()),\n ptr + (from << alignof()),\n count << alignof()\n );\n return this;\n }\n\n pop(): T {\n var len = this.length_;\n if (len < 1) throw new RangeError(E_EMPTYARRAY);\n var val = load(this.dataStart + ((--len) << alignof()));\n this.length_ = len;\n return val;\n }\n\n forEach(fn: (value: T, index: i32, array: Array) => void): void {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n fn(load(this.dataStart + (i << alignof())), i, this);\n }\n }\n\n map(fn: (value: T, index: i32, array: Array) => U): Array {\n var len = this.length_;\n var out = changetype>(__newArray(len, alignof(), idof>()));\n var outStart = out.dataStart;\n for (let i = 0; i < min(len, this.length_); ++i) {\n let result = fn(load(this.dataStart + (i << alignof())), i, this);\n store(outStart + (i << alignof()), result);\n if (isManaged()) {\n __link(changetype(out), changetype(result), true);\n }\n }\n return out;\n }\n\n filter(fn: (value: T, index: i32, array: Array) => bool): Array {\n var result = changetype>(__newArray(0, alignof(), idof>()));\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n let value = load(this.dataStart + (i << alignof()));\n if (fn(value, i, this)) result.push(value);\n }\n return result;\n }\n\n reduce(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array) => U,\n initialValue: U\n ): U {\n var acc = initialValue;\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n acc = fn(acc, load(this.dataStart + (i << alignof())), i, this);\n }\n return acc;\n }\n\n reduceRight(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array) => U,\n initialValue: U\n ): U {\n var acc = initialValue;\n for (let i = this.length_ - 1; i >= 0; --i) {\n acc = fn(acc, load(this.dataStart + (i << alignof())), i, this);\n }\n return acc;\n }\n\n shift(): T {\n var len = this.length_;\n if (len < 1) throw new RangeError(E_EMPTYARRAY);\n var base = this.dataStart;\n var element = load(base);\n var lastIndex = len - 1;\n memory.copy(\n base,\n base + sizeof(),\n lastIndex << alignof()\n );\n if (isReference()) {\n store(base + (lastIndex << alignof()), 0);\n } else {\n // @ts-ignore\n store(base + (lastIndex << alignof()), 0);\n }\n this.length_ = lastIndex;\n return element;\n }\n\n some(fn: (value: T, index: i32, array: Array) => bool): bool {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n if (fn(load(this.dataStart + (i << alignof())), i, this)) return true;\n }\n return false;\n }\n\n unshift(value: T): i32 {\n var len = this.length_ + 1;\n ensureCapacity(changetype(this), len, alignof());\n var ptr = this.dataStart;\n memory.copy(\n ptr + sizeof(),\n ptr,\n (len - 1) << alignof()\n );\n store(ptr, value);\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n this.length_ = len;\n return len;\n }\n\n slice(start: i32 = 0, end: i32 = i32.MAX_VALUE): Array {\n var len = this.length_;\n start = start < 0 ? max(start + len, 0) : min(start, len);\n end = end < 0 ? max(end + len, 0) : min(end , len);\n len = max(end - start, 0);\n var slice = changetype>(__newArray(len, alignof(), idof>()));\n var sliceBase = slice.dataStart;\n var thisBase = this.dataStart + (start << alignof());\n if (isManaged()) {\n let off = 0;\n let end = len << alignof();\n while (off < end) {\n let ref = load(thisBase + off);\n store(sliceBase + off, ref);\n __link(changetype(slice), ref, true);\n off += sizeof();\n }\n } else {\n memory.copy(sliceBase, thisBase, len << alignof());\n }\n return slice;\n }\n\n splice(start: i32, deleteCount: i32 = i32.MAX_VALUE): Array {\n var len = this.length_;\n start = start < 0 ? max(len + start, 0) : min(start, len);\n deleteCount = max(min(deleteCount, len - start), 0);\n var result = changetype>(__newArray(deleteCount, alignof(), idof>()));\n var resultStart = result.dataStart;\n var thisStart = this.dataStart;\n var thisBase = thisStart + (start << alignof());\n memory.copy(\n resultStart,\n thisBase,\n deleteCount << alignof()\n );\n var offset = start + deleteCount;\n if (len != offset) {\n memory.copy(\n thisBase,\n thisStart + (offset << alignof()),\n (len - offset) << alignof()\n );\n }\n this.length_ = len - deleteCount;\n return result;\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length_);\n return this;\n }\n\n sort(comparator: (a: T, b: T) => i32 = COMPARATOR()): this {\n SORT(this.dataStart, this.length_, comparator);\n return this;\n }\n\n join(separator: string = \",\"): string {\n var ptr = this.dataStart;\n var len = this.length_;\n if (isBoolean()) return joinBooleanArray(ptr, len, separator);\n if (isInteger()) return joinIntegerArray(ptr, len, separator);\n if (isFloat()) return joinFloatArray(ptr, len, separator);\n\n if (ASC_SHRINK_LEVEL < 1) {\n if (isString()) return joinStringArray(ptr, len, separator);\n }\n // For rest objects and arrays use general join routine\n if (isReference()) return joinReferenceArray(ptr, len, separator);\n ERROR(\"unspported element type\");\n return unreachable();\n }\n\n flat(): T {\n if (!isArray()) {\n throw new TypeError(E_ILLEGALGENTYPE);\n }\n // Get the length and data start values\n var ptr = this.dataStart;\n var len = this.length_;\n\n // calculate the end size with an initial pass\n var size = 0;\n for (let i = 0; i < len; ++i) {\n let child = load(ptr + (i << alignof()));\n size += child == 0 ? 0 : load(child, offsetof(\"length_\"));\n }\n\n // calculate the byteLength of the resulting backing ArrayBuffer\n const align = alignof>();\n var byteLength = size << align;\n var outBuffer = changetype(__new(byteLength, idof()));\n\n // create the return value and initialize it\n var outArray = changetype(__new(offsetof(), idof()));\n store(changetype(outArray), size, offsetof(\"length_\"));\n\n // byteLength, dataStart, and buffer are all readonly\n store(changetype(outArray), byteLength, offsetof(\"byteLength\"));\n store(changetype(outArray), changetype(outBuffer), offsetof(\"dataStart\"));\n store(changetype(outArray), changetype(outBuffer), offsetof(\"buffer\"));\n __link(changetype(outArray), changetype(outBuffer), false);\n\n // set the elements\n var resultOffset: usize = 0;\n for (let i = 0; i < len; ++i) { // for each child\n let child = load(ptr + (i << alignof()));\n\n // ignore null arrays\n if (!child) continue;\n\n // copy the underlying buffer data to the result buffer\n let childDataLength = load(child, offsetof(\"length_\")) << align;\n memory.copy(\n changetype(outBuffer) + resultOffset,\n load(child, offsetof(\"dataStart\")),\n childDataLength\n );\n\n // advance the result length\n resultOffset += childDataLength;\n }\n\n // if the `valueof` type is managed, we must link each reference\n if (isManaged>()) {\n for (let i = 0; i < size; ++i) {\n let ref = load(changetype(outBuffer) + (i << usize(alignof>())));\n __link(changetype(outBuffer), ref, true);\n }\n }\n\n return outArray;\n }\n\n toString(): string {\n return this.join();\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n if (isManaged()) {\n let cur = this.dataStart;\n let end = cur + (this.length_ << alignof());\n while (cur < end) {\n let val = load(cur);\n if (val) __visit(val, cookie);\n cur += sizeof();\n }\n }\n __visit(changetype(this.buffer), cookie);\n }\n}\n", + "arraybuffer": "/// \n\nimport { OBJECT, BLOCK_MAXSIZE, TOTAL_OVERHEAD } from \"./rt/common\";\nimport { Runtime } from \"shared/runtime\";\nimport { idof } from \"./builtins\";\nimport { E_INVALIDLENGTH } from \"./util/error\";\n\nexport abstract class ArrayBufferView {\n\n readonly buffer: ArrayBuffer;\n @unsafe readonly dataStart: usize;\n readonly byteLength: i32;\n\n get byteOffset(): i32 {\n return (this.dataStart - changetype(this.buffer));\n }\n\n protected constructor(length: i32, alignLog2: i32) {\n if (length > BLOCK_MAXSIZE >>> alignLog2) throw new RangeError(E_INVALIDLENGTH);\n var buffer = changetype(__new(length = length << alignLog2, idof()));\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(changetype(buffer), 0, length);\n }\n this.buffer = buffer; // links\n this.dataStart = changetype(buffer);\n this.byteLength = length;\n }\n}\n\n@final export class ArrayBuffer {\n\n static isView(value: T): bool {\n if (isNullable()) {\n if (value === null) return false;\n }\n if (value instanceof Int8Array) return true;\n if (value instanceof Uint8Array) return true;\n if (value instanceof Uint8ClampedArray) return true;\n if (value instanceof Int16Array) return true;\n if (value instanceof Uint16Array) return true;\n if (value instanceof Int32Array) return true;\n if (value instanceof Uint32Array) return true;\n if (value instanceof Int64Array) return true;\n if (value instanceof Uint64Array) return true;\n if (value instanceof Float32Array) return true;\n if (value instanceof Float64Array) return true;\n if (value instanceof DataView) return true;\n return false;\n }\n\n constructor(length: i32) {\n if (length > BLOCK_MAXSIZE) throw new RangeError(E_INVALIDLENGTH);\n var buffer = changetype(__new(length, idof()));\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(changetype(buffer), 0, length);\n }\n return buffer;\n }\n\n get byteLength(): i32 {\n return changetype(changetype(this) - TOTAL_OVERHEAD).rtSize;\n }\n\n slice(begin: i32 = 0, end: i32 = BLOCK_MAXSIZE): ArrayBuffer {\n var length = this.byteLength;\n begin = begin < 0 ? max(length + begin, 0) : min(begin, length);\n end = end < 0 ? max(length + end , 0) : min(end , length);\n var outSize = max(end - begin, 0);\n var out = changetype(__new(outSize, idof()));\n memory.copy(changetype(out), changetype(this) + begin, outSize);\n return out;\n }\n\n toString(): string {\n return \"[object ArrayBuffer]\";\n }\n}\n", + "atomics": "import { ArrayBufferView } from \"./arraybuffer\";\nimport { E_INDEXOUTOFRANGE } from \"./util/error\";\n\nexport namespace Atomics {\n\n // @ts-ignore: decorator\n @inline\n export function load(array: T, index: i32): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.load>(\n changetype(array.buffer) + (index << align) + array.byteOffset\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function store(array: T, index: i32, value: valueof): void {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n atomic.store>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n value\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function add(array: T, index: i32, value: valueof): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.add>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n value\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function sub(array: T, index: i32, value: valueof): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.sub>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n value\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function and(array: T, index: i32, value: valueof): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.and>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n value\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function or(array: T, index: i32, value: valueof): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.or>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n value\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function xor(array: T, index: i32, value: valueof): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.xor>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n value\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function exchange(array: T, index: i32, value: valueof): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.xchg>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n value\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function compareExchange(\n array: T,\n index: i32,\n expectedValue: valueof,\n replacementValue: valueof\n ): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.cmpxchg>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n expectedValue,\n replacementValue\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function wait(array: T, value: valueof, timeout: i64 = -1): AtomicWaitResult {\n return atomic.wait>(changetype(array.buffer) + array.byteOffset, value, timeout);\n }\n\n // @ts-ignore: decorator\n @inline\n export function notify(array: T, index: i32, count: i32 = -1): i32 {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.notify(changetype(array.buffer) + (index << align) + array.byteOffset, count);\n }\n\n export function isLockFree(size: usize): bool {\n return size == 1 || size == 2 || size == 4;\n }\n}\n", + "bindings/asyncify": "@unmanaged\nexport class StackDescriptor {\n /** The index in linear memory of the start of the “asyncify stack”. */\n stackStart: usize;\n /** The index of the end of that stack region, which implies how big it is. */\n stackEnd: usize;\n}\n\n/** Starts to unwind the call stack. */\nexport declare function start_unwind(data: StackDescriptor): void;\n/** Stops unwinding the call stack. */\nexport declare function stop_unwind(): void;\n/** Starts to rewind the call stack. */\nexport declare function start_rewind(data: StackDescriptor): void;\n/** Stops rewinding the call stack. */\nexport declare function stop_rewind(): void;\n", + "bindings/console": "export declare function assert(value: externref): void;\nexport declare function clear(): void;\nexport declare function error(value: externref): void;\nexport declare function info(value: externref): void;\nexport declare function log(value: externref): void;\nexport declare function time(label: externref): externref;\nexport declare function timeEnd(label: externref): void;\nexport declare function timeLog(label: externref): void;\nexport declare function trace(): void;\nexport declare function warn(value: externref): void;\n", + "bindings/Date": "export declare function now(): f64;\n", + "bindings/Math": "export declare const E: f64;\nexport declare const LN2: f64;\nexport declare const LN10: f64;\nexport declare const LOG2E: f64;\nexport declare const LOG10E: f64;\nexport declare const PI: f64;\nexport declare const SQRT1_2: f64;\nexport declare const SQRT2: f64;\n\nexport declare function abs(x: f64): f64;\nexport declare function acos(x: f64): f64;\nexport declare function acosh(x: f64): f64;\nexport declare function asin(x: f64): f64;\nexport declare function asinh(x: f64): f64;\nexport declare function atan(x: f64): f64;\nexport declare function atan2(y: f64, x: f64): f64;\nexport declare function atanh(x: f64): f64;\nexport declare function cbrt(x: f64): f64;\nexport declare function ceil(x: f64): f64;\nexport declare function clz32(x: f64): f64;\nexport declare function cos(x: f64): f64;\nexport declare function cosh(x: f64): f64;\nexport declare function exp(x: f64): f64;\nexport declare function expm1(x: f64): f64;\nexport declare function floor(x: f64): f64;\nexport declare function fround(x: f64): f32;\nexport declare function hypot(value1: f64, value2: f64): f64; // TODO: rest\nexport declare function imul(a: f64, b: f64): f64;\nexport declare function log(x: f64): f64;\nexport declare function log10(x: f64): f64;\nexport declare function log1p(x: f64): f64;\nexport declare function log2(x: f64): f64;\nexport declare function max(value1: f64, value2: f64): f64; // TODO: rest\nexport declare function min(value1: f64, value2: f64): f64; // TODO: rest\nexport declare function pow(base: f64, exponent: f64): f64;\nexport declare function random(): f64;\nexport declare function round(x: f64): f64;\nexport declare function sign(x: f64): f64;\nexport declare function sin(x: f64): f64;\nexport declare function sinh(x: f64): f64;\nexport declare function sqrt(x: f64): f64;\nexport declare function tan(x: f64): f64;\nexport declare function tanh(x: f64): f64;\nexport declare function trunc(x: f64): f64;\n", + "bindings/Reflect": "export declare function get(target: externref, propertyKey: externref/* , receiver: externref */): externref;\nexport declare function has(target: externref, propertyKey: externref): bool;\nexport declare function set(target: externref, propertyKey: externref, value: externref/* , receiver: externref */): externref;\nexport declare function apply(target: externref, thisArgument: externref, argumentsList: externref): externref;\n", + "bindings/wasi_snapshot_preview1": "// Phase: wasi_snapshot_preview1\n// See: https://github.com/WebAssembly/WASI/tree/main/phases/snapshot/witx\n\n// helper types to be more explicit\ntype char = u8;\ntype ptr = usize; // all pointers are usize'd\ntype struct = T; // structs are references already in AS\n\n/** Read command-line argument data. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function args_get(\n /** Input: Pointer to a buffer to write the argument pointers. */\n argv: ptr>,\n /** Input: Pointer to a buffer to write the argument string data. */\n argv_buf: ptr\n): errno;\n\n/** Return command-line argument data sizes. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function args_sizes_get(\n /** Output: Number of arguments. */\n argc: ptr,\n /** Output: Size of the argument string data. */\n argv_buf_size: ptr\n): errno;\n\n/** Return the resolution of a clock. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function clock_res_get(\n /** Input: The clock for which to return the resolution. */\n clock: clockid,\n /** Output: The resolution of the clock. */\n resolution: ptr\n): errno;\n\n/** Return the time value of a clock. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function clock_time_get(\n /** Input: Cock for which to return the time. */\n clock: clockid,\n /** Input: Maximum lag (exclusive) that the returned time value may have, compared to its actual value. */\n precision: timestamp,\n /** Output: Time value of the clock. */\n time: ptr\n): errno;\n\n/** Read environment variable data. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function environ_get(\n /** Input: Pointer to a buffer to write the environment variable pointers. */\n environ: ptr,\n /** Input: Pointer to a buffer to write the environment variable string data. */\n environ_buf: usize\n): errno;\n\n/** Return command-line argument data sizes. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function environ_sizes_get(\n /** Output: The number of environment variables. */\n environ_count: ptr,\n /** Output: The size of the environment variable string data. */\n environ_buf_size: ptr\n): errno;\n\n/** Provide file advisory information on a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_advise(\n /** Input: The file descriptor for the file for which to provide file advisory information. */\n fd: fd,\n /** Input: The offset within the file to which the advisory applies. */\n offset: filesize,\n /** Input: The length of the region to which the advisory applies. */\n len: filesize,\n /** Input: The advice. */\n advice: advice\n): errno;\n\n/** Provide file advisory information on a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_allocate(\n /** Input: The file descriptor for the file in which to allocate space. */\n fd: fd,\n /** Input: The offset at which to start the allocation. */\n offset: filesize,\n /** Input: The length of the area that is allocated. */\n len: filesize\n): errno;\n\n/** Close a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_close(\n /** Input: The file descriptor to close. */\n fd: fd\n): errno;\n\n/** Synchronize the data of a file to disk. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_datasync(\n /** Input: The file descriptor of the file to synchronize to disk. */\n fd: fd\n): errno;\n\n/** Get the attributes of a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_fdstat_get(\n /** Input: The file descriptor to inspect. */\n fd: fd,\n /** Input: The buffer where the file descriptor's attributes are stored. */\n buf: struct\n): errno;\n\n/** Adjust the flags associated with a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_fdstat_set_flags(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The desired values of the file descriptor flags. */\n flags: fdflags\n): errno;\n\n/** Adjust the rights associated with a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_fdstat_set_rights(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The desired rights of the file descriptor. */\n fs_rights_base: rights,\n /** Input: The desired rights of the file descriptor. */\n fs_rights_inheriting: rights\n): errno;\n\n/** Return the attributes of an open file. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_filestat_get(\n /** Input: The file descriptor to inspect. */\n fd: fd,\n /** Input: The buffer where the file's attributes are stored. */\n buf: struct\n): errno;\n\n/** Adjust the size of an open file. If this increases the file's size, the extra bytes are filled with zeros. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_filestat_set_size(\n /** Input: A file descriptor for the file to adjust. */\n fd: fd,\n /** Input: The desired file size. */\n size: filesize\n): errno;\n\n/** Adjust the timestamps of an open file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_filestat_set_times(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The desired values of the data access timestamp. */\n st_atim: timestamp,\n /** Input: The desired values of the data modification timestamp. */\n st_mtim: timestamp,\n /** Input: A bitmask indicating which timestamps to adjust. */\n fstflags: fstflags\n): errno;\n\n/** Read from a file descriptor, without using and updating the file descriptor's offset. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_pread(\n /** Input: The file descriptor from which to read data. */\n fd: fd,\n /** Input: List of scatter/gather vectors in which to store data. */\n iovs: ptr>,\n /** Input: Length of the list of scatter/gather vectors in which to store data. */\n iovs_len: usize,\n /** Input: The offset within the file at which to read. */\n offset: filesize,\n /** Output: The number of bytes read. */\n nread: ptr\n): errno;\n\n/** Return a description of the given preopened file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_prestat_get(\n /** Input: The file descriptor about which to retrieve information. */\n fd: fd,\n /** Input: The buffer where the description is stored. */\n buf: struct\n): errno;\n\n/** Return a description of the given preopened file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_prestat_dir_name(\n /** Input: The file descriptor about which to retrieve information. */\n fd: fd,\n /** Input: Buffer into which to write the preopened directory name. */\n path: ptr,\n /** Input: Length of the buffer into which to write the preopened directory name. */\n path_len: usize\n): errno;\n\n/** Write to a file descriptor, without using and updating the file descriptor's offset. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_pwrite(\n /** Input: The file descriptor to which to write data. */\n fd: fd,\n /** Input: List of scatter/gather vectors from which to retrieve data. */\n iovs: ptr>,\n /** Input: Length of the list of scatter/gather vectors from which to retrieve data. */\n iovs_len: usize,\n /** Input: The offset within the file at which to write. */\n offset: filesize,\n /** Output: The number of bytes written. */\n nwritten: ptr\n): errno;\n\n/** Read from a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_read(\n /** Input: The file descriptor from which to read data. */\n fd: fd,\n /** Input: List of scatter/gather vectors to which to store data. */\n iovs: ptr>,\n /** Input: Length of the list of scatter/gather vectors to which to store data. */\n iovs_len: usize,\n /** Output: The number of bytes read. */\n nread: ptr\n): errno;\n\n/** Read directory entries from a directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_readdir(\n /** Input: Directory from which to read the directory entries. */\n fd: fd,\n /** Input: Buffer where directory entries are stored. */\n buf: ptr>,\n /** Input: Length of the buffer where directory entries are stored. */\n buf_len: usize,\n /** Input: Location within the directory to start reading. */\n cookie: dircookie,\n /** Output: Number of bytes stored in the read buffer. If less than the size of the read buffer, the end of the directory has been reached. */\n buf_used: ptr\n): errno;\n\n/** Atomically replace a file descriptor by renumbering another file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_renumber(\n /** Input: The file descriptor to renumber. */\n from: fd,\n /** Input: The file descriptor to overwrite. */\n to: fd\n): errno;\n\n/** Move the offset of a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_seek(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The number of bytes to move. */\n offset: filedelta,\n /** Input: The base from which the offset is relative. */\n whence: whence,\n /** Output: The new offset of the file descriptor, relative to the start of the file. */\n newoffset: ptr\n): errno;\n\n/** Synchronize the data and metadata of a file to disk. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_sync(\n /** Input: The file descriptor of the file containing the data and metadata to synchronize to disk. */\n fd: fd\n): errno;\n\n/** Return the current offset of a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_tell(\n /** Input: The file descriptor to inspect. */\n fd: fd,\n /** Output: The current offset of the file descriptor, relative to the start of the file. */\n newoffset: ptr\n): errno;\n\n/** Write to a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_write(\n /** Input: The file descriptor to which to write data. */\n fd: fd,\n /** Input: List of scatter/gather vectors from which to retrieve data. */\n iovs: ptr>,\n /** Input: List of scatter/gather vectors from which to retrieve data. */\n iovs_len: usize,\n /** Output: The number of bytes written. */\n nwritten: ptr\n): errno;\n\n/* Create a directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_create_directory(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path at which to create the directory. */\n path: ptr,\n /** Input: The path at which to create the directory. */\n path_len: usize\n): errno;\n\n/** Return the attributes of a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_filestat_get(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n flags: lookupflags,\n /** Input: The path of the file or directory to inspect. */\n path: ptr,\n /** Input: The path of the file or directory to inspect. */\n path_len: usize,\n /** Input: The buffer where the file's attributes are stored. */\n buf: struct\n): errno;\n\n/** Adjust the timestamps of a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_filestat_set_times(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n flags: lookupflags,\n /** Input: The path of the file or directory to operate on. */\n path: ptr,\n /** Input: The path of the file or directory to operate on. */\n path_len: usize,\n /** Input: The desired values of the data access timestamp. */\n st_atim: timestamp,\n /** Input: The desired values of the data modification timestamp. */\n st_mtim: timestamp,\n /** Input: A bitmask indicating which timestamps to adjust. */\n fstflags: fstflags\n): errno;\n\n/** Create a hard link. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_link(\n /** Input: The working directory at which the resolution of the old path starts. */\n old_fd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n old_flags: lookupflags,\n /** Input: The source path from which to link. */\n old_path: ptr,\n /** Input: The source path from which to link. */\n old_path_len: usize,\n /** Input: The working directory at which the resolution of the new path starts. */\n new_fd: fd,\n /** Input: The destination path at which to create the hard link. */\n new_path: ptr,\n /** Input: The length of the destination path at which to create the hard link. */\n new_path_len: usize\n): errno;\n\n/** Open a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_open(\n /** Input: The working directory at which the resolution of the path starts. */\n dirfd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n dirflags: lookupflags,\n /** Input: The path of the file or directory to open. */\n path: ptr,\n /** Input: The length of the path of the file or directory to open. */\n path_len: usize,\n /** Input: The method by which to open the file. */\n oflags: oflags,\n /** Input: The initial base rights that apply to operations using the file descriptor itself. */\n fs_rights_base: rights,\n /** Input: The initial inheriting rights that apply to file descriptors derived from it. */\n fs_rights_inheriting: rights,\n /** Input: The initial flags of the file descriptor. */\n fs_flags: fdflags,\n /** Output: The file descriptor of the file that has been opened. */\n fd: ptr\n): errno;\n\n/** Read the contents of a symbolic link. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_readlink(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path of the symbolic link from which to read. */\n path: ptr,\n /** Input: The length of the path of the symbolic link from which to read. */\n path_len: usize,\n /** Input: The buffer to which to write the contents of the symbolic link. */\n buf: ptr,\n /** Input: The length of the buffer to which to write the contents of the symbolic link. */\n buf_len: usize,\n /** Output: The number of bytes placed in the buffer. */\n buf_used: ptr\n): errno;\n\n/** Remove a directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_remove_directory(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path to a directory to remove. */\n path: ptr,\n /** Input: The length of the path to a directory to remove. */\n path_len: usize\n): errno;\n\n/** Rename a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_rename(\n /** Input: The working directory at which the resolution of the old path starts. */\n old_fd: fd,\n /** Input: The source path of the file or directory to rename. */\n old_path: ptr,\n /** Input: The length of the source path of the file or directory to rename. */\n old_path_len: usize,\n /** Input: The working directory at which the resolution of the new path starts. */\n new_fd: fd,\n /** Input: The destination path to which to rename the file or directory. */\n new_path: ptr,\n /** Input: The length of the destination path to which to rename the file or directory. */\n new_path_len: usize\n): errno;\n\n/** Create a symbolic link. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_symlink(\n /** Input: The contents of the symbolic link. */\n old_path: ptr,\n /** Input: The length of the contents of the symbolic link. */\n old_path_len: usize,\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The destination path at which to create the symbolic link. */\n new_path: ptr,\n /** Input: The length of the destination path at which to create the symbolic link. */\n new_path_len: usize\n): errno;\n\n/** Unlink a file. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_unlink_file(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path to a file to unlink. */\n path: ptr,\n /** Input: The length of the path to a file to unlink. */\n path_len: usize\n): errno;\n\n/** Concurrently poll for the occurrence of a set of events. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function poll_oneoff(\n /** Input: The events to which to subscribe. */\n in_: ptr>,\n /** Input: The events that have occurred. */\n out: ptr>,\n /** Input: Both the number of subscriptions and events. */\n nsubscriptions: usize,\n /** Output: The number of events stored. */\n nevents: ptr\n): errno;\n\n/** Terminate the process normally. An exit code of 0 indicates successful termination of the program. The meanings of other values is dependent on the environment. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function proc_exit(\n /** Input: The exit code returned by the process. */\n rval: u32\n): void;\n\n/** Send a signal to the process of the calling thread. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function proc_raise(\n /** Input: The signal condition to trigger. */\n sig: signal\n): errno;\n\n/** Write high-quality random data into a buffer. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function random_get(\n /** Input: The buffer to fill with random data. */\n buf: usize,\n /** Input: The length of the buffer to fill with random data. */\n buf_len: usize\n): errno;\n\n/** Temporarily yield execution of the calling thread. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sched_yield(): errno;\n\n/** Receive a message from a socket. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sock_recv(\n /** Input: The socket on which to receive data. */\n sock: fd,\n /** Input: List of scatter/gather vectors to which to store data. */\n ri_data: ptr>,\n /** Input: The length of the list of scatter/gather vectors to which to store data. */\n ri_data_len: usize,\n /** Input: Message flags. */\n ri_flags: riflags,\n /** Output: Number of bytes stored in `ri_data`. */\n ro_datalen: ptr,\n /** Output: Message flags. */\n ro_flags: ptr\n): errno;\n\n/** Send a message on a socket. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sock_send(\n /** Input: The socket on which to send data. */\n sock: fd,\n /** Input: List of scatter/gather vectors to which to retrieve data */\n si_data: ptr>,\n /** Input: The length of the list of scatter/gather vectors to which to retrieve data */\n si_data_len: usize,\n /** Input: Message flags. */\n si_flags: siflags,\n /** Output: Number of bytes transmitted. */\n so_datalen: ptr\n): errno;\n\n/** Shut down socket send and receive channels. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sock_shutdown(\n /** Input: The socket on which to shutdown channels. */\n sock: fd,\n /** Input: Which channels on the socket to shut down. */\n how: sdflags\n): errno;\n\n// === Types ======================================================================================\n\n/** File or memory access pattern advisory information. */\nexport namespace advice {\n /** The application has no advice to give on its behavior with respect to the specified data. */\n // @ts-ignore: decorator\n @inline\n export const NORMAL: advice = 0;\n /** The application expects to access the specified data sequentially from lower offsets to higher offsets. */\n // @ts-ignore: decorator\n @inline\n export const SEQUENTIAL : advice = 1;\n /** The application expects to access the specified data in a random order. */\n // @ts-ignore: decorator\n @inline\n export const RANDOM: advice = 2;\n /** The application expects to access the specified data in the near future. */\n // @ts-ignore: decorator\n @inline\n export const WILLNEED: advice = 3;\n /** The application expects that it will not access the specified data in the near future. */\n // @ts-ignore: decorator\n @inline\n export const DONTNEED: advice = 4;\n /** The application expects to access the specified data once and then not reuse it thereafter. */\n // @ts-ignore: decorator\n @inline\n export const NOREUSE: advice = 5;\n}\nexport type advice = u8;\n\n/** Identifiers for clocks. */\nexport namespace clockid {\n /** The clock measuring real time. Time value zero corresponds with 1970-01-01T00:00:00Z. */\n // @ts-ignore: decorator\n @inline\n export const REALTIME: clockid = 0;\n /** The store-wide monotonic clock. Absolute value has no meaning. */\n // @ts-ignore: decorator\n @inline\n export const MONOTONIC: clockid = 1;\n /** The CPU-time clock associated with the current process. */\n // @ts-ignore: decorator\n @inline\n export const PROCESS_CPUTIME_ID: clockid = 2;\n /** The CPU-time clock associated with the current thread. */\n // @ts-ignore: decorator\n @inline\n export const THREAD_CPUTIME_ID: clockid = 3;\n}\nexport type clockid = u32;\n\n/** Identifier for a device containing a file system. Can be used in combination with `inode` to uniquely identify a file or directory in the filesystem. */\nexport type device = u64;\n\n/** A reference to the offset of a directory entry. The value 0 signifies the start of the directory. */\nexport type dircookie = u64;\n\n/** A directory entry. */\n@unmanaged export class dirent {\n /** The offset of the next directory entry stored in this directory. */\n next: dircookie;\n /** The serial number of the file referred to by this directory entry. */\n ino: inode;\n /** The length of the name of the directory entry. */\n namlen: u32;\n /** The type of the file referred to by this directory entry. */\n type: filetype;\n private __padding0: u16;\n}\n\n/** Error codes returned by functions. */\nexport namespace errno {\n /** No error occurred. System call completed successfully. */\n // @ts-ignore: decorator\n @inline\n export const SUCCESS: errno = 0;\n /** Argument list too long. */\n // @ts-ignore: decorator\n @inline\n export const TOOBIG: errno = 1;\n /** Permission denied. */\n // @ts-ignore: decorator\n @inline\n export const ACCES: errno = 2;\n /** Address in use. */\n // @ts-ignore: decorator\n @inline\n export const ADDRINUSE: errno = 3;\n /** Address not available. */\n // @ts-ignore: decorator\n @inline\n export const ADDRNOTAVAIL: errno = 4;\n /** Address family not supported. */\n // @ts-ignore: decorator\n @inline\n export const AFNOSUPPORT: errno = 5;\n /** Resource unavailable, or operation would block. */\n // @ts-ignore: decorator\n @inline\n export const AGAIN: errno = 6;\n /** Connection already in progress. */\n // @ts-ignore: decorator\n @inline\n export const ALREADY: errno = 7;\n /** Bad file descriptor. */\n // @ts-ignore: decorator\n @inline\n export const BADF: errno = 8;\n /** Bad message. */\n // @ts-ignore: decorator\n @inline\n export const BADMSG: errno = 9;\n /** Device or resource busy. */\n // @ts-ignore: decorator\n @inline\n export const BUSY: errno = 10;\n /** Operation canceled. */\n // @ts-ignore: decorator\n @inline\n export const CANCELED: errno = 11;\n /** No child processes. */\n // @ts-ignore: decorator\n @inline\n export const CHILD: errno = 12;\n /** Connection aborted. */\n // @ts-ignore: decorator\n @inline\n export const CONNABORTED: errno = 13;\n /** Connection refused. */\n // @ts-ignore: decorator\n @inline\n export const CONNREFUSED: errno = 14;\n /** Connection reset. */\n // @ts-ignore: decorator\n @inline\n export const CONNRESET: errno = 15;\n /** Resource deadlock would occur. */\n // @ts-ignore: decorator\n @inline\n export const DEADLK: errno = 16;\n /** Destination address required. */\n // @ts-ignore: decorator\n @inline\n export const DESTADDRREQ: errno = 17;\n /** Mathematics argument out of domain of function. */\n // @ts-ignore: decorator\n @inline\n export const DOM: errno = 18;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const DQUOT: errno = 19;\n /** File exists. */\n // @ts-ignore: decorator\n @inline\n export const EXIST: errno = 20;\n /** Bad address. */\n // @ts-ignore: decorator\n @inline\n export const FAULT: errno = 21;\n /** File too large. */\n // @ts-ignore: decorator\n @inline\n export const FBIG: errno = 22;\n /** Host is unreachable. */\n // @ts-ignore: decorator\n @inline\n export const HOSTUNREACH: errno = 23;\n /** Identifier removed. */\n // @ts-ignore: decorator\n @inline\n export const IDRM: errno = 24;\n /** Illegal byte sequence. */\n // @ts-ignore: decorator\n @inline\n export const ILSEQ: errno = 25;\n /** Operation in progress. */\n // @ts-ignore: decorator\n @inline\n export const INPROGRESS: errno = 26;\n /** Interrupted function. */\n // @ts-ignore: decorator\n @inline\n export const INTR: errno = 27;\n /** Invalid argument. */\n // @ts-ignore: decorator\n @inline\n export const INVAL: errno = 28;\n /** I/O error. */\n // @ts-ignore: decorator\n @inline\n export const IO: errno = 29;\n /** Socket is connected. */\n // @ts-ignore: decorator\n @inline\n export const ISCONN: errno = 30;\n /** Is a directory. */\n // @ts-ignore: decorator\n @inline\n export const ISDIR: errno = 31;\n /** Too many levels of symbolic links. */\n // @ts-ignore: decorator\n @inline\n export const LOOP: errno = 32;\n /** File descriptor value too large. */\n // @ts-ignore: decorator\n @inline\n export const MFILE: errno = 33;\n /** Too many links. */\n // @ts-ignore: decorator\n @inline\n export const MLINK: errno = 34;\n /** Message too large. */\n // @ts-ignore: decorator\n @inline\n export const MSGSIZE: errno = 35;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const MULTIHOP: errno = 36;\n /** Filename too long. */\n // @ts-ignore: decorator\n @inline\n export const NAMETOOLONG: errno = 37;\n /** Network is down. */\n // @ts-ignore: decorator\n @inline\n export const NETDOWN: errno = 38;\n /** Connection aborted by network. */\n // @ts-ignore: decorator\n @inline\n export const NETRESET: errno = 39;\n /** Network unreachable. */\n // @ts-ignore: decorator\n @inline\n export const NETUNREACH: errno = 40;\n /** Too many files open in system. */\n // @ts-ignore: decorator\n @inline\n export const NFILE: errno = 41;\n /** No buffer space available. */\n // @ts-ignore: decorator\n @inline\n export const NOBUFS: errno = 42;\n /** No such device. */\n // @ts-ignore: decorator\n @inline\n export const NODEV: errno = 43;\n /** No such file or directory. */\n // @ts-ignore: decorator\n @inline\n export const NOENT: errno = 44;\n /** Executable file format error. */\n // @ts-ignore: decorator\n @inline\n export const NOEXEC: errno = 45;\n /** No locks available. */\n // @ts-ignore: decorator\n @inline\n export const NOLCK: errno = 46;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const NOLINK: errno = 47;\n /** Not enough space. */\n // @ts-ignore: decorator\n @inline\n export const NOMEM: errno = 48;\n /** No message of the desired type. */\n // @ts-ignore: decorator\n @inline\n export const NOMSG: errno = 49;\n /** Protocol not available. */\n // @ts-ignore: decorator\n @inline\n export const NOPROTOOPT: errno = 50;\n /** No space left on device. */\n // @ts-ignore: decorator\n @inline\n export const NOSPC: errno = 51;\n /** Function not supported. */\n // @ts-ignore: decorator\n @inline\n export const NOSYS: errno = 52;\n /** The socket is not connected. */\n // @ts-ignore: decorator\n @inline\n export const NOTCONN: errno = 53;\n /** Not a directory or a symbolic link to a directory. */\n // @ts-ignore: decorator\n @inline\n export const NOTDIR: errno = 54;\n /** Directory not empty. */\n // @ts-ignore: decorator\n @inline\n export const NOTEMPTY: errno = 55;\n /** State not recoverable. */\n // @ts-ignore: decorator\n @inline\n export const NOTRECOVERABLE: errno = 56;\n /** Not a socket. */\n // @ts-ignore: decorator\n @inline\n export const NOTSOCK: errno = 57;\n /** Not supported, or operation not supported on socket. */\n // @ts-ignore: decorator\n @inline\n export const NOTSUP: errno = 58;\n /** Inappropriate I/O control operation. */\n // @ts-ignore: decorator\n @inline\n export const NOTTY: errno = 59;\n /** No such device or address. */\n // @ts-ignore: decorator\n @inline\n export const NXIO: errno = 60;\n /** Value too large to be stored in data type. */\n // @ts-ignore: decorator\n @inline\n export const OVERFLOW: errno = 61;\n /** Previous owner died. */\n // @ts-ignore: decorator\n @inline\n export const OWNERDEAD: errno = 62;\n /** Operation not permitted. */\n // @ts-ignore: decorator\n @inline\n export const PERM: errno = 63;\n /** Broken pipe. */\n // @ts-ignore: decorator\n @inline\n export const PIPE: errno = 64;\n /** Protocol error. */\n // @ts-ignore: decorator\n @inline\n export const PROTO: errno = 65;\n /** Protocol not supported. */\n // @ts-ignore: decorator\n @inline\n export const PROTONOSUPPORT: errno = 66;\n /** Protocol wrong type for socket. */\n // @ts-ignore: decorator\n @inline\n export const PROTOTYPE: errno = 67;\n /** Result too large. */\n // @ts-ignore: decorator\n @inline\n export const RANGE: errno = 68;\n /** Read-only file system. */\n // @ts-ignore: decorator\n @inline\n export const ROFS: errno = 69;\n /** Invalid seek. */\n // @ts-ignore: decorator\n @inline\n export const SPIPE: errno = 70;\n /** No such process. */\n // @ts-ignore: decorator\n @inline\n export const SRCH: errno = 71;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const STALE: errno = 72;\n /** Connection timed out. */\n // @ts-ignore: decorator\n @inline\n export const TIMEDOUT: errno = 73;\n /** Text file busy. */\n // @ts-ignore: decorator\n @inline\n export const TXTBSY: errno = 74;\n /** Cross-device link. */\n // @ts-ignore: decorator\n @inline\n export const XDEV: errno = 75;\n /** Extension: Capabilities insufficient. */\n // @ts-ignore: decorator\n @inline\n export const NOTCAPABLE: errno = 76;\n}\nexport type errno = u16;\n\n/** Translates an error code to a string. */\nexport function errnoToString(err: errno): string {\n switch (err) {\n case errno.SUCCESS: return \"SUCCESS\";\n case errno.TOOBIG: return \"TOOBIG\";\n case errno.ACCES: return \"ACCES\";\n case errno.ADDRINUSE: return \"ADDRINUSE\";\n case errno.ADDRNOTAVAIL: return \"ADDRNOTAVAIL\";\n case errno.AFNOSUPPORT: return \"AFNOSUPPORT\";\n case errno.AGAIN: return \"AGAIN\";\n case errno.ALREADY: return \"ALREADY\";\n case errno.BADF: return \"BADF\";\n case errno.BADMSG: return \"BADMSG\";\n case errno.BUSY: return \"BUSY\";\n case errno.CANCELED: return \"CANCELED\";\n case errno.CHILD: return \"CHILD\";\n case errno.CONNABORTED: return \"CONNABORTED\";\n case errno.CONNREFUSED: return \"CONNREFUSED\";\n case errno.CONNRESET: return \"CONNRESET\";\n case errno.DEADLK: return \"DEADLK\";\n case errno.DESTADDRREQ: return \"DESTADDRREQ\";\n case errno.DOM: return \"DOM\";\n case errno.DQUOT: return \"DQUOT\";\n case errno.EXIST: return \"EXIST\";\n case errno.FAULT: return \"FAULT\";\n case errno.FBIG: return \"FBIG\";\n case errno.HOSTUNREACH: return \"HOSTUNREACH\";\n case errno.IDRM: return \"IDRM\";\n case errno.ILSEQ: return \"ILSEQ\";\n case errno.INPROGRESS: return \"INPROGRESS\";\n case errno.INTR: return \"INTR\";\n case errno.INVAL: return \"INVAL\";\n case errno.IO: return \"IO\";\n case errno.ISCONN: return \"ISCONN\";\n case errno.ISDIR: return \"ISDIR\";\n case errno.LOOP: return \"LOOP\";\n case errno.MFILE: return \"MFILE\";\n case errno.MLINK: return \"MLINK\";\n case errno.MSGSIZE: return \"MSGSIZE\";\n case errno.MULTIHOP: return \"MULTIHOP\";\n case errno.NAMETOOLONG: return \"NAMETOOLONG\";\n case errno.NETDOWN: return \"NETDOWN\";\n case errno.NETRESET: return \"NETRESET\";\n case errno.NETUNREACH: return \"NETUNREACH\";\n case errno.NFILE: return \"NFILE\";\n case errno.NOBUFS: return \"NOBUFS\";\n case errno.NODEV: return \"NODEV\";\n case errno.NOENT: return \"NOENT\";\n case errno.NOEXEC: return \"NOEXEC\";\n case errno.NOLCK: return \"NOLCK\";\n case errno.NOLINK: return \"NOLINK\";\n case errno.NOMEM: return \"NOMEM\";\n case errno.NOMSG: return \"NOMSG\";\n case errno.NOPROTOOPT: return \"NOPROTOOPT\";\n case errno.NOSPC: return \"NOSPC\";\n case errno.NOSYS: return \"NOSYS\";\n case errno.NOTCONN: return \"NOTCONN\";\n case errno.NOTDIR: return \"NOTDIR\";\n case errno.NOTEMPTY: return \"NOTEMPTY\";\n case errno.NOTRECOVERABLE: return \"NOTRECOVERABLE\";\n case errno.NOTSOCK: return \"NOTSOCK\";\n case errno.NOTSUP: return \"NOTSUP\";\n case errno.NOTTY: return \"NOTTY\";\n case errno.NXIO: return \"NXIO\";\n case errno.OVERFLOW: return \"OVERFLOW\";\n case errno.OWNERDEAD: return \"OWNERDEAD\";\n case errno.PERM: return \"PERM\";\n case errno.PIPE: return \"PIPE\";\n case errno.PROTO: return \"PROTO\";\n case errno.PROTONOSUPPORT: return \"PROTONOSUPPORT\";\n case errno.PROTOTYPE: return \"PROTOTYPE\";\n case errno.RANGE: return \"RANGE\";\n case errno.ROFS: return \"ROFS\";\n case errno.SPIPE: return \"SPIPE\";\n case errno.SRCH: return \"SRCH\";\n case errno.STALE: return \"STALE\";\n case errno.TIMEDOUT: return \"TIMEDOUT\";\n case errno.TXTBSY: return \"TXTBSY\";\n case errno.XDEV: return \"XDEV\";\n case errno.NOTCAPABLE: return \"NOTCAPABLE\";\n }\n return \"UNKNOWN\";\n}\n\n@unmanaged abstract class $event { // size=16/32\n /** User-provided value that got attached to `subscription#userdata`. */\n userdata: userdata;\n /** If non-zero, an error that occurred while processing the subscription request. */\n error: errno;\n /** The type of the event that occurred. */\n type: eventtype;\n\n private __padding0: u16;\n}\n\n/** An event that occurred. */\n@unmanaged export abstract class event extends $event {\n private __padding1: u64;\n private __padding2: u64;\n}\n\n/** An event that occurred when type is `eventtype.FD_READ` or `eventtype.FD_WRITE`. */\n@unmanaged export class event_fd_readwrite extends $event {\n /* The number of bytes available for reading or writing. */\n nbytes: filesize;\n /* The state of the file descriptor. */\n flags: eventrwflags;\n\n private __padding1: u32;\n}\n\n/** The state of the file descriptor subscribed to with `eventtype.FD_READ` or `eventtype.FD_WRITE`. */\nexport namespace eventrwflags {\n /** The peer of this socket has closed or disconnected. */\n // @ts-ignore: decorator\n @inline\n export const HANGUP: eventrwflags = 1;\n}\nexport type eventrwflags = u16;\n\n/** Type of a subscription to an event or its occurrence. */\nexport namespace eventtype {\n /** The time value of clock has reached the timestamp. */\n // @ts-ignore: decorator\n @inline\n export const CLOCK: eventtype = 0;\n /** File descriptor has data available for reading. */\n // @ts-ignore: decorator\n @inline\n export const FD_READ: eventtype = 1;\n /** File descriptor has capacity available for writing */\n // @ts-ignore: decorator\n @inline\n export const FD_WRITE: eventtype = 2;\n}\nexport type eventtype = u8;\n\n/** Exit code generated by a process when exiting. */\nexport type exitcode = u32;\n\n/** A file descriptor number. */\nexport type fd = u32;\n\n/** File descriptor flags. */\nexport namespace fdflags {\n /** Append mode: Data written to the file is always appended to the file's end. */\n // @ts-ignore: decorator\n @inline\n export const APPEND: fdflags = 1;\n /** Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized. */\n // @ts-ignore: decorator\n @inline\n export const DSYNC: fdflags = 2;\n /** Non-blocking mode. */\n // @ts-ignore: decorator\n @inline\n export const NONBLOCK: fdflags = 4;\n /** Synchronized read I/O operations. */\n // @ts-ignore: decorator\n @inline\n export const RSYNC: fdflags = 8;\n /** Write according to synchronized I/O file integrity completion. */\n // @ts-ignore: decorator\n @inline\n export const SYNC: fdflags = 16;\n}\nexport type fdflags = u16;\n\n/** File descriptor attributes. */\n@unmanaged export class fdstat {\n /** File type. */\n filetype: filetype;\n /** File descriptor flags. */\n flags: fdflags;\n /** Rights that apply to this file descriptor. */\n rights_base: rights;\n /** Maximum set of rights that may be installed on new file descriptors that are created through this file descriptor, e.g., through `path_open`. */\n rights_inheriting: rights;\n}\n\n/** Relative offset within a file. */\nexport type filedelta = i64;\n\n/** Non-negative file size or length of a region within a file. */\nexport type filesize = u64;\n\n/** File attributes. */\n@unmanaged export class filestat {\n /** Device ID of device containing the file. */\n dev: device;\n /** File serial number. */\n ino: inode;\n /** File type. */\n filetype: filetype;\n /** Number of hard links to the file. */\n nlink: linkcount;\n /** For regular files, the file size in bytes. For symbolic links, the length in bytes of the pathname contained in the symbolic link. */\n size: filesize;\n /** Last data access timestamp. */\n atim: timestamp;\n /** Last data modification timestamp. */\n mtim: timestamp;\n /** Last file status change timestamp. */\n ctim: timestamp;\n}\n\n/** The type of a file descriptor or file. */\nexport namespace filetype {\n /** The type of the file descriptor or file is unknown or is different from any of the other types specified. */\n // @ts-ignore: decorator\n @inline\n export const UNKNOWN: filetype = 0;\n /** The file descriptor or file refers to a block device inode. */\n // @ts-ignore: decorator\n @inline\n export const BLOCK_DEVICE: filetype = 1;\n /** The file descriptor or file refers to a character device inode. */\n // @ts-ignore: decorator\n @inline\n export const CHARACTER_DEVICE: filetype = 2;\n /** The file descriptor or file refers to a directory inode. */\n // @ts-ignore: decorator\n @inline\n export const DIRECTORY: filetype = 3;\n /** The file descriptor or file refers to a regular file inode. */\n // @ts-ignore: decorator\n @inline\n export const REGULAR_FILE: filetype = 4;\n /** The file descriptor or file refers to a datagram socket. */\n // @ts-ignore: decorator\n @inline\n export const SOCKET_DGRAM: filetype = 5;\n /** The file descriptor or file refers to a byte-stream socket. */\n // @ts-ignore: decorator\n @inline\n export const SOCKET_STREAM: filetype = 6;\n /** The file refers to a symbolic link inode. */\n // @ts-ignore: decorator\n @inline\n export const SYMBOLIC_LINK: filetype = 7;\n}\nexport type filetype = u8;\n\n/** Which file time attributes to adjust. */\nexport namespace fstflags {\n /** Adjust the last data access timestamp to the value stored in `filestat#st_atim`. */\n // @ts-ignore: decorator\n @inline\n export const SET_ATIM: fstflags = 1;\n /** Adjust the last data access timestamp to the time of clock `clockid.REALTIME`. */\n // @ts-ignore: decorator\n @inline\n export const SET_ATIM_NOW: fstflags = 2;\n /** Adjust the last data modification timestamp to the value stored in `filestat#st_mtim`. */\n // @ts-ignore: decorator\n @inline\n export const SET_MTIM: fstflags = 4;\n /** Adjust the last data modification timestamp to the time of clock `clockid.REALTIME`. */\n // @ts-ignore: decorator\n @inline\n export const SET_MTIM_NOW: fstflags = 8;\n}\nexport type fstflags = u16;\n\n/** File serial number that is unique within its file system. */\nexport type inode = u64;\n\n/** A region of memory for scatter/gather reads. */\n@unmanaged export class iovec {\n /** The address of the buffer to be filled. */\n buf: usize;\n /** The length of the buffer to be filled. */\n buf_len: usize;\n}\n\n/** Number of hard links to an inode. */\nexport type linkcount = u64;\n\n/** Flags determining the method of how paths are resolved. */\nexport namespace lookupflags {\n /** As long as the resolved path corresponds to a symbolic link, it is expanded. */\n // @ts-ignore: decorator\n @inline\n export const SYMLINK_FOLLOW: lookupflags = 1;\n}\nexport type lookupflags = u32;\n\n/** Open flags. */\nexport namespace oflags {\n /** Create file if it does not exist. */\n // @ts-ignore: decorator\n @inline\n export const CREAT: oflags = 1;\n /** Fail if not a directory. */\n // @ts-ignore: decorator\n @inline\n export const DIRECTORY: oflags = 2;\n /** Fail if file already exists. */\n // @ts-ignore: decorator\n @inline\n export const EXCL: oflags = 4;\n /** Truncate file to size 0. */\n // @ts-ignore: decorator\n @inline\n export const TRUNC: oflags = 8;\n}\nexport type oflags = u16;\n\n/** Identifiers for preopened capabilities. */\nexport namespace preopentype {\n /** A pre-opened directory. */\n // @ts-ignore: decorator\n @inline\n export const DIR: preopentype = 0;\n}\nexport type preopentype = u8;\n\n@unmanaged abstract class $prestat { // WASM32: size=1/8, WASM64: size=1/16\n /* The type of the pre-opened capability. */\n type: preopentype;\n}\n\n/* Information about a pre-opened capability. */\n@unmanaged export abstract class prestat extends $prestat {\n private __padding0: usize;\n}\n\n/** The contents of a $prestat when type is `preopentype.DIR`. */\n@unmanaged export class prestat_dir extends $prestat {\n /** The length of the directory name for use with `fd_prestat_dir_name`. */\n name_len: usize;\n}\n\n/** Flags provided to `sock_recv`. */\nexport namespace riflags {\n /** Returns the message without removing it from the socket's receive queue. */\n // @ts-ignore: decorator\n @inline\n export const PEEK: riflags = 1;\n /** On byte-stream sockets, block until the full amount of data can be returned. */\n // @ts-ignore: decorator\n @inline\n export const WAITALL: riflags = 2;\n}\nexport type riflags = u16;\n\n/** File descriptor rights, determining which actions may be performed. */\nexport namespace rights {\n /** The right to invoke `fd_datasync`. */\n // @ts-ignore: decorator\n @inline\n export const FD_DATASYNC: rights = 1;\n /** The right to invoke `fd_read` and `sock_recv`. */\n // @ts-ignore: decorator\n @inline\n export const FD_READ: rights = 2;\n /** The right to invoke `fd_seek`. This flag implies `rights.FD_TELL`. */\n // @ts-ignore: decorator\n @inline\n export const FD_SEEK: rights = 4;\n /** The right to invoke `fd_fdstat_set_flags`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FDSTAT_SET_FLAGS: rights = 8;\n /** The right to invoke `fd_sync`. */\n // @ts-ignore: decorator\n @inline\n export const FD_SYNC: rights = 16;\n /** The right to invoke `fd_seek` in such a way that the file offset remains unaltered (i.e., `whence.CUR` with offset zero), or to invoke `fd_tell`). */\n // @ts-ignore: decorator\n @inline\n export const FD_TELL: rights = 32;\n /** The right to invoke `fd_write` and `sock_send`. If `rights.FD_SEEK` is set, includes the right to invoke `fd_pwrite`. */\n // @ts-ignore: decorator\n @inline\n export const FD_WRITE: rights = 64;\n /** The right to invoke `fd_advise`. */\n // @ts-ignore: decorator\n @inline\n export const FD_ADVISE: rights = 128;\n /** The right to invoke `fd_allocate`. */\n // @ts-ignore: decorator\n @inline\n export const FD_ALLOCATE: rights = 256;\n /** The right to invoke `path_create_directory`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_CREATE_DIRECTORY: rights = 512;\n /** If `rights.PATH_OPEN` is set, the right to invoke `path_open` with `oflags.CREAT`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_CREATE_FILE: rights = 1024;\n /** The right to invoke `path_link` with the file descriptor as the source directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_LINK_SOURCE: rights = 2048;\n /** The right to invoke `path_link` with the file descriptor as the target directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_LINK_TARGET: rights = 4096;\n /** The right to invoke `path_open`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_OPEN: rights = 8192;\n /** The right to invoke `fd_readdir`. */\n // @ts-ignore: decorator\n @inline\n export const FD_READDIR: rights = 16384;\n /** The right to invoke `path_readlink`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_READLINK: rights = 32768;\n /** The right to invoke `path_rename` with the file descriptor as the source directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_RENAME_SOURCE: rights = 65536;\n /** The right to invoke `path_rename` with the file descriptor as the target directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_RENAME_TARGET: rights = 131072;\n /** The right to invoke `path_filestat_get`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_FILESTAT_GET: rights = 262144;\n /** The right to change a file's size (there is no `path_filestat_set_size`). If `rights.PATH_OPEN` is set, includes the right to invoke `path_open` with `oflags.TRUNC`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_FILESTAT_SET_SIZE: rights = 524288;\n /** The right to invoke `path_filestat_set_times`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_FILESTAT_SET_TIMES: rights = 1048576;\n /** The right to invoke `fd_filestat_get`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FILESTAT_GET: rights = 2097152;\n /** The right to invoke `fd_filestat_set_size`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FILESTAT_SET_SIZE: rights = 4194304;\n /** The right to invoke `fd_filestat_set_times`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FILESTAT_SET_TIMES: rights = 8388608;\n /** The right to invoke `path_symlink`. */\n // @ts-ignore: decorator\n @inline\n export const RIGHT_PATH_SYMLINK: rights = 16777216;\n /** The right to invoke `path_remove_directory`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_REMOVE_DIRECTORY: rights = 33554432;\n /** The right to invoke `path_unlink_file`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_UNLINK_FILE: rights = 67108864;\n /** If `rights.FD_READ` is set, includes the right to invoke `poll_oneoff` to subscribe to `eventtype.FD_READ`. If `rights.FD_WRITE` is set, includes the right to invoke `poll_oneoff` to subscribe to `eventtype.FD_WRITE`. */\n // @ts-ignore: decorator\n @inline\n export const POLL_FD_READWRITE: rights = 134217728;\n /** The right to invoke `sock_shutdown`. */\n // @ts-ignore: decorator\n @inline\n export const SOCK_SHUTDOWN: rights = 268435456;\n}\nexport type rights = u64;\n\n/** Flags returned by `sock_recv`. */\nexport namespace roflags {\n /** Message data has been truncated. */\n // @ts-ignore: decorator\n @inline\n export const DATA_TRUNCATED: roflags = 1;\n}\nexport type roflags = u16;\n\n/** Which channels on a socket to shut down. */\nexport namespace sdflags {\n /** Disables further receive operations. */\n // @ts-ignore: decorator\n @inline\n export const RD: sdflags = 1;\n /** Disables further send operations. */\n // @ts-ignore: decorator\n @inline\n export const WR: sdflags = 2;\n}\nexport type sdflags = u8;\n\n/** Flags provided to `sock_send`. */\nexport namespace siflags {\n // As there are currently no flags defined, it must be set to zero.\n}\nexport type siflags = u16;\n\n/** Signal condition. */\nexport namespace signal {\n /** Hangup. */\n // @ts-ignore: decorator\n @inline\n export const HUP: signal = 1;\n /** Terminate interrupt signal. */\n // @ts-ignore: decorator\n @inline\n export const INT: signal = 2;\n /** Terminal quit signal. */\n // @ts-ignore: decorator\n @inline\n export const QUIT: signal = 3;\n /** Illegal instruction. */\n // @ts-ignore: decorator\n @inline\n export const ILL: signal = 4;\n /** Trace/breakpoint trap. */\n // @ts-ignore: decorator\n @inline\n export const TRAP: signal = 5;\n /** Process abort signal. */\n // @ts-ignore: decorator\n @inline\n export const ABRT: signal = 6;\n /** Access to an undefined portion of a memory object. */\n // @ts-ignore: decorator\n @inline\n export const BUS: signal = 7;\n /** Erroneous arithmetic operation. */\n // @ts-ignore: decorator\n @inline\n export const FPE: signal = 8;\n /** Kill. */\n // @ts-ignore: decorator\n @inline\n export const KILL: signal = 9;\n /** User-defined signal 1. */\n // @ts-ignore: decorator\n @inline\n export const USR1: signal = 10;\n /** Invalid memory reference. */\n // @ts-ignore: decorator\n @inline\n export const SEGV: signal = 11;\n /** User-defined signal 2. */\n // @ts-ignore: decorator\n @inline\n export const USR2: signal = 12;\n /** Write on a pipe with no one to read it. */\n // @ts-ignore: decorator\n @inline\n export const PIPE: signal = 13;\n /** Alarm clock. */\n // @ts-ignore: decorator\n @inline\n export const ALRM: signal = 14;\n /** Termination signal. */\n // @ts-ignore: decorator\n @inline\n export const TERM: signal = 15;\n /** Child process terminated, stopped, or continued. */\n // @ts-ignore: decorator\n @inline\n export const CHLD: signal = 16;\n /** Continue executing, if stopped. */\n // @ts-ignore: decorator\n @inline\n export const CONT: signal = 17;\n /** Stop executing. */\n // @ts-ignore: decorator\n @inline\n export const STOP: signal = 18;\n /** Terminal stop signal. */\n // @ts-ignore: decorator\n @inline\n export const TSTP: signal = 19;\n /** Background process attempting read. */\n // @ts-ignore: decorator\n @inline\n export const TTIN: signal = 20;\n /** Background process attempting write. */\n // @ts-ignore: decorator\n @inline\n export const TTOU: signal = 21;\n /** High bandwidth data is available at a socket. */\n // @ts-ignore: decorator\n @inline\n export const URG: signal = 22;\n /** CPU time limit exceeded. */\n // @ts-ignore: decorator\n @inline\n export const XCPU: signal = 23;\n /** File size limit exceeded. */\n // @ts-ignore: decorator\n @inline\n export const XFSZ: signal = 24;\n /** Virtual timer expired. */\n // @ts-ignore: decorator\n @inline\n export const VTALRM: signal = 25;\n // @ts-ignore: decorator\n @inline\n export const PROF: signal = 26;\n // @ts-ignore: decorator\n @inline\n export const WINCH: signal = 27;\n // @ts-ignore: decorator\n @inline\n export const POLL: signal = 28;\n // @ts-ignore: decorator\n @inline\n export const PWR: signal = 29;\n /** Bad system call. */\n // @ts-ignore: decorator\n @inline\n export const SYS: signal = 30;\n}\nexport type signal = u8;\n\n/** Flags determining how to interpret the timestamp provided in `subscription_t::u.clock.timeout. */\nexport namespace subclockflags {\n /** If set, treat the timestamp provided in `clocksubscription` as an absolute timestamp. */\n // @ts-ignore: decorator\n @inline\n export const ABSTIME: subclockflags = 1;\n}\nexport type subclockflags = u16;\n\n@unmanaged abstract class $subscription { // size=16/48\n /** User-provided value that is attached to the subscription. */\n userdata: userdata;\n /** The type of the event to which to subscribe. */\n type: eventtype;\n\n private __padding0: u32;\n}\n\n/** Subscription to an event. */\n@unmanaged export abstract class subscription extends $subscription {\n private __padding1: u64;\n private __padding2: u64;\n private __padding3: u64;\n private __padding4: u64;\n}\n\n/* Subscription to an event of type `eventtype.CLOCK`.**/\n@unmanaged export class subscription_clock extends $subscription {\n /** The clock against which to compare the timestamp. */\n clock_id: clockid;\n /** The absolute or relative timestamp. */\n timeout: timestamp;\n /** The amount of time that the implementation may wait additionally to coalesce with other events. */\n precision: timestamp;\n /** Flags specifying whether the timeout is absolute or relative. */\n flags: subclockflags;\n\n private __padding1: u32;\n}\n\n/* Subscription to an event of type `eventtype.FD_READ` or `eventtype.FD_WRITE`.**/\n@unmanaged export class subscription_fd_readwrite extends $subscription {\n /** The file descriptor on which to wait for it to become ready for reading or writing. */\n file_descriptor: fd;\n\n private __padding1: u64;\n private __padding2: u64;\n private __padding3: u64;\n}\n\n/** Timestamp in nanoseconds. */\nexport type timestamp = u64;\n\n/** User-provided value that may be attached to objects that is retained when extracted from the implementation. */\nexport type userdata = u64;\n\n/** The position relative to which to set the offset of the file descriptor. */\nexport namespace whence {\n /** Seek relative to start-of-file. */\n // @ts-ignore: decorator\n @inline\n export const SET: whence = 0;\n /** Seek relative to current position. */\n // @ts-ignore: decorator\n @inline\n export const CUR: whence = 1;\n /** Seek relative to end-of-file. */\n // @ts-ignore: decorator\n @inline\n export const END: whence = 2;\n}\n\nexport type whence = u8;\n", + "bindings/wasi_unstable": "// Phase: wasi_unstable / wasi_snapshot_preview0\n// See: https://github.com/WebAssembly/WASI/tree/main/phases/old/snapshot_0/witx\n\n// helper types to be more explicit\ntype char = u8;\ntype ptr = usize; // all pointers are usize'd\ntype struct = T; // structs are references already in AS\n\n/** Read command-line argument data. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function args_get(\n /** Input: Pointer to a buffer to write the argument pointers. */\n argv: ptr>,\n /** Input: Pointer to a buffer to write the argument string data. */\n argv_buf: ptr\n): errno;\n\n/** Return command-line argument data sizes. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function args_sizes_get(\n /** Output: Number of arguments. */\n argc: ptr,\n /** Output: Size of the argument string data. */\n argv_buf_size: ptr\n): errno;\n\n/** Return the resolution of a clock. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function clock_res_get(\n /** Input: The clock for which to return the resolution. */\n clock: clockid,\n /** Output: The resolution of the clock. */\n resolution: ptr\n): errno;\n\n/** Return the time value of a clock. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function clock_time_get(\n /** Input: Cock for which to return the time. */\n clock: clockid,\n /** Input: Maximum lag (exclusive) that the returned time value may have, compared to its actual value. */\n precision: timestamp,\n /** Output: Time value of the clock. */\n time: ptr\n): errno;\n\n/** Read environment variable data. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function environ_get(\n /** Input: Pointer to a buffer to write the environment variable pointers. */\n environ: ptr,\n /** Input: Pointer to a buffer to write the environment variable string data. */\n environ_buf: usize\n): errno;\n\n/** Return command-line argument data sizes. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function environ_sizes_get(\n /** Output: The number of environment variables. */\n environ_count: ptr,\n /** Output: The size of the environment variable string data. */\n environ_buf_size: ptr\n): errno;\n\n/** Provide file advisory information on a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_advise(\n /** Input: The file descriptor for the file for which to provide file advisory information. */\n fd: fd,\n /** Input: The offset within the file to which the advisory applies. */\n offset: filesize,\n /** Input: The length of the region to which the advisory applies. */\n len: filesize,\n /** Input: The advice. */\n advice: advice\n): errno;\n\n/** Provide file advisory information on a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_allocate(\n /** Input: The file descriptor for the file in which to allocate space. */\n fd: fd,\n /** Input: The offset at which to start the allocation. */\n offset: filesize,\n /** Input: The length of the area that is allocated. */\n len: filesize\n): errno;\n\n/** Close a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_close(\n /** Input: The file descriptor to close. */\n fd: fd\n): errno;\n\n/** Synchronize the data of a file to disk. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_datasync(\n /** Input: The file descriptor of the file to synchronize to disk. */\n fd: fd\n): errno;\n\n/** Get the attributes of a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_fdstat_get(\n /** Input: The file descriptor to inspect. */\n fd: fd,\n /** Input: The buffer where the file descriptor's attributes are stored. */\n buf: struct\n): errno;\n\n/** Adjust the flags associated with a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_fdstat_set_flags(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The desired values of the file descriptor flags. */\n flags: fdflags\n): errno;\n\n/** Adjust the rights associated with a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_fdstat_set_rights(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The desired rights of the file descriptor. */\n fs_rights_base: rights,\n /** Input: The desired rights of the file descriptor. */\n fs_rights_inheriting: rights\n): errno;\n\n/** Return the attributes of an open file. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_filestat_get(\n /** Input: The file descriptor to inspect. */\n fd: fd,\n /** Input: The buffer where the file's attributes are stored. */\n buf: struct\n): errno;\n\n/** Adjust the size of an open file. If this increases the file's size, the extra bytes are filled with zeros. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_filestat_set_size(\n /** Input: A file descriptor for the file to adjust. */\n fd: fd,\n /** Input: The desired file size. */\n size: filesize\n): errno;\n\n/** Adjust the timestamps of an open file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_filestat_set_times(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The desired values of the data access timestamp. */\n st_atim: timestamp,\n /** Input: The desired values of the data modification timestamp. */\n st_mtim: timestamp,\n /** Input: A bitmask indicating which timestamps to adjust. */\n fstflags: fstflags\n): errno;\n\n/** Read from a file descriptor, without using and updating the file descriptor's offset. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_pread(\n /** Input: The file descriptor from which to read data. */\n fd: fd,\n /** Input: List of scatter/gather vectors in which to store data. */\n iovs: ptr>,\n /** Input: Length of the list of scatter/gather vectors in which to store data. */\n iovs_len: usize,\n /** Input: The offset within the file at which to read. */\n offset: filesize,\n /** Output: The number of bytes read. */\n nread: ptr\n): errno;\n\n/** Return a description of the given preopened file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_prestat_get(\n /** Input: The file descriptor about which to retrieve information. */\n fd: fd,\n /** Input: The buffer where the description is stored. */\n buf: struct\n): errno;\n\n/** Return a description of the given preopened file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_prestat_dir_name(\n /** Input: The file descriptor about which to retrieve information. */\n fd: fd,\n /** Input: Buffer into which to write the preopened directory name. */\n path: ptr,\n /** Input: Length of the buffer into which to write the preopened directory name. */\n path_len: usize\n): errno;\n\n/** Write to a file descriptor, without using and updating the file descriptor's offset. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_pwrite(\n /** Input: The file descriptor to which to write data. */\n fd: fd,\n /** Input: List of scatter/gather vectors from which to retrieve data. */\n iovs: ptr>,\n /** Input: Length of the list of scatter/gather vectors from which to retrieve data. */\n iovs_len: usize,\n /** Input: The offset within the file at which to write. */\n offset: filesize,\n /** Output: The number of bytes written. */\n nwritten: ptr\n): errno;\n\n/** Read from a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_read(\n /** Input: The file descriptor from which to read data. */\n fd: fd,\n /** Input: List of scatter/gather vectors to which to store data. */\n iovs: ptr>,\n /** Input: Length of the list of scatter/gather vectors to which to store data. */\n iovs_len: usize,\n /** Output: The number of bytes read. */\n nread: ptr\n): errno;\n\n/** Read directory entries from a directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_readdir(\n /** Input: Directory from which to read the directory entries. */\n fd: fd,\n /** Input: Buffer where directory entries are stored. */\n buf: ptr>,\n /** Input: Length of the buffer where directory entries are stored. */\n buf_len: usize,\n /** Input: Location within the directory to start reading. */\n cookie: dircookie,\n /** Output: Number of bytes stored in the read buffer. If less than the size of the read buffer, the end of the directory has been reached. */\n buf_used: ptr\n): errno;\n\n/** Atomically replace a file descriptor by renumbering another file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_renumber(\n /** Input: The file descriptor to renumber. */\n from: fd,\n /** Input: The file descriptor to overwrite. */\n to: fd\n): errno;\n\n/** Move the offset of a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_seek(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The number of bytes to move. */\n offset: filedelta,\n /** Input: The base from which the offset is relative. */\n whence: whence,\n /** Output: The new offset of the file descriptor, relative to the start of the file. */\n newoffset: ptr\n): errno;\n\n/** Synchronize the data and metadata of a file to disk. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_sync(\n /** Input: The file descriptor of the file containing the data and metadata to synchronize to disk. */\n fd: fd\n): errno;\n\n/** Return the current offset of a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_tell(\n /** Input: The file descriptor to inspect. */\n fd: fd,\n /** Output: The current offset of the file descriptor, relative to the start of the file. */\n newoffset: ptr\n): errno;\n\n/** Write to a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_write(\n /** Input: The file descriptor to which to write data. */\n fd: fd,\n /** Input: List of scatter/gather vectors from which to retrieve data. */\n iovs: ptr>,\n /** Input: List of scatter/gather vectors from which to retrieve data. */\n iovs_len: usize,\n /** Output: The number of bytes written. */\n nwritten: ptr\n): errno;\n\n/* Create a directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_create_directory(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path at which to create the directory. */\n path: ptr,\n /** Input: The path at which to create the directory. */\n path_len: usize\n): errno;\n\n/** Return the attributes of a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_filestat_get(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n flags: lookupflags,\n /** Input: The path of the file or directory to inspect. */\n path: ptr,\n /** Input: The path of the file or directory to inspect. */\n path_len: usize,\n /** Input: The buffer where the file's attributes are stored. */\n buf: struct\n): errno;\n\n/** Adjust the timestamps of a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_filestat_set_times(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n flags: lookupflags,\n /** Input: The path of the file or directory to operate on. */\n path: ptr,\n /** Input: The path of the file or directory to operate on. */\n path_len: usize,\n /** Input: The desired values of the data access timestamp. */\n st_atim: timestamp,\n /** Input: The desired values of the data modification timestamp. */\n st_mtim: timestamp,\n /** Input: A bitmask indicating which timestamps to adjust. */\n fstflags: fstflags\n): errno;\n\n/** Create a hard link. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_link(\n /** Input: The working directory at which the resolution of the old path starts. */\n old_fd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n old_flags: lookupflags,\n /** Input: The source path from which to link. */\n old_path: ptr,\n /** Input: The source path from which to link. */\n old_path_len: usize,\n /** Input: The working directory at which the resolution of the new path starts. */\n new_fd: fd,\n /** Input: The destination path at which to create the hard link. */\n new_path: ptr,\n /** Input: The length of the destination path at which to create the hard link. */\n new_path_len: usize\n): errno;\n\n/** Open a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_open(\n /** Input: The working directory at which the resolution of the path starts. */\n dirfd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n dirflags: lookupflags,\n /** Input: The path of the file or directory to open. */\n path: ptr,\n /** Input: The length of the path of the file or directory to open. */\n path_len: usize,\n /** Input: The method by which to open the file. */\n oflags: oflags,\n /** Input: The initial base rights that apply to operations using the file descriptor itself. */\n fs_rights_base: rights,\n /** Input: The initial inheriting rights that apply to file descriptors derived from it. */\n fs_rights_inheriting: rights,\n /** Input: The initial flags of the file descriptor. */\n fs_flags: fdflags,\n /** Output: The file descriptor of the file that has been opened. */\n fd: ptr\n): errno;\n\n/** Read the contents of a symbolic link. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_readlink(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path of the symbolic link from which to read. */\n path: ptr,\n /** Input: The length of the path of the symbolic link from which to read. */\n path_len: usize,\n /** Input: The buffer to which to write the contents of the symbolic link. */\n buf: ptr,\n /** Input: The length of the buffer to which to write the contents of the symbolic link. */\n buf_len: usize,\n /** Output: The number of bytes placed in the buffer. */\n buf_used: ptr\n): errno;\n\n/** Remove a directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_remove_directory(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path to a directory to remove. */\n path: ptr,\n /** Input: The length of the path to a directory to remove. */\n path_len: usize\n): errno;\n\n/** Rename a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_rename(\n /** Input: The working directory at which the resolution of the old path starts. */\n old_fd: fd,\n /** Input: The source path of the file or directory to rename. */\n old_path: ptr,\n /** Input: The length of the source path of the file or directory to rename. */\n old_path_len: usize,\n /** Input: The working directory at which the resolution of the new path starts. */\n new_fd: fd,\n /** Input: The destination path to which to rename the file or directory. */\n new_path: ptr,\n /** Input: The length of the destination path to which to rename the file or directory. */\n new_path_len: usize\n): errno;\n\n/** Create a symbolic link. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_symlink(\n /** Input: The contents of the symbolic link. */\n old_path: ptr,\n /** Input: The length of the contents of the symbolic link. */\n old_path_len: usize,\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The destination path at which to create the symbolic link. */\n new_path: ptr,\n /** Input: The length of the destination path at which to create the symbolic link. */\n new_path_len: usize\n): errno;\n\n/** Unlink a file. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_unlink_file(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path to a file to unlink. */\n path: ptr,\n /** Input: The length of the path to a file to unlink. */\n path_len: usize\n): errno;\n\n/** Concurrently poll for the occurrence of a set of events. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function poll_oneoff(\n /** Input: The events to which to subscribe. */\n in_: ptr>,\n /** Input: The events that have occurred. */\n out: ptr>,\n /** Input: Both the number of subscriptions and events. */\n nsubscriptions: usize,\n /** Output: The number of events stored. */\n nevents: ptr\n): errno;\n\n/** Terminate the process normally. An exit code of 0 indicates successful termination of the program. The meanings of other values is dependent on the environment. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function proc_exit(\n /** Input: The exit code returned by the process. */\n rval: u32\n): void;\n\n/** Send a signal to the process of the calling thread. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function proc_raise(\n /** Input: The signal condition to trigger. */\n sig: signal\n): errno;\n\n/** Write high-quality random data into a buffer. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function random_get(\n /** Input: The buffer to fill with random data. */\n buf: usize,\n /** Input: The length of the buffer to fill with random data. */\n buf_len: usize\n): errno;\n\n/** Temporarily yield execution of the calling thread. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sched_yield(): errno;\n\n/** Receive a message from a socket. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sock_recv(\n /** Input: The socket on which to receive data. */\n sock: fd,\n /** Input: List of scatter/gather vectors to which to store data. */\n ri_data: ptr>,\n /** Input: The length of the list of scatter/gather vectors to which to store data. */\n ri_data_len: usize,\n /** Input: Message flags. */\n ri_flags: riflags,\n /** Output: Number of bytes stored in `ri_data`. */\n ro_datalen: ptr,\n /** Output: Message flags. */\n ro_flags: ptr\n): errno;\n\n/** Send a message on a socket. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sock_send(\n /** Input: The socket on which to send data. */\n sock: fd,\n /** Input: List of scatter/gather vectors to which to retrieve data */\n si_data: ptr>,\n /** Input: The length of the list of scatter/gather vectors to which to retrieve data */\n si_data_len: usize,\n /** Input: Message flags. */\n si_flags: siflags,\n /** Output: Number of bytes transmitted. */\n so_datalen: ptr\n): errno;\n\n/** Shut down socket send and receive channels. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sock_shutdown(\n /** Input: The socket on which to shutdown channels. */\n sock: fd,\n /** Input: Which channels on the socket to shut down. */\n how: sdflags\n): errno;\n\n// === Types ======================================================================================\n\n/** File or memory access pattern advisory information. */\nexport namespace advice {\n /** The application has no advice to give on its behavior with respect to the specified data. */\n // @ts-ignore: decorator\n @inline\n export const NORMAL: advice = 0;\n /** The application expects to access the specified data sequentially from lower offsets to higher offsets. */\n // @ts-ignore: decorator\n @inline\n export const SEQUENTIAL : advice = 1;\n /** The application expects to access the specified data in a random order. */\n // @ts-ignore: decorator\n @inline\n export const RANDOM: advice = 2;\n /** The application expects to access the specified data in the near future. */\n // @ts-ignore: decorator\n @inline\n export const WILLNEED: advice = 3;\n /** The application expects that it will not access the specified data in the near future. */\n // @ts-ignore: decorator\n @inline\n export const DONTNEED: advice = 4;\n /** The application expects to access the specified data once and then not reuse it thereafter. */\n // @ts-ignore: decorator\n @inline\n export const NOREUSE: advice = 5;\n}\nexport type advice = u8;\n\n/** Identifiers for clocks. */\nexport namespace clockid {\n /** The clock measuring real time. Time value zero corresponds with 1970-01-01T00:00:00Z. */\n // @ts-ignore: decorator\n @inline\n export const REALTIME: clockid = 0;\n /** The store-wide monotonic clock. Absolute value has no meaning. */\n // @ts-ignore: decorator\n @inline\n export const MONOTONIC: clockid = 1;\n /** The CPU-time clock associated with the current process. */\n // @ts-ignore: decorator\n @inline\n export const PROCESS_CPUTIME_ID: clockid = 2;\n /** The CPU-time clock associated with the current thread. */\n // @ts-ignore: decorator\n @inline\n export const THREAD_CPUTIME_ID: clockid = 3;\n}\nexport type clockid = u32;\n\n/** Identifier for a device containing a file system. Can be used in combination with `inode` to uniquely identify a file or directory in the filesystem. */\nexport type device = u64;\n\n/** A reference to the offset of a directory entry. */\nexport type dircookie = u64;\n\n/** A directory entry. */\n@unmanaged export class dirent {\n /** The offset of the next directory entry stored in this directory. */\n next: dircookie;\n /** The serial number of the file referred to by this directory entry. */\n ino: inode;\n /** The length of the name of the directory entry. */\n namlen: u32;\n /** The type of the file referred to by this directory entry. */\n type: filetype;\n private __padding0: u16;\n}\n\n/** Error codes returned by functions. */\nexport namespace errno {\n /** No error occurred. System call completed successfully. */\n // @ts-ignore: decorator\n @inline\n export const SUCCESS: errno = 0;\n /** Argument list too long. */\n // @ts-ignore: decorator\n @inline\n export const TOOBIG: errno = 1;\n /** Permission denied. */\n // @ts-ignore: decorator\n @inline\n export const ACCES: errno = 2;\n /** Address in use. */\n // @ts-ignore: decorator\n @inline\n export const ADDRINUSE: errno = 3;\n /** Address not available. */\n // @ts-ignore: decorator\n @inline\n export const ADDRNOTAVAIL: errno = 4;\n /** Address family not supported. */\n // @ts-ignore: decorator\n @inline\n export const AFNOSUPPORT: errno = 5;\n /** Resource unavailable, or operation would block. */\n // @ts-ignore: decorator\n @inline\n export const AGAIN: errno = 6;\n /** Connection already in progress. */\n // @ts-ignore: decorator\n @inline\n export const ALREADY: errno = 7;\n /** Bad file descriptor. */\n // @ts-ignore: decorator\n @inline\n export const BADF: errno = 8;\n /** Bad message. */\n // @ts-ignore: decorator\n @inline\n export const BADMSG: errno = 9;\n /** Device or resource busy. */\n // @ts-ignore: decorator\n @inline\n export const BUSY: errno = 10;\n /** Operation canceled. */\n // @ts-ignore: decorator\n @inline\n export const CANCELED: errno = 11;\n /** No child processes. */\n // @ts-ignore: decorator\n @inline\n export const CHILD: errno = 12;\n /** Connection aborted. */\n // @ts-ignore: decorator\n @inline\n export const CONNABORTED: errno = 13;\n /** Connection refused. */\n // @ts-ignore: decorator\n @inline\n export const CONNREFUSED: errno = 14;\n /** Connection reset. */\n // @ts-ignore: decorator\n @inline\n export const CONNRESET: errno = 15;\n /** Resource deadlock would occur. */\n // @ts-ignore: decorator\n @inline\n export const DEADLK: errno = 16;\n /** Destination address required. */\n // @ts-ignore: decorator\n @inline\n export const DESTADDRREQ: errno = 17;\n /** Mathematics argument out of domain of function. */\n // @ts-ignore: decorator\n @inline\n export const DOM: errno = 18;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const DQUOT: errno = 19;\n /** File exists. */\n // @ts-ignore: decorator\n @inline\n export const EXIST: errno = 20;\n /** Bad address. */\n // @ts-ignore: decorator\n @inline\n export const FAULT: errno = 21;\n /** File too large. */\n // @ts-ignore: decorator\n @inline\n export const FBIG: errno = 22;\n /** Host is unreachable. */\n // @ts-ignore: decorator\n @inline\n export const HOSTUNREACH: errno = 23;\n /** Identifier removed. */\n // @ts-ignore: decorator\n @inline\n export const IDRM: errno = 24;\n /** Illegal byte sequence. */\n // @ts-ignore: decorator\n @inline\n export const ILSEQ: errno = 25;\n /** Operation in progress. */\n // @ts-ignore: decorator\n @inline\n export const INPROGRESS: errno = 26;\n /** Interrupted function. */\n // @ts-ignore: decorator\n @inline\n export const INTR: errno = 27;\n /** Invalid argument. */\n // @ts-ignore: decorator\n @inline\n export const INVAL: errno = 28;\n /** I/O error. */\n // @ts-ignore: decorator\n @inline\n export const IO: errno = 29;\n /** Socket is connected. */\n // @ts-ignore: decorator\n @inline\n export const ISCONN: errno = 30;\n /** Is a directory. */\n // @ts-ignore: decorator\n @inline\n export const ISDIR: errno = 31;\n /** Too many levels of symbolic links. */\n // @ts-ignore: decorator\n @inline\n export const LOOP: errno = 32;\n /** File descriptor value too large. */\n // @ts-ignore: decorator\n @inline\n export const MFILE: errno = 33;\n /** Too many links. */\n // @ts-ignore: decorator\n @inline\n export const MLINK: errno = 34;\n /** Message too large. */\n // @ts-ignore: decorator\n @inline\n export const MSGSIZE: errno = 35;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const MULTIHOP: errno = 36;\n /** Filename too long. */\n // @ts-ignore: decorator\n @inline\n export const NAMETOOLONG: errno = 37;\n /** Network is down. */\n // @ts-ignore: decorator\n @inline\n export const NETDOWN: errno = 38;\n /** Connection aborted by network. */\n // @ts-ignore: decorator\n @inline\n export const NETRESET: errno = 39;\n /** Network unreachable. */\n // @ts-ignore: decorator\n @inline\n export const NETUNREACH: errno = 40;\n /** Too many files open in system. */\n // @ts-ignore: decorator\n @inline\n export const NFILE: errno = 41;\n /** No buffer space available. */\n // @ts-ignore: decorator\n @inline\n export const NOBUFS: errno = 42;\n /** No such device. */\n // @ts-ignore: decorator\n @inline\n export const NODEV: errno = 43;\n /** No such file or directory. */\n // @ts-ignore: decorator\n @inline\n export const NOENT: errno = 44;\n /** Executable file format error. */\n // @ts-ignore: decorator\n @inline\n export const NOEXEC: errno = 45;\n /** No locks available. */\n // @ts-ignore: decorator\n @inline\n export const NOLCK: errno = 46;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const NOLINK: errno = 47;\n /** Not enough space. */\n // @ts-ignore: decorator\n @inline\n export const NOMEM: errno = 48;\n /** No message of the desired type. */\n // @ts-ignore: decorator\n @inline\n export const NOMSG: errno = 49;\n /** Protocol not available. */\n // @ts-ignore: decorator\n @inline\n export const NOPROTOOPT: errno = 50;\n /** No space left on device. */\n // @ts-ignore: decorator\n @inline\n export const NOSPC: errno = 51;\n /** Function not supported. */\n // @ts-ignore: decorator\n @inline\n export const NOSYS: errno = 52;\n /** The socket is not connected. */\n // @ts-ignore: decorator\n @inline\n export const NOTCONN: errno = 53;\n /** Not a directory or a symbolic link to a directory. */\n // @ts-ignore: decorator\n @inline\n export const NOTDIR: errno = 54;\n /** Directory not empty. */\n // @ts-ignore: decorator\n @inline\n export const NOTEMPTY: errno = 55;\n /** State not recoverable. */\n // @ts-ignore: decorator\n @inline\n export const NOTRECOVERABLE: errno = 56;\n /** Not a socket. */\n // @ts-ignore: decorator\n @inline\n export const NOTSOCK: errno = 57;\n /** Not supported, or operation not supported on socket. */\n // @ts-ignore: decorator\n @inline\n export const NOTSUP: errno = 58;\n /** Inappropriate I/O control operation. */\n // @ts-ignore: decorator\n @inline\n export const NOTTY: errno = 59;\n /** No such device or address. */\n // @ts-ignore: decorator\n @inline\n export const NXIO: errno = 60;\n /** Value too large to be stored in data type. */\n // @ts-ignore: decorator\n @inline\n export const OVERFLOW: errno = 61;\n /** Previous owner died. */\n // @ts-ignore: decorator\n @inline\n export const OWNERDEAD: errno = 62;\n /** Operation not permitted. */\n // @ts-ignore: decorator\n @inline\n export const PERM: errno = 63;\n /** Broken pipe. */\n // @ts-ignore: decorator\n @inline\n export const PIPE: errno = 64;\n /** Protocol error. */\n // @ts-ignore: decorator\n @inline\n export const PROTO: errno = 65;\n /** Protocol not supported. */\n // @ts-ignore: decorator\n @inline\n export const PROTONOSUPPORT: errno = 66;\n /** Protocol wrong type for socket. */\n // @ts-ignore: decorator\n @inline\n export const PROTOTYPE: errno = 67;\n /** Result too large. */\n // @ts-ignore: decorator\n @inline\n export const RANGE: errno = 68;\n /** Read-only file system. */\n // @ts-ignore: decorator\n @inline\n export const ROFS: errno = 69;\n /** Invalid seek. */\n // @ts-ignore: decorator\n @inline\n export const SPIPE: errno = 70;\n /** No such process. */\n // @ts-ignore: decorator\n @inline\n export const SRCH: errno = 71;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const STALE: errno = 72;\n /** Connection timed out. */\n // @ts-ignore: decorator\n @inline\n export const TIMEDOUT: errno = 73;\n /** Text file busy. */\n // @ts-ignore: decorator\n @inline\n export const TXTBSY: errno = 74;\n /** Cross-device link. */\n // @ts-ignore: decorator\n @inline\n export const XDEV: errno = 75;\n /** Extension: Capabilities insufficient. */\n // @ts-ignore: decorator\n @inline\n export const NOTCAPABLE: errno = 76;\n}\nexport type errno = u16;\n\n/** An event that occurred. */\n@unmanaged export abstract class event {\n /** User-provided value that got attached to `subscription#userdata`. */\n userdata: userdata;\n /** If non-zero, an error that occurred while processing the subscription request. */\n error: errno;\n /* The type of the event that occurred. */\n type: eventtype;\n private __padding0: u16;\n}\n\n/** An event that occurred when type is `eventtype.FD_READ` or `eventtype.FD_WRITE`. */\n@unmanaged export class rwevent extends event {\n /* The number of bytes available for reading or writing. */\n nbytes: filesize;\n /* The state of the file descriptor. */\n flags: eventrwflags;\n private __padding1: u32;\n}\n\n/** The state of the file descriptor subscribed to with `eventtype.FD_READ` or `eventtype.FD_WRITE`. */\nexport namespace eventrwflags {\n /** The peer of this socket has closed or disconnected. */\n // @ts-ignore: decorator\n @inline\n export const HANGUP: eventrwflags = 1;\n}\nexport type eventrwflags = u16;\n\n/** Type of a subscription to an event or its occurrence. */\nexport namespace eventtype {\n /** The time value of clock has reached the timestamp. */\n // @ts-ignore: decorator\n @inline\n export const CLOCK: eventtype = 0;\n /** File descriptor has data available for reading. */\n // @ts-ignore: decorator\n @inline\n export const FD_READ: eventtype = 1;\n /** File descriptor has capacity available for writing */\n // @ts-ignore: decorator\n @inline\n export const FD_WRITE: eventtype = 2;\n}\nexport type eventtype = u8;\n\n/** Exit code generated by a process when exiting. */\nexport type exitcode = u32;\n\n/** A file descriptor number. */\nexport type fd = u32;\n\n/** File descriptor flags. */\nexport namespace fdflags {\n /** Append mode: Data written to the file is always appended to the file's end. */\n // @ts-ignore: decorator\n @inline\n export const APPEND: fdflags = 1;\n /** Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized. */\n // @ts-ignore: decorator\n @inline\n export const DSYNC: fdflags = 2;\n /** Non-blocking mode. */\n // @ts-ignore: decorator\n @inline\n export const NONBLOCK: fdflags = 4;\n /** Synchronized read I/O operations. */\n // @ts-ignore: decorator\n @inline\n export const RSYNC: fdflags = 8;\n /** Write according to synchronized I/O file integrity completion. */\n // @ts-ignore: decorator\n @inline\n export const SYNC: fdflags = 16;\n}\nexport type fdflags = u16;\n\n/** File descriptor attributes. */\n@unmanaged export class fdstat {\n /** File type. */\n filetype: filetype;\n /** File descriptor flags. */\n flags: fdflags;\n /** Rights that apply to this file descriptor. */\n rights_base: rights;\n /** Maximum set of rights that may be installed on new file descriptors that are created through this file descriptor, e.g., through `path_open`. */\n rights_inheriting: rights;\n}\n\n/** Relative offset within a file. */\nexport type filedelta = i64;\n\n/** Non-negative file size or length of a region within a file. */\nexport type filesize = u64;\n\n/** File attributes. */\n@unmanaged export class filestat {\n /** Device ID of device containing the file. */\n dev: device;\n /** File serial number. */\n ino: inode;\n /** File type. */\n filetype: filetype;\n /** Number of hard links to the file. */\n nlink: linkcount;\n /** For regular files, the file size in bytes. For symbolic links, the length in bytes of the pathname contained in the symbolic link. */\n size: filesize;\n /** Last data access timestamp. */\n atim: timestamp;\n /** Last data modification timestamp. */\n mtim: timestamp;\n /** Last file status change timestamp. */\n ctim: timestamp;\n}\n\n/** The type of a file descriptor or file. */\nexport namespace filetype {\n /** The type of the file descriptor or file is unknown or is different from any of the other types specified. */\n // @ts-ignore: decorator\n @inline\n export const UNKNOWN: filetype = 0;\n /** The file descriptor or file refers to a block device inode. */\n // @ts-ignore: decorator\n @inline\n export const BLOCK_DEVICE: filetype = 1;\n /** The file descriptor or file refers to a character device inode. */\n // @ts-ignore: decorator\n @inline\n export const CHARACTER_DEVICE: filetype = 2;\n /** The file descriptor or file refers to a directory inode. */\n // @ts-ignore: decorator\n @inline\n export const DIRECTORY: filetype = 3;\n /** The file descriptor or file refers to a regular file inode. */\n // @ts-ignore: decorator\n @inline\n export const REGULAR_FILE: filetype = 4;\n /** The file descriptor or file refers to a datagram socket. */\n // @ts-ignore: decorator\n @inline\n export const SOCKET_DGRAM: filetype = 5;\n /** The file descriptor or file refers to a byte-stream socket. */\n // @ts-ignore: decorator\n @inline\n export const SOCKET_STREAM: filetype = 6;\n /** The file refers to a symbolic link inode. */\n // @ts-ignore: decorator\n @inline\n export const SYMBOLIC_LINK: filetype = 7;\n}\nexport type filetype = u8;\n\n/** Which file time attributes to adjust. */\nexport namespace fstflags {\n /** Adjust the last data access timestamp to the value stored in `filestat#st_atim`. */\n // @ts-ignore: decorator\n @inline\n export const SET_ATIM: fstflags = 1;\n /** Adjust the last data access timestamp to the time of clock `clockid.REALTIME`. */\n // @ts-ignore: decorator\n @inline\n export const SET_ATIM_NOW: fstflags = 2;\n /** Adjust the last data modification timestamp to the value stored in `filestat#st_mtim`. */\n // @ts-ignore: decorator\n @inline\n export const SET_MTIM: fstflags = 4;\n /** Adjust the last data modification timestamp to the time of clock `clockid.REALTIME`. */\n // @ts-ignore: decorator\n @inline\n export const SET_MTIM_NOW: fstflags = 8;\n}\nexport type fstflags = u16;\n\n/** File serial number that is unique within its file system. */\nexport type inode = u64;\n\n/** A region of memory for scatter/gather reads. */\n@unmanaged export class iovec {\n /** The address of the buffer to be filled. */\n buf: usize;\n /** The length of the buffer to be filled. */\n buf_len: usize;\n}\n\n/** Number of hard links to an inode. */\nexport type linkcount = u32;\n\n/** Flags determining the method of how paths are resolved. */\nexport namespace lookupflags {\n /** As long as the resolved path corresponds to a symbolic link, it is expanded. */\n // @ts-ignore: decorator\n @inline\n export const SYMLINK_FOLLOW: lookupflags = 1;\n}\nexport type lookupflags = u32;\n\n/** Open flags. */\nexport namespace oflags {\n /** Create file if it does not exist. */\n // @ts-ignore: decorator\n @inline\n export const CREAT: oflags = 1;\n /** Fail if not a directory. */\n // @ts-ignore: decorator\n @inline\n export const DIRECTORY: oflags = 2;\n /** Fail if file already exists. */\n // @ts-ignore: decorator\n @inline\n export const EXCL: oflags = 4;\n /** Truncate file to size 0. */\n // @ts-ignore: decorator\n @inline\n export const TRUNC: oflags = 8;\n}\nexport type oflags = u16;\n\n// TODO: undocumented\nexport namespace preopentype {\n // @ts-ignore: decorator\n @inline\n export const DIR: preopentype = 0;\n}\nexport type preopentype = u8;\n\n// TODO: undocumented\nexport abstract class prestat {\n type: preopentype;\n}\n\n// TODO: undocumented\nexport class dirprestat extends prestat {\n name_len: usize;\n}\n\n/** Flags provided to `sock_recv`. */\nexport namespace riflags {\n /** Returns the message without removing it from the socket's receive queue. */\n // @ts-ignore: decorator\n @inline\n export const PEEK: riflags = 1;\n /** On byte-stream sockets, block until the full amount of data can be returned. */\n // @ts-ignore: decorator\n @inline\n export const WAITALL: riflags = 2;\n}\nexport type riflags = u16;\n\n/** File descriptor rights, determining which actions may be performed. */\nexport namespace rights {\n /** The right to invoke `fd_datasync`. */\n // @ts-ignore: decorator\n @inline\n export const FD_DATASYNC: rights = 1;\n /** The right to invoke `fd_read` and `sock_recv`. */\n // @ts-ignore: decorator\n @inline\n export const FD_READ: rights = 2;\n /** The right to invoke `fd_seek`. This flag implies `rights.FD_TELL`. */\n // @ts-ignore: decorator\n @inline\n export const FD_SEEK: rights = 4;\n /** The right to invoke `fd_fdstat_set_flags`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FDSTAT_SET_FLAGS: rights = 8;\n /** The right to invoke `fd_sync`. */\n // @ts-ignore: decorator\n @inline\n export const FD_SYNC: rights = 16;\n /** The right to invoke `fd_seek` in such a way that the file offset remains unaltered (i.e., `whence.CUR` with offset zero), or to invoke `fd_tell`). */\n // @ts-ignore: decorator\n @inline\n export const FD_TELL: rights = 32;\n /** The right to invoke `fd_write` and `sock_send`. If `rights.FD_SEEK` is set, includes the right to invoke `fd_pwrite`. */\n // @ts-ignore: decorator\n @inline\n export const FD_WRITE: rights = 64;\n /** The right to invoke `fd_advise`. */\n // @ts-ignore: decorator\n @inline\n export const FD_ADVISE: rights = 128;\n /** The right to invoke `fd_allocate`. */\n // @ts-ignore: decorator\n @inline\n export const FD_ALLOCATE: rights = 256;\n /** The right to invoke `path_create_directory`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_CREATE_DIRECTORY: rights = 512;\n /** If `rights.PATH_OPEN` is set, the right to invoke `path_open` with `oflags.CREAT`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_CREATE_FILE: rights = 1024;\n /** The right to invoke `path_link` with the file descriptor as the source directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_LINK_SOURCE: rights = 2048;\n /** The right to invoke `path_link` with the file descriptor as the target directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_LINK_TARGET: rights = 4096;\n /** The right to invoke `path_open`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_OPEN: rights = 8192;\n /** The right to invoke `fd_readdir`. */\n // @ts-ignore: decorator\n @inline\n export const FD_READDIR: rights = 16384;\n /** The right to invoke `path_readlink`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_READLINK: rights = 32768;\n /** The right to invoke `path_rename` with the file descriptor as the source directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_RENAME_SOURCE: rights = 65536;\n /** The right to invoke `path_rename` with the file descriptor as the target directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_RENAME_TARGET: rights = 131072;\n /** The right to invoke `path_filestat_get`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_FILESTAT_GET: rights = 262144;\n /** The right to change a file's size (there is no `path_filestat_set_size`). If `rights.PATH_OPEN` is set, includes the right to invoke `path_open` with `oflags.TRUNC`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_FILESTAT_SET_SIZE: rights = 524288;\n /** The right to invoke `path_filestat_set_times`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_FILESTAT_SET_TIMES: rights = 1048576;\n /** The right to invoke `fd_filestat_get`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FILESTAT_GET: rights = 2097152;\n /** The right to invoke `fd_filestat_set_size`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FILESTAT_SET_SIZE: rights = 4194304;\n /** The right to invoke `fd_filestat_set_times`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FILESTAT_SET_TIMES: rights = 8388608;\n /** The right to invoke `path_symlink`. */\n // @ts-ignore: decorator\n @inline\n export const RIGHT_PATH_SYMLINK: rights = 16777216;\n /** The right to invoke `path_remove_directory`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_REMOVE_DIRECTORY: rights = 33554432;\n /** The right to invoke `path_unlink_file`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_UNLINK_FILE: rights = 67108864;\n /** If `rights.FD_READ` is set, includes the right to invoke `poll_oneoff` to subscribe to `eventtype.FD_READ`. If `rights.FD_WRITE` is set, includes the right to invoke `poll_oneoff` to subscribe to `eventtype.FD_WRITE`. */\n // @ts-ignore: decorator\n @inline\n export const POLL_FD_READWRITE: rights = 134217728;\n /** The right to invoke `sock_shutdown`. */\n // @ts-ignore: decorator\n @inline\n export const SOCK_SHUTDOWN: rights = 268435456;\n}\nexport type rights = u64;\n\n/** Flags returned by `sock_recv`. */\nexport namespace roflags {\n /** Message data has been truncated. */\n // @ts-ignore: decorator\n @inline\n export const DATA_TRUNCATED: roflags = 1;\n}\nexport type roflags = u16;\n\n/** Which channels on a socket to shut down. */\nexport namespace sdflags {\n /** Disables further receive operations. */\n // @ts-ignore: decorator\n @inline\n export const RD: sdflags = 1;\n /** Disables further send operations. */\n // @ts-ignore: decorator\n @inline\n export const WR: sdflags = 2;\n}\nexport type sdflags = u8;\n\n/** Flags provided to `sock_send`. */\nexport namespace siflags {\n // As there are currently no flags defined, it must be set to zero.\n}\nexport type siflags = u16;\n\n/** Signal condition. */\nexport namespace signal {\n /** Hangup. */\n // @ts-ignore: decorator\n @inline\n export const HUP: signal = 1;\n /** Terminate interrupt signal. */\n // @ts-ignore: decorator\n @inline\n export const INT: signal = 2;\n /** Terminal quit signal. */\n // @ts-ignore: decorator\n @inline\n export const QUIT: signal = 3;\n /** Illegal instruction. */\n // @ts-ignore: decorator\n @inline\n export const ILL: signal = 4;\n /** Trace/breakpoint trap. */\n // @ts-ignore: decorator\n @inline\n export const TRAP: signal = 5;\n /** Process abort signal. */\n // @ts-ignore: decorator\n @inline\n export const ABRT: signal = 6;\n /** Access to an undefined portion of a memory object. */\n // @ts-ignore: decorator\n @inline\n export const BUS: signal = 7;\n /** Erroneous arithmetic operation. */\n // @ts-ignore: decorator\n @inline\n export const FPE: signal = 8;\n /** Kill. */\n // @ts-ignore: decorator\n @inline\n export const KILL: signal = 9;\n /** User-defined signal 1. */\n // @ts-ignore: decorator\n @inline\n export const USR1: signal = 10;\n /** Invalid memory reference. */\n // @ts-ignore: decorator\n @inline\n export const SEGV: signal = 11;\n /** User-defined signal 2. */\n // @ts-ignore: decorator\n @inline\n export const USR2: signal = 12;\n /** Write on a pipe with no one to read it. */\n // @ts-ignore: decorator\n @inline\n export const PIPE: signal = 13;\n /** Alarm clock. */\n // @ts-ignore: decorator\n @inline\n export const ALRM: signal = 14;\n /** Termination signal. */\n // @ts-ignore: decorator\n @inline\n export const TERM: signal = 15;\n /** Child process terminated, stopped, or continued. */\n // @ts-ignore: decorator\n @inline\n export const CHLD: signal = 16;\n /** Continue executing, if stopped. */\n // @ts-ignore: decorator\n @inline\n export const CONT: signal = 17;\n /** Stop executing. */\n // @ts-ignore: decorator\n @inline\n export const STOP: signal = 18;\n /** Terminal stop signal. */\n // @ts-ignore: decorator\n @inline\n export const TSTP: signal = 19;\n /** Background process attempting read. */\n // @ts-ignore: decorator\n @inline\n export const TTIN: signal = 20;\n /** Background process attempting write. */\n // @ts-ignore: decorator\n @inline\n export const TTOU: signal = 21;\n /** High bandwidth data is available at a socket. */\n // @ts-ignore: decorator\n @inline\n export const URG: signal = 22;\n /** CPU time limit exceeded. */\n // @ts-ignore: decorator\n @inline\n export const XCPU: signal = 23;\n /** File size limit exceeded. */\n // @ts-ignore: decorator\n @inline\n export const XFSZ: signal = 24;\n /** Virtual timer expired. */\n // @ts-ignore: decorator\n @inline\n export const VTALRM: signal = 25;\n // @ts-ignore: decorator\n @inline\n export const PROF: signal = 26;\n // @ts-ignore: decorator\n @inline\n export const WINCH: signal = 27;\n // @ts-ignore: decorator\n @inline\n export const POLL: signal = 28;\n // @ts-ignore: decorator\n @inline\n export const PWR: signal = 29;\n /** Bad system call. */\n // @ts-ignore: decorator\n @inline\n export const SYS: signal = 30;\n}\nexport type signal = u8;\n\n/** Flags determining how to interpret the timestamp provided in `subscription_t::u.clock.timeout. */\nexport namespace subclockflags {\n /** If set, treat the timestamp provided in `clocksubscription` as an absolute timestamp. */\n // @ts-ignore: decorator\n @inline\n export const ABSTIME: subclockflags = 1;\n}\nexport type subclockflags = u16;\n\n/** Subscription to an event. */\n@unmanaged export abstract class subscription {\n /** User-provided value that is attached to the subscription. */\n userdata: userdata;\n /** The type of the event to which to subscribe. */\n type: eventtype;\n private __padding0: u32;\n}\n\n/* Subscription to an event of type `eventtype.CLOCK`.**/\n@unmanaged export class clocksubscription extends subscription {\n /** The user-defined unique identifier of the clock. */\n identifier: userdata;\n /** The clock against which to compare the timestamp. */\n clock_id: clockid;\n /** The absolute or relative timestamp. */\n timeout: timestamp;\n /** The amount of time that the implementation may wait additionally to coalesce with other events. */\n precision: timestamp;\n /** Flags specifying whether the timeout is absolute or relative. */\n flags: subclockflags;\n private __padding1: u32;\n}\n\n/* Subscription to an event of type `eventtype.FD_READ` or `eventtype.FD_WRITE`.**/\n@unmanaged export class fdsubscription extends subscription {\n /** The file descriptor on which to wait for it to become ready for reading or writing. */\n fd: fd;\n}\n\n/** Timestamp in nanoseconds. */\nexport type timestamp = u64;\n\n/** User-provided value that may be attached to objects that is retained when extracted from the implementation. */\nexport type userdata = u64;\n\n/** The position relative to which to set the offset of the file descriptor. */\nexport namespace whence {\n /** Seek relative to current position. */\n // @ts-ignore: decorator\n @inline\n export const CUR: whence = 0;\n /** Seek relative to end-of-file. */\n // @ts-ignore: decorator\n @inline\n export const END: whence = 1;\n /** Seek relative to start-of-file. */\n // @ts-ignore: decorator\n @inline\n export const SET: whence = 2;\n}\nexport type whence = u8;", + "bindings/wasi": "export * from \"./wasi_snapshot_preview1\";\n\n// A WASI-wide reusable temporary buffer to store and work with out values. Must\n// be large enough to fit any operation it is used in, i.e. process/writeString.\n// @ts-ignore: decorator\n@lazy export const tempbuf = memory.data(4 * sizeof());\n", + "builtins": "type auto = i32;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isInteger(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isFloat(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isBoolean(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isSigned(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isReference(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isString(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isArray(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isArrayLike(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isFunction(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isNullable(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isDefined(expression: auto): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isConstant(expression: auto): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isManaged(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isVoid(): bool;\n\n// @ts-ignore\n@builtin\nexport declare function lengthof(func?: T): i32;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function clz(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function ctz(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function popcnt(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function rotl(value: T, shift: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function rotr(value: T, shift: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function abs(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function max(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function min(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function ceil(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function floor(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function copysign(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function nearest(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function reinterpret(value: number): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function sqrt(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function trunc(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function add(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function sub(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function mul(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function div(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function store(ptr: usize, value: auto, immOffset?: usize, immAlign?: usize): void;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function sizeof(): usize; // | u32 / u64\n\n// @ts-ignore: decorator\n@builtin\nexport declare function alignof(): usize; // | u32 / u64\n\n// @ts-ignore: decorator\n@builtin\nexport declare function offsetof(fieldName?: string): usize; // | u32 / u64\n\n// @ts-ignore: decorator\n@builtin\nexport declare function idof(): u32;\n\n// @ts-ignore\n@builtin\nexport declare function nameof(): string;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function select(ifTrue: T, ifFalse: T, condition: bool): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function unreachable(): auto;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function changetype(value: auto): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function assert(isTrueish: T, message?: string): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function unchecked(expr: T): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function call_indirect(index: u32, ...args: auto[]): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function instantiate(...args: auto[]): T;\n\nexport namespace atomic {\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load(ptr: usize, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: T, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg(ptr: usize, expected: T, replacement: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function wait(ptr: usize, expected: T, timeout: i64): AtomicWaitResult;\n\n // @ts-ignore: decorator\n @builtin\n export declare function notify(ptr: usize, count: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function fence(): void;\n}\n\n// @ts-ignore: decorator\n@lazy\nexport const enum AtomicWaitResult {\n OK = 0,\n NOT_EQUAL = 1,\n TIMED_OUT = 2\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i8(value: auto): i8;\n\nexport namespace i8 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i8 = -128;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i8 = 127;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i16(value: auto): i16;\n\nexport namespace i16 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i16 = -32768;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i16 = 32767;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i32(value: auto): i32;\n\nexport namespace i32 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i32 = -2147483648;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i32 = 2147483647;\n\n // @ts-ignore: decorator\n @builtin\n export declare function clz(value: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ctz(value: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(value: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_s(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_u(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotl(value: i32, shift: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotr(value: i32, shift: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_f32(value: f32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_s(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_s(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n\n export namespace atomic {\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i32, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i32, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i32, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function wait(ptr: usize, expected: i32, timeout: i64): AtomicWaitResult;\n\n export namespace rmw8 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n\n export namespace rmw16 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n\n export namespace rmw {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i64(value: auto): i64;\n\nexport namespace i64 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i64 = -9223372036854775808;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i64 = 9223372036854775807;\n\n // @ts-ignore: decorator\n @builtin\n export declare function clz(value: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ctz(value: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_s(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_u(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(value: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotl(value: i64, shift: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotr(value: i64, shift: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_f64(value: f64): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store32(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n export namespace atomic {\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32_u(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i64, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i64, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store32(ptr: usize, value: i64, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i64, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function wait(ptr: usize, expected: i64, timeout: i64): AtomicWaitResult;\n\n export namespace rmw8 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n\n export namespace rmw16 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n\n export namespace rmw32 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n\n export namespace rmw {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isize(value: auto): isize;\n\nexport namespace isize {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: isize = sizeof() == sizeof()\n ? -2147483648\n : -9223372036854775808;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: isize = sizeof() == sizeof()\n ? 2147483647\n : 9223372036854775807;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u8(value: auto): u8;\n\nexport namespace u8 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u8 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u8 = 255;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u16(value: auto): u16;\n\nexport namespace u16 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u16 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u16 = 65535;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u32(value: auto): u32;\n\nexport namespace u32 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u32 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u32 = 4294967295;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u64(value: auto): u64;\n\nexport namespace u64 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u64 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u64 = 18446744073709551615;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function usize(value: auto): usize;\n\nexport namespace usize {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: usize = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: usize = sizeof() == sizeof()\n ? 4294967295\n : 18446744073709551615;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function bool(value: auto): bool;\n\nexport namespace bool {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: bool = false;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: bool = true;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f32(value: auto): f32;\n\nexport namespace f32 {\n\n // @ts-ignore: decorator\n @lazy\n export const EPSILON = reinterpret(0x34000000); // 0x1p-23f\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE = reinterpret(0x00000001); // 0x0.000001p+0f\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE = reinterpret(0x7F7FFFFF); // 0x1.fffffep+127f\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_NORMAL_VALUE = reinterpret(0x00800000); // 0x1p-126f\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_SAFE_INTEGER: f32 = -16777215;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_SAFE_INTEGER: f32 = 16777215;\n\n // @ts-ignore: decorator\n @lazy\n export const POSITIVE_INFINITY: f32 = Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NEGATIVE_INFINITY: f32 = -Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NaN: f32 = 0.0 / 0.0;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function copysign(x: f32, y: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_i32(value: i32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(value: f32): f32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: f32, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(left: f32, right: f32): f32;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f64(value: auto): f64;\n\nexport namespace f64 {\n\n // @ts-ignore: decorator\n @lazy\n export const EPSILON = reinterpret(0x3CB0000000000000); // 0x1p-52\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE = reinterpret(0x0000000000000001); // 0x0.0000000000001p+0\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE = reinterpret(0x7FEFFFFFFFFFFFFF); // 0x1.fffffffffffffp+1023\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_NORMAL_VALUE = reinterpret(0x0010000000000000); // 0x1p-1022\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_SAFE_INTEGER: f64 = -9007199254740991;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_SAFE_INTEGER: f64 = 9007199254740991;\n\n // @ts-ignore: decorator\n @lazy\n export const POSITIVE_INFINITY: f64 = Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NEGATIVE_INFINITY: f64 = -Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NaN: f64 = 0.0 / 0.0;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function copysign(x: f64, y: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_i64(value: i64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(value: f64): f64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: f64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(left: f64, right: f64): f64;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function v128(\n a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8,\n i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8\n): v128;\n\nexport namespace v128 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: T): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: T): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(a: v128, b: v128, ...lanes: u8[]): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function swizzle(a: v128, s: v128): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_ext(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_zero(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8x8_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8x8_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16x4_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16x4_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32x2_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32x2_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_splat(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load8_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load16_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load32_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load64_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load32_zero(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load64_zero(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load8_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load16_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load32_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load64_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store32_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store64_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: v128, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(a: v128, b: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function andnot(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function not(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitselect(v1: v128, v2: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function any_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmin(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmax(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function dot(a: v128, b: v128): v128; // i16 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function avgr(a: v128, b: v128): v128; // u8, u16 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_low(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function demote_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function promote_low(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function q15mulr_sat(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high(a: v128, b: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i8x16(\n a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8,\n i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8\n): v128;\n\nexport namespace i8x16 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_s(x: v128, idx: u8): i8;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_u(x: v128, idx: u8): u8;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function avgr_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i16x8_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(\n a: v128, b: v128,\n l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8,\n l8: u8, l9: u8, l10: u8, l11: u8, l12: u8, l13: u8, l14: u8, l15: u8\n ): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function swizzle(a: v128, s: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i16x8(a: i16, b: i16, c: i16, d: i16, e: i16, f: i16, g: i16, h: i16): v128;\n\nexport namespace i16x8 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i16): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_s(x: v128, idx: u8): i16;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_u(x: v128, idx: u8): u16;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i16): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function avgr_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i32x4_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i32x4_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i8x16_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i8x16_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i8x16_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i8x16_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i8x16_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i8x16_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function q15mulr_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i8x16_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i8x16_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i8x16_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i8x16_u(a: v128, b: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i32x4(a: i32, b: i32, c: i32, d: i32): v128;\n\nexport namespace i32x4 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function dot_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f64x2_s_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f64x2_u_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i16x8_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i16x8_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i16x8_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i16x8_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i16x8_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i16x8_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i16x8_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i16x8_u(a: v128, b: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i64x2(a: i64, b: i64): v128;\n\nexport namespace i64x2 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i32x4_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i32x4_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i32x4_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i32x4_u(a: v128, b: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f32x4(a: f32, b: f32, c: f32, d: f32): v128;\n\nexport namespace f32x4 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: f32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: f32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmin(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmax(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function demote_f64x2_zero(a: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f64x2(a: f64, b: f64): v128;\n\nexport namespace f64x2 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: f64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: f64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmin(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmax(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_low_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_low_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function promote_low_f32x4(a: v128): v128;\n}\n\n@final\nexport abstract class i31 { // FIXME: usage of 'new' requires a class :(\n\n // @ts-ignore: decorator\n @builtin\n static new(value: i32): i31ref { return changetype(unreachable()); }\n\n // @ts-ignore: decorator\n @builtin\n static get(i31expr: i31ref): i32 { return unreachable(); }\n}\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n// @ts-ignore: decorator\n@external(\"env\", \"abort\")\ndeclare function abort(\n message?: string | null,\n fileName?: string | null,\n lineNumber?: u32,\n columnNumber?: u32\n): void;\n\n// @ts-ignore: decorator\n@external(\"env\", \"trace\")\ndeclare function trace(\n message: string,\n n?: i32,\n a0?: f64,\n a1?: f64,\n a2?: f64,\n a3?: f64,\n a4?: f64\n): void;\n\n// @ts-ignore: decorator\n@external(\"env\", \"seed\")\ndeclare function seed(): f64;\n\n/* eslint-enable @typescript-eslint/no-unused-vars */\n", + "compat": "export type ReturnType = returnof;\nexport type NonNullable = nonnull;\n", + "console": "import {\n process\n} from \"./process\";\n\n// @ts-ignore: decorator\n@lazy var timers = new Map();\n\nexport namespace console {\n\n export function assert(condition: T, message: string = \"\"): void {\n if (!condition) {\n let stderr = process.stderr;\n stderr.write(\"Assertion failed: \");\n stderr.write(message);\n stderr.write(\"\\n\");\n }\n }\n\n export function log(message: string = \"\"): void {\n var stdout = process.stdout;\n stdout.write(message);\n stdout.write(\"\\n\");\n }\n\n export function debug(message: string = \"\"): void {\n var stdout = process.stdout;\n stdout.write(\"Debug: \");\n stdout.write(message);\n stdout.write(\"\\n\");\n }\n\n export function info(message: string = \"\"): void {\n var stdout = process.stdout;\n stdout.write(\"Info: \");\n stdout.write(message);\n stdout.write(\"\\n\");\n }\n\n export function warn(message: string = \"\"): void {\n var stdout = process.stdout;\n stdout.write(\"Warning: \");\n stdout.write(message);\n stdout.write(\"\\n\");\n }\n\n export function error(message: string = \"\"): void {\n var stdout = process.stdout;\n stdout.write(\"Error: \");\n stdout.write(message);\n stdout.write(\"\\n\");\n }\n\n export function time(label: string = \"default\"): void {\n var stdout = process.stdout;\n if (timers.has(label)) {\n stdout.write(\"Warning: Label '\");\n stdout.write(label);\n stdout.write(\"' already exists for console.time()\\n\");\n return;\n }\n timers.set(label, process.hrtime());\n }\n\n export function timeLog(label: string = \"default\"): void {\n var stdout = process.stdout;\n if (!timers.has(label)) {\n stdout.write(\"Warning: No such label '\");\n stdout.write(label);\n stdout.write(\"' for console.timeLog()\\n\");\n return;\n }\n timeLogImpl(label);\n }\n\n export function timeEnd(label: string = \"default\"): void {\n var stdout = process.stdout;\n if (!timers.has(label)) {\n stdout.write(\"Warning: No such label '\");\n stdout.write(label);\n stdout.write(\"' for console.timeEnd()\\n\");\n return;\n }\n timeLogImpl(label);\n timers.delete(label);\n }\n}\n\nfunction timeLogImpl(label: string): void {\n var start = changetype(timers.get(label));\n var end = process.hrtime();\n var nanos = end - start;\n var millis = nanos / 1000000;\n var millisStr = millis.toString();\n var stdout = process.stdout;\n stdout.write(label);\n stdout.write(\": \");\n stdout.write(millisStr);\n stdout.write(\"ms\\n\");\n // __dispose(changetype(millisStr));\n}\n", + "crypto": "import {\n errnoToString,\n random_get\n} from \"bindings/wasi_snapshot_preview1\";\n\nexport namespace crypto {\n export function getRandomValues(array: Uint8Array): void {\n var err = random_get(changetype(array.buffer) + array.byteOffset, array.byteLength);\n if (err) throw new Error(errnoToString(err));\n }\n}\n", + "dataview": "import { BLOCK_MAXSIZE } from \"./rt/common\";\nimport { ArrayBuffer } from \"./arraybuffer\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH } from \"./util/error\";\n\n// TODO: there is probably a smarter way to check byteOffset for accesses larger than 1 byte\n\nexport class DataView {\n\n readonly buffer: ArrayBuffer;\n @unsafe readonly dataStart: usize;\n readonly byteLength: i32;\n\n get byteOffset(): i32 {\n return (this.dataStart - changetype(this.buffer));\n }\n\n constructor(\n buffer: ArrayBuffer,\n byteOffset: i32 = 0,\n byteLength: i32 = buffer.byteLength\n ) {\n if (\n i32(byteLength > BLOCK_MAXSIZE) |\n i32(byteOffset + byteLength > buffer.byteLength)\n ) throw new RangeError(E_INVALIDLENGTH);\n this.buffer = buffer; // links\n var dataStart = changetype(buffer) + byteOffset;\n this.dataStart = dataStart;\n this.byteLength = byteLength;\n }\n\n getFloat32(byteOffset: i32, littleEndian: bool = false): f32 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 4 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n return littleEndian\n ? load(this.dataStart + byteOffset)\n : reinterpret(bswap(load(this.dataStart + byteOffset)));\n }\n\n getFloat64(byteOffset: i32, littleEndian: bool = false): f64 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 8 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n return littleEndian\n ? load(this.dataStart + byteOffset)\n : reinterpret(bswap(load(this.dataStart + byteOffset)));\n }\n\n getInt8(byteOffset: i32): i8 {\n if (byteOffset >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + byteOffset);\n }\n\n getInt16(byteOffset: i32, littleEndian: bool = false): i16 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 2 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n var result: i16 = load(this.dataStart + byteOffset);\n return littleEndian ? result : bswap(result);\n }\n\n getInt32(byteOffset: i32, littleEndian: bool = false): i32 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 4 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n var result: i32 = load(this.dataStart + byteOffset);\n return littleEndian ? result : bswap(result);\n }\n\n getUint8(byteOffset: i32): u8 {\n if (byteOffset >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + byteOffset);\n }\n\n getUint16(byteOffset: i32, littleEndian: bool = false): u16 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 2 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n var result: u16 = load(this.dataStart + byteOffset);\n return littleEndian ? result : bswap(result);\n }\n\n getUint32(byteOffset: i32, littleEndian: bool = false): u32 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 4 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n var result: u32 = load(this.dataStart + byteOffset);\n return littleEndian ? result : bswap(result);\n }\n\n setFloat32(byteOffset: i32, value: f32, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 4 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n if (littleEndian) store(this.dataStart + byteOffset, value);\n else store(this.dataStart + byteOffset, bswap(reinterpret(value)));\n }\n\n setFloat64(byteOffset: i32, value: f64, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 8 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n if (littleEndian) store(this.dataStart + byteOffset, value);\n else store(this.dataStart + byteOffset, bswap(reinterpret(value)));\n }\n\n setInt8(byteOffset: i32, value: i8): void {\n if (byteOffset >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, value);\n }\n\n setInt16(byteOffset: i32, value: i16, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 2 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, littleEndian ? value : bswap(value));\n }\n\n setInt32(byteOffset: i32, value: i32, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 4 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, littleEndian ? value : bswap(value));\n }\n\n setUint8(byteOffset: i32, value: u8): void {\n if (byteOffset >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, value);\n }\n\n setUint16(byteOffset: i32, value: u16, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 2 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, littleEndian ? value : bswap(value));\n }\n\n setUint32(byteOffset: i32, value: u32, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 4 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, littleEndian ? value : bswap(value));\n }\n\n // Non-standard additions that make sense in WebAssembly, but won't work in JS:\n\n getInt64(byteOffset: i32, littleEndian: bool = false): i64 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 8 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n var result: i64 = load(this.dataStart + byteOffset);\n return littleEndian ? result : bswap(result);\n }\n\n getUint64(byteOffset: i32, littleEndian: bool = false): u64 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 8 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n var result = load(this.dataStart + byteOffset);\n return littleEndian ? result : bswap(result);\n }\n\n setInt64(byteOffset: i32, value: i64, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 8 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, littleEndian ? value : bswap(value));\n }\n\n setUint64(byteOffset: i32, value: u64, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 8 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, littleEndian ? value : bswap(value));\n }\n\n toString(): string {\n return \"[object DataView]\";\n }\n}\n", + "date": "import { E_INVALIDDATE } from \"util/error\";\nimport { now as Date_now } from \"./bindings/Date\";\n\n// @ts-ignore: decorator\n@inline const\n MILLIS_PER_DAY = 1000 * 60 * 60 * 24,\n MILLIS_PER_HOUR = 1000 * 60 * 60,\n MILLIS_PER_MINUTE = 1000 * 60,\n MILLIS_PER_SECOND = 1000;\n\n// ymdFromEpochDays returns values via globals to avoid allocations\n// @ts-ignore: decorator\n@lazy let _month: i32, _day: i32;\n\nexport class Date {\n private year: i32 = 0;\n private month: i32 = 0;\n private day: i32 = 0;\n\n @inline static UTC(\n year: i32,\n month: i32 = 0,\n day: i32 = 1,\n hour: i32 = 0,\n minute: i32 = 0,\n second: i32 = 0,\n millisecond: i32 = 0\n ): i64 {\n if (year >= 0 && year <= 99) year += 1900;\n var ms = epochMillis(year, month + 1, day, hour, minute, second, millisecond);\n if (invalidDate(ms)) throw new RangeError(E_INVALIDDATE);\n return ms;\n }\n\n @inline static now(): i64 {\n return Date_now();\n }\n\n // It can parse only ISO 8601 inputs like YYYY-MM-DDTHH:MM:SS.000Z\n @inline static parse(dateString: string): Date {\n return this.fromString(dateString);\n }\n\n static fromString(dateTimeString: string): Date {\n if (!dateTimeString.length) throw new RangeError(E_INVALIDDATE);\n var\n hour: i32 = 0,\n min: i32 = 0,\n sec: i32 = 0,\n ms: i32 = 0;\n\n var dateString = dateTimeString;\n var posT = dateTimeString.indexOf(\"T\");\n if (~posT) {\n // includes a time component\n let timeString: string;\n dateString = dateTimeString.substring(0, posT);\n timeString = dateTimeString.substring(posT + 1);\n // parse the HH-MM-SS component\n let timeParts = timeString.split(\":\");\n let len = timeParts.length;\n if (len <= 1) throw new RangeError(E_INVALIDDATE);\n\n hour = I32.parseInt(timeParts[0]);\n min = I32.parseInt(timeParts[1]);\n if (len >= 3) {\n let secAndMs = timeParts[2];\n let posDot = secAndMs.indexOf(\".\");\n if (~posDot) {\n // includes milliseconds\n sec = I32.parseInt(secAndMs.substring(0, posDot));\n ms = I32.parseInt(secAndMs.substring(posDot + 1));\n } else {\n sec = I32.parseInt(secAndMs);\n }\n }\n }\n // parse the YYYY-MM-DD component\n var parts = dateString.split(\"-\");\n var year = I32.parseInt(parts[0]);\n var month = 1, day = 1;\n var len = parts.length;\n if (len >= 2) {\n month = I32.parseInt(parts[1]);\n if (len >= 3) {\n day = I32.parseInt(parts[2]);\n }\n }\n return new Date(epochMillis(year, month, day, hour, min, sec, ms));\n }\n\n constructor(private epochMillis: i64) {\n // this differs from JavaScript which prefer return NaN or \"Invalid Date\" string\n // instead throwing exception.\n if (invalidDate(epochMillis)) throw new RangeError(E_INVALIDDATE);\n\n this.year = ymdFromEpochDays(i32(floorDiv(epochMillis, MILLIS_PER_DAY)));\n this.month = _month;\n this.day = _day;\n }\n\n @inline getTime(): i64 {\n return this.epochMillis;\n }\n\n setTime(time: i64): i64 {\n if (invalidDate(time)) throw new RangeError(E_INVALIDDATE);\n\n this.epochMillis = time;\n this.year = ymdFromEpochDays(i32(floorDiv(time, MILLIS_PER_DAY)));\n this.month = _month;\n this.day = _day;\n\n return time;\n }\n\n @inline getUTCFullYear(): i32 {\n return this.year;\n }\n\n @inline getUTCMonth(): i32 {\n return this.month - 1;\n }\n\n @inline getUTCDate(): i32 {\n return this.day;\n }\n\n @inline getUTCDay(): i32 {\n return dayOfWeek(this.year, this.month, this.day);\n }\n\n getUTCHours(): i32 {\n return i32(euclidRem(this.epochMillis, MILLIS_PER_DAY)) / MILLIS_PER_HOUR;\n }\n\n getUTCMinutes(): i32 {\n return i32(euclidRem(this.epochMillis, MILLIS_PER_HOUR)) / MILLIS_PER_MINUTE;\n }\n\n getUTCSeconds(): i32 {\n return i32(euclidRem(this.epochMillis, MILLIS_PER_MINUTE)) / MILLIS_PER_SECOND;\n }\n\n getUTCMilliseconds(): i32 {\n return i32(euclidRem(this.epochMillis, MILLIS_PER_SECOND));\n }\n\n setUTCMilliseconds(millis: i32): void {\n this.setTime(this.epochMillis + (millis - this.getUTCMilliseconds()));\n }\n\n setUTCSeconds(seconds: i32): void {\n this.setTime(this.epochMillis + (seconds - this.getUTCSeconds()) * MILLIS_PER_SECOND);\n }\n\n setUTCMinutes(minutes: i32): void {\n this.setTime(this.epochMillis + (minutes - this.getUTCMinutes()) * MILLIS_PER_MINUTE);\n }\n\n setUTCHours(hours: i32): void {\n this.setTime(this.epochMillis + (hours - this.getUTCHours()) * MILLIS_PER_HOUR);\n }\n\n setUTCDate(day: i32): void {\n if (this.day == day) return;\n var ms = euclidRem(this.epochMillis, MILLIS_PER_DAY);\n this.setTime(i64(daysSinceEpoch(this.year, this.month, day)) * MILLIS_PER_DAY + ms);\n }\n\n setUTCMonth(month: i32): void {\n if (this.month == month) return;\n var ms = euclidRem(this.epochMillis, MILLIS_PER_DAY);\n this.setTime(i64(daysSinceEpoch(this.year, month + 1, this.day)) * MILLIS_PER_DAY + ms);\n }\n\n setUTCFullYear(year: i32): void {\n if (this.year == year) return;\n var ms = euclidRem(this.epochMillis, MILLIS_PER_DAY);\n this.setTime(i64(daysSinceEpoch(year, this.month, this.day)) * MILLIS_PER_DAY + ms);\n }\n\n toISOString(): string {\n // TODO: add more low-level helper which combine toString and padStart without extra allocation\n var yearStr: string;\n var year = this.year;\n var isNeg = year < 0;\n if (isNeg || year >= 10000) {\n yearStr = (isNeg ? \"-\" : \"+\") + abs(year).toString().padStart(6, \"0\");\n } else {\n yearStr = year.toString().padStart(4, \"0\");\n }\n\n return (\n yearStr +\n \"-\" +\n this.month.toString().padStart(2, \"0\") +\n \"-\" +\n this.day.toString().padStart(2, \"0\") +\n \"T\" +\n this.getUTCHours().toString().padStart(2, \"0\") +\n \":\" +\n this.getUTCMinutes().toString().padStart(2, \"0\") +\n \":\" +\n this.getUTCSeconds().toString().padStart(2, \"0\") +\n \".\" +\n this.getUTCMilliseconds().toString().padStart(3, \"0\") +\n \"Z\"\n );\n }\n\n toUTCString(): string {\n const weeks: StaticArray = [\n \"Sun, \", \"Mon, \", \"Tue, \", \"Wed, \", \"Thu, \", \"Fri, \", \"Sat, \"\n ];\n\n const months: StaticArray = [\n \" Jan \", \" Feb \", \" Mar \", \" Apr \", \" May \", \" Jun \",\n \" Jul \", \" Aug \", \" Sep \", \" Oct \", \" Nov \", \" Dec \"\n ];\n\n var mo = this.month;\n var da = this.day;\n var yr = this.year;\n var wd = dayOfWeek(yr, mo, da);\n var year = abs(yr).toString().padStart(4, \"0\");\n if (yr < 0) year = \"-\" + year;\n\n return (\n unchecked(weeks[wd]) +\n da.toString().padStart(2, \"0\") +\n unchecked(months[mo - 1]) +\n year +\n \" \" +\n this.getUTCHours().toString().padStart(2, \"0\") +\n \":\" +\n this.getUTCMinutes().toString().padStart(2, \"0\") +\n \":\" +\n this.getUTCSeconds().toString().padStart(2, \"0\") +\n \" GMT\"\n );\n }\n\n toDateString(): string {\n // TODO: use u64 static data instead 4 chars\n // also use stream itoa variants.\n const weeks: StaticArray = [\n \"Sun \", \"Mon \", \"Tue \", \"Wed \", \"Thu \", \"Fri \", \"Sat \"\n ];\n\n const months: StaticArray = [\n \"Jan \", \"Feb \", \"Mar \", \"Apr \", \"May \", \"Jun \",\n \"Jul \", \"Aug \", \"Sep \", \"Oct \", \"Nov \", \"Dec \"\n ];\n\n var mo = this.month;\n var da = this.day;\n var yr = this.year;\n var wd = dayOfWeek(yr, mo, da);\n var year = abs(yr).toString().padStart(4, \"0\");\n if (yr < 0) year = \"-\" + year;\n\n return (\n unchecked(weeks[wd]) +\n unchecked(months[mo - 1]) +\n da.toString().padStart(2, \"0\") +\n \" \" + year\n );\n }\n\n // Note: it uses UTC time instead local time (without timezone offset)\n toTimeString(): string {\n // TODO: add timezone\n return (\n this.getUTCHours().toString().padStart(2, \"0\") +\n \":\" +\n this.getUTCMinutes().toString().padStart(2, \"0\") +\n \":\" +\n this.getUTCSeconds().toString().padStart(2, \"0\")\n );\n }\n\n // Note: it uses UTC datetime instead local datetime (without timezone offset)\n toString(): string {\n return this.toDateString() + \" \" + this.toTimeString();\n }\n}\n\nfunction epochMillis(\n year: i32,\n month: i32,\n day: i32,\n hour: i32,\n minute: i32,\n second: i32,\n milliseconds: i32\n): i64 {\n return (\n i64(daysSinceEpoch(year, month, day)) * MILLIS_PER_DAY +\n hour * MILLIS_PER_HOUR +\n minute * MILLIS_PER_MINUTE +\n second * MILLIS_PER_SECOND +\n milliseconds\n );\n}\n\n// @ts-ignore: decorator\n@inline function floorDiv(a: T, b: T): T {\n return (a >= 0 ? a : a - b + 1) / b as T;\n}\n\n// @ts-ignore: decorator\n@inline function euclidRem(a: T, b: T): T {\n var m = a % b;\n return m + (m < 0 ? b : 0) as T;\n}\n\nfunction invalidDate(millis: i64): bool {\n // @ts-ignore\n return (millis < -8640000000000000) | (millis > 8640000000000000);\n}\n\n// see: http://howardhinnant.github.io/date_algorithms.html#civil_from_days\nfunction ymdFromEpochDays(z: i32): i32 {\n z += 719468;\n var era = floorDiv(z, 146097);\n var doe = z - era * 146097; // [0, 146096]\n var yoe = (doe - doe / 1460 + doe / 36524 - doe / 146096) / 365; // [0, 399]\n var year = yoe + era * 400;\n var doy = doe - (365 * yoe + yoe / 4 - yoe / 100); // [0, 365]\n var mo = (5 * doy + 2) / 153; // [0, 11]\n _day = doy - (153 * mo + 2) / 5 + 1; // [1, 31]\n mo += mo < 10 ? 3 : -9; // [1, 12]\n _month = mo;\n year += u32(mo <= 2);\n return year;\n}\n\n// http://howardhinnant.github.io/date_algorithms.html#days_from_civil\nfunction daysSinceEpoch(y: i32, m: i32, d: i32): i32 {\n y -= i32(m <= 2);\n var era = floorDiv(y, 400);\n var yoe = y - era * 400; // [0, 399]\n var doy = (153 * (m + (m > 2 ? -3 : 9)) + 2) / 5 + d - 1; // [0, 365]\n var doe = yoe * 365 + yoe / 4 - yoe / 100 + doy; // [0, 146096]\n return era * 146097 + doe - 719468;\n}\n\n// TomohikoSakamoto algorithm from https://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week\nfunction dayOfWeek(year: i32, month: i32, day: i32): i32 {\n const tab = memory.data([0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]);\n\n year -= i32(month < 3);\n year += floorDiv(year, 4) - floorDiv(year, 100) + floorDiv(year, 400);\n month = load(tab + month - 1);\n return euclidRem(year + month + day, 7);\n}\n", + "diagnostics": "// @ts-ignore: decorator\n@builtin\nexport declare function ERROR(message?: string): void;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function WARNING(message?: string): void;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function INFO(message?: string): void;\n", + "error": "export class Error {\n\n name: string = \"Error\";\n stack: string = \"\"; // TODO\n\n constructor(\n public message: string = \"\"\n ) {}\n\n toString(): string {\n var message = this.message;\n return message.length\n ? this.name + \": \" + message\n : this.name;\n }\n}\n\nexport class RangeError extends Error {\n constructor(message: string = \"\") {\n super(message);\n this.name = \"RangeError\";\n }\n}\n\nexport class TypeError extends Error {\n constructor(message: string = \"\") {\n super(message);\n this.name = \"TypeError\";\n }\n}\n\nexport class SyntaxError extends Error {\n constructor(message: string = \"\") {\n super(message);\n this.name = \"SyntaxError\";\n }\n}\n\nexport class URIError extends Error {\n constructor(message: string = \"\") {\n super(message);\n this.name = \"URIError\";\n }\n}\n", + "function": "type auto = i32;\n\n@final export abstract class Function {\n private _index: u32;\n private _env: usize;\n\n // @ts-ignore: this on getter\n get index(this: T): u32 {\n return load(changetype(this), offsetof>(\"_index\"));\n }\n\n // @ts-ignore: this on getter\n get name(this: T): string {\n return \"\";\n }\n\n // @ts-ignore: this on getter\n get length(this: T): i32 {\n // @ts-ignore: T is function\n return lengthof();\n }\n\n // @ts-ignore: T is function\n @builtin call(thisArg: thisof | null, ...args: auto[]): returnof {\n return unreachable();\n }\n\n toString(this: T): string {\n return \"function() { [native code] }\";\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n // Env is either `null` (nop) or compiler-generated\n __visit(this._env, cookie);\n }\n}\n", + "iterator": "export abstract class Iterable {\n // ?\n}\n\n@final\nexport abstract class Iterator {\n\n // private constructor(iterable: Iterable) {\n // }\n\n // TODO: these need to evaluate the classId at the respective reference in order to obtain the\n // next value, i.e. arrays work differently than maps. we'd then have:\n //\n // ╒═══════════════════ Iterator layout (32-bit) ══════════════════╕\n // 3 2 1\n // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n // ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n // │ index │\n // ├─────────────────────────────────────────────────────────┬───┬─┤\n // │ reference │ 0 │D│\n // └─────────────────────────────────────────────────────────┴───┴─┘\n // D: Done flag\n\n // get value(this: u64): T {\n // ?\n // }\n\n // next(this: u64): Iterator {\n // ?\n // }\n\n done(this: u64): bool {\n return (this & 1);\n }\n}\n", + "map": "/// \n\nimport { HASH } from \"./util/hash\";\nimport { E_KEYNOTFOUND } from \"./util/error\";\n\n// A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht\n\n// @ts-ignore: decorator\n@inline const INITIAL_CAPACITY = 4;\n\n// @ts-ignore: decorator\n@inline const FILL_FACTOR_N = 8;\n\n// @ts-ignore: decorator\n@inline const FILL_FACTOR_D = 3;\n\n// @ts-ignore: decorator\n@inline const FREE_FACTOR_N = 3;\n\n// @ts-ignore: decorator\n@inline const FREE_FACTOR_D = 4;\n\n/** Structure of a map entry. */\n@unmanaged class MapEntry {\n key: K;\n value: V;\n taggedNext: usize; // LSB=1 indicates EMPTY\n}\n\n/** Empty bit. */\n// @ts-ignore: decorator\n@inline const EMPTY: usize = 1 << 0;\n\n/** Size of a bucket. */\n// @ts-ignore: decorator\n@inline const BUCKET_SIZE = sizeof();\n\n/** Computes the alignment of an entry. */\n// @ts-ignore: decorator\n@inline\nfunction ENTRY_ALIGN(): usize {\n // can align to 4 instead of 8 if 32-bit and K/V is <= 32-bits\n const maxkv = sizeof() > sizeof() ? sizeof() : sizeof();\n const align = (maxkv > sizeof() ? maxkv : sizeof()) - 1;\n return align;\n}\n\n/** Computes the aligned size of an entry. */\n// @ts-ignore: decorator\n@inline\nfunction ENTRY_SIZE(): usize {\n const align = ENTRY_ALIGN();\n const size = (offsetof>() + align) & ~align;\n return size;\n}\n\nexport class Map {\n\n // buckets referencing their respective first entry, usize[bucketsMask + 1]\n private buckets: ArrayBuffer = new ArrayBuffer(INITIAL_CAPACITY * BUCKET_SIZE);\n private bucketsMask: u32 = INITIAL_CAPACITY - 1;\n\n // entries in insertion order, MapEntry[entriesCapacity]\n private entries: ArrayBuffer = new ArrayBuffer(INITIAL_CAPACITY * ENTRY_SIZE());\n private entriesCapacity: i32 = INITIAL_CAPACITY;\n private entriesOffset: i32 = 0;\n private entriesCount: i32 = 0;\n\n constructor() {\n /* nop */\n }\n\n get size(): i32 {\n return this.entriesCount;\n }\n\n clear(): void {\n this.buckets = new ArrayBuffer(INITIAL_CAPACITY * BUCKET_SIZE);\n this.bucketsMask = INITIAL_CAPACITY - 1;\n this.entries = new ArrayBuffer(INITIAL_CAPACITY * ENTRY_SIZE());\n this.entriesCapacity = INITIAL_CAPACITY;\n this.entriesOffset = 0;\n this.entriesCount = 0;\n }\n\n private find(key: K, hashCode: u32): MapEntry | null {\n var entry = load>( // unmanaged!\n changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE\n );\n while (entry) {\n let taggedNext = entry.taggedNext;\n if (!(taggedNext & EMPTY) && entry.key == key) return entry;\n entry = changetype>(taggedNext & ~EMPTY);\n }\n return null;\n }\n\n has(key: K): bool {\n return this.find(key, HASH(key)) !== null;\n }\n\n @operator(\"[]\")\n get(key: K): V {\n var entry = this.find(key, HASH(key));\n if (!entry) throw new Error(E_KEYNOTFOUND); // cannot represent `undefined`\n return entry.value;\n }\n\n @operator(\"[]=\")\n set(key: K, value: V): this {\n var hashCode = HASH(key);\n var entry = this.find(key, hashCode); // unmanaged!\n if (entry) {\n entry.value = value;\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n } else {\n // check if rehashing is necessary\n if (this.entriesOffset == this.entriesCapacity) {\n this.rehash(\n this.entriesCount < this.entriesCapacity * FREE_FACTOR_N / FREE_FACTOR_D\n ? this.bucketsMask // just rehash if 1/4+ entries are empty\n : (this.bucketsMask << 1) | 1 // grow capacity to next 2^N\n );\n }\n // append new entry\n let entries = this.entries;\n entry = changetype>(changetype(entries) + (this.entriesOffset++) * ENTRY_SIZE());\n // link with the map\n entry.key = key;\n if (isManaged()) {\n __link(changetype(this), changetype(key), true);\n }\n entry.value = value;\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n ++this.entriesCount;\n // link with previous entry in bucket\n let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE;\n entry.taggedNext = load(bucketPtrBase);\n store(bucketPtrBase, changetype(entry));\n }\n return this;\n }\n\n delete(key: K): bool {\n var entry = this.find(key, HASH(key));\n if (!entry) return false;\n entry.taggedNext |= EMPTY;\n --this.entriesCount;\n // check if rehashing is appropriate\n var halfBucketsMask = this.bucketsMask >> 1;\n if (\n halfBucketsMask + 1 >= max(INITIAL_CAPACITY, this.entriesCount) &&\n this.entriesCount < this.entriesCapacity * FREE_FACTOR_N / FREE_FACTOR_D\n ) this.rehash(halfBucketsMask);\n return true;\n }\n\n private rehash(newBucketsMask: u32): void {\n var newBucketsCapacity = (newBucketsMask + 1);\n var newBuckets = new ArrayBuffer(newBucketsCapacity * BUCKET_SIZE);\n var newEntriesCapacity = newBucketsCapacity * FILL_FACTOR_N / FILL_FACTOR_D;\n var newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE());\n\n // copy old entries to new entries\n var oldPtr = changetype(this.entries);\n var oldEnd = oldPtr + this.entriesOffset * ENTRY_SIZE();\n var newPtr = changetype(newEntries);\n while (oldPtr != oldEnd) {\n let oldEntry = changetype>(oldPtr);\n if (!(oldEntry.taggedNext & EMPTY)) {\n let newEntry = changetype>(newPtr);\n let oldEntryKey = oldEntry.key;\n newEntry.key = oldEntryKey;\n newEntry.value = oldEntry.value;\n let newBucketIndex = HASH(oldEntryKey) & newBucketsMask;\n let newBucketPtrBase = changetype(newBuckets) + newBucketIndex * BUCKET_SIZE;\n newEntry.taggedNext = load(newBucketPtrBase);\n store(newBucketPtrBase, newPtr);\n newPtr += ENTRY_SIZE();\n }\n oldPtr += ENTRY_SIZE();\n }\n\n this.buckets = newBuckets;\n this.bucketsMask = newBucketsMask;\n this.entries = newEntries;\n this.entriesCapacity = newEntriesCapacity;\n this.entriesOffset = this.entriesCount;\n }\n\n keys(): K[] {\n // FIXME: this is preliminary, needs iterators/closures\n var start = changetype(this.entries);\n var size = this.entriesOffset;\n var keys = new Array(size);\n var length = 0;\n for (let i = 0; i < size; ++i) {\n let entry = changetype>(start + i * ENTRY_SIZE());\n if (!(entry.taggedNext & EMPTY)) {\n keys[length++] = entry.key;\n }\n }\n keys.length = length;\n return keys;\n }\n\n values(): V[] {\n // FIXME: this is preliminary, needs iterators/closures\n var start = changetype(this.entries);\n var size = this.entriesOffset;\n var values = new Array(size);\n var length = 0;\n for (let i = 0; i < size; ++i) {\n let entry = changetype>(start + i * ENTRY_SIZE());\n if (!(entry.taggedNext & EMPTY)) {\n values[length++] = entry.value;\n }\n }\n values.length = length;\n return values;\n }\n\n toString(): string {\n return \"[object Map]\";\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n __visit(changetype(this.buckets), cookie);\n var entries = changetype(this.entries);\n if (isManaged() || isManaged()) {\n let cur = entries;\n let end = cur + this.entriesOffset * ENTRY_SIZE();\n while (cur < end) {\n let entry = changetype>(cur);\n if (!(entry.taggedNext & EMPTY)) {\n if (isManaged()) {\n let val = changetype(entry.key);\n if (isNullable()) {\n if (val) __visit(val, cookie);\n } else __visit(val, cookie);\n }\n if (isManaged()) {\n let val = changetype(entry.value);\n if (isNullable()) {\n if (val) __visit(val, cookie);\n } else __visit(val, cookie);\n }\n }\n cur += ENTRY_SIZE();\n }\n }\n __visit(entries, cookie);\n }\n}\n", + "math": "import * as JSMath from \"./bindings/Math\";\nexport { JSMath };\n\nimport {\n pow_lut, exp_lut, exp2_lut, log_lut, log2_lut,\n powf_lut, expf_lut, exp2f_lut, logf_lut, log2f_lut\n} from \"./util/math\";\n\nimport {\n abs as builtin_abs,\n ceil as builtin_ceil,\n clz as builtin_clz,\n copysign as builtin_copysign,\n floor as builtin_floor,\n max as builtin_max,\n min as builtin_min,\n sqrt as builtin_sqrt,\n trunc as builtin_trunc\n} from \"./builtins\";\n\n// SUN COPYRIGHT NOTICE\n//\n// Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n// Developed at SunPro, a Sun Microsystems, Inc. business.\n// Permission to use, copy, modify, and distribute this software\n// is freely granted, provided that this notice is preserved.\n//\n// Applies to all functions marked with a comment referring here.\n\n/** @internal */\n// @ts-ignore: decorator\n@lazy var rempio2_y0: f64, rempio2_y1: f64, res128_hi: u64;\n\n/** @internal */\n// @ts-ignore: decorator\n@lazy @inline const PIO2_TABLE = memory.data([\n 0x00000000A2F9836E, 0x4E441529FC2757D1, 0xF534DDC0DB629599, 0x3C439041FE5163AB,\n 0xDEBBC561B7246E3A, 0x424DD2E006492EEA, 0x09D1921CFE1DEB1C, 0xB129A73EE88235F5,\n 0x2EBB4484E99C7026, 0xB45F7E413991D639, 0x835339F49C845F8B, 0xBDF9283B1FF897FF,\n 0xDE05980FEF2F118B, 0x5A0A6D1F6D367ECF, 0x27CB09B74F463F66, 0x9E5FEA2D7527BAC7,\n 0xEBE5F17B3D0739F7, 0x8A5292EA6BFB5FB1, 0x1F8D5D0856033046, 0xFC7B6BABF0CFBC20,\n 0x9AF4361DA9E39161, 0x5EE61B086599855F, 0x14A068408DFFD880, 0x4D73273106061557\n]);\n\n/** @internal */\nfunction R(z: f64): f64 { // Rational approximation of (asin(x)-x)/x^3\n const // see: musl/src/math/asin.c and SUN COPYRIGHT NOTICE above\n pS0 = reinterpret(0x3FC5555555555555), // 1.66666666666666657415e-01\n pS1 = reinterpret(0xBFD4D61203EB6F7D), // -3.25565818622400915405e-01\n pS2 = reinterpret(0x3FC9C1550E884455), // 2.01212532134862925881e-01\n pS3 = reinterpret(0xBFA48228B5688F3B), // -4.00555345006794114027e-02\n pS4 = reinterpret(0x3F49EFE07501B288), // 7.91534994289814532176e-04\n pS5 = reinterpret(0x3F023DE10DFDF709), // 3.47933107596021167570e-05\n qS1 = reinterpret(0xC0033A271C8A2D4B), // -2.40339491173441421878e+00\n qS2 = reinterpret(0x40002AE59C598AC8), // 2.02094576023350569471e+00\n qS3 = reinterpret(0xBFE6066C1B8D0159), // -6.88283971605453293030e-01\n qS4 = reinterpret(0x3FB3B8C5B12E9282); // 7.70381505559019352791e-02\n\n var p = z * (pS0 + z * (pS1 + z * (pS2 + z * (pS3 + z * (pS4 + z * pS5)))));\n var q = 1.0 + z * (qS1 + z * (qS2 + z * (qS3 + z * qS4)));\n return p / q;\n}\n\n/** @internal */\n// @ts-ignore: decorator\n@inline\nfunction expo2(x: f64, sign: f64): f64 { // exp(x)/2 for x >= log(DBL_MAX)\n const // see: musl/src/math/__expo2.c\n k = 2043,\n kln2 = reinterpret(0x40962066151ADD8B); // 0x1.62066151add8bp+10\n var scale = reinterpret(((0x3FF + k / 2) << 20) << 32);\n // in directed rounding correct sign before rounding or overflow is important\n return NativeMath.exp(x - kln2) * (sign * scale) * scale;\n}\n\n/** @internal */\n/* Helper function to eventually get bits of π/2 * |x|\n *\n * y = π/4 * (frac << clz(frac) >> 11)\n * return clz(frac)\n *\n * Right shift 11 bits to make upper half fit in `double`\n */\n// @ts-ignore: decorator\n@inline\nfunction pio2_right(q0: u64, q1: u64): u64 { // see: jdh8/metallic/blob/master/src/math/double/rem_pio2.c\n // Bits of π/4\n const p0: u64 = 0xC4C6628B80DC1CD1;\n const p1: u64 = 0xC90FDAA22168C234;\n\n const Ox1p_64 = reinterpret(0x3BF0000000000000); // 0x1p-64\n const Ox1p_75 = reinterpret(0x3B40000000000000); // 0x1p-75\n\n var shift = clz(q1);\n\n q1 = q1 << shift | q0 >> (64 - shift);\n q0 <<= shift;\n\n var lo = umuldi(p1, q1);\n var hi = res128_hi;\n\n var ahi = hi >> 11;\n var alo = lo >> 11 | hi << 53;\n var blo = (Ox1p_75 * p0 * q1 + Ox1p_75 * p1 * q0);\n\n rempio2_y0 = (ahi + u64(lo < blo));\n rempio2_y1 = Ox1p_64 * (alo + blo);\n\n return shift;\n}\n\n/** @internal */\n// @ts-ignore: decorator\n@inline\nfunction umuldi(u: u64, v: u64): u64 {\n var u1: u64 , v1: u64, w0: u64, w1: u64, t: u64;\n\n u1 = u & 0xFFFFFFFF;\n v1 = v & 0xFFFFFFFF;\n\n u >>= 32;\n v >>= 32;\n\n t = u1 * v1;\n w0 = t & 0xFFFFFFFF;\n t = u * v1 + (t >> 32);\n w1 = t >> 32;\n t = u1 * v + (t & 0xFFFFFFFF);\n\n res128_hi = u * v + w1 + (t >> 32);\n return (t << 32) + w0;\n}\n\n/** @internal */\nfunction pio2_large_quot(x: f64, u: i64): i32 { // see: jdh8/metallic/blob/master/src/math/double/rem_pio2.c\n var magnitude = u & 0x7FFFFFFFFFFFFFFF;\n var offset = (magnitude >> 52) - 1045;\n var shift = offset & 63;\n var tblPtr = PIO2_TABLE + ((offset >> 6) << 3);\n var s0: u64, s1: u64, s2: u64;\n\n var b0 = load(tblPtr, 0 << 3);\n var b1 = load(tblPtr, 1 << 3);\n var b2 = load(tblPtr, 2 << 3);\n\n // Get 192 bits of 0x1p-31 / π with `offset` bits skipped\n if (shift) {\n let rshift = 64 - shift;\n let b3 = load(tblPtr, 3 << 3);\n s0 = b1 >> rshift | b0 << shift;\n s1 = b2 >> rshift | b1 << shift;\n s2 = b3 >> rshift | b2 << shift;\n } else {\n s0 = b0;\n s1 = b1;\n s2 = b2;\n }\n\n var significand = (u & 0x000FFFFFFFFFFFFF) | 0x0010000000000000;\n\n // First 128 bits of fractional part of x/(2π)\n var blo = umuldi(s1, significand);\n var bhi = res128_hi;\n\n var ahi = s0 * significand;\n var clo = (s2 >> 32) * (significand >> 32);\n var plo = blo + clo;\n var phi = ahi + bhi + u64(plo < clo);\n\n // r: u128 = p << 2\n var rlo = plo << 2;\n var rhi = phi << 2 | plo >> 62;\n\n // s: i128 = r >> 127\n var slo = rhi >> 63;\n var shi = slo >> 1;\n var q = (phi >> 62) - slo;\n\n var shifter = 0x3CB0000000000000 - (pio2_right(rlo ^ slo, rhi ^ shi) << 52);\n var signbit = (u ^ rhi) & 0x8000000000000000;\n var coeff = reinterpret(shifter | signbit);\n\n rempio2_y0 *= coeff;\n rempio2_y1 *= coeff;\n\n return q;\n}\n\n/** @internal */\n// @ts-ignore: decorator\n@inline\nfunction rempio2(x: f64, u: u64, sign: i32): i32 {\n const\n pio2_1 = reinterpret(0x3FF921FB54400000), // 1.57079632673412561417e+00\n pio2_1t = reinterpret(0x3DD0B4611A626331), // 6.07710050650619224932e-11\n pio2_2 = reinterpret(0x3DD0B4611A600000), // 6.07710050630396597660e-11\n pio2_2t = reinterpret(0x3BA3198A2E037073), // 2.02226624879595063154e-21\n pio2_3 = reinterpret(0x3BA3198A2E000000), // 2.02226624871116645580e-21\n pio2_3t = reinterpret(0x397B839A252049C1), // 8.47842766036889956997e-32\n invpio2 = reinterpret(0x3FE45F306DC9C883); // 0.63661977236758134308\n\n var ix = (u >> 32) & 0x7FFFFFFF;\n\n if (ASC_SHRINK_LEVEL < 1) {\n if (ix < 0x4002D97C) { // |x| < 3pi/4, special case with n=+-1\n let q = 1, z: f64, y0: f64, y1: f64;\n if (!sign) {\n z = x - pio2_1;\n if (ix != 0x3FF921FB) { // 33+53 bit pi is good enough\n y0 = z - pio2_1t;\n y1 = (z - y0) - pio2_1t;\n } else { // near pi/2, use 33+33+53 bit pi\n z -= pio2_2;\n y0 = z - pio2_2t;\n y1 = (z - y0) - pio2_2t;\n }\n } else { // negative x\n z = x + pio2_1;\n if (ix != 0x3FF921FB) { // 33+53 bit pi is good enough\n y0 = z + pio2_1t;\n y1 = (z - y0) + pio2_1t;\n } else { // near pi/2, use 33+33+53 bit pi\n z += pio2_2;\n y0 = z + pio2_2t;\n y1 = (z - y0) + pio2_2t;\n }\n q = -1;\n }\n rempio2_y0 = y0;\n rempio2_y1 = y1;\n return q;\n }\n }\n\n if (ix < 0x413921FB) { // |x| ~< 2^20*pi/2 (1647099)\n // Use precise Cody Waite scheme\n let q = nearest(x * invpio2);\n let r = x - q * pio2_1;\n let w = q * pio2_1t; // 1st round good to 85 bit\n let j = ix >> 20;\n let y0 = r - w;\n let hi = (reinterpret(y0) >> 32);\n let i = j - ((hi >> 20) & 0x7FF);\n\n if (i > 16) { // 2nd iteration needed, good to 118\n let t = r;\n w = q * pio2_2;\n r = t - w;\n w = q * pio2_2t - ((t - r) - w);\n y0 = r - w;\n hi = (reinterpret(y0) >> 32);\n i = j - ((hi >> 20) & 0x7FF);\n if (i > 49) { // 3rd iteration need, 151 bits acc\n let t = r;\n w = q * pio2_3;\n r = t - w;\n w = q * pio2_3t - ((t - r) - w);\n y0 = r - w;\n }\n }\n let y1 = (r - y0) - w;\n rempio2_y0 = y0;\n rempio2_y1 = y1;\n return q;\n }\n var q = pio2_large_quot(x, u);\n return select(-q, q, sign);\n}\n\n/** @internal */\n// @ts-ignore: decorator\n@inline\nfunction sin_kern(x: f64, y: f64, iy: i32): f64 { // see: musl/tree/src/math/__sin.c\n const\n S1 = reinterpret(0xBFC5555555555549), // -1.66666666666666324348e-01\n S2 = reinterpret(0x3F8111111110F8A6), // 8.33333333332248946124e-03\n S3 = reinterpret(0xBF2A01A019C161D5), // -1.98412698298579493134e-04\n S4 = reinterpret(0x3EC71DE357B1FE7D), // 2.75573137070700676789e-06\n S5 = reinterpret(0xBE5AE5E68A2B9CEB), // -2.50507602534068634195e-08\n S6 = reinterpret(0x3DE5D93A5ACFD57C); // 1.58969099521155010221e-10\n\n var z = x * x;\n var w = z * z;\n var r = S2 + z * (S3 + z * S4) + z * w * (S5 + z * S6);\n var v = z * x;\n if (!iy) {\n return x + v * (S1 + z * r);\n } else {\n return x - ((z * (0.5 * y - v * r) - y) - v * S1);\n }\n}\n\n/** @internal */\n// @ts-ignore: decorator\n@inline\nfunction cos_kern(x: f64, y: f64): f64 { // see: musl/tree/src/math/__cos.c\n const\n C1 = reinterpret(0x3FA555555555554C), // 4.16666666666666019037e-02\n C2 = reinterpret(0xBF56C16C16C15177), // -1.38888888888741095749e-03\n C3 = reinterpret(0x3EFA01A019CB1590), // 2.48015872894767294178e-05\n C4 = reinterpret(0xBE927E4F809C52AD), // -2.75573143513906633035e-07\n C5 = reinterpret(0x3E21EE9EBDB4B1C4), // 2.08757232129817482790e-09\n C6 = reinterpret(0xBDA8FAE9BE8838D4); // -1.13596475577881948265e-11\n\n var z = x * x;\n var w = z * z;\n var r = z * (C1 + z * (C2 + z * C3)) + w * w * (C4 + z * (C5 + z * C6));\n var hz = 0.5 * z;\n w = 1.0 - hz;\n return w + (((1.0 - w) - hz) + (z * r - x * y));\n}\n\n/** @internal */\nfunction tan_kern(x: f64, y: f64, iy: i32): f64 { // see: src/lib/msun/src/k_tan.c\n const\n T0 = reinterpret(0x3FD5555555555563), // 3.33333333333334091986e-01\n T1 = reinterpret(0x3FC111111110FE7A), // 1.33333333333201242699e-01\n T2 = reinterpret(0x3FABA1BA1BB341FE), // 5.39682539762260521377e-02\n T3 = reinterpret(0x3F9664F48406D637), // 2.18694882948595424599e-02\n T4 = reinterpret(0x3F8226E3E96E8493), // 8.86323982359930005737e-03\n T5 = reinterpret(0x3F6D6D22C9560328), // 3.59207910759131235356e-03\n T6 = reinterpret(0x3F57DBC8FEE08315), // 1.45620945432529025516e-03\n T7 = reinterpret(0x3F4344D8F2F26501), // 5.88041240820264096874e-04\n T8 = reinterpret(0x3F3026F71A8D1068), // 2.46463134818469906812e-04\n T9 = reinterpret(0x3F147E88A03792A6), // 7.81794442939557092300e-05\n T10 = reinterpret(0x3F12B80F32F0A7E9), // 7.14072491382608190305e-05\n T11 = reinterpret(0xBEF375CBDB605373), // -1.85586374855275456654e-05\n T12 = reinterpret(0x3EFB2A7074BF7AD4); // 2.59073051863633712884e-05\n\n const\n one = reinterpret(0x3FF0000000000000), // 1.00000000000000000000e+00\n pio4 = reinterpret(0x3FE921FB54442D18), // 7.85398163397448278999e-01\n pio4lo = reinterpret(0x3C81A62633145C07); // 3.06161699786838301793e-17\n\n var z: f64, r: f64, v: f64, w: f64, s: f64;\n var hx = (reinterpret(x) >> 32); // high word of x\n var ix = hx & 0x7FFFFFFF; // high word of |x|\n var big = ix >= 0x3FE59428;\n if (big) { // |x| >= 0.6744\n if (hx < 0) { x = -x, y = -y; }\n z = pio4 - x;\n w = pio4lo - y;\n x = z + w;\n y = 0.0;\n }\n z = x * x;\n w = z * z;\n r = T1 + w * (T3 + w * (T5 + w * (T7 + w * (T9 + w * T11))));\n v = z * (T2 + w * (T4 + w * (T6 + w * (T8 + w * (T10 + w * T12)))));\n s = z * x;\n r = y + z * (s * (r + v) + y);\n r += T0 * s;\n w = x + r;\n if (big) {\n v = iy;\n return (1 - ((hx >> 30) & 2)) * (v - 2.0 * (x - (w * w / (w + v) - r)));\n }\n if (iy == 1) return w;\n var a: f64, t: f64;\n z = w;\n z = reinterpret(reinterpret(z) & 0xFFFFFFFF00000000);\n v = r - (z - x); // z + v = r + x\n t = a = -one / w; // a = -1.0 / w\n t = reinterpret(reinterpret(t) & 0xFFFFFFFF00000000);\n s = one + t * z;\n return t + a * (s + t * v);\n}\n\n/** @internal */\nfunction dtoi32(x: f64): i32 {\n if (ASC_SHRINK_LEVEL > 0) {\n const inv32 = 1.0 / 4294967296;\n return (x - 4294967296 * floor(x * inv32));\n } else {\n let result = 0;\n let u = reinterpret(x);\n let e = (u >> 52) & 0x7FF;\n if (e <= 1023 + 30) {\n result = x;\n } else if (e <= 1023 + 30 + 53) {\n let v = (u & ((1 << 52) - 1)) | (1 << 52);\n v = v << e - 1023 - 52 + 32;\n result = (v >> 32);\n result = select(-result, result, u >> 63);\n }\n return result;\n }\n}\n\n// @ts-ignore: decorator\n@lazy var random_seeded = false;\n\n// @ts-ignore: decorator\n@lazy var random_state0_64: u64, random_state1_64: u64;\n\n// @ts-ignore: decorator\n@lazy var random_state0_32: u32, random_state1_32: u32;\n\nfunction murmurHash3(h: u64): u64 { // Force all bits of a hash block to avalanche\n h ^= h >> 33; // see: https://github.com/aappleby/smhasher\n h *= 0xFF51AFD7ED558CCD;\n h ^= h >> 33;\n h *= 0xC4CEB9FE1A85EC53;\n h ^= h >> 33;\n return h;\n}\n\nfunction splitMix32(h: u32): u32 {\n h += 0x6D2B79F5;\n h = (h ^ (h >> 15)) * (h | 1);\n h ^= h + (h ^ (h >> 7)) * (h | 61);\n return h ^ (h >> 14);\n}\n\nexport namespace NativeMath {\n\n // @ts-ignore: decorator\n @lazy\n export const E = reinterpret(0x4005BF0A8B145769); // 2.7182818284590452354\n\n // @ts-ignore: decorator\n @lazy\n export const LN2 = reinterpret(0x3FE62E42FEFA39EF); // 0.69314718055994530942\n\n // @ts-ignore: decorator\n @lazy\n export const LN10 = reinterpret(0x40026BB1BBB55516); // 2.30258509299404568402\n\n // @ts-ignore: decorator\n @lazy\n export const LOG2E = reinterpret(0x3FF71547652B82FE); // 1.4426950408889634074\n\n // @ts-ignore: decorator\n @lazy\n export const LOG10E = reinterpret(0x3FDBCB7B1526E50E); // 0.43429448190325182765\n\n // @ts-ignore: decorator\n @lazy\n export const PI = reinterpret(0x400921FB54442D18); // 3.14159265358979323846\n\n // @ts-ignore: decorator\n @lazy\n export const SQRT1_2 = reinterpret(0x3FE6A09E667F3BCD); // 0.70710678118654752440\n\n // @ts-ignore: decorator\n @lazy\n export const SQRT2 = reinterpret(0x3FF6A09E667F3BCD); // 1.41421356237309504880\n\n // @ts-ignore: decorator\n @lazy\n export var sincos_sin: f64 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export var sincos_cos: f64 = 0;\n\n // @ts-ignore: decorator\n @inline export function abs(x: f64): f64 {\n return builtin_abs(x);\n }\n\n export function acos(x: f64): f64 { // see: musl/src/math/acos.c and SUN COPYRIGHT NOTICE above\n const\n pio2_hi = reinterpret(0x3FF921FB54442D18), // 1.57079632679489655800e+00\n pio2_lo = reinterpret(0x3C91A62633145C07), // 6.12323399573676603587e-17\n Ox1p_120f = reinterpret(0x03800000);\n\n var hx = (reinterpret(x) >> 32);\n var ix = hx & 0x7FFFFFFF;\n if (ix >= 0x3FF00000) {\n let lx = reinterpret(x);\n if ((ix - 0x3FF00000 | lx) == 0) {\n if (hx >> 31) return 2 * pio2_hi + Ox1p_120f;\n return 0;\n }\n return 0 / (x - x);\n }\n if (ix < 0x3FE00000) {\n if (ix <= 0x3C600000) return pio2_hi + Ox1p_120f;\n return pio2_hi - (x - (pio2_lo - x * R(x * x)));\n }\n var s: f64, w: f64, z: f64;\n if (hx >> 31) {\n // z = (1.0 + x) * 0.5;\n z = 0.5 + x * 0.5;\n s = builtin_sqrt(z);\n w = R(z) * s - pio2_lo;\n return 2 * (pio2_hi - (s + w));\n }\n // z = (1.0 - x) * 0.5;\n z = 0.5 - x * 0.5;\n s = builtin_sqrt(z);\n var df = reinterpret(reinterpret(s) & 0xFFFFFFFF00000000);\n var c = (z - df * df) / (s + df);\n w = R(z) * s + c;\n return 2 * (df + w);\n }\n\n export function acosh(x: f64): f64 { // see: musl/src/math/acosh.c\n const s = reinterpret(0x3FE62E42FEFA39EF);\n var u = reinterpret(x);\n // Prevent propagation for all input values less than 1.0.\n // Note musl lib didn't fix this yet.\n if (u < 0x3FF0000000000000) return (x - x) / 0.0;\n var e = u >> 52 & 0x7FF;\n if (e < 0x3FF + 1) return log1p(x - 1 + builtin_sqrt((x - 1) * (x - 1) + 2 * (x - 1)));\n if (e < 0x3FF + 26) return log(2 * x - 1 / (x + builtin_sqrt(x * x - 1)));\n return log(x) + s;\n }\n\n export function asin(x: f64): f64 { // see: musl/src/math/asin.c and SUN COPYRIGHT NOTICE above\n const\n pio2_hi = reinterpret(0x3FF921FB54442D18), // 1.57079632679489655800e+00\n pio2_lo = reinterpret(0x3C91A62633145C07), // 6.12323399573676603587e-17\n Ox1p_120f = reinterpret(0x03800000);\n\n var hx = (reinterpret(x) >> 32);\n var ix = hx & 0x7FFFFFFF;\n if (ix >= 0x3FF00000) {\n let lx = reinterpret(x);\n if ((ix - 0x3FF00000 | lx) == 0) return x * pio2_hi + Ox1p_120f;\n return 0 / (x - x);\n }\n if (ix < 0x3FE00000) {\n if (ix < 0x3E500000 && ix >= 0x00100000) return x;\n return x + x * R(x * x);\n }\n // var z = (1.0 - builtin_abs(x)) * 0.5;\n var z = 0.5 - builtin_abs(x) * 0.5;\n var s = builtin_sqrt(z);\n var r = R(z);\n if (ix >= 0x3FEF3333) x = pio2_hi - (2 * (s + s * r) - pio2_lo);\n else {\n let f = reinterpret(reinterpret(s) & 0xFFFFFFFF00000000);\n let c = (z - f * f) / (s + f);\n x = 0.5 * pio2_hi - (2 * s * r - (pio2_lo - 2 * c) - (0.5 * pio2_hi - 2 * f));\n }\n if (hx >> 31) return -x;\n return x;\n }\n\n export function asinh(x: f64): f64 { // see: musl/src/math/asinh.c\n const c = reinterpret(0x3FE62E42FEFA39EF); // 0.693147180559945309417232121458176568\n var u = reinterpret(x);\n var e = u >> 52 & 0x7FF;\n var y = reinterpret(u & 0x7FFFFFFFFFFFFFFF);\n if (e >= 0x3FF + 26) y = log(y) + c;\n else if (e >= 0x3FF + 1) y = log(2 * y + 1 / (builtin_sqrt(y * y + 1) + y));\n else if (e >= 0x3FF - 26) y = log1p(y + y * y / (builtin_sqrt(y * y + 1) + 1));\n return builtin_copysign(y, x);\n }\n\n export function atan(x: f64): f64 { // see musl/src/math/atan.c and SUN COPYRIGHT NOTICE above\n const\n atanhi0 = reinterpret(0x3FDDAC670561BB4F), // 4.63647609000806093515e-01\n atanhi1 = reinterpret(0x3FE921FB54442D18), // 7.85398163397448278999e-01\n atanhi2 = reinterpret(0x3FEF730BD281F69B), // 9.82793723247329054082e-01\n atanhi3 = reinterpret(0x3FF921FB54442D18), // 1.57079632679489655800e+00\n atanlo0 = reinterpret(0x3C7A2B7F222F65E2), // 2.26987774529616870924e-17\n atanlo1 = reinterpret(0x3C81A62633145C07), // 3.06161699786838301793e-17\n atanlo2 = reinterpret(0x3C7007887AF0CBBD), // 1.39033110312309984516e-17\n atanlo3 = reinterpret(0x3C91A62633145C07), // 6.12323399573676603587e-17\n aT0 = reinterpret(0x3FD555555555550D), // 3.33333333333329318027e-01\n aT1 = reinterpret(0xBFC999999998EBC4), // -1.99999999998764832476e-01\n aT2 = reinterpret(0x3FC24924920083FF), // 1.42857142725034663711e-01\n aT3 = reinterpret(0xBFBC71C6FE231671), // -1.11111104054623557880e-01,\n aT4 = reinterpret(0x3FB745CDC54C206E), // 9.09088713343650656196e-02\n aT5 = reinterpret(0xBFB3B0F2AF749A6D), // -7.69187620504482999495e-02\n aT6 = reinterpret(0x3FB10D66A0D03D51), // 6.66107313738753120669e-02\n aT7 = reinterpret(0xBFADDE2D52DEFD9A), // -5.83357013379057348645e-02\n aT8 = reinterpret(0x3FA97B4B24760DEB), // 4.97687799461593236017e-02\n aT9 = reinterpret(0xBFA2B4442C6A6C2F), // -3.65315727442169155270e-02\n aT10 = reinterpret(0x3F90AD3AE322DA11), // 1.62858201153657823623e-02\n Ox1p_120f = reinterpret(0x03800000);\n\n var ix = (reinterpret(x) >> 32);\n var sx = x;\n ix &= 0x7FFFFFFF;\n var z: f64;\n if (ix >= 0x44100000) {\n if (isNaN(x)) return x;\n z = atanhi3 + Ox1p_120f;\n return builtin_copysign(z, sx);\n }\n var id: i32;\n if (ix < 0x3FDC0000) {\n if (ix < 0x3E400000) return x;\n id = -1;\n } else {\n x = builtin_abs(x);\n if (ix < 0x3FF30000) {\n if (ix < 0x3FE60000) {\n id = 0;\n x = (2.0 * x - 1.0) / (2.0 + x);\n } else {\n id = 1;\n x = (x - 1.0) / (x + 1.0);\n }\n } else {\n if (ix < 0x40038000) {\n id = 2;\n x = (x - 1.5) / (1.0 + 1.5 * x);\n } else {\n id = 3;\n x = -1.0 / x;\n }\n }\n }\n z = x * x;\n var w = z * z;\n var s1 = z * (aT0 + w * (aT2 + w * (aT4 + w * (aT6 + w * (aT8 + w * aT10)))));\n var s2 = w * (aT1 + w * (aT3 + w * (aT5 + w * (aT7 + w * aT9))));\n var s3 = x * (s1 + s2);\n if (id < 0) return x - s3;\n switch (id) {\n case 0: { z = atanhi0 - ((s3 - atanlo0) - x); break; }\n case 1: { z = atanhi1 - ((s3 - atanlo1) - x); break; }\n case 2: { z = atanhi2 - ((s3 - atanlo2) - x); break; }\n case 3: { z = atanhi3 - ((s3 - atanlo3) - x); break; }\n default: unreachable();\n }\n return builtin_copysign(z, sx);\n }\n\n export function atanh(x: f64): f64 { // see: musl/src/math/atanh.c\n var u = reinterpret(x);\n var e = u >> 52 & 0x7FF;\n var y = builtin_abs(x);\n if (e < 0x3FF - 1) {\n if (e >= 0x3FF - 32) y = 0.5 * log1p(2 * y + 2 * y * y / (1 - y));\n } else {\n y = 0.5 * log1p(2 * (y / (1 - y)));\n }\n return builtin_copysign(y, x);\n }\n\n export function atan2(y: f64, x: f64): f64 { // see: musl/src/math/atan2.c and SUN COPYRIGHT NOTICE above\n const pi_lo = reinterpret(0x3CA1A62633145C07); // 1.2246467991473531772E-16\n if (isNaN(x) || isNaN(y)) return x + y;\n var u = reinterpret(x);\n var ix = (u >> 32);\n var lx = u;\n u = reinterpret(y);\n var iy = (u >> 32);\n var ly = u;\n if ((ix - 0x3FF00000 | lx) == 0) return atan(y);\n var m = ((iy >> 31) & 1) | ((ix >> 30) & 2);\n ix = ix & 0x7FFFFFFF;\n iy = iy & 0x7FFFFFFF;\n if ((iy | ly) == 0) {\n switch (m) {\n case 0:\n case 1: return y;\n case 2: return PI;\n case 3: return -PI;\n }\n }\n if ((ix | lx) == 0) return m & 1 ? -PI / 2 : PI / 2;\n if (ix == 0x7FF00000) {\n if (iy == 0x7FF00000) {\n let t = m & 2 ? 3 * PI / 4 : PI / 4;\n return m & 1 ? -t : t;\n } else {\n let t = m & 2 ? PI : 0;\n return m & 1 ? -t : t;\n }\n }\n var z: f64;\n if (ix + (64 << 20) < iy || iy == 0x7FF00000) return m & 1 ? -PI / 2 : PI / 2;\n if ((m & 2) && iy + (64 << 20) < ix) z = 0;\n else z = atan(builtin_abs(y / x));\n switch (m) {\n case 0: return z;\n case 1: return -z;\n case 2: return PI - (z - pi_lo);\n case 3: return (z - pi_lo) - PI;\n }\n unreachable();\n return 0;\n }\n\n export function cbrt(x: f64): f64 { // see: musl/src/math/cbrt.c and SUN COPYRIGHT NOTICE above\n const\n B1 = 715094163,\n B2 = 696219795,\n P0 = reinterpret(0x3FFE03E60F61E692), // 1.87595182427177009643\n P1 = reinterpret(0xBFFE28E092F02420), // -1.88497979543377169875\n P2 = reinterpret(0x3FF9F1604A49D6C2), // 1.621429720105354466140\n P3 = reinterpret(0xBFE844CBBEE751D9), // -0.758397934778766047437\n P4 = reinterpret(0x3FC2B000D4E4EDD7), // 0.145996192886612446982\n Ox1p54 = reinterpret(0x4350000000000000); // 0x1p54\n\n var u = reinterpret(x);\n var hx = (u >> 32) & 0x7FFFFFFF;\n if (hx >= 0x7FF00000) return x + x;\n if (hx < 0x00100000) {\n u = reinterpret(x * Ox1p54);\n hx = (u >> 32) & 0x7FFFFFFF;\n if (hx == 0) return x;\n hx = hx / 3 + B2;\n } else {\n hx = hx / 3 + B1;\n }\n u &= 1 << 63;\n u |= hx << 32;\n var t = reinterpret(u);\n var r = (t * t) * (t / x);\n t = t * ((P0 + r * (P1 + r * P2)) + ((r * r) * r) * (P3 + r * P4));\n t = reinterpret((reinterpret(t) + 0x80000000) & 0xFFFFFFFFC0000000);\n var s = t * t;\n r = x / s;\n r = (r - t) / (2 * t + r);\n t = t + t * r;\n return t;\n }\n\n // @ts-ignore: decorator\n @inline\n export function ceil(x: f64): f64 {\n return builtin_ceil(x);\n }\n\n export function clz32(x: f64): f64 {\n if (!isFinite(x)) return 32;\n /*\n * Wasm (MVP) and JS have different approaches for double->int conversions.\n *\n * For emulate JS conversion behavior and avoid trapping from wasm we should modulate by MAX_INT\n * our float-point arguments before actual convertion to integers.\n */\n return builtin_clz(dtoi32(x));\n }\n\n export function cos(x: f64): f64 { // see: musl/src/math/cos.c\n var u = reinterpret(x);\n var ix = (u >> 32);\n var sign = ix >> 31;\n\n ix &= 0x7FFFFFFF;\n\n // |x| ~< pi/4\n if (ix <= 0x3FE921FB) {\n if (ix < 0x3E46A09E) { // |x| < 2**-27 * sqrt(2)\n return 1.0;\n }\n return cos_kern(x, 0);\n }\n\n // sin(Inf or NaN) is NaN\n if (ix >= 0x7FF00000) return x - x;\n\n // argument reduction needed\n var n = rempio2(x, u, sign);\n var y0 = rempio2_y0;\n var y1 = rempio2_y1;\n\n x = n & 1 ? sin_kern(y0, y1, 1) : cos_kern(y0, y1);\n return (n + 1) & 2 ? -x : x;\n }\n\n export function cosh(x: f64): f64 { // see: musl/src/math/cosh.c\n var u = reinterpret(x);\n u &= 0x7FFFFFFFFFFFFFFF;\n x = reinterpret(u);\n var w = (u >> 32);\n var t: f64;\n if (w < 0x3FE62E42) {\n if (w < 0x3FF00000 - (26 << 20)) return 1;\n t = expm1(x);\n // return 1 + t * t / (2 * (1 + t));\n return 1 + t * t / (2 + 2 * t);\n }\n if (w < 0x40862E42) {\n t = exp(x);\n return 0.5 * (t + 1 / t);\n }\n t = expo2(x, 1);\n return t;\n }\n\n export function exp(x: f64): f64 { // see: musl/src/math/exp.c and SUN COPYRIGHT NOTICE above\n if (ASC_SHRINK_LEVEL < 1) {\n return exp_lut(x);\n } else {\n const\n ln2hi = reinterpret(0x3FE62E42FEE00000), // 6.93147180369123816490e-01\n ln2lo = reinterpret(0x3DEA39EF35793C76), // 1.90821492927058770002e-10\n invln2 = reinterpret(0x3FF71547652B82FE), // 1.44269504088896338700e+00\n P1 = reinterpret(0x3FC555555555553E), // 1.66666666666666019037e-01\n P2 = reinterpret(0xBF66C16C16BEBD93), // -2.77777777770155933842e-03\n P3 = reinterpret(0x3F11566AAF25DE2C), // 6.61375632143793436117e-05\n P4 = reinterpret(0xBEBBBD41C5D26BF1), // -1.65339022054652515390e-06\n P5 = reinterpret(0x3E66376972BEA4D0), // 4.13813679705723846039e-08\n overflow = reinterpret(0x40862E42FEFA39EF), // 709.782712893383973096\n underflow = reinterpret(0xC0874910D52D3051), // -745.13321910194110842\n Ox1p1023 = reinterpret(0x7FE0000000000000); // 0x1p1023\n\n let hx = (reinterpret(x) >> 32);\n let sign_ = (hx >> 31);\n hx &= 0x7FFFFFFF;\n if (hx >= 0x4086232B) {\n if (isNaN(x)) return x;\n if (x > overflow) return x * Ox1p1023;\n if (x < underflow) return 0;\n }\n let hi: f64, lo: f64 = 0;\n let k = 0;\n if (hx > 0x3FD62E42) {\n if (hx >= 0x3FF0A2B2) {\n k = (invln2 * x + builtin_copysign(0.5, x));\n } else {\n k = 1 - (sign_ << 1);\n }\n hi = x - k * ln2hi;\n lo = k * ln2lo;\n x = hi - lo;\n } else if (hx > 0x3E300000) {\n hi = x;\n } else return 1.0 + x;\n let xs = x * x;\n // var c = x - xp2 * (P1 + xp2 * (P2 + xp2 * (P3 + xp2 * (P4 + xp2 * P5))));\n let xq = xs * xs;\n let c = x - (xs * P1 + xq * ((P2 + xs * P3) + xq * (P4 + xs * P5)));\n let y = 1.0 + (x * c / (2 - c) - lo + hi);\n return k == 0 ? y : scalbn(y, k);\n }\n }\n\n export function exp2(x: f64): f64 {\n return exp2_lut(x);\n }\n\n export function expm1(x: f64): f64 { // see: musl/src/math/expm1.c and SUN COPYRIGHT NOTICE above\n const\n o_threshold = reinterpret(0x40862E42FEFA39EF), // 7.09782712893383973096e+02\n ln2_hi = reinterpret(0x3FE62E42FEE00000), // 6.93147180369123816490e-01\n ln2_lo = reinterpret(0x3DEA39EF35793C76), // 1.90821492927058770002e-10\n invln2 = reinterpret(0x3FF71547652B82FE), // 1.44269504088896338700e+00\n Q1 = reinterpret(0xBFA11111111110F4), // -3.33333333333331316428e-02\n Q2 = reinterpret(0x3F5A01A019FE5585), // 1.58730158725481460165e-03\n Q3 = reinterpret(0xBF14CE199EAADBB7), // -7.93650757867487942473e-05\n Q4 = reinterpret(0x3ED0CFCA86E65239), // 4.00821782732936239552e-06\n Q5 = reinterpret(0xBE8AFDB76E09C32D), // -2.01099218183624371326e-07\n Ox1p1023 = reinterpret(0x7FE0000000000000); // 0x1p1023\n\n var u = reinterpret(x);\n var hx = (u >> 32 & 0x7FFFFFFF);\n var k = 0, sign_ = (u >> 63);\n if (hx >= 0x4043687A) {\n if (isNaN(x)) return x;\n if (sign_) return -1;\n if (x > o_threshold) return x * Ox1p1023;\n }\n var c = 0.0, t: f64;\n if (hx > 0x3FD62E42) {\n k = select(\n 1 - (sign_ << 1),\n (invln2 * x + builtin_copysign(0.5, x)),\n hx < 0x3FF0A2B2\n );\n t = k;\n let hi = x - t * ln2_hi;\n let lo = t * ln2_lo;\n x = hi - lo;\n c = (hi - x) - lo;\n } else if (hx < 0x3C900000) return x;\n var hfx = 0.5 * x;\n var hxs = x * hfx;\n // var r1 = 1.0 + hxs * (Q1 + hxs * (Q2 + hxs * (Q3 + hxs * (Q4 + hxs * Q5))));\n var hxq = hxs * hxs;\n var r1 = (1.0 + hxs * Q1) + hxq * ((Q2 + hxs * Q3) + hxq * (Q4 + hxs * Q5));\n t = 3.0 - r1 * hfx;\n var e = hxs * ((r1 - t) / (6.0 - x * t));\n if (k == 0) return x - (x * e - hxs);\n e = x * (e - c) - c;\n e -= hxs;\n if (k == -1) return 0.5 * (x - e) - 0.5;\n if (k == 1) {\n if (x < -0.25) return -2.0 * (e - (x + 0.5));\n return 1.0 + 2.0 * (x - e);\n }\n u = (0x3FF + k) << 52;\n var twopk = reinterpret(u);\n var y: f64;\n if (k < 0 || k > 56) {\n y = x - e + 1.0;\n if (k == 1024) y = y * 2.0 * Ox1p1023;\n else y = y * twopk;\n return y - 1.0;\n }\n u = (0x3FF - k) << 52;\n y = reinterpret(u);\n if (k < 20) y = (1 - y) - e;\n else y = 1 - (e + y);\n return (x + y) * twopk;\n }\n\n // @ts-ignore: decorator\n @inline\n export function floor(x: f64): f64 {\n return builtin_floor(x);\n }\n\n // @ts-ignore: decorator\n @inline\n export function fround(x: f64): f64 {\n return x;\n }\n\n export function hypot(x: f64, y: f64): f64 { // see: musl/src/math/hypot.c\n const\n SPLIT = reinterpret(0x41A0000000000000) + 1, // 0x1p27 + 1\n Ox1p700 = reinterpret(0x6BB0000000000000),\n Ox1p_700 = reinterpret(0x1430000000000000);\n\n var ux = reinterpret(x);\n var uy = reinterpret(y);\n ux &= 0x7FFFFFFFFFFFFFFF;\n uy &= 0x7FFFFFFFFFFFFFFF;\n if (ux < uy) {\n let ut = ux;\n ux = uy;\n uy = ut;\n }\n var ex = (ux >> 52);\n var ey = (uy >> 52);\n y = reinterpret(uy);\n if (ey == 0x7FF) return y;\n x = reinterpret(ux);\n if (ex == 0x7FF || uy == 0) return x;\n if (ex - ey > 64) return x + y;\n var z = 1.0;\n if (ex > 0x3FF + 510) {\n z = Ox1p700;\n x *= Ox1p_700;\n y *= Ox1p_700;\n } else if (ey < 0x3FF - 450) {\n z = Ox1p_700;\n x *= Ox1p700;\n y *= Ox1p700;\n }\n var c = x * SPLIT;\n var h = x - c + c;\n var l = x - h;\n var hx = x * x;\n var lx = h * h - hx + (2 * h + l) * l;\n c = y * SPLIT;\n h = y - c + c;\n l = y - h;\n var hy = y * y;\n var ly = h * h - hy + (2 * h + l) * l;\n return z * builtin_sqrt(ly + lx + hy + hx);\n }\n\n export function imul(x: f64, y: f64): f64 {\n /*\n * Wasm (MVP) and JS have different approaches for double->int conversions.\n *\n * For emulate JS conversion behavior and avoid trapping from wasm we should modulate by MAX_INT\n * our float-point arguments before actual convertion to integers.\n */\n if (!isFinite(x + y)) return 0;\n return dtoi32(x) * dtoi32(y);\n }\n\n export function log(x: f64): f64 { // see: musl/src/math/log.c and SUN COPYRIGHT NOTICE above\n if (ASC_SHRINK_LEVEL < 1) {\n return log_lut(x);\n } else {\n const\n ln2_hi = reinterpret(0x3FE62E42FEE00000), // 6.93147180369123816490e-01\n ln2_lo = reinterpret(0x3DEA39EF35793C76), // 1.90821492927058770002e-10\n Lg1 = reinterpret(0x3FE5555555555593), // 6.666666666666735130e-01\n Lg2 = reinterpret(0x3FD999999997FA04), // 3.999999999940941908e-01\n Lg3 = reinterpret(0x3FD2492494229359), // 2.857142874366239149e-01\n Lg4 = reinterpret(0x3FCC71C51D8E78AF), // 2.222219843214978396e-01\n Lg5 = reinterpret(0x3FC7466496CB03DE), // 1.818357216161805012e-01\n Lg6 = reinterpret(0x3FC39A09D078C69F), // 1.531383769920937332e-01\n Lg7 = reinterpret(0x3FC2F112DF3E5244), // 1.479819860511658591e-01\n Ox1p54 = reinterpret(0x4350000000000000); // 0x1p54\n\n let u = reinterpret(x);\n let hx = (u >> 32);\n let k = 0;\n if (hx < 0x00100000 || (hx >> 31)) {\n if (u << 1 == 0) return -1 / (x * x);\n if (hx >> 31) return (x - x) / 0.0;\n k -= 54;\n x *= Ox1p54;\n u = reinterpret(x);\n hx = (u >> 32);\n } else if (hx >= 0x7FF00000) {\n return x;\n } else if (hx == 0x3FF00000 && u << 32 == 0) {\n return 0;\n }\n hx += 0x3FF00000 - 0x3FE6A09E;\n k += (hx >> 20) - 0x3FF;\n hx = (hx & 0x000FFFFF) + 0x3FE6A09E;\n u = hx << 32 | (u & 0xFFFFFFFF);\n x = reinterpret(u);\n let f = x - 1.0;\n let hfsq = 0.5 * f * f;\n let s = f / (2.0 + f);\n let z = s * s;\n let w = z * z;\n let t1 = w * (Lg2 + w * (Lg4 + w * Lg6));\n let t2 = z * (Lg1 + w * (Lg3 + w * (Lg5 + w * Lg7)));\n let r = t2 + t1;\n let dk = k;\n return s * (hfsq + r) + dk * ln2_lo - hfsq + f + dk * ln2_hi;\n }\n }\n\n export function log10(x: f64): f64 { // see: musl/src/math/log10.c and SUN COPYRIGHT NOTICE above\n const\n ivln10hi = reinterpret(0x3FDBCB7B15200000), // 4.34294481878168880939e-01\n ivln10lo = reinterpret(0x3DBB9438CA9AADD5), // 2.50829467116452752298e-11\n log10_2hi = reinterpret(0x3FD34413509F6000), // 3.01029995663611771306e-01\n log10_2lo = reinterpret(0x3D59FEF311F12B36), // 3.69423907715893078616e-13\n Lg1 = reinterpret(0x3FE5555555555593), // 6.666666666666735130e-01\n Lg2 = reinterpret(0x3FD999999997FA04), // 3.999999999940941908e-01\n Lg3 = reinterpret(0x3FD2492494229359), // 2.857142874366239149e-01\n Lg4 = reinterpret(0x3FCC71C51D8E78AF), // 2.222219843214978396e-01\n Lg5 = reinterpret(0x3FC7466496CB03DE), // 1.818357216161805012e-01\n Lg6 = reinterpret(0x3FC39A09D078C69F), // 1.531383769920937332e-01\n Lg7 = reinterpret(0x3FC2F112DF3E5244), // 1.479819860511658591e-01\n Ox1p54 = reinterpret(0x4350000000000000); // 0x1p54\n\n var u = reinterpret(x);\n var hx = (u >> 32);\n var k = 0;\n if (hx < 0x00100000 || (hx >> 31)) {\n if (u << 1 == 0) return -1 / (x * x);\n if (hx >> 31) return (x - x) / 0.0;\n k -= 54;\n x *= Ox1p54;\n u = reinterpret(x);\n hx = (u >> 32);\n } else if (hx >= 0x7FF00000) {\n return x;\n } else if (hx == 0x3FF00000 && u << 32 == 0) {\n return 0;\n }\n hx += 0x3FF00000 - 0x3FE6A09E;\n k += (hx >> 20) - 0x3FF;\n hx = (hx & 0x000FFFFF) + 0x3FE6A09E;\n u = hx << 32 | (u & 0xFFFFFFFF);\n x = reinterpret(u);\n var f = x - 1.0;\n var hfsq = 0.5 * f * f;\n var s = f / (2.0 + f);\n var z = s * s;\n var w = z * z;\n var t1 = w * (Lg2 + w * (Lg4 + w * Lg6));\n var t2 = z * (Lg1 + w * (Lg3 + w * (Lg5 + w * Lg7)));\n var r = t2 + t1;\n var hi = f - hfsq;\n u = reinterpret(hi);\n u &= 0xFFFFFFFF00000000;\n hi = reinterpret(u);\n var lo = f - hi - hfsq + s * (hfsq + r);\n var val_hi = hi * ivln10hi;\n var dk = k;\n var y = dk * log10_2hi;\n var val_lo = dk * log10_2lo + (lo + hi) * ivln10lo + lo * ivln10hi;\n w = y + val_hi;\n val_lo += (y - w) + val_hi;\n return val_lo + w;\n }\n\n export function log1p(x: f64): f64 { // see: musl/src/math/log1p.c and SUN COPYRIGHT NOTICE above\n const\n ln2_hi = reinterpret(0x3FE62E42FEE00000), // 6.93147180369123816490e-01\n ln2_lo = reinterpret(0x3DEA39EF35793C76), // 1.90821492927058770002e-10\n Lg1 = reinterpret(0x3FE5555555555593), // 6.666666666666735130e-01\n Lg2 = reinterpret(0x3FD999999997FA04), // 3.999999999940941908e-01\n Lg3 = reinterpret(0x3FD2492494229359), // 2.857142874366239149e-01\n Lg4 = reinterpret(0x3FCC71C51D8E78AF), // 2.222219843214978396e-01\n Lg5 = reinterpret(0x3FC7466496CB03DE), // 1.818357216161805012e-01\n Lg6 = reinterpret(0x3FC39A09D078C69F), // 1.531383769920937332e-01\n Lg7 = reinterpret(0x3FC2F112DF3E5244); // 1.479819860511658591e-01\n\n var u = reinterpret(x);\n var hx = (u >> 32);\n var k = 1;\n var c = 0.0, f = 0.0;\n if (hx < 0x3FDA827A || (hx >> 31)) {\n if (hx >= 0xBFF00000) {\n if (x == -1) return x / 0.0;\n return (x - x) / 0.0;\n }\n if (hx << 1 < 0x3CA00000 << 1) return x;\n if (hx <= 0xBFD2BEC4) {\n k = 0;\n c = 0;\n f = x;\n }\n } else if (hx >= 0x7FF00000) return x;\n if (k) {\n u = reinterpret(1 + x);\n let hu = (u >> 32);\n hu += 0x3FF00000 - 0x3FE6A09E;\n k = (hu >> 20) - 0x3FF;\n if (k < 54) {\n let uf = reinterpret(u);\n c = k >= 2 ? 1 - (uf - x) : x - (uf - 1);\n c /= uf;\n } else c = 0;\n hu = (hu & 0x000FFFFF) + 0x3FE6A09E;\n u = hu << 32 | (u & 0xFFFFFFFF);\n f = reinterpret(u) - 1;\n }\n var hfsq = 0.5 * f * f;\n var s = f / (2.0 + f);\n var z = s * s;\n var w = z * z;\n var t1 = w * (Lg2 + w * (Lg4 + w * Lg6));\n var t2 = z * (Lg1 + w * (Lg3 + w * (Lg5 + w * Lg7)));\n var r = t2 + t1;\n var dk = k;\n return s * (hfsq + r) + (dk * ln2_lo + c) - hfsq + f + dk * ln2_hi;\n }\n\n export function log2(x: f64): f64 { // see: musl/src/math/log2.c and SUN COPYRIGHT NOTICE above\n if (ASC_SHRINK_LEVEL < 1) {\n return log2_lut(x);\n } else {\n const\n ivln2hi = reinterpret(0x3FF7154765200000), // 1.44269504072144627571e+00\n ivln2lo = reinterpret(0x3DE705FC2EEFA200), // 1.67517131648865118353e-10\n Lg1 = reinterpret(0x3FE5555555555593), // 6.666666666666735130e-01\n Lg2 = reinterpret(0x3FD999999997FA04), // 3.999999999940941908e-01\n Lg3 = reinterpret(0x3FD2492494229359), // 2.857142874366239149e-01\n Lg4 = reinterpret(0x3FCC71C51D8E78AF), // 2.222219843214978396e-01\n Lg5 = reinterpret(0x3FC7466496CB03DE), // 1.818357216161805012e-01\n Lg6 = reinterpret(0x3FC39A09D078C69F), // 1.531383769920937332e-01\n Lg7 = reinterpret(0x3FC2F112DF3E5244), // 1.479819860511658591e-01\n Ox1p54 = reinterpret(0x4350000000000000); // 1p54\n\n let u = reinterpret(x);\n let hx = (u >> 32);\n let k = 0;\n if (hx < 0x00100000 || (hx >> 31)) {\n if (u << 1 == 0) return -1 / (x * x);\n if (hx >> 31) return (x - x) / 0.0;\n k -= 54;\n x *= Ox1p54;\n u = reinterpret(x);\n hx = (u >> 32);\n } else if (hx >= 0x7FF00000) {\n return x;\n } else if (hx == 0x3FF00000 && u << 32 == 0) {\n return 0;\n }\n hx += 0x3FF00000 - 0x3FE6A09E;\n k += (hx >> 20) - 0x3FF;\n hx = (hx & 0x000FFFFF) + 0x3FE6A09E;\n u = hx << 32 | (u & 0xFFFFFFFF);\n x = reinterpret(u);\n let f = x - 1.0;\n let hfsq = 0.5 * f * f;\n let s = f / (2.0 + f);\n let z = s * s;\n let w = z * z;\n let t1 = w * (Lg2 + w * (Lg4 + w * Lg6));\n let t2 = z * (Lg1 + w * (Lg3 + w * (Lg5 + w * Lg7)));\n let r = t2 + t1;\n let hi = f - hfsq;\n u = reinterpret(hi);\n u &= 0xFFFFFFFF00000000;\n hi = reinterpret(u);\n let lo = f - hi - hfsq + s * (hfsq + r);\n let val_hi = hi * ivln2hi;\n let val_lo = (lo + hi) * ivln2lo + lo * ivln2hi;\n let y = k;\n w = y + val_hi;\n val_lo += (y - w) + val_hi;\n val_hi = w;\n return val_lo + val_hi;\n }\n }\n\n // @ts-ignore: decorator\n @inline\n export function max(value1: f64, value2: f64): f64 {\n return builtin_max(value1, value2);\n }\n\n // @ts-ignore: decorator\n @inline\n export function min(value1: f64, value2: f64): f64 {\n return builtin_min(value1, value2);\n }\n\n export function pow(x: f64, y: f64): f64 { // see: musl/src/math/pow.c and SUN COPYRIGHT NOTICE above\n // TODO: remove this fast pathes after introduced own mid-end IR with \"stdlib call simplify\" transforms\n if (builtin_abs(y) <= 2) {\n if (y == 2.0) return x * x;\n if (y == 0.5) {\n return select(\n builtin_abs(builtin_sqrt(x)),\n Infinity,\n x != -Infinity\n );\n }\n if (y == -1.0) return 1 / x;\n if (y == 1.0) return x;\n if (y == 0.0) return 1.0;\n }\n if (ASC_SHRINK_LEVEL < 1) {\n return pow_lut(x, y);\n } else {\n const\n dp_h1 = reinterpret(0x3FE2B80340000000), // 5.84962487220764160156e-01\n dp_l1 = reinterpret(0x3E4CFDEB43CFD006), // 1.35003920212974897128e-08\n two53 = reinterpret(0x4340000000000000), // 9007199254740992.0\n huge = reinterpret(0x7E37E43C8800759C), // 1e+300\n tiny = reinterpret(0x01A56E1FC2F8F359), // 1e-300\n L1 = reinterpret(0x3FE3333333333303), // 5.99999999999994648725e-01\n L2 = reinterpret(0x3FDB6DB6DB6FABFF), // 4.28571428578550184252e-01\n L3 = reinterpret(0x3FD55555518F264D), // 3.33333329818377432918e-01\n L4 = reinterpret(0x3FD17460A91D4101), // 2.72728123808534006489e-01\n L5 = reinterpret(0x3FCD864A93C9DB65), // 2.30660745775561754067e-01\n L6 = reinterpret(0x3FCA7E284A454EEF), // 2.06975017800338417784e-01\n P1 = reinterpret(0x3FC555555555553E), // 1.66666666666666019037e-01\n P2 = reinterpret(0xBF66C16C16BEBD93), // -2.77777777770155933842e-03\n P3 = reinterpret(0x3F11566AAF25DE2C), // 6.61375632143793436117e-05\n P4 = reinterpret(0xBEBBBD41C5D26BF1), // -1.65339022054652515390e-06\n P5 = reinterpret(0x3E66376972BEA4D0), // 4.13813679705723846039e-08\n lg2 = reinterpret(0x3FE62E42FEFA39EF), // 6.93147180559945286227e-01\n lg2_h = reinterpret(0x3FE62E4300000000), // 6.93147182464599609375e-01\n lg2_l = reinterpret(0xBE205C610CA86C39), // -1.90465429995776804525e-09\n ovt = reinterpret(0x3C971547652B82FE), // 8.0085662595372944372e-017\n cp = reinterpret(0x3FEEC709DC3A03FD), // 9.61796693925975554329e-01\n cp_h = reinterpret(0x3FEEC709E0000000), // 9.61796700954437255859e-01\n cp_l = reinterpret(0xBE3E2FE0145B01F5), // -7.02846165095275826516e-09\n ivln2 = reinterpret(0x3FF71547652B82FE), // 1.44269504088896338700e+00\n ivln2_h = reinterpret(0x3FF7154760000000), // 1.44269502162933349609e+00\n ivln2_l = reinterpret(0x3E54AE0BF85DDF44), // 1.92596299112661746887e-08\n inv3 = reinterpret(0x3FD5555555555555); // 0.3333333333333333333333\n\n let u_ = reinterpret(x);\n let hx = (u_ >> 32);\n let lx = u_;\n u_ = reinterpret(y);\n let hy = (u_ >> 32);\n let ly = u_;\n let ix = hx & 0x7FFFFFFF;\n let iy = hy & 0x7FFFFFFF;\n if ((iy | ly) == 0) return 1.0; // x**0 = 1, even if x is NaN\n // if (hx == 0x3FF00000 && lx == 0) return 1.0; // C: 1**y = 1, even if y is NaN, JS: NaN\n if ( // NaN if either arg is NaN\n ix > 0x7FF00000 || (ix == 0x7FF00000 && lx != 0) ||\n iy > 0x7FF00000 || (iy == 0x7FF00000 && ly != 0)\n ) return x + y;\n let yisint = 0, k: i32;\n if (hx < 0) {\n if (iy >= 0x43400000) yisint = 2;\n else if (iy >= 0x3FF00000) {\n k = (iy >> 20) - 0x3FF;\n let offset = select(52, 20, k > 20) - k;\n let Ly = select(ly, iy, k > 20);\n let jj = Ly >> offset;\n if ((jj << offset) == Ly) yisint = 2 - (jj & 1);\n }\n }\n if (ly == 0) {\n if (iy == 0x7FF00000) { // y is +-inf\n if (((ix - 0x3FF00000) | lx) == 0) return NaN; // C: (-1)**+-inf is 1, JS: NaN\n else if (ix >= 0x3FF00000) return hy >= 0 ? y : 0.0; // (|x|>1)**+-inf = inf,0\n else return hy >= 0 ? 0.0 : -y; // (|x|<1)**+-inf = 0,inf\n }\n if (iy == 0x3FF00000) {\n if (hy >= 0) return x;\n return 1 / x;\n }\n if (hy == 0x40000000) return x * x;\n if (hy == 0x3FE00000) {\n if (hx >= 0) return builtin_sqrt(x);\n }\n }\n let ax = builtin_abs(x), z: f64;\n if (lx == 0) {\n if (ix == 0 || ix == 0x7FF00000 || ix == 0x3FF00000) {\n z = ax;\n if (hy < 0) z = 1.0 / z;\n if (hx < 0) {\n if (((ix - 0x3FF00000) | yisint) == 0) {\n let d = z - z;\n z = d / d;\n } else if (yisint == 1) z = -z;\n }\n return z;\n }\n }\n let s = 1.0;\n if (hx < 0) {\n if (yisint == 0) {\n let d = x - x;\n return d / d;\n }\n if (yisint == 1) s = -1.0;\n }\n let t1: f64, t2: f64, p_h: f64, p_l: f64, r: f64, t: f64, u: f64, v: f64, w: f64;\n let j: i32, n: i32;\n if (iy > 0x41E00000) {\n if (iy > 0x43F00000) {\n if (ix <= 0x3FEFFFFF) return hy < 0 ? huge * huge : tiny * tiny;\n if (ix >= 0x3FF00000) return hy > 0 ? huge * huge : tiny * tiny;\n }\n if (ix < 0x3FEFFFFF) return hy < 0 ? s * huge * huge : s * tiny * tiny;\n if (ix > 0x3FF00000) return hy > 0 ? s * huge * huge : s * tiny * tiny;\n t = ax - 1.0;\n w = (t * t) * (0.5 - t * (inv3 - t * 0.25));\n u = ivln2_h * t;\n v = t * ivln2_l - w * ivln2;\n t1 = u + v;\n t1 = reinterpret(reinterpret(t1) & 0xFFFFFFFF00000000);\n t2 = v - (t1 - u);\n } else {\n let ss: f64, s2: f64, s_h: f64, s_l: f64, t_h: f64, t_l: f64;\n n = 0;\n if (ix < 0x00100000) {\n ax *= two53;\n n -= 53;\n ix = (reinterpret(ax) >> 32);\n }\n n += (ix >> 20) - 0x3FF;\n j = ix & 0x000FFFFF;\n ix = j | 0x3FF00000;\n if (j <= 0x3988E) k = 0;\n else if (j < 0xBB67A) k = 1;\n else {\n k = 0;\n n += 1;\n ix -= 0x00100000;\n }\n ax = reinterpret(reinterpret(ax) & 0xFFFFFFFF | (ix << 32));\n let bp = select(1.5, 1.0, k); // k ? 1.5 : 1.0\n u = ax - bp;\n v = 1.0 / (ax + bp);\n ss = u * v;\n s_h = ss;\n s_h = reinterpret(reinterpret(s_h) & 0xFFFFFFFF00000000);\n t_h = reinterpret((((ix >> 1) | 0x20000000) + 0x00080000 + (k << 18)) << 32);\n t_l = ax - (t_h - bp);\n s_l = v * ((u - s_h * t_h) - s_h * t_l);\n s2 = ss * ss;\n r = s2 * s2 * (L1 + s2 * (L2 + s2 * (L3 + s2 * (L4 + s2 * (L5 + s2 * L6)))));\n r += s_l * (s_h + ss);\n s2 = s_h * s_h;\n t_h = 3.0 + s2 + r;\n t_h = reinterpret(reinterpret(t_h) & 0xFFFFFFFF00000000);\n t_l = r - ((t_h - 3.0) - s2);\n u = s_h * t_h;\n v = s_l * t_h + t_l * ss;\n p_h = u + v;\n p_h = reinterpret(reinterpret(p_h) & 0xFFFFFFFF00000000);\n p_l = v - (p_h - u);\n let z_h = cp_h * p_h;\n let dp_l = select(dp_l1, 0.0, k);\n let z_l = cp_l * p_h + p_l * cp + dp_l;\n t = n;\n let dp_h = select(dp_h1, 0.0, k);\n t1 = ((z_h + z_l) + dp_h) + t;\n t1 = reinterpret(reinterpret(t1) & 0xFFFFFFFF00000000);\n t2 = z_l - (((t1 - t) - dp_h) - z_h);\n }\n let y1 = y;\n y1 = reinterpret(reinterpret(y1) & 0xFFFFFFFF00000000);\n p_l = (y - y1) * t1 + y * t2;\n p_h = y1 * t1;\n z = p_l + p_h;\n u_ = reinterpret(z);\n j = (u_ >> 32);\n let i = u_;\n if (j >= 0x40900000) {\n if (((j - 0x40900000) | i) != 0) return s * huge * huge;\n if (p_l + ovt > z - p_h) return s * huge * huge;\n } else if ((j & 0x7FFFFFFF) >= 0x4090CC00) {\n if (((j - 0xC090CC00) | i) != 0) return s * tiny * tiny;\n if (p_l <= z - p_h) return s * tiny * tiny;\n }\n i = j & 0x7FFFFFFF;\n k = (i >> 20) - 0x3FF;\n n = 0;\n if (i > 0x3FE00000) {\n n = j + (0x00100000 >> (k + 1));\n k = ((n & 0x7FFFFFFF) >> 20) - 0x3FF;\n t = 0.0;\n t = reinterpret((n & ~(0x000FFFFF >> k)) << 32);\n n = ((n & 0x000FFFFF) | 0x00100000) >> (20 - k);\n if (j < 0) n = -n;\n p_h -= t;\n }\n t = p_l + p_h;\n t = reinterpret(reinterpret(t) & 0xFFFFFFFF00000000);\n u = t * lg2_h;\n v = (p_l - (t - p_h)) * lg2 + t * lg2_l;\n z = u + v;\n w = v - (z - u);\n t = z * z;\n t1 = z - t * (P1 + t * (P2 + t * (P3 + t * (P4 + t * P5))));\n r = (z * t1) / (t1 - 2.0) - (w + z * w);\n z = 1.0 - (r - z);\n j = (reinterpret(z) >> 32);\n j += n << 20;\n if ((j >> 20) <= 0) z = scalbn(z, n);\n else z = reinterpret(reinterpret(z) & 0xFFFFFFFF | (j << 32));\n return s * z;\n }\n }\n\n export function seedRandom(value: i64): void {\n // Instead zero seed use golden ratio:\n // phi = (1 + sqrt(5)) / 2\n // trunc(2^64 / phi) = 0x9e3779b97f4a7c15\n if (value == 0) value = 0x9e3779b97f4a7c15;\n random_state0_64 = murmurHash3(value);\n random_state1_64 = murmurHash3(~random_state0_64);\n random_state0_32 = splitMix32(value);\n random_state1_32 = splitMix32(random_state0_32);\n random_seeded = true;\n }\n\n export function random(): f64 { // see: v8/src/base/utils/random-number-generator.cc\n if (!random_seeded) seedRandom(reinterpret(seed()));\n var s1 = random_state0_64;\n var s0 = random_state1_64;\n random_state0_64 = s0;\n s1 ^= s1 << 23;\n s1 ^= s1 >> 17;\n s1 ^= s0;\n s1 ^= s0 >> 26;\n random_state1_64 = s1;\n var r = (s0 >> 12) | 0x3FF0000000000000;\n return reinterpret(r) - 1;\n }\n\n // @ts-ignore: decorator\n @inline\n export function round(x: f64): f64 {\n let roundUp = builtin_ceil(x);\n return select(roundUp, roundUp - 1.0, roundUp - 0.5 <= x);\n }\n\n // @ts-ignore: decorator\n @inline\n export function sign(x: f64): f64 {\n if (ASC_SHRINK_LEVEL > 0) {\n return builtin_abs(x) > 0 ? builtin_copysign(1, x) : x;\n } else {\n return x > 0 ? 1 : x < 0 ? -1 : x;\n }\n }\n\n // @ts-ignore: decorator\n @inline\n export function signbit(x: f64): bool {\n return (reinterpret(x) >>> 63);\n }\n\n export function sin(x: f64): f64 { // see: musl/src/math/sin.c\n var u = reinterpret(x);\n var ix = (u >> 32);\n var sign = ix >> 31;\n\n ix &= 0x7FFFFFFF;\n\n // |x| ~< pi/4\n if (ix <= 0x3FE921FB) {\n if (ix < 0x3E500000) { // |x| < 2**-26\n return x;\n }\n return sin_kern(x, 0.0, 0);\n }\n\n // sin(Inf or NaN) is NaN\n if (ix >= 0x7FF00000) return x - x;\n\n // argument reduction needed\n var n = rempio2(x, u, sign);\n var y0 = rempio2_y0;\n var y1 = rempio2_y1;\n\n x = n & 1 ? cos_kern(y0, y1) : sin_kern(y0, y1, 1);\n return n & 2 ? -x : x;\n }\n\n export function sinh(x: f64): f64 { // see: musl/src/math/sinh.c\n var u = reinterpret(x) & 0x7FFFFFFFFFFFFFFF;\n var a = reinterpret(u);\n var w = (u >> 32);\n var h = builtin_copysign(0.5, x);\n if (w < 0x40862E42) {\n let t = expm1(a);\n if (w < 0x3FF00000) {\n if (w < 0x3FF00000 - (26 << 20)) return x;\n return h * (2 * t - t * t / (t + 1));\n }\n return h * (t + t / (t + 1));\n }\n return expo2(a, 2 * h);\n }\n\n // @ts-ignore: decorator\n @inline\n export function sqrt(x: f64): f64 {\n return builtin_sqrt(x);\n }\n\n export function tan(x: f64): f64 { // see: musl/src/math/tan.c\n var u = reinterpret(x);\n var ix = (u >> 32);\n var sign = ix >>> 31;\n\n ix &= 0x7FFFFFFF;\n\n // |x| ~< pi/4\n if (ix <= 0x3FE921FB) {\n if (ix < 0x3E400000) { // |x| < 2**-27\n return x;\n }\n return tan_kern(x, 0.0, 1);\n }\n\n // tan(Inf or NaN) is NaN\n if (ix >= 0x7FF00000) return x - x;\n\n var n = rempio2(x, u, sign);\n return tan_kern(rempio2_y0, rempio2_y1, 1 - ((n & 1) << 1));\n }\n\n export function tanh(x: f64): f64 { // see: musl/src/math/tanh.c\n var u = reinterpret(x);\n u &= 0x7FFFFFFFFFFFFFFF;\n var y = reinterpret(u);\n var w = (u >> 32);\n var t: f64;\n if (w > 0x3FE193EA) {\n if (w > 0x40340000) {\n t = 1 - 0 / y;\n } else {\n t = expm1(2 * y);\n t = 1 - 2 / (t + 2);\n }\n } else if (w > 0x3FD058AE) {\n t = expm1(2 * y);\n t = t / (t + 2);\n } else if (w >= 0x00100000) {\n t = expm1(-2 * y);\n t = -t / (t + 2);\n } else t = y;\n return builtin_copysign(t, x);\n }\n\n // @ts-ignore: decorator\n @inline\n export function trunc(x: f64): f64 {\n return builtin_trunc(x);\n }\n\n export function scalbn(x: f64, n: i32): f64 { // see: https://git.musl-libc.org/cgit/musl/tree/src/math/scalbn.c\n const\n Ox1p53 = reinterpret(0x4340000000000000),\n Ox1p1023 = reinterpret(0x7FE0000000000000),\n Ox1p_1022 = reinterpret(0x0010000000000000);\n\n var y = x;\n if (n > 1023) {\n y *= Ox1p1023;\n n -= 1023;\n if (n > 1023) {\n y *= Ox1p1023;\n n = builtin_min(n - 1023, 1023);\n }\n } else if (n < -1022) {\n // make sure final n < -53 to avoid double\n // rounding in the subnormal range\n y *= Ox1p_1022 * Ox1p53;\n n += 1022 - 53;\n if (n < -1022) {\n y *= Ox1p_1022 * Ox1p53;\n n = builtin_max(n + 1022 - 53, -1022);\n }\n }\n return y * reinterpret((0x3FF + n) << 52);\n }\n\n export function mod(x: f64, y: f64): f64 { // see: musl/src/math/fmod.c\n if (builtin_abs(y) == 1.0) {\n // x % 1, x % -1 ==> sign(x) * abs(x - 1.0 * trunc(x / 1.0))\n // TODO: move this rule to compiler's optimization pass.\n // It could be apply for any x % C_pot, where \"C_pot\" is pow of two const.\n return builtin_copysign(x - builtin_trunc(x), x);\n }\n var ux = reinterpret(x);\n var uy = reinterpret(y);\n var ex = (ux >> 52 & 0x7FF);\n var ey = (uy >> 52 & 0x7FF);\n var sx = ux >> 63;\n var uy1 = uy << 1;\n if (uy1 == 0 || ex == 0x7FF || isNaN(y)) {\n let m = x * y;\n return m / m;\n }\n var ux1 = ux << 1;\n if (ux1 <= uy1) {\n return x * f64(ux1 != uy1);\n }\n if (!ex) {\n ex -= builtin_clz(ux << 12);\n ux <<= 1 - ex;\n } else {\n ux &= -1 >> 12;\n ux |= 1 << 52;\n }\n if (!ey) {\n ey -= builtin_clz(uy << 12);\n uy <<= 1 - ey;\n } else {\n uy &= -1 >> 12;\n uy |= 1 << 52;\n }\n while (ex > ey) {\n if (ux >= uy) {\n if (ux == uy) return 0 * x;\n ux -= uy;\n }\n ux <<= 1;\n --ex;\n }\n if (ux >= uy) {\n if (ux == uy) return 0 * x;\n ux -= uy;\n }\n // for (; !(ux >> 52); ux <<= 1) --ex;\n var shift = builtin_clz(ux << 11);\n ex -= shift;\n ux <<= shift;\n if (ex > 0) {\n ux -= 1 << 52;\n ux |= ex << 52;\n } else {\n ux >>= -ex + 1;\n }\n return reinterpret(ux | (sx << 63));\n }\n\n export function rem(x: f64, y: f64): f64 { // see: musl/src/math/remquo.c\n var ux = reinterpret(x);\n var uy = reinterpret(y);\n var ex = (ux >> 52 & 0x7FF);\n var ey = (uy >> 52 & 0x7FF);\n var sx = (ux >> 63);\n if (uy << 1 == 0 || ex == 0x7FF || isNaN(y)) {\n let m = x * y;\n return m / m;\n }\n if (ux << 1 == 0) return x;\n var uxi = ux;\n if (!ex) {\n ex -= builtin_clz(uxi << 12);\n uxi <<= 1 - ex;\n } else {\n uxi &= -1 >> 12;\n uxi |= 1 << 52;\n }\n if (!ey) {\n ey -= builtin_clz(uy << 12);\n uy <<= 1 - ey;\n } else {\n uy &= -1 >> 12;\n uy |= 1 << 52;\n }\n var q: u32 = 0;\n do {\n if (ex < ey) {\n if (ex + 1 == ey) break; // goto end\n return x;\n }\n while (ex > ey) {\n if (uxi >= uy) {\n uxi -= uy;\n ++q;\n }\n uxi <<= 1;\n q <<= 1;\n --ex;\n }\n if (uxi >= uy) {\n uxi -= uy;\n ++q;\n }\n if (uxi == 0) ex = -60;\n else {\n let shift = builtin_clz(uxi << 11);\n ex -= shift;\n uxi <<= shift;\n }\n break;\n } while (false);\n // end:\n if (ex > 0) {\n uxi -= 1 << 52;\n uxi |= ex << 52;\n } else {\n uxi >>= -ex + 1;\n }\n x = reinterpret(uxi);\n y = builtin_abs(y);\n var x2 = x + x;\n if (ex == ey || (ex + 1 == ey && (x2 > y || (x2 == y && (q & 1))))) {\n x -= y;\n // ++q;\n }\n return sx ? -x : x;\n }\n\n export function sincos(x: f64): void { // see: musl/tree/src/math/sincos.c\n var u = reinterpret(x);\n var ix = (u >> 32);\n var sign = ix >> 31;\n ix &= 0x7FFFFFFF;\n\n if (ix <= 0x3FE921FB) { // |x| ~<= π/4\n if (ix < 0x3E46A09E) { // if |x| < 2**-27 * sqrt(2)\n sincos_sin = x;\n sincos_cos = 1;\n return;\n }\n sincos_sin = sin_kern(x, 0, 0);\n sincos_cos = cos_kern(x, 0);\n return;\n }\n // sin(Inf or NaN) is NaN\n if (ix >= 0x7F800000) {\n let xx = x - x;\n sincos_sin = xx;\n sincos_cos = xx;\n return;\n }\n // general argument reduction needed\n var n = rempio2(x, u, sign);\n var y0 = rempio2_y0;\n var y1 = rempio2_y1;\n var s = sin_kern(y0, y1, 1);\n var c = cos_kern(y0, y1);\n var sin = s, cos = c;\n if (n & 1) {\n sin = c;\n cos = -s;\n }\n if (n & 2) {\n sin = -sin;\n cos = -cos;\n }\n sincos_sin = sin;\n sincos_cos = cos;\n }\n}\n\n// @ts-ignore: decorator\n@lazy var rempio2f_y: f64;\n\n// @ts-ignore: decorator\n@lazy @inline const PIO2F_TABLE = memory.data([\n 0xA2F9836E4E441529,\n 0xFC2757D1F534DDC0,\n 0xDB6295993C439041,\n 0xFE5163ABDEBBC561\n]);\n\nfunction Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3\n const // see: musl/src/math/asinf.c and SUN COPYRIGHT NOTICE above\n pS0 = reinterpret(0x3E2AAA75), // 1.6666586697e-01f\n pS1 = reinterpret(0xBD2F13BA), // -4.2743422091e-02f\n pS2 = reinterpret(0xBC0DD36B), // -8.6563630030e-03f\n qS1 = reinterpret(0xBF34E5AE); // -7.0662963390e-01f\n\n var p = z * (pS0 + z * (pS1 + z * pS2));\n var q: f32 = 1 + z * qS1;\n return p / q;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction expo2f(x: f32, sign: f32): f32 { // exp(x)/2 for x >= log(DBL_MAX)\n const // see: musl/src/math/__expo2f.c\n k = 235,\n kln2 = reinterpret(0x4322E3BC); // 0x1.45c778p+7f\n var scale = reinterpret((0x7F + (k >> 1)) << 23);\n // in directed rounding correct sign before rounding or overflow is important\n return NativeMathf.exp(x - kln2) * (sign * scale) * scale;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction pio2f_large_quot(x: f32, u: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c\n const coeff = reinterpret(0x3BF921FB54442D18); // π * 0x1p-65 = 8.51530395021638647334e-20\n\n var offset = (u >> 23) - 152;\n var shift = (offset & 63);\n var tblPtr = PIO2F_TABLE + (offset >> 6 << 3);\n\n var b0 = load(tblPtr, 0 << 3);\n var b1 = load(tblPtr, 1 << 3);\n var lo: u64;\n\n if (shift > 32) {\n let b2 = load(tblPtr, 2 << 3);\n lo = b2 >> (96 - shift);\n lo |= b1 << (shift - 32);\n } else {\n lo = b1 >> (32 - shift);\n }\n\n var hi = (b1 >> (64 - shift)) | (b0 << shift);\n var mantissa: u64 = (u & 0x007FFFFF) | 0x00800000;\n var product = mantissa * hi + (mantissa * lo >> 32);\n var r: i64 = product << 2;\n var q = ((product >> 62) + (r >>> 63));\n rempio2f_y = copysign(coeff, x) * r;\n return q;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction rempio2f(x: f32, u: u32, sign: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c\n const\n pi2hi = reinterpret(0x3FF921FB50000000), // 1.57079631090164184570\n pi2lo = reinterpret(0x3E5110B4611A6263), // 1.58932547735281966916e-8\n _2_pi = reinterpret(0x3FE45F306DC9C883); // 0.63661977236758134308\n\n if (u < 0x4DC90FDB) { // π * 0x1p28\n let q = nearest(x * _2_pi);\n rempio2f_y = x - q * pi2hi - q * pi2lo;\n return q;\n }\n\n var q = pio2f_large_quot(x, u);\n return select(-q, q, sign);\n}\n\n// |sin(x)/x - s(x)| < 2**-37.5 (~[-4.89e-12, 4.824e-12]).\n// @ts-ignore: decorator\n@inline\nfunction sin_kernf(x: f64): f32 { // see: musl/tree/src/math/__sindf.c\n const\n S1 = reinterpret(0xBFC5555554CBAC77), // -0x15555554cbac77.0p-55\n S2 = reinterpret(0x3F811110896EFBB2), // 0x111110896efbb2.0p-59\n S3 = reinterpret(0xBF2A00F9E2CAE774), // -0x1a00f9e2cae774.0p-65\n S4 = reinterpret(0x3EC6CD878C3B46A7); // 0x16cd878c3b46a7.0p-71\n\n var z = x * x;\n var w = z * z;\n var r = S3 + z * S4;\n var s = z * x;\n return ((x + s * (S1 + z * S2)) + s * w * r);\n}\n\n// |cos(x) - c(x)| < 2**-34.1 (~[-5.37e-11, 5.295e-11]).\n// @ts-ignore: decorator\n@inline\nfunction cos_kernf(x: f64): f32 { // see: musl/tree/src/math/__cosdf.c\n const\n C0 = reinterpret(0xBFDFFFFFFD0C5E81), // -0x1ffffffd0c5e81.0p-54\n C1 = reinterpret(0x3FA55553E1053A42), // 0x155553e1053a42.0p-57\n C2 = reinterpret(0xBF56C087E80F1E27), // -0x16c087e80f1e27.0p-62\n C3 = reinterpret(0x3EF99342E0EE5069); // 0x199342e0ee5069.0p-68\n\n var z = x * x;\n var w = z * z;\n var r = C2 + z * C3;\n return (((1 + z * C0) + w * C1) + (w * z) * r);\n}\n\n// |tan(x)/x - t(x)| < 2**-25.5 (~[-2e-08, 2e-08]).\n// @ts-ignore: decorator\n@inline\nfunction tan_kernf(x: f64, odd: i32): f32 { // see: musl/tree/src/math/__tandf.c\n const\n T0 = reinterpret(0x3FD5554D3418C99F), // 0x15554d3418c99f.0p-54\n T1 = reinterpret(0x3FC112FD38999F72), // 0x1112fd38999f72.0p-55\n T2 = reinterpret(0x3FAB54C91D865AFE), // 0x1b54c91d865afe.0p-57\n T3 = reinterpret(0x3F991DF3908C33CE), // 0x191df3908c33ce.0p-58\n T4 = reinterpret(0x3F685DADFCECF44E), // 0x185dadfcecf44e.0p-61\n T5 = reinterpret(0x3F8362B9BF971BCD); // 0x1362b9bf971bcd.0p-59\n\n var z = x * x;\n var r = T4 + z * T5;\n var t = T2 + z * T3;\n var w = z * z;\n var s = z * x;\n var u = T0 + z * T1;\n\n r = (x + s * u) + (s * w) * (t + w * r);\n return (odd ? -1 / r : r);\n}\n\n// See: jdh8/metallic/src/math/float/log2f.c and jdh8/metallic/src/math/float/kernel/atanh.h\n// @ts-ignore: decorator\n@inline\nfunction log2f(x: f64): f64 {\n const\n log2e = reinterpret(0x3FF71547652B82FE), // 1.44269504088896340736\n c0 = reinterpret(0x3FD555554FD9CAEF), // 0.33333332822728226129\n c1 = reinterpret(0x3FC999A7A8AF4132), // 0.20000167595436263505\n c2 = reinterpret(0x3FC2438D79437030), // 0.14268654271188685375\n c3 = reinterpret(0x3FBE2F663B001C97); // 0.11791075649681414150\n\n var i = reinterpret(x);\n var exponent = (i - 0x3FE6A09E667F3BCD) >> 52;\n x = reinterpret(i - (exponent << 52));\n x = (x - 1) / (x + 1);\n var xx = x * x;\n var y = x + x * xx * (c0 + c1 * xx + (c2 + c3 * xx) * (xx * xx));\n return (2 * log2e) * y + exponent;\n}\n\n// See: jdh8/metallic/src/math/float/exp2f.h and jdh8/metallic/blob/master/src/math/float/kernel/exp2f.h\n// @ts-ignore: decorator\n@inline\nfunction exp2f(x: f64): f64 {\n const\n c0 = reinterpret(0x3FE62E4302FCC24A), // 6.931471880289532425e-1\n c1 = reinterpret(0x3FCEBFBE07D97B91), // 2.402265108421173406e-1\n c2 = reinterpret(0x3FAC6AF6CCFC1A65), // 5.550357105498874537e-2\n c3 = reinterpret(0x3F83B29E3CE9AEF6), // 9.618030771171497658e-3\n c4 = reinterpret(0x3F55F0896145A89F), // 1.339086685300950937e-3\n c5 = reinterpret(0x3F2446C81E384864); // 1.546973499989028719e-4\n\n if (x < -1022) return 0;\n if (x >= 1024) return Infinity;\n\n var n = nearest(x);\n x -= n;\n var xx = x * x;\n var y = 1 + x * (c0 + c1 * x + (c2 + c3 * x) * xx + (c4 + c5 * x) * (xx * xx));\n return reinterpret(reinterpret(y) + (n << 52));\n}\n\nexport namespace NativeMathf {\n\n // @ts-ignore: decorator\n @lazy\n export const E = NativeMath.E;\n\n // @ts-ignore: decorator\n @lazy\n export const LN2 = NativeMath.LN2;\n\n // @ts-ignore: decorator\n @lazy\n export const LN10 = NativeMath.LN10;\n\n // @ts-ignore: decorator\n @lazy\n export const LOG2E = NativeMath.LOG2E;\n\n // @ts-ignore: decorator\n @lazy\n export const LOG10E = NativeMath.LOG10E;\n\n // @ts-ignore: decorator\n @lazy\n export const PI = NativeMath.PI;\n\n // @ts-ignore: decorator\n @lazy\n export const SQRT1_2 = NativeMath.SQRT1_2;\n\n // @ts-ignore: decorator\n @lazy\n export const SQRT2 = NativeMath.SQRT2;\n\n // @ts-ignore: decorator\n @lazy\n export var sincos_sin: f32 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export var sincos_cos: f32 = 0;\n\n // @ts-ignore: decorator\n @inline\n export function abs(x: f32): f32 {\n return builtin_abs(x);\n }\n\n export function acos(x: f32): f32 { // see: musl/src/math/acosf.c and SUN COPYRIGHT NOTICE above\n const\n pio2_hi = reinterpret(0x3FC90FDA), // 1.5707962513e+00f\n pio2_lo = reinterpret(0x33A22168), // 7.5497894159e-08f\n Ox1p_120f = reinterpret(0x03800000); // 0x1p-120f\n\n var hx = reinterpret(x);\n var ix = hx & 0x7FFFFFFF;\n if (ix >= 0x3F800000) {\n if (ix == 0x3F800000) {\n if (hx >> 31) return 2 * pio2_hi + Ox1p_120f;\n return 0;\n }\n return 0 / (x - x);\n }\n if (ix < 0x3F000000) {\n if (ix <= 0x32800000) return pio2_hi + Ox1p_120f;\n return pio2_hi - (x - (pio2_lo - x * Rf(x * x)));\n }\n var z: f32, w: f32, s: f32;\n if (hx >> 31) {\n // z = (1 + x) * 0.5;\n z = 0.5 + x * 0.5;\n s = builtin_sqrt(z);\n w = Rf(z) * s - pio2_lo;\n return 2 * (pio2_hi - (s + w));\n }\n // z = (1 - x) * 0.5;\n z = 0.5 - x * 0.5;\n s = builtin_sqrt(z);\n hx = reinterpret(s);\n var df = reinterpret(hx & 0xFFFFF000);\n var c = (z - df * df) / (s + df);\n w = Rf(z) * s + c;\n return 2 * (df + w);\n }\n\n export function acosh(x: f32): f32 { // see: musl/src/math/acoshf.c\n const s = reinterpret(0x3F317218); // 0.693147180559945309417232121458176568f\n var u = reinterpret(x);\n var a = u & 0x7FFFFFFF;\n if (a < 0x3F800000 + (1 << 23)) { // |x| < 2, invalid if x < 1\n let xm1 = x - 1;\n return log1p(xm1 + builtin_sqrt(xm1 * (xm1 + 2)));\n }\n if (u < 0x3F800000 + (12 << 23)) { // 2 <= x < 0x1p12\n return log(2 * x - 1 / (x + builtin_sqrt(x * x - 1)));\n }\n // x >= 0x1p12 or x <= -2 or NaN\n return log(x) + s;\n }\n\n export function asin(x: f32): f32 { // see: musl/src/math/asinf.c and SUN COPYRIGHT NOTICE above\n const\n pio2 = reinterpret(0x3FC90FDB), // 1.570796326794896558e+00f\n Ox1p_120f = reinterpret(0x03800000); // 0x1p-120f\n\n var sx = x;\n var hx = reinterpret(x) & 0x7FFFFFFF;\n if (hx >= 0x3F800000) {\n if (hx == 0x3F800000) return x * pio2 + Ox1p_120f;\n return 0 / (x - x);\n }\n if (hx < 0x3F000000) {\n if (hx < 0x39800000 && hx >= 0x00800000) return x;\n return x + x * Rf(x * x);\n }\n // var z: f32 = (1 - builtin_abs(x)) * 0.5;\n var z: f32 = 0.5 - builtin_abs(x) * 0.5;\n var s = builtin_sqrt(z); // sic\n x = (pio2 - 2 * (s + s * Rf(z)));\n return builtin_copysign(x, sx);\n }\n\n export function asinh(x: f32): f32 { // see: musl/src/math/asinhf.c\n const c = reinterpret(0x3F317218); // 0.693147180559945309417232121458176568f\n var u = reinterpret(x) & 0x7FFFFFFF;\n var y = reinterpret(u);\n if (u >= 0x3F800000 + (12 << 23)) y = log(y) + c;\n else if (u >= 0x3F800000 + (1 << 23)) y = log(2 * y + 1 / (builtin_sqrt(y * y + 1) + y));\n else if (u >= 0x3F800000 - (12 << 23)) y = log1p(y + y * y / (builtin_sqrt(y * y + 1) + 1));\n return builtin_copysign(y, x);\n }\n\n export function atan(x: f32): f32 { // see: musl/src/math/atanf.c and SUN COPYRIGHT NOTICE above\n const\n atanhi0 = reinterpret(0x3EED6338), // 4.6364760399e-01f\n atanhi1 = reinterpret(0x3F490FDA), // 7.8539812565e-01f\n atanhi2 = reinterpret(0x3F7B985E), // 9.8279368877e-01f\n atanhi3 = reinterpret(0x3FC90FDA), // 1.5707962513e+00f\n atanlo0 = reinterpret(0x31AC3769), // 5.0121582440e-09f\n atanlo1 = reinterpret(0x33222168), // 3.7748947079e-08f\n atanlo2 = reinterpret(0x33140FB4), // 3.4473217170e-08f\n atanlo3 = reinterpret(0x33A22168), // 7.5497894159e-08f\n aT0 = reinterpret(0x3EAAAAA9), // 3.3333328366e-01f\n aT1 = reinterpret(0xBE4CCA98), // -1.9999158382e-01f\n aT2 = reinterpret(0x3E11F50D), // 1.4253635705e-01f\n aT3 = reinterpret(0xBDDA1247), // -1.0648017377e-01f\n aT4 = reinterpret(0x3D7CAC25), // 6.1687607318e-02f\n Ox1p_120f = reinterpret(0x03800000); // 0x1p-120f\n\n var ix = reinterpret(x);\n var sx = x;\n ix &= 0x7FFFFFFF;\n var z: f32;\n if (ix >= 0x4C800000) {\n if (isNaN(x)) return x;\n z = atanhi3 + Ox1p_120f;\n return builtin_copysign(z, sx);\n }\n var id: i32;\n if (ix < 0x3EE00000) {\n if (ix < 0x39800000) return x;\n id = -1;\n } else {\n x = builtin_abs(x);\n if (ix < 0x3F980000) {\n if (ix < 0x3F300000) {\n id = 0;\n x = (2.0 * x - 1.0) / (2.0 + x);\n } else {\n id = 1;\n x = (x - 1.0) / (x + 1.0);\n }\n } else {\n if (ix < 0x401C0000) {\n id = 2;\n x = (x - 1.5) / (1.0 + 1.5 * x);\n } else {\n id = 3;\n x = -1.0 / x;\n }\n }\n }\n z = x * x;\n var w = z * z;\n var s1 = z * (aT0 + w * (aT2 + w * aT4));\n var s2 = w * (aT1 + w * aT3);\n var s3 = x * (s1 + s2);\n if (id < 0) return x - s3;\n switch (id) {\n case 0: { z = atanhi0 - ((s3 - atanlo0) - x); break; }\n case 1: { z = atanhi1 - ((s3 - atanlo1) - x); break; }\n case 2: { z = atanhi2 - ((s3 - atanlo2) - x); break; }\n case 3: { z = atanhi3 - ((s3 - atanlo3) - x); break; }\n default: unreachable();\n }\n return builtin_copysign(z, sx);\n }\n\n export function atanh(x: f32): f32 { // see: musl/src/math/atanhf.c\n var u = reinterpret(x);\n var y = builtin_abs(x);\n if (u < 0x3F800000 - (1 << 23)) {\n if (u >= 0x3F800000 - (32 << 23)) y = 0.5 * log1p(2 * y * (1.0 + y / (1 - y)));\n } else y = 0.5 * log1p(2 * (y / (1 - y)));\n return builtin_copysign(y, x);\n }\n\n export function atan2(y: f32, x: f32): f32 { // see: musl/src/math/atan2f.c and SUN COPYRIGHT NOTICE above\n const\n pi = reinterpret(0x40490FDB), // 3.1415927410e+00f\n pi_lo = reinterpret(0xB3BBBD2E); // -8.7422776573e-08f\n\n if (isNaN(x) || isNaN(y)) return x + y;\n var ix = reinterpret(x);\n var iy = reinterpret(y);\n if (ix == 0x3F800000) return atan(y);\n var m = (((iy >> 31) & 1) | ((ix >> 30) & 2));\n ix &= 0x7FFFFFFF;\n iy &= 0x7FFFFFFF;\n if (iy == 0) {\n switch (m) {\n case 0:\n case 1: return y;\n case 2: return pi;\n case 3: return -pi;\n }\n }\n if (ix == 0) return m & 1 ? -pi / 2 : pi / 2;\n if (ix == 0x7F800000) {\n if (iy == 0x7F800000) {\n let t: f32 = m & 2 ? 3 * pi / 4 : pi / 4;\n return m & 1 ? -t : t;\n } else {\n let t: f32 = m & 2 ? pi : 0.0;\n return m & 1 ? -t : t;\n }\n }\n if (ix + (26 << 23) < iy || iy == 0x7F800000) return m & 1 ? -pi / 2 : pi / 2;\n var z: f32;\n if ((m & 2) && iy + (26 << 23) < ix) z = 0.0;\n else z = atan(builtin_abs(y / x));\n switch (m) {\n case 0: return z;\n case 1: return -z;\n case 2: return pi - (z - pi_lo);\n case 3: return (z - pi_lo) - pi;\n }\n unreachable();\n return 0;\n }\n\n export function cbrt(x: f32): f32 { // see: musl/src/math/cbrtf.c and SUN COPYRIGHT NOTICE above\n const\n B1 = 709958130,\n B2 = 642849266,\n Ox1p24f = reinterpret(0x4B800000);\n\n var u = reinterpret(x);\n var hx = u & 0x7FFFFFFF;\n if (hx >= 0x7F800000) return x + x;\n if (hx < 0x00800000) {\n if (hx == 0) return x;\n u = reinterpret(x * Ox1p24f);\n hx = u & 0x7FFFFFFF;\n hx = hx / 3 + B2;\n } else {\n hx = hx / 3 + B1;\n }\n u &= 0x80000000;\n u |= hx;\n var t = reinterpret(u);\n var r = t * t * t;\n t = t * (x + x + r) / (x + r + r);\n r = t * t * t;\n t = t * (x + x + r) / (x + r + r);\n return t;\n }\n\n // @ts-ignore: decorator\n @inline\n export function ceil(x: f32): f32 {\n return builtin_ceil(x);\n }\n\n export function clz32(x: f32): f32 {\n if (!isFinite(x)) return 32;\n return builtin_clz(dtoi32(x));\n }\n\n export function cos(x: f32): f32 { // see: musl/src/math/cosf.c\n const\n c1pio2 = reinterpret(0x3FF921FB54442D18), // M_PI_2 * 1\n c2pio2 = reinterpret(0x400921FB54442D18), // M_PI_2 * 2\n c3pio2 = reinterpret(0x4012D97C7F3321D2), // M_PI_2 * 3\n c4pio2 = reinterpret(0x401921FB54442D18); // M_PI_2 * 4\n\n var ix = reinterpret(x);\n var sign = ix >> 31;\n ix &= 0x7FFFFFFF;\n\n if (ix <= 0x3F490FDA) { // |x| ~<= π/4\n if (ix < 0x39800000) { // |x| < 2**-12\n // raise inexact if x != 0\n return 1;\n }\n return cos_kernf(x);\n }\n\n if (ASC_SHRINK_LEVEL < 1) {\n if (ix <= 0x407B53D1) { // |x| ~<= 5π/4\n if (ix > 0x4016CBE3) { // |x| ~> 3π/4\n return -cos_kernf(sign ? x + c2pio2 : x - c2pio2);\n } else {\n return sign ? sin_kernf(x + c1pio2) : sin_kernf(c1pio2 - x);\n }\n }\n if (ix <= 0x40E231D5) { // |x| ~<= 9π/4\n if (ix > 0x40AFEDDF) { // |x| ~> 7π/4\n return cos_kernf(sign ? x + c4pio2 : x - c4pio2);\n } else {\n return sign ? sin_kernf(-x - c3pio2) : sin_kernf(x - c3pio2);\n }\n }\n }\n\n // cos(Inf or NaN) is NaN\n if (ix >= 0x7F800000) return x - x;\n\n // general argument reduction needed\n var n = rempio2f(x, ix, sign);\n var y = rempio2f_y;\n\n var t = n & 1 ? sin_kernf(y) : cos_kernf(y);\n return (n + 1) & 2 ? -t : t;\n }\n\n export function cosh(x: f32): f32 { // see: musl/src/math/coshf.c\n var u = reinterpret(x);\n u &= 0x7FFFFFFF;\n x = reinterpret(u);\n if (u < 0x3F317217) {\n if (u < 0x3F800000 - (12 << 23)) return 1;\n let t = expm1(x);\n // return 1 + t * t / (2 * (1 + t));\n return 1 + t * t / (2 + 2 * t);\n }\n if (u < 0x42B17217) {\n let t = exp(x);\n // return 0.5 * (t + 1 / t);\n return 0.5 * t + 0.5 / t;\n }\n return expo2f(x, 1);\n }\n\n // @ts-ignore: decorator\n @inline\n export function floor(x: f32): f32 {\n return builtin_floor(x);\n }\n\n export function exp(x: f32): f32 { // see: musl/src/math/expf.c and SUN COPYRIGHT NOTICE above\n if (ASC_SHRINK_LEVEL < 1) {\n return expf_lut(x);\n } else {\n const\n ln2hi = reinterpret(0x3F317200), // 6.9314575195e-1f\n ln2lo = reinterpret(0x35BFBE8E), // 1.4286067653e-6f\n invln2 = reinterpret(0x3FB8AA3B), // 1.4426950216e+0f\n P1 = reinterpret(0x3E2AAA8F), // 1.6666625440e-1f\n P2 = reinterpret(0xBB355215), // -2.7667332906e-3f\n Ox1p127f = reinterpret(0x7F000000); // 0x1p+127f\n\n let hx = reinterpret(x);\n let sign_ = (hx >> 31);\n hx &= 0x7FFFFFFF;\n if (hx >= 0x42AEAC50) {\n if (hx > 0x7F800000) return x; // NaN\n if (hx >= 0x42B17218) {\n if (!sign_) return x * Ox1p127f;\n else if (hx >= 0x42CFF1B5) return 0;\n }\n }\n let hi: f32, lo: f32;\n let k: i32;\n if (hx > 0x3EB17218) {\n if (hx > 0x3F851592) {\n k = (invln2 * x + builtin_copysign(0.5, x));\n } else {\n k = 1 - (sign_ << 1);\n }\n hi = x - k * ln2hi;\n lo = k * ln2lo;\n x = hi - lo;\n } else if (hx > 0x39000000) {\n k = 0;\n hi = x;\n lo = 0;\n } else {\n return 1 + x;\n }\n let xx = x * x;\n let c = x - xx * (P1 + xx * P2);\n let y: f32 = 1 + (x * c / (2 - c) - lo + hi);\n return k == 0 ? y : scalbn(y, k);\n }\n }\n\n export function exp2(x: f32): f32 {\n return exp2f_lut(x);\n }\n\n export function expm1(x: f32): f32 { // see: musl/src/math/expm1f.c and SUN COPYRIGHT NOTICE above\n const\n ln2_hi = reinterpret(0x3F317180), // 6.9313812256e-01f\n ln2_lo = reinterpret(0x3717F7D1), // 9.0580006145e-06f\n invln2 = reinterpret(0x3FB8AA3B), // 1.4426950216e+00f\n Q1 = reinterpret(0xBD088868), // -3.3333212137e-02f\n Q2 = reinterpret(0x3ACF3010), // 1.5807170421e-03f\n Ox1p127f = reinterpret(0x7F000000); // 0x1p+127f\n\n var u = reinterpret(x);\n var hx = u & 0x7FFFFFFF;\n var sign_ = (u >> 31);\n if (hx >= 0x4195B844) {\n if (hx > 0x7F800000) return x;\n if (sign_) return -1;\n if (hx > 0x42B17217) { // x > log(FLT_MAX)\n x *= Ox1p127f;\n return x;\n }\n }\n var c: f32 = 0.0, t: f32, k: i32;\n if (hx > 0x3EB17218) {\n k = select(\n 1 - (sign_ << 1),\n (invln2 * x + builtin_copysign(0.5, x)),\n hx < 0x3F851592\n );\n t = k;\n let hi = x - t * ln2_hi;\n let lo = t * ln2_lo;\n x = hi - lo;\n c = (hi - x) - lo;\n } else if (hx < 0x33000000) {\n return x;\n } else k = 0;\n var hfx: f32 = 0.5 * x;\n var hxs: f32 = x * hfx;\n var r1: f32 = 1.0 + hxs * (Q1 + hxs * Q2);\n t = 3.0 - r1 * hfx;\n var e = hxs * ((r1 - t) / (6.0 - x * t));\n if (k == 0) return x - (x * e - hxs);\n e = x * (e - c) - c;\n e -= hxs;\n if (k == -1) return 0.5 * (x - e) - 0.5;\n if (k == 1) {\n if (x < -0.25) return -2.0 * (e - (x + 0.5));\n return 1.0 + 2.0 * (x - e);\n }\n u = (0x7F + k) << 23;\n var twopk = reinterpret(u);\n var y: f32;\n if (k < 0 || k > 56) {\n y = x - e + 1.0;\n if (k == 128) y = y * 2.0 * Ox1p127f;\n else y = y * twopk;\n return y - 1.0;\n }\n u = (0x7F - k) << 23;\n y = reinterpret(u);\n if (k < 20) y = (1 - y) - e;\n else y = 1 - (e + y);\n return (x + y) * twopk;\n }\n\n // @ts-ignore: decorator\n @inline\n export function fround(x: f32): f32 {\n return x;\n }\n\n export function hypot(x: f32, y: f32): f32 { // see: musl/src/math/hypotf.c\n const\n Ox1p90f = reinterpret(0x6C800000),\n Ox1p_90f = reinterpret(0x12800000);\n\n var ux = reinterpret(x);\n var uy = reinterpret(y);\n ux &= 0x7FFFFFFF;\n uy &= 0x7FFFFFFF;\n if (ux < uy) {\n let ut = ux;\n ux = uy;\n uy = ut;\n }\n x = reinterpret(ux);\n y = reinterpret(uy);\n if (uy == 0xFF << 23) return y;\n if (ux >= 0xFF << 23 || uy == 0 || ux - uy >= 25 << 23) return x + y;\n var z: f32 = 1;\n if (ux >= (0x7F + 60) << 23) {\n z = Ox1p90f;\n x *= Ox1p_90f;\n y *= Ox1p_90f;\n } else if (uy < (0x7F - 60) << 23) {\n z = Ox1p_90f;\n x *= Ox1p90f;\n y *= Ox1p90f;\n }\n return z * builtin_sqrt((x * x + y * y));\n }\n\n // @ts-ignore: decorator\n @inline\n export function imul(x: f32, y: f32): f32 {\n /*\n * Wasm (MVP) and JS have different approaches for double->int conversions.\n *\n * For emulate JS conversion behavior and avoid trapping from wasm we should modulate by MAX_INT\n * our float-point arguments before actual convertion to integers.\n */\n if (!isFinite(x + y)) return 0;\n return (dtoi32(x) * dtoi32(y));\n }\n\n export function log(x: f32): f32 { // see: musl/src/math/logf.c and SUN COPYRIGHT NOTICE above\n if (ASC_SHRINK_LEVEL < 1) {\n return logf_lut(x);\n } else {\n const\n ln2_hi = reinterpret(0x3F317180), // 6.9313812256e-01f\n ln2_lo = reinterpret(0x3717F7D1), // 9.0580006145e-06f\n Lg1 = reinterpret(0x3F2AAAAA), // 0xaaaaaa.0p-24f\n Lg2 = reinterpret(0x3ECCCE13), // 0xccce13.0p-25f\n Lg3 = reinterpret(0x3E91E9EE), // 0x91e9ee.0p-25f\n Lg4 = reinterpret(0x3E789E26), // 0xf89e26.0p-26f\n Ox1p25f = reinterpret(0x4C000000);\n\n let u = reinterpret(x);\n let k = 0;\n if (u < 0x00800000 || (u >> 31)) {\n if (u << 1 == 0) return -1 / (x * x);\n if (u >> 31) return (x - x) / 0;\n k -= 25;\n x *= Ox1p25f;\n u = reinterpret(x);\n } else if (u >= 0x7F800000) {\n return x;\n } else if (u == 0x3F800000) {\n return 0;\n }\n u += 0x3F800000 - 0x3F3504F3;\n k += (u >> 23) - 0x7F;\n u = (u & 0x007FFFFF) + 0x3F3504F3;\n x = reinterpret(u);\n let f = x - 1.0;\n let s = f / (2.0 + f);\n let z = s * s;\n let w = z * z;\n let t1 = w * (Lg2 + w * Lg4);\n let t2 = z * (Lg1 + w * Lg3);\n let r = t2 + t1;\n let hfsq = 0.5 * f * f;\n let dk = k;\n return s * (hfsq + r) + dk * ln2_lo - hfsq + f + dk * ln2_hi;\n }\n }\n\n export function log10(x: f32): f32 { // see: musl/src/math/log10f.c and SUN COPYRIGHT NOTICE above\n const\n ivln10hi = reinterpret(0x3EDE6000), // 4.3432617188e-01f\n ivln10lo = reinterpret(0xB804EAD9), // -3.1689971365e-05f\n log10_2hi = reinterpret(0x3E9A2080), // 3.0102920532e-01f\n log10_2lo = reinterpret(0x355427DB), // 7.9034151668e-07f\n Lg1 = reinterpret(0x3F2AAAAA), // 0xaaaaaa.0p-24f, 0.66666662693f\n Lg2 = reinterpret(0x3ECCCE13), // 0xccce13.0p-25f, 0.40000972152f\n Lg3 = reinterpret(0x3E91E9EE), // 0x91e9ee.0p-25f, 0.28498786688f\n Lg4 = reinterpret(0x3E789E26), // 0xf89e26.0p-26f, 0.24279078841f\n Ox1p25f = reinterpret(0x4C000000); // 0x1p25f\n\n var ix = reinterpret(x);\n var k = 0;\n if (ix < 0x00800000 || (ix >> 31)) {\n if (ix << 1 == 0) return -1 / (x * x);\n if (ix >> 31) return (x - x) / 0.0;\n k -= 25;\n x *= Ox1p25f;\n ix = reinterpret(x);\n } else if (ix >= 0x7F800000) {\n return x;\n } else if (ix == 0x3F800000) {\n return 0;\n }\n ix += 0x3F800000 - 0x3F3504F3;\n k += (ix >> 23) - 0x7F;\n ix = (ix & 0x007FFFFF) + 0x3F3504F3;\n x = reinterpret(ix);\n var f = x - 1.0;\n var s = f / (2.0 + f);\n var z = s * s;\n var w = z * z;\n var t1 = w * (Lg2 + w * Lg4);\n var t2 = z * (Lg1 + w * Lg3);\n var r = t2 + t1;\n var hfsq: f32 = 0.5 * f * f;\n var hi = f - hfsq;\n ix = reinterpret(hi);\n ix &= 0xFFFFF000;\n hi = reinterpret(ix);\n var lo = f - hi - hfsq + s * (hfsq + r);\n var dk = k;\n return dk * log10_2lo + (lo + hi) * ivln10lo + lo * ivln10hi + hi * ivln10hi + dk * log10_2hi;\n }\n\n export function log1p(x: f32): f32 { // see: musl/src/math/log1pf.c and SUN COPYRIGHT NOTICE above\n const\n ln2_hi = reinterpret(0x3F317180), // 6.9313812256e-01\n ln2_lo = reinterpret(0x3717F7D1), // 9.0580006145e-06\n Lg1 = reinterpret(0x3F2AAAAA), // 0xaaaaaa.0p-24f, 0.66666662693f\n Lg2 = reinterpret(0x3ECCCE13), // 0xccce13.0p-25f, 0.40000972152f\n Lg3 = reinterpret(0x3E91E9EE), // 0x91e9ee.0p-25f, 0.28498786688f\n Lg4 = reinterpret(0x3E789E26); // 0xf89e26.0p-26f, 0.24279078841f\n\n var ix = reinterpret(x);\n var c: f32 = 0, f: f32 = 0;\n var k: i32 = 1;\n if (ix < 0x3ED413D0 || (ix >> 31)) {\n if (ix >= 0xBF800000) {\n if (x == -1) return x / 0.0;\n return (x - x) / 0.0;\n }\n if (ix << 1 < 0x33800000 << 1) return x;\n if (ix <= 0xBE95F619) {\n k = 0;\n c = 0;\n f = x;\n }\n } else if (ix >= 0x7F800000) return x;\n if (k) {\n let uf: f32 = 1 + x;\n let iu = reinterpret(uf);\n iu += 0x3F800000 - 0x3F3504F3;\n k = (iu >> 23) - 0x7F;\n if (k < 25) {\n c = k >= 2 ? 1 - (uf - x) : x - (uf - 1);\n c /= uf;\n } else c = 0;\n iu = (iu & 0x007FFFFF) + 0x3F3504F3;\n f = reinterpret(iu) - 1;\n }\n var s = f / (2.0 + f);\n var z = s * s;\n var w = z * z;\n var t1 = w * (Lg2 + w * Lg4);\n var t2 = z * (Lg1 + w * Lg3);\n var r = t2 + t1;\n var hfsq: f32 = 0.5 * f * f;\n var dk = k;\n return s * (hfsq + r) + (dk * ln2_lo + c) - hfsq + f + dk * ln2_hi;\n }\n\n export function log2(x: f32): f32 { // see: musl/src/math/log2f.c and SUN COPYRIGHT NOTICE above\n if (ASC_SHRINK_LEVEL < 1) {\n return log2f_lut(x);\n } else {\n const\n ivln2hi = reinterpret(0x3FB8B000), // 1.4428710938e+00f\n ivln2lo = reinterpret(0xB9389AD4), // -1.7605285393e-04\n Lg1 = reinterpret(0x3F2AAAAA), // 0xaaaaaa.0p-24f, 0.66666662693f\n Lg2 = reinterpret(0x3ECCCE13), // 0xccce13.0p-25f, 0.40000972152f\n Lg3 = reinterpret(0x3E91E9EE), // 0x91e9ee.0p-25f, 0.28498786688f\n Lg4 = reinterpret(0x3E789E26), // 0xf89e26.0p-26f, 0.24279078841f\n Ox1p25f = reinterpret(0x4C000000); // 0x1p25f\n\n let ix = reinterpret(x);\n let k: i32 = 0;\n if (ix < 0x00800000 || (ix >> 31)) {\n if (ix << 1 == 0) return -1 / (x * x);\n if (ix >> 31) return (x - x) / 0.0;\n k -= 25;\n x *= Ox1p25f;\n ix = reinterpret(x);\n } else if (ix >= 0x7F800000) {\n return x;\n } else if (ix == 0x3F800000) {\n return 0;\n }\n ix += 0x3F800000 - 0x3F3504F3;\n k += (ix >> 23) - 0x7F;\n ix = (ix & 0x007FFFFF) + 0x3F3504F3;\n x = reinterpret(ix);\n let f = x - 1.0;\n let s = f / (2.0 + f);\n let z = s * s;\n let w = z * z;\n let t1 = w * (Lg2 + w * Lg4);\n let t2 = z * (Lg1 + w * Lg3);\n let r = t2 + t1;\n let hfsq: f32 = 0.5 * f * f;\n let hi = f - hfsq;\n let u = reinterpret(hi);\n u &= 0xFFFFF000;\n hi = reinterpret(u);\n let lo: f32 = f - hi - hfsq + s * (hfsq + r);\n let dk = k;\n return (lo + hi) * ivln2lo + lo * ivln2hi + hi * ivln2hi + dk;\n }\n }\n\n // @ts-ignore: decorator\n @inline\n export function max(value1: f32, value2: f32): f32 {\n return builtin_max(value1, value2);\n }\n\n // @ts-ignore: decorator\n @inline\n export function min(value1: f32, value2: f32): f32 {\n return builtin_min(value1, value2);\n }\n\n export function pow(x: f32, y: f32): f32 {\n // TODO: remove this fast pathes after introduced own mid-end IR with \"stdlib call simplify\" transforms\n if (builtin_abs(y) <= 2) {\n if (y == 2.0) return x * x;\n if (y == 0.5) {\n return select(\n builtin_abs(builtin_sqrt(x)),\n Infinity,\n x != -Infinity\n );\n }\n if (y == -1.0) return 1 / x;\n if (y == 1.0) return x;\n if (y == 0.0) return 1.0;\n }\n if (ASC_SHRINK_LEVEL < 1) {\n // see: musl/src/math/powf.c\n return powf_lut(x, y);\n } else {\n // based on: jdh8/metallic/src/math/float/powf.c\n if (y == 0) return 1;\n // @ts-ignore: cast\n if (isNaN(x) | isNaN(y)) {\n return NaN;\n }\n let sign: u32 = 0;\n let uy = reinterpret(y);\n let ux = reinterpret(x);\n let sx = ux >> 31;\n ux &= 0x7FFFFFFF;\n if (sx && nearest(y) == y) {\n x = -x;\n sx = 0;\n sign = u32(nearest(y * 0.5) != y * 0.5) << 31;\n }\n let m: u32;\n if (ux == 0x3F800000) { // x == 1\n m = sx | u32((uy & 0x7FFFFFFF) == 0x7F800000) ? 0x7FC00000 : 0x3F800000;\n } else if (ux == 0) {\n m = uy >> 31 ? 0x7F800000 : 0;\n } else if (ux == 0x7F800000) {\n m = uy >> 31 ? 0 : 0x7F800000;\n } else if (sx) {\n m = 0x7FC00000;\n } else {\n m = reinterpret(exp2f(y * log2f(x)));\n }\n return reinterpret(m | sign);\n }\n }\n\n // @ts-ignore: decorator\n @inline\n export function seedRandom(value: i64): void {\n NativeMath.seedRandom(value);\n }\n\n // Using xoroshiro64starstar from http://xoshiro.di.unimi.it/xoroshiro64starstar.c\n export function random(): f32 {\n if (!random_seeded) seedRandom(reinterpret(seed()));\n\n var s0 = random_state0_32;\n var s1 = random_state1_32;\n var r = rotl(s0 * 0x9E3779BB, 5) * 5;\n\n s1 ^= s0;\n random_state0_32 = rotl(s0, 26) ^ s1 ^ (s1 << 9);\n random_state1_32 = rotl(s1, 13);\n\n return reinterpret((r >> 9) | (127 << 23)) - 1.0;\n }\n\n // @ts-ignore: decorator\n @inline\n export function round(x: f32): f32 {\n let roundUp = builtin_ceil(x);\n return select(roundUp, roundUp - 1.0, roundUp - 0.5 <= x);\n }\n\n // @ts-ignore: decorator\n @inline\n export function sign(x: f32): f32 {\n if (ASC_SHRINK_LEVEL > 0) {\n return builtin_abs(x) > 0 ? builtin_copysign(1, x) : x;\n } else {\n return x > 0 ? 1 : x < 0 ? -1 : x;\n }\n }\n\n // @ts-ignore: decorator\n @inline\n export function signbit(x: f32): bool {\n return (reinterpret(x) >>> 31);\n }\n\n export function sin(x: f32): f32 { // see: musl/src/math/sinf.c\n const\n s1pio2 = reinterpret(0x3FF921FB54442D18), // M_PI_2 * 1\n s2pio2 = reinterpret(0x400921FB54442D18), // M_PI_2 * 2\n s3pio2 = reinterpret(0x4012D97C7F3321D2), // M_PI_2 * 3\n s4pio2 = reinterpret(0x401921FB54442D18); // M_PI_2 * 4\n\n var ix = reinterpret(x);\n var sign = ix >> 31;\n ix &= 0x7FFFFFFF;\n\n if (ix <= 0x3F490FDA) { // |x| ~<= π/4\n if (ix < 0x39800000) { // |x| < 2**-12\n return x;\n }\n return sin_kernf(x);\n }\n\n if (ASC_SHRINK_LEVEL < 1) {\n if (ix <= 0x407B53D1) { // |x| ~<= 5π/4\n if (ix <= 0x4016CBE3) { // |x| ~<= 3π/4\n return sign ? -cos_kernf(x + s1pio2) : cos_kernf(x - s1pio2);\n }\n return sin_kernf(-(sign ? x + s2pio2 : x - s2pio2));\n }\n\n if (ix <= 0x40E231D5) { // |x| ~<= 9π/4\n if (ix <= 0x40AFEDDF) { // |x| ~<= 7π/4\n return sign ? cos_kernf(x + s3pio2) : -cos_kernf(x - s3pio2);\n }\n return sin_kernf(sign ? x + s4pio2 : x - s4pio2);\n }\n }\n\n // sin(Inf or NaN) is NaN\n if (ix >= 0x7F800000) return x - x;\n\n var n = rempio2f(x, ix, sign);\n var y = rempio2f_y;\n\n var t = n & 1 ? cos_kernf(y) : sin_kernf(y);\n return n & 2 ? -t : t;\n }\n\n export function sinh(x: f32): f32 { // see: musl/src/math/sinhf.c\n var u = reinterpret(x) & 0x7FFFFFFF;\n var a = reinterpret(u);\n var h = builtin_copysign(0.5, x);\n if (u < 0x42B17217) {\n let t = expm1(a);\n if (u < 0x3F800000) {\n if (u < 0x3F800000 - (12 << 23)) return x;\n return h * (2 * t - t * t / (t + 1));\n }\n return h * (t + t / (t + 1));\n }\n return expo2f(a, 2 * h);\n }\n\n // @ts-ignore: decorator\n @inline\n export function sqrt(x: f32): f32 {\n return builtin_sqrt(x);\n }\n\n export function tan(x: f32): f32 { // see: musl/src/math/tanf.c\n const\n t1pio2 = reinterpret(0x3FF921FB54442D18), // 1 * M_PI_2\n t2pio2 = reinterpret(0x400921FB54442D18), // 2 * M_PI_2\n t3pio2 = reinterpret(0x4012D97C7F3321D2), // 3 * M_PI_2\n t4pio2 = reinterpret(0x401921FB54442D18); // 4 * M_PI_2\n\n var ix = reinterpret(x);\n var sign = ix >> 31;\n ix &= 0x7FFFFFFF;\n\n if (ix <= 0x3F490FDA) { // |x| ~<= π/4\n if (ix < 0x39800000) { // |x| < 2**-12\n return x;\n }\n return tan_kernf(x, 0);\n }\n\n if (ASC_SHRINK_LEVEL < 1) {\n if (ix <= 0x407B53D1) { // |x| ~<= 5π/4\n if (ix <= 0x4016CBE3) { // |x| ~<= 3π/4\n return tan_kernf((sign ? x + t1pio2 : x - t1pio2), 1);\n } else {\n return tan_kernf((sign ? x + t2pio2 : x - t2pio2), 0);\n }\n }\n if (ix <= 0x40E231D5) { // |x| ~<= 9π/4\n if (ix <= 0x40AFEDDF) { // |x| ~<= 7π/4\n return tan_kernf((sign ? x + t3pio2 : x - t3pio2), 1);\n } else {\n return tan_kernf((sign ? x + t4pio2 : x - t4pio2), 0);\n }\n }\n }\n\n // tan(Inf or NaN) is NaN\n if (ix >= 0x7F800000) return x - x;\n\n // argument reduction\n var n = rempio2f(x, ix, sign);\n var y = rempio2f_y;\n return tan_kernf(y, n & 1);\n }\n\n export function tanh(x: f32): f32 { // see: musl/src/math/tanhf.c\n var u = reinterpret(x);\n u &= 0x7FFFFFFF;\n var y = reinterpret(u);\n var t: f32;\n if (u > 0x3F0C9F54) {\n if (u > 0x41200000) t = 1 + 0 / y;\n else {\n t = expm1(2 * y);\n t = 1 - 2 / (t + 2);\n }\n } else if (u > 0x3E82C578) {\n t = expm1(2 * y);\n t = t / (t + 2);\n } else if (u >= 0x00800000) {\n t = expm1(-2 * y);\n t = -t / (t + 2);\n } else t = y;\n return builtin_copysign(t, x);\n }\n\n // @ts-ignore: decorator\n @inline\n export function trunc(x: f32): f32 {\n return builtin_trunc(x);\n }\n\n export function scalbn(x: f32, n: i32): f32 { // see: https://git.musl-libc.org/cgit/musl/tree/src/math/scalbnf.c\n const\n Ox1p24f = reinterpret(0x4B800000),\n Ox1p127f = reinterpret(0x7F000000),\n Ox1p_126f = reinterpret(0x00800000);\n\n var y = x;\n if (n > 127) {\n y *= Ox1p127f;\n n -= 127;\n if (n > 127) {\n y *= Ox1p127f;\n n = builtin_min(n - 127, 127);\n }\n } else if (n < -126) {\n y *= Ox1p_126f * Ox1p24f;\n n += 126 - 24;\n if (n < -126) {\n y *= Ox1p_126f * Ox1p24f;\n n = builtin_max(n + 126 - 24, -126);\n }\n }\n return y * reinterpret((0x7F + n) << 23);\n }\n\n export function mod(x: f32, y: f32): f32 { // see: musl/src/math/fmodf.c\n if (builtin_abs(y) == 1.0) {\n // x % 1, x % -1 ==> sign(x) * abs(x - 1.0 * trunc(x / 1.0))\n // TODO: move this rule to compiler's optimization pass.\n // It could be apply for any x % C_pot, where \"C_pot\" is pow of two const.\n return builtin_copysign(x - builtin_trunc(x), x);\n }\n var ux = reinterpret(x);\n var uy = reinterpret(y);\n var ex = (ux >> 23 & 0xFF);\n var ey = (uy >> 23 & 0xFF);\n var sm = ux & 0x80000000;\n var uy1 = uy << 1;\n if (uy1 == 0 || ex == 0xFF || isNaN(y)) {\n let m = x * y;\n return m / m;\n }\n var ux1 = ux << 1;\n if (ux1 <= uy1) {\n return x * f32(ux1 != uy1);\n }\n if (!ex) {\n ex -= builtin_clz(ux << 9);\n ux <<= 1 - ex;\n } else {\n ux &= -1 >> 9;\n ux |= 1 << 23;\n }\n if (!ey) {\n ey -= builtin_clz(uy << 9);\n uy <<= 1 - ey;\n } else {\n uy &= -1 >> 9;\n uy |= 1 << 23;\n }\n while (ex > ey) {\n if (ux >= uy) {\n if (ux == uy) return 0 * x;\n ux -= uy;\n }\n ux <<= 1;\n --ex;\n }\n if (ux >= uy) {\n if (ux == uy) return 0 * x;\n ux -= uy;\n }\n // for (; !(ux >> 23); ux <<= 1) --ex;\n var shift = builtin_clz(ux << 8);\n ex -= shift;\n ux <<= shift;\n if (ex > 0) {\n ux -= 1 << 23;\n ux |= ex << 23;\n } else {\n ux >>= -ex + 1;\n }\n return reinterpret(ux | sm);\n }\n\n export function rem(x: f32, y: f32): f32 { // see: musl/src/math/remquof.c\n var ux = reinterpret(x);\n var uy = reinterpret(y);\n var ex = (ux >> 23 & 0xFF);\n var ey = (uy >> 23 & 0xFF);\n var sx = (ux >> 31);\n var uxi = ux;\n if (uy << 1 == 0 || ex == 0xFF || isNaN(y)) return (x * y) / (x * y);\n if (ux << 1 == 0) return x;\n if (!ex) {\n ex -= builtin_clz(uxi << 9);\n uxi <<= 1 - ex;\n } else {\n uxi &= -1 >> 9;\n uxi |= 1 << 23;\n }\n if (!ey) {\n ey -= builtin_clz(uy << 9);\n uy <<= 1 - ey;\n } else {\n uy &= -1 >> 9;\n uy |= 1 << 23;\n }\n var q = 0;\n do {\n if (ex < ey) {\n if (ex + 1 == ey) break; // goto end\n return x;\n }\n while (ex > ey) {\n if (uxi >= uy) {\n uxi -= uy;\n ++q;\n }\n uxi <<= 1;\n q <<= 1;\n --ex;\n }\n if (uxi >= uy) {\n uxi -= uy;\n ++q;\n }\n if (uxi == 0) ex = -30;\n else {\n let shift = builtin_clz(uxi << 8);\n ex -= shift;\n uxi <<= shift;\n }\n break;\n } while (false);\n // end:\n if (ex > 0) {\n uxi -= 1 << 23;\n uxi |= ex << 23;\n } else {\n uxi >>= -ex + 1;\n }\n x = reinterpret(uxi);\n y = builtin_abs(y);\n var x2 = x + x;\n if (ex == ey || (ex + 1 == ey && (x2 > y || (x2 == y && (q & 1))))) {\n x -= y;\n // q++;\n }\n return sx ? -x : x;\n }\n\n export function sincos(x: f32): void { // see: musl/tree/src/math/sincosf.c\n const\n s1pio2 = reinterpret(0x3FF921FB54442D18), // 1 * M_PI_2\n s2pio2 = reinterpret(0x400921FB54442D18), // 2 * M_PI_2\n s3pio2 = reinterpret(0x4012D97C7F3321D2), // 3 * M_PI_2\n s4pio2 = reinterpret(0x401921FB54442D18); // 4 * M_PI_2\n\n var ix = reinterpret(x);\n var sign = ix >> 31;\n ix &= 0x7FFFFFFF;\n\n if (ix <= 0x3F490FDA) { // |x| ~<= π/4\n if (ix < 0x39800000) { // |x| < 2**-12\n sincos_sin = x;\n sincos_cos = 1;\n return;\n }\n sincos_sin = sin_kernf(x);\n sincos_cos = cos_kernf(x);\n return;\n }\n if (ASC_SHRINK_LEVEL < 1) {\n if (ix <= 0x407B53D1) { // |x| ~<= 5π/4\n if (ix <= 0x4016CBE3) { // |x| ~<= 3π/4\n if (sign) {\n sincos_sin = -cos_kernf(x + s1pio2);\n sincos_cos = sin_kernf(x + s1pio2);\n } else {\n sincos_sin = cos_kernf(s1pio2 - x);\n sincos_cos = sin_kernf(s1pio2 - x);\n }\n return;\n }\n // -sin(x + c) is not correct if x+c could be 0: -0 vs +0\n sincos_sin = -sin_kernf(sign ? x + s2pio2 : x - s2pio2);\n sincos_cos = -cos_kernf(sign ? x + s2pio2 : x - s2pio2);\n return;\n }\n if (ix <= 0x40E231D5) { // |x| ~<= 9π/4\n if (ix <= 0x40AFEDDF) { // |x| ~<= 7π/4\n if (sign) {\n sincos_sin = cos_kernf(x + s3pio2);\n sincos_cos = -sin_kernf(x + s3pio2);\n } else {\n sincos_sin = -cos_kernf(x - s3pio2);\n sincos_cos = sin_kernf(x - s3pio2);\n }\n return;\n }\n sincos_sin = sin_kernf(sign ? x + s4pio2 : x - s4pio2);\n sincos_cos = cos_kernf(sign ? x + s4pio2 : x - s4pio2);\n return;\n }\n }\n // sin(Inf or NaN) is NaN\n if (ix >= 0x7F800000) {\n let xx = x - x;\n sincos_sin = xx;\n sincos_cos = xx;\n return;\n }\n // general argument reduction needed\n var n = rempio2f(x, ix, sign);\n var y = rempio2f_y;\n var s = sin_kernf(y);\n var c = cos_kernf(y);\n var sin = s, cos = c;\n if (n & 1) {\n sin = c;\n cos = -s;\n }\n if (n & 2) {\n sin = -sin;\n cos = -cos;\n }\n sincos_sin = sin;\n sincos_cos = cos;\n }\n}\n\nexport function ipow32(x: i32, e: i32): i32 {\n var out = 1;\n if (ASC_SHRINK_LEVEL < 1) {\n if (x == 2) {\n return select(1 << e, 0, e < 32);\n }\n if (e <= 0) {\n if (x == -1) return select(-1, 1, e & 1);\n return i32(e == 0) | i32(x == 1);\n }\n else if (e == 1) return x;\n else if (e == 2) return x * x;\n else if (e < 32) {\n let log = 32 - clz(e);\n // 32 = 2 ^ 5, so need only five cases.\n // But some extra cases needs for properly overflowing\n switch (log) {\n case 5: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 4: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 3: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 2: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 1: {\n if (e & 1) out *= x;\n }\n }\n return out;\n }\n }\n while (e) {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n return out;\n}\n\nexport function ipow64(x: i64, e: i64): i64 {\n var out: i64 = 1;\n if (ASC_SHRINK_LEVEL < 1) {\n if (x == 2) {\n return select(1 << e, 0, e < 64);\n }\n if (e <= 0) {\n if (x == -1) return select(-1, 1, e & 1);\n return i64(e == 0) | i64(x == 1);\n }\n else if (e == 1) return x;\n else if (e == 2) return x * x;\n else if (e < 64) {\n let log = 64 - clz(e);\n // 64 = 2 ^ 6, so need only six cases.\n // But some extra cases needs for properly overflowing\n switch (log) {\n case 6: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 5: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 4: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 3: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 2: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 1: {\n if (e & 1) out *= x;\n }\n }\n return out;\n }\n }\n while (e) {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n return out;\n}\n\n/*\nTODO:\nIn compile time if only exponent is constant we could replace ipow32/ipow64 by shortest addition chains\nwhich usually faster than exponentiation by squaring\n\nfor ipow32 and e < 32:\n\nlet b: i32, c: i32, d: i32, h: i32, k: i32, g: i32;\nswitch (e) {\n case 1: return x;\n case 2: return x * x;\n case 3: return x * x * x;\n case 4: return (b = x * x) * b;\n case 5: return (b = x * x) * b * x;\n case 6: return (b = x * x) * b * b;\n case 7: return (b = x * x) * b * b * x;\n case 8: return (d = (b = x * x) * b) * d;\n case 9: return (c = x * x * x) * c * c;\n case 10: return (d = (b = x * x) * b) * d * b;\n case 11: return (d = (b = x * x) * b) * d * b * x;\n case 12: return (d = (b = x * x) * b) * d * d;\n case 13: return (d = (b = x * x) * b) * d * d * x;\n case 14: return (d = (b = x * x) * b) * d * d * b;\n case 15: return (k = (b = x * x) * b * x) * k * k;\n case 16: return (h = (d = (b = x * x) * b) * d) * h;\n case 17: return (h = (d = (b = x * x) * b) * d) * h * x;\n case 18: return (h = (d = (b = x * x) * b) * d * x) * h;\n case 19: return (h = (d = (b = x * x) * b) * d * x) * h * x;\n case 20: return (h = (k = (b = x * x) * b * x) * k) * h;\n case 21: return (h = (k = (b = x * x) * b * x) * k) * h * x;\n case 22: return (g = (h = (k = (b = x * x) * b * x) * k) * x) * g;\n case 23: return (h = (d = (c = (b = x * x) * x) * b) * d) * h * c;\n case 24: return (h = (d = (c = x * x * x) * c) * d) * h;\n case 25: return (h = (d = (c = x * x * x) * c) * d) * h * x;\n case 26: return (g = (h = (d = (c = x * x * x) * c) * d) * x) * g;\n case 27: return (h = (d = (c = x * x * x) * c) * d) * h * c;\n case 28: return (h = (d = (c = x * x * x) * c * x) * d) * h;\n case 29: return (h = (d = (c = x * x * x) * c * x) * d) * h * x;\n case 30: return (h = (d = (c = x * x * x) * c) * d * c) * h;\n case 31: return (h = (d = (c = x * x * x) * c) * d * c) * h * x;\n}\n\nfor ipow64: TODO\nswitch (e) {\n case 32:\n ...\n case 63:\n}\n*/\n", + "memory": "import { memcmp, memmove, memset } from \"./util/memory\";\nimport { E_NOTIMPLEMENTED } from \"./util/error\";\n\n/** Memory manager interface. */\nexport namespace memory {\n\n /** Gets the size of the memory in pages. */\n // @ts-ignore: decorator\n @builtin\n export declare function size(): i32;\n\n /** Grows the memory by the given size in pages and returns the previous size in pages. */\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function grow(pages: i32): i32;\n\n /** Fills a section in memory with the specified byte value. */\n // @ts-ignore: decorator\n @unsafe @builtin\n export function fill(dst: usize, c: u8, n: usize): void {\n memset(dst, c, n); // fallback if \"bulk-memory\" isn't enabled\n }\n\n /** Copies a section of memory to another. Has move semantics. */\n // @ts-ignore: decorator\n @unsafe @builtin\n export function copy(dst: usize, src: usize, n: usize): void {\n memmove(dst, src, n); // fallback if \"bulk-memory\" isn't enabled\n }\n\n /** Initializes a memory segment. */\n // @ts-ignore: decorator\n @unsafe\n export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void {\n throw new Error(E_NOTIMPLEMENTED);\n }\n\n /** Drops a memory segment. */\n // @ts-ignore: decorator\n @unsafe\n export function drop(segmentIndex: u32): void {\n throw new Error(E_NOTIMPLEMENTED);\n }\n\n /** Repeats a section of memory at a specific address. */\n // @ts-ignore: decorator\n @unsafe\n export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void {\n var index: usize = 0;\n var total = srcLength * count;\n while (index < total) {\n memory.copy(dst + index, src, srcLength);\n index += srcLength;\n }\n }\n\n /** Compares a section of memory to another. */\n // @ts-ignore: decorator\n @inline\n export function compare(vl: usize, vr: usize, n: usize): i32 {\n return memcmp(vl, vr, n);\n }\n\n /** Gets a pointer to a static chunk of memory of the given size. */\n // @ts-ignore: decorator\n @builtin\n export declare function data(size: T, align?: i32): usize;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare const __data_end: usize;\n\n// @ts-ignore: decorator\n@builtin\nexport declare var __stack_pointer: usize;\n\n// @ts-ignore: decorator\n@builtin\nexport declare const __heap_base: usize;\n\n/** Heap memory interface. */\nexport namespace heap {\n\n /** Allocates a chunk of memory of at least the specified size. */\n // @ts-ignore: decorator\n @unsafe export function alloc(size: usize): usize {\n return __alloc(size);\n }\n\n /** Reallocates a chunk of memory to have at least the specified size. */\n // @ts-ignore: decorator\n @unsafe export function realloc(ptr: usize, size: usize): usize {\n return __realloc(ptr, size);\n }\n\n /** Frees a chunk of memory. Does hardly anything (most recent block only) with the stub runtime. */\n // @ts-ignore: decorator\n @unsafe export function free(ptr: usize): void {\n __free(ptr);\n }\n\n /** Dangerously resets the entire heap. Specific to the stub runtime. */\n // @ts-ignore: decorator\n @unsafe export function reset(): void {\n if (isDefined(__reset)) {\n __reset();\n } else {\n throw new Error(E_NOTIMPLEMENTED);\n }\n }\n}\n", + "node/fs": "// import {\n// args_get,\n// args_sizes_get,\n// environ_get,\n// environ_sizes_get,\n// proc_exit,\n// fd_write,\n// fd_close,\n// fd_read,\n// clock_time_get,\n// clockid,\n// errnoToString,\n// fd,\n// rights,\n// lookupflags,\n// path_open\n// } from \"bindings/wasi_snapshot_preview1\";\n\n// export function open(path: string, mode: string = \"r\"): fd {\n// var flags = stringToFlags(mode);\n// var w_oflags = flagsToOflags(flags);\n// var w_rights = flagsToRights(flags) | rights.FD_SEEK | rights.FD_TELL | rights.FD_FILESTAT_GET;\n// var w_fdflags = flagsToFdflags(flags);\n// var pathBuf = String.UTF8.encode(path);\n// var pathLen = pathBuf.byteLength;\n// var err = path_open(changetype(3),\n// lookupflags.SYMLINK_FOLLOW,\n// changetype(pathBuf), pathLen,\n// w_oflags, w_rights, w_rights, w_fdflags,\n// iobuf\n// );\n// if (err) throw new Error(errnoToString(err));\n// return load(iobuf);\n// }\n\n// export function readFileSync(path: string): T {\n// var s = changetype(open(path, \"r\"));\n// const BUFFER_SIZE = 4096;\n// var bufs = new Array();\n// var buf = new ArrayBuffer(BUFFER_SIZE);\n// var off = 0;\n// var max = BUFFER_SIZE;\n// var size = 0;\n// do {\n// let n = s.read(buf, off);\n// if (n <= 0) break;\n// size += n;\n// if (size == max) {\n// bufs.push(buf);\n// buf = new ArrayBuffer(BUFFER_SIZE);\n// max += BUFFER_SIZE;\n// }\n// } while (true);\n// s.close();\n// }\n\n// // @ts-ignore\n// @inline const O_READ = 1 << 0;\n// // @ts-ignore\n// @inline const O_WRITE = 1 << 1;\n// // @ts-ignore\n// @inline const O_SYNC = 1 << 2;\n// // @ts-ignore\n// @inline const O_APPEND = 1 << 3;\n// // @ts-ignore\n// @inline const O_CREAT = 1 << 4;\n// // @ts-ignore\n// @inline const O_TRUNC = 1 << 5;\n// // @ts-ignore\n// @inline const O_EXCL = 1 << 6;\n\n// function stringToFlags(flags: string): i32 {\n// switch (flags.length ? flags.charCodeAt(0) : 0) {\n// case CharCode.r: {\n// if (flags == \"r\") return O_READ;\n// else if (flags == \"rs\") return O_READ | O_SYNC;\n// else if (flags == \"r+\") return O_READ | O_WRITE;\n// else if (flags == \"rs+\") return O_READ | O_WRITE | O_SYNC;\n// break;\n// }\n// case CharCode.w: {\n// if (flags == \"w\") return O_WRITE | O_CREAT | O_TRUNC;\n// else if (flags == \"wx\") return O_WRITE | O_CREAT | O_TRUNC | O_EXCL;\n// else if (flags == \"w+\") return O_READ | O_WRITE | O_CREAT | O_TRUNC;\n// else if (flags == \"wx+\") return O_READ | O_WRITE | O_CREAT | O_TRUNC | O_EXCL;\n// break;\n// }\n// case CharCode.a: {\n// if (flags == \"a\") return O_WRITE | O_CREAT | O_APPEND;\n// else if (flags == \"ax\") return O_WRITE | O_CREAT | O_APPEND | O_EXCL;\n// else if (flags == \"as\") return O_WRITE | O_CREAT | O_APPEND | O_SYNC;\n// else if (flags == \"a+\") return O_READ | O_WRITE | O_APPEND | O_CREAT;\n// else if (flags == \"ax+\") return O_READ | O_WRITE | O_APPEND | O_CREAT | O_EXCL;\n// else if (flags == \"as+\") return O_READ | O_WRITE | O_APPEND | O_CREAT | O_SYNC;\n// break;\n// }\n// case CharCode.x: {\n// if (flags == \"xw\") return O_WRITE | O_CREAT | O_TRUNC | O_EXCL; // wx\n// else if (flags == \"xw+\") return O_READ | O_WRITE | O_CREAT | O_TRUNC | O_EXCL; // wx+\n// else if (flags == \"xa\") return O_WRITE | O_CREAT | O_APPEND | O_EXCL; // ax\n// else if (flags == \"xa+\") return O_READ | O_WRITE | O_APPEND | O_CREAT | O_EXCL; // ax+\n// break;\n// }\n// case CharCode.s: {\n// if (flags == \"sr\") return O_READ | O_SYNC; // rs\n// else if (flags == \"sr+\") return O_READ | O_WRITE | O_SYNC; // rs+\n// else if (flags == \"sa\") return O_WRITE | O_CREAT | O_APPEND | O_SYNC; // as\n// else if (flags == \"sa+\") return O_READ | O_WRITE | O_APPEND | O_CREAT | O_SYNC; // as+\n// break;\n// }\n// }\n// throw new Error(\"invalid open flags\");\n// }\n\n// function flagsToOflags(flags: i32): oflags {\n// return (\n// oflags.CREAT * i32((flags & O_CREAT) != 0),\n// oflags.TRUNC * i32((flags & O_TRUNC) != 0),\n// oflags.EXCL * i32((flags & O_EXCL) != 0)\n// );\n// }\n\n// function flagsToRights(flags: i32): rights {\n// return (\n// rights.FD_READ * i32((flags & O_READ) != 0),\n// rights.FD_WRITE * i32((flags & O_WRITE) != 0)\n// );\n// }\n\n// function flagsToFdflags(flags: i32): fdflags {\n// return (\n// fdflags.APPEND * i32((flags & O_APPEND) != 0),\n// fdflags.SYNC * i32((flags & O_SYNC) != 0)\n// );\n// }\n\n// export const enum CharCode {\n// PLUS = 0x2B,\n// MINUS = 0x2D,\n// DOT = 0x2E,\n// _0 = 0x30,\n// _1 = 0x31,\n// _2 = 0x32,\n// _3 = 0x33,\n// _4 = 0x34,\n// _5 = 0x35,\n// _6 = 0x36,\n// _7 = 0x37,\n// _8 = 0x38,\n// _9 = 0x39,\n// A = 0x41,\n// B = 0x42,\n// C = 0x43,\n// D = 0x44,\n// E = 0x45,\n// F = 0x46,\n// G = 0x47,\n// H = 0x48,\n// I = 0x49,\n// J = 0x4A,\n// K = 0x4B,\n// L = 0x4C,\n// M = 0x4D,\n// N = 0x4E,\n// O = 0x4F,\n// P = 0x50,\n// Q = 0x51,\n// R = 0x52,\n// S = 0x53,\n// T = 0x54,\n// U = 0x55,\n// V = 0x56,\n// W = 0x57,\n// X = 0x58,\n// Y = 0x59,\n// Z = 0x5A,\n// a = 0x61,\n// b = 0x62,\n// c = 0x63,\n// d = 0x64,\n// e = 0x65,\n// f = 0x66,\n// g = 0x67,\n// h = 0x68,\n// i = 0x69,\n// j = 0x6A,\n// k = 0x6B,\n// l = 0x6C,\n// m = 0x6D,\n// n = 0x6E,\n// o = 0x6F,\n// p = 0x70,\n// q = 0x71,\n// r = 0x72,\n// s = 0x73,\n// t = 0x74,\n// u = 0x75,\n// v = 0x76,\n// w = 0x77,\n// x = 0x78,\n// y = 0x79,\n// z = 0x7A\n// }\n", + "number": "import { itoa32, utoa32, itoa64, utoa64, dtoa } from \"./util/number\";\nimport { strtol } from \"./util/string\";\n\n// @ts-ignore: decorator\n@builtin @inline\nexport const NaN: f64 = 0 / 0;\n\n// @ts-ignore: decorator\n@builtin @inline\nexport const Infinity: f64 = 1 / 0;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isNaN(value: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isFinite(value: T): bool;\n\n@final @unmanaged\nexport abstract class I8 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i8 = i8.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i8 = i8.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): i8 {\n return strtol(value, radix);\n }\n\n toString(this: i8, radix: i32 = 10): String {\n return itoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class I16 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i16 = i16.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i16 = i16.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): i16 {\n return strtol(value, radix);\n }\n\n toString(this: i16, radix: i32 = 10): String {\n return itoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class I32 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i32 = i32.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i32 = i32.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): i32 {\n return strtol(value, radix);\n }\n\n toString(this: i32, radix: i32 = 10): String {\n return itoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class I64 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i64 = i64.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i64 = i64.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): i64 {\n return strtol(value, radix);\n }\n\n toString(this: i64, radix: i32 = 10): String {\n return itoa64(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class Isize {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: isize = isize.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: isize = isize.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): isize {\n return strtol(value, radix);\n }\n\n toString(this: isize, radix: i32 = 10): String {\n if (sizeof() == 4) {\n return itoa32(this, radix);\n } else {\n return itoa64(this, radix);\n }\n }\n}\n\n@final @unmanaged\nexport abstract class U8 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u8 = u8.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u8 = u8.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): u8 {\n return strtol(value, radix);\n }\n\n toString(this: u8, radix: i32 = 10): String {\n return utoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class U16 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u16 = u16.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u16 = u16.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): u16 {\n return strtol(value, radix);\n }\n\n toString(this: u16, radix: i32 = 10): String {\n return utoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class U32 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u32 = u32.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u32 = u32.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): u32 {\n return strtol(value, radix);\n }\n\n toString(this: u32, radix: i32 = 10): String {\n return utoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class U64 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u64 = u64.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u64 = u64.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): u64 {\n return strtol(value, radix);\n }\n\n toString(this: u64, radix: i32 = 10): String {\n return utoa64(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class Usize {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: usize = usize.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: usize = usize.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): usize {\n return strtol(value, radix);\n }\n\n toString(this: usize, radix: i32 = 10): String {\n if (sizeof() == 4) {\n return utoa32(this, radix);\n } else {\n return utoa64(this, radix);\n }\n }\n}\n\n@final @unmanaged\nexport abstract class Bool {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: bool = bool.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: bool = bool.MAX_VALUE;\n\n toString(this: bool, radix: i32 = 0): String {\n return this ? \"true\" : \"false\";\n }\n}\n\nexport { Bool as Boolean };\n\n@final @unmanaged\nexport abstract class F32 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly EPSILON: f32 = f32.EPSILON;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: f32 = f32.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: f32 = f32.MAX_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_SAFE_INTEGER: f32 = f32.MIN_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_SAFE_INTEGER: f32 = f32.MAX_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly POSITIVE_INFINITY: f32 = f32.POSITIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NEGATIVE_INFINITY: f32 = f32.NEGATIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NaN: f32 = f32.NaN;\n\n static isNaN(value: f32): bool {\n return isNaN(value);\n }\n\n static isFinite(value: f32): bool {\n return isFinite(value);\n }\n\n static isSafeInteger(value: f32): bool {\n return abs(value) <= f32.MAX_SAFE_INTEGER && trunc(value) == value;\n }\n\n static isInteger(value: f32): bool {\n return isFinite(value) && trunc(value) == value;\n }\n\n static parseInt(value: string, radix: i32 = 0): f32 {\n return strtol(value, radix);\n }\n\n static parseFloat(value: string): f32 {\n return parseFloat(value);\n }\n\n toString(this: f32, radix: i32 = 0): String {\n return dtoa(this);\n }\n}\n\n@final @unmanaged\nexport abstract class F64 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly EPSILON: f64 = f64.EPSILON;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: f64 = f64.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: f64 = f64.MAX_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_SAFE_INTEGER: f64 = f64.MIN_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_SAFE_INTEGER: f64 = f64.MAX_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly POSITIVE_INFINITY: f64 = f64.POSITIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NEGATIVE_INFINITY: f64 = f64.NEGATIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NaN: f64 = f64.NaN;\n\n static isNaN(value: f64): bool {\n return isNaN(value);\n }\n\n static isFinite(value: f64): bool {\n return isFinite(value);\n }\n\n static isSafeInteger(value: f64): bool {\n return abs(value) <= f64.MAX_SAFE_INTEGER && trunc(value) == value;\n }\n\n static isInteger(value: f64): bool {\n return isFinite(value) && trunc(value) == value;\n }\n\n static parseInt(value: string, radix: i32 = 0): f64 {\n return strtol(value, radix);\n }\n\n static parseFloat(value: string): f64 {\n return parseFloat(value);\n }\n\n toString(this: f64, radix: i32 = 0): String {\n return dtoa(this);\n }\n}\n\nexport { F64 as Number };\n", + "object": "export class Object {\n static is(value1: T, value2: T): bool {\n if (isFloat()) {\n if (value1 == value2) {\n // 0 === -0, but they are not identical\n if (sizeof() == 8) {\n // @ts-ignore: typecast\n return reinterpret(value1) == reinterpret(value2);\n } else {\n // @ts-ignore: typecast\n return reinterpret(value1) == reinterpret(value2);\n }\n }\n // NaN !== NaN, but they are identical.\n // @ts-ignore: typecast\n return bool(i32(isNaN(value1)) & i32(isNaN(value2)));\n }\n // For references, strings, integers and booleans\n return value1 == value2;\n }\n}\n", + "polyfills": "export function bswap(value: T): T {\n if (isInteger()) {\n if (sizeof() == 1) {\n return value;\n }\n if (sizeof() == 2) {\n return (value << 8 | (value >> 8));\n }\n if (sizeof() == 4) {\n return (\n rotl(value & 0xFF00FF00, 8) |\n rotr(value & 0x00FF00FF, 8)\n );\n }\n if (sizeof() == 8) {\n let a = (value >> 8) & 0x00FF00FF00FF00FF;\n let b = (value & 0x00FF00FF00FF00FF) << 8;\n let v = a | b;\n\n a = (v >>> 16) & 0x0000FFFF0000FFFF;\n b = (v & 0x0000FFFF0000FFFF) << 16;\n\n return rotr(a | b, 32);\n }\n }\n ERROR(\"Unsupported generic type\");\n}\n\nexport function bswap16(value: T): T {\n if (isInteger()) {\n if (sizeof() == 1) {\n return value;\n }\n if (sizeof() == 2) {\n return (value << 8 | (value >> 8));\n }\n if (sizeof() == 4) {\n return (\n (((value & 0xFF) << 8)) |\n ((value >> 8) & 0xFF) |\n (value & 0xFFFF0000)\n );\n }\n }\n ERROR(\"Unsupported generic type\");\n}\n", + "process": "import {\n args_get,\n args_sizes_get,\n environ_get,\n environ_sizes_get,\n proc_exit,\n fd_write,\n fd_close,\n fd_read,\n clock_time_get,\n clockid,\n errnoToString,\n fd,\n tempbuf\n} from \"bindings/wasi\";\n\nimport {\n E_INDEXOUTOFRANGE\n} from \"util/error\";\n\nexport namespace process {\n\n // @ts-ignore: decorator\n @lazy export const arch = sizeof() == 4 ? \"wasm32\" : \"wasm64\";\n\n // @ts-ignore: decorator\n @lazy export const platform = \"wasm\";\n\n // @ts-ignore: decorator\n @lazy export const argv = lazyArgv();\n\n // @ts-ignore: decorator\n @lazy export const env = lazyEnv();\n\n // @ts-ignore: decorator\n @lazy export var exitCode = 0;\n\n export function exit(code: i32 = exitCode): void {\n proc_exit(code);\n }\n\n // @ts-ignore: decorator\n @lazy export const stdin = changetype(0);\n // @ts-ignore: decorator\n @lazy export const stdout = changetype(1);\n // @ts-ignore: decorator\n @lazy export const stderr = changetype(2);\n\n export function time(): i64 {\n var err = clock_time_get(clockid.REALTIME, 1000000, tempbuf);\n if (err) throw new Error(errnoToString(err));\n return load(tempbuf) / 1000000;\n }\n\n export function hrtime(): u64 {\n var err = clock_time_get(clockid.MONOTONIC, 0, tempbuf);\n if (err) throw new Error(errnoToString(err));\n return load(tempbuf);\n }\n}\n\nfunction lazyArgv(): string[] {\n var err = args_sizes_get(tempbuf, tempbuf + sizeof());\n if (err) throw new Error(errnoToString(err));\n var count = load(tempbuf);\n var ptrsSize = count * sizeof();\n var dataSize = load(tempbuf, sizeof());\n var bufSize = ptrsSize + dataSize;\n var buf = __alloc(bufSize);\n err = args_get(buf, buf + ptrsSize);\n if (err) throw new Error(errnoToString(err));\n var count32 = count;\n var argv = new Array(count32);\n for (let i = 0; i < count32; ++i) {\n let ptr = load(buf + i * sizeof());\n let str = String.UTF8.decodeUnsafe(ptr, ptr + bufSize - buf, true);\n argv[i] = str;\n }\n __free(buf);\n return argv;\n}\n\nfunction lazyEnv(): Map {\n var err = environ_sizes_get(tempbuf, tempbuf + 4);\n if (err) throw new Error(errnoToString(err));\n var count = load(tempbuf);\n var ptrsSize = count * sizeof();\n var dataSize = load(tempbuf, sizeof());\n var bufSize = ptrsSize + dataSize;\n var buf = __alloc(bufSize);\n err = environ_get(buf, buf + ptrsSize);\n if (err) throw new Error(errnoToString(err));\n var env = new Map();\n for (let i: usize = 0; i < count; ++i) {\n let ptr = load(buf + i * sizeof());\n let str = String.UTF8.decodeUnsafe(ptr, ptr + bufSize - buf, true);\n let pos = str.indexOf(\"=\");\n if (~pos) {\n env.set(str.substring(0, pos), str.substring(pos + 1));\n // __dispose(changetype(str));\n } else {\n env.set(str, \"\");\n }\n }\n __free(buf);\n return env;\n}\n\n@unmanaged\nabstract class Stream {\n close(): void {\n var err = fd_close(changetype(this));\n if (err) throw new Error(errnoToString(err));\n }\n}\n\n@unmanaged\nabstract class WritableStream extends Stream {\n write(data: T): void {\n if (isString()) {\n writeString(changetype(this), changetype(data));\n } else if (data instanceof ArrayBuffer) {\n writeBuffer(changetype(this), data);\n } else {\n ERROR(\"String or ArrayBuffer expected\");\n }\n }\n}\n\n@unmanaged\nabstract class ReadableStream extends Stream {\n read(buffer: ArrayBuffer, offset: isize = 0): i32 {\n var end = buffer.byteLength;\n if (offset < 0 || offset > end) {\n throw new Error(E_INDEXOUTOFRANGE);\n }\n store(tempbuf, changetype(buffer) + offset);\n store(tempbuf, end - offset, sizeof());\n var err = fd_read(changetype(this), tempbuf, 1, tempbuf + 2 * sizeof());\n if (err) throw new Error(errnoToString(err));\n return load(tempbuf, 2 * sizeof());\n }\n}\n\nfunction writeBuffer(fd: fd, data: ArrayBuffer): void {\n store(tempbuf, changetype(data));\n store(tempbuf, data.byteLength, sizeof());\n var err = fd_write(fd, tempbuf, 1, tempbuf + 2 * sizeof());\n if (err) throw new Error(errnoToString(err));\n}\n\nfunction writeString(fd: fd, data: string): void {\n var len = data.length;\n var\n char2: u32 = 0,\n char3: u32 = 0,\n char4: u32 = 0;\n switch (len) {\n case 4: { // \"null\"\n char4 = load(changetype(data), 6);\n if (char4 >= 0x80) break;\n }\n case 3: { // \"ms\\n\"\n char3 = load(changetype(data), 4);\n if (char3 >= 0x80) break;\n }\n case 2: { // \"\\r\\n\"\n char2 = load(changetype(data), 2);\n if (char2 >= 0x80) break;\n }\n case 1: { // \"\\n\"\n let char1 = load(changetype(data));\n if (char1 >= 0x80) break;\n store(tempbuf, tempbuf + 2 * sizeof());\n store(tempbuf, len, sizeof());\n store(tempbuf, char1 | char2 << 8 | char3 << 16 | char4 << 24, 2 * sizeof());\n let err = fd_write(fd, tempbuf, 1, tempbuf + 3 * sizeof());\n if (err) throw new Error(errnoToString(err));\n }\n case 0: return;\n }\n var utf8len = String.UTF8.byteLength(data);\n var utf8buf = __alloc(utf8len);\n assert(String.UTF8.encodeUnsafe(changetype(data), len, utf8buf) == utf8len);\n store(tempbuf, utf8buf);\n store(tempbuf, utf8len, sizeof());\n var err = fd_write(fd, tempbuf, 1, tempbuf + 2 * sizeof());\n __free(utf8buf);\n if (err) throw new Error(errnoToString(err));\n}\n", + "reference": "@unmanaged\nabstract class Ref {\n}\n\n@final @unmanaged\nexport abstract class Funcref extends Ref {\n}\n\n@final @unmanaged\nexport abstract class Externref extends Ref {\n}\n\n@final @unmanaged\nexport abstract class Anyref extends Ref {\n}\n\n@final @unmanaged\nexport abstract class Eqref extends Ref {\n}\n\n@final @unmanaged\nexport abstract class I31ref extends Ref {\n}\n\n@final @unmanaged\nexport abstract class Dataref extends Ref {\n}\n", + "regexp": "export class RegExp {\n\n // @binding(CALL_NEW, [ STRING, STRING], OBJECT_HANDLE)\n constructor(pattern: string, flags: string = \"\") { throw new Error(\"unreachable\"); }\n\n // @binding(CALL_THIS, [ STRING ], PASS_THRU)\n test(search: string): bool { throw new Error(\"unreachable\"); }\n\n // @binding(CALL_THIS, [], STRING)\n toString(): string { throw new Error(\"unreachable\"); }\n\n}\n", + "rt": "import { Typeinfo, TypeinfoFlags } from \"./shared/typeinfo\";\nimport { E_INDEXOUTOFRANGE } from \"./util/error\";\nimport { OBJECT, TOTAL_OVERHEAD } from \"./rt/common\";\nimport { ArrayBufferView } from \"./arraybuffer\";\n\n// @ts-ignore: decorator\n@builtin\nexport declare const __rtti_base: usize;\n\n// @ts-ignore: decorator\n@builtin @unsafe\nexport declare function __visit_globals(cookie: u32): void;\n\n// @ts-ignore: decorator\n@builtin @unsafe\nexport declare function __visit_members(ref: usize, cookie: u32): void;\n\n// @ts-ignore: decorator\n@unsafe\nexport function __typeinfo(id: u32): TypeinfoFlags {\n var ptr = __rtti_base;\n if (id > load(ptr)) throw new Error(E_INDEXOUTOFRANGE);\n return changetype(ptr + sizeof() + id * offsetof()).flags;\n}\n\n// @ts-ignore: decorator\n@unsafe\nexport function __instanceof(ptr: usize, classId: u32): bool { // keyword\n var id = changetype(ptr - TOTAL_OVERHEAD).rtId;\n var rttiBase = __rtti_base;\n if (id <= load(rttiBase)) {\n do if (id == classId) return true;\n while (id = changetype(rttiBase + sizeof() + id * offsetof()).base);\n }\n return false;\n}\n\n// @ts-ignore: decorator\n@unsafe\nexport function __newBuffer(size: usize, id: u32, data: usize = 0): usize {\n var buffer = __new(size, id);\n if (data) memory.copy(buffer, data, size);\n return buffer;\n}\n\n// @ts-ignore: decorator\n@unsafe\nexport function __newArray(length: i32, alignLog2: usize, id: u32, data: usize = 0): usize {\n var bufferSize = length << alignLog2;\n // make sure `buffer` is tracked by the shadow stack\n var buffer = changetype(__newBuffer(bufferSize, idof(), data));\n // ...since allocating the array may trigger GC steps\n var array = __new(offsetof(), id);\n store(array, changetype(buffer), offsetof(\"buffer\"));\n __link(array, changetype(buffer), false);\n store(array, changetype(buffer), offsetof(\"dataStart\"));\n store(array, bufferSize, offsetof(\"byteLength\"));\n store(array, length, offsetof(\"length_\"));\n return array;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nfunction __tostack(ptr: usize): usize { // eslint-disable-line\n return ptr;\n}\n\n// These are provided by the respective implementation, included as another entry file by asc:\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __alloc(size: usize): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __realloc(ptr: usize, size: usize): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __free(ptr: usize): void;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __new(size: usize, id: u32): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __renew(ptr: usize, size: usize): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __link(parentPtr: usize, childPtr: usize, expectMultiple: bool): void;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __collect(): void;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __visit(ptr: usize, cookie: u32): void;\n", + "rt/common": "// Alignment guarantees\n\n// @ts-ignore: decorator\n@inline export const AL_BITS: u32 = 4; // 16 bytes to fit up to v128\n// @ts-ignore: decorator\n@inline export const AL_SIZE: usize = 1 << AL_BITS;\n// @ts-ignore: decorator\n@inline export const AL_MASK: usize = AL_SIZE - 1;\n\n// Extra debugging\n\n// @ts-ignore: decorator\n@inline export const DEBUG = true;\n// @ts-ignore: decorator\n@inline export const TRACE = false;\n// @ts-ignore: decorator\n@inline export const RTRACE = isDefined(ASC_RTRACE);\n// @ts-ignore: decorator\n@inline export const PROFILE = isDefined(ASC_PROFILE);\n\n// Memory manager\n\n// ╒════════════ Memory manager block layout (32-bit) ═════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n// │ MM info │ -4\n// ╞>ptr═══════════════════════════════════════════════════════════╡\n// │ ... │\n@unmanaged export class BLOCK {\n /** Memory manager info. */\n mmInfo: usize;\n}\n\n/** Overhead of a memory manager block. */\n// @ts-ignore: decorator\n@inline export const BLOCK_OVERHEAD: usize = offsetof();\n\n/** Maximum size of a memory manager block's payload. */\n// @ts-ignore: decorator\n@inline export const BLOCK_MAXSIZE: usize = (1 << 30) - BLOCK_OVERHEAD;\n\n// Garbage collector\n\n// ╒══════════ Garbage collector object layout (32-bit) ═══════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n// │ Memory manager block │ -20\n// ╞═══════════════════════════════════════════════════════════════╡\n// │ GC info │ -16\n// ├───────────────────────────────────────────────────────────────┤\n// │ GC info │ -12\n// ├───────────────────────────────────────────────────────────────┤\n// │ RT id │ -8\n// ├───────────────────────────────────────────────────────────────┤\n// │ RT size │ -4\n// ╞>ptr═══════════════════════════════════════════════════════════╡\n// │ ... │\n@unmanaged export class OBJECT extends BLOCK {\n /** Garbage collector info. */\n gcInfo: u32;\n /** Garbage collector info. */\n gcInfo2: u32;\n /** Runtime class id. */\n rtId: u32;\n /** Runtime object size. */\n rtSize: u32;\n}\n\n/** Overhead of a garbage collector object. Excludes memory manager block overhead. */\n// @ts-ignore: decorator\n@inline export const OBJECT_OVERHEAD: usize = (offsetof() - BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK;\n\n/** Maximum size of a garbage collector object's payload. */\n// @ts-ignore: decorator\n@inline export const OBJECT_MAXSIZE: usize = BLOCK_MAXSIZE - OBJECT_OVERHEAD;\n\n/** Total of memory manager and garbage collector overhead. */\n// @ts-ignore: decorator\n@inline export const TOTAL_OVERHEAD: usize = BLOCK_OVERHEAD + OBJECT_OVERHEAD;\n", + "rt/index-incremental": "import \"rt/tlsf\";\nimport \"rt/itcms\";\n", + "rt/index-minimal": "import \"rt/tlsf\";\nimport \"rt/tcms\";\n", + "rt/index-stub": "import \"rt/stub\";\n", + "rt/itcms": "import { BLOCK, BLOCK_OVERHEAD, OBJECT_OVERHEAD, OBJECT_MAXSIZE, TOTAL_OVERHEAD, DEBUG, TRACE, RTRACE, PROFILE } from \"./common\";\nimport { onvisit, oncollect, oninterrupt, onyield } from \"./rtrace\";\nimport { TypeinfoFlags } from \"../shared/typeinfo\";\nimport { E_ALLOCATION_TOO_LARGE, E_ALREADY_PINNED, E_NOT_PINNED } from \"../util/error\";\n\n// === ITCMS: An incremental Tri-Color Mark & Sweep garbage collector ===\n// Adapted from Bach Le's μgc, see: https://github.com/bullno1/ugc\n\n// ╒═════════════╤══════════════ Colors ═══════════════════════════╕\n// │ Color │ Meaning │\n// ├─────────────┼─────────────────────────────────────────────────┤\n// │ WHITE* │ Unprocessed │\n// │ BLACK* │ Processed │\n// │ GRAY │ Processed with unprocessed children │\n// │ TRANSPARENT │ Manually pinned (always reachable) │\n// └─────────────┴─────────────────────────────────────────────────┘\n// * flipped between cycles\n\n// @ts-ignore: decorator\n@lazy var white = 0;\n// @ts-ignore: decorator\n@inline const gray = 2;\n// @ts-ignore: decorator\n@inline const transparent = 3;\n// @ts-ignore: decorator\n@inline const COLOR_MASK = 3;\n\n/** Size in memory of all objects currently managed by the GC. */\n// @ts-ignore: decorator\n@lazy var total: usize = 0;\n\n/** Currently transitioning from SWEEP to MARK state. */\n// @ts-ignore: decorator\n@inline const STATE_IDLE = 0;\n/** Currently marking reachable objects. */\n// @ts-ignore: decorator\n@inline const STATE_MARK = 1;\n/** Currently sweeping unreachable objects. */\n// @ts-ignore: decorator\n@inline const STATE_SWEEP = 2;\n/** Current collector state. */\n// @ts-ignore: decorator\n@lazy var state = STATE_IDLE;\n\n// @ts-ignore: decorator\n@lazy var fromSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy var toSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy var pinSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy var iter: Object; // null\n\nfunction initLazy(space: Object): Object {\n space.nextWithColor = changetype(space);\n space.prev = space;\n return space;\n}\n\n/** Visit cookie indicating scanning of an object. */\n// @ts-ignore: decorator\n@inline const VISIT_SCAN = 0;\n\n// ╒═══════════════ Managed object layout (32-bit) ════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n// │ Memory manager block │\n// ╞═══════════════════════════════════════════════════════════╤═══╡\n// │ next │ C │ = nextWithColor\n// ├───────────────────────────────────────────────────────────┴───┤\n// │ prev │\n// ├───────────────────────────────────────────────────────────────┤\n// │ rtId │\n// ├───────────────────────────────────────────────────────────────┤\n// │ rtSize │\n// ╞>ptr═══════════════════════════════════════════════════════════╡\n// │ ... │\n// C: color\n\n/** Represents a managed object in memory, consisting of a header followed by the object's data. */\n@unmanaged class Object extends BLOCK {\n /** Pointer to the next object with color flags stored in the alignment bits. */\n nextWithColor: usize; // *u32\n /** Pointer to the previous object. */\n prev: Object; // *u32\n /** Runtime id. */\n rtId: u32;\n /** Runtime size. */\n rtSize: u32;\n\n /** Gets the pointer to the next object. */\n get next(): Object {\n return changetype(this.nextWithColor & ~COLOR_MASK);\n }\n\n /** Sets the pointer to the next object. */\n set next(obj: Object) {\n this.nextWithColor = changetype(obj) | (this.nextWithColor & COLOR_MASK);\n }\n\n /** Gets this object's color. */\n get color(): i32 {\n return i32(this.nextWithColor & COLOR_MASK);\n }\n\n /** Sets this object's color. */\n set color(color: i32) {\n this.nextWithColor = (this.nextWithColor & ~COLOR_MASK) | color;\n }\n\n /** Gets the size of this object in memory. */\n get size(): usize {\n return BLOCK_OVERHEAD + (this.mmInfo & ~3);\n }\n\n /** Tests if this object is pointerfree. */\n get isPointerfree(): bool {\n var rtId = this.rtId;\n return rtId <= idof() || (__typeinfo(rtId) & TypeinfoFlags.POINTERFREE) != 0;\n }\n\n /** Unlinks this object from its list. */\n unlink(): void {\n var next = this.next;\n if (next == null) {\n if (DEBUG) assert(this.prev == null && changetype(this) < __heap_base);\n return; // static data not yet linked\n }\n var prev = this.prev;\n if (DEBUG) assert(prev);\n next.prev = prev;\n prev.next = next;\n }\n\n /** Links this object to the specified list, with the given color. */\n linkTo(list: Object, withColor: i32): void {\n let prev = list.prev;\n this.nextWithColor = changetype(list) | withColor;\n this.prev = prev;\n prev.next = this;\n list.prev = this;\n }\n\n /** Marks this object as gray, that is reachable with unscanned children. */\n makeGray(): void {\n if (this == iter) iter = assert(this.prev);\n this.unlink();\n this.linkTo(toSpace, this.isPointerfree ? i32(!white) : gray);\n }\n}\n\n/** Visits all objects considered to be program roots. */\nfunction visitRoots(cookie: u32): void {\n __visit_globals(cookie);\n var pn = pinSpace;\n var iter = pn.next;\n while (iter != pn) {\n if (DEBUG) assert(iter.color == transparent);\n __visit_members(changetype(iter) + TOTAL_OVERHEAD, cookie);\n iter = iter.next;\n }\n}\n\n/** Visits all objects on the stack. */\nfunction visitStack(cookie: u32): void {\n var ptr = __stack_pointer;\n while (ptr < __heap_base) {\n __visit(load(ptr), cookie);\n ptr += sizeof();\n }\n}\n\n/** Performs a single step according to the current state. */\nfunction step(): usize {\n // Magic constants responsible for pause times. Obtained experimentally\n // using the compiler compiling itself. 2048 budget pro run by default.\n const MARKCOST = isDefined(ASC_GC_MARKCOST) ? ASC_GC_MARKCOST : 1;\n const SWEEPCOST = isDefined(ASC_GC_SWEEPCOST) ? ASC_GC_SWEEPCOST : 10;\n var obj: Object;\n switch (state) {\n case STATE_IDLE: {\n state = STATE_MARK;\n visitCount = 0;\n visitRoots(VISIT_SCAN);\n iter = toSpace;\n return visitCount * MARKCOST;\n }\n case STATE_MARK: {\n let black = i32(!white);\n obj = iter.next;\n while (obj != toSpace) {\n iter = obj;\n if (obj.color != black) { // skip already-blacks (pointerfree)\n obj.color = black;\n visitCount = 0;\n __visit_members(changetype(obj) + TOTAL_OVERHEAD, VISIT_SCAN);\n return visitCount * MARKCOST;\n }\n obj = obj.next;\n }\n visitCount = 0;\n visitRoots(VISIT_SCAN);\n obj = iter.next;\n if (obj == toSpace) {\n visitStack(VISIT_SCAN);\n obj = iter.next;\n while (obj != toSpace) {\n if (obj.color != black) {\n obj.color = black;\n __visit_members(changetype(obj) + TOTAL_OVERHEAD, VISIT_SCAN);\n }\n obj = obj.next;\n }\n let from = fromSpace;\n fromSpace = toSpace;\n toSpace = from;\n white = black;\n iter = from.next;\n state = STATE_SWEEP;\n }\n return visitCount * MARKCOST;\n }\n case STATE_SWEEP: {\n obj = iter;\n if (obj != toSpace) {\n iter = obj.next;\n if (DEBUG) assert(obj.color == i32(!white)); // old white\n free(obj);\n return SWEEPCOST;\n }\n toSpace.nextWithColor = changetype(toSpace);\n toSpace.prev = toSpace;\n state = STATE_IDLE;\n break;\n }\n }\n return 0;\n}\n\n/** Frees an object. */\nfunction free(obj: Object): void {\n if (changetype(obj) < __heap_base) {\n obj.nextWithColor = 0; // may become linked again\n obj.prev = changetype(0);\n } else {\n total -= obj.size;\n if (isDefined(__finalize)) {\n __finalize(changetype(obj) + TOTAL_OVERHEAD);\n }\n __free(changetype(obj) + BLOCK_OVERHEAD);\n }\n}\n\n// Garbage collector interface\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __new(size: usize, id: i32): usize {\n if (size >= OBJECT_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n if (total >= threshold) interrupt();\n var obj = changetype(__alloc(OBJECT_OVERHEAD + size) - BLOCK_OVERHEAD);\n obj.rtId = id;\n obj.rtSize = size;\n obj.linkTo(fromSpace, white); // inits next/prev\n total += obj.size;\n var ptr = changetype(obj) + TOTAL_OVERHEAD;\n // may be visited before being fully initialized, so must fill\n memory.fill(ptr, 0, size);\n return ptr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __renew(oldPtr: usize, size: usize): usize {\n var oldObj = changetype(oldPtr - TOTAL_OVERHEAD);\n // Update object size if its block is large enough\n if (size <= (oldObj.mmInfo & ~3) - OBJECT_OVERHEAD) {\n oldObj.rtSize = size;\n return oldPtr;\n }\n // If not the same object anymore, we have to move it move it due to the\n // shadow stack potentially still referencing the old object\n var newPtr = __new(size, oldObj.rtId);\n memory.copy(newPtr, oldPtr, min(size, oldObj.rtSize));\n return newPtr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __link(parentPtr: usize, childPtr: usize, expectMultiple: bool): void {\n // Write barrier is unnecessary if non-incremental\n if (!childPtr) return;\n if (DEBUG) assert(parentPtr);\n var child = changetype(childPtr - TOTAL_OVERHEAD);\n if (child.color == white) {\n let parent = changetype(parentPtr - TOTAL_OVERHEAD);\n let parentColor = parent.color;\n if (parentColor == i32(!white)) {\n // Maintain the invariant that no black object may point to a white object.\n if (expectMultiple) {\n // Move the barrier \"backward\". Suitable for containers receiving multiple stores.\n // Avoids a barrier for subsequent objects stored into the same container.\n parent.makeGray();\n } else {\n // Move the barrier \"forward\". Suitable for objects receiving isolated stores.\n child.makeGray();\n }\n } else if (parentColor == transparent && state == STATE_MARK) {\n // Pinned objects are considered 'black' during the mark phase.\n child.makeGray();\n }\n }\n}\n\n// @ts-ignore: decorator\n@lazy var visitCount = 0;\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __visit(ptr: usize, cookie: i32): void {\n if (!ptr) return;\n let obj = changetype(ptr - TOTAL_OVERHEAD);\n if (RTRACE) if (!onvisit(obj)) return;\n if (obj.color == white) {\n obj.makeGray();\n ++visitCount;\n }\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __pin(ptr: usize): usize {\n if (ptr) {\n let obj = changetype(ptr - TOTAL_OVERHEAD);\n if (obj.color == transparent) {\n throw new Error(E_ALREADY_PINNED);\n }\n obj.unlink(); // from fromSpace\n obj.linkTo(pinSpace, transparent);\n }\n return ptr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __unpin(ptr: usize): void {\n if (!ptr) return;\n var obj = changetype(ptr - TOTAL_OVERHEAD);\n if (obj.color != transparent) {\n throw new Error(E_NOT_PINNED);\n }\n if (state == STATE_MARK) {\n // We may be right at the point after marking roots for the second time and\n // entering the sweep phase, in which case the object would be missed if it\n // is not only pinned but also a root. Make sure it isn't missed.\n obj.makeGray();\n } else {\n obj.unlink();\n obj.linkTo(fromSpace, white);\n }\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __collect(): void {\n if (TRACE) trace(\"GC (full) at\", 1, total);\n if (state > STATE_IDLE) {\n // finish current cycle\n while (state != STATE_IDLE) step();\n }\n // perform a full cycle\n step();\n while (state != STATE_IDLE) step();\n threshold = (total * IDLEFACTOR / 100) + GRANULARITY;\n if (TRACE) trace(\"GC (full) done at cur/max\", 2, total, memory.size() << 16);\n if (RTRACE || PROFILE) oncollect(total);\n}\n\n// Garbage collector automation\n\n/** How often to interrupt. The default of 1024 means \"interrupt each 1024 bytes allocated\". */\n// @ts-ignore: decorator\n@inline const GRANULARITY: usize = isDefined(ASC_GC_GRANULARITY) ? ASC_GC_GRANULARITY : 1024;\n/** How long to interrupt. The default of 200% means \"run at double the speed of allocations\". */\n// @ts-ignore: decorator\n@inline const STEPFACTOR: usize = isDefined(ASC_GC_SWEEPFACTOR) ? ASC_GC_SWEEPFACTOR : 200;\n/** How long to idle. The default of 200% means \"wait for memory to double before kicking in again\". */\n// @ts-ignore: decorator\n@inline const IDLEFACTOR: usize = isDefined(ASC_GC_IDLEFACTOR) ? ASC_GC_IDLEFACTOR : 200;\n\n/** Threshold of memory used by objects to exceed before interrupting again. */\n// @ts-ignore: decorator\n@lazy var threshold: usize = ((memory.size() << 16) - __heap_base) >> 1;\n\n/** Performs a reasonable amount of incremental GC steps. */\nfunction interrupt(): void {\n if (PROFILE) oninterrupt(total);\n if (TRACE) trace(\"GC (auto) at\", 1, total);\n var budget: isize = GRANULARITY * STEPFACTOR / 100;\n do {\n budget -= step();\n if (state == STATE_IDLE) {\n if (TRACE) trace(\"└ GC (auto) done at cur/max\", 2, total, memory.size() << 16);\n threshold = (total * IDLEFACTOR / 100) + GRANULARITY;\n if (PROFILE) onyield(total);\n return;\n }\n } while (budget > 0);\n if (TRACE) trace(\"└ GC (auto) ongoing at\", 1, total);\n threshold = total + GRANULARITY * usize(total - threshold < GRANULARITY);\n if (PROFILE) onyield(total);\n}\n", + "rt/rtrace": "import { BLOCK } from \"./common\";\n\nexport declare function oninit(heapBase: usize): void;\n\n// Memory Allocator\nexport declare function onalloc(block: BLOCK): void;\nexport declare function onresize(block: BLOCK, oldSizeInclOverhead: usize): void;\nexport declare function onmove(oldBlock: BLOCK, newBlock: BLOCK): void;\nexport declare function onfree(block: BLOCK): void;\n\n// Garbage collector\nexport declare function onvisit(block: BLOCK): bool;\nexport declare function oncollect(total: usize): void;\nexport declare function oninterrupt(total: usize): void;\nexport declare function onyield(total: usize): void;\n", + "rt/stub": "import { AL_MASK, OBJECT, OBJECT_OVERHEAD, BLOCK_MAXSIZE, BLOCK_OVERHEAD, BLOCK, OBJECT_MAXSIZE } from \"./common\";\nimport { E_ALLOCATION_TOO_LARGE } from \"../util/error\";\n\n// === A minimal runtime stub ===\n\n// @ts-ignore: decorator\n@lazy var startOffset: usize = ((__heap_base + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD;\n// @ts-ignore: decorator\n@lazy var offset: usize = startOffset;\n\nfunction maybeGrowMemory(newOffset: usize): void {\n // assumes newOffset is aligned\n var pagesBefore = memory.size();\n var maxOffset = ((pagesBefore << 16) + AL_MASK) & ~AL_MASK;\n if (newOffset > maxOffset) {\n let pagesNeeded = (((newOffset - maxOffset + 0xffff) & ~0xffff) >>> 16);\n let pagesWanted = max(pagesBefore, pagesNeeded); // double memory\n if (memory.grow(pagesWanted) < 0) {\n if (memory.grow(pagesNeeded) < 0) unreachable(); // out of memory\n }\n }\n offset = newOffset;\n}\n\n// @ts-ignore: decorator\n@inline function computeSize(size: usize): usize {\n return ((size + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@unsafe @global\nexport function __alloc(size: usize): usize {\n if (size > BLOCK_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n var block = changetype(offset);\n var ptr = offset + BLOCK_OVERHEAD;\n var payloadSize = computeSize(size);\n maybeGrowMemory(ptr + payloadSize);\n block.mmInfo = payloadSize;\n return ptr;\n}\n\n// @ts-ignore: decorator\n@unsafe @global\nexport function __realloc(ptr: usize, size: usize): usize {\n assert(ptr != 0 && !(ptr & AL_MASK)); // must exist and be aligned\n var block = changetype(ptr - BLOCK_OVERHEAD);\n var actualSize = block.mmInfo;\n var isLast = ptr + actualSize == offset;\n var payloadSize = computeSize(size);\n if (size > actualSize) {\n if (isLast) { // last block: grow\n if (size > BLOCK_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n maybeGrowMemory(ptr + payloadSize);\n block.mmInfo = payloadSize;\n } else { // copy to new block at least double the size\n let newPtr = __alloc(max(payloadSize, actualSize << 1));\n memory.copy(newPtr, ptr, actualSize);\n block = changetype((ptr = newPtr) - BLOCK_OVERHEAD);\n }\n } else if (isLast) { // last block: shrink\n offset = ptr + payloadSize;\n block.mmInfo = payloadSize;\n }\n return ptr;\n}\n\n// @ts-ignore: decorator\n@unsafe @global\nexport function __free(ptr: usize): void {\n assert(ptr != 0 && !(ptr & AL_MASK)); // must exist and be aligned\n var block = changetype(ptr - BLOCK_OVERHEAD);\n if (ptr + block.mmInfo == offset) { // last block: discard\n offset = changetype(block);\n }\n}\n\n// @ts-ignore: decorator\n@unsafe @global\nexport function __reset(): void { // special\n offset = startOffset;\n}\n\n// @ts-ignore: decorator\n@unsafe @global\nexport function __new(size: usize, id: u32): usize {\n if (size > OBJECT_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n var ptr = __alloc(OBJECT_OVERHEAD + size);\n var object = changetype(ptr - BLOCK_OVERHEAD);\n object.gcInfo = 0;\n object.gcInfo2 = 0;\n object.rtId = id;\n object.rtSize = size;\n return ptr + OBJECT_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@unsafe @global\nexport function __renew(oldPtr: usize, size: usize): usize {\n if (size > OBJECT_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n var newPtr = __realloc(oldPtr - OBJECT_OVERHEAD, OBJECT_OVERHEAD + size);\n changetype(newPtr - BLOCK_OVERHEAD).rtSize = size;\n return newPtr + OBJECT_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __link(parentPtr: usize, childPtr: usize, expectMultiple: bool): void {\n // nop\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __pin(ptr: usize): usize {\n return ptr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __unpin(ptr: usize): void {\n // nop\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nfunction __visit(ptr: usize, cookie: u32): void { // eslint-disable-line @typescript-eslint/no-unused-vars\n // nop\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __collect(): void {\n // nop\n}\n", + "rt/tcms": "import { BLOCK, BLOCK_OVERHEAD, OBJECT_OVERHEAD, OBJECT_MAXSIZE, TOTAL_OVERHEAD, DEBUG, TRACE, RTRACE } from \"./common\";\nimport { onvisit, oncollect } from \"./rtrace\";\nimport { E_ALLOCATION_TOO_LARGE, E_ALREADY_PINNED, E_NOT_PINNED } from \"../util/error\";\n\n// === TCMS: A Two-Color Mark & Sweep garbage collector ===\n\n// ╒═════════════╤══════════════ Colors ═══════════════════════════╕\n// │ Color │ Meaning │\n// ├─────────────┼─────────────────────────────────────────────────┤\n// │ WHITE* │ Unreachable │\n// │ BLACK* │ Reachable │\n// │ TRANSPARENT │ Manually pinned (always reachable) │\n// └─────────────┴─────────────────────────────────────────────────┘\n// * flipped between cycles\n\n// @ts-ignore: decorator\n@lazy var white = 0;\n// @ts-ignore: decorator\n@inline const transparent = 3;\n// @ts-ignore: decorator\n@inline const COLOR_MASK = 3;\n\n/** Size in memory of all objects currently managed by the GC. */\n// @ts-ignore: decorator\n@lazy var total: usize = 0;\n\n// @ts-ignore: decorator\n@lazy var fromSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy var toSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy var pinSpace = initLazy(changetype(memory.data(offsetof())));\n\nfunction initLazy(space: Object): Object {\n space.nextWithColor = changetype(space);\n space.prev = space;\n return space;\n}\n\n/** Visit cookie indicating scanning of an object. */\n// @ts-ignore: decorator\n@inline const VISIT_SCAN = 0;\n\n// ╒═══════════════ Managed object layout (32-bit) ════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n// │ Memory manager block │\n// ╞═══════════════════════════════════════════════════════════╤═══╡\n// │ next │ C │ = nextWithColor\n// ├───────────────────────────────────────────────────────────┴───┤\n// │ prev │\n// ├───────────────────────────────────────────────────────────────┤\n// │ rtId │\n// ├───────────────────────────────────────────────────────────────┤\n// │ rtSize │\n// ╞>ptr═══════════════════════════════════════════════════════════╡\n// │ ... │\n// C: color\n\n/** Represents a managed object in memory, consisting of a header followed by the object's data. */\n@unmanaged class Object extends BLOCK {\n /** Pointer to the next object with color flags stored in the alignment bits. */\n nextWithColor: usize; // *u32\n /** Pointer to the previous object. */\n prev: Object; // *u32\n /** Runtime id. */\n rtId: u32;\n /** Runtime size. */\n rtSize: u32;\n\n /** Gets the pointer to the next object. */\n get next(): Object {\n return changetype(this.nextWithColor & ~COLOR_MASK);\n }\n\n /** Sets the pointer to the next object. */\n set next(obj: Object) {\n this.nextWithColor = changetype(obj) | (this.nextWithColor & COLOR_MASK);\n }\n\n /** Gets this object's color. */\n get color(): i32 {\n return i32(this.nextWithColor & COLOR_MASK);\n }\n\n /** Sets this object's color. */\n set color(color: i32) {\n this.nextWithColor = (this.nextWithColor & ~COLOR_MASK) | color;\n }\n\n /** Gets the size of this object in memory. */\n get size(): usize {\n return BLOCK_OVERHEAD + (this.mmInfo & ~3);\n }\n\n /** Unlinks this object from its list. */\n unlink(): void {\n let next = this.next;\n if (next == null) {\n if (DEBUG) assert(this.prev == null && changetype(this) < __heap_base);\n return; // static data not yet linked\n }\n let prev = this.prev;\n if (DEBUG) assert(prev);\n next.prev = prev;\n prev.next = next;\n }\n\n /** Links this object to the specified list, with the given color. */\n linkTo(list: Object, withColor: i32): void {\n let prev = list.prev;\n this.nextWithColor = changetype(list) | withColor;\n this.prev = prev;\n prev.next = this;\n list.prev = this;\n }\n}\n\n// Garbage collector interface\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __new(size: usize, id: i32): usize {\n if (size > OBJECT_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n var obj = changetype(__alloc(OBJECT_OVERHEAD + size) - BLOCK_OVERHEAD);\n obj.rtId = id;\n obj.rtSize = size;\n obj.linkTo(fromSpace, white);\n total += obj.size;\n return changetype(obj) + TOTAL_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __renew(oldPtr: usize, size: usize): usize {\n var oldObj = changetype(oldPtr - TOTAL_OVERHEAD);\n if (oldPtr < __heap_base) { // move to heap for simplicity\n let newPtr = __new(size, oldObj.rtId);\n memory.copy(newPtr, oldPtr, min(size, oldObj.rtSize));\n return newPtr;\n }\n if (size > OBJECT_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n total -= oldObj.size;\n var newPtr = __realloc(oldPtr - OBJECT_OVERHEAD, OBJECT_OVERHEAD + size) + OBJECT_OVERHEAD;\n var newObj = changetype(newPtr - TOTAL_OVERHEAD);\n newObj.rtSize = size;\n\n // Replace with new object\n newObj.next.prev = newObj;\n newObj.prev.next = newObj;\n\n total += newObj.size;\n return newPtr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __link(parentPtr: usize, childPtr: usize, expectMultiple: bool): void {\n // nop\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __visit(ptr: usize, cookie: i32): void {\n if (!ptr) return;\n let obj = changetype(ptr - TOTAL_OVERHEAD);\n if (RTRACE) if (!onvisit(obj)) return;\n if (obj.color == white) {\n obj.unlink(); // from fromSpace\n obj.linkTo(toSpace, i32(!white));\n }\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __pin(ptr: usize): usize {\n if (ptr) {\n let obj = changetype(ptr - TOTAL_OVERHEAD);\n if (obj.color == transparent) {\n throw new Error(E_ALREADY_PINNED);\n }\n obj.unlink(); // from fromSpace\n obj.linkTo(pinSpace, transparent);\n }\n return ptr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __unpin(ptr: usize): void {\n if (!ptr) return;\n var obj = changetype(ptr - TOTAL_OVERHEAD);\n if (obj.color != transparent) {\n throw new Error(E_NOT_PINNED);\n }\n obj.unlink(); // from pinSpace\n obj.linkTo(fromSpace, white);\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __collect(): void {\n if (TRACE) trace(\"GC at\", 1, total);\n\n // Mark roots (add to toSpace)\n __visit_globals(VISIT_SCAN);\n\n // Mark direct members of pinned objects (add to toSpace)\n var pn = pinSpace;\n var iter = pn.next;\n while (iter != pn) {\n if (DEBUG) assert(iter.color == transparent);\n __visit_members(changetype(iter) + TOTAL_OVERHEAD, VISIT_SCAN);\n iter = iter.next;\n }\n\n // Mark what's reachable from toSpace\n var black = i32(!white);\n var to = toSpace;\n iter = to.next;\n while (iter != to) {\n if (DEBUG) assert(iter.color == black);\n __visit_members(changetype(iter) + TOTAL_OVERHEAD, VISIT_SCAN);\n iter = iter.next;\n }\n\n // Sweep what's left in fromSpace\n var from = fromSpace;\n iter = from.next;\n while (iter != from) {\n if (DEBUG) assert(iter.color == white);\n let newNext = iter.next;\n if (changetype(iter) < __heap_base) {\n iter.nextWithColor = 0; // may become linked again\n iter.prev = changetype(0);\n } else {\n total -= iter.size;\n if (isDefined(__finalize)) __finalize(changetype(iter) + TOTAL_OVERHEAD);\n __free(changetype(iter) + BLOCK_OVERHEAD);\n }\n iter = newNext;\n }\n from.nextWithColor = changetype(from);\n from.prev = from;\n\n // Flip spaces and colors\n fromSpace = to;\n toSpace = from;\n white = black;\n\n if (TRACE) trace(\"GC done at\", 1, total);\n if (RTRACE) oncollect(total);\n}\n", + "rt/tlsf": "import { AL_BITS, AL_SIZE, AL_MASK, DEBUG, BLOCK, BLOCK_OVERHEAD, BLOCK_MAXSIZE } from \"./common\";\nimport { oninit, onalloc, onresize, onmove, onfree } from \"./rtrace\";\nimport { E_ALLOCATION_TOO_LARGE } from \"../util/error\";\n\n// === The TLSF (Two-Level Segregate Fit) memory allocator ===\n// see: http://www.gii.upv.es/tlsf/\n\n// - `ffs(x)` is equivalent to `ctz(x)` with x != 0\n// - `fls(x)` is equivalent to `sizeof(x) * 8 - clz(x) - 1`\n\n// ╒══════════════ Block size interpretation (32-bit) ═════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┴─┴─┴─╫─┴─┴─┴─┤\n// │ | FL │ SB = SL + AL │ ◄─ usize\n// └───────────────────────────────────────────────┴───────╨───────┘\n// FL: first level, SL: second level, AL: alignment, SB: small block\n\n// @ts-ignore: decorator\n@inline const SL_BITS: u32 = 4;\n// @ts-ignore: decorator\n@inline const SL_SIZE: u32 = 1 << SL_BITS;\n\n// @ts-ignore: decorator\n@inline const SB_BITS: u32 = SL_BITS + AL_BITS;\n// @ts-ignore: decorator\n@inline const SB_SIZE: u32 = 1 << SB_BITS;\n\n// @ts-ignore: decorator\n@inline const FL_BITS: u32 = 31 - SB_BITS;\n\n// [00]: < 256B (SB) [12]: < 1M\n// [01]: < 512B [13]: < 2M\n// [02]: < 1K [14]: < 4M\n// [03]: < 2K [15]: < 8M\n// [04]: < 4K [16]: < 16M\n// [05]: < 8K [17]: < 32M\n// [06]: < 16K [18]: < 64M\n// [07]: < 32K [19]: < 128M\n// [08]: < 64K [20]: < 256M\n// [09]: < 128K [21]: < 512M\n// [10]: < 256K [22]: <= 1G - OVERHEAD\n// [11]: < 512K\n// VMs limit to 2GB total (currently), making one 1G block max (or three 512M etc.) due to block overhead\n\n// Tags stored in otherwise unused alignment bits\n\n// @ts-ignore: decorator\n@inline const FREE: usize = 1 << 0;\n// @ts-ignore: decorator\n@inline const LEFTFREE: usize = 1 << 1;\n// @ts-ignore: decorator\n@inline const TAGS_MASK: usize = FREE | LEFTFREE; // <= AL_MASK\n\n// ╒════════════════════ Block layout (32-bit) ════════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┼─┤ ┐\n// │ size │L│F│ ◄─┐ info overhead\n// ╞>ptr═══════════════════════════════════════════════════════╧═╧═╡ │ ┘\n// │ if free: ◄ prev │ ◄─┤ usize\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ if free: next ► │ ◄─┤\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ ... │ │ >= 0\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ if free: back ▲ │ ◄─┘\n// └───────────────────────────────────────────────────────────────┘ >= MIN SIZE\n// F: FREE, L: LEFTFREE\n@unmanaged export class Block extends BLOCK {\n\n /** Previous free block, if any. Only valid if free, otherwise part of payload. */\n prev: Block | null;\n /** Next free block, if any. Only valid if free, otherwise part of payload. */\n next: Block | null;\n\n // If the block is free, there is a 'back'reference at its end pointing at its start.\n}\n\n// Block constants. A block must have a minimum size of three pointers so it can hold `prev`,\n// `next` and `back` if free.\n\n// @ts-ignore: decorator\n@inline const BLOCK_MINSIZE: usize = ((3 * sizeof() + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD; // prev + next + back\n// @ts-ignore: decorator\n// @inline const BLOCK_MAXSIZE: usize = 1 << (FL_BITS + SB_BITS - 1); // exclusive, lives in common.ts\n\n/** Gets the left block of a block. Only valid if the left block is free. */\n// @ts-ignore: decorator\n@inline function GETFREELEFT(block: Block): Block {\n return load(changetype(block) - sizeof());\n}\n\n/** Gets the right block of a block by advancing to the right by its size. */\n// @ts-ignore: decorator\n@inline function GETRIGHT(block: Block): Block {\n return changetype(changetype(block) + BLOCK_OVERHEAD + (block.mmInfo & ~TAGS_MASK));\n}\n\n// ╒═════════════════════ Root layout (32-bit) ════════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ┐\n// │ 0 | flMap S│ ◄────┐\n// ╞═══════════════════════════════════════════════════════════════╡ │\n// │ slMap[0] S │ ◄─┐ │\n// ├───────────────────────────────────────────────────────────────┤ │ │\n// │ slMap[1] │ ◄─┤ │\n// ├───────────────────────────────────────────────────────────────┤ u32 │\n// │ slMap[22] │ ◄─┘ │\n// ╞═══════════════════════════════════════════════════════════════╡ usize\n// │ head[0] │ ◄────┤\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ ... │ ◄────┤\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ head[367] │ ◄────┤\n// ╞═══════════════════════════════════════════════════════════════╡ │\n// │ tail │ ◄────┘\n// └───────────────────────────────────────────────────────────────┘ SIZE ┘\n// S: Small blocks map\n@unmanaged class Root {\n /** First level bitmap. */\n flMap: usize;\n}\n\n// Root constants. Where stuff is stored inside of the root structure.\n\n// @ts-ignore: decorator\n@inline const SL_START: usize = sizeof();\n// @ts-ignore: decorator\n@inline const SL_END: usize = SL_START + (FL_BITS << alignof());\n// @ts-ignore: decorator\n@inline const HL_START: usize = (SL_END + AL_MASK) & ~AL_MASK;\n// @ts-ignore: decorator\n@inline const HL_END: usize = HL_START + FL_BITS * SL_SIZE * sizeof();\n// @ts-ignore: decorator\n@inline const ROOT_SIZE: usize = HL_END + sizeof();\n\n// @ts-ignore: decorator\n@lazy export var ROOT: Root;\n\n/** Gets the second level map of the specified first level. */\n// @ts-ignore: decorator\n@inline function GETSL(root: Root, fl: usize): u32 {\n return load(\n changetype(root) + (fl << alignof()),\n SL_START\n );\n}\n\n/** Sets the second level map of the specified first level. */\n// @ts-ignore: decorator\n@inline function SETSL(root: Root, fl: usize, slMap: u32): void {\n store(\n changetype(root) + (fl << alignof()),\n slMap,\n SL_START\n );\n}\n\n/** Gets the head of the free list for the specified combination of first and second level. */\n// @ts-ignore: decorator\n@inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null {\n return load(\n changetype(root) + (((fl << SL_BITS) + sl) << alignof()),\n HL_START\n );\n}\n\n/** Sets the head of the free list for the specified combination of first and second level. */\n// @ts-ignore: decorator\n@inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void {\n store(\n changetype(root) + (((fl << SL_BITS) + sl) << alignof()),\n head,\n HL_START\n );\n}\n\n/** Gets the tail block.. */\n// @ts-ignore: decorator\n@inline function GETTAIL(root: Root): Block {\n return load(\n changetype(root),\n HL_END\n );\n}\n\n/** Sets the tail block. */\n// @ts-ignore: decorator\n@inline function SETTAIL(root: Root, tail: Block): void {\n store(\n changetype(root),\n tail,\n HL_END\n );\n}\n\n/** Inserts a previously used block back into the free list. */\nfunction insertBlock(root: Root, block: Block): void {\n if (DEBUG) assert(block); // cannot be null\n var blockInfo = block.mmInfo;\n if (DEBUG) assert(blockInfo & FREE); // must be free\n\n var right = GETRIGHT(block);\n var rightInfo = right.mmInfo;\n\n // merge with right block if also free\n if (rightInfo & FREE) {\n removeBlock(root, right);\n block.mmInfo = blockInfo = blockInfo + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK); // keep block tags\n right = GETRIGHT(block);\n rightInfo = right.mmInfo;\n // 'back' is set below\n }\n\n // merge with left block if also free\n if (blockInfo & LEFTFREE) {\n let left = GETFREELEFT(block);\n let leftInfo = left.mmInfo;\n if (DEBUG) assert(leftInfo & FREE); // must be free according to right tags\n removeBlock(root, left);\n block = left;\n block.mmInfo = blockInfo = leftInfo + BLOCK_OVERHEAD + (blockInfo & ~TAGS_MASK); // keep left tags\n // 'back' is set below\n }\n\n right.mmInfo = rightInfo | LEFTFREE;\n // reference to right is no longer used now, hence rightInfo is not synced\n\n // we now know the size of the block\n var size = blockInfo & ~TAGS_MASK;\n if (DEBUG) assert(size >= BLOCK_MINSIZE); // must be a valid size\n if (DEBUG) assert(changetype(block) + BLOCK_OVERHEAD + size == changetype(right)); // must match\n\n // set 'back' to itself at the end of block\n store(changetype(right) - sizeof(), block);\n\n // mapping_insert\n var fl: usize, sl: u32;\n if (size < SB_SIZE) {\n fl = 0;\n sl = (size >> AL_BITS);\n } else {\n const inv: usize = sizeof() * 8 - 1;\n let boundedSize = min(size, BLOCK_MAXSIZE);\n fl = inv - clz(boundedSize);\n sl = ((boundedSize >> (fl - SL_BITS)) ^ (1 << SL_BITS));\n fl -= SB_BITS - 1;\n }\n if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range\n\n // perform insertion\n var head = GETHEAD(root, fl, sl);\n block.prev = null;\n block.next = head;\n if (head) head.prev = block;\n SETHEAD(root, fl, sl, block);\n\n // update first and second level maps\n root.flMap |= (1 << fl);\n SETSL(root, fl, GETSL(root, fl) | (1 << sl));\n}\n\n/** Removes a free block from internal lists. */\nfunction removeBlock(root: Root, block: Block): void {\n var blockInfo = block.mmInfo;\n if (DEBUG) assert(blockInfo & FREE); // must be free\n var size = blockInfo & ~TAGS_MASK;\n if (DEBUG) assert(size >= BLOCK_MINSIZE); // must be valid\n\n // mapping_insert\n var fl: usize, sl: u32;\n if (size < SB_SIZE) {\n fl = 0;\n sl = (size >> AL_BITS);\n } else {\n const inv: usize = sizeof() * 8 - 1;\n let boundedSize = min(size, BLOCK_MAXSIZE);\n fl = inv - clz(boundedSize);\n sl = ((boundedSize >> (fl - SL_BITS)) ^ (1 << SL_BITS));\n fl -= SB_BITS - 1;\n }\n if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range\n\n // link previous and next free block\n var prev = block.prev;\n var next = block.next;\n if (prev) prev.next = next;\n if (next) next.prev = prev;\n\n // update head if we are removing it\n if (block == GETHEAD(root, fl, sl)) {\n SETHEAD(root, fl, sl, next);\n\n // clear second level map if head is empty now\n if (!next) {\n let slMap = GETSL(root, fl);\n SETSL(root, fl, slMap &= ~(1 << sl));\n\n // clear first level map if second level is empty now\n if (!slMap) root.flMap &= ~(1 << fl);\n }\n }\n // note: does not alter left/back because it is likely that splitting\n // is performed afterwards, invalidating those changes. so, the caller\n // must perform those updates.\n}\n\n/** Searches for a free block of at least the specified size. */\nfunction searchBlock(root: Root, size: usize): Block | null {\n // size was already asserted by caller\n\n // mapping_search\n var fl: usize, sl: u32;\n if (size < SB_SIZE) {\n fl = 0;\n sl = (size >> AL_BITS);\n } else {\n const halfMaxSize = BLOCK_MAXSIZE >> 1; // don't round last fl\n const inv: usize = sizeof() * 8 - 1;\n const invRound = inv - SL_BITS;\n let requestSize = size < halfMaxSize\n ? size + (1 << (invRound - clz(size))) - 1\n : size;\n fl = inv - clz(requestSize);\n sl = ((requestSize >> (fl - SL_BITS)) ^ (1 << SL_BITS));\n fl -= SB_BITS - 1;\n }\n if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range\n\n // search second level\n var slMap = GETSL(root, fl) & (~0 << sl);\n var head: Block | null = null;\n if (!slMap) {\n // search next larger first level\n let flMap = root.flMap & (~0 << (fl + 1));\n if (!flMap) {\n head = null;\n } else {\n fl = ctz(flMap);\n slMap = GETSL(root, fl);\n if (DEBUG) assert(slMap); // can't be zero if fl points here\n head = GETHEAD(root, fl, ctz(slMap));\n }\n } else {\n head = GETHEAD(root, fl, ctz(slMap));\n }\n return head;\n}\n\n/** Prepares the specified block before (re-)use, possibly splitting it. */\nfunction prepareBlock(root: Root, block: Block, size: usize): void {\n // size was already asserted by caller\n\n var blockInfo = block.mmInfo;\n if (DEBUG) assert(!((size + BLOCK_OVERHEAD) & AL_MASK)); // size must be aligned so the new block is\n\n // split if the block can hold another MINSIZE block incl. overhead\n var remaining = (blockInfo & ~TAGS_MASK) - size;\n if (remaining >= BLOCK_OVERHEAD + BLOCK_MINSIZE) {\n block.mmInfo = size | (blockInfo & LEFTFREE); // also discards FREE\n\n let spare = changetype(changetype(block) + BLOCK_OVERHEAD + size);\n spare.mmInfo = (remaining - BLOCK_OVERHEAD) | FREE; // not LEFTFREE\n insertBlock(root, spare); // also sets 'back'\n\n // otherwise tag block as no longer FREE and right as no longer LEFTFREE\n } else {\n block.mmInfo = blockInfo & ~FREE;\n GETRIGHT(block).mmInfo &= ~LEFTFREE;\n }\n}\n\n/** Adds more memory to the pool. */\nfunction addMemory(root: Root, start: usize, end: usize): bool {\n if (DEBUG) assert(start <= end); // must be valid\n start = ((start + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD;\n end &= ~AL_MASK;\n\n var tail = GETTAIL(root);\n var tailInfo: usize = 0;\n if (tail) { // more memory\n if (DEBUG) assert(start >= changetype(tail) + BLOCK_OVERHEAD);\n\n // merge with current tail if adjacent\n const offsetToTail = AL_SIZE;\n if (start - offsetToTail == changetype(tail)) {\n start -= offsetToTail;\n tailInfo = tail.mmInfo;\n } else {\n // We don't do this, but a user might `memory.grow` manually\n // leading to non-adjacent pages managed by TLSF.\n }\n\n } else if (DEBUG) { // first memory\n assert(start >= changetype(root) + ROOT_SIZE); // starts after root\n }\n\n // check if size is large enough for a free block and the tail block\n var size = end - start;\n if (size < BLOCK_OVERHEAD + BLOCK_MINSIZE + BLOCK_OVERHEAD) {\n return false;\n }\n\n // left size is total minus its own and the zero-length tail's header\n var leftSize = size - 2 * BLOCK_OVERHEAD;\n var left = changetype(start);\n left.mmInfo = leftSize | FREE | (tailInfo & LEFTFREE);\n left.prev = null;\n left.next = null;\n\n // tail is a zero-length used block\n tail = changetype(start + BLOCK_OVERHEAD + leftSize);\n tail.mmInfo = 0 | LEFTFREE;\n SETTAIL(root, tail);\n\n insertBlock(root, left); // also merges with free left before tail / sets 'back'\n\n return true;\n}\n\n/** Grows memory to fit at least another block of the specified size. */\nfunction growMemory(root: Root, size: usize): void {\n if (ASC_LOW_MEMORY_LIMIT) {\n unreachable();\n return;\n }\n // Here, both rounding performed in searchBlock ...\n const halfMaxSize = BLOCK_MAXSIZE >> 1;\n if (size < halfMaxSize) { // don't round last fl\n const invRound = (sizeof() * 8 - 1) - SL_BITS;\n size += (1 << (invRound - clz(size))) - 1;\n }\n // and additional BLOCK_OVERHEAD must be taken into account. If we are going\n // to merge with the tail block, that's one time, otherwise it's two times.\n var pagesBefore = memory.size();\n size += BLOCK_OVERHEAD << usize((pagesBefore << 16) - BLOCK_OVERHEAD != changetype(GETTAIL(root)));\n var pagesNeeded = (((size + 0xffff) & ~0xffff) >>> 16);\n var pagesWanted = max(pagesBefore, pagesNeeded); // double memory\n if (memory.grow(pagesWanted) < 0) {\n if (memory.grow(pagesNeeded) < 0) unreachable();\n }\n var pagesAfter = memory.size();\n addMemory(root, pagesBefore << 16, pagesAfter << 16);\n}\n\n/** Computes the size (excl. header) of a block. */\nfunction computeSize(size: usize): usize {\n // Size must be large enough and aligned minus preceeding overhead\n return size <= BLOCK_MINSIZE\n ? BLOCK_MINSIZE\n : ((size + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD;\n}\n\n/** Prepares and checks an allocation size. */\nfunction prepareSize(size: usize): usize {\n if (size > BLOCK_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n return computeSize(size);\n}\n\n/** Initializes the root structure. */\nfunction initialize(): void {\n if (isDefined(ASC_RTRACE)) oninit(__heap_base);\n var rootOffset = (__heap_base + AL_MASK) & ~AL_MASK;\n var pagesBefore = memory.size();\n var pagesNeeded = ((((rootOffset + ROOT_SIZE) + 0xffff) & ~0xffff) >>> 16);\n if (pagesNeeded > pagesBefore && memory.grow(pagesNeeded - pagesBefore) < 0) unreachable();\n var root = changetype(rootOffset);\n root.flMap = 0;\n SETTAIL(root, changetype(0));\n for (let fl: usize = 0; fl < FL_BITS; ++fl) {\n SETSL(root, fl, 0);\n for (let sl: u32 = 0; sl < SL_SIZE; ++sl) {\n SETHEAD(root, fl, sl, null);\n }\n }\n var memStart = rootOffset + ROOT_SIZE;\n if (ASC_LOW_MEMORY_LIMIT) {\n const memEnd = ASC_LOW_MEMORY_LIMIT & ~AL_MASK;\n if (memStart <= memEnd) addMemory(root, memStart, memEnd);\n else unreachable(); // low memory limit already exceeded\n } else {\n addMemory(root, memStart, memory.size() << 16);\n }\n ROOT = root;\n}\n\n/** Allocates a block of the specified size. */\nexport function allocateBlock(root: Root, size: usize): Block {\n var payloadSize = prepareSize(size);\n var block = searchBlock(root, payloadSize);\n if (!block) {\n growMemory(root, payloadSize);\n block = changetype(searchBlock(root, payloadSize));\n if (DEBUG) assert(block); // must be found now\n }\n if (DEBUG) assert((block.mmInfo & ~TAGS_MASK) >= payloadSize); // must fit\n removeBlock(root, block);\n prepareBlock(root, block, payloadSize);\n if (isDefined(ASC_RTRACE)) onalloc(block);\n return block;\n}\n\n/** Reallocates a block to the specified size. */\nexport function reallocateBlock(root: Root, block: Block, size: usize): Block {\n var payloadSize = prepareSize(size);\n var blockInfo = block.mmInfo;\n var blockSize = blockInfo & ~TAGS_MASK;\n\n // possibly split and update runtime size if it still fits\n if (payloadSize <= blockSize) {\n prepareBlock(root, block, payloadSize);\n if (isDefined(ASC_RTRACE)) {\n if (payloadSize != blockSize) onresize(block, BLOCK_OVERHEAD + blockSize);\n }\n return block;\n }\n\n // merge with right free block if merger is large enough\n var right = GETRIGHT(block);\n var rightInfo = right.mmInfo;\n if (rightInfo & FREE) {\n let mergeSize = blockSize + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK);\n if (mergeSize >= payloadSize) {\n removeBlock(root, right);\n block.mmInfo = (blockInfo & TAGS_MASK) | mergeSize;\n prepareBlock(root, block, payloadSize);\n if (isDefined(ASC_RTRACE)) onresize(block, BLOCK_OVERHEAD + blockSize);\n return block;\n }\n }\n\n // otherwise move the block\n return moveBlock(root, block, size);\n}\n\n/** Moves a block to a new one of the specified size. */\nfunction moveBlock(root: Root, block: Block, newSize: usize): Block {\n var newBlock = allocateBlock(root, newSize);\n memory.copy(changetype(newBlock) + BLOCK_OVERHEAD, changetype(block) + BLOCK_OVERHEAD, block.mmInfo & ~TAGS_MASK);\n if (changetype(block) >= __heap_base) {\n if (isDefined(ASC_RTRACE)) onmove(block, newBlock);\n freeBlock(root, block);\n }\n return newBlock;\n}\n\n/** Frees a block. */\nexport function freeBlock(root: Root, block: Block): void {\n if (isDefined(ASC_RTRACE)) onfree(block);\n block.mmInfo = block.mmInfo | FREE;\n insertBlock(root, block);\n}\n\n/** Checks that a used block is valid to be freed or reallocated. */\nfunction checkUsedBlock(ptr: usize): Block {\n var block = changetype(ptr - BLOCK_OVERHEAD);\n assert(\n ptr != 0 && !(ptr & AL_MASK) && // must exist and be aligned\n !(block.mmInfo & FREE) // must be used\n );\n return block;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __alloc(size: usize): usize {\n if (!ROOT) initialize();\n return changetype(allocateBlock(ROOT, size)) + BLOCK_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __realloc(ptr: usize, size: usize): usize {\n if (!ROOT) initialize();\n return (ptr < __heap_base\n ? changetype(moveBlock(ROOT, checkUsedBlock(ptr), size))\n : changetype(reallocateBlock(ROOT, checkUsedBlock(ptr), size))\n ) + BLOCK_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __free(ptr: usize): void {\n if (ptr < __heap_base) return;\n if (!ROOT) initialize();\n freeBlock(ROOT, checkUsedBlock(ptr));\n}\n", + "set": "/// \n\nimport { HASH } from \"./util/hash\";\n\n// A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht\n\n// @ts-ignore: decorator\n@inline const INITIAL_CAPACITY = 4;\n\n// @ts-ignore: decorator\n@inline const FILL_FACTOR_N = 8;\n\n// @ts-ignore: decorator\n@inline const FILL_FACTOR_D = 3;\n\n// @ts-ignore: decorator\n@inline const FREE_FACTOR_N = 3;\n\n// @ts-ignore: decorator\n@inline const FREE_FACTOR_D = 4;\n\n/** Structure of a set entry. */\n@unmanaged class SetEntry {\n key: K;\n taggedNext: usize; // LSB=1 indicates EMPTY\n}\n\n/** Empty bit. */\n// @ts-ignore: decorator\n@inline const EMPTY: usize = 1 << 0;\n\n/** Size of a bucket. */\n// @ts-ignore: decorator\n@inline const BUCKET_SIZE = sizeof();\n\n/** Computes the alignment of an entry. */\n// @ts-ignore: decorator\n@inline\nfunction ENTRY_ALIGN(): usize {\n // can align to 4 instead of 8 if 32-bit and K is <= 32-bits\n const align = (sizeof() > sizeof() ? sizeof() : sizeof()) - 1;\n return align;\n}\n\n/** Computes the aligned size of an entry. */\n// @ts-ignore: decorator\n@inline\nfunction ENTRY_SIZE(): usize {\n const align = ENTRY_ALIGN();\n const size = (offsetof>() + align) & ~align;\n return size;\n}\n\nexport class Set {\n\n // buckets referencing their respective first entry, usize[bucketsMask + 1]\n private buckets: ArrayBuffer = new ArrayBuffer(INITIAL_CAPACITY * BUCKET_SIZE);\n private bucketsMask: u32 = INITIAL_CAPACITY - 1;\n\n // entries in insertion order, SetEntry[entriesCapacity]\n private entries: ArrayBuffer = new ArrayBuffer(INITIAL_CAPACITY * ENTRY_SIZE());\n private entriesCapacity: i32 = INITIAL_CAPACITY;\n private entriesOffset: i32 = 0;\n private entriesCount: i32 = 0;\n\n constructor() {\n /* nop */\n }\n\n get size(): i32 {\n return this.entriesCount;\n }\n\n clear(): void {\n this.buckets = new ArrayBuffer(INITIAL_CAPACITY * BUCKET_SIZE);\n this.bucketsMask = INITIAL_CAPACITY - 1;\n this.entries = new ArrayBuffer(INITIAL_CAPACITY * ENTRY_SIZE());\n this.entriesCapacity = INITIAL_CAPACITY;\n this.entriesOffset = 0;\n this.entriesCount = 0;\n }\n\n private find(key: T, hashCode: u32): SetEntry | null {\n var entry = load>( // unmanaged!\n changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE\n );\n while (entry) {\n let taggedNext = entry.taggedNext;\n if (!(taggedNext & EMPTY) && entry.key == key) return entry;\n entry = changetype>(taggedNext & ~EMPTY);\n }\n return null;\n }\n\n @operator(\"[]\")\n has(key: T): bool {\n return this.find(key, HASH(key)) !== null;\n }\n\n add(key: T): this {\n var hashCode = HASH(key);\n var entry = this.find(key, hashCode); // unmanaged!\n if (!entry) {\n // check if rehashing is necessary\n if (this.entriesOffset == this.entriesCapacity) {\n this.rehash(\n this.entriesCount < this.entriesCapacity * FREE_FACTOR_N / FREE_FACTOR_D\n ? this.bucketsMask // just rehash if 1/4+ entries are empty\n : (this.bucketsMask << 1) | 1 // grow capacity to next 2^N\n );\n }\n // append new entry\n entry = changetype>(changetype(this.entries) + (this.entriesOffset++) * ENTRY_SIZE());\n entry.key = key;\n if (isManaged()) {\n __link(changetype(this), changetype(key), true);\n }\n ++this.entriesCount;\n // link with previous entry in bucket\n let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE;\n entry.taggedNext = load(bucketPtrBase);\n store(bucketPtrBase, changetype(entry));\n }\n return this;\n }\n\n @operator(\"[]=\")\n private __set(key: T, value: bool): void {\n if (value) this.add(key);\n else this.delete(key);\n }\n\n delete(key: T): bool {\n var entry = this.find(key, HASH(key)); // unmanaged!\n if (!entry) return false;\n entry.taggedNext |= EMPTY;\n --this.entriesCount;\n // check if rehashing is appropriate\n var halfBucketsMask = this.bucketsMask >> 1;\n if (\n halfBucketsMask + 1 >= max(INITIAL_CAPACITY, this.entriesCount) &&\n this.entriesCount < this.entriesCapacity * FREE_FACTOR_N / FREE_FACTOR_D\n ) this.rehash(halfBucketsMask);\n return true;\n }\n\n private rehash(newBucketsMask: u32): void {\n var newBucketsCapacity = (newBucketsMask + 1);\n var newBuckets = new ArrayBuffer(newBucketsCapacity * BUCKET_SIZE);\n var newEntriesCapacity = newBucketsCapacity * FILL_FACTOR_N / FILL_FACTOR_D;\n var newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE());\n\n // copy old entries to new entries\n var oldPtr = changetype(this.entries);\n var oldEnd = oldPtr + this.entriesOffset * ENTRY_SIZE();\n var newPtr = changetype(newEntries);\n while (oldPtr != oldEnd) {\n let oldEntry = changetype>(oldPtr); // unmanaged!\n if (!(oldEntry.taggedNext & EMPTY)) {\n let newEntry = changetype>(newPtr); // unmanaged!\n let oldEntryKey = oldEntry.key;\n newEntry.key = oldEntryKey;\n let newBucketIndex = HASH(oldEntryKey) & newBucketsMask;\n let newBucketPtrBase = changetype(newBuckets) + newBucketIndex * BUCKET_SIZE;\n newEntry.taggedNext = load(newBucketPtrBase);\n store(newBucketPtrBase, newPtr);\n newPtr += ENTRY_SIZE();\n }\n oldPtr += ENTRY_SIZE();\n }\n\n this.buckets = newBuckets;\n this.bucketsMask = newBucketsMask;\n this.entries = newEntries;\n this.entriesCapacity = newEntriesCapacity;\n this.entriesOffset = this.entriesCount;\n }\n\n values(): T[] {\n // FIXME: this is preliminary, needs iterators/closures\n var start = changetype(this.entries);\n var size = this.entriesOffset;\n var values = new Array(size);\n var length = 0;\n for (let i = 0; i < size; ++i) {\n let entry = changetype>(start + i * ENTRY_SIZE());\n if (!(entry.taggedNext & EMPTY)) {\n values[length++] = entry.key;\n }\n }\n values.length = length;\n return values;\n }\n\n toString(): string {\n return \"[object Set]\";\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n __visit(changetype(this.buckets), cookie);\n var entries = changetype(this.entries);\n if (isManaged()) {\n let cur = entries;\n let end = cur + this.entriesOffset * ENTRY_SIZE();\n while (cur < end) {\n let entry = changetype>(cur);\n if (!(entry.taggedNext & EMPTY)) {\n let val = changetype(entry.key);\n if (isNullable()) {\n if (val) __visit(val, cookie);\n } else __visit(val, cookie);\n }\n cur += ENTRY_SIZE();\n }\n }\n __visit(entries, cookie);\n }\n}\n", + "shared/feature": "// This file is shared with the compiler and must remain portable\n\n/** Indicates specific features to activate. */\nexport const enum Feature {\n /** No additional features. */\n NONE = 0,\n /** Sign extension operations. */\n SIGN_EXTENSION = 1 << 0, // see: https://github.com/WebAssembly/sign-extension-ops\n /** Mutable global imports and exports. */\n MUTABLE_GLOBALS = 1 << 1, // see: https://github.com/WebAssembly/mutable-global\n /** Non-trapping float to integer operations. */\n NONTRAPPING_F2I = 1 << 2, // see: https://github.com/WebAssembly/nontrapping-float-to-int-conversions\n /** Bulk memory operations. */\n BULK_MEMORY = 1 << 3, // see: https://github.com/WebAssembly/bulk-memory-operations\n /** SIMD types and operations. */\n SIMD = 1 << 4, // see: https://github.com/WebAssembly/simd\n /** Threading and atomic operations. */\n THREADS = 1 << 5, // see: https://github.com/WebAssembly/threads\n /** Exception handling operations. */\n EXCEPTION_HANDLING = 1 << 6, // see: https://github.com/WebAssembly/exception-handling\n /** Tail call operations. */\n TAIL_CALLS = 1 << 7, // see: https://github.com/WebAssembly/tail-call\n /** Reference types. */\n REFERENCE_TYPES = 1 << 8, // see: https://github.com/WebAssembly/reference-types\n /** Multi value types. */\n MULTI_VALUE = 1 << 9, // see: https://github.com/WebAssembly/multi-value\n /** Garbage collection. */\n GC = 1 << 10, // see: https://github.com/WebAssembly/gc\n /** Memory64. */\n MEMORY64 = 1 << 11 // see: https://github.com/WebAssembly/memory64\n}\n\n/** Gets the name of the specified feature one would specify on the command line. */\nexport function featureToString(feature: Feature): string {\n switch (feature) {\n case Feature.SIGN_EXTENSION: return \"sign-extension\";\n case Feature.MUTABLE_GLOBALS: return \"mutable-globals\";\n case Feature.NONTRAPPING_F2I: return \"nontrapping-f2i\";\n case Feature.BULK_MEMORY: return \"bulk-memory\";\n case Feature.SIMD: return \"simd\";\n case Feature.THREADS: return \"threads\";\n case Feature.EXCEPTION_HANDLING: return \"exception-handling\";\n case Feature.TAIL_CALLS: return \"tail-calls\";\n case Feature.REFERENCE_TYPES: return \"reference-types\";\n case Feature.MULTI_VALUE: return \"multi-value\";\n case Feature.GC: return \"gc\";\n case Feature.MEMORY64: return \"memory64\";\n }\n assert(false);\n return \"\";\n}\n", + "shared/runtime": "// This file is shared with the compiler and must remain portable\n\n/** Runtime types. */\nexport enum Runtime {\n /** Simple bump allocator without GC. */\n Stub = 0,\n /** Stop the world semi-automatic GC. */\n Minimal = 1,\n /** incremental GC. */\n Incremental = 2,\n}\n", + "shared/target": "// This file is shared with the compiler and must remain portable\n\n/** Compilation target. */\nexport enum Target {\n /** Portable. */\n JS = 0,\n /** WebAssembly with 32-bit pointers. */\n WASM32 = 1,\n /** WebAssembly with 64-bit pointers. Experimental and not supported by any runtime yet. */\n WASM64 = 2,\n}\n", + "shared/typeinfo": "// This file is shared with the compiler and must remain portable\n\n// ╒═══════════════════ Typeinfo interpretation ═══════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ◄─ __rtti_base\n// │ count │\n// ╞═══════════════════════════════════════════════════════════════╡ ┐\n// │ Typeinfo#flags [id=0] │ id < count\n// ├ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┤\n// │ Typeinfo#base [id=0] │\n// ├───────────────────────────────────────────────────────────────┤\n// │ ... │\n\n/** Runtime type information data structure. */\n@unmanaged\nexport class Typeinfo {\n /** Flags describing the shape of this class type. */\n flags: TypeinfoFlags = TypeinfoFlags.NONE;\n /** Base class id or `0` if none. */\n base: u32 = 0;\n}\n\n/** Runtime type information flags. */\nexport const enum TypeinfoFlags {\n /** No specific flags. */\n NONE = 0,\n /** Type is an `ArrayBufferView`. */\n ARRAYBUFFERVIEW = 1 << 0,\n /** Type is an `Array`. */\n ARRAY = 1 << 1,\n /** Type is a `StaticArray`. */\n STATICARRAY = 1 << 2,\n /** Type is a `Set`. */\n SET = 1 << 3,\n /** Type is a `Map`. */\n MAP = 1 << 4,\n /** Type has no outgoing pointers. */\n POINTERFREE = 1 << 5,\n /** Value alignment of 1 byte. */\n VALUE_ALIGN_0 = 1 << 6,\n /** Value alignment of 2 bytes. */\n VALUE_ALIGN_1 = 1 << 7,\n /** Value alignment of 4 bytes. */\n VALUE_ALIGN_2 = 1 << 8,\n /** Value alignment of 8 bytes. */\n VALUE_ALIGN_3 = 1 << 9,\n /** Value alignment of 16 bytes. */\n VALUE_ALIGN_4 = 1 << 10,\n /** Value is a signed type. */\n VALUE_SIGNED = 1 << 11,\n /** Value is a float type. */\n VALUE_FLOAT = 1 << 12,\n /** Value type is nullable. */\n VALUE_NULLABLE = 1 << 13,\n /** Value type is managed. */\n VALUE_MANAGED = 1 << 14,\n /** Key alignment of 1 byte. */\n KEY_ALIGN_0 = 1 << 15,\n /** Key alignment of 2 bytes. */\n KEY_ALIGN_1 = 1 << 16,\n /** Key alignment of 4 bytes. */\n KEY_ALIGN_2 = 1 << 17,\n /** Key alignment of 8 bytes. */\n KEY_ALIGN_3 = 1 << 18,\n /** Key alignment of 16 bytes. */\n KEY_ALIGN_4 = 1 << 19,\n /** Key is a signed type. */\n KEY_SIGNED = 1 << 20,\n /** Key is a float type. */\n KEY_FLOAT = 1 << 21,\n /** Key type is nullable. */\n KEY_NULLABLE = 1 << 22,\n /** Key type is managed. */\n KEY_MANAGED = 1 << 23\n}\n", + "staticarray": "/// \n\nimport { OBJECT, BLOCK_MAXSIZE, TOTAL_OVERHEAD } from \"./rt/common\";\nimport { Runtime } from \"shared/runtime\";\nimport { COMPARATOR, SORT } from \"./util/sort\";\nimport { REVERSE } from \"./util/bytes\";\nimport { idof } from \"./builtins\";\nimport { Array } from \"./array\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_HOLEYARRAY } from \"./util/error\";\nimport { joinBooleanArray, joinIntegerArray, joinFloatArray, joinStringArray, joinReferenceArray } from \"./util/string\";\n\n@final\nexport class StaticArray {\n [key: number]: T;\n\n // Note that the interface of StaticArray instances must be a semantically\n // compatible subset of Array in order for syntax highlighting to work\n // properly, for instance when creating static arrays from array literals.\n // The additionally provided static methods take care of dealing with static\n // arrays exclusively, without having to convert to Array first.\n\n static fromArray(source: Array): StaticArray {\n var length = source.length;\n var outSize = length << alignof();\n var out = changetype>(__new(outSize, idof>()));\n if (isManaged()) {\n let sourcePtr = source.dataStart;\n for (let i = 0; i < length; ++i) {\n let off = i << alignof();\n let ref = load(sourcePtr + off);\n store(changetype(out) + off, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(changetype(out), source.dataStart, outSize);\n }\n return out;\n }\n\n static concat(source: StaticArray, other: StaticArray): StaticArray {\n var sourceLen = source.length;\n var otherLen = select(0, other.length, other === null);\n var outLen = sourceLen + otherLen;\n if (outLen > BLOCK_MAXSIZE >>> alignof()) throw new Error(E_INVALIDLENGTH);\n var out = changetype>(__new(outLen << alignof(), idof>()));\n var outStart = changetype(out);\n var sourceSize = sourceLen << alignof();\n if (isManaged()) {\n for (let offset: usize = 0; offset < sourceSize; offset += sizeof()) {\n let ref = load(changetype(source) + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n outStart += sourceSize;\n let otherSize = otherLen << alignof();\n for (let offset: usize = 0; offset < otherSize; offset += sizeof()) {\n let ref = load(changetype(other) + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(outStart, changetype(source), sourceSize);\n memory.copy(outStart + sourceSize, changetype(other), otherLen << alignof());\n }\n return out;\n }\n\n static slice(source: StaticArray, start: i32 = 0, end: i32 = i32.MAX_VALUE): StaticArray {\n var length = source.length;\n start = start < 0 ? max(start + length, 0) : min(start, length);\n end = end < 0 ? max(end + length, 0) : min(end , length);\n length = max(end - start, 0);\n var sliceSize = length << alignof();\n var slice = changetype>(__new(sliceSize, idof>()));\n var sourcePtr = changetype(source) + (start << alignof());\n if (isManaged()) {\n let off: usize = 0;\n while (off < sliceSize) {\n let ref = load(sourcePtr + off);\n store(changetype(slice) + off, ref);\n __link(changetype(slice), ref, true);\n off += sizeof();\n }\n } else {\n memory.copy(changetype(slice), sourcePtr, sliceSize);\n }\n return slice;\n }\n\n constructor(length: i32) {\n if (length > BLOCK_MAXSIZE >>> alignof()) throw new RangeError(E_INVALIDLENGTH);\n var outSize = length << alignof();\n var out = changetype>(__new(outSize, idof>()));\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(changetype(out), 0, outSize);\n }\n return out;\n }\n\n get length(): i32 {\n return changetype(changetype(this) - TOTAL_OVERHEAD).rtSize >>> alignof();\n }\n\n at(index: i32): T {\n var len = this.length;\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n var value = load(changetype(this) + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n @operator(\"[]\") private __get(index: i32): T {\n if (index >= this.length) throw new RangeError(E_INDEXOUTOFRANGE);\n var value = load(changetype(this) + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n @unsafe @operator(\"{}\") private __uget(index: i32): T {\n return load(changetype(this) + (index << alignof()));\n }\n\n @operator(\"[]=\") private __set(index: i32, value: T): void {\n if (index >= this.length) throw new RangeError(E_INDEXOUTOFRANGE);\n this.__uset(index, value);\n }\n\n @unsafe @operator(\"{}=\") private __uset(index: i32, value: T): void {\n store(changetype(this) + (index << alignof()), value);\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n }\n\n fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): this {\n var ptr = changetype(this);\n var len = this.length;\n start = start < 0 ? max(len + start, 0) : min(start, len);\n end = end < 0 ? max(len + end, 0) : min(end, len);\n if (isManaged()) {\n for (; start < end; ++start) {\n store(ptr + (start << alignof()), changetype(value));\n __link(changetype(this), changetype(value), true);\n }\n } else if (sizeof() == 1) {\n if (start < end) {\n memory.fill(\n ptr + start,\n u8(value),\n (end - start)\n );\n }\n } else {\n for (; start < end; ++start) {\n store(ptr + (start << alignof()), value);\n }\n }\n return this;\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): this {\n var ptr = changetype(this);\n var len = this.length;\n\n end = min(end, len);\n\n var to = target < 0 ? max(len + target, 0) : min(target, len);\n var from = start < 0 ? max(len + start, 0) : min(start, len);\n var last = end < 0 ? max(len + end, 0) : min(end, len);\n var count = min(last - from, len - to);\n\n memory.copy( // is memmove\n ptr + (to << alignof()),\n ptr + (from << alignof()),\n count << alignof()\n );\n return this;\n }\n\n includes(value: T, fromIndex: i32 = 0): bool {\n if (isFloat()) {\n let length = this.length;\n if (length == 0 || fromIndex >= length) return false;\n if (fromIndex < 0) fromIndex = max(length + fromIndex, 0);\n while (fromIndex < length) {\n let elem = load(changetype(this) + (fromIndex << alignof()));\n // @ts-ignore\n if (elem == value || isNaN(elem) & isNaN(value)) return true;\n ++fromIndex;\n }\n return false;\n } else {\n return this.indexOf(value, fromIndex) >= 0;\n }\n }\n\n indexOf(value: T, fromIndex: i32 = 0): i32 {\n var length = this.length;\n if (length == 0 || fromIndex >= length) return -1;\n if (fromIndex < 0) fromIndex = max(length + fromIndex, 0);\n while (fromIndex < length) {\n if (load(changetype(this) + (fromIndex << alignof())) == value) return fromIndex;\n ++fromIndex;\n }\n return -1;\n }\n\n lastIndexOf(value: T, fromIndex: i32 = this.length): i32 {\n var length = this.length;\n if (length == 0) return -1;\n if (fromIndex < 0) fromIndex = length + fromIndex;\n else if (fromIndex >= length) fromIndex = length - 1;\n while (fromIndex >= 0) {\n if (load(changetype(this) + (fromIndex << alignof())) == value) return fromIndex;\n --fromIndex;\n }\n return -1;\n }\n\n concat(other: Array): Array {\n var thisLen = this.length;\n var otherLen = select(0, other.length, other === null);\n var outLen = thisLen + otherLen;\n if (outLen > BLOCK_MAXSIZE >>> alignof()) throw new Error(E_INVALIDLENGTH);\n var out = changetype>(__newArray(outLen, alignof(), idof>()));\n var outStart = out.dataStart;\n var thisSize = thisLen << alignof();\n if (isManaged()) {\n let thisStart = changetype(this);\n for (let offset: usize = 0; offset < thisSize; offset += sizeof()) {\n let ref = load(thisStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n outStart += thisSize;\n let otherStart = other.dataStart;\n let otherSize = otherLen << alignof();\n for (let offset: usize = 0; offset < otherSize; offset += sizeof()) {\n let ref = load(otherStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(outStart, changetype(this), thisSize);\n memory.copy(outStart + thisSize, other.dataStart, otherLen << alignof());\n }\n return out;\n }\n\n slice(start: i32 = 0, end: i32 = i32.MAX_VALUE): Array {\n var length = this.length;\n start = start < 0 ? max(start + length, 0) : min(start, length);\n end = end < 0 ? max(end + length, 0) : min(end , length);\n length = max(end - start, 0);\n var slice = changetype>(__newArray(length, alignof(), idof>()));\n var sliceBase = slice.dataStart;\n var thisBase = changetype(this) + (start << alignof());\n if (isManaged()) {\n let off = 0;\n let end = length << alignof();\n while (off < end) {\n let ref = load(thisBase + off);\n store(sliceBase + off, ref);\n __link(changetype(slice), ref, true);\n off += sizeof();\n }\n } else {\n memory.copy(sliceBase, thisBase, length << alignof());\n }\n return slice;\n }\n\n findIndex(fn: (value: T, index: i32, array: StaticArray) => bool): i32 {\n for (let i = 0, len = this.length; i < len; ++i) {\n if (fn(load(changetype(this) + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n findLastIndex(fn: (value: T, index: i32, array: StaticArray) => bool): i32 {\n for (let i = this.length - 1; i >= 0; --i) {\n if (fn(load(changetype(this) + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n forEach(fn: (value: T, index: i32, array: StaticArray) => void): void {\n for (let i = 0, len = this.length; i < len; ++i) {\n fn(load(changetype(this) + (i << alignof())), i, this);\n }\n }\n\n map(fn: (value: T, index: i32, array: StaticArray) => U): Array {\n var len = this.length;\n var out = changetype>(__newArray(len, alignof(), idof>()));\n var outStart = out.dataStart;\n for (let i = 0; i < len; ++i) {\n let result = fn(load(changetype(this) + (i << alignof())), i, this);\n store(outStart + (i << alignof()), result);\n if (isManaged()) {\n __link(changetype(out), changetype(result), true);\n }\n }\n return out;\n }\n\n filter(fn: (value: T, index: i32, array: StaticArray) => bool): Array {\n var result = changetype>(__newArray(0, alignof(), idof>()));\n for (let i = 0, len = this.length; i < len; ++i) {\n let value = load(changetype(this) + (i << alignof()));\n if (fn(value, i, this)) result.push(value);\n }\n return result;\n }\n\n reduce(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray) => U,\n initialValue: U\n ): U {\n var acc = initialValue;\n for (let i = 0, len = this.length; i < len; ++i) {\n acc = fn(acc, load(changetype(this) + (i << alignof())), i, this);\n }\n return acc;\n }\n\n reduceRight(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray) => U,\n initialValue: U\n ): U {\n var acc = initialValue;\n for (let i = this.length - 1; i >= 0; --i) {\n acc = fn(acc, load(changetype(this) + (i << alignof())), i, this);\n }\n return acc;\n }\n\n every(fn: (value: T, index: i32, array: StaticArray) => bool): bool {\n for (let i = 0, len = this.length; i < len; ++i) {\n if (!fn(load(changetype(this) + (i << alignof())), i, this)) return false;\n }\n return true;\n }\n\n some(fn: (value: T, index: i32, array: StaticArray) => bool): bool {\n for (let i = 0, len = this.length; i < len; ++i) {\n if (fn(load(changetype(this) + (i << alignof())), i, this)) return true;\n }\n return false;\n }\n\n sort(comparator: (a: T, b: T) => i32 = COMPARATOR()): this {\n SORT(changetype(this), this.length, comparator);\n return this;\n }\n\n join(separator: string = \",\"): string {\n if (isBoolean()) return joinBooleanArray(changetype(this), this.length, separator);\n if (isInteger()) return joinIntegerArray(changetype(this), this.length, separator);\n if (isFloat()) return joinFloatArray(changetype(this), this.length, separator);\n if (ASC_SHRINK_LEVEL < 1) {\n if (isString()) return joinStringArray(changetype(this), this.length, separator);\n }\n if (isReference()) return joinReferenceArray(changetype(this), this.length, separator);\n ERROR(\"unspported element type\");\n return unreachable();\n }\n\n reverse(): this {\n REVERSE(changetype(this), this.length);\n return this;\n }\n\n toString(): string {\n return this.join();\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n if (isManaged()) {\n let cur = changetype(this);\n let end = cur + changetype(changetype(this) - TOTAL_OVERHEAD).rtSize;\n while (cur < end) {\n let val = load(cur);\n if (val) __visit(val, cookie);\n cur += sizeof();\n }\n }\n }\n}\n", + "string": "/// \n\nimport { OBJECT, BLOCK_MAXSIZE, TOTAL_OVERHEAD } from \"./rt/common\";\nimport { compareImpl, strtol, strtod, isSpace, isAscii, isFinalSigma, toLower8, toUpper8 } from \"./util/string\";\nimport { SPECIALS_UPPER, casemap, bsearch } from \"./util/casemap\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_UNPAIRED_SURROGATE } from \"./util/error\";\nimport { idof } from \"./builtins\";\nimport { Array } from \"./array\";\n\n@final export abstract class String {\n\n @lazy static readonly MAX_LENGTH: i32 = (BLOCK_MAXSIZE >>> alignof());\n\n static fromCharCode(unit: i32, surr: i32 = -1): String {\n var hasSur = surr > 0;\n var out = changetype(__new(2 << i32(hasSur), idof()));\n store(changetype(out), unit);\n if (hasSur) store(changetype(out), surr, 2);\n return out;\n }\n\n static fromCharCodes(units: Array): String {\n var length = units.length;\n var out = changetype(__new(length << 1, idof()));\n var ptr = units.dataStart;\n for (let i = 0; i < length; ++i) {\n store(changetype(out) + (i << 1), load(ptr + (i << 2)));\n }\n return out;\n }\n\n static fromCodePoint(code: i32): String {\n var hasSur = code > 0xFFFF;\n var out = changetype(__new(2 << i32(hasSur), idof()));\n if (!hasSur) {\n store(changetype(out), code);\n } else {\n // Checks valid code point range\n assert(code <= 0x10FFFF);\n code -= 0x10000;\n let hi = (code & 0x03FF) | 0xDC00;\n let lo = code >>> 10 | 0xD800;\n store(changetype(out), lo | hi << 16);\n }\n return out;\n }\n\n @builtin static raw(parts: TemplateStringsArray, ...args: unknown[]): string { return unreachable(); }\n\n get length(): i32 {\n return changetype(changetype(this) - TOTAL_OVERHEAD).rtSize >> 1;\n }\n\n at(pos: i32): String {\n var len = this.length;\n pos += select(0, len, pos >= 0);\n if (pos >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n var out = __new(2, idof());\n store(out, load(changetype(this) + (pos << 1)));\n return changetype(out); // retains\n }\n\n @operator(\"[]\") charAt(pos: i32): String {\n if (pos >= this.length) return changetype(\"\");\n var out = changetype(__new(2, idof()));\n store(changetype(out), load(changetype(this) + (pos << 1)));\n return out;\n }\n\n charCodeAt(pos: i32): i32 {\n if (pos >= this.length) return -1; // (NaN)\n return load(changetype(this) + (pos << 1));\n }\n\n codePointAt(pos: i32): i32 {\n var len = this.length;\n if (pos >= len) return -1; // (undefined)\n var first = load(changetype(this) + (pos << 1));\n if ((first & 0xFC00) != 0xD800 || pos + 1 == len) return first;\n var second = load(changetype(this) + (pos << 1), 2);\n if ((second & 0xFC00) != 0xDC00) return first;\n return (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n }\n\n @operator(\"+\") private static __concat(left: String, right: String): String {\n return left.concat(right);\n }\n\n concat(other: String): String {\n var thisSize: isize = this.length << 1;\n var otherSize: isize = other.length << 1;\n var outSize: usize = thisSize + otherSize;\n if (outSize == 0) return changetype(\"\");\n var out = changetype(__new(outSize, idof()));\n memory.copy(changetype(out), changetype(this), thisSize);\n memory.copy(changetype(out) + thisSize, changetype(other), otherSize);\n return out;\n }\n\n endsWith(search: String, end: i32 = String.MAX_LENGTH): bool {\n end = min(max(end, 0), this.length);\n var searchLength = search.length;\n var searchStart = end - searchLength;\n if (searchStart < 0) return false;\n // @ts-ignore: string <-> String\n return !compareImpl(this, searchStart, search, 0, searchLength);\n }\n\n @operator(\"==\") private static __eq(left: String | null, right: String | null): bool {\n if (left === right) return true;\n if (left === null || right === null) return false;\n var leftLength = left.length;\n if (leftLength != right.length) return false;\n // @ts-ignore: string <-> String\n return !compareImpl(left, 0, right, 0, leftLength);\n }\n\n @operator.prefix(\"!\")\n private static __not(str: String | null): bool {\n return str === null || !str.length;\n }\n\n @operator(\"!=\")\n private static __ne(left: String | null, right: String | null): bool {\n return !this.__eq(left, right);\n }\n\n @operator(\">\") private static __gt(left: String, right: String): bool {\n if (left === right) return false;\n var leftLength = left.length;\n if (!leftLength) return false;\n var rightLength = right.length;\n if (!rightLength) return true;\n // @ts-ignore: string <-> String\n var res = compareImpl(left, 0, right, 0, min(leftLength, rightLength));\n return res ? res > 0 : leftLength > rightLength;\n }\n\n @operator(\">=\") private static __gte(left: String, right: String): bool {\n return !this.__lt(left, right);\n }\n\n @operator(\"<\") private static __lt(left: String, right: String): bool {\n if (left === right) return false;\n var rightLength = right.length;\n if (!rightLength) return false;\n var leftLength = left.length;\n if (!leftLength) return true;\n // @ts-ignore: string <-> String\n var res = compareImpl(left, 0, right, 0, min(leftLength, rightLength));\n return res ? res < 0 : leftLength < rightLength;\n }\n\n @operator(\"<=\") private static __lte(left: String, right: String): bool {\n return !this.__gt(left, right);\n }\n\n includes(search: String, start: i32 = 0): bool {\n return this.indexOf(search, start) != -1;\n }\n\n indexOf(search: String, start: i32 = 0): i32 {\n var searchLen = search.length;\n if (!searchLen) return 0;\n var len = this.length;\n if (!len) return -1;\n var searchStart = min(max(start, 0), len);\n for (len -= searchLen; searchStart <= len; ++searchStart) {\n // @ts-ignore: string <-> String\n if (!compareImpl(this, searchStart, search, 0, searchLen)) return searchStart;\n }\n return -1;\n }\n\n lastIndexOf(search: String, start: i32 = i32.MAX_VALUE): i32 {\n var searchLen = search.length;\n if (!searchLen) return this.length;\n var len = this.length;\n if (!len) return -1;\n var searchStart = min(max(start, 0), len - searchLen);\n for (; searchStart >= 0; --searchStart) {\n // @ts-ignore: string <-> String\n if (!compareImpl(this, searchStart, search, 0, searchLen)) return searchStart;\n }\n return -1;\n }\n\n // TODO: implement full locale comparison with locales and Collator options\n localeCompare(other: String): i32 {\n if (other === this) return 0; // compare pointers\n var len: isize = this.length;\n var otherLen: isize = other.length;\n if (otherLen != len) return select(1, -1, len > otherLen);\n if (!otherLen) return 0; // \"\" == \"\"\n // @ts-ignore: string <-> String\n return compareImpl(this, 0, other, 0, otherLen);\n }\n\n startsWith(search: String, start: i32 = 0): bool {\n var len = this.length;\n var searchStart = min(max(start, 0), len);\n var searchLength = search.length;\n if (searchLength + searchStart > len) return false;\n // @ts-ignore: string <-> String\n return !compareImpl(this, searchStart, search, 0, searchLength);\n }\n\n substr(start: i32, length: i32 = i32.MAX_VALUE): String { // legacy\n var intStart: isize = start;\n var end: isize = length;\n var len: isize = this.length;\n if (intStart < 0) intStart = max(len + intStart, 0);\n var size = min(max(end, 0), len - intStart) << 1;\n if (size <= 0) return changetype(\"\");\n var out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + (intStart << 1), size);\n return out;\n }\n\n substring(start: i32, end: i32 = i32.MAX_VALUE): String {\n var len: isize = this.length;\n var finalStart = min(max(start, 0), len);\n var finalEnd = min(max(end, 0), len);\n var fromPos = min(finalStart, finalEnd) << 1;\n var toPos = max(finalStart, finalEnd) << 1;\n var size = toPos - fromPos;\n if (!size) return changetype(\"\");\n if (!fromPos && toPos == len << 1) return this;\n var out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + fromPos, size);\n return out;\n }\n\n trim(): String {\n var len = this.length;\n var size: usize = len << 1;\n while (size && isSpace(load(changetype(this) + size - 2))) {\n size -= 2;\n }\n var offset: usize = 0;\n while (offset < size && isSpace(load(changetype(this) + offset))) {\n offset += 2; size -= 2;\n }\n if (!size) return changetype(\"\");\n if (!offset && size == len << 1) return this;\n var out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + offset, size);\n return out;\n }\n\n @inline\n trimLeft(): String {\n return this.trimStart();\n }\n\n @inline\n trimRight(): String {\n return this.trimEnd();\n }\n\n trimStart(): String {\n var size = this.length << 1;\n var offset: usize = 0;\n while (offset < size && isSpace(load(changetype(this) + offset))) {\n offset += 2;\n }\n if (!offset) return this;\n size -= offset;\n if (!size) return changetype(\"\");\n var out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + offset, size);\n return out;\n }\n\n trimEnd(): String {\n var originalSize = this.length << 1;\n var size = originalSize;\n while (size && isSpace(load(changetype(this) + size - 2))) {\n size -= 2;\n }\n if (!size) return changetype(\"\");\n if (size == originalSize) return this;\n var out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this), size);\n return out;\n }\n\n padStart(length: i32, pad: string = \" \"): String {\n var thisSize = this.length << 1;\n var targetSize = length << 1;\n var padSize = pad.length << 1;\n if (targetSize < thisSize || !padSize) return this;\n var prependSize = targetSize - thisSize;\n var out = changetype(__new(targetSize, idof()));\n if (prependSize > padSize) {\n let repeatCount = (prependSize - 2) / padSize;\n let restBase = repeatCount * padSize;\n let restSize = prependSize - restBase;\n memory.repeat(changetype(out), changetype(pad), padSize, repeatCount);\n memory.copy(changetype(out) + restBase, changetype(pad), restSize);\n } else {\n memory.copy(changetype(out), changetype(pad), prependSize);\n }\n memory.copy(changetype(out) + prependSize, changetype(this), thisSize);\n return out;\n }\n\n padEnd(length: i32, pad: string = \" \"): String {\n var thisSize = this.length << 1;\n var targetSize = length << 1;\n var padSize = pad.length << 1;\n if (targetSize < thisSize || !padSize) return this;\n var appendSize = targetSize - thisSize;\n var out = changetype(__new(targetSize, idof()));\n memory.copy(changetype(out), changetype(this), thisSize);\n if (appendSize > padSize) {\n let repeatCount = (appendSize - 2) / padSize;\n let restBase = repeatCount * padSize;\n let restSize = appendSize - restBase;\n memory.repeat(changetype(out) + thisSize, changetype(pad), padSize, repeatCount);\n memory.copy(changetype(out) + thisSize + restBase, changetype(pad), restSize);\n } else {\n memory.copy(changetype(out) + thisSize, changetype(pad), appendSize);\n }\n return out;\n }\n\n repeat(count: i32 = 0): String {\n var length = this.length;\n\n // Most browsers can't handle strings 1 << 28 chars or longer\n if (count < 0 || length * count > (1 << 28)) {\n throw new RangeError(E_INVALIDLENGTH);\n }\n\n if (count == 0 || !length) return changetype(\"\");\n if (count == 1) return this;\n var out = changetype(__new((length * count) << 1, idof()));\n memory.repeat(changetype(out), changetype(this), length << 1, count);\n return out;\n }\n\n replace(search: String, replacement: String): String {\n var len: usize = this.length;\n var slen: usize = search.length;\n if (len <= slen) {\n return len < slen ? this : select(replacement, this, search == this);\n }\n var index: isize = this.indexOf(search);\n if (~index) {\n let rlen: usize = replacement.length;\n len -= slen;\n let olen = len + rlen;\n if (olen) {\n let out = changetype(__new(olen << 1, idof()));\n memory.copy(changetype(out), changetype(this), index << 1);\n memory.copy(\n changetype(out) + (index << 1),\n changetype(replacement),\n rlen << 1\n );\n memory.copy(\n changetype(out) + ((index + rlen) << 1),\n changetype(this) + ((index + slen) << 1),\n (len - index) << 1\n );\n return out;\n }\n }\n return this;\n }\n\n replaceAll(search: String, replacement: String): String {\n var thisLen: usize = this.length;\n var searchLen: usize = search.length;\n if (thisLen <= searchLen) {\n return thisLen < searchLen\n ? this\n : select(replacement, this, search == this);\n }\n var replaceLen: usize = replacement.length;\n if (!searchLen) {\n if (!replaceLen) return this;\n // Special case: 'abc'.replaceAll('', '-') -> '-a-b-c-'\n let out = changetype(__new((thisLen + (thisLen + 1) * replaceLen) << 1, idof()));\n memory.copy(changetype(out), changetype(replacement), replaceLen << 1);\n let offset = replaceLen;\n for (let i: usize = 0; i < thisLen; ++i) {\n store(\n changetype(out) + (offset++ << 1),\n load(changetype(this) + (i << 1))\n );\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(replacement),\n replaceLen << 1\n );\n offset += replaceLen;\n }\n return out;\n }\n var prev: isize = 0, next: isize = 0;\n if (searchLen == replaceLen) {\n // Fast path when search and replacement have same length\n let outSize = thisLen << 1;\n let out = changetype(__new(outSize, idof()));\n memory.copy(changetype(out), changetype(this), outSize);\n while (~(next = this.indexOf(search, prev))) {\n memory.copy(changetype(out) + (next << 1), changetype(replacement), replaceLen << 1);\n prev = next + searchLen;\n }\n return out;\n }\n var out: String | null = null, offset: usize = 0, outSize = thisLen;\n while (~(next = this.indexOf(search, prev))) {\n if (!out) out = changetype(__new(thisLen << 1, idof()));\n let chunk = next - prev;\n if (offset + chunk + replaceLen > outSize) {\n outSize <<= 1;\n out = changetype(__renew(changetype(out), outSize << 1));\n }\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(this) + (prev << 1),\n chunk << 1\n );\n offset += chunk;\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(replacement),\n replaceLen << 1\n );\n offset += replaceLen;\n prev = next + searchLen;\n }\n if (out) {\n let rest = thisLen - prev;\n if (offset + rest > outSize) {\n outSize <<= 1;\n out = changetype(__renew(changetype(out), outSize << 1));\n }\n if (rest) {\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(this) + (prev << 1),\n rest << 1\n );\n }\n rest += offset;\n if (outSize > rest) {\n out = changetype(__renew(changetype(out), rest << 1));\n }\n return out;\n }\n return this;\n }\n\n slice(start: i32, end: i32 = i32.MAX_VALUE): String {\n var len = this.length;\n start = start < 0 ? max(start + len, 0) : min(start, len);\n end = end < 0 ? max(end + len, 0) : min(end, len);\n len = end - start;\n if (len <= 0) return changetype(\"\");\n var out = changetype(__new(len << 1, idof()));\n memory.copy(changetype(out), changetype(this) + (start << 1), len << 1);\n return out;\n }\n\n split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] {\n if (!limit) return changetype(__newArray(0, alignof(), idof>()));\n if (separator === null) return [this];\n var length: isize = this.length;\n var sepLen = separator.length;\n if (limit < 0) limit = i32.MAX_VALUE;\n if (!sepLen) {\n if (!length) return changetype(__newArray(0, alignof(), idof>()));\n // split by chars\n length = min(length, limit);\n let result = changetype(__newArray(length, alignof(), idof>()));\n // @ts-ignore: cast\n let resultStart = result.dataStart as usize;\n for (let i: isize = 0; i < length; ++i) {\n let charStr = changetype(__new(2, idof()));\n store(changetype(charStr), load(changetype(this) + (i << 1)));\n store(resultStart + (i << alignof()), changetype(charStr)); // result[i] = charStr\n __link(changetype(result), changetype(charStr), true);\n }\n return result;\n } else if (!length) {\n let result = changetype(__newArray(1, alignof(), idof>()));\n // @ts-ignore: cast\n store(result.dataStart as usize, changetype(\"\")); // static \"\"\n return result;\n }\n var result = changetype(__newArray(0, alignof(), idof>()));\n var end = 0, start = 0, i = 0;\n while (~(end = this.indexOf(separator, start))) {\n let len = end - start;\n if (len > 0) {\n let out = changetype(__new(len << 1, idof()));\n memory.copy(changetype(out), changetype(this) + (start << 1), len << 1);\n result.push(out);\n } else {\n result.push(changetype(\"\"));\n }\n if (++i == limit) return result;\n start = end + sepLen;\n }\n if (!start) { // also means: loop above didn't do anything\n result.push(this);\n return result;\n }\n var len = length - start;\n if (len > 0) {\n let out = changetype(__new(len << 1, idof()));\n memory.copy(changetype(out), changetype(this) + (start << 1), len << 1);\n result.push(out);\n } else {\n result.push(changetype(\"\")); // static \"\"\n }\n return result;\n }\n\n toLowerCase(): String {\n var len = this.length;\n if (!len) return this;\n var codes = changetype(__new(len * 2 * 2, idof()));\n var j: usize = 0;\n for (let i: usize = 0; i < len; ++i, ++j) {\n let c = load(changetype(this) + (i << 1));\n if (isAscii(c)) {\n store(changetype(codes) + (j << 1), toLower8(c));\n } else {\n // check and read surrogate pair\n if ((c - 0xD7FF < 0xDC00 - 0xD7FF) && i < len - 1) {\n let c1 = load(changetype(this) + (i << 1), 2);\n if (c1 - 0xDBFF < 0xE000 - 0xDBFF) {\n let c0 = c;\n c = (((c & 0x03FF) << 10) | (c1 & 0x03FF)) + 0x10000;\n ++i;\n if (c >= 0x20000) {\n store(changetype(codes) + (j << 1), c0 | (c1 << 16));\n ++j;\n continue;\n }\n }\n }\n // check special casing for lower table. It has one ently so instead lookup we just inline this.\n if (c == 0x0130) {\n // 0x0130 -> [0x0069, 0x0307]\n store(changetype(codes) + (j << 1), (0x0307 << 16) | 0x0069);\n ++j;\n } else if (c == 0x03A3) { // 'Σ'\n // Σ maps to σ but except at the end of a word where it maps to ς\n let sigma = 0x03C3; // σ\n if (len > 1 && isFinalSigma(changetype(this), i, len)) {\n sigma = 0x03C2; // ς\n }\n store(changetype(codes) + (j << 1), sigma);\n } else if (c - 0x24B6 <= 0x24CF - 0x24B6) {\n // Range 0x24B6 <= c <= 0x24CF not covered by casemap and require special early handling\n store(changetype(codes) + (j << 1), c + 26);\n } else {\n let code = casemap(c, 0) & 0x1FFFFF;\n if (code < 0x10000) {\n store(changetype(codes) + (j << 1), code);\n } else {\n // store as surrogare pair\n code -= 0x10000;\n let lo = (code >>> 10) | 0xD800;\n let hi = (code & 0x03FF) | 0xDC00;\n store(changetype(codes) + (j << 1), lo | (hi << 16));\n ++j;\n }\n }\n }\n }\n return changetype(__renew(changetype(codes), j << 1));\n }\n\n toUpperCase(): String {\n var len = this.length;\n if (!len) return this;\n var codes = changetype(__new(len * 3 * 2, idof()));\n var specialsPtr = changetype(SPECIALS_UPPER);\n var specialsLen = SPECIALS_UPPER.length;\n var j: usize = 0;\n for (let i: usize = 0; i < len; ++i, ++j) {\n let c = load(changetype(this) + (i << 1));\n if (isAscii(c)) {\n store(changetype(codes) + (j << 1), toUpper8(c));\n } else {\n // check and read surrogate pair\n if ((c - 0xD7FF < 0xDC00 - 0xD7FF) && i < len - 1) {\n let c1 = load(changetype(this) + (i << 1), 2);\n if (c1 - 0xDBFF < 0xE000 - 0xDBFF) {\n let c0 = c;\n c = (((c & 0x03FF) << 10) | (c1 & 0x03FF)) + 0x10000;\n ++i;\n if (c >= 0x20000) {\n store(changetype(codes) + (j << 1), c0 | (c1 << 16));\n ++j;\n continue;\n }\n }\n }\n // Range 0x24D0 <= c <= 0x24E9 not covered by casemap and require special early handling\n if (c - 0x24D0 <= 0x24E9 - 0x24D0) {\n // monkey patch\n store(changetype(codes) + (j << 1), c - 26);\n } else {\n let index: usize = -1;\n // Fast range check. See first and last rows in specialsUpper table\n if (c - 0x00DF <= 0xFB17 - 0x00DF) {\n index = bsearch(c, specialsPtr, specialsLen);\n }\n if (~index) {\n // load next 3 code points from row with `index` offset for specialsUpper table\n let ab = load(specialsPtr + (index << 1), 2);\n let cc = load(specialsPtr + (index << 1), 6);\n store(changetype(codes) + (j << 1), ab, 0);\n store(changetype(codes) + (j << 1), cc, 4);\n j += 1 + usize(cc != 0);\n } else {\n let code = casemap(c, 1) & 0x1FFFFF;\n if (code < 0x10000) {\n store(changetype(codes) + (j << 1), code);\n } else {\n // store as surrogare pair\n code -= 0x10000;\n let lo = (code >>> 10) | 0xD800;\n let hi = (code & 0x03FF) | 0xDC00;\n store(changetype(codes) + (j << 1), lo | (hi << 16));\n ++j;\n }\n }\n }\n }\n }\n return changetype(__renew(changetype(codes), j << 1));\n }\n\n toString(): String {\n return this;\n }\n}\n\n// @ts-ignore: nolib\nexport type string = String;\n\nexport function parseInt(str: string, radix: i32 = 0): f64 {\n return strtol(str, radix);\n}\n\nexport function parseFloat(str: string): f64 {\n return strtod(str);\n}\n\n// Encoding helpers\nexport namespace String {\n\n export namespace UTF8 {\n\n export const enum ErrorMode {\n WTF8,\n REPLACE,\n ERROR\n }\n\n export function byteLength(str: string, nullTerminated: bool = false): i32 {\n var strOff = changetype(str);\n var strEnd = strOff + changetype(changetype(str) - TOTAL_OVERHEAD).rtSize;\n var bufLen = i32(nullTerminated);\n while (strOff < strEnd) {\n let c1 = load(strOff);\n if (c1 < 128) {\n // @ts-ignore: cast\n if (nullTerminated & !c1) break;\n bufLen += 1;\n } else if (c1 < 2048) {\n bufLen += 2;\n } else {\n if ((c1 & 0xFC00) == 0xD800 && strOff + 2 < strEnd) {\n if ((load(strOff, 2) & 0xFC00) == 0xDC00) {\n bufLen += 4; strOff += 4;\n continue;\n }\n }\n bufLen += 3;\n }\n strOff += 2;\n }\n return bufLen;\n }\n\n export function encode(str: string, nullTerminated: bool = false, errorMode: ErrorMode = ErrorMode.WTF8): ArrayBuffer {\n var buf = changetype(__new(byteLength(str, nullTerminated), idof()));\n encodeUnsafe(changetype(str), str.length, changetype(buf), nullTerminated, errorMode);\n return buf;\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function encodeUnsafe(str: usize, len: i32, buf: usize, nullTerminated: bool = false, errorMode: ErrorMode = ErrorMode.WTF8): usize {\n var strEnd = str + (len << 1);\n var bufOff = buf;\n while (str < strEnd) {\n let c1 = load(str);\n if (c1 < 128) {\n store(bufOff, c1);\n bufOff++;\n } else if (c1 < 2048) {\n let b0 = c1 >> 6 | 192;\n let b1 = c1 & 63 | 128;\n store(bufOff, b1 << 8 | b0);\n bufOff += 2;\n } else {\n // D800: 11011 0 0000000000 Lead\n // DBFF: 11011 0 1111111111\n // DC00: 11011 1 0000000000 Trail\n // DFFF: 11011 1 1111111111\n // F800: 11111 0 0000000000 Mask\n // FC00: 11111 1 0000000000\n if ((c1 & 0xF800) == 0xD800) {\n if (c1 < 0xDC00 && str + 2 < strEnd) {\n let c2 = load(str, 2);\n if ((c2 & 0xFC00) == 0xDC00) {\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) | (c2 & 0x03FF);\n let b0 = c1 >> 18 | 240;\n let b1 = c1 >> 12 & 63 | 128;\n let b2 = c1 >> 6 & 63 | 128;\n let b3 = c1 & 63 | 128;\n store(bufOff, b3 << 24 | b2 << 16 | b1 << 8 | b0);\n bufOff += 4; str += 4;\n continue;\n }\n }\n if (errorMode != ErrorMode.WTF8) { // unlikely\n if (errorMode == ErrorMode.ERROR) throw new Error(E_UNPAIRED_SURROGATE);\n c1 = 0xFFFD;\n }\n }\n let b0 = c1 >> 12 | 224;\n let b1 = c1 >> 6 & 63 | 128;\n let b2 = c1 & 63 | 128;\n store(bufOff, b1 << 8 | b0);\n store(bufOff, b2, 2);\n bufOff += 3;\n }\n str += 2;\n }\n if (nullTerminated) {\n store(bufOff++, 0);\n }\n return bufOff - buf;\n }\n\n export function decode(buf: ArrayBuffer, nullTerminated: bool = false): String {\n return decodeUnsafe(changetype(buf), buf.byteLength, nullTerminated);\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function decodeUnsafe(buf: usize, len: usize, nullTerminated: bool = false): String {\n var bufOff = buf;\n var bufEnd = buf + len;\n assert(bufEnd >= bufOff); // guard wraparound\n var str = changetype(__new(len << 1, idof())); // max is one u16 char per u8 byte\n var strOff = changetype(str);\n while (bufOff < bufEnd) {\n let u0 = load(bufOff); ++bufOff;\n if (!(u0 & 128)) {\n // @ts-ignore: cast\n if (nullTerminated & !u0) break;\n store(strOff, u0);\n } else {\n if (bufEnd == bufOff) break;\n let u1 = load(bufOff) & 63; ++bufOff;\n if ((u0 & 224) == 192) {\n store(strOff, (u0 & 31) << 6 | u1);\n } else {\n if (bufEnd == bufOff) break;\n let u2 = load(bufOff) & 63; ++bufOff;\n if ((u0 & 240) == 224) {\n u0 = (u0 & 15) << 12 | u1 << 6 | u2;\n } else {\n if (bufEnd == bufOff) break;\n u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | load(bufOff) & 63;\n ++bufOff;\n }\n if (u0 < 0x10000) {\n store(strOff, u0);\n } else {\n u0 -= 0x10000;\n let lo = u0 >> 10 | 0xD800;\n let hi = (u0 & 0x03FF) | 0xDC00;\n store(strOff, lo | (hi << 16));\n strOff += 2;\n }\n }\n }\n strOff += 2;\n }\n return changetype(__renew(changetype(str), strOff - changetype(str)));\n }\n }\n\n export namespace UTF16 {\n\n export function byteLength(str: string): i32 {\n return changetype(changetype(str) - TOTAL_OVERHEAD).rtSize;\n }\n\n export function encode(str: string): ArrayBuffer {\n var buf = changetype(__new(byteLength(str), idof()));\n encodeUnsafe(changetype(str), str.length, changetype(buf));\n return buf;\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function encodeUnsafe(str: usize, len: i32, buf: usize): usize {\n var size = len << 1;\n memory.copy(buf, changetype(str), size);\n return size;\n }\n\n export function decode(buf: ArrayBuffer): String {\n return decodeUnsafe(changetype(buf), buf.byteLength);\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function decodeUnsafe(buf: usize, len: usize): String {\n var str = changetype(__new(len &= ~1, idof()));\n memory.copy(changetype(str), buf, len);\n return str;\n }\n }\n}\n\nexport class TemplateStringsArray extends Array {\n readonly raw: string[];\n}\n", + "symbol": "import { Map } from \"./map\";\n\n// @ts-ignore: decorator\n@lazy var stringToId: Map;\n\n// @ts-ignore: decorator\n@lazy var idToString: Map;\n\n// @ts-ignore: decorator\n@lazy var nextId: usize = 12; // Symbol.unscopables + 1\n\n@unmanaged @final abstract class _Symbol {\n\n // TODO: all of the following default symbols are unused currently yet add to\n // binary size if #toString becomes compiled. Ultimately we'll most likely want\n // to remove the unsupported ones and only keep what's actually supported.\n\n // @ts-ignore: decorator\n @lazy\n static readonly hasInstance: symbol = changetype(1);\n\n // @ts-ignore: decorator\n @lazy\n static readonly isConcatSpreadable: symbol = changetype(2);\n\n // @ts-ignore: decorator\n @lazy\n static readonly isRegExp: symbol = changetype(3);\n\n // @ts-ignore: decorator\n @lazy\n static readonly iterator: symbol = changetype(3);\n\n // @ts-ignore: decorator\n @lazy\n static readonly match: symbol = changetype(4);\n\n // @ts-ignore: decorator\n @lazy\n static readonly replace: symbol = changetype(5);\n\n // @ts-ignore: decorator\n @lazy\n static readonly search: symbol = changetype(6);\n\n // @ts-ignore: decorator\n @lazy\n static readonly species: symbol = changetype(7);\n\n // @ts-ignore: decorator\n @lazy\n static readonly split: symbol = changetype(8);\n\n // @ts-ignore: decorator\n @lazy\n static readonly toPrimitive: symbol = changetype(9);\n\n // @ts-ignore: decorator\n @lazy\n static readonly toStringTag: symbol = changetype(10);\n\n // @ts-ignore: decorator\n @lazy\n static readonly unscopables: symbol = changetype(11);\n\n static for(key: string): symbol {\n if (!stringToId) { stringToId = new Map(); idToString = new Map(); }\n else if (stringToId.has(key)) return changetype(stringToId.get(key));\n var id = nextId++;\n if (!id) unreachable(); // out of ids\n stringToId.set(key, id);\n idToString.set(id, key);\n return changetype(id);\n }\n\n static keyFor(sym: symbol): string | null {\n return idToString !== null && idToString.has(changetype(sym))\n ? idToString.get(changetype(sym))\n : null;\n }\n\n toString(): string {\n var id = changetype(this);\n var str = \"\";\n switch (id) {\n case 1: { str = \"hasInstance\"; break; }\n case 2: { str = \"isConcatSpreadable\"; break; }\n case 3: { str = \"isRegExp\"; break; }\n case 4: { str = \"match\"; break; }\n case 5: { str = \"replace\"; break; }\n case 6: { str = \"search\"; break; }\n case 7: { str = \"species\"; break; }\n case 8: { str = \"split\"; break; }\n case 9: { str = \"toPrimitive\"; break; }\n case 10: { str = \"toStringTag\"; break; }\n case 11: { str = \"unscopables\"; break; }\n default: {\n if (idToString !== null && idToString.has(id)) str = idToString.get(id);\n break;\n }\n }\n return \"Symbol(\" + str + \")\";\n }\n}\n\nexport function Symbol(description: string | null = null): symbol {\n var id = nextId++;\n if (!id) unreachable(); // out of ids\n return changetype(id);\n}\n\nexport type Symbol = _Symbol;\n\n// @ts-ignore: nolib\nexport type symbol = _Symbol;\n", + "table": "import { E_NOTIMPLEMENTED } from \"./util/error\";\n\nexport namespace table {\n\n export function copy(dst: u32, src: u32, n: u32): void {\n throw new Error(E_NOTIMPLEMENTED);\n }\n\n export function init(elementIndex: u32, srcOffset: u32, dstOffset: u32, n: u32): void {\n throw new Error(E_NOTIMPLEMENTED);\n }\n\n export function drop(elementIndex: u32): void {\n throw new Error(E_NOTIMPLEMENTED);\n }\n}\n", + "typedarray": "import { COMPARATOR, SORT } from \"./util/sort\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_NOTIMPLEMENTED } from \"./util/error\";\nimport { joinIntegerArray, joinFloatArray } from \"./util/string\";\nimport { REVERSE } from \"./util/bytes\";\nimport { idof } from \"./builtins\";\nimport { ArrayBufferView } from \"./arraybuffer\";\n\nexport class Int8Array extends ArrayBufferView {\n [key: number]: i8;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength;\n }\n\n @operator(\"[]\")\n private __get(index: i32): i8 {\n if (index >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + index);\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): i8 {\n return load(this.dataStart + index);\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: native): void {\n if (index >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + index, value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: native): void {\n store(this.dataStart + index, value);\n }\n\n at(index: i32): i8 {\n var len = this.byteLength;\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + index);\n }\n\n includes(searchElement: i8, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: i8, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: i8, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int8Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: i8, b: i8) => i32 = COMPARATOR()): Int8Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int8Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int8Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Int8Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: i8, index: i32, array: Int8Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: i8, index: i32, array: Int8Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: i8, index: i32, self: Int8Array) => i8): Int8Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: i8, index: i32, self: Int8Array) => bool): Int8Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: i8, index: i32, self: Int8Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: i8, index: i32, self: Int8Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: i8, index: i32, self: Int8Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: i8, index: i32, self: Int8Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: i8, index: i32, self: Int8Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n toString(): string {\n return this.join();\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Int8Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Uint8Array extends ArrayBufferView {\n [key: number]: u8;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength;\n }\n\n @operator(\"[]\")\n private __get(index: i32): u8 {\n if (index >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + index);\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): u8 {\n return load(this.dataStart + index);\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: native): void {\n if (index >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + index, value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: native): void {\n store(this.dataStart + index, value);\n }\n\n at(index: i32): u8 {\n var len = this.byteLength;\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + index);\n }\n\n includes(searchElement: u8, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: u8, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: u8, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: u8, b: u8) => i32 = COMPARATOR()): Uint8Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Uint8Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: u8, index: i32, array: Uint8Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: u8, index: i32, array: Uint8Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: u8, index: i32, self: Uint8Array) => u8): Uint8Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: u8, index: i32, self: Uint8Array) => bool): Uint8Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: u8, index: i32, self: Uint8Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: u8, index: i32, self: Uint8Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: u8, index: i32, self: Uint8Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: u8, index: i32, self: Uint8Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: u8, index: i32, self: Uint8Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Uint8Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Uint8ClampedArray extends ArrayBufferView {\n [key: number]: u8;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength;\n }\n\n @operator(\"[]\")\n private __get(index: i32): u8 {\n if (index >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + index);\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): u8 {\n return load(this.dataStart + index);\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: native): void {\n if (index >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + index, ~(value >> 31) & (((255 - value) >> 31) | value));\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: native): void {\n store(this.dataStart + index, ~(value >> 31) & (((255 - value) >> 31) | value));\n }\n\n at(index: i32): u8 {\n var len = this.byteLength;\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + index);\n }\n\n includes(searchElement: u8, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: u8, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: u8, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: u8, b: u8) => i32 = COMPARATOR()): Uint8ClampedArray {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray {\n return SLICE(this, begin, end);\n }\n\n subarray(start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray {\n return SUBARRAY(this, start, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Uint8ClampedArray {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: u8, index: i32, array: Uint8ClampedArray) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: u8, index: i32, array: Uint8ClampedArray) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: u8, index: i32, self: Uint8ClampedArray) => u8): Uint8ClampedArray {\n return MAP(this, fn);\n }\n\n filter(fn: (value: u8, index: i32, self: Uint8ClampedArray) => bool): Uint8ClampedArray {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: u8, index: i32, self: Uint8ClampedArray) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: u8, index: i32, self: Uint8ClampedArray) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: u8, index: i32, self: Uint8ClampedArray) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: u8, index: i32, self: Uint8ClampedArray) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: u8, index: i32, self: Uint8ClampedArray) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Uint8ClampedArray {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Int16Array extends ArrayBufferView {\n [key: number]: i16;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): i16 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): i16 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: native): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: native): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): i16 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: i16, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: i16, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: i16, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int16Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: i16, b: i16) => i32 = COMPARATOR()): Int16Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int16Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int16Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Int16Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: i16, index: i32, array: Int16Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: i16, index: i32, array: Int16Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: i16, index: i32, self: Int16Array) => i16): Int16Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: i16, index: i32, self: Int16Array) => bool): Int16Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: i16, index: i32, self: Int16Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: i16, index: i32, self: Int16Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: i16, index: i32, self: Int16Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: i16, index: i32, self: Int16Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: i16, index: i32, self: Int16Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Int16Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Uint16Array extends ArrayBufferView {\n [key: number]: u16;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): u16 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): u16 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: native): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: native): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): u16 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: u16, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: u16, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: u16, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint16Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: u16, b: u16) => i32 = COMPARATOR()): Uint16Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint16Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint16Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Uint16Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: u16, index: i32, array: Uint16Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: u16, index: i32, array: Uint16Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: u16, index: i32, self: Uint16Array) => u16): Uint16Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: u16, index: i32, self: Uint16Array) => bool): Uint16Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: u16, index: i32, self: Uint16Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: u16, index: i32, self: Uint16Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: u16, index: i32, self: Uint16Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: u16, index: i32, self: Uint16Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: u16, index: i32, self: Uint16Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Uint16Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Int32Array extends ArrayBufferView {\n [key: number]: i32;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): i32 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): i32 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: i32): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: i32): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): i32 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: i32, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: i32, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: i32, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int32Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: i32, b: i32) => i32 = COMPARATOR()): Int32Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int32Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int32Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Int32Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: i32, index: i32, array: Int32Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: i32, index: i32, array: Int32Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: i32, index: i32, self: Int32Array) => i32): Int32Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: i32, index: i32, self: Int32Array) => bool): Int32Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: i32, index: i32, self: Int32Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: i32, index: i32, self: Int32Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: i32, index: i32, self: Int32Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: i32, index: i32, self: Int32Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: i32, index: i32, self: Int32Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Int32Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Uint32Array extends ArrayBufferView {\n [key: number]: u32;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): u32 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): u32 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: u32): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: u32): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): u32 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: u32, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: u32, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: u32, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint32Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: u32, b: u32) => i32 = COMPARATOR()): Uint32Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint32Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint32Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Uint32Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: u32, index: i32, array: Uint32Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: u32, index: i32, array: Uint32Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: u32, index: i32, self: Uint32Array) => u32): Uint32Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: u32, index: i32, self: Uint32Array) => bool): Uint32Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: u32, index: i32, self: Uint32Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: u32, index: i32, self: Uint32Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: u32, index: i32, self: Uint32Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: u32, index: i32, self: Uint32Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: u32, index: i32, self: Uint32Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Uint32Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Int64Array extends ArrayBufferView {\n [key: number]: i64;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): i64 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): i64 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: i64): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: i64): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): i64 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: i64, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: i64, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: i64, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: i64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int64Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: i64, b: i64) => i32 = COMPARATOR()): Int64Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int64Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int64Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Int64Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: i64, index: i32, array: Int64Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: i64, index: i32, array: Int64Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: i64, index: i32, self: Int64Array) => i64): Int64Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: i64, index: i32, self: Int64Array) => bool): Int64Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: i64, index: i32, self: Int64Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: i64, index: i32, self: Int64Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: i64, index: i32, self: Int64Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: i64, index: i32, self: Int64Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: i64, index: i32, self: Int64Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Int64Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Uint64Array extends ArrayBufferView {\n [key: number]: u64;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): u64 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): u64 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: u64): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: u64): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): u64 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: u64, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: u64, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: u64, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: u64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint64Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: u64, b: u64) => i32 = COMPARATOR()): Uint64Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint64Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint64Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Uint64Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: u64, index: i32, array: Uint64Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: u64, index: i32, array: Uint64Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: u64, index: i32, self: Uint64Array) => u64): Uint64Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: u64, index: i32, self: Uint64Array) => bool): Uint64Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: u64, index: i32, self: Uint64Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: u64, index: i32, self: Uint64Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: u64, index: i32, self: Uint64Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: u64, index: i32, self: Uint64Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: u64, index: i32, self: Uint64Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Uint64Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Float32Array extends ArrayBufferView {\n [key: number]: f32;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): f32 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): f32 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: f32): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: f32): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): f32 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: f32, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: f32, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: f32, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: f32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float32Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: f32, b: f32) => i32 = COMPARATOR()): Float32Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Float32Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Float32Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Float32Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: f32, index: i32, array: Float32Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: f32, index: i32, array: Float32Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: f32, index: i32, self: Float32Array) => f32): Float32Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: f32, index: i32, self: Float32Array) => bool): Float32Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: f32, index: i32, self: Float32Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: f32, index: i32, self: Float32Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: f32, index: i32, self: Float32Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: f32, index: i32, self: Float32Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: f32, index: i32, self: Float32Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinFloatArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Float32Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Float64Array extends ArrayBufferView {\n [key: number]: f64;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): f64 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): f64 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: f64): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: f64): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): f64 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: f64, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: f64, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: f64, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: f64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float64Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: f64, b: f64) => i32 = COMPARATOR()): Float64Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Float64Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Float64Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Float64Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: f64, index: i32, array: Float64Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: f64, index: i32, array: Float64Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: f64, index: i32, self: Float64Array) => f64): Float64Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: f64, index: i32, self: Float64Array) => bool): Float64Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: f64, index: i32, self: Float64Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: f64, index: i32, self: Float64Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: f64, index: i32, self: Float64Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: f64, index: i32, self: Float64Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: f64, index: i32, self: Float64Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinFloatArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Float64Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction FILL(\n array: TArray,\n value: native,\n start: i32,\n end: i32\n): TArray {\n var ptr = array.dataStart;\n var len = array.length;\n start = start < 0 ? max(len + start, 0) : min(start, len);\n end = end < 0 ? max(len + end, 0) : min(end, len);\n if (sizeof() == 1) {\n if (start < end) memory.fill(ptr + start, value, (end - start));\n } else {\n for (; start < end; ++start) {\n store(ptr + (start << alignof()), value);\n }\n }\n return array;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction SLICE(\n array: TArray,\n start: i32,\n end: i32\n): TArray {\n var len = array.length;\n start = start < 0 ? max(start + len, 0) : min(start, len);\n end = end < 0 ? max(end + len, 0) : min(end , len);\n len = max(end - start, 0);\n var slice = instantiate(len);\n memory.copy(\n slice.dataStart,\n array.dataStart + (start << alignof()),\n len << alignof()\n );\n return slice;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction SUBARRAY(\n array: TArray,\n begin: i32,\n end: i32\n): TArray {\n var len = array.length;\n begin = begin < 0 ? max(len + begin, 0) : min(begin, len);\n end = end < 0 ? max(len + end, 0) : min(end, len);\n end = max(end, begin);\n\n var out = changetype(__new(offsetof(), idof()));\n var buf = changetype(array.buffer);\n store(changetype(out), buf, offsetof(\"buffer\"));\n __link(changetype(out), buf, false);\n store(changetype(out), array.dataStart + (begin << alignof()), offsetof(\"dataStart\"));\n store(changetype(out), (end - begin) << alignof(), offsetof(\"byteLength\"));\n return out;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction COPY_WITHIN(\n array: TArray,\n target: i32,\n start: i32,\n end: i32\n): TArray {\n var len = array.length;\n var ptr = array.dataStart;\n\n end = min(end, len);\n var to = target < 0 ? max(len + target, 0) : min(target, len);\n var from = start < 0 ? max(len + start, 0) : min(start, len);\n var last = end < 0 ? max(len + end, 0) : min(end, len);\n var count = min(last - from, len - to);\n\n memory.copy(\n ptr + (to << alignof()),\n ptr + (from << alignof()),\n count << alignof()\n );\n return array;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction REDUCE(\n array: TArray,\n fn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet,\n initialValue: TRet\n): TRet {\n var ptr = array.dataStart;\n for (let i = 0, k = array.length; i < k; i++) {\n initialValue = fn(initialValue, load(ptr + (i << alignof())), i, array);\n }\n return initialValue;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction REDUCE_RIGHT(\n array: TArray,\n fn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet,\n initialValue: TRet\n): TRet {\n var ptr = array.dataStart;\n for (let i = array.length - 1; i >= 0; i--) {\n initialValue = fn(initialValue, load(ptr + (i << alignof())), i, array);\n }\n return initialValue;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction MAP(\n array: TArray,\n fn: (value: T, index: i32, self: TArray) => T,\n): TArray {\n var len = array.length;\n var ptr = array.dataStart;\n\n var byteLength = len << alignof();\n var out = changetype(__new(offsetof(), idof()));\n var buf = changetype(__new(byteLength, idof()));\n for (let i = 0; i < len; i++) {\n store(\n changetype(buf) + (i << alignof()),\n fn(load(ptr + (i << alignof())), i, array)\n );\n }\n store(changetype(out), changetype(buf), offsetof(\"buffer\"));\n __link(changetype(out), changetype(buf), false);\n store(changetype(out), changetype(buf), offsetof(\"dataStart\"));\n store(changetype(out), byteLength, offsetof(\"byteLength\"));\n return out;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction FILTER(\n array: TArray,\n fn: (value: T, index: i32, self: TArray) => bool,\n): TArray {\n var len = array.length;\n var out = changetype(__new(offsetof(), idof()));\n var buf = changetype(__new(len << alignof(), idof()));\n var dataStart = array.dataStart;\n var j: usize = 0;\n for (let i = 0; i < len; i++) {\n let value = load(dataStart + (i << alignof()));\n if (fn(value, i, array)) {\n store(\n changetype(buf) + (j++ << alignof()),\n value\n );\n }\n }\n // shrink output buffer\n var byteLength = j << alignof();\n var data = __renew(changetype(buf), byteLength);\n store(changetype(out), data, offsetof(\"buffer\"));\n __link(changetype(out), data, false);\n store(changetype(out), byteLength, offsetof(\"byteLength\"));\n store(changetype(out), data, offsetof(\"dataStart\"));\n return out;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction FIND_INDEX(\n array: TArray,\n fn: (value: T, index: i32, array: TArray) => bool,\n): i32 {\n var ptr = array.dataStart;\n for (let i = 0, k = array.length; i < k; i++) {\n if (fn(load(ptr + (i << alignof())), i, array)) return i;\n }\n return -1;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction FIND_LAST_INDEX(\n array: TArray,\n fn: (value: T, index: i32, array: TArray) => bool,\n): i32 {\n var ptr = array.dataStart;\n for (let i = array.length - 1; i >= 0; --i) {\n if (fn(load(ptr + (i << alignof())), i, array)) return i;\n }\n return -1;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction INCLUDES(\n array: TArray,\n searchElement: T,\n fromIndex: i32,\n): bool {\n if (isFloat()) {\n let index: isize = fromIndex;\n let len: isize = array.length;\n if (len == 0 || index >= len) return false;\n if (index < 0) index = max(len + index, 0);\n let dataStart = array.dataStart;\n while (index < len) {\n let elem = load(dataStart + (index << alignof()));\n // @ts-ignore\n if (elem == searchElement || isNaN(elem) & isNaN(searchElement)) return true;\n ++index;\n }\n return false;\n } else {\n return INDEX_OF(array, searchElement, fromIndex) >= 0;\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction INDEX_OF(\n array: TArray,\n searchElement: T,\n fromIndex: i32,\n): i32 {\n var index: isize = fromIndex;\n var len: isize = array.length;\n if (len == 0 || index >= len) return -1;\n if (index < 0) index = max(len + index, 0);\n var dataStart = array.dataStart;\n while (index < len) {\n if (load(dataStart + (index << alignof())) == searchElement) return index;\n ++index;\n }\n return -1;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction LAST_INDEX_OF(\n array: TArray,\n searchElement: T,\n fromIndex: i32,\n): i32 {\n var index: isize = fromIndex;\n var len: isize = array.length;\n if (len == 0) return -1;\n if (index < 0) index = len + index; // no need to clamp\n else if (index >= len) index = len - 1;\n var dataStart = array.dataStart;\n while (index >= 0) {\n if (load(dataStart + (index << alignof())) == searchElement) return index;\n --index;\n }\n return -1;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction SOME(\n array: TArray,\n fn: (value: T, index: i32, array: TArray) => bool,\n): bool {\n var ptr = array.dataStart;\n for (let i = 0, k = array.length; i < k; i++) {\n if (fn(load(ptr + (i << alignof())), i, array)) return true;\n }\n return false;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction EVERY(\n array: TArray,\n fn: (value: T, index: i32, array: TArray) => bool,\n): bool {\n var ptr = array.dataStart;\n for (let i = 0, k = array.length; i < k; i++) {\n if (fn(load(ptr + (i << alignof())), i, array)) continue;\n return false;\n }\n return true;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction FOREACH(\n array: TArray,\n fn: (value: T, index: i32, array: TArray) => void,\n): void {\n var ptr = array.dataStart;\n for (let i = 0, k = array.length; i < k; i++) {\n fn(load(ptr + (i << alignof())), i, array);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction WRAP(\n buffer: ArrayBuffer,\n byteOffset: i32 = 0,\n len: i32 = -1\n): TArray {\n var byteLength: i32;\n var bufferByteLength = buffer.byteLength;\n const mask: u32 = sizeof() - 1;\n if (i32(byteOffset > bufferByteLength) | (byteOffset & mask)) {\n throw new RangeError(E_INDEXOUTOFRANGE);\n }\n if (len < 0) {\n if (len == -1) {\n if (bufferByteLength & mask) {\n throw new RangeError(E_INVALIDLENGTH);\n }\n byteLength = bufferByteLength - byteOffset;\n } else {\n throw new RangeError(E_INVALIDLENGTH);\n }\n } else {\n byteLength = len << alignof();\n if (byteOffset + byteLength > bufferByteLength) {\n throw new RangeError(E_INVALIDLENGTH);\n }\n }\n var out = changetype(__new(offsetof(), idof()));\n store(changetype(out), changetype(buffer), offsetof(\"buffer\"));\n __link(changetype(out), changetype(buffer), false);\n store(changetype(out), byteLength, offsetof(\"byteLength\"));\n store(changetype(out), changetype(buffer) + byteOffset, offsetof(\"dataStart\"));\n return out;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction SET(\n target: TArray,\n source: UArray,\n offset: i32 = 0\n): void {\n // need to assert at compile time that U is not a reference or a function\n if (isReference()) {\n ERROR(E_NOTIMPLEMENTED);\n }\n\n // Uncaught RangeError: offset is out of bounds\n if (offset < 0) throw new RangeError(E_INDEXOUTOFRANGE);\n if (source.length + offset > target.length) throw new RangeError(E_INDEXOUTOFRANGE);\n\n // if the types align and match, use memory.copy() instead of manual loop\n if (isInteger() == isInteger() && alignof() == alignof() &&\n !(target instanceof Uint8ClampedArray && isSigned())) {\n memory.copy(\n target.dataStart + (offset << alignof()),\n source.dataStart,\n source.byteLength\n );\n } else {\n let targetDataStart = target.dataStart + (offset << alignof());\n let sourceDataStart = source.dataStart;\n let count = source.length;\n for (let i = 0; i < count; i++) {\n // if TArray is Uint8ClampedArray, then values must be clamped\n if (target instanceof Uint8ClampedArray) {\n if (isFloat()) {\n let value = load(sourceDataStart + (i << alignof()));\n store(\n targetDataStart + (i << alignof()),\n isFinite(value) ? max(0, min(255, value)) : 0\n );\n } else {\n let value = load(sourceDataStart + (i << alignof()));\n if (!isSigned()) {\n store(\n targetDataStart + (i << alignof()),\n // @ts-ignore: cast to T is valid for numeric types here\n min(255, value)\n );\n } else if (sizeof() <= 4) {\n store(\n targetDataStart + (i << alignof()),\n // @ts-ignore: cast to T is valid for numeric types here\n ~(value >> 31) & (((255 - value) >> 31) | value)\n );\n } else {\n store(\n targetDataStart + (i << alignof()),\n // @ts-ignore: cast to T is valid for numeric types here\n ~(value >> 63) & (((255 - value) >> 63) | value)\n );\n }\n }\n // if U is a float, then casting float to int must include a finite check\n } else if (isFloat() && !isFloat()) {\n let value = load(sourceDataStart + (i << alignof()));\n // @ts-ignore: cast to T is valid for numeric types here\n store(targetDataStart + (i << alignof()), isFinite(value) ? value : 0);\n } else if (isFloat() && !isFloat()) {\n // @ts-ignore: In this case the conversion is required\n store(targetDataStart + (i << alignof()), load(sourceDataStart + (i << alignof())));\n } else {\n store(targetDataStart + (i << alignof()), load(sourceDataStart + (i << alignof())));\n }\n }\n }\n}\n", + "uri": "import { encode, decode, URI_UNSAFE, URL_UNSAFE } from \"./util/uri\";\n\nexport function encodeURI(str: string): string {\n return changetype(encode(changetype(str), str.length, URI_UNSAFE));\n}\n\nexport function decodeURI(str: string): string {\n return changetype(decode(changetype(str), str.length, false));\n}\n\nexport function encodeURIComponent(str: string): string {\n return changetype(encode(changetype(str), str.length, URL_UNSAFE));\n}\n\nexport function decodeURIComponent(str: string): string {\n return changetype(decode(changetype(str), str.length, true));\n}\n", + "util/bytes": "export function REVERSE(ptr: usize, len: usize): void {\n if (len > 1) {\n let\n i: usize = 0,\n tail: usize,\n hlen: usize = len >> 1;\n\n if (ASC_SHRINK_LEVEL < 1) {\n if (sizeof() == 1) {\n // TODO: Decide later: Does we need this fast path cases?\n //\n // if (len == 4) {\n // store(ptr, bswap(load(ptr)));\n // return;\n // }\n // if (len == 8) {\n // store(ptr, bswap(load(ptr)));\n // return;\n // }\n tail = len - 8;\n while (i + 7 < hlen) {\n let front = ptr + i;\n let back = ptr + tail - i;\n let temp = bswap(load(front));\n store(front, bswap(load(back)));\n store(back, temp);\n i += 8;\n }\n }\n\n if (sizeof() == 2) {\n tail = len - 2;\n while (i + 1 < hlen) {\n let front = ptr + (i << 1);\n let back = ptr + (tail - i << 1);\n let temp = rotr(load(back), 16);\n store(back, rotr(load(front), 16));\n store(front, temp);\n i += 2;\n }\n }\n }\n\n tail = len - 1;\n while (i < hlen) {\n let front = ptr + (i << alignof());\n let back = ptr + (tail - i << alignof());\n let temp = load(front);\n store(front, load(back));\n store(back, temp);\n i++;\n }\n }\n}\n", + "util/casemap": "// Total tables size: ~5 kb (usually compressed to ~4 kb)\n// See: https://git.musl-libc.org/cgit/musl/tree/src/ctype/casemap.h\n\n// @ts-ignore: decorator\n@lazy @inline const TAB = memory.data([\n 7, 8, 9, 10, 11, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 13, 6, 6, 14, 6, 6, 6, 6, 6, 6, 6, 6, 15, 16, 17, 18,\n 6, 19, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 20, 21, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 22, 23, 6, 6, 6, 24, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 25,\n 6, 6, 6, 6, 26, 6, 6, 6, 6, 6, 6, 6, 27, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 28, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 29, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 30, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,\n 43, 43, 43, 43, 43, 43, 43, 43, 1, 0, 84, 86, 86, 86, 86, 86,\n 86, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 43, 43, 43, 43, 43, 43,\n 43, 7, 43, 43, 91, 86, 86, 86, 86, 86, 86, 86, 74, 86, 86, 5,\n 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80,\n 36, 80, 121, 49, 80, 49, 80, 49, 56, 80, 49, 80, 49, 80, 49, 80,\n 49, 80, 49, 80, 49, 80, 49, 80, 78, 49, 2, 78, 13, 13, 78, 3,\n 78, 0, 36, 110, 0, 78, 49, 38, 110, 81, 78, 36, 80, 78, 57, 20,\n 129, 27, 29, 29, 83, 49, 80, 49, 80, 13, 49, 80, 49, 80, 49, 80,\n 27, 83, 36, 80, 49, 2, 92, 123, 92, 123, 92, 123, 92, 123, 92, 123,\n 20, 121, 92, 123, 92, 123, 92, 45, 43, 73, 3, 72, 3, 120, 92, 123,\n 20, 0, 150, 10, 1, 43, 40, 6, 6, 0, 42, 6, 42, 42, 43, 7,\n 187, 181, 43, 30, 0, 43, 7, 43, 43, 43, 1, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 1, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 205, 70, 205, 43, 0, 37, 43, 7, 1, 6, 1, 85, 86, 86, 86,\n 86, 86, 85, 86, 86, 2, 36, 129, 129, 129, 129, 129, 21, 129, 129, 129,\n 0, 0, 43, 0, 178, 209, 178, 209, 178, 209, 178, 209, 0, 0, 205, 204,\n 1, 0, 215, 215, 215, 215, 215, 131, 129, 129, 129, 129, 129, 129, 129, 129,\n 129, 129, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 28, 0, 0, 0,\n 0, 0, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 2, 0, 0,\n 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80,\n 49, 80, 78, 49, 80, 49, 80, 78, 49, 80, 49, 80, 49, 80, 49, 80,\n 49, 80, 49, 80, 49, 80, 49, 2, 135, 166, 135, 166, 135, 166, 135, 166,\n 135, 166, 135, 166, 135, 166, 135, 166, 42, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 0, 0, 0, 84, 86, 86, 86, 86, 86, 86, 86,\n 86, 86, 86, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 84, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,\n 12, 0, 12, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 7, 42, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 86, 86, 108, 129, 21, 0, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 7, 108, 3, 65, 43, 43, 86, 86, 86, 86, 86, 86,\n 86, 86, 86, 86, 86, 86, 86, 86, 44, 86, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 1,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 12, 108, 0, 0, 0, 0, 0, 6,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37,\n 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37,\n 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37,\n 6, 37, 6, 37, 6, 37, 6, 37, 86, 122, 158, 38, 6, 37, 6, 37,\n 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37,\n 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 1, 43, 43, 79, 86,\n 86, 44, 43, 127, 86, 86, 57, 43, 43, 85, 86, 86, 43, 43, 79, 86,\n 86, 44, 43, 127, 86, 86, 129, 55, 117, 91, 123, 92, 43, 43, 79, 86,\n 86, 2, 172, 4, 0, 0, 57, 43, 43, 85, 86, 86, 43, 43, 79, 86,\n 86, 44, 43, 43, 86, 86, 50, 19, 129, 87, 0, 111, 129, 126, 201, 215,\n 126, 45, 129, 129, 14, 126, 57, 127, 111, 87, 0, 129, 129, 126, 21, 0,\n 126, 3, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 7, 43,\n 36, 43, 151, 43, 43, 43, 43, 43, 43, 43, 43, 43, 42, 43, 43, 43,\n 43, 43, 86, 86, 86, 86, 86, 128, 129, 129, 129, 129, 57, 187, 42, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 1, 129, 129, 129, 129, 129, 129, 129, 129,\n 129, 129, 129, 129, 129, 129, 129, 201, 172, 172, 172, 172, 172, 172, 172, 172,\n 172, 172, 172, 172, 172, 172, 172, 208, 13, 0, 78, 49, 2, 180, 193, 193,\n 215, 215, 36, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80,\n 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80,\n 49, 80, 49, 80, 215, 215, 83, 193, 71, 212, 215, 215, 215, 5, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 7, 1, 0, 1, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 49, 80, 49, 80, 49, 80,\n 49, 80, 49, 80, 49, 80, 49, 80, 13, 0, 0, 0, 0, 0, 36, 80,\n 49, 80, 49, 80, 49, 80, 49, 80, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 121, 92, 123, 92, 123, 79, 123, 92, 123, 92, 123,\n 92, 123, 92, 123, 92, 123, 92, 123, 92, 123, 92, 123, 92, 123, 92, 45,\n 43, 43, 121, 20, 92, 123, 92, 45, 121, 42, 92, 39, 92, 123, 92, 123,\n 92, 123, 164, 0, 10, 180, 92, 123, 92, 123, 79, 3, 120, 56, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 79, 45, 43, 43, 1,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 43, 43, 43, 43, 43, 43, 43, 43, 7, 0, 72, 86, 86, 86, 86,\n 86, 86, 86, 86, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 85, 86, 86, 86, 86, 86, 86,\n 86, 86, 86, 86, 86, 86, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 36, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 7, 0, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 7, 0, 0,\n 0, 0, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,\n 86, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 86, 86, 86, 86, 86, 86, 86, 86,\n 86, 86, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 86, 86,\n 86, 86, 86, 86, 86, 86, 86, 86, 14, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 85,\n 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 14, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const RULES = memory.data([\n 0x0, 0x2001, -0x2000, 0x1dbf00, 0x2e700, 0x7900,\n 0x2402, 0x101, -0x100, 0x0, 0x201, -0x200,\n -0xc6ff, -0xe800, -0x78ff, -0x12c00, 0xc300, 0xd201,\n 0xce01, 0xcd01, 0x4f01, 0xca01, 0xcb01, 0xcf01,\n 0x6100, 0xd301, 0xd101, 0xa300, 0xd501, 0x8200,\n 0xd601, 0xda01, 0xd901, 0xdb01, 0x3800, 0x3,\n -0x4f00, -0x60ff, -0x37ff, 0x242802, 0x0, 0x101,\n -0x100, -0xcd00, -0xda00, -0x81ff, 0x2a2b01, -0xa2ff,\n 0x2a2801, 0x2a3f00, -0xc2ff, 0x4501, 0x4701, 0x2a1f00,\n 0x2a1c00, 0x2a1e00, -0xd200, -0xce00, -0xca00, -0xcb00,\n 0xa54f00, 0xa54b00, -0xcf00, 0xa52800, 0xa54400, -0xd100,\n -0xd300, 0x29f700, 0xa54100, 0x29fd00, -0xd500, -0xd600,\n 0x29e700, 0xa54300, 0xa52a00, -0x4500, -0xd900, -0x4700,\n -0xdb00, 0xa51500, 0xa51200, 0x4c2402, 0x0, 0x2001,\n -0x2000, 0x101, -0x100, 0x5400, 0x7401, 0x2601,\n 0x2501, 0x4001, 0x3f01, -0x2600, -0x2500, -0x1f00,\n -0x4000, -0x3f00, 0x801, -0x3e00, -0x3900, -0x2f00,\n -0x3600, -0x800, -0x5600, -0x5000, 0x700, -0x7400,\n -0x3bff, -0x6000, -0x6ff, 0x701a02, 0x101, -0x100,\n 0x2001, -0x2000, 0x5001, 0xf01, -0xf00, 0x0,\n 0x3001, -0x3000, 0x101, -0x100, 0x0, 0xbc000,\n 0x1c6001, 0x0, 0x97d001, 0x801, -0x800, 0x8a0502,\n 0x0, -0xbbfff, -0x186200, 0x89c200, -0x182500, -0x186e00,\n -0x186d00, -0x186400, -0x186300, -0x185c00, 0x0, 0x8a3800,\n 0x8a0400, 0xee600, 0x101, -0x100, 0x0, -0x3b00,\n -0x1dbeff, 0x8f1d02, 0x800, -0x7ff, 0x0, 0x5600,\n -0x55ff, 0x4a00, 0x6400, 0x8000, 0x7000, 0x7e00,\n 0x900, -0x49ff, -0x8ff, -0x1c2500, -0x63ff, -0x6fff,\n -0x7fff, -0x7dff, 0xac0502, 0x0, 0x1001, -0x1000,\n 0x1c01, 0x101, -0x1d5cff, -0x20beff, -0x2045ff, -0x1c00,\n 0xb10b02, 0x101, -0x100, 0x3001, -0x3000, 0x0,\n -0x29f6ff, -0xee5ff, -0x29e6ff, -0x2a2b00, -0x2a2800, -0x2a1bff,\n -0x29fcff, -0x2a1eff, -0x2a1dff, -0x2a3eff, 0x0, -0x1c6000,\n 0x0, 0x101, -0x100, 0xbc0c02, 0x0, 0x101,\n -0x100, -0xa543ff, 0x3a001, -0x8a03ff, -0xa527ff, 0x3000,\n -0xa54eff, -0xa54aff, -0xa540ff, -0xa511ff, -0xa529ff, -0xa514ff,\n -0x2fff, -0xa542ff, -0x8a37ff, 0x0, -0x97d000, -0x3a000,\n 0x0, 0x2001, -0x2000, 0x0, 0x2801, -0x2800,\n 0x0, 0x4001, -0x4000, 0x0, 0x2001, -0x2000,\n 0x0, 0x2001, -0x2000, 0x0, 0x2201, -0x2200\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const RULE_BASES = memory.data([\n 0, 6, 39, 81, 111, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 124, 0, 0, 127, 0, 0, 0, 0, 0, 0, 0, 0, 131, 142, 146, 151,\n 0, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 196, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 198, 201, 0, 0, 0, 219, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 222,\n 0, 0, 0, 0, 225, 0, 0, 0, 0, 0, 0, 0, 228, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 231, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 237, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const EXCEPTIONS = memory.data([\n 48, 12, 49, 13, 120, 14, 127, 15,\n 128, 16, 129, 17, 134, 18, 137, 19,\n 138, 19, 142, 20, 143, 21, 144, 22,\n 147, 19, 148, 23, 149, 24, 150, 25,\n 151, 26, 154, 27, 156, 25, 157, 28,\n 158, 29, 159, 30, 166, 31, 169, 31,\n 174, 31, 177, 32, 178, 32, 183, 33,\n 191, 34, 197, 35, 200, 35, 203, 35,\n 221, 36, 242, 35, 246, 37, 247, 38,\n 32, 45, 58, 46, 61, 47, 62, 48,\n 63, 49, 64, 49, 67, 50, 68, 51,\n 69, 52, 80, 53, 81, 54, 82, 55,\n 83, 56, 84, 57, 89, 58, 91, 59,\n 92, 60, 97, 61, 99, 62, 101, 63,\n 102, 64, 104, 65, 105, 66, 106, 64,\n 107, 67, 108, 68, 111, 66, 113, 69,\n 114, 70, 117, 71, 125, 72, 130, 73,\n 135, 74, 137, 75, 138, 76, 139, 76,\n 140, 77, 146, 78, 157, 79, 158, 80,\n 69, 87, 123, 29, 124, 29, 125, 29,\n 127, 88, 134, 89, 136, 90, 137, 90,\n 138, 90, 140, 91, 142, 92, 143, 92,\n 172, 93, 173, 94, 174, 94, 175, 94,\n 194, 95, 204, 96, 205, 97, 206, 97,\n 207, 98, 208, 99, 209, 100, 213, 101,\n 214, 102, 215, 103, 240, 104, 241, 105,\n 242, 106, 243, 107, 244, 108, 245, 109,\n 249, 110, 253, 45, 254, 45, 255, 45,\n 80, 105, 81, 105, 82, 105, 83, 105,\n 84, 105, 85, 105, 86, 105, 87, 105,\n 88, 105, 89, 105, 90, 105, 91, 105,\n 92, 105, 93, 105, 94, 105, 95, 105,\n 130, 0, 131, 0, 132, 0, 133, 0,\n 134, 0, 135, 0, 136, 0, 137, 0,\n 192, 117, 207, 118, 128, 137, 129, 138,\n 130, 139, 133, 140, 134, 141, 112, 157,\n 113, 157, 118, 158, 119, 158, 120, 159,\n 121, 159, 122, 160, 123, 160, 124, 161,\n 125, 161, 179, 162, 186, 163, 187, 163,\n 188, 164, 190, 165, 195, 162, 204, 164,\n 218, 166, 219, 166, 229, 106, 234, 167,\n 235, 167, 236, 110, 243, 162, 248, 168,\n 249, 168, 250, 169, 251, 169, 252, 164,\n 38, 176, 42, 177, 43, 178, 78, 179,\n 132, 8, 98, 186, 99, 187, 100, 188,\n 101, 189, 102, 190, 109, 191, 110, 192,\n 111, 193, 112, 194, 126, 195, 127, 195,\n 125, 207, 141, 208, 148, 209, 171, 210,\n 172, 211, 173, 212, 176, 213, 177, 214,\n 178, 215, 196, 216, 197, 217, 198, 218\n]);\n\n/* Special Case Mappings\n * See: https://unicode.org/Public/UNIDATA/SpecialCasing.txt\n */\n\n/*\n@lazy @inline\nconst SPECIALS_LOWER: StaticArray = [\n 0x0130, 0x0069, 0x0307, 0x0000,\n];\n*/\n\n// @ts-ignore: decorator\n@lazy @inlne\nexport const SPECIALS_UPPER: StaticArray = [\n // String#toUpperCase needs .length\n 0x00DF, 0x0053, 0x0053, 0x0000,\n 0x0149, 0x02BC, 0x004E, 0x0000,\n 0x01F0, 0x004A, 0x030C, 0x0000,\n 0x0390, 0x0399, 0x0308, 0x0301,\n 0x03B0, 0x03A5, 0x0308, 0x0301,\n 0x0587, 0x0535, 0x0552, 0x0000,\n 0x1E96, 0x0048, 0x0331, 0x0000,\n 0x1E97, 0x0054, 0x0308, 0x0000,\n 0x1E98, 0x0057, 0x030A, 0x0000,\n 0x1E99, 0x0059, 0x030A, 0x0000,\n 0x1E9A, 0x0041, 0x02BE, 0x0000,\n 0x1F50, 0x03A5, 0x0313, 0x0000,\n 0x1F52, 0x03A5, 0x0313, 0x0300,\n 0x1F54, 0x03A5, 0x0313, 0x0301,\n 0x1F56, 0x03A5, 0x0313, 0x0342,\n 0x1F80, 0x1F08, 0x0399, 0x0000,\n 0x1F81, 0x1F09, 0x0399, 0x0000,\n 0x1F82, 0x1F0A, 0x0399, 0x0000,\n 0x1F83, 0x1F0B, 0x0399, 0x0000,\n 0x1F84, 0x1F0C, 0x0399, 0x0000,\n 0x1F85, 0x1F0D, 0x0399, 0x0000,\n 0x1F86, 0x1F0E, 0x0399, 0x0000,\n 0x1F87, 0x1F0F, 0x0399, 0x0000,\n 0x1F88, 0x1F08, 0x0399, 0x0000,\n 0x1F89, 0x1F09, 0x0399, 0x0000,\n 0x1F8A, 0x1F0A, 0x0399, 0x0000,\n 0x1F8B, 0x1F0B, 0x0399, 0x0000,\n 0x1F8C, 0x1F0C, 0x0399, 0x0000,\n 0x1F8D, 0x1F0D, 0x0399, 0x0000,\n 0x1F8E, 0x1F0E, 0x0399, 0x0000,\n 0x1F8F, 0x1F0F, 0x0399, 0x0000,\n 0x1F90, 0x1F28, 0x0399, 0x0000,\n 0x1F91, 0x1F29, 0x0399, 0x0000,\n 0x1F92, 0x1F2A, 0x0399, 0x0000,\n 0x1F93, 0x1F2B, 0x0399, 0x0000,\n 0x1F94, 0x1F2C, 0x0399, 0x0000,\n 0x1F95, 0x1F2D, 0x0399, 0x0000,\n 0x1F96, 0x1F2E, 0x0399, 0x0000,\n 0x1F97, 0x1F2F, 0x0399, 0x0000,\n 0x1F98, 0x1F28, 0x0399, 0x0000,\n 0x1F99, 0x1F29, 0x0399, 0x0000,\n 0x1F9A, 0x1F2A, 0x0399, 0x0000,\n 0x1F9B, 0x1F2B, 0x0399, 0x0000,\n 0x1F9C, 0x1F2C, 0x0399, 0x0000,\n 0x1F9D, 0x1F2D, 0x0399, 0x0000,\n 0x1F9E, 0x1F2E, 0x0399, 0x0000,\n 0x1F9F, 0x1F2F, 0x0399, 0x0000,\n 0x1FA0, 0x1F68, 0x0399, 0x0000,\n 0x1FA1, 0x1F69, 0x0399, 0x0000,\n 0x1FA2, 0x1F6A, 0x0399, 0x0000,\n 0x1FA3, 0x1F6B, 0x0399, 0x0000,\n 0x1FA4, 0x1F6C, 0x0399, 0x0000,\n 0x1FA5, 0x1F6D, 0x0399, 0x0000,\n 0x1FA6, 0x1F6E, 0x0399, 0x0000,\n 0x1FA7, 0x1F6F, 0x0399, 0x0000,\n 0x1FA8, 0x1F68, 0x0399, 0x0000,\n 0x1FA9, 0x1F69, 0x0399, 0x0000,\n 0x1FAA, 0x1F6A, 0x0399, 0x0000,\n 0x1FAB, 0x1F6B, 0x0399, 0x0000,\n 0x1FAC, 0x1F6C, 0x0399, 0x0000,\n 0x1FAD, 0x1F6D, 0x0399, 0x0000,\n 0x1FAE, 0x1F6E, 0x0399, 0x0000,\n 0x1FAF, 0x1F6F, 0x0399, 0x0000,\n 0x1FB2, 0x1FBA, 0x0399, 0x0000,\n 0x1FB3, 0x0391, 0x0399, 0x0000,\n 0x1FB4, 0x0386, 0x0399, 0x0000,\n 0x1FB6, 0x0391, 0x0342, 0x0000,\n 0x1FB7, 0x0391, 0x0342, 0x0399,\n 0x1FBC, 0x0391, 0x0399, 0x0000,\n 0x1FC2, 0x1FCA, 0x0399, 0x0000,\n 0x1FC3, 0x0397, 0x0399, 0x0000,\n 0x1FC4, 0x0389, 0x0399, 0x0000,\n 0x1FC6, 0x0397, 0x0342, 0x0000,\n 0x1FC7, 0x0397, 0x0342, 0x0399,\n 0x1FCC, 0x0397, 0x0399, 0x0000,\n 0x1FD2, 0x0399, 0x0308, 0x0300,\n 0x1FD3, 0x0399, 0x0308, 0x0301,\n 0x1FD6, 0x0399, 0x0342, 0x0000,\n 0x1FD7, 0x0399, 0x0308, 0x0342,\n 0x1FE2, 0x03A5, 0x0308, 0x0300,\n 0x1FE3, 0x03A5, 0x0308, 0x0301,\n 0x1FE4, 0x03A1, 0x0313, 0x0000,\n 0x1FE6, 0x03A5, 0x0342, 0x0000,\n 0x1FE7, 0x03A5, 0x0308, 0x0342,\n 0x1FF2, 0x1FFA, 0x0399, 0x0000,\n 0x1FF3, 0x03A9, 0x0399, 0x0000,\n 0x1FF4, 0x038F, 0x0399, 0x0000,\n 0x1FF6, 0x03A9, 0x0342, 0x0000,\n 0x1FF7, 0x03A9, 0x0342, 0x0399,\n 0x1FFC, 0x03A9, 0x0399, 0x0000,\n 0xFB00, 0x0046, 0x0046, 0x0000,\n 0xFB01, 0x0046, 0x0049, 0x0000,\n 0xFB02, 0x0046, 0x004C, 0x0000,\n 0xFB03, 0x0046, 0x0046, 0x0049,\n 0xFB04, 0x0046, 0x0046, 0x004C,\n 0xFB05, 0x0053, 0x0054, 0x0000,\n 0xFB06, 0x0053, 0x0054, 0x0000,\n 0xFB13, 0x0544, 0x0546, 0x0000,\n 0xFB14, 0x0544, 0x0535, 0x0000,\n 0xFB15, 0x0544, 0x053B, 0x0000,\n 0xFB16, 0x054E, 0x0546, 0x0000,\n 0xFB17, 0x0544, 0x053D, 0x0000\n];\n\n// @ts-ignore: decorator\n@lazy @inline const MT = memory.data([\n 2048, 342, 57\n]);\n\n// Special binary search routine for Special Casing Tables\n// @ts-ignore: decorator\n@inline\nexport function bsearch(key: u32, ptr: usize, max: i32): i32 {\n var min = 0;\n while (min <= max) {\n let mid = (min + max) >>> 3 << 2;\n let cmp = load(ptr + (mid << alignof())) - key;\n if (cmp == 0) return mid; // found\n else if (cmp >>> 31) min = mid + 4; // < 0\n else max = mid - 4; // > 0\n }\n return -1; // not found\n}\n\n// See: https://git.musl-libc.org/cgit/musl/tree/src/ctype/towctrans.c\nexport function casemap(c: u32, dir: i32): i32 {\n // if (c >= 0x20000) return c;\n var c0 = c as i32;\n var b = c >> 8;\n c &= 255;\n\n var x = c / 3;\n var y = c % 3;\n\n /* lookup entry in two-level base-6 table */\n // v = tab[(tab[b] as i32) * 86 + x] as u32;\n var v = load(TAB + load(TAB + b) * 86 + x);\n // v = (v * mt[y] >> 11) % 6;\n v = (v * load(MT + (y << alignof())) >> 11) % 6;\n /* use the bit vector out of the tables as an index into\n * a block-specific set of rules and decode the rule into\n * a type and a case-mapping delta. */\n // r = rules[(ruleBases[b] as u32) + v];\n var r = load(RULES + ((load(RULE_BASES + b) + v) << alignof()));\n var rt: u32 = r & 255;\n var rd: i32 = r >> 8;\n /* rules 0/1 are simple lower/upper case with a delta.\n * apply according to desired mapping direction. */\n if (rt < 2) return c0 + (rd & -(rt ^ dir));\n /* binary search. endpoints of the binary search for\n * this block are stored in the rule delta field. */\n var xn: u32 = rd & 0xff;\n var xb: u32 = rd >>> 8;\n while (xn) {\n let h = xn >> 1;\n // let t = exceptions[(xb + h) * 2 + 0] as u32;\n let t = load(EXCEPTIONS + (xb + h) * 2, 0);\n if (t == c) {\n // r = rules[exceptions[(xb + h) * 2 + 1]];\n r = load(RULES + (load(EXCEPTIONS + (xb + h) * 2, 1) << alignof()));\n rt = r & 255;\n rd = r >> 8;\n if (rt < 2) return c0 + (rd & -(rt ^ dir));\n /* Hard-coded for the four exceptional titlecase */\n return c0 + 1 - (dir << 1); // (dir ? -1 : 1);\n } else if (t > c) {\n xn = h;\n } else {\n xb += h;\n xn -= h;\n }\n }\n return c0;\n}\n", + "util/error": "// Common error messages for use across the standard library. Keeping error messages compact\n// and reusing them where possible ensures minimal static data in binaries.\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_INDEXOUTOFRANGE: string = \"Index out of range\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_VALUEOUTOFRANGE: string = \"Value out of range\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_INVALIDLENGTH: string = \"Invalid length\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_ILLEGALGENTYPE: string = \"Illegal generic type\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_EMPTYARRAY: string = \"Array is empty\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_HOLEYARRAY: string = \"Element type must be nullable if array is holey\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_NOTIMPLEMENTED: string = \"Not implemented\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_KEYNOTFOUND: string = \"Key does not exist\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_ALLOCATION_TOO_LARGE: string = \"Allocation too large\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_ALREADY_PINNED: string = \"Object already pinned\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_NOT_PINNED: string = \"Object is not pinned\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_URI_MALFORMED: string = \"URI malformed\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_INVALIDDATE: string = \"Invalid Date\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_UNPAIRED_SURROGATE: string = \"Unpaired surrogate\";\n", + "util/hash": "export function HASH(key: T): u32 {\n if (isString()) {\n return hashStr(changetype(key));\n } else if (isReference()) {\n if (sizeof() == 4) return hash32(changetype(key));\n if (sizeof() == 8) return hash64(changetype(key));\n } else if (isFloat()) {\n if (sizeof() == 4) return hash32(reinterpret(f32(key)));\n if (sizeof() == 8) return hash64(reinterpret(f64(key)));\n } else {\n if (sizeof() <= 4) return hash32(u32(key), sizeof());\n if (sizeof() == 8) return hash64(u64(key));\n }\n return unreachable();\n}\n\n// XXHash 32-bit as a starting point, see: https://cyan4973.github.io/xxHash\n\n// primes\n// @ts-ignore: decorator\n@inline const XXH32_P1: u32 = 2654435761;\n// @ts-ignore: decorator\n@inline const XXH32_P2: u32 = 2246822519;\n// @ts-ignore: decorator\n@inline const XXH32_P3: u32 = 3266489917;\n// @ts-ignore: decorator\n@inline const XXH32_P4: u32 = 668265263;\n// @ts-ignore: decorator\n@inline const XXH32_P5: u32 = 374761393;\n// @ts-ignore: decorator\n@inline const XXH32_SEED: u32 = 0;\n\n// @ts-ignore: decorator\n@inline\nfunction hash32(key: u32, len: u32 = 4): u32 {\n var h: u32 = XXH32_SEED + XXH32_P5 + len;\n h += key * XXH32_P3;\n h = rotl(h, 17) * XXH32_P4;\n h ^= h >> 15;\n h *= XXH32_P2;\n h ^= h >> 13;\n h *= XXH32_P3;\n h ^= h >> 16;\n return h;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction hash64(key: u64): u32 {\n var h: u32 = XXH32_SEED + XXH32_P5 + 8;\n h += key * XXH32_P3;\n h = rotl(h, 17) * XXH32_P4;\n h += (key >> 32) * XXH32_P3;\n h = rotl(h, 17) * XXH32_P4;\n h ^= h >> 15;\n h *= XXH32_P2;\n h ^= h >> 13;\n h *= XXH32_P3;\n h ^= h >> 16;\n return h;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction mix(h: u32, key: u32): u32 {\n return rotl(h + key * XXH32_P2, 13) * XXH32_P1;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction hashStr(key: string): u32 {\n if (key === null) return XXH32_SEED;\n\n var h: u32 = key.length << 1;\n var len: usize = h;\n var pos = changetype(key);\n\n if (len >= 16) {\n let s1 = XXH32_SEED + XXH32_P1 + XXH32_P2;\n let s2 = XXH32_SEED + XXH32_P2;\n let s3 = XXH32_SEED;\n let s4 = XXH32_SEED - XXH32_P1;\n\n let end = len + pos - 16;\n while (pos <= end) {\n s1 = mix(s1, load(pos ));\n s2 = mix(s2, load(pos, 4));\n s3 = mix(s3, load(pos, 8));\n s4 = mix(s4, load(pos, 12));\n pos += 16;\n }\n h += rotl(s1, 1) + rotl(s2, 7) + rotl(s3, 12) + rotl(s4, 18);\n } else {\n h += XXH32_SEED + XXH32_P5;\n }\n\n var end = changetype(key) + len - 4;\n while (pos <= end) {\n h += load(pos) * XXH32_P3;\n h = rotl(h, 17) * XXH32_P4;\n pos += 4;\n }\n\n end = changetype(key) + len;\n while (pos < end) {\n h += load(pos) * XXH32_P5;\n h = rotl(h, 11) * XXH32_P1;\n pos++;\n }\n\n h ^= h >> 15;\n h *= XXH32_P2;\n h ^= h >> 13;\n h *= XXH32_P3;\n h ^= h >> 16;\n return h;\n}\n", + "util/math": "//\n// Lookup data for exp2f\n//\n\n// @ts-ignore: decorator\n@inline const EXP2F_TABLE_BITS = 5;\n\n// @ts-ignore: decorator\n@lazy @inline const EXP2F_DATA_TAB = memory.data([\n // exp2f_data_tab[i] = uint(2^(i/N)) - (i << 52-BITS)\n // used for computing 2^(k/N) for an int |k| < 150 N as\n // double(tab[k%N] + (k << 52-BITS))\n 0x3FF0000000000000, 0x3FEFD9B0D3158574, 0x3FEFB5586CF9890F, 0x3FEF9301D0125B51,\n 0x3FEF72B83C7D517B, 0x3FEF54873168B9AA, 0x3FEF387A6E756238, 0x3FEF1E9DF51FDEE1,\n 0x3FEF06FE0A31B715, 0x3FEEF1A7373AA9CB, 0x3FEEDEA64C123422, 0x3FEECE086061892D,\n 0x3FEEBFDAD5362A27, 0x3FEEB42B569D4F82, 0x3FEEAB07DD485429, 0x3FEEA47EB03A5585,\n 0x3FEEA09E667F3BCD, 0x3FEE9F75E8EC5F74, 0x3FEEA11473EB0187, 0x3FEEA589994CCE13,\n 0x3FEEACE5422AA0DB, 0x3FEEB737B0CDC5E5, 0x3FEEC49182A3F090, 0x3FEED503B23E255D,\n 0x3FEEE89F995AD3AD, 0x3FEEFF76F2FB5E47, 0x3FEF199BDD85529C, 0x3FEF3720DCEF9069,\n 0x3FEF5818DCFBA487, 0x3FEF7C97337B9B5F, 0x3FEFA4AFA2A490DA, 0x3FEFD0765B6E4540\n]);\n\n// ULP error: 0.502 (nearest rounding.)\n// Relative error: 1.69 * 2^-34 in [-1/64, 1/64] (before rounding.)\n// Wrong count: 168353 (all nearest rounding wrong results with fma.)\n// @ts-ignore: decorator\n@inline\nexport function exp2f_lut(x: f32): f32 {\n const\n N = 1 << EXP2F_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000) / N, // 0x1.8p+52\n Ox127f = reinterpret(0x7F000000);\n\n const\n C0 = reinterpret(0x3FAC6AF84B912394), // 0x1.c6af84b912394p-5\n C1 = reinterpret(0x3FCEBFCE50FAC4F3), // 0x1.ebfce50fac4f3p-3\n C2 = reinterpret(0x3FE62E42FF0C52D6); // 0x1.62e42ff0c52d6p-1\n\n var xd = x;\n var ix = reinterpret(x);\n var ux = ix >> 20 & 0x7FF;\n if (ux >= 0x430) {\n // |x| >= 128 or x is nan.\n if (ix == 0xFF800000) return 0; // x == -Inf -> 0\n if (ux >= 0x7F8) return x + x; // x == Inf/NaN -> Inf/NaN\n if (x > 0) return x * Ox127f; // x > 0 -> HugeVal (Owerflow)\n if (x <= -150) return 0; // x <= -150 -> 0 (Underflow)\n }\n\n // x = k/N + r with r in [-1/(2N), 1/(2N)] and int k.\n var kd = xd + shift;\n var ki = reinterpret(kd);\n var r = xd - (kd - shift);\n var t: u64, y: f64, s: f64;\n\n // exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1)\n t = load(EXP2F_DATA_TAB + ((ki & N_MASK) << alignof()));\n t += ki << (52 - EXP2F_TABLE_BITS);\n s = reinterpret(t);\n y = C2 * r + 1;\n y += (C0 * r + C1) * (r * r);\n y *= s;\n\n return y;\n}\n\n// ULP error: 0.502 (nearest rounding.)\n// Relative error: 1.69 * 2^-34 in [-ln2/64, ln2/64] (before rounding.)\n// Wrong count: 170635 (all nearest rounding wrong results with fma.)\n// @ts-ignore: decorator\n@inline\nexport function expf_lut(x: f32): f32 {\n const\n N = 1 << EXP2F_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000), // 0x1.8p+52\n InvLn2N = reinterpret(0x3FF71547652B82FE) * N, // 0x1.71547652b82fep+0\n Ox1p127f = reinterpret(0x7F000000);\n\n const\n C0 = reinterpret(0x3FAC6AF84B912394) / N / N / N, // 0x1.c6af84b912394p-5\n C1 = reinterpret(0x3FCEBFCE50FAC4F3) / N / N, // 0x1.ebfce50fac4f3p-3\n C2 = reinterpret(0x3FE62E42FF0C52D6) / N; // 0x1.62e42ff0c52d6p-1\n\n var xd = x;\n var ix = reinterpret(x);\n var ux = ix >> 20 & 0x7FF;\n if (ux >= 0x42B) {\n // |x| >= 88 or x is nan.\n if (ix == 0xFF800000) return 0; // x == -Inf -> 0\n if (ux >= 0x7F8) return x + x; // x == Inf/NaN -> Inf/NaN\n if (x > reinterpret(0x42B17217)) return x * Ox1p127f; // x > log(0x1p128) ~= 88.72 -> HugeVal (Owerflow)\n if (x < reinterpret(0xC2CFF1B4)) return 0; // x < log(0x1p-150) ~= -103.97 -> 0 (Underflow)\n }\n\n // x*N/Ln2 = k + r with r in [-1/2, 1/2] and int k.\n var z = InvLn2N * xd;\n\n // Round and convert z to int, the result is in [-150*N, 128*N] and\n // ideally ties-to-even rule is used, otherwise the magnitude of r\n // can be bigger which gives larger approximation error.\n var kd = (z + shift);\n var ki = reinterpret(kd);\n var r = z - (kd - shift);\n var s: f64, y: f64, t: u64;\n\n // exp(x) = 2^(k/N) * 2^(r/N) ~= s * (C0*r^3 + C1*r^2 + C2*r + 1)\n t = load(EXP2F_DATA_TAB + ((ki & N_MASK) << alignof()));\n t += ki << (52 - EXP2F_TABLE_BITS);\n s = reinterpret(t);\n z = C0 * r + C1;\n y = C2 * r + 1;\n y += z * (r * r);\n y *= s;\n\n return y;\n}\n\n//\n// Lookup data for log2f\n//\n\n// @ts-ignore: decorator\n@inline const LOG2F_TABLE_BITS = 4;\n\n// @ts-ignore: decorator\n@lazy @inline const LOG2F_DATA_TAB = memory.data([\n reinterpret(0x3FF661EC79F8F3BE), reinterpret(0xBFDEFEC65B963019), // 0x1.661ec79f8f3bep+0, -0x1.efec65b963019p-2,\n reinterpret(0x3FF571ED4AAF883D), reinterpret(0xBFDB0B6832D4FCA4), // 0x1.571ed4aaf883dp+0, -0x1.b0b6832d4fca4p-2,\n reinterpret(0x3FF49539F0F010B0), reinterpret(0xBFD7418B0A1FB77B), // 0x1.49539f0f010bp+0 , -0x1.7418b0a1fb77bp-2,\n reinterpret(0x3FF3C995B0B80385), reinterpret(0xBFD39DE91A6DCF7B), // 0x1.3c995b0b80385p+0, -0x1.39de91a6dcf7bp-2,\n reinterpret(0x3FF30D190C8864A5), reinterpret(0xBFD01D9BF3F2B631), // 0x1.30d190c8864a5p+0, -0x1.01d9bf3f2b631p-2,\n reinterpret(0x3FF25E227B0B8EA0), reinterpret(0xBFC97C1D1B3B7AF0), // 0x1.25e227b0b8eap+0 , -0x1.97c1d1b3b7afp-3 ,\n reinterpret(0x3FF1BB4A4A1A343F), reinterpret(0xBFC2F9E393AF3C9F), // 0x1.1bb4a4a1a343fp+0, -0x1.2f9e393af3c9fp-3,\n reinterpret(0x3FF12358F08AE5BA), reinterpret(0xBFB960CBBF788D5C), // 0x1.12358f08ae5bap+0, -0x1.960cbbf788d5cp-4,\n reinterpret(0x3FF0953F419900A7), reinterpret(0xBFAA6F9DB6475FCE), // 0x1.0953f419900a7p+0, -0x1.a6f9db6475fcep-5,\n reinterpret(0x3FF0000000000000), 0, // 0x1p+0, 0x0,\n reinterpret(0x3FEE608CFD9A47AC), reinterpret(0x3FB338CA9F24F53D), // 0x1.e608cfd9a47acp-1, 0x1.338ca9f24f53dp-4,\n reinterpret(0x3FECA4B31F026AA0), reinterpret(0x3FC476A9543891BA), // 0x1.ca4b31f026aap-1 , 0x1.476a9543891bap-3,\n reinterpret(0x3FEB2036576AFCE6), reinterpret(0x3FCE840B4AC4E4D2), // 0x1.b2036576afce6p-1, 0x1.e840b4ac4e4d2p-3,\n reinterpret(0x3FE9C2D163A1AA2D), reinterpret(0x3FD40645F0C6651C), // 0x1.9c2d163a1aa2dp-1, 0x1.40645f0c6651cp-2,\n reinterpret(0x3FE886E6037841ED), reinterpret(0x3FD88E9C2C1B9FF8), // 0x1.886e6037841edp-1, 0x1.88e9c2c1b9ff8p-2,\n reinterpret(0x3FE767DCF5534862), reinterpret(0x3FDCE0A44EB17BCC) // 0x1.767dcf5534862p-1, 0x1.ce0a44eb17bccp-2\n]);\n\n// ULP error: 0.752 (nearest rounding.)\n// Relative error: 1.9 * 2^-26 (before rounding.)\n// @ts-ignore: decorator\n@inline\nexport function log2f_lut(x: f32): f32 {\n const\n N_MASK = (1 << LOG2F_TABLE_BITS) - 1,\n Ox1p23f = reinterpret(0x4B000000); // 0x1p23f\n\n const\n A0 = reinterpret(0xBFD712B6F70A7E4D), // -0x1.712b6f70a7e4dp-2\n A1 = reinterpret(0x3FDECABF496832E0), // 0x1.ecabf496832ep-2\n A2 = reinterpret(0xBFE715479FFAE3DE), // -0x1.715479ffae3dep-1\n A3 = reinterpret(0x3FF715475F35C8B8); // 0x1.715475f35c8b8p0\n\n var ux = reinterpret(x);\n // Fix sign of zero with downward rounding when x==1.\n // if (WANT_ROUNDING && predict_false(ix == 0x3f800000)) return 0;\n if (ux - 0x00800000 >= 0x7F800000 - 0x00800000) {\n // x < 0x1p-126 or inf or nan.\n if (ux * 2 == 0) return -Infinity;\n if (ux == 0x7F800000) return x; // log2(inf) == inf.\n if ((ux >> 31) || ux * 2 >= 0xFF000000) return (x - x) / (x - x);\n // x is subnormal, normalize it.\n ux = reinterpret(x * Ox1p23f);\n ux -= 23 << 23;\n }\n // x = 2^k z; where z is in range [OFF,2*OFF] and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n var tmp = ux - 0x3F330000;\n var i = (tmp >> (23 - LOG2F_TABLE_BITS)) & N_MASK;\n var top = tmp & 0xFF800000;\n var iz = ux - top;\n var k = tmp >> 23;\n\n var invc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 0 << alignof());\n var logc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 1 << alignof());\n var z = reinterpret(iz);\n\n // log2(x) = log1p(z/c-1)/ln2 + log2(c) + k\n var r = z * invc - 1;\n var y0 = logc + k;\n\n // Pipelined polynomial evaluation to approximate log1p(r)/ln2.\n var y = A1 * r + A2;\n var p = A3 * r + y0;\n var r2 = r * r;\n y += A0 * r2;\n y = y * r2 + p;\n\n return y;\n}\n\n//\n// Lookup data for logf. See: https://git.musl-libc.org/cgit/musl/tree/src/math/logf.c\n//\n\n// @ts-ignore: decorator\n@inline const LOGF_TABLE_BITS = 4;\n\n// @ts-ignore: decorator\n@lazy @inline const LOGF_DATA_TAB = memory.data([\n reinterpret(0x3FF661EC79F8F3BE), reinterpret(0xBFD57BF7808CAADE), // 0x1.661ec79f8f3bep+0, -0x1.57bf7808caadep-2,\n reinterpret(0x3FF571ED4AAF883D), reinterpret(0xBFD2BEF0A7C06DDB), // 0x1.571ed4aaf883dp+0, -0x1.2bef0a7c06ddbp-2,\n reinterpret(0x3FF49539F0F010B0), reinterpret(0xBFD01EAE7F513A67), // 0x1.49539f0f010bp+0 , -0x1.01eae7f513a67p-2,\n reinterpret(0x3FF3C995B0B80385), reinterpret(0xBFCB31D8A68224E9), // 0x1.3c995b0b80385p+0, -0x1.b31d8a68224e9p-3,\n reinterpret(0x3FF30D190C8864A5), reinterpret(0xBFC6574F0AC07758), // 0x1.30d190c8864a5p+0, -0x1.6574f0ac07758p-3,\n reinterpret(0x3FF25E227B0B8EA0), reinterpret(0xBFC1AA2BC79C8100), // 0x1.25e227b0b8eap+0 , -0x1.1aa2bc79c81p-3 ,\n reinterpret(0x3FF1BB4A4A1A343F), reinterpret(0xBFBA4E76CE8C0E5E), // 0x1.1bb4a4a1a343fp+0, -0x1.a4e76ce8c0e5ep-4,\n reinterpret(0x3FF12358F08AE5BA), reinterpret(0xBFB1973C5A611CCC), // 0x1.12358f08ae5bap+0, -0x1.1973c5a611cccp-4,\n reinterpret(0x3FF0953F419900A7), reinterpret(0xBFA252F438E10C1E), // 0x1.0953f419900a7p+0, -0x1.252f438e10c1ep-5,\n reinterpret(0x3FF0000000000000), 0, // 0x1p+0, 0,\n reinterpret(0x3FEE608CFD9A47AC), reinterpret(0x3FAAA5AA5DF25984), // 0x1.e608cfd9a47acp-1, 0x1.aa5aa5df25984p-5,\n reinterpret(0x3FECA4B31F026AA0), reinterpret(0x3FBC5E53AA362EB4), // 0x1.ca4b31f026aap-1 , 0x1.c5e53aa362eb4p-4,\n reinterpret(0x3FEB2036576AFCE6), reinterpret(0x3FC526E57720DB08), // 0x1.b2036576afce6p-1, 0x1.526e57720db08p-3,\n reinterpret(0x3FE9C2D163A1AA2D), reinterpret(0x3FCBC2860D224770), // 0x1.9c2d163a1aa2dp-1, 0x1.bc2860d22477p-3 ,\n reinterpret(0x3FE886E6037841ED), reinterpret(0x3FD1058BC8A07EE1), // 0x1.886e6037841edp-1, 0x1.1058bc8a07ee1p-2,\n reinterpret(0x3FE767DCF5534862), reinterpret(0x3FD4043057B6EE09) // 0x1.767dcf5534862p-1, 0x1.4043057b6ee09p-2\n]);\n\n// ULP error: 0.818 (nearest rounding.)\n// Relative error: 1.957 * 2^-26 (before rounding.)\n// @ts-ignore: decorator\n@inline\nexport function logf_lut(x: f32): f32 {\n const\n N_MASK = (1 << LOGF_TABLE_BITS) - 1,\n Ox1p23f = reinterpret(0x4B000000); // 0x1p23f\n\n const\n Ln2 = reinterpret(0x3FE62E42FEFA39EF), // 0x1.62e42fefa39efp-1;\n A0 = reinterpret(0xBFD00EA348B88334), // -0x1.00ea348b88334p-2\n A1 = reinterpret(0x3FD5575B0BE00B6A), // 0x1.5575b0be00b6ap-2\n A2 = reinterpret(0xBFDFFFFEF20A4123); // -0x1.ffffef20a4123p-2\n\n var ux = reinterpret(x);\n // Fix sign of zero with downward rounding when x==1.\n // if (WANT_ROUNDING && ux == 0x3f800000) return 0;\n if (ux - 0x00800000 >= 0x7F800000 - 0x00800000) {\n // x < 0x1p-126 or inf or nan.\n if ((ux << 1) == 0) return -Infinity;\n if (ux == 0x7F800000) return x; // log(inf) == inf.\n if ((ux >> 31) || (ux << 1) >= 0xFF000000) return (x - x) / (x - x);\n // x is subnormal, normalize it.\n ux = reinterpret(x * Ox1p23f);\n ux -= 23 << 23;\n }\n // x = 2^k z; where z is in range [OFF,2*OFF] and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n var tmp = ux - 0x3F330000;\n var i = (tmp >> (23 - LOGF_TABLE_BITS)) & N_MASK;\n var k = tmp >> 23;\n var iz = ux - (tmp & 0x1FF << 23);\n\n var invc = load(LOGF_DATA_TAB + (i << (1 + alignof())), 0 << alignof());\n var logc = load(LOGF_DATA_TAB + (i << (1 + alignof())), 1 << alignof());\n\n var z = reinterpret(iz);\n\n // log(x) = log1p(z/c-1) + log(c) + k*Ln2\n var r = z * invc - 1;\n var y0 = logc + k * Ln2;\n\n // Pipelined polynomial evaluation to approximate log1p(r).\n var r2 = r * r;\n var y = A1 * r + A2;\n y += A0 * r2;\n y = y * r2 + (y0 + r);\n\n return y;\n}\n\n//\n// Lookup data for powf. See: https://git.musl-libc.org/cgit/musl/tree/src/math/powf.c\n//\n\n// @ts-ignore: decorator\n@inline\nfunction zeroinfnanf(ux: u32): bool {\n return (ux << 1) - 1 >= (0x7f800000 << 1) - 1;\n}\n\n// Returns 0 if not int, 1 if odd int, 2 if even int. The argument is\n// the bit representation of a non-zero finite floating-point value.\n// @ts-ignore: decorator\n@inline\nfunction checkintf(iy: u32): i32 {\n var e = iy >> 23 & 0xFF;\n if (e < 0x7F ) return 0;\n if (e > 0x7F + 23) return 2;\n e = 1 << (0x7F + 23 - e);\n if (iy & (e - 1)) return 0;\n if (iy & e ) return 1;\n return 2;\n}\n\n// Subnormal input is normalized so ix has negative biased exponent.\n// Output is multiplied by N (POWF_SCALE) if TOINT_INTRINICS is set.\n// @ts-ignore: decorator\n@inline\nfunction log2f_inline(ux: u32): f64 {\n const N_MASK = (1 << LOG2F_TABLE_BITS) - 1;\n\n const\n A0 = reinterpret(0x3FD27616C9496E0B), // 0x1.27616c9496e0bp-2\n A1 = reinterpret(0xBFD71969A075C67A), // -0x1.71969a075c67ap-2\n A2 = reinterpret(0x3FDEC70A6CA7BADD), // 0x1.ec70a6ca7baddp-2\n A3 = reinterpret(0xBFE7154748BEF6C8), // -0x1.7154748bef6c8p-1\n A4 = reinterpret(0x3FF71547652AB82B); // 0x1.71547652ab82bp+0\n\n // x = 2^k z; where z is in range [OFF,2*OFF] and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n var tmp = ux - 0x3F330000;\n var i = ((tmp >> (23 - LOG2F_TABLE_BITS)) & N_MASK);\n var top = tmp & 0xFF800000;\n var uz = ux - top;\n var k = (top >> 23);\n\n var invc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 0 << alignof());\n var logc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 1 << alignof());\n var z = reinterpret(uz);\n\n // log2(x) = log1p(z/c-1)/ln2 + log2(c) + k\n var r = z * invc - 1;\n var y0 = logc + k;\n\n // Pipelined polynomial evaluation to approximate log1p(r)/ln2.\n var y = A0 * r + A1;\n var p = A2 * r + A3;\n var q = A4 * r + y0;\n\n r *= r;\n q += p * r;\n y = y * (r * r) + q;\n\n return y;\n}\n\n// The output of log2 and thus the input of exp2 is either scaled by N\n// (in case of fast toint intrinsics) or not. The unscaled xd must be\n// in [-1021,1023], sign_bias sets the sign of the result.\n// @ts-ignore: decorator\n@inline\nfunction exp2f_inline(xd: f64, signBias: u32): f32 {\n const\n N = 1 << EXP2F_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000) / N; // 0x1.8p+52\n\n const\n C0 = reinterpret(0x3FAC6AF84B912394), // 0x1.c6af84b912394p-5\n C1 = reinterpret(0x3FCEBFCE50FAC4F3), // 0x1.ebfce50fac4f3p-3\n C2 = reinterpret(0x3FE62E42FF0C52D6); // 0x1.62e42ff0c52d6p-1\n\n // x = k/N + r with r in [-1/(2N), 1/(2N)]\n var kd = (xd + shift);\n var ki = reinterpret(kd);\n var r = xd - (kd - shift);\n var t: u64, z: f64, y: f64, s: f64;\n\n // exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1)\n t = load(EXP2F_DATA_TAB + ((ki & N_MASK) << alignof()));\n t += (ki + signBias) << (52 - EXP2F_TABLE_BITS);\n s = reinterpret(t);\n z = C0 * r + C1;\n y = C2 * r + 1;\n y += z * (r * r);\n y *= s;\n return y;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction xflowf(sign: u32, y: f32): f32 {\n return select(-y, y, sign) * y;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction oflowf(sign: u32): f32 {\n return xflowf(sign, reinterpret(0x70000000)); // 0x1p97f\n}\n\n// @ts-ignore: decorator\n@inline\nfunction uflowf(sign: u32): f32 {\n return xflowf(sign, reinterpret(0x10000000)); // 0x1p-95f\n}\n\n// @ts-ignore: decorator\n@inline\nexport function powf_lut(x: f32, y: f32): f32 {\n const\n Ox1p23f = reinterpret(0x4B000000), // 0x1p23f\n UPPER_LIMIT = reinterpret(0x405FFFFFFFD1D571), // 0x1.fffffffd1d571p+6\n LOWER_LIMIT = -150.0,\n SIGN_BIAS = 1 << (EXP2F_TABLE_BITS + 11);\n\n var signBias: u32 = 0;\n var ix = reinterpret(x);\n var iy = reinterpret(y);\n var ny = 0;\n\n if (i32(ix - 0x00800000 >= 0x7f800000 - 0x00800000) | (ny = i32(zeroinfnanf(iy)))) {\n // Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan).\n if (ny) {\n if ((iy << 1) == 0) return 1.0;\n if (ix == 0x3F800000) return NaN; // original: 1.0\n if ((ix << 1) > (0x7F800000 << 1) || (iy << 1) > (0x7F800000 << 1)) return x + y;\n if ((ix << 1) == (0x3F800000 << 1)) return NaN; // original: 1.0\n if (((ix << 1) < (0x3F800000 << 1)) == !(iy >> 31)) return 0; // |x| < 1 && y==inf or |x| > 1 && y==-inf.\n return y * y;\n }\n if (zeroinfnanf(ix)) {\n let x2 = x * x;\n if ((ix >> 31) && checkintf(iy) == 1) x2 = -x2;\n return iy >> 31 ? 1 / x2 : x2;\n }\n // x and y are non-zero finite.\n if (ix >> 31) {\n // Finite x < 0.\n let yint = checkintf(iy);\n if (yint == 0) return (x - x) / (x - x);\n if (yint == 1) signBias = SIGN_BIAS;\n ix &= 0x7FFFFFFF;\n }\n if (ix < 0x00800000) {\n // Normalize subnormal x so exponent becomes negative.\n ix = reinterpret(x * Ox1p23f);\n ix &= 0x7FFFFFFF;\n ix -= 23 << 23;\n }\n }\n var logx = log2f_inline(ix);\n var ylogx = y * logx; // cannot overflow, y is single prec.\n if ((reinterpret(ylogx) >> 47 & 0xFFFF) >= 0x80BF) { // reinterpret(126.0) >> 47\n // |y * log(x)| >= 126\n if (ylogx > UPPER_LIMIT) return oflowf(signBias); // overflow\n if (ylogx <= LOWER_LIMIT) return uflowf(signBias); // underflow\n }\n return exp2f_inline(ylogx, signBias);\n}\n\n//\n// Lookup data for exp. See: https://git.musl-libc.org/cgit/musl/tree/src/math/exp.c\n//\n\n// @ts-ignore: decorator\n@inline const EXP_TABLE_BITS = 7;\n\n// @ts-ignore: decorator\n@lazy @inline const EXP_DATA_TAB = memory.data([\n 0x0000000000000000, 0x3FF0000000000000,\n 0x3C9B3B4F1A88BF6E, 0x3FEFF63DA9FB3335,\n 0xBC7160139CD8DC5D, 0x3FEFEC9A3E778061,\n 0xBC905E7A108766D1, 0x3FEFE315E86E7F85,\n 0x3C8CD2523567F613, 0x3FEFD9B0D3158574,\n 0xBC8BCE8023F98EFA, 0x3FEFD06B29DDF6DE,\n 0x3C60F74E61E6C861, 0x3FEFC74518759BC8,\n 0x3C90A3E45B33D399, 0x3FEFBE3ECAC6F383,\n 0x3C979AA65D837B6D, 0x3FEFB5586CF9890F,\n 0x3C8EB51A92FDEFFC, 0x3FEFAC922B7247F7,\n 0x3C3EBE3D702F9CD1, 0x3FEFA3EC32D3D1A2,\n 0xBC6A033489906E0B, 0x3FEF9B66AFFED31B,\n 0xBC9556522A2FBD0E, 0x3FEF9301D0125B51,\n 0xBC5080EF8C4EEA55, 0x3FEF8ABDC06C31CC,\n 0xBC91C923B9D5F416, 0x3FEF829AAEA92DE0,\n 0x3C80D3E3E95C55AF, 0x3FEF7A98C8A58E51,\n 0xBC801B15EAA59348, 0x3FEF72B83C7D517B,\n 0xBC8F1FF055DE323D, 0x3FEF6AF9388C8DEA,\n 0x3C8B898C3F1353BF, 0x3FEF635BEB6FCB75,\n 0xBC96D99C7611EB26, 0x3FEF5BE084045CD4,\n 0x3C9AECF73E3A2F60, 0x3FEF54873168B9AA,\n 0xBC8FE782CB86389D, 0x3FEF4D5022FCD91D,\n 0x3C8A6F4144A6C38D, 0x3FEF463B88628CD6,\n 0x3C807A05B0E4047D, 0x3FEF3F49917DDC96,\n 0x3C968EFDE3A8A894, 0x3FEF387A6E756238,\n 0x3C875E18F274487D, 0x3FEF31CE4FB2A63F,\n 0x3C80472B981FE7F2, 0x3FEF2B4565E27CDD,\n 0xBC96B87B3F71085E, 0x3FEF24DFE1F56381,\n 0x3C82F7E16D09AB31, 0x3FEF1E9DF51FDEE1,\n 0xBC3D219B1A6FBFFA, 0x3FEF187FD0DAD990,\n 0x3C8B3782720C0AB4, 0x3FEF1285A6E4030B,\n 0x3C6E149289CECB8F, 0x3FEF0CAFA93E2F56,\n 0x3C834D754DB0ABB6, 0x3FEF06FE0A31B715,\n 0x3C864201E2AC744C, 0x3FEF0170FC4CD831,\n 0x3C8FDD395DD3F84A, 0x3FEEFC08B26416FF,\n 0xBC86A3803B8E5B04, 0x3FEEF6C55F929FF1,\n 0xBC924AEDCC4B5068, 0x3FEEF1A7373AA9CB,\n 0xBC9907F81B512D8E, 0x3FEEECAE6D05D866,\n 0xBC71D1E83E9436D2, 0x3FEEE7DB34E59FF7,\n 0xBC991919B3CE1B15, 0x3FEEE32DC313A8E5,\n 0x3C859F48A72A4C6D, 0x3FEEDEA64C123422,\n 0xBC9312607A28698A, 0x3FEEDA4504AC801C,\n 0xBC58A78F4817895B, 0x3FEED60A21F72E2A,\n 0xBC7C2C9B67499A1B, 0x3FEED1F5D950A897,\n 0x3C4363ED60C2AC11, 0x3FEECE086061892D,\n 0x3C9666093B0664EF, 0x3FEECA41ED1D0057,\n 0x3C6ECCE1DAA10379, 0x3FEEC6A2B5C13CD0,\n 0x3C93FF8E3F0F1230, 0x3FEEC32AF0D7D3DE,\n 0x3C7690CEBB7AAFB0, 0x3FEEBFDAD5362A27,\n 0x3C931DBDEB54E077, 0x3FEEBCB299FDDD0D,\n 0xBC8F94340071A38E, 0x3FEEB9B2769D2CA7,\n 0xBC87DECCDC93A349, 0x3FEEB6DAA2CF6642,\n 0xBC78DEC6BD0F385F, 0x3FEEB42B569D4F82,\n 0xBC861246EC7B5CF6, 0x3FEEB1A4CA5D920F,\n 0x3C93350518FDD78E, 0x3FEEAF4736B527DA,\n 0x3C7B98B72F8A9B05, 0x3FEEAD12D497C7FD,\n 0x3C9063E1E21C5409, 0x3FEEAB07DD485429,\n 0x3C34C7855019C6EA, 0x3FEEA9268A5946B7,\n 0x3C9432E62B64C035, 0x3FEEA76F15AD2148,\n 0xBC8CE44A6199769F, 0x3FEEA5E1B976DC09,\n 0xBC8C33C53BEF4DA8, 0x3FEEA47EB03A5585,\n 0xBC845378892BE9AE, 0x3FEEA34634CCC320,\n 0xBC93CEDD78565858, 0x3FEEA23882552225,\n 0x3C5710AA807E1964, 0x3FEEA155D44CA973,\n 0xBC93B3EFBF5E2228, 0x3FEEA09E667F3BCD,\n 0xBC6A12AD8734B982, 0x3FEEA012750BDABF,\n 0xBC6367EFB86DA9EE, 0x3FEE9FB23C651A2F,\n 0xBC80DC3D54E08851, 0x3FEE9F7DF9519484,\n 0xBC781F647E5A3ECF, 0x3FEE9F75E8EC5F74,\n 0xBC86EE4AC08B7DB0, 0x3FEE9F9A48A58174,\n 0xBC8619321E55E68A, 0x3FEE9FEB564267C9,\n 0x3C909CCB5E09D4D3, 0x3FEEA0694FDE5D3F,\n 0xBC7B32DCB94DA51D, 0x3FEEA11473EB0187,\n 0x3C94ECFD5467C06B, 0x3FEEA1ED0130C132,\n 0x3C65EBE1ABD66C55, 0x3FEEA2F336CF4E62,\n 0xBC88A1C52FB3CF42, 0x3FEEA427543E1A12,\n 0xBC9369B6F13B3734, 0x3FEEA589994CCE13,\n 0xBC805E843A19FF1E, 0x3FEEA71A4623C7AD,\n 0xBC94D450D872576E, 0x3FEEA8D99B4492ED,\n 0x3C90AD675B0E8A00, 0x3FEEAAC7D98A6699,\n 0x3C8DB72FC1F0EAB4, 0x3FEEACE5422AA0DB,\n 0xBC65B6609CC5E7FF, 0x3FEEAF3216B5448C,\n 0x3C7BF68359F35F44, 0x3FEEB1AE99157736,\n 0xBC93091FA71E3D83, 0x3FEEB45B0B91FFC6,\n 0xBC5DA9B88B6C1E29, 0x3FEEB737B0CDC5E5,\n 0xBC6C23F97C90B959, 0x3FEEBA44CBC8520F,\n 0xBC92434322F4F9AA, 0x3FEEBD829FDE4E50,\n 0xBC85CA6CD7668E4B, 0x3FEEC0F170CA07BA,\n 0x3C71AFFC2B91CE27, 0x3FEEC49182A3F090,\n 0x3C6DD235E10A73BB, 0x3FEEC86319E32323,\n 0xBC87C50422622263, 0x3FEECC667B5DE565,\n 0x3C8B1C86E3E231D5, 0x3FEED09BEC4A2D33,\n 0xBC91BBD1D3BCBB15, 0x3FEED503B23E255D,\n 0x3C90CC319CEE31D2, 0x3FEED99E1330B358,\n 0x3C8469846E735AB3, 0x3FEEDE6B5579FDBF,\n 0xBC82DFCD978E9DB4, 0x3FEEE36BBFD3F37A,\n 0x3C8C1A7792CB3387, 0x3FEEE89F995AD3AD,\n 0xBC907B8F4AD1D9FA, 0x3FEEEE07298DB666,\n 0xBC55C3D956DCAEBA, 0x3FEEF3A2B84F15FB,\n 0xBC90A40E3DA6F640, 0x3FEEF9728DE5593A,\n 0xBC68D6F438AD9334, 0x3FEEFF76F2FB5E47,\n 0xBC91EEE26B588A35, 0x3FEF05B030A1064A,\n 0x3C74FFD70A5FDDCD, 0x3FEF0C1E904BC1D2,\n 0xBC91BDFBFA9298AC, 0x3FEF12C25BD71E09,\n 0x3C736EAE30AF0CB3, 0x3FEF199BDD85529C,\n 0x3C8EE3325C9FFD94, 0x3FEF20AB5FFFD07A,\n 0x3C84E08FD10959AC, 0x3FEF27F12E57D14B,\n 0x3C63CDAF384E1A67, 0x3FEF2F6D9406E7B5,\n 0x3C676B2C6C921968, 0x3FEF3720DCEF9069,\n 0xBC808A1883CCB5D2, 0x3FEF3F0B555DC3FA,\n 0xBC8FAD5D3FFFFA6F, 0x3FEF472D4A07897C,\n 0xBC900DAE3875A949, 0x3FEF4F87080D89F2,\n 0x3C74A385A63D07A7, 0x3FEF5818DCFBA487,\n 0xBC82919E2040220F, 0x3FEF60E316C98398,\n 0x3C8E5A50D5C192AC, 0x3FEF69E603DB3285,\n 0x3C843A59AC016B4B, 0x3FEF7321F301B460,\n 0xBC82D52107B43E1F, 0x3FEF7C97337B9B5F,\n 0xBC892AB93B470DC9, 0x3FEF864614F5A129,\n 0x3C74B604603A88D3, 0x3FEF902EE78B3FF6,\n 0x3C83C5EC519D7271, 0x3FEF9A51FBC74C83,\n 0xBC8FF7128FD391F0, 0x3FEFA4AFA2A490DA,\n 0xBC8DAE98E223747D, 0x3FEFAF482D8E67F1,\n 0x3C8EC3BC41AA2008, 0x3FEFBA1BEE615A27,\n 0x3C842B94C3A9EB32, 0x3FEFC52B376BBA97,\n 0x3C8A64A931D185EE, 0x3FEFD0765B6E4540,\n 0xBC8E37BAE43BE3ED, 0x3FEFDBFDAD9CBE14,\n 0x3C77893B4D91CD9D, 0x3FEFE7C1819E90D8,\n 0x3C5305C14160CC89, 0x3FEFF3C22B8F71F1\n]);\n\n// Handle cases that may overflow or underflow when computing the result that\n// is scale*(1+TMP) without intermediate rounding. The bit representation of\n// scale is in SBITS, however it has a computed exponent that may have\n// overflown into the sign bit so that needs to be adjusted before using it as\n// a double. (int32_t)KI is the k used in the argument reduction and exponent\n// adjustment of scale, positive k here means the result may overflow and\n// negative k means the result may underflow.\n// @ts-ignore: decorator\n@inline\nfunction specialcase(tmp: f64, sbits: u64, ki: u64): f64 {\n const\n Ox1p_1022 = reinterpret(0x0010000000000000), // 0x1p-1022\n Ox1p1009 = reinterpret(0x7F00000000000000); // 0x1p1009\n\n var scale: f64;\n if (!(ki & 0x80000000)) {\n // k > 0, the exponent of scale might have overflowed by <= 460.\n sbits -= u64(1009) << 52;\n scale = reinterpret(sbits);\n return Ox1p1009 * (scale + scale * tmp); // 0x1p1009\n }\n // k < 0, need special care in the subnormal range.\n sbits += u64(1022) << 52;\n // Note: sbits is signed scale.\n scale = reinterpret(sbits);\n var y = scale + scale * tmp;\n if (abs(y) < 1.0) {\n // Round y to the right precision before scaling it into the subnormal\n // range to avoid double rounding that can cause 0.5+E/2 ulp error where\n // E is the worst-case ulp error outside the subnormal range. So this\n // is only useful if the goal is better than 1 ulp worst-case error.\n let one = copysign(1.0, y);\n let lo = scale - y + scale * tmp;\n let hi = one + y;\n lo = one - hi + y + lo;\n y = (hi + lo) - one;\n // Fix the sign of 0.\n if (y == 0.0) y = reinterpret(sbits & 0x8000000000000000);\n }\n return y * Ox1p_1022;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function exp_lut(x: f64): f64 {\n const\n N = 1 << EXP_TABLE_BITS,\n N_MASK = N - 1;\n\n const\n InvLn2N = reinterpret(0x3FF71547652B82FE) * N, // 0x1.71547652b82fep0\n NegLn2hiN = reinterpret(0xBF762E42FEFA0000), // -0x1.62e42fefa0000p-8\n NegLn2loN = reinterpret(0xBD0CF79ABC9E3B3A), // -0x1.cf79abc9e3b3ap-47\n shift = reinterpret(0x4338000000000000); // 0x1.8p52;\n\n const\n C2 = reinterpret(0x3FDFFFFFFFFFFDBD), // __exp_data.poly[0] (0x1.ffffffffffdbdp-2)\n C3 = reinterpret(0x3FC555555555543C), // __exp_data.poly[1] (0x1.555555555543cp-3)\n C4 = reinterpret(0x3FA55555CF172B91), // __exp_data.poly[2] (0x1.55555cf172b91p-5)\n C5 = reinterpret(0x3F81111167A4D017); // __exp_data.poly[3] (0x1.1111167a4d017p-7)\n\n var ux = reinterpret(x);\n var abstop = (ux >> 52 & 0x7FF);\n if (abstop - 0x3C9 >= 0x03F) {\n if (abstop - 0x3C9 >= 0x80000000) return 1;\n if (abstop >= 0x409) {\n if (ux == 0xFFF0000000000000) return 0;\n if (abstop >= 0x7FF) return 1.0 + x;\n return select(0, Infinity, ux >> 63);\n }\n // Large x is special cased below.\n abstop = 0;\n }\n\n // exp(x) = 2^(k/N) * exp(r), with exp(r) in [2^(-1/2N),2^(1/2N)]\n // x = ln2/N*k + r, with int k and r in [-ln2/2N, ln2/2N]\n var z = InvLn2N * x;\n // #if TOINT_INTRINSICS\n // \tkd = roundtoint(z);\n // \tki = converttoint(z);\n // #elif EXP_USE_TOINT_NARROW\n // \t// z - kd is in [-0.5-2^-16, 0.5] in all rounding modes.\n // var kd = z + shift;\n // var ki = reinterpret(kd) >> 16;\n // var kd = ki;\n // #else\n // z - kd is in [-1, 1] in non-nearest rounding modes.\n var kd = z + shift;\n var ki = reinterpret(kd);\n kd -= shift;\n // #endif\n var r = x + kd * NegLn2hiN + kd * NegLn2loN;\n // 2^(k/N) ~= scale * (1 + tail).\n var idx = ((ki & N_MASK) << 1);\n var top = ki << (52 - EXP_TABLE_BITS);\n\n var tail = reinterpret(load(EXP_DATA_TAB + (idx << alignof()))); // T[idx]\n // This is only a valid scale when -1023*N < k < 1024*N\n var sbits = load(EXP_DATA_TAB + (idx << alignof()), 1 << alignof()) + top; // T[idx + 1]\n // exp(x) = 2^(k/N) * exp(r) ~= scale + scale * (tail + exp(r) - 1).\n // Evaluation is optimized assuming superscalar pipelined execution.\n var r2 = r * r;\n // Without fma the worst case error is 0.25/N ulp larger.\n // Worst case error is less than 0.5+1.11/N+(abs poly error * 2^53) ulp.\n var tmp = tail + r + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5);\n if (abstop == 0) return specialcase(tmp, sbits, ki);\n var scale = reinterpret(sbits);\n // Note: tmp == 0 or |tmp| > 2^-200 and scale > 2^-739, so there\n // is no spurious underflow here even without fma.\n return scale + scale * tmp;\n}\n\n//\n// Lookup data for exp2. See: https://git.musl-libc.org/cgit/musl/tree/src/math/exp2.c\n//\n\n// Handle cases that may overflow or underflow when computing the result that\n// is scale*(1+TMP) without intermediate rounding. The bit representation of\n// scale is in SBITS, however it has a computed exponent that may have\n// overflown into the sign bit so that needs to be adjusted before using it as\n// a double. (int32_t)KI is the k used in the argument reduction and exponent\n// adjustment of scale, positive k here means the result may overflow and\n// negative k means the result may underflow.\n// @ts-ignore: decorator\n@inline\nfunction specialcase2(tmp: f64, sbits: u64, ki: u64): f64 {\n const Ox1p_1022 = reinterpret(0x10000000000000); // 0x1p-1022\n var scale: f64;\n if ((ki & 0x80000000) == 0) {\n // k > 0, the exponent of scale might have overflowed by 1\n sbits -= u64(1) << 52;\n scale = reinterpret(sbits);\n return 2 * (scale * tmp + scale);\n }\n // k < 0, need special care in the subnormal range\n sbits += u64(1022) << 52;\n scale = reinterpret(sbits);\n var y = scale * tmp + scale;\n if (y < 1.0) {\n // Round y to the right precision before scaling it into the subnormal\n // range to avoid double rounding that can cause 0.5+E/2 ulp error where\n // E is the worst-case ulp error outside the subnormal range. So this\n // is only useful if the goal is better than 1 ulp worst-case error.\n let hi: f64, lo: f64;\n lo = scale - y + scale * tmp;\n hi = 1.0 + y;\n lo = 1.0 - hi + y + lo;\n y = (hi + lo) - 1.0;\n }\n return y * Ox1p_1022;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function exp2_lut(x: f64): f64 {\n const\n N = 1 << EXP_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000) / N; // 0x1.8p52\n\n const\n C1 = reinterpret(0x3FE62E42FEFA39EF), // 0x1.62e42fefa39efp-1\n C2 = reinterpret(0x3FCEBFBDFF82C424), // 0x1.ebfbdff82c424p-3\n C3 = reinterpret(0x3FAC6B08D70CF4B5), // 0x1.c6b08d70cf4b5p-5\n C4 = reinterpret(0x3F83B2ABD24650CC), // 0x1.3b2abd24650ccp-7\n C5 = reinterpret(0x3F55D7E09B4E3A84); // 0x1.5d7e09b4e3a84p-10\n\n var ux = reinterpret(x);\n var abstop = (ux >> 52 & 0x7ff);\n if (abstop - 0x3C9 >= 0x03F) {\n if (abstop - 0x3C9 >= 0x80000000) return 1.0;\n if (abstop >= 0x409) {\n if (ux == 0xFFF0000000000000) return 0;\n if (abstop >= 0x7FF) return 1.0 + x;\n if (!(ux >> 63)) return Infinity;\n else if (ux >= 0xC090CC0000000000) return 0;\n }\n if ((ux << 1) > 0x811A000000000000) abstop = 0; // Large x is special cased below.\n }\n\n // exp2(x) = 2^(k/N) * 2^r, with 2^r in [2^(-1/2N),2^(1/2N)].\n // x = k/N + r, with int k and r in [-1/2N, 1/2N]\n var kd = x + shift;\n var ki = reinterpret(kd);\n kd -= shift; // k/N for int k\n var r = x - kd;\n // 2^(k/N) ~= scale * (1 + tail)\n var idx = ((ki & N_MASK) << 1);\n var top = ki << (52 - EXP_TABLE_BITS);\n\n var tail = reinterpret(load(EXP_DATA_TAB + (idx << alignof()), 0 << alignof())); // T[idx])\n // This is only a valid scale when -1023*N < k < 1024*N\n var sbits = load(EXP_DATA_TAB + (idx << alignof()), 1 << alignof()) + top; // T[idx + 1]\n // exp2(x) = 2^(k/N) * 2^r ~= scale + scale * (tail + 2^r - 1).\n // Evaluation is optimized assuming superscalar pipelined execution\n var r2 = r * r;\n // Without fma the worst case error is 0.5/N ulp larger.\n // Worst case error is less than 0.5+0.86/N+(abs poly error * 2^53) ulp.\n var tmp = tail + r * C1 + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5);\n if (abstop == 0) return specialcase2(tmp, sbits, ki);\n var scale = reinterpret(sbits);\n // Note: tmp == 0 or |tmp| > 2^-65 and scale > 2^-928, so there\n // is no spurious underflow here even without fma.\n return scale * tmp + scale;\n}\n\n//\n// Lookup data for log2. See: https://git.musl-libc.org/cgit/musl/tree/src/math/log2.c\n//\n\n// @ts-ignore: decorator\n@inline const LOG2_TABLE_BITS = 6;\n\n/* Algorithm:\n\n x = 2^k z\n log2(x) = k + log2(c) + log2(z/c)\n log2(z/c) = poly(z/c - 1)\n\nwhere z is in [1.6p-1; 1.6p0] which is split into N subintervals and z falls\ninto the ith one, then table entries are computed as\n\n tab[i].invc = 1/c\n tab[i].logc = (double)log2(c)\n tab2[i].chi = (double)c\n tab2[i].clo = (double)(c - (double)c)\n\nwhere c is near the center of the subinterval and is chosen by trying +-2^29\nfloating point invc candidates around 1/center and selecting one for which\n\n 1) the rounding error in 0x1.8p10 + logc is 0,\n 2) the rounding error in z - chi - clo is < 0x1p-64 and\n 3) the rounding error in (double)log2(c) is minimized (< 0x1p-68).\n\nNote: 1) ensures that k + logc can be computed without rounding error, 2)\nensures that z/c - 1 can be computed as (z - chi - clo)*invc with close to a\nsingle rounding error when there is no fast fma for z*invc - 1, 3) ensures\nthat logc + poly(z/c - 1) has small error, however near x == 1 when\n|log2(x)| < 0x1p-4, this is not enough so that is special cased. */\n\n// @ts-ignore: decorator\n@lazy @inline const LOG2_DATA_TAB1 = memory.data([\n // invc , logc\n reinterpret(0x3FF724286BB1ACF8), reinterpret(0xBFE1095FEECDB000),\n reinterpret(0x3FF6E1F766D2CCA1), reinterpret(0xBFE08494BD76D000),\n reinterpret(0x3FF6A13D0E30D48A), reinterpret(0xBFE00143AEE8F800),\n reinterpret(0x3FF661EC32D06C85), reinterpret(0xBFDEFEC5360B4000),\n reinterpret(0x3FF623FA951198F8), reinterpret(0xBFDDFDD91AB7E000),\n reinterpret(0x3FF5E75BA4CF026C), reinterpret(0xBFDCFFAE0CC79000),\n reinterpret(0x3FF5AC055A214FB8), reinterpret(0xBFDC043811FDA000),\n reinterpret(0x3FF571ED0F166E1E), reinterpret(0xBFDB0B67323AE000),\n reinterpret(0x3FF53909590BF835), reinterpret(0xBFDA152F5A2DB000),\n reinterpret(0x3FF5014FED61ADDD), reinterpret(0xBFD9217F5AF86000),\n reinterpret(0x3FF4CAB88E487BD0), reinterpret(0xBFD8304DB0719000),\n reinterpret(0x3FF49539B4334FEE), reinterpret(0xBFD74189F9A9E000),\n reinterpret(0x3FF460CBDFAFD569), reinterpret(0xBFD6552BB5199000),\n reinterpret(0x3FF42D664EE4B953), reinterpret(0xBFD56B23A29B1000),\n reinterpret(0x3FF3FB01111DD8A6), reinterpret(0xBFD483650F5FA000),\n reinterpret(0x3FF3C995B70C5836), reinterpret(0xBFD39DE937F6A000),\n reinterpret(0x3FF3991C4AB6FD4A), reinterpret(0xBFD2BAA1538D6000),\n reinterpret(0x3FF3698E0CE099B5), reinterpret(0xBFD1D98340CA4000),\n reinterpret(0x3FF33AE48213E7B2), reinterpret(0xBFD0FA853A40E000),\n reinterpret(0x3FF30D191985BDB1), reinterpret(0xBFD01D9C32E73000),\n reinterpret(0x3FF2E025CAB271D7), reinterpret(0xBFCE857DA2FA6000),\n reinterpret(0x3FF2B404CF13CD82), reinterpret(0xBFCCD3C8633D8000),\n reinterpret(0x3FF288B02C7CCB50), reinterpret(0xBFCB26034C14A000),\n reinterpret(0x3FF25E2263944DE5), reinterpret(0xBFC97C1C2F4FE000),\n reinterpret(0x3FF234563D8615B1), reinterpret(0xBFC7D6023F800000),\n reinterpret(0x3FF20B46E33EAF38), reinterpret(0xBFC633A71A05E000),\n reinterpret(0x3FF1E2EEFDCDA3DD), reinterpret(0xBFC494F5E9570000),\n reinterpret(0x3FF1BB4A580B3930), reinterpret(0xBFC2F9E424E0A000),\n reinterpret(0x3FF19453847F2200), reinterpret(0xBFC162595AFDC000),\n reinterpret(0x3FF16E06C0D5D73C), reinterpret(0xBFBF9C9A75BD8000),\n reinterpret(0x3FF1485F47B7E4C2), reinterpret(0xBFBC7B575BF9C000),\n reinterpret(0x3FF12358AD0085D1), reinterpret(0xBFB960C60FF48000),\n reinterpret(0x3FF0FEF00F532227), reinterpret(0xBFB64CE247B60000),\n reinterpret(0x3FF0DB2077D03A8F), reinterpret(0xBFB33F78B2014000),\n reinterpret(0x3FF0B7E6D65980D9), reinterpret(0xBFB0387D1A42C000),\n reinterpret(0x3FF0953EFE7B408D), reinterpret(0xBFAA6F9208B50000),\n reinterpret(0x3FF07325CAC53B83), reinterpret(0xBFA47A954F770000),\n reinterpret(0x3FF05197E40D1B5C), reinterpret(0xBF9D23A8C50C0000),\n reinterpret(0x3FF03091C1208EA2), reinterpret(0xBF916A2629780000),\n reinterpret(0x3FF0101025B37E21), reinterpret(0xBF7720F8D8E80000),\n reinterpret(0x3FEFC07EF9CAA76B), reinterpret(0x3F86FE53B1500000),\n reinterpret(0x3FEF4465D3F6F184), reinterpret(0x3FA11CCCE10F8000),\n reinterpret(0x3FEECC079F84107F), reinterpret(0x3FAC4DFC8C8B8000),\n reinterpret(0x3FEE573A99975AE8), reinterpret(0x3FB3AA321E574000),\n reinterpret(0x3FEDE5D6F0BD3DE6), reinterpret(0x3FB918A0D08B8000),\n reinterpret(0x3FED77B681FF38B3), reinterpret(0x3FBE72E9DA044000),\n reinterpret(0x3FED0CB5724DE943), reinterpret(0x3FC1DCD2507F6000),\n reinterpret(0x3FECA4B2DC0E7563), reinterpret(0x3FC476AB03DEA000),\n reinterpret(0x3FEC3F8EE8D6CB51), reinterpret(0x3FC7074377E22000),\n reinterpret(0x3FEBDD2B4F020C4C), reinterpret(0x3FC98EDE8BA94000),\n reinterpret(0x3FEB7D6C006015CA), reinterpret(0x3FCC0DB86AD2E000),\n reinterpret(0x3FEB20366E2E338F), reinterpret(0x3FCE840AAFCEE000),\n reinterpret(0x3FEAC57026295039), reinterpret(0x3FD0790AB4678000),\n reinterpret(0x3FEA6D01BC2731DD), reinterpret(0x3FD1AC056801C000),\n reinterpret(0x3FEA16D3BC3FF18B), reinterpret(0x3FD2DB11D4FEE000),\n reinterpret(0x3FE9C2D14967FEAD), reinterpret(0x3FD406464EC58000),\n reinterpret(0x3FE970E4F47C9902), reinterpret(0x3FD52DBE093AF000),\n reinterpret(0x3FE920FB3982BCF2), reinterpret(0x3FD651902050D000),\n reinterpret(0x3FE8D30187F759F1), reinterpret(0x3FD771D2CDEAF000),\n reinterpret(0x3FE886E5EBB9F66D), reinterpret(0x3FD88E9C857D9000),\n reinterpret(0x3FE83C97B658B994), reinterpret(0x3FD9A80155E16000),\n reinterpret(0x3FE7F405FFC61022), reinterpret(0x3FDABE186ED3D000),\n reinterpret(0x3FE7AD22181415CA), reinterpret(0x3FDBD0F2AEA0E000),\n reinterpret(0x3FE767DCF99EFF8C), reinterpret(0x3FDCE0A43DBF4000)\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const LOG2_DATA_TAB2 = memory.data([\n // chi , clo\n reinterpret(0x3FE6200012B90A8E), reinterpret(0x3C8904AB0644B605),\n reinterpret(0x3FE66000045734A6), reinterpret(0x3C61FF9BEA62F7A9),\n reinterpret(0x3FE69FFFC325F2C5), reinterpret(0x3C827ECFCB3C90BA),\n reinterpret(0x3FE6E00038B95A04), reinterpret(0x3C88FF8856739326),\n reinterpret(0x3FE71FFFE09994E3), reinterpret(0x3C8AFD40275F82B1),\n reinterpret(0x3FE7600015590E10), reinterpret(0xBC72FD75B4238341),\n reinterpret(0x3FE7A00012655BD5), reinterpret(0x3C7808E67C242B76),\n reinterpret(0x3FE7E0003259E9A6), reinterpret(0xBC6208E426F622B7),\n reinterpret(0x3FE81FFFEDB4B2D2), reinterpret(0xBC8402461EA5C92F),\n reinterpret(0x3FE860002DFAFCC3), reinterpret(0x3C6DF7F4A2F29A1F),\n reinterpret(0x3FE89FFFF78C6B50), reinterpret(0xBC8E0453094995FD),\n reinterpret(0x3FE8E00039671566), reinterpret(0xBC8A04F3BEC77B45),\n reinterpret(0x3FE91FFFE2BF1745), reinterpret(0xBC77FA34400E203C),\n reinterpret(0x3FE95FFFCC5C9FD1), reinterpret(0xBC76FF8005A0695D),\n reinterpret(0x3FE9A0003BBA4767), reinterpret(0x3C70F8C4C4EC7E03),\n reinterpret(0x3FE9DFFFE7B92DA5), reinterpret(0x3C8E7FD9478C4602),\n reinterpret(0x3FEA1FFFD72EFDAF), reinterpret(0xBC6A0C554DCDAE7E),\n reinterpret(0x3FEA5FFFDE04FF95), reinterpret(0x3C867DA98CE9B26B),\n reinterpret(0x3FEA9FFFCA5E8D2B), reinterpret(0xBC8284C9B54C13DE),\n reinterpret(0x3FEADFFFDDAD03EA), reinterpret(0x3C5812C8EA602E3C),\n reinterpret(0x3FEB1FFFF10D3D4D), reinterpret(0xBC8EFADDAD27789C),\n reinterpret(0x3FEB5FFFCE21165A), reinterpret(0x3C53CB1719C61237),\n reinterpret(0x3FEB9FFFD950E674), reinterpret(0x3C73F7D94194CE00),\n reinterpret(0x3FEBE000139CA8AF), reinterpret(0x3C750AC4215D9BC0),\n reinterpret(0x3FEC20005B46DF99), reinterpret(0x3C6BEEA653E9C1C9),\n reinterpret(0x3FEC600040B9F7AE), reinterpret(0xBC7C079F274A70D6),\n reinterpret(0x3FECA0006255FD8A), reinterpret(0xBC7A0B4076E84C1F),\n reinterpret(0x3FECDFFFD94C095D), reinterpret(0x3C88F933F99AB5D7),\n reinterpret(0x3FED1FFFF975D6CF), reinterpret(0xBC582C08665FE1BE),\n reinterpret(0x3FED5FFFA2561C93), reinterpret(0xBC7B04289BD295F3),\n reinterpret(0x3FED9FFF9D228B0C), reinterpret(0x3C870251340FA236),\n reinterpret(0x3FEDE00065BC7E16), reinterpret(0xBC75011E16A4D80C),\n reinterpret(0x3FEE200002F64791), reinterpret(0x3C89802F09EF62E0),\n reinterpret(0x3FEE600057D7A6D8), reinterpret(0xBC7E0B75580CF7FA),\n reinterpret(0x3FEEA00027EDC00C), reinterpret(0xBC8C848309459811),\n reinterpret(0x3FEEE0006CF5CB7C), reinterpret(0xBC8F8027951576F4),\n reinterpret(0x3FEF2000782B7DCC), reinterpret(0xBC8F81D97274538F),\n reinterpret(0x3FEF6000260C450A), reinterpret(0xBC4071002727FFDC),\n reinterpret(0x3FEF9FFFE88CD533), reinterpret(0xBC581BDCE1FDA8B0),\n reinterpret(0x3FEFDFFFD50F8689), reinterpret(0x3C87F91ACB918E6E),\n reinterpret(0x3FF0200004292367), reinterpret(0x3C9B7FF365324681),\n reinterpret(0x3FF05FFFE3E3D668), reinterpret(0x3C86FA08DDAE957B),\n reinterpret(0x3FF0A0000A85A757), reinterpret(0xBC57E2DE80D3FB91),\n reinterpret(0x3FF0E0001A5F3FCC), reinterpret(0xBC91823305C5F014),\n reinterpret(0x3FF11FFFF8AFBAF5), reinterpret(0xBC8BFABB6680BAC2),\n reinterpret(0x3FF15FFFE54D91AD), reinterpret(0xBC9D7F121737E7EF),\n reinterpret(0x3FF1A00011AC36E1), reinterpret(0x3C9C000A0516F5FF),\n reinterpret(0x3FF1E00019C84248), reinterpret(0xBC9082FBE4DA5DA0),\n reinterpret(0x3FF220000FFE5E6E), reinterpret(0xBC88FDD04C9CFB43),\n reinterpret(0x3FF26000269FD891), reinterpret(0x3C8CFE2A7994D182),\n reinterpret(0x3FF2A00029A6E6DA), reinterpret(0xBC700273715E8BC5),\n reinterpret(0x3FF2DFFFE0293E39), reinterpret(0x3C9B7C39DAB2A6F9),\n reinterpret(0x3FF31FFFF7DCF082), reinterpret(0x3C7DF1336EDC5254),\n reinterpret(0x3FF35FFFF05A8B60), reinterpret(0xBC9E03564CCD31EB),\n reinterpret(0x3FF3A0002E0EAECC), reinterpret(0x3C75F0E74BD3A477),\n reinterpret(0x3FF3E000043BB236), reinterpret(0x3C9C7DCB149D8833),\n reinterpret(0x3FF4200002D187FF), reinterpret(0x3C7E08AFCF2D3D28),\n reinterpret(0x3FF460000D387CB1), reinterpret(0x3C820837856599A6),\n reinterpret(0x3FF4A00004569F89), reinterpret(0xBC89FA5C904FBCD2),\n reinterpret(0x3FF4E000043543F3), reinterpret(0xBC781125ED175329),\n reinterpret(0x3FF51FFFCC027F0F), reinterpret(0x3C9883D8847754DC),\n reinterpret(0x3FF55FFFFD87B36F), reinterpret(0xBC8709E731D02807),\n reinterpret(0x3FF59FFFF21DF7BA), reinterpret(0x3C87F79F68727B02),\n reinterpret(0x3FF5DFFFEBFC3481), reinterpret(0xBC9180902E30E93E)\n]);\n\n// @ts-ignore: decorator\n@inline\nexport function log2_lut(x: f64): f64 {\n const N_MASK = (1 << LOG2_TABLE_BITS) - 1;\n\n const\n LO: u64 = 0x3FEEA4AF00000000, // reinterpret(1.0 - 0x1.5b51p-5)\n HI: u64 = 0x3FF0B55900000000; // reinterpret(1.0 + 0x1.6ab2p-5)\n\n const\n InvLn2hi = reinterpret(0x3FF7154765200000), // 0x1.7154765200000p+0\n InvLn2lo = reinterpret(0x3DE705FC2EEFA200), // 0x1.705fc2eefa200p-33\n Ox1p52 = reinterpret(0x4330000000000000); // 0x1p52\n\n const\n B0 = reinterpret(0xBFE71547652B82FE), // -0x1.71547652b82fep-1\n B1 = reinterpret(0x3FDEC709DC3A03F7), // 0x1.ec709dc3a03f7p-2\n B2 = reinterpret(0xBFD71547652B7C3F), // -0x1.71547652b7c3fp-2\n B3 = reinterpret(0x3FD2776C50F05BE4), // 0x1.2776c50f05be4p-2\n B4 = reinterpret(0xBFCEC709DD768FE5), // -0x1.ec709dd768fe5p-3\n B5 = reinterpret(0x3FCA61761EC4E736), // 0x1.a61761ec4e736p-3\n B6 = reinterpret(0xBFC7153FBC64A79B), // -0x1.7153fbc64a79bp-3\n B7 = reinterpret(0x3FC484D154F01B4A), // 0x1.484d154f01b4ap-3\n B8 = reinterpret(0xBFC289E4A72C383C), // -0x1.289e4a72c383cp-3\n B9 = reinterpret(0x3FC0B32F285AEE66); // 0x1.0b32f285aee66p-3\n\n const\n A0 = reinterpret(0xBFE71547652B8339), // -0x1.71547652b8339p-1\n A1 = reinterpret(0x3FDEC709DC3A04BE), // 0x1.ec709dc3a04bep-2\n A2 = reinterpret(0xBFD7154764702FFB), // -0x1.7154764702ffbp-2\n A3 = reinterpret(0x3FD2776C50034C48), // 0x1.2776c50034c48p-2\n A4 = reinterpret(0xBFCEC7B328EA92BC), // -0x1.ec7b328ea92bcp-3\n A5 = reinterpret(0x3FCA6225E117F92E); // 0x1.a6225e117f92ep-3\n\n var ix = reinterpret(x);\n if (ix - LO < HI - LO) {\n let r = x - 1.0;\n // #if __FP_FAST_FMA\n // hi = r * InvLn2hi;\n // lo = r * InvLn2lo + __builtin_fma(r, InvLn2hi, -hi);\n // #else\n let rhi = reinterpret(reinterpret(r) & 0xFFFFFFFF00000000);\n let rlo = r - rhi;\n let hi = rhi * InvLn2hi;\n let lo = rlo * InvLn2hi + r * InvLn2lo;\n // #endif\n let r2 = r * r; // rounding error: 0x1p-62\n let r4 = r2 * r2;\n // Worst-case error is less than 0.54 ULP (0.55 ULP without fma)\n let p = r2 * (B0 + r * B1);\n let y = hi + p;\n lo += hi - y + p;\n lo += r4 * (B2 + r * B3 + r2 * (B4 + r * B5) +\n r4 * (B6 + r * B7 + r2 * (B8 + r * B9)));\n return y + lo;\n }\n var top = (ix >> 48);\n if (top - 0x0010 >= 0x7ff0 - 0x0010) {\n // x < 0x1p-1022 or inf or nan.\n if ((ix << 1) == 0) return -1.0 / (x * x);\n if (ix == 0x7FF0000000000000) return x; // log(inf) == inf\n if ((top & 0x8000) || (top & 0x7FF0) == 0x7FF0) return (x - x) / (x - x);\n // x is subnormal, normalize it.\n ix = reinterpret(x * Ox1p52);\n ix -= u64(52) << 52;\n }\n\n // x = 2^k z; where z is in range [OFF,2*OFF) and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n var tmp = ix - 0x3FE6000000000000;\n var i = ((tmp >> (52 - LOG2_TABLE_BITS)) & N_MASK);\n var k = tmp >> 52;\n var iz = ix - (tmp & 0xFFF0000000000000);\n\n var invc = load(LOG2_DATA_TAB1 + (i << (1 + alignof())), 0 << alignof()); // T[i].invc;\n var logc = load(LOG2_DATA_TAB1 + (i << (1 + alignof())), 1 << alignof()); // T[i].logc;\n var z = reinterpret(iz);\n var kd = k;\n\n // log2(x) = log2(z/c) + log2(c) + k.\n // r ~= z/c - 1, |r| < 1/(2*N).\n // #if __FP_FAST_FMA\n // \t// rounding error: 0x1p-55/N.\n // \tr = __builtin_fma(z, invc, -1.0);\n // \tt1 = r * InvLn2hi;\n // \tt2 = r * InvLn2lo + __builtin_fma(r, InvLn2hi, -t1);\n // #else\n // rounding error: 0x1p-55/N + 0x1p-65.\n var chi = load(LOG2_DATA_TAB2 + (i << (1 + alignof())), 0 << alignof()); // T[i].chi;\n var clo = load(LOG2_DATA_TAB2 + (i << (1 + alignof())), 1 << alignof()); // T[i].clo;\n\n var r = (z - chi - clo) * invc;\n var rhi = reinterpret(reinterpret(r) & 0xFFFFFFFF00000000);\n var rlo = r - rhi;\n var t1 = rhi * InvLn2hi;\n var t2 = rlo * InvLn2hi + r * InvLn2lo;\n // #endif\n\n // hi + lo = r/ln2 + log2(c) + k\n var t3 = kd + logc;\n var hi = t3 + t1;\n var lo = t3 - hi + t1 + t2;\n\n // log2(r+1) = r/ln2 + r^2*poly(r)\n // Evaluation is optimized assuming superscalar pipelined execution\n var r2 = r * r; // rounding error: 0x1p-54/N^2\n // Worst-case error if |y| > 0x1p-4: 0.547 ULP (0.550 ULP without fma).\n // ~ 0.5 + 2/N/ln2 + abs-poly-error*0x1p56 ULP (+ 0.003 ULP without fma).\n var p = A0 + r * A1 + r2 * (A2 + r * A3) + (r2 * r2) * (A4 + r * A5);\n return lo + r2 * p + hi;\n}\n\n//\n// Lookup data for log. See: https://git.musl-libc.org/cgit/musl/tree/src/math/log.c\n//\n\n// @ts-ignore: decorator\n@inline const LOG_TABLE_BITS = 7;\n\n/* Algorithm:\n\n x = 2^k z\n log(x) = k ln2 + log(c) + log(z/c)\n log(z/c) = poly(z/c - 1)\n\nwhere z is in [1.6p-1; 1.6p0] which is split into N subintervals and z falls\ninto the ith one, then table entries are computed as\n\n tab[i].invc = 1/c\n tab[i].logc = (double)log(c)\n tab2[i].chi = (double)c\n tab2[i].clo = (double)(c - (double)c)\n\nwhere c is near the center of the subinterval and is chosen by trying +-2^29\nfloating point invc candidates around 1/center and selecting one for which\n\n 1) the rounding error in 0x1.8p9 + logc is 0,\n 2) the rounding error in z - chi - clo is < 0x1p-66 and\n 3) the rounding error in (double)log(c) is minimized (< 0x1p-66).\n\nNote: 1) ensures that k*ln2hi + logc can be computed without rounding error,\n2) ensures that z/c - 1 can be computed as (z - chi - clo)*invc with close to\na single rounding error when there is no fast fma for z*invc - 1, 3) ensures\nthat logc + poly(z/c - 1) has small error, however near x == 1 when\n|log(x)| < 0x1p-4, this is not enough so that is special cased.*/\n\n// @ts-ignore: decorator\n@lazy @inline const LOG_DATA_TAB1 = memory.data([\n // invc , logc\n reinterpret(0x3FF734F0C3E0DE9F), reinterpret(0xBFD7CC7F79E69000),\n reinterpret(0x3FF713786A2CE91F), reinterpret(0xBFD76FEEC20D0000),\n reinterpret(0x3FF6F26008FAB5A0), reinterpret(0xBFD713E31351E000),\n reinterpret(0x3FF6D1A61F138C7D), reinterpret(0xBFD6B85B38287800),\n reinterpret(0x3FF6B1490BC5B4D1), reinterpret(0xBFD65D5590807800),\n reinterpret(0x3FF69147332F0CBA), reinterpret(0xBFD602D076180000),\n reinterpret(0x3FF6719F18224223), reinterpret(0xBFD5A8CA86909000),\n reinterpret(0x3FF6524F99A51ED9), reinterpret(0xBFD54F4356035000),\n reinterpret(0x3FF63356AA8F24C4), reinterpret(0xBFD4F637C36B4000),\n reinterpret(0x3FF614B36B9DDC14), reinterpret(0xBFD49DA7FDA85000),\n reinterpret(0x3FF5F66452C65C4C), reinterpret(0xBFD445923989A800),\n reinterpret(0x3FF5D867B5912C4F), reinterpret(0xBFD3EDF439B0B800),\n reinterpret(0x3FF5BABCCB5B90DE), reinterpret(0xBFD396CE448F7000),\n reinterpret(0x3FF59D61F2D91A78), reinterpret(0xBFD3401E17BDA000),\n reinterpret(0x3FF5805612465687), reinterpret(0xBFD2E9E2EF468000),\n reinterpret(0x3FF56397CEE76BD3), reinterpret(0xBFD2941B3830E000),\n reinterpret(0x3FF54725E2A77F93), reinterpret(0xBFD23EC58CDA8800),\n reinterpret(0x3FF52AFF42064583), reinterpret(0xBFD1E9E129279000),\n reinterpret(0x3FF50F22DBB2BDDF), reinterpret(0xBFD1956D2B48F800),\n reinterpret(0x3FF4F38F4734DED7), reinterpret(0xBFD141679AB9F800),\n reinterpret(0x3FF4D843CFDE2840), reinterpret(0xBFD0EDD094EF9800),\n reinterpret(0x3FF4BD3EC078A3C8), reinterpret(0xBFD09AA518DB1000),\n reinterpret(0x3FF4A27FC3E0258A), reinterpret(0xBFD047E65263B800),\n reinterpret(0x3FF4880524D48434), reinterpret(0xBFCFEB224586F000),\n reinterpret(0x3FF46DCE1B192D0B), reinterpret(0xBFCF474A7517B000),\n reinterpret(0x3FF453D9D3391854), reinterpret(0xBFCEA4443D103000),\n reinterpret(0x3FF43A2744B4845A), reinterpret(0xBFCE020D44E9B000),\n reinterpret(0x3FF420B54115F8FB), reinterpret(0xBFCD60A22977F000),\n reinterpret(0x3FF40782DA3EF4B1), reinterpret(0xBFCCC00104959000),\n reinterpret(0x3FF3EE8F5D57FE8F), reinterpret(0xBFCC202956891000),\n reinterpret(0x3FF3D5D9A00B4CE9), reinterpret(0xBFCB81178D811000),\n reinterpret(0x3FF3BD60C010C12B), reinterpret(0xBFCAE2C9CCD3D000),\n reinterpret(0x3FF3A5242B75DAB8), reinterpret(0xBFCA45402E129000),\n reinterpret(0x3FF38D22CD9FD002), reinterpret(0xBFC9A877681DF000),\n reinterpret(0x3FF3755BC5847A1C), reinterpret(0xBFC90C6D69483000),\n reinterpret(0x3FF35DCE49AD36E2), reinterpret(0xBFC87120A645C000),\n reinterpret(0x3FF34679984DD440), reinterpret(0xBFC7D68FB4143000),\n reinterpret(0x3FF32F5CCEFFCB24), reinterpret(0xBFC73CB83C627000),\n reinterpret(0x3FF3187775A10D49), reinterpret(0xBFC6A39A9B376000),\n reinterpret(0x3FF301C8373E3990), reinterpret(0xBFC60B3154B7A000),\n reinterpret(0x3FF2EB4EBB95F841), reinterpret(0xBFC5737D76243000),\n reinterpret(0x3FF2D50A0219A9D1), reinterpret(0xBFC4DC7B8FC23000),\n reinterpret(0x3FF2BEF9A8B7FD2A), reinterpret(0xBFC4462C51D20000),\n reinterpret(0x3FF2A91C7A0C1BAB), reinterpret(0xBFC3B08ABC830000),\n reinterpret(0x3FF293726014B530), reinterpret(0xBFC31B996B490000),\n reinterpret(0x3FF27DFA5757A1F5), reinterpret(0xBFC2875490A44000),\n reinterpret(0x3FF268B39B1D3BBF), reinterpret(0xBFC1F3B9F879A000),\n reinterpret(0x3FF2539D838FF5BD), reinterpret(0xBFC160C8252CA000),\n reinterpret(0x3FF23EB7AAC9083B), reinterpret(0xBFC0CE7F57F72000),\n reinterpret(0x3FF22A012BA940B6), reinterpret(0xBFC03CDC49FEA000),\n reinterpret(0x3FF2157996CC4132), reinterpret(0xBFBF57BDBC4B8000),\n reinterpret(0x3FF201201DD2FC9B), reinterpret(0xBFBE370896404000),\n reinterpret(0x3FF1ECF4494D480B), reinterpret(0xBFBD17983EF94000),\n reinterpret(0x3FF1D8F5528F6569), reinterpret(0xBFBBF9674ED8A000),\n reinterpret(0x3FF1C52311577E7C), reinterpret(0xBFBADC79202F6000),\n reinterpret(0x3FF1B17C74CB26E9), reinterpret(0xBFB9C0C3E7288000),\n reinterpret(0x3FF19E010C2C1AB6), reinterpret(0xBFB8A646B372C000),\n reinterpret(0x3FF18AB07BB670BD), reinterpret(0xBFB78D01B3AC0000),\n reinterpret(0x3FF1778A25EFBCB6), reinterpret(0xBFB674F145380000),\n reinterpret(0x3FF1648D354C31DA), reinterpret(0xBFB55E0E6D878000),\n reinterpret(0x3FF151B990275FDD), reinterpret(0xBFB4485CDEA1E000),\n reinterpret(0x3FF13F0EA432D24C), reinterpret(0xBFB333D94D6AA000),\n reinterpret(0x3FF12C8B7210F9DA), reinterpret(0xBFB22079F8C56000),\n reinterpret(0x3FF11A3028ECB531), reinterpret(0xBFB10E4698622000),\n reinterpret(0x3FF107FBDA8434AF), reinterpret(0xBFAFFA6C6AD20000),\n reinterpret(0x3FF0F5EE0F4E6BB3), reinterpret(0xBFADDA8D4A774000),\n reinterpret(0x3FF0E4065D2A9FCE), reinterpret(0xBFABBCECE4850000),\n reinterpret(0x3FF0D244632CA521), reinterpret(0xBFA9A1894012C000),\n reinterpret(0x3FF0C0A77CE2981A), reinterpret(0xBFA788583302C000),\n reinterpret(0x3FF0AF2F83C636D1), reinterpret(0xBFA5715E67D68000),\n reinterpret(0x3FF09DDB98A01339), reinterpret(0xBFA35C8A49658000),\n reinterpret(0x3FF08CABAF52E7DF), reinterpret(0xBFA149E364154000),\n reinterpret(0x3FF07B9F2F4E28FB), reinterpret(0xBF9E72C082EB8000),\n reinterpret(0x3FF06AB58C358F19), reinterpret(0xBF9A55F152528000),\n reinterpret(0x3FF059EEA5ECF92C), reinterpret(0xBF963D62CF818000),\n reinterpret(0x3FF04949CDD12C90), reinterpret(0xBF9228FB8CAA0000),\n reinterpret(0x3FF038C6C6F0ADA9), reinterpret(0xBF8C317B20F90000),\n reinterpret(0x3FF02865137932A9), reinterpret(0xBF8419355DAA0000),\n reinterpret(0x3FF0182427EA7348), reinterpret(0xBF781203C2EC0000),\n reinterpret(0x3FF008040614B195), reinterpret(0xBF60040979240000),\n reinterpret(0x3FEFE01FF726FA1A), reinterpret(0x3F6FEFF384900000),\n reinterpret(0x3FEFA11CC261EA74), reinterpret(0x3F87DC41353D0000),\n reinterpret(0x3FEF6310B081992E), reinterpret(0x3F93CEA3C4C28000),\n reinterpret(0x3FEF25F63CEEADCD), reinterpret(0x3F9B9FC114890000),\n reinterpret(0x3FEEE9C8039113E7), reinterpret(0x3FA1B0D8CE110000),\n reinterpret(0x3FEEAE8078CBB1AB), reinterpret(0x3FA58A5BD001C000),\n reinterpret(0x3FEE741AA29D0C9B), reinterpret(0x3FA95C8340D88000),\n reinterpret(0x3FEE3A91830A99B5), reinterpret(0x3FAD276AEF578000),\n reinterpret(0x3FEE01E009609A56), reinterpret(0x3FB07598E598C000),\n reinterpret(0x3FEDCA01E577BB98), reinterpret(0x3FB253F5E30D2000),\n reinterpret(0x3FED92F20B7C9103), reinterpret(0x3FB42EDD8B380000),\n reinterpret(0x3FED5CAC66FB5CCE), reinterpret(0x3FB606598757C000),\n reinterpret(0x3FED272CAA5EDE9D), reinterpret(0x3FB7DA76356A0000),\n reinterpret(0x3FECF26E3E6B2CCD), reinterpret(0x3FB9AB434E1C6000),\n reinterpret(0x3FECBE6DA2A77902), reinterpret(0x3FBB78C7BB0D6000),\n reinterpret(0x3FEC8B266D37086D), reinterpret(0x3FBD431332E72000),\n reinterpret(0x3FEC5894BD5D5804), reinterpret(0x3FBF0A3171DE6000),\n reinterpret(0x3FEC26B533BB9F8C), reinterpret(0x3FC067152B914000),\n reinterpret(0x3FEBF583EEECE73F), reinterpret(0x3FC147858292B000),\n reinterpret(0x3FEBC4FD75DB96C1), reinterpret(0x3FC2266ECDCA3000),\n reinterpret(0x3FEB951E0C864A28), reinterpret(0x3FC303D7A6C55000),\n reinterpret(0x3FEB65E2C5EF3E2C), reinterpret(0x3FC3DFC33C331000),\n reinterpret(0x3FEB374867C9888B), reinterpret(0x3FC4BA366B7A8000),\n reinterpret(0x3FEB094B211D304A), reinterpret(0x3FC5933928D1F000),\n reinterpret(0x3FEADBE885F2EF7E), reinterpret(0x3FC66ACD2418F000),\n reinterpret(0x3FEAAF1D31603DA2), reinterpret(0x3FC740F8EC669000),\n reinterpret(0x3FEA82E63FD358A7), reinterpret(0x3FC815C0F51AF000),\n reinterpret(0x3FEA5740EF09738B), reinterpret(0x3FC8E92954F68000),\n reinterpret(0x3FEA2C2A90AB4B27), reinterpret(0x3FC9BB3602F84000),\n reinterpret(0x3FEA01A01393F2D1), reinterpret(0x3FCA8BED1C2C0000),\n reinterpret(0x3FE9D79F24DB3C1B), reinterpret(0x3FCB5B515C01D000),\n reinterpret(0x3FE9AE2505C7B190), reinterpret(0x3FCC2967CCBCC000),\n reinterpret(0x3FE9852EF297CE2F), reinterpret(0x3FCCF635D5486000),\n reinterpret(0x3FE95CBAEEA44B75), reinterpret(0x3FCDC1BD3446C000),\n reinterpret(0x3FE934C69DE74838), reinterpret(0x3FCE8C01B8CFE000),\n reinterpret(0x3FE90D4F2F6752E6), reinterpret(0x3FCF5509C0179000),\n reinterpret(0x3FE8E6528EFFD79D), reinterpret(0x3FD00E6C121FB800),\n reinterpret(0x3FE8BFCE9FCC007C), reinterpret(0x3FD071B80E93D000),\n reinterpret(0x3FE899C0DABEC30E), reinterpret(0x3FD0D46B9E867000),\n reinterpret(0x3FE87427AA2317FB), reinterpret(0x3FD13687334BD000),\n reinterpret(0x3FE84F00ACB39A08), reinterpret(0x3FD1980D67234800),\n reinterpret(0x3FE82A49E8653E55), reinterpret(0x3FD1F8FFE0CC8000),\n reinterpret(0x3FE8060195F40260), reinterpret(0x3FD2595FD7636800),\n reinterpret(0x3FE7E22563E0A329), reinterpret(0x3FD2B9300914A800),\n reinterpret(0x3FE7BEB377DCB5AD), reinterpret(0x3FD3187210436000),\n reinterpret(0x3FE79BAA679725C2), reinterpret(0x3FD377266DEC1800),\n reinterpret(0x3FE77907F2170657), reinterpret(0x3FD3D54FFBAF3000),\n reinterpret(0x3FE756CADBD6130C), reinterpret(0x3FD432EEE32FE000)\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const LOG_DATA_TAB2 = memory.data([\n // chi , clo\n reinterpret(0x3FE61000014FB66B), reinterpret(0x3C7E026C91425B3C),\n reinterpret(0x3FE63000034DB495), reinterpret(0x3C8DBFEA48005D41),\n reinterpret(0x3FE650000D94D478), reinterpret(0x3C8E7FA786D6A5B7),\n reinterpret(0x3FE67000074E6FAD), reinterpret(0x3C61FCEA6B54254C),\n reinterpret(0x3FE68FFFFEDF0FAE), reinterpret(0xBC7C7E274C590EFD),\n reinterpret(0x3FE6B0000763C5BC), reinterpret(0xBC8AC16848DCDA01),\n reinterpret(0x3FE6D0001E5CC1F6), reinterpret(0x3C833F1C9D499311),\n reinterpret(0x3FE6EFFFEB05F63E), reinterpret(0xBC7E80041AE22D53),\n reinterpret(0x3FE710000E869780), reinterpret(0x3C7BFF6671097952),\n reinterpret(0x3FE72FFFFC67E912), reinterpret(0x3C8C00E226BD8724),\n reinterpret(0x3FE74FFFDF81116A), reinterpret(0xBC6E02916EF101D2),\n reinterpret(0x3FE770000F679C90), reinterpret(0xBC67FC71CD549C74),\n reinterpret(0x3FE78FFFFA7EC835), reinterpret(0x3C81BEC19EF50483),\n reinterpret(0x3FE7AFFFFE20C2E6), reinterpret(0xBC707E1729CC6465),\n reinterpret(0x3FE7CFFFED3FC900), reinterpret(0xBC808072087B8B1C),\n reinterpret(0x3FE7EFFFE9261A76), reinterpret(0x3C8DC0286D9DF9AE),\n reinterpret(0x3FE81000049CA3E8), reinterpret(0x3C897FD251E54C33),\n reinterpret(0x3FE8300017932C8F), reinterpret(0xBC8AFEE9B630F381),\n reinterpret(0x3FE850000633739C), reinterpret(0x3C89BFBF6B6535BC),\n reinterpret(0x3FE87000204289C6), reinterpret(0xBC8BBF65F3117B75),\n reinterpret(0x3FE88FFFEBF57904), reinterpret(0xBC89006EA23DCB57),\n reinterpret(0x3FE8B00022BC04DF), reinterpret(0xBC7D00DF38E04B0A),\n reinterpret(0x3FE8CFFFE50C1B8A), reinterpret(0xBC88007146FF9F05),\n reinterpret(0x3FE8EFFFFC918E43), reinterpret(0x3C83817BD07A7038),\n reinterpret(0x3FE910001EFA5FC7), reinterpret(0x3C893E9176DFB403),\n reinterpret(0x3FE9300013467BB9), reinterpret(0x3C7F804E4B980276),\n reinterpret(0x3FE94FFFE6EE076F), reinterpret(0xBC8F7EF0D9FF622E),\n reinterpret(0x3FE96FFFDE3C12D1), reinterpret(0xBC7082AA962638BA),\n reinterpret(0x3FE98FFFF4458A0D), reinterpret(0xBC87801B9164A8EF),\n reinterpret(0x3FE9AFFFDD982E3E), reinterpret(0xBC8740E08A5A9337),\n reinterpret(0x3FE9CFFFED49FB66), reinterpret(0x3C3FCE08C19BE000),\n reinterpret(0x3FE9F00020F19C51), reinterpret(0xBC8A3FAA27885B0A),\n reinterpret(0x3FEA10001145B006), reinterpret(0x3C74FF489958DA56),\n reinterpret(0x3FEA300007BBF6FA), reinterpret(0x3C8CBEAB8A2B6D18),\n reinterpret(0x3FEA500010971D79), reinterpret(0x3C88FECADD787930),\n reinterpret(0x3FEA70001DF52E48), reinterpret(0xBC8F41763DD8ABDB),\n reinterpret(0x3FEA90001C593352), reinterpret(0xBC8EBF0284C27612),\n reinterpret(0x3FEAB0002A4F3E4B), reinterpret(0xBC69FD043CFF3F5F),\n reinterpret(0x3FEACFFFD7AE1ED1), reinterpret(0xBC823EE7129070B4),\n reinterpret(0x3FEAEFFFEE510478), reinterpret(0x3C6A063EE00EDEA3),\n reinterpret(0x3FEB0FFFDB650D5B), reinterpret(0x3C5A06C8381F0AB9),\n reinterpret(0x3FEB2FFFFEAACA57), reinterpret(0xBC79011E74233C1D),\n reinterpret(0x3FEB4FFFD995BADC), reinterpret(0xBC79FF1068862A9F),\n reinterpret(0x3FEB7000249E659C), reinterpret(0x3C8AFF45D0864F3E),\n reinterpret(0x3FEB8FFFF9871640), reinterpret(0x3C7CFE7796C2C3F9),\n reinterpret(0x3FEBAFFFD204CB4F), reinterpret(0xBC63FF27EEF22BC4),\n reinterpret(0x3FEBCFFFD2415C45), reinterpret(0xBC6CFFB7EE3BEA21),\n reinterpret(0x3FEBEFFFF86309DF), reinterpret(0xBC814103972E0B5C),\n reinterpret(0x3FEC0FFFE1B57653), reinterpret(0x3C8BC16494B76A19),\n reinterpret(0x3FEC2FFFF1FA57E3), reinterpret(0xBC64FEEF8D30C6ED),\n reinterpret(0x3FEC4FFFDCBFE424), reinterpret(0xBC843F68BCEC4775),\n reinterpret(0x3FEC6FFFED54B9F7), reinterpret(0x3C847EA3F053E0EC),\n reinterpret(0x3FEC8FFFEB998FD5), reinterpret(0x3C7383068DF992F1),\n reinterpret(0x3FECB0002125219A), reinterpret(0xBC68FD8E64180E04),\n reinterpret(0x3FECCFFFDD94469C), reinterpret(0x3C8E7EBE1CC7EA72),\n reinterpret(0x3FECEFFFEAFDC476), reinterpret(0x3C8EBE39AD9F88FE),\n reinterpret(0x3FED1000169AF82B), reinterpret(0x3C757D91A8B95A71),\n reinterpret(0x3FED30000D0FF71D), reinterpret(0x3C89C1906970C7DA),\n reinterpret(0x3FED4FFFEA790FC4), reinterpret(0xBC580E37C558FE0C),\n reinterpret(0x3FED70002EDC87E5), reinterpret(0xBC7F80D64DC10F44),\n reinterpret(0x3FED900021DC82AA), reinterpret(0xBC747C8F94FD5C5C),\n reinterpret(0x3FEDAFFFD86B0283), reinterpret(0x3C8C7F1DC521617E),\n reinterpret(0x3FEDD000296C4739), reinterpret(0x3C88019EB2FFB153),\n reinterpret(0x3FEDEFFFE54490F5), reinterpret(0x3C6E00D2C652CC89),\n reinterpret(0x3FEE0FFFCDABF694), reinterpret(0xBC7F8340202D69D2),\n reinterpret(0x3FEE2FFFDB52C8DD), reinterpret(0x3C7B00C1CA1B0864),\n reinterpret(0x3FEE4FFFF24216EF), reinterpret(0x3C72FFA8B094AB51),\n reinterpret(0x3FEE6FFFE88A5E11), reinterpret(0xBC57F673B1EFBE59),\n reinterpret(0x3FEE9000119EFF0D), reinterpret(0xBC84808D5E0BC801),\n reinterpret(0x3FEEAFFFDFA51744), reinterpret(0x3C780006D54320B5),\n reinterpret(0x3FEED0001A127FA1), reinterpret(0xBC5002F860565C92),\n reinterpret(0x3FEEF00007BABCC4), reinterpret(0xBC8540445D35E611),\n reinterpret(0x3FEF0FFFF57A8D02), reinterpret(0xBC4FFB3139EF9105),\n reinterpret(0x3FEF30001EE58AC7), reinterpret(0x3C8A81ACF2731155),\n reinterpret(0x3FEF4FFFF5823494), reinterpret(0x3C8A3F41D4D7C743),\n reinterpret(0x3FEF6FFFFCA94C6B), reinterpret(0xBC6202F41C987875),\n reinterpret(0x3FEF8FFFE1F9C441), reinterpret(0x3C777DD1F477E74B),\n reinterpret(0x3FEFAFFFD2E0E37E), reinterpret(0xBC6F01199A7CA331),\n reinterpret(0x3FEFD0001C77E49E), reinterpret(0x3C7181EE4BCEACB1),\n reinterpret(0x3FEFEFFFF7E0C331), reinterpret(0xBC6E05370170875A),\n reinterpret(0x3FF00FFFF465606E), reinterpret(0xBC8A7EAD491C0ADA),\n reinterpret(0x3FF02FFFF3867A58), reinterpret(0xBC977F69C3FCB2E0),\n reinterpret(0x3FF04FFFFDFC0D17), reinterpret(0x3C97BFFE34CB945B),\n reinterpret(0x3FF0700003CD4D82), reinterpret(0x3C820083C0E456CB),\n reinterpret(0x3FF08FFFF9F2CBE8), reinterpret(0xBC6DFFDFBE37751A),\n reinterpret(0x3FF0B000010CDA65), reinterpret(0xBC913F7FAEE626EB),\n reinterpret(0x3FF0D00001A4D338), reinterpret(0x3C807DFA79489FF7),\n reinterpret(0x3FF0EFFFFADAFDFD), reinterpret(0xBC77040570D66BC0),\n reinterpret(0x3FF110000BBAFD96), reinterpret(0x3C8E80D4846D0B62),\n reinterpret(0x3FF12FFFFAE5F45D), reinterpret(0x3C9DBFFA64FD36EF),\n reinterpret(0x3FF150000DD59AD9), reinterpret(0x3C9A0077701250AE),\n reinterpret(0x3FF170000F21559A), reinterpret(0x3C8DFDF9E2E3DEEE),\n reinterpret(0x3FF18FFFFC275426), reinterpret(0x3C910030DC3B7273),\n reinterpret(0x3FF1B000123D3C59), reinterpret(0x3C997F7980030188),\n reinterpret(0x3FF1CFFFF8299EB7), reinterpret(0xBC65F932AB9F8C67),\n reinterpret(0x3FF1EFFFF48AD400), reinterpret(0x3C937FBF9DA75BEB),\n reinterpret(0x3FF210000C8B86A4), reinterpret(0x3C9F806B91FD5B22),\n reinterpret(0x3FF2300003854303), reinterpret(0x3C93FFC2EB9FBF33),\n reinterpret(0x3FF24FFFFFBCF684), reinterpret(0x3C7601E77E2E2E72),\n reinterpret(0x3FF26FFFF52921D9), reinterpret(0x3C7FFCBB767F0C61),\n reinterpret(0x3FF2900014933A3C), reinterpret(0xBC7202CA3C02412B),\n reinterpret(0x3FF2B00014556313), reinterpret(0xBC92808233F21F02),\n reinterpret(0x3FF2CFFFEBFE523B), reinterpret(0xBC88FF7E384FDCF2),\n reinterpret(0x3FF2F0000BB8AD96), reinterpret(0xBC85FF51503041C5),\n reinterpret(0x3FF30FFFFB7AE2AF), reinterpret(0xBC810071885E289D),\n reinterpret(0x3FF32FFFFEAC5F7F), reinterpret(0xBC91FF5D3FB7B715),\n reinterpret(0x3FF350000CA66756), reinterpret(0x3C957F82228B82BD),\n reinterpret(0x3FF3700011FBF721), reinterpret(0x3C8000BAC40DD5CC),\n reinterpret(0x3FF38FFFF9592FB9), reinterpret(0xBC943F9D2DB2A751),\n reinterpret(0x3FF3B00004DDD242), reinterpret(0x3C857F6B707638E1),\n reinterpret(0x3FF3CFFFF5B2C957), reinterpret(0x3C7A023A10BF1231),\n reinterpret(0x3FF3EFFFEAB0B418), reinterpret(0x3C987F6D66B152B0),\n reinterpret(0x3FF410001532AFF4), reinterpret(0x3C67F8375F198524),\n reinterpret(0x3FF4300017478B29), reinterpret(0x3C8301E672DC5143),\n reinterpret(0x3FF44FFFE795B463), reinterpret(0x3C89FF69B8B2895A),\n reinterpret(0x3FF46FFFE80475E0), reinterpret(0xBC95C0B19BC2F254),\n reinterpret(0x3FF48FFFEF6FC1E7), reinterpret(0x3C9B4009F23A2A72),\n reinterpret(0x3FF4AFFFE5BEA704), reinterpret(0xBC94FFB7BF0D7D45),\n reinterpret(0x3FF4D000171027DE), reinterpret(0xBC99C06471DC6A3D),\n reinterpret(0x3FF4F0000FF03EE2), reinterpret(0x3C977F890B85531C),\n reinterpret(0x3FF5100012DC4BD1), reinterpret(0x3C6004657166A436),\n reinterpret(0x3FF530001605277A), reinterpret(0xBC96BFCECE233209),\n reinterpret(0x3FF54FFFECDB704C), reinterpret(0xBC8902720505A1D7),\n reinterpret(0x3FF56FFFEF5F54A9), reinterpret(0x3C9BBFE60EC96412),\n reinterpret(0x3FF5900017E61012), reinterpret(0x3C887EC581AFEF90),\n reinterpret(0x3FF5B00003C93E92), reinterpret(0xBC9F41080ABF0CC0),\n reinterpret(0x3FF5D0001D4919BC), reinterpret(0xBC98812AFB254729),\n reinterpret(0x3FF5EFFFE7B87A89), reinterpret(0xBC947EB780ED6904)\n]);\n\n// @ts-ignore: decorator\n@inline\nexport function log_lut(x: f64): f64 {\n const N_MASK = (1 << LOG_TABLE_BITS) - 1;\n\n const\n B0 = reinterpret(0xBFE0000000000000), // -0x1p-1\n B1 = reinterpret(0x3FD5555555555577), // 0x1.5555555555577p-2\n B2 = reinterpret(0xBFCFFFFFFFFFFDCB), // -0x1.ffffffffffdcbp-3\n B3 = reinterpret(0x3FC999999995DD0C), // 0x1.999999995dd0cp-3\n B4 = reinterpret(0xBFC55555556745A7), // -0x1.55555556745a7p-3\n B5 = reinterpret(0x3FC24924A344DE30), // 0x1.24924a344de3p-3\n B6 = reinterpret(0xBFBFFFFFA4423D65), // -0x1.fffffa4423d65p-4\n B7 = reinterpret(0x3FBC7184282AD6CA), // 0x1.c7184282ad6cap-4\n B8 = reinterpret(0xBFB999EB43B068FF), // -0x1.999eb43b068ffp-4\n B9 = reinterpret(0x3FB78182F7AFD085), // 0x1.78182f7afd085p-4\n B10 = reinterpret(0xBFB5521375D145CD); // -0x1.5521375d145cdp-4\n\n const\n A0 = reinterpret(0xBFE0000000000001), // -0x1.0000000000001p-1\n A1 = reinterpret(0x3FD555555551305B), // 0x1.555555551305bp-2\n A2 = reinterpret(0xBFCFFFFFFFEB4590), // -0x1.fffffffeb459p-3\n A3 = reinterpret(0x3FC999B324F10111), // 0x1.999b324f10111p-3\n A4 = reinterpret(0xBFC55575E506C89F); // -0x1.55575e506c89fp-3\n\n const\n LO: u64 = 0x3FEE000000000000,\n HI: u64 = 0x3FF1090000000000;\n\n const\n Ln2hi = reinterpret(0x3FE62E42FEFA3800), // 0x1.62e42fefa3800p-1\n Ln2lo = reinterpret(0x3D2EF35793C76730), // 0x1.ef35793c76730p-45\n Ox1p27 = reinterpret(0x41A0000000000000), // 0x1p27\n Ox1p52 = reinterpret(0x4330000000000000); // 0x1p52\n\n var ix = reinterpret(x);\n if (ix - LO < HI - LO) {\n let r = x - 1.0;\n let r2 = r * r;\n let r3 = r2 * r;\n let y =\n r3 * (B1 + r * B2 + r2 * B3 +\n r3 * (B4 + r * B5 + r2 * B6 +\n r3 * (B7 + r * B8 + r2 * B9 + r3 * B10)));\n // Worst-case error is around 0.507 ULP\n let w = r * Ox1p27;\n let rhi = r + w - w;\n let rlo = r - rhi;\n w = rhi * rhi * B0; // B[0] == -0.5\n let hi = r + w;\n let lo = r - hi + w;\n lo += B0 * rlo * (rhi + r);\n return y + lo + hi;\n }\n var top = u32(ix >> 48);\n if (top - 0x0010 >= 0x7FF0 - 0x0010) {\n // x < 0x1p-1022 or inf or nan\n if ((ix << 1) == 0) return -1.0 / (x * x);\n if (ix == reinterpret(Infinity)) return x; // log(inf) == inf\n if ((top & 0x8000) || (top & 0x7FF0) == 0x7FF0) return (x - x) / (x - x);\n // x is subnormal, normalize it\n ix = reinterpret(x * Ox1p52);\n ix -= u64(52) << 52;\n }\n\n // x = 2^k z; where z is in range [OFF,2*OFF) and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n var tmp = ix - 0x3FE6000000000000;\n var i = ((tmp >> (52 - LOG_TABLE_BITS)) & N_MASK);\n var k = tmp >> 52;\n var iz = ix - (tmp & (u64(0xFFF) << 52));\n\n var invc = load(LOG_DATA_TAB1 + (i << (1 + alignof())), 0 << alignof()); // T[i].invc;\n var logc = load(LOG_DATA_TAB1 + (i << (1 + alignof())), 1 << alignof()); // T[i].logc;\n var z = reinterpret(iz);\n\n // log(x) = log1p(z/c-1) + log(c) + k*Ln2.\n // r ~= z/c - 1, |r| < 1/(2*N)\n // #if __FP_FAST_FMA\n // \t// rounding error: 0x1p-55/N\n // \tr = __builtin_fma(z, invc, -1.0);\n // #else\n // rounding error: 0x1p-55/N + 0x1p-66\n const chi = load(LOG_DATA_TAB2 + (i << (1 + alignof())), 0 << alignof()); // T2[i].chi\n const clo = load(LOG_DATA_TAB2 + (i << (1 + alignof())), 1 << alignof()); // T2[i].clo\n var r = (z - chi - clo) * invc;\n // #endif\n var kd = k;\n\n // hi + lo = r + log(c) + k*Ln2\n var w = kd * Ln2hi + logc;\n var hi = w + r;\n var lo = w - hi + r + kd * Ln2lo;\n\n // log(x) = lo + (log1p(r) - r) + hi\n var r2 = r * r; // rounding error: 0x1p-54/N^2\n // Worst case error if |y| > 0x1p-5:\n // 0.5 + 4.13/N + abs-poly-error*2^57 ULP (+ 0.002 ULP without fma)\n // Worst case error if |y| > 0x1p-4:\n // 0.5 + 2.06/N + abs-poly-error*2^56 ULP (+ 0.001 ULP without fma).\n return lo + r2 * A0 + r * r2 * (A1 + r * A2 + r2 * (A3 + r * A4)) + hi;\n}\n\n//\n// Lookup data for pow. See: https://git.musl-libc.org/cgit/musl/tree/src/math/pow.c\n//\n\n// @ts-ignore: decorator\n@inline const POW_LOG_TABLE_BITS = 7;\n\n/* Algorithm:\n\n x = 2^k z\n log(x) = k ln2 + log(c) + log(z/c)\n log(z/c) = poly(z/c - 1)\n\nwhere z is in [0x1.69555p-1; 0x1.69555p0] which is split into N subintervals\nand z falls into the ith one, then table entries are computed as\n\n tab[i].invc = 1/c\n tab[i].logc = round(0x1p43*log(c))/0x1p43\n tab[i].logctail = (double)(log(c) - logc)\n\nwhere c is chosen near the center of the subinterval such that 1/c has only a\nfew precision bits so z/c - 1 is exactly representible as double:\n\n 1/c = center < 1 ? round(N/center)/N : round(2*N/center)/N/2\n\nNote: |z/c - 1| < 1/N for the chosen c, |log(c) - logc - logctail| < 0x1p-97,\nthe last few bits of logc are rounded away so k*ln2hi + logc has no rounding\nerror and the interval for z is selected such that near x == 1, where log(x)\nis tiny, large cancellation error is avoided in logc + poly(z/c - 1). */\n\n// @ts-ignore: decorator\n@lazy @inline const POW_LOG_DATA_TAB = memory.data([\n // invc ,pad, logc , logctail\n reinterpret(0x3FF6A00000000000), 0, reinterpret(0xBFD62C82F2B9C800), reinterpret(0x3CFAB42428375680),\n reinterpret(0x3FF6800000000000), 0, reinterpret(0xBFD5D1BDBF580800), reinterpret(0xBD1CA508D8E0F720),\n reinterpret(0x3FF6600000000000), 0, reinterpret(0xBFD5767717455800), reinterpret(0xBD2362A4D5B6506D),\n reinterpret(0x3FF6400000000000), 0, reinterpret(0xBFD51AAD872DF800), reinterpret(0xBCE684E49EB067D5),\n reinterpret(0x3FF6200000000000), 0, reinterpret(0xBFD4BE5F95777800), reinterpret(0xBD041B6993293EE0),\n reinterpret(0x3FF6000000000000), 0, reinterpret(0xBFD4618BC21C6000), reinterpret(0x3D13D82F484C84CC),\n reinterpret(0x3FF5E00000000000), 0, reinterpret(0xBFD404308686A800), reinterpret(0x3CDC42F3ED820B3A),\n reinterpret(0x3FF5C00000000000), 0, reinterpret(0xBFD3A64C55694800), reinterpret(0x3D20B1C686519460),\n reinterpret(0x3FF5A00000000000), 0, reinterpret(0xBFD347DD9A988000), reinterpret(0x3D25594DD4C58092),\n reinterpret(0x3FF5800000000000), 0, reinterpret(0xBFD2E8E2BAE12000), reinterpret(0x3D267B1E99B72BD8),\n reinterpret(0x3FF5600000000000), 0, reinterpret(0xBFD2895A13DE8800), reinterpret(0x3D15CA14B6CFB03F),\n reinterpret(0x3FF5600000000000), 0, reinterpret(0xBFD2895A13DE8800), reinterpret(0x3D15CA14B6CFB03F),\n reinterpret(0x3FF5400000000000), 0, reinterpret(0xBFD22941FBCF7800), reinterpret(0xBD165A242853DA76),\n reinterpret(0x3FF5200000000000), 0, reinterpret(0xBFD1C898C1699800), reinterpret(0xBD1FAFBC68E75404),\n reinterpret(0x3FF5000000000000), 0, reinterpret(0xBFD1675CABABA800), reinterpret(0x3D1F1FC63382A8F0),\n reinterpret(0x3FF4E00000000000), 0, reinterpret(0xBFD1058BF9AE4800), reinterpret(0xBD26A8C4FD055A66),\n reinterpret(0x3FF4C00000000000), 0, reinterpret(0xBFD0A324E2739000), reinterpret(0xBD0C6BEE7EF4030E),\n reinterpret(0x3FF4A00000000000), 0, reinterpret(0xBFD0402594B4D000), reinterpret(0xBCF036B89EF42D7F),\n reinterpret(0x3FF4A00000000000), 0, reinterpret(0xBFD0402594B4D000), reinterpret(0xBCF036B89EF42D7F),\n reinterpret(0x3FF4800000000000), 0, reinterpret(0xBFCFB9186D5E4000), reinterpret(0x3D0D572AAB993C87),\n reinterpret(0x3FF4600000000000), 0, reinterpret(0xBFCEF0ADCBDC6000), reinterpret(0x3D2B26B79C86AF24),\n reinterpret(0x3FF4400000000000), 0, reinterpret(0xBFCE27076E2AF000), reinterpret(0xBD172F4F543FFF10),\n reinterpret(0x3FF4200000000000), 0, reinterpret(0xBFCD5C216B4FC000), reinterpret(0x3D21BA91BBCA681B),\n reinterpret(0x3FF4000000000000), 0, reinterpret(0xBFCC8FF7C79AA000), reinterpret(0x3D27794F689F8434),\n reinterpret(0x3FF4000000000000), 0, reinterpret(0xBFCC8FF7C79AA000), reinterpret(0x3D27794F689F8434),\n reinterpret(0x3FF3E00000000000), 0, reinterpret(0xBFCBC286742D9000), reinterpret(0x3D194EB0318BB78F),\n reinterpret(0x3FF3C00000000000), 0, reinterpret(0xBFCAF3C94E80C000), reinterpret(0x3CBA4E633FCD9066),\n reinterpret(0x3FF3A00000000000), 0, reinterpret(0xBFCA23BC1FE2B000), reinterpret(0xBD258C64DC46C1EA),\n reinterpret(0x3FF3A00000000000), 0, reinterpret(0xBFCA23BC1FE2B000), reinterpret(0xBD258C64DC46C1EA),\n reinterpret(0x3FF3800000000000), 0, reinterpret(0xBFC9525A9CF45000), reinterpret(0xBD2AD1D904C1D4E3),\n reinterpret(0x3FF3600000000000), 0, reinterpret(0xBFC87FA06520D000), reinterpret(0x3D2BBDBF7FDBFA09),\n reinterpret(0x3FF3400000000000), 0, reinterpret(0xBFC7AB890210E000), reinterpret(0x3D2BDB9072534A58),\n reinterpret(0x3FF3400000000000), 0, reinterpret(0xBFC7AB890210E000), reinterpret(0x3D2BDB9072534A58),\n reinterpret(0x3FF3200000000000), 0, reinterpret(0xBFC6D60FE719D000), reinterpret(0xBD10E46AA3B2E266),\n reinterpret(0x3FF3000000000000), 0, reinterpret(0xBFC5FF3070A79000), reinterpret(0xBD1E9E439F105039),\n reinterpret(0x3FF3000000000000), 0, reinterpret(0xBFC5FF3070A79000), reinterpret(0xBD1E9E439F105039),\n reinterpret(0x3FF2E00000000000), 0, reinterpret(0xBFC526E5E3A1B000), reinterpret(0xBD20DE8B90075B8F),\n reinterpret(0x3FF2C00000000000), 0, reinterpret(0xBFC44D2B6CCB8000), reinterpret(0x3D170CC16135783C),\n reinterpret(0x3FF2C00000000000), 0, reinterpret(0xBFC44D2B6CCB8000), reinterpret(0x3D170CC16135783C),\n reinterpret(0x3FF2A00000000000), 0, reinterpret(0xBFC371FC201E9000), reinterpret(0x3CF178864D27543A),\n reinterpret(0x3FF2800000000000), 0, reinterpret(0xBFC29552F81FF000), reinterpret(0xBD248D301771C408),\n reinterpret(0x3FF2600000000000), 0, reinterpret(0xBFC1B72AD52F6000), reinterpret(0xBD2E80A41811A396),\n reinterpret(0x3FF2600000000000), 0, reinterpret(0xBFC1B72AD52F6000), reinterpret(0xBD2E80A41811A396),\n reinterpret(0x3FF2400000000000), 0, reinterpret(0xBFC0D77E7CD09000), reinterpret(0x3D0A699688E85BF4),\n reinterpret(0x3FF2400000000000), 0, reinterpret(0xBFC0D77E7CD09000), reinterpret(0x3D0A699688E85BF4),\n reinterpret(0x3FF2200000000000), 0, reinterpret(0xBFBFEC9131DBE000), reinterpret(0xBD2575545CA333F2),\n reinterpret(0x3FF2000000000000), 0, reinterpret(0xBFBE27076E2B0000), reinterpret(0x3D2A342C2AF0003C),\n reinterpret(0x3FF2000000000000), 0, reinterpret(0xBFBE27076E2B0000), reinterpret(0x3D2A342C2AF0003C),\n reinterpret(0x3FF1E00000000000), 0, reinterpret(0xBFBC5E548F5BC000), reinterpret(0xBD1D0C57585FBE06),\n reinterpret(0x3FF1C00000000000), 0, reinterpret(0xBFBA926D3A4AE000), reinterpret(0x3D253935E85BAAC8),\n reinterpret(0x3FF1C00000000000), 0, reinterpret(0xBFBA926D3A4AE000), reinterpret(0x3D253935E85BAAC8),\n reinterpret(0x3FF1A00000000000), 0, reinterpret(0xBFB8C345D631A000), reinterpret(0x3D137C294D2F5668),\n reinterpret(0x3FF1A00000000000), 0, reinterpret(0xBFB8C345D631A000), reinterpret(0x3D137C294D2F5668),\n reinterpret(0x3FF1800000000000), 0, reinterpret(0xBFB6F0D28AE56000), reinterpret(0xBD269737C93373DA),\n reinterpret(0x3FF1600000000000), 0, reinterpret(0xBFB51B073F062000), reinterpret(0x3D1F025B61C65E57),\n reinterpret(0x3FF1600000000000), 0, reinterpret(0xBFB51B073F062000), reinterpret(0x3D1F025B61C65E57),\n reinterpret(0x3FF1400000000000), 0, reinterpret(0xBFB341D7961BE000), reinterpret(0x3D2C5EDACCF913DF),\n reinterpret(0x3FF1400000000000), 0, reinterpret(0xBFB341D7961BE000), reinterpret(0x3D2C5EDACCF913DF),\n reinterpret(0x3FF1200000000000), 0, reinterpret(0xBFB16536EEA38000), reinterpret(0x3D147C5E768FA309),\n reinterpret(0x3FF1000000000000), 0, reinterpret(0xBFAF0A30C0118000), reinterpret(0x3D2D599E83368E91),\n reinterpret(0x3FF1000000000000), 0, reinterpret(0xBFAF0A30C0118000), reinterpret(0x3D2D599E83368E91),\n reinterpret(0x3FF0E00000000000), 0, reinterpret(0xBFAB42DD71198000), reinterpret(0x3D1C827AE5D6704C),\n reinterpret(0x3FF0E00000000000), 0, reinterpret(0xBFAB42DD71198000), reinterpret(0x3D1C827AE5D6704C),\n reinterpret(0x3FF0C00000000000), 0, reinterpret(0xBFA77458F632C000), reinterpret(0xBD2CFC4634F2A1EE),\n reinterpret(0x3FF0C00000000000), 0, reinterpret(0xBFA77458F632C000), reinterpret(0xBD2CFC4634F2A1EE),\n reinterpret(0x3FF0A00000000000), 0, reinterpret(0xBFA39E87B9FEC000), reinterpret(0x3CF502B7F526FEAA),\n reinterpret(0x3FF0A00000000000), 0, reinterpret(0xBFA39E87B9FEC000), reinterpret(0x3CF502B7F526FEAA),\n reinterpret(0x3FF0800000000000), 0, reinterpret(0xBF9F829B0E780000), reinterpret(0xBD2980267C7E09E4),\n reinterpret(0x3FF0800000000000), 0, reinterpret(0xBF9F829B0E780000), reinterpret(0xBD2980267C7E09E4),\n reinterpret(0x3FF0600000000000), 0, reinterpret(0xBF97B91B07D58000), reinterpret(0xBD288D5493FAA639),\n reinterpret(0x3FF0400000000000), 0, reinterpret(0xBF8FC0A8B0FC0000), reinterpret(0xBCDF1E7CF6D3A69C),\n reinterpret(0x3FF0400000000000), 0, reinterpret(0xBF8FC0A8B0FC0000), reinterpret(0xBCDF1E7CF6D3A69C),\n reinterpret(0x3FF0200000000000), 0, reinterpret(0xBF7FE02A6B100000), reinterpret(0xBD19E23F0DDA40E4),\n reinterpret(0x3FF0200000000000), 0, reinterpret(0xBF7FE02A6B100000), reinterpret(0xBD19E23F0DDA40E4),\n reinterpret(0x3FF0000000000000), 0, 0, 0,\n reinterpret(0x3FF0000000000000), 0, 0, 0,\n reinterpret(0x3FEFC00000000000), 0, reinterpret(0x3F80101575890000), reinterpret(0xBD10C76B999D2BE8),\n reinterpret(0x3FEF800000000000), 0, reinterpret(0x3F90205658938000), reinterpret(0xBD23DC5B06E2F7D2),\n reinterpret(0x3FEF400000000000), 0, reinterpret(0x3F98492528C90000), reinterpret(0xBD2AA0BA325A0C34),\n reinterpret(0x3FEF000000000000), 0, reinterpret(0x3FA0415D89E74000), reinterpret(0x3D0111C05CF1D753),\n reinterpret(0x3FEEC00000000000), 0, reinterpret(0x3FA466AED42E0000), reinterpret(0xBD2C167375BDFD28),\n reinterpret(0x3FEE800000000000), 0, reinterpret(0x3FA894AA149FC000), reinterpret(0xBD197995D05A267D),\n reinterpret(0x3FEE400000000000), 0, reinterpret(0x3FACCB73CDDDC000), reinterpret(0xBD1A68F247D82807),\n reinterpret(0x3FEE200000000000), 0, reinterpret(0x3FAEEA31C006C000), reinterpret(0xBD0E113E4FC93B7B),\n reinterpret(0x3FEDE00000000000), 0, reinterpret(0x3FB1973BD1466000), reinterpret(0xBD25325D560D9E9B),\n reinterpret(0x3FEDA00000000000), 0, reinterpret(0x3FB3BDF5A7D1E000), reinterpret(0x3D2CC85EA5DB4ED7),\n reinterpret(0x3FED600000000000), 0, reinterpret(0x3FB5E95A4D97A000), reinterpret(0xBD2C69063C5D1D1E),\n reinterpret(0x3FED400000000000), 0, reinterpret(0x3FB700D30AEAC000), reinterpret(0x3CEC1E8DA99DED32),\n reinterpret(0x3FED000000000000), 0, reinterpret(0x3FB9335E5D594000), reinterpret(0x3D23115C3ABD47DA),\n reinterpret(0x3FECC00000000000), 0, reinterpret(0x3FBB6AC88DAD6000), reinterpret(0xBD1390802BF768E5),\n reinterpret(0x3FECA00000000000), 0, reinterpret(0x3FBC885801BC4000), reinterpret(0x3D2646D1C65AACD3),\n reinterpret(0x3FEC600000000000), 0, reinterpret(0x3FBEC739830A2000), reinterpret(0xBD2DC068AFE645E0),\n reinterpret(0x3FEC400000000000), 0, reinterpret(0x3FBFE89139DBE000), reinterpret(0xBD2534D64FA10AFD),\n reinterpret(0x3FEC000000000000), 0, reinterpret(0x3FC1178E8227E000), reinterpret(0x3D21EF78CE2D07F2),\n reinterpret(0x3FEBE00000000000), 0, reinterpret(0x3FC1AA2B7E23F000), reinterpret(0x3D2CA78E44389934),\n reinterpret(0x3FEBA00000000000), 0, reinterpret(0x3FC2D1610C868000), reinterpret(0x3D039D6CCB81B4A1),\n reinterpret(0x3FEB800000000000), 0, reinterpret(0x3FC365FCB0159000), reinterpret(0x3CC62FA8234B7289),\n reinterpret(0x3FEB400000000000), 0, reinterpret(0x3FC4913D8333B000), reinterpret(0x3D25837954FDB678),\n reinterpret(0x3FEB200000000000), 0, reinterpret(0x3FC527E5E4A1B000), reinterpret(0x3D2633E8E5697DC7),\n reinterpret(0x3FEAE00000000000), 0, reinterpret(0x3FC6574EBE8C1000), reinterpret(0x3D19CF8B2C3C2E78),\n reinterpret(0x3FEAC00000000000), 0, reinterpret(0x3FC6F0128B757000), reinterpret(0xBD25118DE59C21E1),\n reinterpret(0x3FEAA00000000000), 0, reinterpret(0x3FC7898D85445000), reinterpret(0xBD1C661070914305),\n reinterpret(0x3FEA600000000000), 0, reinterpret(0x3FC8BEAFEB390000), reinterpret(0xBD073D54AAE92CD1),\n reinterpret(0x3FEA400000000000), 0, reinterpret(0x3FC95A5ADCF70000), reinterpret(0x3D07F22858A0FF6F),\n reinterpret(0x3FEA000000000000), 0, reinterpret(0x3FCA93ED3C8AE000), reinterpret(0xBD28724350562169),\n reinterpret(0x3FE9E00000000000), 0, reinterpret(0x3FCB31D8575BD000), reinterpret(0xBD0C358D4EACE1AA),\n reinterpret(0x3FE9C00000000000), 0, reinterpret(0x3FCBD087383BE000), reinterpret(0xBD2D4BC4595412B6),\n reinterpret(0x3FE9A00000000000), 0, reinterpret(0x3FCC6FFBC6F01000), reinterpret(0xBCF1EC72C5962BD2),\n reinterpret(0x3FE9600000000000), 0, reinterpret(0x3FCDB13DB0D49000), reinterpret(0xBD2AFF2AF715B035),\n reinterpret(0x3FE9400000000000), 0, reinterpret(0x3FCE530EFFE71000), reinterpret(0x3CC212276041F430),\n reinterpret(0x3FE9200000000000), 0, reinterpret(0x3FCEF5ADE4DD0000), reinterpret(0xBCCA211565BB8E11),\n reinterpret(0x3FE9000000000000), 0, reinterpret(0x3FCF991C6CB3B000), reinterpret(0x3D1BCBECCA0CDF30),\n reinterpret(0x3FE8C00000000000), 0, reinterpret(0x3FD07138604D5800), reinterpret(0x3CF89CDB16ED4E91),\n reinterpret(0x3FE8A00000000000), 0, reinterpret(0x3FD0C42D67616000), reinterpret(0x3D27188B163CEAE9),\n reinterpret(0x3FE8800000000000), 0, reinterpret(0x3FD1178E8227E800), reinterpret(0xBD2C210E63A5F01C),\n reinterpret(0x3FE8600000000000), 0, reinterpret(0x3FD16B5CCBACF800), reinterpret(0x3D2B9ACDF7A51681),\n reinterpret(0x3FE8400000000000), 0, reinterpret(0x3FD1BF99635A6800), reinterpret(0x3D2CA6ED5147BDB7),\n reinterpret(0x3FE8200000000000), 0, reinterpret(0x3FD214456D0EB800), reinterpret(0x3D0A87DEBA46BAEA),\n reinterpret(0x3FE7E00000000000), 0, reinterpret(0x3FD2BEF07CDC9000), reinterpret(0x3D2A9CFA4A5004F4),\n reinterpret(0x3FE7C00000000000), 0, reinterpret(0x3FD314F1E1D36000), reinterpret(0xBD28E27AD3213CB8),\n reinterpret(0x3FE7A00000000000), 0, reinterpret(0x3FD36B6776BE1000), reinterpret(0x3D116ECDB0F177C8),\n reinterpret(0x3FE7800000000000), 0, reinterpret(0x3FD3C25277333000), reinterpret(0x3D183B54B606BD5C),\n reinterpret(0x3FE7600000000000), 0, reinterpret(0x3FD419B423D5E800), reinterpret(0x3D08E436EC90E09D),\n reinterpret(0x3FE7400000000000), 0, reinterpret(0x3FD4718DC271C800), reinterpret(0xBD2F27CE0967D675),\n reinterpret(0x3FE7200000000000), 0, reinterpret(0x3FD4C9E09E173000), reinterpret(0xBD2E20891B0AD8A4),\n reinterpret(0x3FE7000000000000), 0, reinterpret(0x3FD522AE0738A000), reinterpret(0x3D2EBE708164C759),\n reinterpret(0x3FE6E00000000000), 0, reinterpret(0x3FD57BF753C8D000), reinterpret(0x3D1FADEDEE5D40EF),\n reinterpret(0x3FE6C00000000000), 0, reinterpret(0x3FD5D5BDDF596000), reinterpret(0xBD0A0B2A08A465DC)\n]);\n\n// Returns 0 if not int, 1 if odd int, 2 if even int. The argument is\n// the bit representation of a non-zero finite floating-point value.\n// @ts-ignore: decorator\n@inline\nfunction checkint(iy: u64): i32 {\n var e = iy >> 52 & 0x7FF;\n if (e < 0x3FF ) return 0;\n if (e > 0x3FF + 52) return 2;\n e = u64(1) << (0x3FF + 52 - e);\n if (iy & (e - 1)) return 0;\n if (iy & e ) return 1;\n return 2;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction xflow(sign: u32, y: f64): f64 {\n return select(-y, y, sign) * y;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction uflow(sign: u32): f64 {\n return xflow(sign, reinterpret(0x1000000000000000)); // 0x1p-767\n}\n\n// @ts-ignore: decorator\n@inline\nfunction oflow(sign: u32): f64 {\n return xflow(sign, reinterpret(0x7000000000000000)); // 0x1p769\n}\n\n// Returns 1 if input is the bit representation of 0, infinity or nan.\n// @ts-ignore: decorator\n@inline\nfunction zeroinfnan(u: u64): bool {\n return (u << 1) - 1 >= 0xFFE0000000000000 - 1;\n}\n\n// @ts-ignore: decorator\n@lazy var log_tail: f64 = 0;\n\n// Compute y+TAIL = log(x) where the rounded result is y and TAIL has about\n// additional 15 bits precision. IX is the bit representation of x, but\n// normalized in the subnormal range using the sign bit for the exponent.\n// @ts-ignore: decorator\n@inline\nfunction log_inline(ix: u64): f64 {\n const N = 1 << POW_LOG_TABLE_BITS;\n const N_MASK = N - 1;\n\n const\n Ln2hi = reinterpret(0x3FE62E42FEFA3800),\n Ln2lo = reinterpret(0x3D2EF35793C76730);\n\n const\n A0 = reinterpret(0xBFE0000000000000),\n A1 = reinterpret(0xBFE5555555555560),\n A2 = reinterpret(0x3FE0000000000006),\n A3 = reinterpret(0x3FE999999959554E),\n A4 = reinterpret(0xBFE555555529A47A),\n A5 = reinterpret(0xBFF2495B9B4845E9),\n A6 = reinterpret(0x3FF0002B8B263FC3);\n\n // x = 2^k z; where z is in range [OFF,2*OFF) and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n var tmp = ix - 0x3fE6955500000000;\n var i = ((tmp >> (52 - POW_LOG_TABLE_BITS)) & N_MASK);\n var k = tmp >> 52;\n var iz = ix - (tmp & u64(0xFFF) << 52);\n var z = reinterpret(iz);\n var kd = k;\n\n // log(x) = k*Ln2 + log(c) + log1p(z/c-1).\n var invc = load(POW_LOG_DATA_TAB + (i << (2 + alignof())), 0 << alignof()); // tab[i].invc\n var logc = load(POW_LOG_DATA_TAB + (i << (2 + alignof())), 2 << alignof()); // tab[i].logc\n var logctail = load(POW_LOG_DATA_TAB + (i << (2 + alignof())), 3 << alignof()); // tab[i].logctail\n\n // Note: 1/c is j/N or j/N/2 where j is an integer in [N,2N) and\n // |z/c - 1| < 1/N, so r = z/c - 1 is exactly representible.\n // Split z such that rhi, rlo and rhi*rhi are exact and |rlo| <= |r|.\n var zhi = reinterpret((iz + u64(0x80000000)) & 0xFFFFFFFF00000000);\n var zlo = z - zhi;\n var rhi = zhi * invc - 1.0;\n var rlo = zlo * invc;\n var r = rhi + rlo;\n\n // k * Ln2 + log(c) + r.\n var t1 = kd * Ln2hi + logc;\n var t2 = t1 + r;\n var lo1 = kd * Ln2lo + logctail;\n var lo2 = t1 - t2 + r;\n\n // Evaluation is optimized assuming superscalar pipelined execution.\n var ar = A0 * r; // A[0] = -0.5\n var ar2 = r * ar;\n var ar3 = r * ar2;\n // k * Ln2 + log(c) + r + A[0] * r * r.\n var arhi = A0 * rhi;\n var arhi2 = rhi * arhi;\n var hi = t2 + arhi2;\n var lo3 = rlo * (ar + arhi);\n var lo4 = t2 - hi + arhi2;\n\n // p = log1p(r) - r - A[0] * r * r.\n var p = ar3 * (A1 + r * A2 + ar2 * (A3 + r * A4 + ar2 * (A5 + r * A6)));\n var lo = lo1 + lo2 + lo3 + lo4 + p;\n var y = hi + lo;\n log_tail = hi - y + lo;\n\n return y;\n}\n\n// @ts-ignore: decorator\n@inline const SIGN_BIAS = 0x800 << EXP_TABLE_BITS;\n\n// Computes sign*exp(x+xtail) where |xtail| < 2^-8/N and |xtail| <= |x|.\n// The sign_bias argument is SIGN_BIAS or 0 and sets the sign to -1 or 1.\n// @ts-ignore: decorator\n@inline\nfunction exp_inline(x: f64, xtail: f64, sign_bias: u32): f64 {\n const N = 1 << EXP_TABLE_BITS;\n const N_MASK = N - 1;\n\n const\n InvLn2N = reinterpret(0x3FF71547652B82FE) * N, // 0x1.71547652b82fep0\n NegLn2hiN = reinterpret(0xBF762E42FEFA0000), // -0x1.62e42fefa0000p-8\n NegLn2loN = reinterpret(0xBD0CF79ABC9E3B3A), // -0x1.cf79abc9e3b3ap-47\n shift = reinterpret(0x4338000000000000); // 0x1.8p52\n\n const\n C2 = reinterpret(0x3FDFFFFFFFFFFDBD), // __exp_data.poly[0] (0x1.ffffffffffdbdp-2)\n C3 = reinterpret(0x3FC555555555543C), // __exp_data.poly[1] (0x1.555555555543cp-3)\n C4 = reinterpret(0x3FA55555CF172B91), // __exp_data.poly[2] (0x1.55555cf172b91p-5)\n C5 = reinterpret(0x3F81111167A4D017); // __exp_data.poly[3] (0x1.1111167a4d017p-7)\n\n var abstop: u32;\n var ki: u64, top: u64, sbits: u64;\n var idx: usize;\n // double_t for better performance on targets with FLT_EVAL_METHOD==2.\n var kd: f64, z: f64, r: f64, r2: f64, scale: f64, tail: f64, tmp: f64;\n\n var ux = reinterpret(x);\n abstop = (ux >> 52) & 0x7FF;\n if (abstop - 0x3C9 >= 0x03F) {\n if (abstop - 0x3C9 >= 0x80000000) {\n // Avoid spurious underflow for tiny x.\n // Note: 0 is common input.\n return select(-1.0, 1.0, sign_bias);\n }\n if (abstop >= 0x409) { // top12(1024.0)\n // Note: inf and nan are already handled.\n return ux >> 63 ? uflow(sign_bias) : oflow(sign_bias);\n }\n // Large x is special cased below.\n abstop = 0;\n }\n\n // exp(x) = 2^(k/N) * exp(r), with exp(r) in [2^(-1/2N),2^(1/2N)].\n // x = ln2/N*k + r, with int k and r in [-ln2/2N, ln2/2N].\n z = InvLn2N * x;\n\n // #if TOINT_INTRINSICS\n // kd = roundtoint(z);\n // ki = converttoint(z);\n // #elif EXP_USE_TOINT_NARROW\n // // z - kd is in [-0.5-2^-16, 0.5] in all rounding modes.\n // kd = eval_as_double(z + shift);\n // ki = asuint64(kd) >> 16;\n // kd = (double_t)(int32_t)ki;\n // #else\n // z - kd is in [-1, 1] in non-nearest rounding modes\n kd = z + shift;\n ki = reinterpret(kd);\n kd -= shift;\n // #endif\n r = x + kd * NegLn2hiN + kd * NegLn2loN;\n // The code assumes 2^-200 < |xtail| < 2^-8/N\n r += xtail;\n // 2^(k/N) ~= scale * (1 + tail)\n idx = ((ki & N_MASK) << 1);\n top = (ki + sign_bias) << (52 - EXP_TABLE_BITS);\n\n tail = reinterpret(load(EXP_DATA_TAB + (idx << alignof())));\n // This is only a valid scale when -1023*N < k < 1024*N\n sbits = load(EXP_DATA_TAB + (idx << alignof()), 1 << alignof()) + top;\n // exp(x) = 2^(k/N) * exp(r) ~= scale + scale * (tail + exp(r) - 1).\n // Evaluation is optimized assuming superscalar pipelined execution.\n r2 = r * r;\n // Without fma the worst case error is 0.25/N ulp larger.\n // Worst case error is less than 0.5+1.11/N+(abs poly error * 2^53) ulp\n tmp = tail + r + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5);\n if (abstop == 0) return specialcase(tmp, sbits, ki);\n scale = reinterpret(sbits);\n // Note: tmp == 0 or |tmp| > 2^-200 and scale > 2^-739, so there\n // is no spurious underflow here even without fma.\n return scale + scale * tmp;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function pow_lut(x: f64, y: f64): f64 {\n const Ox1p52 = reinterpret(0x4330000000000000); // 0x1p52\n\n var sign_bias: u32 = 0;\n var ix = reinterpret(x);\n var iy = reinterpret(y);\n var topx = ix >> 52;\n var topy = iy >> 52;\n\n if (topx - 0x001 >= 0x7FF - 0x001 || (topy & 0x7FF) - 0x3BE >= 0x43e - 0x3BE) {\n // Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y) = inf/0\n // and if |y| < 2^-54 / 1075 ~= 0x1.e7b6p-65 then pow(x,y) = +-1.\n // Special cases: (x < 0x1p-126 or inf or nan) or\n // (|y| < 0x1p-65 or |y| >= 0x1p63 or nan).\n if (zeroinfnan(iy)) {\n if ((iy << 1) == 0) return 1.0;\n if (ix == 0x3FF0000000000000) return NaN; // original: 1.0\n if ((ix << 1) > 0xFFE0000000000000 || (iy << 1) > 0xFFE0000000000000) return x + y;\n if ((ix << 1) == 0x7FE0000000000000) return NaN; // original: 1.0\n if (((ix << 1) < 0x7FE0000000000000) == !(iy >> 63)) return 0; // |x|<1 && y==inf or |x|>1 && y==-inf.\n return y * y;\n }\n if (zeroinfnan(ix)) {\n let x2 = x * x;\n if (i32(ix >> 63) && checkint(iy) == 1) x2 = -x2;\n return iy >> 63 ? 1 / x2 : x2;\n }\n // Here x and y are non-zero finite\n if (ix >> 63) {\n // Finite x < 0\n let yint = checkint(iy);\n if (yint == 0) return (x - x) / (x - x);\n if (yint == 1) sign_bias = SIGN_BIAS;\n ix &= 0x7FFFFFFFFFFFFFFF;\n topx &= 0x7FF;\n }\n if ((topy & 0x7FF) - 0x3BE >= 0x43E - 0x3BE) {\n // Note: sign_bias == 0 here because y is not odd.\n if (ix == 0x3FF0000000000000) return 1;\n if ((topy & 0x7FF) < 0x3BE) return 1; // |y| < 2^-65, x^y ~= 1 + y*log(x).\n return (ix > 0x3FF0000000000000) == (topy < 0x800) ? Infinity : 0;\n }\n if (topx == 0) {\n // Normalize subnormal x so exponent becomes negative.\n ix = reinterpret(x * Ox1p52);\n ix &= 0x7FFFFFFFFFFFFFFF;\n ix -= u64(52) << 52;\n }\n }\n\n var hi = log_inline(ix);\n var lo = log_tail;\n var ehi: f64, elo: f64;\n // #if __FP_FAST_FMA\n // ehi = y * hi;\n // elo = y * lo + __builtin_fma(y, hi, -ehi);\n // #else\n var yhi = reinterpret(iy & 0xFFFFFFFFF8000000);\n var ylo = y - yhi;\n var lhi = reinterpret(reinterpret(hi) & 0xFFFFFFFFF8000000);\n var llo = hi - lhi + lo;\n ehi = yhi * lhi;\n elo = ylo * lhi + y * llo; // |elo| < |ehi| * 2^-25.\n // #endif\n return exp_inline(ehi, elo, sign_bias);\n}\n", + "util/memory": "export function memcpy(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memcpy.c\n var w: u32, x: u32;\n\n // copy 1 byte each until src is aligned to 4 bytes\n while (n && (src & 3)) {\n store(dest++, load(src++));\n n--;\n }\n\n // if dst is aligned to 4 bytes as well, copy 4 bytes each\n if ((dest & 3) == 0) {\n while (n >= 16) {\n store(dest , load(src ));\n store(dest + 4, load(src + 4));\n store(dest + 8, load(src + 8));\n store(dest + 12, load(src + 12));\n src += 16; dest += 16; n -= 16;\n }\n if (n & 8) {\n store(dest , load(src ));\n store(dest + 4, load(src + 4));\n dest += 8; src += 8;\n }\n if (n & 4) {\n store(dest, load(src));\n dest += 4; src += 4;\n }\n if (n & 2) { // drop to 2 bytes each\n store(dest, load(src));\n dest += 2; src += 2;\n }\n if (n & 1) { // drop to 1 byte\n store(dest++, load(src++));\n }\n return;\n }\n\n // if dst is not aligned to 4 bytes, use alternating shifts to copy 4 bytes each\n // doing shifts if faster when copying enough bytes (here: 32 or more)\n if (n >= 32) {\n switch (dest & 3) {\n // known to be != 0\n case 1: {\n w = load(src);\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n n -= 3;\n while (n >= 17) {\n x = load(src + 1);\n store(dest, w >> 24 | x << 8);\n w = load(src + 5);\n store(dest + 4, x >> 24 | w << 8);\n x = load(src + 9);\n store(dest + 8, w >> 24 | x << 8);\n w = load(src + 13);\n store(dest + 12, x >> 24 | w << 8);\n src += 16; dest += 16; n -= 16;\n }\n break;\n }\n case 2: {\n w = load(src);\n store(dest++, load(src++));\n store(dest++, load(src++));\n n -= 2;\n while (n >= 18) {\n x = load(src + 2);\n store(dest, w >> 16 | x << 16);\n w = load(src + 6);\n store(dest + 4, x >> 16 | w << 16);\n x = load(src + 10);\n store(dest + 8, w >> 16 | x << 16);\n w = load(src + 14);\n store(dest + 12, x >> 16 | w << 16);\n src += 16; dest += 16; n -= 16;\n }\n break;\n }\n case 3: {\n w = load(src);\n store(dest++, load(src++));\n n -= 1;\n while (n >= 19) {\n x = load(src + 3);\n store(dest, w >> 8 | x << 24);\n w = load(src + 7);\n store(dest + 4, x >> 8 | w << 24);\n x = load(src + 11);\n store(dest + 8, w >> 8 | x << 24);\n w = load(src + 15);\n store(dest + 12, x >> 8 | w << 24);\n src += 16; dest += 16; n -= 16;\n }\n break;\n }\n }\n }\n\n // copy remaining bytes one by one\n if (n & 16) {\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n }\n if (n & 8) {\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n }\n if (n & 4) {\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n }\n if (n & 2) {\n store(dest++, load(src++));\n store(dest++, load(src++));\n }\n if (n & 1) {\n store(dest++, load(src++));\n }\n}\n\n// @ts-ignore: decorator\n@inline\nexport function memmove(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memmove.c\n if (dest === src) return;\n if (ASC_SHRINK_LEVEL < 1) {\n if (src - dest - n <= -(n << 1)) {\n memcpy(dest, src, n);\n return;\n }\n }\n if (dest < src) {\n if (ASC_SHRINK_LEVEL < 2) {\n if ((src & 7) == (dest & 7)) {\n while (dest & 7) {\n if (!n) return;\n --n;\n store(dest++, load(src++));\n }\n while (n >= 8) {\n store(dest, load(src));\n n -= 8;\n dest += 8;\n src += 8;\n }\n }\n }\n while (n) {\n store(dest++, load(src++));\n --n;\n }\n } else {\n if (ASC_SHRINK_LEVEL < 2) {\n if ((src & 7) == (dest & 7)) {\n while ((dest + n) & 7) {\n if (!n) return;\n store(dest + --n, load(src + n));\n }\n while (n >= 8) {\n n -= 8;\n store(dest + n, load(src + n));\n }\n }\n }\n while (n) {\n store(dest + --n, load(src + n));\n }\n }\n}\n\n// @ts-ignore: decorator\n@inline\nexport function memset(dest: usize, c: u8, n: usize): void { // see: musl/src/string/memset\n if (ASC_SHRINK_LEVEL > 1) {\n while (n) {\n store(dest++, c);\n --n;\n }\n } else {\n // fill head and tail with minimal branching\n if (!n) return;\n let dend = dest + n;\n store(dest, c);\n store(dend - 1, c);\n if (n <= 2) return;\n store(dest, c, 1);\n store(dest, c, 2);\n store(dend - 2, c);\n store(dend - 3, c);\n if (n <= 6) return;\n store(dest, c, 3);\n store(dend - 4, c);\n if (n <= 8) return;\n\n // advance pointer to align it at 4-byte boundary\n let k: usize = -dest & 3;\n dest += k;\n n -= k;\n n &= -4;\n\n let c32: u32 = -1 / 255 * c;\n\n // fill head/tail up to 28 bytes each in preparation\n dend = dest + n;\n store(dest, c32);\n store(dend - 4, c32);\n if (n <= 8) return;\n store(dest, c32, 4);\n store(dest, c32, 8);\n store(dend - 12, c32);\n store(dend - 8, c32);\n if (n <= 24) return;\n store(dest, c32, 12);\n store(dest, c32, 16);\n store(dest, c32, 20);\n store(dest, c32, 24);\n store(dend - 28, c32);\n store(dend - 24, c32);\n store(dend - 20, c32);\n store(dend - 16, c32);\n\n // align to a multiple of 8\n k = 24 + (dest & 4);\n dest += k;\n n -= k;\n\n // copy 32 bytes each\n let c64: u64 = c32 | (c32 << 32);\n while (n >= 32) {\n store(dest, c64);\n store(dest, c64, 8);\n store(dest, c64, 16);\n store(dest, c64, 24);\n n -= 32;\n dest += 32;\n }\n }\n}\n\n// @ts-ignore: decorator\n@inline\nexport function memcmp(vl: usize, vr: usize, n: usize): i32 {\n if (vl == vr) return 0;\n if (ASC_SHRINK_LEVEL < 2) {\n if ((vl & 7) == (vr & 7)) {\n while (vl & 7) {\n if (!n) return 0;\n let a = load(vl);\n let b = load(vr);\n if (a != b) return a - b;\n n--; vl++; vr++;\n }\n while (n >= 8) {\n if (load(vl) != load(vr)) break;\n vl += 8;\n vr += 8;\n n -= 8;\n }\n }\n }\n while (n--) {\n let a = load(vl);\n let b = load(vr);\n if (a != b) return a - b;\n vl++; vr++;\n }\n return 0;\n}\n", + "util/number": "/// \n\nimport { idof } from \"../builtins\";\nimport { CharCode } from \"./string\";\n\n// @ts-ignore: decorator\n@inline\nexport const MAX_DOUBLE_LENGTH = 28;\n\n// @ts-ignore: decorator\n@lazy @inline const POWERS10 = memory.data([\n 1,\n 10,\n 100,\n 1000,\n 10000,\n 100000,\n 1000000,\n 10000000,\n 100000000,\n 1000000000\n]);\n\n/*\n Lookup table for pairwise char codes in range [0-99]\n\n \"00\", \"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\",\n \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\",\n \"20\", \"21\", \"22\", \"23\", \"24\", \"25\", \"26\", \"27\", \"28\", \"29\",\n \"30\", \"31\", \"32\", \"33\", \"34\", \"35\", \"36\", \"37\", \"38\", \"39\",\n \"40\", \"41\", \"42\", \"43\", \"44\", \"45\", \"46\", \"47\", \"48\", \"49\",\n \"50\", \"51\", \"52\", \"53\", \"54\", \"55\", \"56\", \"57\", \"58\", \"59\",\n \"60\", \"61\", \"62\", \"63\", \"64\", \"65\", \"66\", \"67\", \"68\", \"69\",\n \"70\", \"71\", \"72\", \"73\", \"74\", \"75\", \"76\", \"77\", \"78\", \"79\",\n \"80\", \"81\", \"82\", \"83\", \"84\", \"85\", \"86\", \"87\", \"88\", \"89\",\n \"90\", \"91\", \"92\", \"93\", \"94\", \"95\", \"96\", \"97\", \"98\", \"99\"\n*/\n// @ts-ignore: decorator\n@lazy @inline const DIGITS = memory.data([\n 0x00300030, 0x00310030, 0x00320030, 0x00330030, 0x00340030,\n 0x00350030, 0x00360030, 0x00370030, 0x00380030, 0x00390030,\n 0x00300031, 0x00310031, 0x00320031, 0x00330031, 0x00340031,\n 0x00350031, 0x00360031, 0x00370031, 0x00380031, 0x00390031,\n 0x00300032, 0x00310032, 0x00320032, 0x00330032, 0x00340032,\n 0x00350032, 0x00360032, 0x00370032, 0x00380032, 0x00390032,\n 0x00300033, 0x00310033, 0x00320033, 0x00330033, 0x00340033,\n 0x00350033, 0x00360033, 0x00370033, 0x00380033, 0x00390033,\n 0x00300034, 0x00310034, 0x00320034, 0x00330034, 0x00340034,\n 0x00350034, 0x00360034, 0x00370034, 0x00380034, 0x00390034,\n 0x00300035, 0x00310035, 0x00320035, 0x00330035, 0x00340035,\n 0x00350035, 0x00360035, 0x00370035, 0x00380035, 0x00390035,\n 0x00300036, 0x00310036, 0x00320036, 0x00330036, 0x00340036,\n 0x00350036, 0x00360036, 0x00370036, 0x00380036, 0x00390036,\n 0x00300037, 0x00310037, 0x00320037, 0x00330037, 0x00340037,\n 0x00350037, 0x00360037, 0x00370037, 0x00380037, 0x00390037,\n 0x00300038, 0x00310038, 0x00320038, 0x00330038, 0x00340038,\n 0x00350038, 0x00360038, 0x00370038, 0x00380038, 0x00390038,\n 0x00300039, 0x00310039, 0x00320039, 0x00330039, 0x00340039,\n 0x00350039, 0x00360039, 0x00370039, 0x00380039, 0x00390039\n]);\n\n// Lookup table for pairwise char codes in range [0x00-0xFF]\n// @ts-ignore: decorator\n@lazy @inline const HEX_DIGITS =\n\"000102030405060708090a0b0c0d0e0f\\\n101112131415161718191a1b1c1d1e1f\\\n202122232425262728292a2b2c2d2e2f\\\n303132333435363738393a3b3c3d3e3f\\\n404142434445464748494a4b4c4d4e4f\\\n505152535455565758595a5b5c5d5e5f\\\n606162636465666768696a6b6c6d6e6f\\\n707172737475767778797a7b7c7d7e7f\\\n808182838485868788898a8b8c8d8e8f\\\n909192939495969798999a9b9c9d9e9f\\\na0a1a2a3a4a5a6a7a8a9aaabacadaeaf\\\nb0b1b2b3b4b5b6b7b8b9babbbcbdbebf\\\nc0c1c2c3c4c5c6c7c8c9cacbcccdcecf\\\nd0d1d2d3d4d5d6d7d8d9dadbdcdddedf\\\ne0e1e2e3e4e5e6e7e8e9eaebecedeeef\\\nf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff\";\n\n// @ts-ignore: decorator\n@lazy @inline const ANY_DIGITS = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\n// @ts-ignore: decorator\n@lazy @inline const EXP_POWERS = memory.data([/* eslint-disable indent */\n -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980,\n -954, -927, -901, -874, -847, -821, -794, -768, -741, -715,\n -688, -661, -635, -608, -582, -555, -529, -502, -475, -449,\n -422, -396, -369, -343, -316, -289, -263, -236, -210, -183,\n -157, -130, -103, -77, -50, -24, 3, 30, 56, 83,\n 109, 136, 162, 189, 216, 242, 269, 295, 322, 348,\n 375, 402, 428, 455, 481, 508, 534, 561, 588, 614,\n 641, 667, 694, 720, 747, 774, 800, 827, 853, 880,\n 907, 933, 960, 986, 1013, 1039, 1066\n/* eslint-enable indent */]);\n\n// 1e-348, 1e-340, ..., 1e340\n// @ts-ignore: decorator\n@lazy @inline const FRC_POWERS = memory.data([\n 0xFA8FD5A0081C0288, 0xBAAEE17FA23EBF76, 0x8B16FB203055AC76, 0xCF42894A5DCE35EA,\n 0x9A6BB0AA55653B2D, 0xE61ACF033D1A45DF, 0xAB70FE17C79AC6CA, 0xFF77B1FCBEBCDC4F,\n 0xBE5691EF416BD60C, 0x8DD01FAD907FFC3C, 0xD3515C2831559A83, 0x9D71AC8FADA6C9B5,\n 0xEA9C227723EE8BCB, 0xAECC49914078536D, 0x823C12795DB6CE57, 0xC21094364DFB5637,\n 0x9096EA6F3848984F, 0xD77485CB25823AC7, 0xA086CFCD97BF97F4, 0xEF340A98172AACE5,\n 0xB23867FB2A35B28E, 0x84C8D4DFD2C63F3B, 0xC5DD44271AD3CDBA, 0x936B9FCEBB25C996,\n 0xDBAC6C247D62A584, 0xA3AB66580D5FDAF6, 0xF3E2F893DEC3F126, 0xB5B5ADA8AAFF80B8,\n 0x87625F056C7C4A8B, 0xC9BCFF6034C13053, 0x964E858C91BA2655, 0xDFF9772470297EBD,\n 0xA6DFBD9FB8E5B88F, 0xF8A95FCF88747D94, 0xB94470938FA89BCF, 0x8A08F0F8BF0F156B,\n 0xCDB02555653131B6, 0x993FE2C6D07B7FAC, 0xE45C10C42A2B3B06, 0xAA242499697392D3,\n 0xFD87B5F28300CA0E, 0xBCE5086492111AEB, 0x8CBCCC096F5088CC, 0xD1B71758E219652C,\n 0x9C40000000000000, 0xE8D4A51000000000, 0xAD78EBC5AC620000, 0x813F3978F8940984,\n 0xC097CE7BC90715B3, 0x8F7E32CE7BEA5C70, 0xD5D238A4ABE98068, 0x9F4F2726179A2245,\n 0xED63A231D4C4FB27, 0xB0DE65388CC8ADA8, 0x83C7088E1AAB65DB, 0xC45D1DF942711D9A,\n 0x924D692CA61BE758, 0xDA01EE641A708DEA, 0xA26DA3999AEF774A, 0xF209787BB47D6B85,\n 0xB454E4A179DD1877, 0x865B86925B9BC5C2, 0xC83553C5C8965D3D, 0x952AB45CFA97A0B3,\n 0xDE469FBD99A05FE3, 0xA59BC234DB398C25, 0xF6C69A72A3989F5C, 0xB7DCBF5354E9BECE,\n 0x88FCF317F22241E2, 0xCC20CE9BD35C78A5, 0x98165AF37B2153DF, 0xE2A0B5DC971F303A,\n 0xA8D9D1535CE3B396, 0xFB9B7CD9A4A7443C, 0xBB764C4CA7A44410, 0x8BAB8EEFB6409C1A,\n 0xD01FEF10A657842C, 0x9B10A4E5E9913129, 0xE7109BFBA19C0C9D, 0xAC2820D9623BF429,\n 0x80444B5E7AA7CF85, 0xBF21E44003ACDD2D, 0x8E679C2F5E44FF8F, 0xD433179D9C8CB841,\n 0x9E19DB92B4E31BA9, 0xEB96BF6EBADF77D9, 0xAF87023B9BF0EE6B\n]);\n\n// @ts-ignore: decorator\n@inline\nexport function isPowerOf2(value: T): bool {\n return popcnt(value) == 1;\n}\n\n// Count number of decimals for u32 values\n// In our case input value always non-zero so we can simplify some parts\nexport function decimalCount32(value: u32): u32 {\n if (value < 100000) {\n if (value < 100) {\n return 1 + u32(value >= 10);\n } else {\n return 3 + u32(value >= 10000) + u32(value >= 1000);\n }\n } else {\n if (value < 10000000) {\n return 6 + u32(value >= 1000000);\n } else {\n return 8 + u32(value >= 1000000000) + u32(value >= 100000000);\n }\n }\n}\n\n// Count number of decimals for u64 values\n// In our case input value always greater than 2^32-1 so we can skip some parts\nexport function decimalCount64High(value: u64): u32 {\n if (value < 1000000000000000) {\n if (value < 1000000000000) {\n return 10 + u32(value >= 100000000000) + u32(value >= 10000000000);\n } else {\n return 13 + u32(value >= 100000000000000) + u32(value >= 10000000000000);\n }\n } else {\n if (value < 100000000000000000) {\n return 16 + u32(value >= 10000000000000000);\n } else {\n return 18 + u32(value >= 10000000000000000000) + u32(value >= 1000000000000000000);\n }\n }\n}\n\nfunction ulog_base(num: u64, base: i32): u32 {\n if (isPowerOf2(base)) {\n return (63 - clz(num)) / (31 - clz(base)) + 1;\n }\n var b64 = u64(base), b = b64, e: u32 = 1;\n while (num >= b) {\n num /= b;\n b *= b;\n e <<= 1;\n }\n while (num >= 1) {\n num /= b64;\n e++;\n }\n return e - 1;\n}\n\nfunction utoa32_dec_lut(buffer: usize, num: u32, offset: usize): void {\n while (num >= 10000) {\n // in most VMs i32/u32 div and modulo by constant can be shared and simplificate\n let t = num / 10000;\n let r = num % 10000;\n num = t;\n\n let d1 = r / 100;\n let d2 = r % 100;\n\n let digits1 = load(DIGITS + (d1 << alignof()));\n let digits2 = load(DIGITS + (d2 << alignof()));\n\n offset -= 4;\n store(buffer + (offset << 1), digits1 | (digits2 << 32));\n }\n\n if (num >= 100) {\n let t = num / 100;\n let d1 = num % 100;\n num = t;\n offset -= 2;\n let digits = load(DIGITS + (d1 << alignof()));\n store(buffer + (offset << 1), digits);\n }\n\n if (num >= 10) {\n offset -= 2;\n let digits = load(DIGITS + (num << alignof()));\n store(buffer + (offset << 1), digits);\n } else {\n offset -= 1;\n let digit = CharCode._0 + num;\n store(buffer + (offset << 1), digit);\n }\n}\n\nfunction utoa64_dec_lut(buffer: usize, num: u64, offset: usize): void {\n while (num >= 100000000) {\n let t = num / 100000000;\n let r = (num - t * 100000000);\n num = t;\n\n let b = r / 10000;\n let c = r % 10000;\n\n let b1 = b / 100;\n let b2 = b % 100;\n let c1 = c / 100;\n let c2 = c % 100;\n\n let digits1 = load(DIGITS + (c1 << alignof()));\n let digits2 = load(DIGITS + (c2 << alignof()));\n\n offset -= 4;\n store(buffer + (offset << 1), digits1 | (digits2 << 32));\n\n digits1 = load(DIGITS + (b1 << alignof()));\n digits2 = load(DIGITS + (b2 << alignof()));\n\n offset -= 4;\n store(buffer + (offset << 1), digits1 | (digits2 << 32));\n }\n\n utoa32_dec_lut(buffer, num, offset);\n}\n\nfunction utoa_hex_lut(buffer: usize, num: u64, offset: usize): void {\n const lut = changetype(HEX_DIGITS);\n while (offset >= 2) {\n offset -= 2;\n store(\n buffer + (offset << 1),\n load(lut + ((num & 0xFF) << alignof()))\n );\n num >>= 8;\n }\n if (offset & 1) {\n store(buffer, load(lut + (num << 6)));\n }\n}\n\nfunction utoa_dec_simple(buffer: usize, num: T, offset: usize): void {\n do {\n let t = num / 10;\n let r = (num % 10);\n num = changetype(t);\n offset--;\n store(buffer + (offset << 1), CharCode._0 + r);\n } while (num);\n}\n\nfunction utoa_hex_simple(buffer: usize, num: T, offset: usize): void {\n do {\n let d = num & 0x0F | CharCode._0;\n d += select(0x27, 0, d > CharCode._9);\n offset--;\n store(buffer + (offset << 1), d);\n // @ts-ignore: type\n num >>= 4;\n } while (num);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function utoa32_dec_core(buffer: usize, num: u32, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_dec_simple(buffer, num, offset);\n } else {\n utoa32_dec_lut(buffer, num, offset);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction utoa32_hex_core(buffer: usize, num: u32, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_hex_simple(buffer, num, offset);\n } else {\n utoa_hex_lut(buffer, num, offset);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction utoa64_dec_core(buffer: usize, num: u64, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_dec_simple(buffer, num, offset);\n } else {\n utoa64_dec_lut(buffer, num, offset);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction utoa64_hex_core(buffer: usize, num: u64, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_hex_simple(buffer, num, offset);\n } else {\n utoa_hex_lut(buffer, num, offset);\n }\n}\n\nfunction utoa64_any_core(buffer: usize, num: u64, offset: usize, radix: i32): void {\n const lut = changetype(ANY_DIGITS);\n var base = u64(radix);\n if ((radix & (radix - 1)) == 0) { // for radix which pow of two\n let shift = u64(ctz(radix) & 7);\n let mask = base - 1;\n do {\n offset--;\n store(buffer + (offset << 1), load(lut + (usize(num & mask) << 1)));\n num >>= shift;\n } while (num);\n } else {\n do {\n offset--;\n let q = num / base;\n store(buffer + (offset << 1), load(lut + (usize(num - q * base) << 1)));\n num = q;\n } while (num);\n }\n}\n\nexport function utoa32(value: u32, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n var out: String;\n\n if (radix == 10) {\n let decimals = decimalCount32(value);\n out = changetype(__new(decimals << 1, idof()));\n utoa32_dec_core(changetype(out), value, decimals);\n } else if (radix == 16) {\n let decimals = (31 - clz(value) >> 2) + 1;\n out = changetype(__new(decimals << 1, idof()));\n utoa32_hex_core(changetype(out), value, decimals);\n } else {\n let decimals = ulog_base(value, radix);\n out = changetype(__new(decimals << 1, idof()));\n utoa64_any_core(changetype(out), value, decimals, radix);\n }\n return out;\n}\n\nexport function itoa32(value: i32, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n\n var sign = value >>> 31;\n if (sign) value = -value;\n var out: String;\n\n if (radix == 10) {\n let decimals = decimalCount32(value) + sign;\n out = changetype(__new(decimals << 1, idof()));\n utoa32_dec_core(changetype(out), value, decimals);\n } else if (radix == 16) {\n let decimals = (31 - clz(value) >> 2) + 1 + sign;\n out = changetype(__new(decimals << 1, idof()));\n utoa32_hex_core(changetype(out), value, decimals);\n } else {\n let val32 = u32(value);\n let decimals = ulog_base(val32, radix) + sign;\n out = changetype(__new(decimals << 1, idof()));\n utoa64_any_core(changetype(out), val32, decimals, radix);\n }\n if (sign) store(changetype(out), CharCode.MINUS);\n return out;\n}\n\nexport function utoa64(value: u64, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n var out: String;\n\n if (radix == 10) {\n if (value <= u32.MAX_VALUE) {\n let val32 = value;\n let decimals = decimalCount32(val32);\n out = changetype(__new(decimals << 1, idof()));\n utoa32_dec_core(changetype(out), val32, decimals);\n } else {\n let decimals = decimalCount64High(value);\n out = changetype(__new(decimals << 1, idof()));\n utoa64_dec_core(changetype(out), value, decimals);\n }\n } else if (radix == 16) {\n let decimals = (63 - u32(clz(value)) >> 2) + 1;\n out = changetype(__new(decimals << 1, idof()));\n utoa64_hex_core(changetype(out), value, decimals);\n } else {\n let decimals = ulog_base(value, radix);\n out = changetype(__new(decimals << 1, idof()));\n utoa64_any_core(changetype(out), value, decimals, radix);\n }\n return out;\n}\n\nexport function itoa64(value: i64, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n\n var sign = u32(value >>> 63);\n if (sign) value = -value;\n var out: String;\n\n if (radix == 10) {\n if (value <= u32.MAX_VALUE) {\n let val32 = value;\n let decimals = decimalCount32(val32) + sign;\n out = changetype(__new(decimals << 1, idof()));\n utoa32_dec_core(changetype(out), val32, decimals);\n } else {\n let decimals = decimalCount64High(value) + sign;\n out = changetype(__new(decimals << 1, idof()));\n utoa64_dec_core(changetype(out), value, decimals);\n }\n } else if (radix == 16) {\n let decimals = (63 - u32(clz(value)) >> 2) + 1 + sign;\n out = changetype(__new(decimals << 1, idof()));\n utoa64_hex_core(changetype(out), value, decimals);\n } else {\n let decimals = ulog_base(value, radix) + sign;\n out = changetype(__new(decimals << 1, idof()));\n utoa64_any_core(changetype(out), value, decimals, radix);\n }\n if (sign) store(changetype(out), CharCode.MINUS);\n return out;\n}\n\n// @ts-ignore: decorator\n@lazy var _K: i32 = 0;\n\n// // @ts-ignore: decorator\n// @lazy\n// var _frc: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy var _exp: i32 = 0;\n\n// @ts-ignore: decorator\n@lazy var _frc_minus: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy var _frc_plus: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy var _frc_pow: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy var _exp_pow: i32 = 0;\n\n// @ts-ignore: decorator\n@inline\nfunction umul64f(u: u64, v: u64): u64 {\n var u0 = u & 0xFFFFFFFF;\n var v0 = v & 0xFFFFFFFF;\n\n var u1 = u >> 32;\n var v1 = v >> 32;\n\n var l = u0 * v0;\n var t = u1 * v0 + (l >> 32);\n var w = u0 * v1 + (t & 0xFFFFFFFF);\n\n w += 0x7FFFFFFF; // rounding\n\n t >>= 32;\n w >>= 32;\n\n return u1 * v1 + t + w;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction umul64e(e1: i32, e2: i32): i32 {\n return e1 + e2 + 64; // where 64 is significand size\n}\n\n// @ts-ignore: decorator\n@inline\nfunction normalizedBoundaries(f: u64, e: i32): void {\n var frc = (f << 1) + 1;\n var exp = e - 1;\n var off = clz(frc);\n frc <<= off;\n exp -= off;\n\n var m = 1 + i32(f == 0x0010000000000000);\n\n _frc_plus = frc;\n _frc_minus = ((f << m) - 1) << e - m - exp;\n _exp = exp;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction grisuRound(buffer: usize, len: i32, delta: u64, rest: u64, ten_kappa: u64, wp_w: u64): void {\n var lastp = buffer + ((len - 1) << 1);\n var digit = load(lastp);\n while (\n rest < wp_w &&\n delta - rest >= ten_kappa && (\n rest + ten_kappa < wp_w ||\n wp_w - rest > rest + ten_kappa - wp_w\n )\n ) {\n --digit;\n rest += ten_kappa;\n }\n store(lastp, digit);\n}\n\n// @ts-ignore: decorator\n@inline\nfunction getCachedPower(minExp: i32): void {\n const c = reinterpret(0x3FD34413509F79FE); // 1 / lg(10) = 0.30102999566398114\n var dk = (-61 - minExp) * c + 347;\t // dk must be positive, so can do ceiling in positive\n var k = dk;\n k += i32(k != dk); // conversion with ceil\n\n var index = (k >> 3) + 1;\n _K = 348 - (index << 3);\t// decimal exponent no need lookup table\n _frc_pow = load(FRC_POWERS + (index << alignof()));\n _exp_pow = load(EXP_POWERS + (index << alignof()));\n}\n\n// @ts-ignore: decorator\n@inline\nfunction grisu2(value: f64, buffer: usize, sign: i32): i32 {\n\n // frexp routine\n var uv = reinterpret(value);\n var exp = i32((uv & 0x7FF0000000000000) >>> 52);\n var sid = uv & 0x000FFFFFFFFFFFFF;\n var frc = (u64(exp != 0) << 52) + sid;\n exp = select(exp, 1, exp) - (0x3FF + 52);\n\n normalizedBoundaries(frc, exp);\n getCachedPower(_exp);\n\n // normalize\n var off = clz(frc);\n frc <<= off;\n exp -= off;\n\n var frc_pow = _frc_pow;\n var exp_pow = _exp_pow;\n\n var w_frc = umul64f(frc, frc_pow);\n var w_exp = umul64e(exp, exp_pow);\n\n var wp_frc = umul64f(_frc_plus, frc_pow) - 1;\n var wp_exp = umul64e(_exp, exp_pow);\n\n var wm_frc = umul64f(_frc_minus, frc_pow) + 1;\n var delta = wp_frc - wm_frc;\n\n return genDigits(buffer, w_frc, w_exp, wp_frc, wp_exp, delta, sign);\n}\n\nfunction genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i32, delta: u64, sign: i32): i32 {\n var one_exp = -mp_exp;\n var one_frc = (1) << one_exp;\n var mask = one_frc - 1;\n\n var wp_w_frc = mp_frc - w_frc;\n\n var p1 = u32(mp_frc >> one_exp);\n var p2 = mp_frc & mask;\n\n var kappa = decimalCount32(p1);\n var len = sign;\n\n while (kappa > 0) {\n let d: u32;\n switch (kappa) {\n case 10: { d = p1 / 1000000000; p1 %= 1000000000; break; }\n case 9: { d = p1 / 100000000; p1 %= 100000000; break; }\n case 8: { d = p1 / 10000000; p1 %= 10000000; break; }\n case 7: { d = p1 / 1000000; p1 %= 1000000; break; }\n case 6: { d = p1 / 100000; p1 %= 100000; break; }\n case 5: { d = p1 / 10000; p1 %= 10000; break; }\n case 4: { d = p1 / 1000; p1 %= 1000; break; }\n case 3: { d = p1 / 100; p1 %= 100; break; }\n case 2: { d = p1 / 10; p1 %= 10; break; }\n case 1: { d = p1; p1 = 0; break; }\n default: { d = 0; break; }\n }\n\n if (d | len) store(buffer + (len++ << 1), CharCode._0 + d);\n\n --kappa;\n let tmp = ((p1) << one_exp) + p2;\n if (tmp <= delta) {\n _K += kappa;\n grisuRound(buffer, len, delta, tmp, load(POWERS10 + (kappa << alignof())) << one_exp, wp_w_frc);\n return len;\n }\n }\n\n while (true) {\n p2 *= 10;\n delta *= 10;\n\n let d = p2 >> one_exp;\n if (d | len) store(buffer + (len++ << 1), CharCode._0 + d);\n\n p2 &= mask;\n --kappa;\n if (p2 < delta) {\n _K += kappa;\n wp_w_frc *= load(POWERS10 + (-kappa << alignof()));\n grisuRound(buffer, len, delta, p2, one_frc, wp_w_frc);\n return len;\n }\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction genExponent(buffer: usize, k: i32): i32 {\n var sign = k < 0;\n if (sign) k = -k;\n var decimals = decimalCount32(k) + 1;\n utoa32_dec_core(buffer, k, decimals);\n store(buffer, select(CharCode.MINUS, CharCode.PLUS, sign));\n return decimals;\n}\n\nfunction prettify(buffer: usize, length: i32, k: i32): i32 {\n if (!k) {\n store(buffer + (length << 1), CharCode.DOT | (CharCode._0 << 16));\n return length + 2;\n }\n\n var kk = length + k;\n if (length <= kk && kk <= 21) {\n // 1234e7 -> 12340000000\n for (let i = length; i < kk; ++i) {\n store(buffer + (i << 1), CharCode._0);\n }\n store(buffer + (kk << 1), CharCode.DOT | (CharCode._0 << 16));\n return kk + 2;\n } else if (kk > 0 && kk <= 21) {\n // 1234e-2 -> 12.34\n let ptr = buffer + (kk << 1);\n memory.copy(\n ptr + 2,\n ptr,\n -k << 1\n );\n store(buffer + (kk << 1), CharCode.DOT);\n return length + 1;\n } else if (-6 < kk && kk <= 0) {\n // 1234e-6 -> 0.001234\n let offset = 2 - kk;\n memory.copy(\n buffer + (offset << 1),\n buffer,\n length << 1\n );\n store(buffer, CharCode._0 | (CharCode.DOT << 16));\n for (let i = 2; i < offset; ++i) {\n store(buffer + (i << 1), CharCode._0);\n }\n return length + offset;\n } else if (length == 1) {\n // 1e30\n store(buffer, CharCode.e, 2);\n length = genExponent(buffer + 4, kk - 1);\n return length + 2;\n } else {\n let len = length << 1;\n memory.copy(\n buffer + 4,\n buffer + 2,\n len - 2\n );\n store(buffer, CharCode.DOT, 2);\n store(buffer + len, CharCode.e, 2);\n length += genExponent(buffer + len + 4, kk - 1);\n return length + 2;\n }\n}\n\nfunction dtoa_core(buffer: usize, value: f64): i32 {\n var sign = i32(value < 0);\n if (sign) {\n value = -value;\n store(buffer, CharCode.MINUS);\n }\n // assert(value > 0 && value <= 1.7976931348623157e308);\n var len = grisu2(value, buffer, sign);\n len = prettify(buffer + (sign << 1), len - sign, _K);\n return len + sign;\n}\n\n// @ts-ignore: decorator\n@lazy @inline const dtoa_buf = memory.data(MAX_DOUBLE_LENGTH << 1);\n\nexport function dtoa(value: f64): String {\n if (value == 0) return \"0.0\";\n if (!isFinite(value)) {\n if (isNaN(value)) return \"NaN\";\n return select(\"-Infinity\", \"Infinity\", value < 0);\n }\n var size = dtoa_core(dtoa_buf, value) << 1;\n var result = changetype(__new(size, idof()));\n memory.copy(changetype(result), dtoa_buf, size);\n return result;\n}\n\nexport function itoa_buffered(buffer: usize, value: T): u32 {\n var sign: u32 = 0;\n if (isSigned()) {\n sign = u32(value < 0);\n if (sign) {\n value = changetype(-value);\n store(buffer, CharCode.MINUS);\n }\n }\n if (ASC_SHRINK_LEVEL <= 1) {\n if (isSigned()) {\n if (sizeof() <= 4) {\n if (value < 10) {\n store(buffer + (sign << 1), value | CharCode._0);\n return 1 + sign;\n }\n } else {\n if (value < 10) {\n store(buffer + (sign << 1), value | CharCode._0);\n return 1 + sign;\n }\n }\n } else {\n if (value < 10) {\n store(buffer, value | CharCode._0);\n return 1;\n }\n }\n }\n var decimals = sign;\n if (sizeof() <= 4) {\n decimals += decimalCount32(value);\n utoa32_dec_core(buffer, value, decimals);\n } else {\n if (value <= u32.MAX_VALUE) {\n let val32 = value;\n decimals += decimalCount32(val32);\n utoa32_dec_core(buffer, val32, decimals);\n } else {\n decimals += decimalCount64High(value);\n utoa64_dec_core(buffer, value, decimals);\n }\n }\n return decimals;\n}\n\nexport function dtoa_buffered(buffer: usize, value: f64): u32 {\n if (value == 0) {\n store(buffer, CharCode._0);\n store(buffer, CharCode.DOT, 2);\n store(buffer, CharCode._0, 4);\n return 3;\n }\n if (!isFinite(value)) {\n if (isNaN(value)) {\n store(buffer, CharCode.N);\n store(buffer, CharCode.a, 2);\n store(buffer, CharCode.N, 4);\n return 3;\n } else {\n let sign = value < 0;\n if (sign) {\n store(buffer, CharCode.MINUS); // -\n buffer += 2;\n }\n store(buffer, 0x690066006E0049, 0); // ifnI\n store(buffer, 0x7900740069006E, 8); // ytin\n return 8 + u32(sign);\n }\n }\n return dtoa_core(buffer, value);\n}\n", + "util/sort": "import { compareImpl } from \"./string\";\n\ntype Comparator = (a: T, b: T) => i32;\n\n// @ts-ignore: decorator\n@lazy @inline const EMPTY = u32.MAX_VALUE;\n// @ts-ignore: decorator\n@inline const INSERTION_SORT_THRESHOLD = 48;\n// @ts-ignore: decorator\n@inline const MIN_RUN_LENGTH = 32;\n\n// @ts-ignore: decorator\n@inline\nfunction log2u(n: u32): u32 {\n return 31 - clz(n);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function COMPARATOR(): Comparator {\n if (isInteger()) {\n if (isSigned() && sizeof() <= 4) {\n return (a, b) => i32(a) - i32(b);\n } else {\n return (a, b) => i32(a > b) - i32(a < b);\n }\n } else if (isFloat()) {\n if (sizeof() == 4) {\n return (a, b) => {\n var ia = reinterpret(f32(a));\n var ib = reinterpret(f32(b));\n ia ^= ia >> 31 >>> 1;\n ib ^= ib >> 31 >>> 1;\n return i32(ia > ib) - i32(ia < ib);\n };\n } else {\n return (a, b) => {\n var ia = reinterpret(f64(a));\n var ib = reinterpret(f64(b));\n ia ^= ia >> 63 >>> 1;\n ib ^= ib >> 63 >>> 1;\n return i32(ia > ib) - i32(ia < ib);\n };\n }\n } else if (isString()) {\n return (a, b) => {\n if (a === b || a === null || b === null) return 0;\n var alen = changetype(a).length;\n var blen = changetype(b).length;\n if (!(alen | blen)) return 0;\n if (!alen) return -1;\n if (!blen) return 1;\n let res = compareImpl(\n changetype(a), 0,\n changetype(b), 0,\n min(alen, blen)\n );\n return res ? res : alen - blen;\n };\n } else {\n return (a, b) => i32(a > b) - i32(a < b);\n }\n}\n\n// Power Sort implementation (stable) from paper \"Nearly-Optimal Mergesorts\"\n// https://arxiv.org/pdf/1805.04154.pdf\n// This method usually outperform TimSort.\n// TODO: refactor c >>> 31 to c < 0 when binaryen will support this opt\nexport function SORT(\n ptr: usize,\n len: i32,\n comparator: Comparator\n): void {\n if (len <= INSERTION_SORT_THRESHOLD) {\n if (len <= 1) return;\n if (ASC_SHRINK_LEVEL < 1) {\n switch (len) {\n case 3: {\n let a = load(ptr, 0);\n let b = load(ptr, 1 << alignof());\n let c = comparator(a, b) > 0;\n store(ptr, select(b, a, c), 0);\n a = select(a, b, c);\n b = load(ptr, 2 << alignof());\n c = comparator(a, b) > 0;\n store(ptr, select(b, a, c), 1 << alignof());\n store(ptr, select(a, b, c), 2 << alignof());\n }\n case 2: {\n let a = load(ptr, 0);\n let b = load(ptr, 1 << alignof());\n let c = comparator(a, b) > 0;\n store(ptr, select(b, a, c), 0);\n store(ptr, select(a, b, c), 1 << alignof());\n return;\n }\n }\n }\n insertionSort(ptr, 0, len - 1, 0, comparator);\n return;\n }\n\n var lgPlus2 = log2u(len) + 2;\n var lgPlus2Size = lgPlus2 << alignof();\n var leftRunStartBuf = __alloc(lgPlus2Size << 1);\n var leftRunEndBuf = leftRunStartBuf + lgPlus2Size;\n\n for (let i: u32 = 0; i < lgPlus2; ++i) {\n store(leftRunStartBuf + (i << alignof()), EMPTY);\n }\n\n var buffer = __alloc(len << alignof());\n\n var hi = len - 1;\n var endA = extendRunRight(ptr, 0, hi, comparator);\n var lenA = endA + 1;\n\n if (lenA < MIN_RUN_LENGTH) {\n endA = min(hi, MIN_RUN_LENGTH - 1);\n insertionSort(ptr, 0, endA, lenA, comparator);\n }\n\n var top: u32 = 0, startA = 0;\n while (endA < hi) {\n let startB = endA + 1;\n let endB = extendRunRight(ptr, startB, hi, comparator);\n let lenB = endB - startB + 1;\n\n if (lenB < MIN_RUN_LENGTH) {\n endB = min(hi, startB + MIN_RUN_LENGTH - 1);\n insertionSort(ptr, startB, endB, lenB, comparator);\n }\n\n let k = nodePower(0, hi, startA, startB, endB);\n\n for (let i = top; i > k; --i) {\n let start = load(leftRunStartBuf + (i << alignof()));\n if (start != EMPTY) {\n mergeRuns(\n ptr,\n start,\n load(leftRunEndBuf + (i << alignof())) + 1,\n endA,\n buffer,\n comparator\n );\n startA = start;\n store(leftRunStartBuf + (i << alignof()), EMPTY);\n }\n }\n\n store(leftRunStartBuf + (k << alignof()), startA);\n store(leftRunEndBuf + (k << alignof()), endA);\n startA = startB;\n endA = endB;\n top = k;\n }\n\n for (let i = top; i != 0; --i) {\n let start = load(leftRunStartBuf + (i << alignof()));\n if (start != EMPTY) {\n mergeRuns(\n ptr,\n start,\n load(leftRunEndBuf + (i << alignof())) + 1,\n hi,\n buffer,\n comparator\n );\n }\n }\n // dealloc aux buffers\n __free(buffer);\n __free(leftRunStartBuf);\n}\n\nfunction insertionSort(\n ptr: usize,\n left: i32,\n right: i32,\n presorted: i32,\n comparator: Comparator\n): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n // slightly improved original insertion sort\n for (let i = left + presorted; i <= right; ++i) {\n let j = i - 1;\n let a = load(ptr + (i << alignof()));\n while (j >= left) {\n let b = load(ptr + (j << alignof()));\n if (comparator(a, b) < 0) {\n store(ptr + (j << alignof()), b, 1 << alignof()); --j;\n } else break;\n }\n store(ptr + (j << alignof()), a, 1 << alignof());\n }\n } else {\n // even-odd two-way insertion sort which allow increase minRunLen\n let range = right - left + 1;\n let i = left + select(range & 1, presorted - ((range - presorted) & 1), presorted == 0);\n for (; i <= right; i += 2) {\n let a = load(ptr + (i << alignof()), 0);\n let b = load(ptr + (i << alignof()), 1 << alignof());\n let min = b, max = a;\n if (comparator(a, b) <= 0) {\n min = a, max = b;\n }\n let j = i - 1;\n while (j >= left) {\n a = load(ptr + (j << alignof()));\n if (comparator(a, max) > 0) {\n store(ptr + (j << alignof()), a, 2 << alignof()); --j;\n } else break;\n }\n store(ptr + (j << alignof()), max, 2 << alignof());\n while (j >= left) {\n a = load(ptr + (j << alignof()));\n if (comparator(a, min) > 0) {\n store(ptr + (j << alignof()), a, 1 << alignof()); --j;\n } else break;\n }\n store(ptr + (j << alignof()), min, 1 << alignof());\n }\n }\n}\n\nfunction nodePower(left: u32, right: u32, startA: u32, startB: u32, endB: u32): u32 {\n var n: u64 = right - left + 1;\n var s = startB - (left << 1);\n var l = startA + s;\n var r = endB + s + 1;\n var a = (l << 30) / n;\n var b = (r << 30) / n;\n return clz((a ^ b));\n}\n\nfunction extendRunRight(\n ptr: usize,\n i: i32,\n right: i32,\n comparator: Comparator\n): i32 {\n if (i == right) return i;\n var j = i;\n if (comparator(\n load(ptr + ( j << alignof())),\n load(ptr + (++j << alignof()))\n ) > 0) {\n while (\n j < right &&\n (comparator(\n load(ptr + (j << alignof()), 1 << alignof()),\n load(ptr + (j << alignof()))\n ) >>> 31) // < 0\n ) ++j;\n // reverse\n let k = j;\n while (i < k) {\n let tmp = load(ptr + (i << alignof()));\n store(ptr + (i << alignof()), load(ptr + (k << alignof()))); ++i;\n store(ptr + (k << alignof()), tmp); --k;\n }\n } else {\n while (\n j < right &&\n comparator(\n load(ptr + (j << alignof()), 1 << alignof()),\n load(ptr + (j << alignof()))\n ) >= 0\n ) ++j;\n }\n return j;\n}\n\n// Merges arr[l..m - 1] and arr[m..r]\nfunction mergeRuns(\n ptr: usize,\n l: i32,\n m: i32,\n r: i32,\n buffer: usize,\n comparator: Comparator\n): void {\n --m;\n var i: i32, j: i32, t = r + m;\n for (i = m + 1; i > l; --i) {\n store(\n buffer + ((i - 1) << alignof()),\n load(ptr + ((i - 1) << alignof()))\n );\n }\n for (j = m; j < r; ++j) {\n store(\n buffer + ((t - j) << alignof()),\n load(ptr + (j << alignof()), 1 << alignof())\n );\n }\n for (let k = l; k <= r; ++k) {\n let a = load(buffer + (j << alignof()));\n let b = load(buffer + (i << alignof()));\n if (comparator(a, b) < 0) {\n store(ptr + (k << alignof()), a);\n --j;\n } else {\n store(ptr + (k << alignof()), b);\n ++i;\n }\n }\n}\n", + "util/string": "import { itoa32, utoa32, itoa64, utoa64, dtoa, itoa_buffered, dtoa_buffered, MAX_DOUBLE_LENGTH } from \"./number\";\nimport { ipow32 } from \"../math\";\n\n// All tables are stored as two staged lookup tables (static tries)\n// because the full range of Unicode symbols can't be efficiently\n// represented as-is in memory (see Unicode spec ch 5, p.196):\n// https://www.unicode.org/versions/Unicode12.0.0/ch05.pdf\n// Tables have been generated using these forked musl tools:\n// https://github.com/MaxGraey/musl-chartable-tools/tree/case-ignorable\n\n// Lookup table to check if a character is alphanumeric or not\n// See: https://git.musl-libc.org/cgit/musl/tree/src/ctype/alpha.h\n// size: 3904 bytes\n// @ts-ignore\n@inline @lazy const ALPHA_TABLE = memory.data([\n 18,17,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,17,34,35,36,17,37,38,39,40,\n 41,42,43,44,17,45,46,47,16,16,48,16,16,16,16,16,16,16,49,50,51,16,52,53,16,16,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,54,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,55,17,17,17,17,56,17,57,58,59,60,61,62,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,63,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,64,65,17,66,67,\n 68,69,70,71,72,73,74,17,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,\n 93,94,16,95,96,97,98,17,17,17,99,100,101,16,16,16,16,16,16,16,16,16,16,17,17,\n 17,17,102,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,103,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,17,17,104,105,16,16,106,107,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,108,17,17,17,17,109,110,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 17,111,112,16,16,16,16,16,16,16,16,16,113,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,114,115,116,117,16,16,16,16,16,16,16,16,118,\n 119,120,16,16,16,16,16,121,122,16,16,16,16,123,16,16,124,16,16,16,16,16,16,16,\n 16,16,125,16,16,16,\n 16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,254,255,255,7,254,\n 255,255,7,0,0,0,0,0,4,32,4,255,255,127,255,255,255,127,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,195,255,3,0,31,80,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,223,188,64,215,255,255,\n 251,255,255,255,255,255,255,255,255,255,191,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,3,252,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,127,2,255,255,255,\n 255,255,1,0,0,0,0,255,191,182,0,255,255,255,135,7,0,0,0,255,7,255,255,255,255,\n 255,255,255,254,255,195,255,255,255,255,255,255,255,255,255,255,255,255,239,\n 31,254,225,255,\n 159,0,0,255,255,255,255,255,255,0,224,255,255,255,255,255,255,255,255,255,255,\n 255,255,3,0,255,255,255,255,255,7,48,4,255,255,255,252,255,31,0,0,255,255,255,\n 1,255,7,0,0,0,0,0,0,255,255,223,255,255,0,240,255,248,3,255,255,255,255,255,\n 255,255,255,255,239,255,223,225,255,207,255,254,255,239,159,249,255,255,253,\n 197,227,159,89,128,176,207,255,3,16,238,135,249,255,255,253,109,195,135,25,2,\n 94,192,255,63,0,238,191,251,255,255,253,237,227,191,27,1,0,207,255,0,30,238,\n 159,249,255,255,253,237,227,159,25,192,176,207,255,2,0,236,199,61,214,24,199,\n 255,195,199,29,129,0,192,255,0,0,239,223,253,255,255,253,255,227,223,29,96,7,\n 207,255,0,0,239,223,253,255,255,253,239,227,223,29,96,64,207,255,6,0,255,223,\n 253,255,255,255,255,231,223,93,240,128,207,255,0,252,238,255,127,252,255,255,\n 251,47,127,128,95,255,192,255,12,0,254,255,255,255,255,127,255,7,63,32,255,3,\n 0,0,0,0,214,247,255,255,175,255,255,59,95,32,255,243,0,0,0,\n 0,1,0,0,0,255,3,0,0,255,254,255,255,255,31,254,255,3,255,255,254,255,255,255,\n 31,0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,249,255,3,255,255,255,255,255,\n 255,255,255,255,63,255,255,255,255,191,32,255,255,255,255,255,247,255,255,255,\n 255,255,255,255,255,255,61,127,61,255,255,255,255,255,61,255,255,255,255,61,\n 127,61,255,127,255,255,255,255,255,255,255,61,255,255,255,255,255,255,255,255,\n 7,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,63,63,254,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,159,255,255,254,255,255,7,255,255,255,255,255,255,255,255,\n 255,199,255,1,255,223,15,0,255,255,15,0,255,255,15,0,255,223,13,0,255,255,255,\n 255,255,255,207,255,255,1,128,16,255,3,0,0,0,0,255,3,255,255,255,255,255,255,\n 255,255,255,255,255,1,255,255,255,255,255,7,255,255,255,255,255,255,255,255,\n 63,\n 0,255,255,255,127,255,15,255,1,192,255,255,255,255,63,31,0,255,255,255,255,\n 255,15,255,255,255,3,255,3,0,0,0,0,255,255,255,15,255,255,255,255,255,255,255,\n 127,254,255,31,0,255,3,255,3,128,0,0,128,1,0,0,0,0,0,0,0,255,255,255,255,255,\n 255,239,255,239,15,255,3,0,0,0,0,255,255,255,255,255,243,255,255,255,255,255,\n 255,191,255,3,0,255,255,255,255,255,255,127,0,255,227,255,255,255,255,255,63,\n 255,1,255,255,255,255,255,231,0,0,0,0,0,222,111,4,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,\n 128,255,31,0,255,255,63,63,255,255,255,255,63,63,255,170,255,255,255,63,255,\n 255,255,255,255,255,223,95,220,31,207,15,255,31,220,31,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,2,128,0,0,255,31,0,0,0,0,0,0,0,0,0,0,0,0,132,252,47,62,80,189,255,243,\n 224,67,0,0,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,255,255,255,255,255,255,3,0,\n 0,255,255,255,255,255,127,255,255,255,255,255,127,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,31,120,12,0,255,255,255,255,191,32,255,\n 255,255,255,255,255,255,128,0,0,255,255,127,0,127,127,127,127,127,127,127,127,\n 255,255,255,255,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,224,0,0,0,254,3,62,31,254,255,255,255,255,255,255,255,255,255,127,224,254,\n 255,255,255,255,255,255,255,255,255,255,247,224,255,255,255,255,255,254,255,\n 255,255,255,255,255,255,255,255,255,127,0,0,255,255,255,255,0,0,0,0,0,0,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,\n 31,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,\n 0,0,0,0,0,0,255,255,255,255,255,63,255,31,255,255,255,15,0,0,255,255,255,255,\n 255,127,240,143,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,\n 0,128,255,252,255,255,255,255,255,255,255,255,255,255,255,255,249,255,255,255,\n 255,255,255,252,7,0,0,0,0,224,255,191,255,255,255,255,0,0,0,255,255,255,255,\n 255,255,15,0,255,255,255,255,255,255,255,255,47,0,255,3,0,0,252,232,255,255,\n 255,255,255,7,255,255,255,255,7,0,255,255,255,31,255,255,255,255,255,255,247,\n 255,0,128,255,3,255,255,255,127,255,255,255,255,255,255,127,0,255,63,255,3,\n 255,255,127,252,255,255,255,255,255,255,255,127,5,0,0,56,255,255,60,0,126,126,\n 126,0,127,127,255,255,255,255,255,247,255,3,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,7,255,3,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,15,0,255,255,127,248,255,255,255,255,\n 255,\n 15,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,3,0,0,0,0,127,0,248,224,255,253,127,95,219,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,0,0,248,255,255,255,\n 255,255,255,255,255,255,255,255,255,63,0,0,255,255,255,255,255,255,255,255,\n 252,255,255,255,255,255,255,0,0,0,0,0,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,223,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,255,3,\n 254,255,255,7,254,255,255,7,192,255,255,255,255,255,255,255,255,255,255,127,\n 252,252,252,28,0,0,0,0,255,239,255,255,127,255,255,183,255,63,255,63,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,7,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,31,255,255,255,255,255,255,1,0,0,0,0,\n 0,255,255,255,255,0,224,255,255,255,7,255,255,255,255,255,7,255,255,255,63,\n 255,255,255,255,15,255,62,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,63,255,3,255,255,255,255,15,255,255,255,\n 255,15,255,255,255,255,255,0,255,255,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,0,255,255,63,0,255,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,63,253,255,255,255,255,191,145,255,255,63,0,255,255,\n 127,0,255,255,255,127,0,0,0,0,0,0,0,0,255,255,55,0,255,255,63,0,255,255,255,3,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,192,0,0,0,0,0,0,0,0,111,240,239,\n 254,255,255,63,0,0,0,0,0,255,255,255,31,255,255,255,31,0,0,0,0,255,254,255,\n 255,31,0,0,0,255,255,255,255,255,255,63,0,255,255,63,0,255,255,7,0,255,255,3,\n 0,0,0,0,0,0,0,0,0,0,0,0,\n 0,255,255,255,255,255,255,255,255,255,1,0,0,0,0,0,0,255,255,255,255,255,255,7,\n 0,255,255,255,255,255,255,7,0,255,255,255,255,255,0,255,3,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,\n 255,27,3,0,0,0,0,0,0,0,0,0,255,255,255,31,128,0,255,255,63,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,255,255,31,0,0,0,255,255,127,0,255,255,255,255,255,255,255,255,63,0,0,\n 0,192,255,0,0,252,255,255,255,255,255,255,1,0,0,255,255,255,1,255,3,255,255,\n 255,255,255,255,199,255,240,0,255,255,255,255,71,0,255,255,255,255,255,255,\n 255,255,30,192,255,23,0,0,0,0,255,255,251,255,255,255,159,64,0,0,0,0,0,0,0,0,\n 127,189,255,191,255,1,255,255,255,255,255,255,255,1,255,3,239,159,249,255,255,\n 253,237,227,159,25,129,224,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,255,255,255,255,255,255,255,255,187,7,255,131,3,0,0,0,255,255,255,255,255,\n 255,255,255,179,0,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,\n 255,255,255,63,127,0,0,0,63,0,0,0,0,255,255,255,255,255,255,255,127,17,0,255,\n 3,0,0,0,0,255,255,255,255,255,255,63,1,255,3,0,0,0,0,0,0,255,255,255,231,255,\n 7,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,\n 255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,3,0,128,\n 127,242,111,255,255,255,191,153,7,0,255,3,0,0,0,0,0,0,0,0,255,252,255,255,255,\n 255,255,252,26,0,0,0,255,255,255,255,255,255,231,127,0,0,255,255,255,255,255,\n 255,255,255,255,32,0,0,0,0,255,255,255,255,255,255,255,1,255,253,255,255,255,\n 255,127,127,1,0,255,3,0,0,252,255,255,255,252,255,255,254,127,0,0,0,0,0,0,0,0,\n 0,127,251,255,255,255,255,127,180,203,0,255,3,191,253,255,255,255,127,123,1,\n 255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,\n 0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,3,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,127,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,255,255,255,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,\n 0,255,255,255,255,255,255,255,1,255,255,255,127,255,3,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,63,0,0,255,255,255,255,255,255,0,0,15,0,255,3,248,255,255,224,255,\n 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,\n 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,135,\n 255,255,255,255,255,255,255,128,255,255,0,0,0,0,0,0,0,0,11,0,3,0,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,0,0,0,0,0,\n 255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,\n 127,0,0,0,0,0,0,7,0,240,0,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,15,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,7,255,31,255,1,255,67,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,223,255,255,255,255,255,255,255,255,\n 223,100,222,255,235,239,255,255,255,255,255,255,255,191,231,223,223,255,255,\n 255,123,95,252,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,63,255,255,255,253,255,255,247,255,255,255,\n 247,255,255,223,255,255,255,223,255,255,127,255,255,255,127,255,255,255,253,\n 255,255,255,253,255,255,247,207,255,255,255,255,255,255,127,255,255,249,219,7,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,31,\n 128,63,255,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,15,255,\n 3,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,31,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,143,8,\n 255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,239,255,255,255,150,254,247,10,\n 132,234,150,170,150,247,247,94,255,251,255,15,238,251,255,15,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,255,255,255,3,255,255,255,3,255,255,255,3,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,3\n]);\n\n// size: 1568 bytes (compressed to ~1380 bytes after binaryen)\n// @ts-ignore: decorator\n@lazy @inline const CASED = memory.data([\n 18,19,20,21,22,23,16,16,16,16,16,16,16,16,16,16,\n 24,16,16,25,16,16,16,16,16,16,16,16,26,27,17,28,\n 29,30,16,16,31,16,16,16,16,16,16,16,32,33,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,34,35,16,16,16,36,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,37,16,16,16,38,\n 16,16,16,16,39,16,16,16,16,16,16,16,40,16,16,16,\n 16,16,16,16,16,16,16,16,41,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,42,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,43,44,45,46,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,47,16,16,16,16,16,16,\n 16,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,0,0,0,0,254,255,255,7,254,255,255,7,0,0,0,0,0,4,32,4,\n 255,255,127,255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,247,240,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,239,255,255,255,255,1,3,0,0,0,31,0,0,0,\n 0,0,0,0,0,0,0,0,32,0,0,0,0,0,207,188,64,215,255,255,251,255,255,255,\n 255,255,255,255,255,255,191,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 3,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,\n 255,255,127,0,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,\n 191,32,255,255,255,255,255,231,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,255,255,255,255,255,255,255,255,255,255,63,63,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,1,255,255,255,255,255,231,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,0,0,0,0,255,255,63,63,255,255,255,255,63,63,255,170,255,255,255,63,\n 255,255,255,255,255,255,223,95,220,31,207,15,255,31,220,31,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,2,128,0,0,255,31,0,0,0,0,0,0,0,0,0,0,0,0,\n 132,252,47,62,80,189,31,242,224,67,0,0,255,255,255,255,24,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,192,255,255,255,255,255,255,3,0,0,255,255,255,255,255,127,255,255,\n 255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,120,12,0,\n 255,255,255,255,191,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,63,0,0,\n 255,255,255,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,255,255,255,\n 255,255,255,255,255,255,255,255,255,120,255,255,255,255,255,255,252,7,0,0,0,0,96,7,\n 0,0,0,0,0,0,255,255,255,255,255,247,255,1,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,0,0,0,0,127,0,248,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,7,\n 254,255,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,\n 255,255,15,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,7,0,255,255,255,255,255,255,7,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,223,255,255,255,255,255,\n 255,255,255,223,100,222,255,235,239,255,255,255,255,255,255,255,191,231,223,223,255,255,255,123,\n 95,252,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,\n 253,255,255,247,255,255,255,247,255,255,223,255,255,255,223,255,255,127,255,255,255,127,255,255,\n 255,253,255,255,255,253,255,255,247,15,0,0,0,0,0,0,255,255,255,255,255,255,255,255,\n 15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,255,255,255,3,255,255,255,3,255,255,255,3,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0\n]);\n\n// size: 2976 bytes (compressed to ~2050 bytes after binaryen)\n// @ts-ignore: decorator\n@lazy @inline const CASE_IGNORABLES = memory.data([\n 18,16,19,20,21,22,23,24,25,26,27,28,29,30,31,32,\n 33,16,16,34,16,16,16,35,36,37,38,39,40,41,16,42,\n 43,16,16,16,16,16,16,16,16,16,16,16,44,45,46,16,\n 47,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 48,16,16,16,49,16,50,51,52,53,54,55,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,56,16,16,57,58,\n 16,59,60,61,16,16,16,16,16,16,62,16,16,63,64,65,\n 66,67,68,69,70,71,72,73,74,75,76,16,77,78,79,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,80,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,81,82,16,16,16,83,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,84,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,85,86,16,16,16,16,16,16,16,87,16,16,16,16,16,\n 88,89,90,16,16,16,16,16,91,92,16,16,16,16,16,16,\n 16,16,16,93,16,16,16,16,16,16,16,16,16,16,16,16,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,128,64,0,4,0,0,0,64,1,0,0,0,0,0,0,0,0,161,144,1,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,48,4,176,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,3,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0,0,0,\n 0,0,254,255,255,255,255,191,182,0,0,0,0,0,16,0,63,0,255,23,0,0,0,0,\n 1,248,255,255,0,0,1,0,0,0,0,0,0,0,0,0,0,0,192,191,255,61,0,0,\n 0,128,2,0,0,0,255,255,255,7,0,0,0,0,0,0,0,0,0,0,192,255,1,0,\n 0,0,0,0,0,248,63,36,0,0,192,255,255,63,0,0,0,0,0,14,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,248,255,255,255,255,255,7,0,0,0,0,0,0,20,\n 254,33,254,0,12,0,2,0,2,0,0,0,0,0,0,16,30,32,0,0,12,0,0,64,\n 6,0,0,0,0,0,0,16,134,57,2,0,0,0,35,0,6,0,0,0,0,0,0,16,\n 190,33,0,0,12,0,0,252,2,0,0,0,0,0,0,144,30,32,96,0,12,0,0,0,\n 4,0,0,0,0,0,0,0,1,32,0,0,0,0,0,0,17,0,0,0,0,0,0,192,\n 193,61,96,0,12,0,0,0,2,0,0,0,0,0,0,144,64,48,0,0,12,0,0,0,\n 3,0,0,0,0,0,0,24,30,32,0,0,12,0,0,0,2,0,0,0,0,0,0,0,\n 0,4,92,0,0,0,0,0,0,0,0,0,0,0,242,7,192,127,0,0,0,0,0,0,\n 0,0,0,0,0,0,242,31,64,63,0,0,0,0,0,0,0,0,0,3,0,0,160,2,\n 0,0,0,0,0,0,254,127,223,224,255,254,255,255,255,31,64,0,0,0,0,0,0,0,\n 0,0,0,0,0,224,253,102,0,0,0,195,1,0,30,0,100,32,0,32,0,0,0,0,\n 0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,224,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,28,0,\n 0,0,12,0,0,0,12,0,0,0,0,0,0,0,176,63,64,254,143,32,0,0,0,0,\n 0,120,0,0,0,0,0,0,8,0,0,0,0,0,0,0,96,0,0,0,0,2,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,135,1,4,14,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,9,0,0,0,0,\n 0,0,64,127,229,31,248,159,0,0,0,0,128,0,255,255,1,0,0,0,0,0,0,0,\n 15,0,0,0,0,0,208,23,4,0,0,0,0,248,15,0,3,0,0,0,60,59,0,0,\n 0,0,0,0,64,163,3,0,0,0,0,0,0,240,207,0,0,0,0,0,0,0,0,63,\n 0,0,0,0,0,0,0,0,0,0,247,255,253,33,16,3,0,0,0,0,0,240,255,255,\n 255,255,255,255,255,7,0,1,0,0,0,248,255,255,255,255,255,255,255,255,255,255,255,251,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,\n 3,224,0,224,0,224,0,96,0,248,0,3,144,124,0,0,0,0,0,0,223,255,2,128,\n 0,0,255,31,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,128,3,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,128,0,0,0,0,0,0,0,0,\n 0,0,0,0,255,255,255,255,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,60,62,8,\n 0,0,0,0,0,0,0,0,0,0,0,126,0,0,0,0,0,0,0,0,0,0,0,112,\n 0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,0,16,0,0,0,0,0,0,\n 0,0,0,0,0,128,247,191,0,0,0,240,0,0,0,0,0,0,0,0,0,0,3,0,\n 255,255,255,255,3,0,0,0,0,0,0,0,0,0,1,0,0,7,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,3,68,8,0,0,96,16,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,48,0,0,0,255,255,3,128,0,0,0,0,192,63,0,0,\n 128,255,3,0,0,0,0,0,7,0,0,0,0,0,200,51,0,128,0,0,96,0,0,0,\n 0,0,0,0,0,126,102,0,8,16,0,0,0,0,1,16,0,0,0,0,0,0,157,193,\n 2,0,0,32,0,48,88,0,0,0,0,0,0,0,0,0,0,0,0,248,0,14,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,32,33,0,0,0,0,0,64,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,255,3,0,0,0,0,0,0,0,\n 255,255,8,0,255,255,0,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,128,128,64,0,4,0,0,0,64,1,0,0,0,0,0,1,0,\n 0,0,0,192,0,0,0,0,0,0,0,0,8,0,0,14,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,7,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,110,240,0,0,0,0,0,135,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,0,0,0,\n 0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 192,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 2,0,0,0,0,0,0,255,127,0,0,0,0,0,0,128,3,0,0,0,0,0,120,38,\n 0,32,0,0,0,0,0,0,7,0,0,0,128,239,31,0,0,0,0,0,0,0,8,0,\n 3,0,0,0,0,0,192,127,0,158,0,0,0,0,0,0,0,0,0,0,0,128,211,64,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,248,7,0,0,\n 3,0,0,0,0,0,0,24,1,0,0,0,192,31,31,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,92,0,0,64,0,0,0,0,\n 0,0,0,0,0,0,248,133,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,176,1,0,0,48,0,0,0,0,\n 0,0,0,0,0,0,248,167,1,0,0,0,0,0,0,0,0,0,0,0,0,40,191,0,\n 0,0,0,0,0,0,0,0,0,0,0,224,188,15,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,255,6,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,88,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,240,12,1,0,0,0,254,7,0,0,0,0,248,121,128,0,126,14,0,0,0,0,\n 0,252,127,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,191,\n 0,0,0,0,0,0,0,0,0,0,252,255,255,252,109,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,126,180,191,0,0,0,0,0,0,0,0,0,163,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,255,1,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,31,0,0,0,0,0,0,0,127,0,15,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,128,0,0,0,0,0,0,0,128,255,255,0,0,0,0,0,0,0,0,27,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,15,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,3,248,255,\n 231,15,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,127,248,255,255,255,255,255,31,32,0,16,0,0,248,254,255,0,0,\n 0,0,0,0,0,0,0,0,127,255,255,249,219,7,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,63,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 240,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,248\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const LOWER127 = memory.data([\n 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,\n 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,\n 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,\n 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,\n 64,\n 97,98,99,100,101,102,103,104,105,106,107,108,109,\n 110,111,112,113,114,115,116,117,118,119,120,121,122,\n 91,92,93,94,95,96,\n 97,98,99,100,101,102,103,104,105,106,107,108,109,\n 110,111,112,113,114,115,116,117,118,119,120,121,122,\n 123,124,125,126,127\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const UPPER127 = memory.data([\n 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,\n 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,\n 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,\n 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,\n 64,\n 65,66,67,68,69,70,71,72,73,74,75,76,77,\n 78,79,80,81,82,83,84,85,86,87,88,89,90,\n 91,92,93,94,95,96,\n 65,66,67,68,69,70,71,72,73,74,75,76,77,\n 78,79,80,81,82,83,84,85,86,87,88,89,90,\n 123,124,125,126,127\n]);\n\n// 23 * 8 = 184 bytes\n// @ts-ignore: decorator\n@lazy @inline const POWERS10 = memory.data([\n 1e00, 1e01, 1e02, 1e03, 1e04, 1e05, 1e06, 1e07, 1e08, 1e09,\n 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,\n 1e20, 1e21, 1e22\n]);\n\n// @ts-ignore: decorator\n@inline\nexport const enum CharCode {\n PERCENT = 0x25,\n PLUS = 0x2B,\n MINUS = 0x2D,\n DOT = 0x2E,\n _0 = 0x30,\n _1 = 0x31,\n _2 = 0x32,\n _3 = 0x33,\n _4 = 0x34,\n _5 = 0x35,\n _6 = 0x36,\n _7 = 0x37,\n _8 = 0x38,\n _9 = 0x39,\n A = 0x41,\n B = 0x42,\n E = 0x45,\n I = 0x49,\n N = 0x4E,\n O = 0x4F,\n X = 0x58,\n Z = 0x5A,\n a = 0x61,\n b = 0x62,\n e = 0x65,\n n = 0x6E,\n o = 0x6F,\n u = 0x75,\n x = 0x78,\n z = 0x7A\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isAscii(c: u32): bool {\n return !(c >> 7);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isLower8(c: u32): bool {\n return c - CharCode.a < 26;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isUpper8(c: u32): bool {\n return c - CharCode.A < 26;\n}\n\nexport function isSpace(c: u32): bool {\n if (c < 0x1680) { // < (1)\n // , , , , , and \n // (c == 0x20 || c == 0xA0) was optimized to (c | 0x80) == 0xA0\n return ((c | 0x80) == 0xA0) || (c - 0x09 <= 0x0D - 0x09);\n }\n if (c - 0x2000 <= 0x200A - 0x2000) return true;\n switch (c) {\n case 0x1680: // (1)\n case 0x2028: // (2)\n case 0x2029: // \n case 0x202F: // \n case 0x205F: // \n case 0x3000: // \n case 0xFEFF: return true; // \n }\n return false;\n}\n\nexport function isAlpha(c: u32): bool {\n if (isAscii(c)) return (c | 32) - CharCode.a < 26;\n if (c < 0x20000) {\n // @ts-ignore: cast\n return stagedBinaryLookup(ALPHA_TABLE, c);\n }\n return c < 0x2FFFE;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isCased(c: u32): bool {\n // @ts-ignore: cast\n return c < 0x1F18A && stagedBinaryLookup(CASED, c);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isCaseIgnorable(c: u32): bool {\n // @ts-ignore: cast\n return c < 0xE01F0 && stagedBinaryLookup(CASE_IGNORABLES, c);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isFinalSigma(buffer: usize, index: isize, len: isize): bool {\n const lookaheadLimit = 30; // max lookahead limit\n var found = false;\n var pos = index;\n var minPos = max(0, pos - lookaheadLimit);\n while (pos > minPos) {\n let c = codePointBefore(buffer, pos);\n if (!isCaseIgnorable(c)) {\n if (isCased(c)) {\n found = true;\n } else {\n return false;\n }\n }\n pos -= isize(c >= 0x10000) + 1;\n }\n if (!found) return false;\n pos = index + 1;\n var maxPos = min(pos + lookaheadLimit, len);\n while (pos < maxPos) {\n let c = load(buffer + (pos << 1));\n if (u32((c & 0xFC00) == 0xD800) & u32(pos + 1 != len)) {\n let c1 = load(buffer + (pos << 1), 2);\n if ((c1 & 0xFC00) == 0xDC00) {\n c = (c - 0xD800 << 10) + (c1 - 0xDC00) + 0x10000;\n }\n }\n if (!isCaseIgnorable(c)) {\n return !isCased(c);\n }\n pos += isize(c >= 0x10000) + 1;\n }\n return true;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction codePointBefore(buffer: usize, index: isize): i32 {\n if (index <= 0) return -1;\n var c = load(buffer + (index - 1 << 1));\n if (u32((c & 0xFC00) == 0xDC00) & u32(index - 2 >= 0)) {\n let c1 = load(buffer + (index - 2 << 1));\n if ((c1 & 0xFC00) == 0xD800) {\n return ((c1 & 0x3FF) << 10) + (c & 0x3FF) + 0x10000;\n }\n }\n return (c & 0xF800) == 0xD800 ? 0xFFFD : c;\n}\n\n// Search routine for two-staged lookup tables\nfunction stagedBinaryLookup(table: usize, c: u32): bool {\n return ((load(table + (load(table + (c >>> 8)) << 5) + ((c & 255) >> 3)) >>> (c & 7)) & 1);\n}\n\nexport function compareImpl(str1: string, index1: usize, str2: string, index2: usize, len: usize): i32 {\n var ptr1 = changetype(str1) + (index1 << 1);\n var ptr2 = changetype(str2) + (index2 << 1);\n if (ASC_SHRINK_LEVEL < 2) {\n if (len >= 4 && !((ptr1 & 7) | (ptr2 & 7))) {\n do {\n if (load(ptr1) != load(ptr2)) break;\n ptr1 += 8;\n ptr2 += 8;\n len -= 4;\n } while (len >= 4);\n }\n }\n while (len--) {\n let a = load(ptr1);\n let b = load(ptr2);\n if (a != b) return a - b;\n ptr1 += 2;\n ptr2 += 2;\n }\n return 0;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function toLower8(c: u32): u32 {\n if (ASC_SHRINK_LEVEL > 0) {\n return c | u32(isUpper8(c)) << 5;\n } else {\n return load(LOWER127 + c);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nexport function toUpper8(c: u32): u32 {\n if (ASC_SHRINK_LEVEL > 0) {\n return c & ~(u32(isLower8(c)) << 5);\n } else {\n return load(UPPER127 + c);\n }\n}\n\n/** Parses a string to an integer (usually), using the specified radix. */\nexport function strtol(str: string, radix: i32 = 0): T {\n var len = str.length;\n if (!len) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n\n var ptr = changetype(str) /* + HEAD -> offset */;\n var code = load(ptr);\n\n // trim white spaces\n while (isSpace(code)) {\n code = load(ptr += 2);\n --len;\n }\n // determine sign\n // @ts-ignore\n var sign: T = 1;\n if (code == CharCode.MINUS || code == CharCode.PLUS) {\n if (!--len) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n if (code == CharCode.MINUS) {\n // @ts-ignore: type\n sign = -1;\n }\n code = load(ptr += 2);\n }\n\n // See https://tc39.es/ecma262/#sec-parseint-string-radix\n if (radix) {\n if (radix < 2 || radix > 36) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n // handle case as parseInt(\"0xFF\", 16) by spec\n if (radix == 16) {\n if (\n len > 2 &&\n code == CharCode._0 &&\n (load(ptr, 2) | 32) == CharCode.x\n ) {\n ptr += 4; len -= 2;\n }\n }\n } else {\n // determine radix by literal prefix\n if (code == CharCode._0 && len > 2) {\n switch (load(ptr, 2) | 32) {\n case CharCode.b: {\n ptr += 4; len -= 2;\n radix = 2;\n break;\n }\n case CharCode.o: {\n ptr += 4; len -= 2;\n radix = 8;\n break;\n }\n case CharCode.x: {\n ptr += 4; len -= 2;\n radix = 16;\n break;\n }\n }\n }\n if (!radix) radix = 10;\n }\n\n // calculate value\n // @ts-ignore: type\n var num: T = 0;\n while (len--) {\n code = load(ptr);\n if (code - CharCode._0 < 10) {\n code -= CharCode._0;\n } else if (code - CharCode.A <= (CharCode.Z - CharCode.A)) {\n code -= CharCode.A - 10;\n } else if (code - CharCode.a <= (CharCode.z - CharCode.a)) {\n code -= CharCode.a - 10;\n }\n if (code >= radix) {\n if (!num) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n break;\n }\n // @ts-ignore: type\n num = num * radix + code;\n ptr += 2;\n }\n // @ts-ignore: type\n return sign * num;\n}\n\nexport function strtod(str: string): f64 {\n var len = str.length;\n if (!len) return NaN;\n\n var ptr = changetype(str);\n var code = load(ptr);\n\n var sign = 1.0;\n // skip white spaces\n while (len && isSpace(code)) {\n code = load(ptr += 2);\n --len;\n }\n if (!len) return NaN;\n\n // try parse '-' or '+'\n if (code == CharCode.MINUS) {\n if (!--len) return NaN;\n code = load(ptr += 2);\n sign = -1;\n } else if (code == CharCode.PLUS) {\n if (!--len) return NaN;\n code = load(ptr += 2);\n }\n\n // try parse Infinity\n if (len >= 8 && code == CharCode.I) {\n if (\n load(ptr, 0) == 0x690066006E0049 && // ifnI\n load(ptr, 8) == 0x7900740069006E // ytin\n ) {\n return Infinity * sign;\n }\n return NaN;\n }\n // validate next symbol\n if (code != CharCode.DOT && (code - CharCode._0) >= 10) {\n return NaN;\n }\n var savedPtr = ptr;\n // skip zeros\n while (code == CharCode._0) {\n code = load(ptr += 2);\n --len;\n }\n if (len <= 0) return 0;\n const capacity = 19; // int(64 * 0.3010)\n var pointed = false;\n var consumed = 0;\n var position = 0;\n var x: u64 = 0;\n if (code == CharCode.DOT) {\n let noDigits = !(savedPtr - ptr);\n ptr += 2; --len;\n if (!len && noDigits) return NaN;\n for (pointed = true; (code = load(ptr)) == CharCode._0; --position, ptr += 2) --len;\n if (len <= 0) return 0;\n if (!position && noDigits && code - CharCode._0 >= 10) return NaN;\n }\n for (let digit = code - CharCode._0; digit < 10 || (code == CharCode.DOT && !pointed); digit = code - CharCode._0) {\n if (digit < 10) {\n x = consumed < capacity ? 10 * x + digit : x | u64(!!digit);\n ++consumed;\n } else {\n position = consumed;\n pointed = true;\n }\n if (!--len) break;\n code = load(ptr += 2);\n }\n\n if (!pointed) position = consumed;\n return copysign(scientific(x, position - min(capacity, consumed) + parseExp(ptr, len)), sign);\n}\n\nexport function joinBooleanArray(dataStart: usize, length: i32, separator: string): string {\n var lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) return select(\"true\", \"false\", load(dataStart));\n\n var sepLen = separator.length;\n var valueLen = 5; // max possible length of element len(\"false\")\n var estLen = (valueLen + sepLen) * lastIndex + valueLen;\n var result = changetype(__new(estLen << 1, idof()));\n var offset = 0;\n var value: bool;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + i);\n valueLen = 4 + i32(!value);\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(select(\"true\", \"false\", value)),\n valueLen << 1\n );\n offset += valueLen;\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + lastIndex);\n valueLen = 4 + i32(!value);\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(select(\"true\", \"false\", value)),\n valueLen << 1\n );\n offset += valueLen;\n\n if (estLen > offset) return result.substring(0, offset);\n return result;\n}\n\nexport function joinIntegerArray(dataStart: usize, length: i32, separator: string): string {\n var lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) {\n let value = load(dataStart);\n if (isSigned()) {\n if (sizeof() <= 4) {\n // @ts-ignore: type\n return changetype(itoa32(value, 10));\n } else {\n // @ts-ignore: type\n return changetype(itoa64(value, 10));\n }\n } else {\n if (sizeof() <= 4) {\n // @ts-ignore: type\n return changetype(utoa32(value, 10));\n } else {\n // @ts-ignore: type\n return changetype(utoa64(value, 10));\n }\n }\n }\n\n var sepLen = separator.length;\n const valueLen = (sizeof() <= 4 ? 10 : 20) + i32(isSigned());\n var estLen = (valueLen + sepLen) * lastIndex + valueLen;\n var result = changetype(__new(estLen << 1, idof()));\n var offset = 0;\n var value: T;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n // @ts-ignore: type\n offset += itoa_buffered(changetype(result) + (offset << 1), value);\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + (lastIndex << alignof()));\n // @ts-ignore: type\n offset += itoa_buffered(changetype(result) + (offset << 1), value);\n if (estLen > offset) return result.substring(0, offset);\n return result;\n}\n\nexport function joinFloatArray(dataStart: usize, length: i32, separator: string): string {\n var lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) {\n return changetype(dtoa(\n // @ts-ignore: type\n load(dataStart))\n );\n }\n\n const valueLen = MAX_DOUBLE_LENGTH;\n var sepLen = separator.length;\n var estLen = (valueLen + sepLen) * lastIndex + valueLen;\n var result = changetype(__new(estLen << 1, idof()));\n var offset = 0;\n var value: T;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n // @ts-ignore: type\n offset += dtoa_buffered(changetype(result) + (offset << 1), value);\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + (lastIndex << alignof()));\n // @ts-ignore: type\n offset += dtoa_buffered(changetype(result) + (offset << 1), value);\n if (estLen > offset) return result.substring(0, offset);\n return result;\n}\n\nexport function joinStringArray(dataStart: usize, length: i32, separator: string): string {\n var lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) {\n // @ts-ignore: type\n return load(dataStart) || \"\";\n }\n var estLen = 0;\n var value: string;\n for (let i = 0; i < length; ++i) {\n value = load(dataStart + (i << alignof()));\n // @ts-ignore: type\n if (value !== null) estLen += value.length;\n }\n var offset = 0;\n var sepLen = separator.length;\n var result = changetype(__new((estLen + sepLen * lastIndex) << 1, idof()));\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n if (value !== null) {\n let valueLen = value.length;\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(value),\n valueLen << 1\n );\n offset += valueLen;\n }\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + (lastIndex << alignof()));\n if (value !== null) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(value),\n value.length << 1\n );\n }\n return result;\n}\n\nexport function joinReferenceArray(dataStart: usize, length: i32, separator: string): string {\n var lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n var value: T;\n if (!lastIndex) {\n value = load(dataStart);\n // @ts-ignore: type\n return value !== null ? value.toString() : \"\";\n }\n var result = \"\";\n var sepLen = separator.length;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n // @ts-ignore: type\n if (value !== null) result += value.toString();\n if (sepLen) result += separator;\n }\n value = load(dataStart + (lastIndex << alignof()));\n // @ts-ignore: type\n if (value !== null) result += value.toString();\n return result;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction scientific(significand: u64, exp: i32): f64 {\n if (!significand || exp < -342) return 0;\n if (exp > 308) return Infinity;\n // Try use fast path\n // Use fast path for string-to-double conversion if possible\n // see http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion\n // Simple integer\n var significandf = significand;\n if (!exp) return significandf;\n if (exp > 22 && exp <= 22 + 15) {\n significandf *= pow10(exp - 22);\n exp = 22;\n }\n if (significand <= 9007199254740991 && abs(exp) <= 22) {\n if (exp > 0) return significandf * pow10(exp);\n return significandf / pow10(-exp);\n } else if (exp < 0) {\n return scaledown(significand, exp);\n } else {\n return scaleup(significand, exp);\n }\n}\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction scaledown(significand: u64, exp: i32): f64 {\n const denom: u64 = 6103515625; // 1e14 * 0x1p-14\n const scale = reinterpret(0x3F06849B86A12B9B); // 1e-14 * 0x1p32\n\n var shift = clz(significand);\n significand <<= shift;\n shift = exp - shift;\n\n for (; exp <= -14; exp += 14) {\n let q = significand / denom;\n let r = significand % denom;\n let s = clz(q);\n significand = (q << s) + nearest(scale * (r << (s - 18)));\n shift -= s;\n }\n var b = ipow32(5, -exp);\n var q = significand / b;\n var r = significand % b;\n var s = clz(q);\n significand = (q << s) + (reinterpret(reinterpret(r) + (s << 52)) / b);\n shift -= s;\n\n return NativeMath.scalbn(significand, shift);\n}\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction scaleup(significand: u64, exp: i32): f64 {\n const coeff: u32 = 1220703125; // 1e13 * 0x1p-13;\n var shift = ctz(significand);\n significand >>= shift;\n shift += exp;\n\n __fixmulShift = shift;\n for (; exp >= 13; exp -= 13) {\n significand = fixmul(significand, coeff);\n }\n significand = fixmul(significand, ipow32(5, exp));\n shift = __fixmulShift;\n return NativeMath.scalbn(significand, shift);\n}\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction parseExp(ptr: usize, len: i32): i32 {\n var sign = 1, magnitude = 0;\n var code = load(ptr);\n // check code is 'e' or 'E'\n if ((code | 32) != CharCode.e) return 0;\n\n if (!--len) return 0;\n code = load(ptr += 2);\n if (code == CharCode.MINUS) {\n if (!--len) return 0;\n code = load(ptr += 2);\n sign = -1;\n } else if (code == CharCode.PLUS) {\n if (!--len) return 0;\n code = load(ptr += 2);\n }\n // skip zeros\n while (code == CharCode._0) {\n if (!--len) return 0;\n code = load(ptr += 2);\n }\n for (let digit: u32 = code - CharCode._0; len && digit < 10; digit = code - CharCode._0) {\n if (magnitude >= 3200) return sign * 3200;\n magnitude = 10 * magnitude + digit;\n code = load(ptr += 2);\n --len;\n }\n return sign * magnitude;\n}\n\n// @ts-ignore: decorator\n@lazy var __fixmulShift: u64 = 0;\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction fixmul(a: u64, b: u32): u64 {\n var low = (a & 0xFFFFFFFF) * b;\n var high = (a >> 32) * b + (low >> 32);\n var overflow = (high >> 32);\n var space = clz(overflow);\n var revspace: u64 = 32 - space;\n __fixmulShift += revspace;\n return (high << space | (low & 0xFFFFFFFF) >> revspace) + (low << space >> 31 & 1);\n}\n\n// @ts-ignore: decorator\n@inline\nfunction pow10(n: i32): f64 {\n // argument `n` should bounds in [0, 22] range\n return load(POWERS10 + (n << alignof()));\n}\n", + "util/uri": "import { E_URI_MALFORMED } from \"./error\";\nimport { CharCode } from \"./string\";\n\n// Truncated lookup boolean table that helps us quickly determine\n// if a char needs to be escaped for URIs (RFC 2396).\n// @ts-ignore: decorator\n@lazy export const URI_UNSAFE = memory.data([\n/* skip 32 + 1 always set to '1' head slots\n */ 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0,\n 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, /*\n skip 128 + 1 always set to '1' tail slots */\n]);\n\n// Truncated lookup boolean table that helps us quickly determine\n// if a char needs to be escaped for URLs (RFC 3986).\n// @ts-ignore: decorator\n@lazy export const URL_UNSAFE = memory.data([\n/* skip 32 + 1 always set to '1' head slots\n */ 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,\n 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0,\n 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, /*\n skip 128 + 1 always set to '1' tail slots */\n]);\n\n// Truncated lookup boolean table for determine reserved chars: ;/?:@&=+$,#\n// @ts-ignore: decorator\n@lazy export const URI_RESERVED = memory.data([\n /* skip 32 + 3 always set to '0' head slots\n */ 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1,\n 1, /* skip 191 always set to '0' tail slots */\n]);\n\nexport function encode(src: usize, len: usize, table: usize): usize {\n if (!len) return src;\n\n var i: usize = 0, offset: usize = 0, outSize = len << 1;\n var dst = __new(outSize, idof());\n\n while (i < len) {\n let org = i;\n let c: u32, c1: u32;\n // fast scan a check chars until it valid ASCII\n // and safe for copying withoud escaping.\n do {\n c = load(src + (i << 1));\n // is it valid ASII and safe?\n if (c - 33 < 94) { // 127 - 33\n if (load(table + (c - 33))) break;\n } else break;\n } while (++i < len);\n\n // if we have some safe range of sequence just copy it without encoding\n if (i > org) {\n let size = i - org << 1;\n if (offset + size > outSize) {\n outSize = offset + size;\n dst = __renew(dst, outSize);\n }\n // TODO: should we optimize for short cases like 2 byte size?\n memory.copy(\n dst + offset,\n src + (org << 1),\n size\n );\n offset += size;\n // return if we reach end on input string\n if (i >= len) break;\n }\n\n // decode UTF16 with checking for unpaired surrogates\n if (c >= 0xD800) {\n if (c >= 0xDC00 && c <= 0xDFFF) {\n throw new URIError(E_URI_MALFORMED);\n }\n if (c <= 0xDBFF) {\n if (i >= len) {\n throw new URIError(E_URI_MALFORMED);\n }\n c1 = load(src + (++i << 1));\n if (c1 < 0xDC00 || c1 > 0xDFFF) {\n throw new URIError(E_URI_MALFORMED);\n }\n c = (((c & 0x3FF) << 10) | (c1 & 0x3FF)) + 0x10000;\n }\n }\n\n let estSize = offset + (c < 0x80 ? 1 * 6 : 4 * 6);\n if (estSize > outSize) {\n // doubling estimated size but only for greater than one\n // input lenght due to we already estemated it for worst case\n outSize = len > 1 ? estSize << 1 : estSize;\n dst = __renew(dst, outSize);\n }\n\n if (c < 0x80) {\n // encode ASCII unsafe code point\n storeHex(dst, offset, c);\n offset += 6;\n } else {\n // encode UTF-8 unsafe code point\n if (c < 0x800) {\n storeHex(dst, offset, (c >> 6) | 0xC0);\n offset += 6;\n } else {\n if (c < 0x10000) {\n storeHex(dst, offset, (c >> 12) | 0xE0);\n offset += 6;\n } else {\n storeHex(dst, offset, (c >> 18) | 0xF0);\n offset += 6;\n storeHex(dst, offset, (c >> 12 & 0x3F) | 0x80);\n offset += 6;\n }\n storeHex(dst, offset, (c >> 6 & 0x3F) | 0x80);\n offset += 6;\n }\n storeHex(dst, offset, (c & 0x3F) | 0x80);\n offset += 6;\n }\n ++i;\n }\n // shink output string buffer if necessary\n if (outSize > offset) {\n dst = __renew(dst, offset);\n }\n return dst;\n}\n\nexport function decode(src: usize, len: usize, component: bool): usize {\n if (!len) return src;\n\n var i: usize = 0, offset: usize = 0, ch: u32 = 0;\n var dst = __new(len << 1, idof());\n\n while (i < len) {\n let org = i;\n while (i < len && (ch = load(src + (i << 1))) != CharCode.PERCENT) i++;\n\n if (i > org) {\n let size = i - org << 1;\n // TODO: should we optimize for short cases like 2 byte size?\n memory.copy(\n dst + offset,\n src + (org << 1),\n size\n );\n offset += size;\n if (i >= len) break;\n }\n\n // decode hex\n if (\n i + 2 >= len ||\n ch != CharCode.PERCENT ||\n (ch = loadHex(src, i + 1 << 1)) == -1\n ) throw new URIError(E_URI_MALFORMED);\n\n i += 3;\n if (ch < 0x80) {\n if (!component && isReserved(ch)) {\n ch = CharCode.PERCENT;\n i -= 2;\n }\n } else {\n // decode UTF-8 sequence\n let nb = utf8LenFromUpperByte(ch);\n // minimal surrogate: 2 => 0x80, 3 => 0x800, 4 => 0x10000, _ => -1\n let lo: u32 = 1 << (17 * nb >> 2) - 1;\n // mask: 2 => 31, 3 => 15, 4 => 7, _ => 0\n ch &= nb ? (0x80 >> nb) - 1 : 0;\n\n while (--nb != 0) {\n let c1: u32;\n // decode hex\n if (\n i + 2 >= len ||\n load(src + (i << 1)) != CharCode.PERCENT ||\n (c1 = loadHex(src, i + 1 << 1)) == -1\n ) throw new URIError(E_URI_MALFORMED);\n\n i += 3;\n if ((c1 & 0xC0) != 0x80) {\n ch = 0;\n break;\n }\n ch = (ch << 6) | (c1 & 0x3F);\n }\n\n // check if UTF8 code point properly fit into invalid UTF16 encoding\n if (ch < lo || lo == -1 || ch > 0x10FFFF || (ch >= 0xD800 && ch < 0xE000)) {\n throw new URIError(E_URI_MALFORMED);\n }\n\n // encode UTF16\n if (ch >= 0x10000) {\n ch -= 0x10000;\n let lo = ch >> 10 | 0xD800;\n let hi = (ch & 0x03FF) | 0xDC00;\n store(dst + offset, lo | (hi << 16));\n offset += 4;\n continue;\n }\n }\n store(dst + offset, ch);\n offset += 2;\n }\n\n assert(offset <= (len << 1));\n // shink output string buffer if necessary\n if ((len << 1) > offset) {\n dst = __renew(dst, offset);\n }\n return dst;\n}\n\nfunction storeHex(dst: usize, offset: usize, ch: u32): void {\n // @ts-ignore: decorator\n const HEX_CHARS = memory.data([\n 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,\n 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46\n ]);\n\n store(dst + offset, CharCode.PERCENT, 0); // %\n store(\n dst + offset,\n load(HEX_CHARS + (ch >> 4 & 0x0F)) |\n load(HEX_CHARS + (ch & 0x0F)) << 16,\n 2\n ); // XX\n}\n\nfunction loadHex(src: usize, offset: usize): u32 {\n let c0 = load(src + offset, 0);\n let c1 = load(src + offset, 2);\n return isHex(c0) && isHex(c1)\n ? fromHex(c0) << 4 | fromHex(c1)\n : -1;\n}\n\n// @ts-ignore: decorator\n@inline function fromHex(ch: u32): u32 {\n return (ch | 32) % 39 - 9;\n}\n\n// @ts-ignore: decorator\n@inline function utf8LenFromUpperByte(c0: u32): u32 {\n // same as\n // if (c0 - 0xC0 <= 0xDF - 0xC0) return 2;\n // if (c0 - 0xE0 <= 0xEF - 0xE0) return 3;\n // if (c0 - 0xF0 <= 0xF7 - 0xF0) return 4;\n // return 0;\n return c0 - 0xC0 < 56\n ? clz(~(c0 << 24))\n : 0;\n}\n\n// @ts-ignore: decorator\n@inline function isReserved(ch: u32): bool {\n return ch - 35 < 30\n ? load(URI_RESERVED + (ch - 35))\n : false;\n}\n\n// @ts-ignore: decorator\n@inline function isHex(ch: u32): bool {\n return (ch - CharCode._0 < 10) || ((ch | 32) - CharCode.a < 6);\n}\n", + "vector": "/** Vector abstraction. */\n@final @unmanaged\nexport abstract class V128 {\n}\n", + "wasi/index": "import {\n proc_exit,\n fd_write,\n iovec,\n random_get,\n tempbuf\n} from \"bindings/wasi\";\n\nimport {\n MAX_DOUBLE_LENGTH,\n decimalCount32,\n dtoa_buffered\n} from \"util/number\";\n\n// @ts-ignore: decorator\n@global @inline const ASC_WASI = true; // eslint-disable-line @typescript-eslint/no-unused-vars\n\nfunction abort( // eslint-disable-line @typescript-eslint/no-unused-vars\n message: string | null = null,\n fileName: string | null = null,\n lineNumber: u32 = 0,\n columnNumber: u32 = 0\n): void {\n // 0: iov.buf\n // 4: iov.buf_len\n // 8: len\n // 12: buf...\n const iovPtr: usize = 0;\n const lenPtr: usize = iovPtr + offsetof();\n const bufPtr: usize = lenPtr + sizeof();\n changetype(iovPtr).buf = bufPtr;\n var ptr = bufPtr;\n store(ptr, 0x203A74726F6261); ptr += 7; // 'abort: '\n if (message !== null) {\n ptr += String.UTF8.encodeUnsafe(changetype(message), message.length, ptr);\n }\n store(ptr, 0x206E6920); ptr += 4; // ' in '\n if (fileName !== null) {\n ptr += String.UTF8.encodeUnsafe(changetype(fileName), fileName.length, ptr);\n }\n store(ptr++, 0x28); // (\n var len = decimalCount32(lineNumber); ptr += len;\n do {\n let t = lineNumber / 10;\n store(--ptr, 0x30 + lineNumber % 10);\n lineNumber = t;\n } while (lineNumber); ptr += len;\n store(ptr++, 0x3A); // :\n len = decimalCount32(columnNumber); ptr += len;\n do {\n let t = columnNumber / 10;\n store(--ptr, 0x30 + columnNumber % 10);\n columnNumber = t;\n } while (columnNumber); ptr += len;\n store(ptr, 0x0A29); ptr += 2; // )\\n\n changetype(iovPtr).buf_len = ptr - bufPtr;\n fd_write(2, iovPtr, 1, lenPtr);\n proc_exit(255);\n}\n\nfunction trace( // eslint-disable-line @typescript-eslint/no-unused-vars\n message: string,\n n: i32 = 0,\n a0: f64 = 0,\n a1: f64 = 0,\n a2: f64 = 0,\n a3: f64 = 0,\n a4: f64 = 0\n): void {\n // 0: iov.buf\n // 4: iov.buf_len\n // 8: len\n // 12: buf...\n var iovPtr = __alloc(offsetof() + sizeof() + 1 + (max(String.UTF8.byteLength(message), MAX_DOUBLE_LENGTH << 1)));\n var lenPtr = iovPtr + offsetof();\n var bufPtr = lenPtr + sizeof();\n changetype(iovPtr).buf = bufPtr;\n store(bufPtr, 0x203A6563617274); // 'trace: '\n changetype(iovPtr).buf_len = 7;\n fd_write(2, iovPtr, 1, lenPtr);\n changetype(iovPtr).buf_len = String.UTF8.encodeUnsafe(changetype(message), message.length, bufPtr);\n fd_write(2, iovPtr, 1, lenPtr);\n if (n) {\n store(bufPtr++, 0x20); // space\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a0), bufPtr);\n fd_write(2, iovPtr, 1, lenPtr);\n if (n > 1) {\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a1), bufPtr);\n fd_write(2, iovPtr, 1, lenPtr);\n if (n > 2) {\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a2), bufPtr);\n fd_write(2, iovPtr, 1, lenPtr);\n if (n > 3) {\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a3), bufPtr);\n fd_write(2, iovPtr, 1, lenPtr);\n if (n > 4) {\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a4), bufPtr);\n fd_write(2, iovPtr, 1, lenPtr);\n }\n }\n }\n }\n --bufPtr;\n }\n store(bufPtr, 0x0A); // \\n\n changetype(iovPtr).buf_len = 1;\n fd_write(2, iovPtr, 1, lenPtr);\n __free(iovPtr);\n}\n\nfunction seed(): f64 { // eslint-disable-line @typescript-eslint/no-unused-vars\n var rand: u64;\n do {\n random_get(tempbuf, 8);\n rand = load(tempbuf);\n } while (!rand);\n return reinterpret(rand);\n}\n\nexport * from \"bindings/wasi\";\n" +}; diff --git a/cli/asc.js b/cli/asc.js index 3c47266c2a..ee0561f3ef 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -21,28 +21,79 @@ * @fileoverview Compiler frontend for node.js * * Uses the low-level API exported from src/index.ts so it works with the compiler compiled to - * JavaScript as well as the compiler compiled to WebAssembly (eventually). Runs the sources - * directly through ts-node if distribution files are not present. + * JavaScript as well as the compiler compiled to WebAssembly (eventually). * * Can also be packaged as a bundle suitable for in-browser use with the standard library injected - * in the build step. See dist/asc.js for the bundle and webpack.config.js for building details. + * in the build step. See dist/asc.js for the bundle. */ -/* global BUNDLE_VERSION, BUNDLE_LIBRARY, BUNDLE_DEFINITIONS */ +import { fs, module, path, process } from "./util/node.js"; +import mkdirp from "./util/mkdirp.js"; +import fetch from "./util/fetch.js"; +import * as utf8 from "./util/utf8.js"; +import * as colorsUtil from "./util/colors.js"; +import * as optionsUtil from "./util/options.js"; +import * as generated from "./asc.generated.js"; + +import binaryen from "binaryen"; +import assemblyscriptJS from "assemblyscript"; +import loader from "../lib/loader/index.js"; +import rtrace from "../lib/rtrace/index.js"; + +// Use the TS->JS variant by default +var assemblyscript = assemblyscriptJS; +var __newString = str => str; +var __getString = ptr => ptr; +var __pin = ptr => ptr; +var __unpin = _ => undefined; +var __collect = _ => undefined; + +// Use the AS->Wasm variant as an option +const useWasm = process.argv.includes("--wasm"); +if (useWasm) { + let argPos = process.argv.indexOf("--wasm"); + let binaryPath = String(process.argv[argPos + 1]); + process.argv.splice(argPos, 2); + let rtraceInstance = new rtrace.Rtrace({ + onerror(err, info) { + console.log(err, info); + }, + getMemory() { + return exports.memory; + }, + oncollect() { + var gcProfile = rtrace.gcProfile; + if (gcProfile && gcProfile.length && fs.writeFileSync) { + let timestamp = Date.now(); + fs.writeFileSync( + `rtrace-gc-profile-${timestamp}.json`, + JSON.stringify(gcProfile) + ); + fs.writeFileSync( + `rtrace-gc-profile-${timestamp}.csv`, + `time,memory,pause\n${gcProfile.join("\n")}` + ); + } + } + }); + let { exports } = await loader.instantiate(await (await fetch(binaryPath)).arrayBuffer(), rtraceInstance.install({ binaryen })); + assemblyscript = exports; + __newString = assemblyscript.__newString; + __getString = assemblyscript.__getString; + __pin = assemblyscript.__pin; + __unpin = assemblyscript.__unpin; + __collect = assemblyscript.__collect; + if (assemblyscript._start) assemblyscript._start(); +} -const fs = require("fs"); -const path = require("path"); -const process = require("process"); // ensure shim -const utf8 = require("./util/utf8"); -const colorsUtil = require("./util/colors"); -const optionsUtil = require("./util/options"); -const mkdirp = require("./util/mkdirp"); -const find = require("./util/find"); -const binaryen = global.binaryen || (global.binaryen = require("binaryen")); +export { + binaryen, + assemblyscript, + loader, + rtrace +}; -const dynrequire = typeof __webpack_require__ === "function" - ? __non_webpack_require__ - : require; +const require = module.createRequire(import.meta.url); const WIN = process.platform === "win32"; const EOL = WIN ? "\r\n" : "\n"; @@ -67,93 +118,12 @@ function setupExtension(ext) { const defaultExtension = setupExtension(".ts"); -// Proxy Binaryen's ready event -Object.defineProperty(exports, "ready", { - get() { return binaryen.ready; } -}); - // Emscripten adds an `uncaughtException` listener to Binaryen that results in an additional // useless code fragment on top of an actual error. suppress this: if (process.removeAllListeners) { process.removeAllListeners("uncaughtException"); } -// Use distribution files if present, otherwise run the sources directly. -function loadAssemblyScriptJS() { - var exports, tsNode; - try { - // note that this case will always trigger in recent node.js versions for typical installs - // see: https://nodejs.org/api/packages.html#packages_self_referencing_a_package_using_its_name - exports = require("assemblyscript"); - } catch (e) { - try { // `asc` on the command line (unnecessary in recent node) - exports = dynrequire("../dist/assemblyscript.js"); - } catch (e) { - try { // `asc` on the command line without dist files (unnecessary in recent node) - tsNode = dynrequire("ts-node"); - tsNode.register({ - project: path.join(__dirname, "..", "src", "tsconfig.json"), - typeCheck: false, - transpileOnly: true, - compilerHost: true, - files: true, - skipIgnore: true, - moduleTypes: { - "../src/glue/js/*": "cjs" - }, - compilerOptions: { - module: "esnext", - target: "es2017" - } - }); - dynrequire("../src/glue/js"); - exports = dynrequire("../src"); - } catch (e_ts) { - if (!tsNode || !(e_ts instanceof tsNode.TSError)) { - try { // `require("dist/asc.js")` in explicit browser tests - exports = dynrequire("./assemblyscript"); - } catch (e) { - throw Error(`${e_ts.stack}\n---\n${e.stack}`); - } - } else { - throw e_ts; - } - } - } - } - return exports; -} - -// Loads the specified bootstrapped Wasm binary of the compiler. -function loadAssemblyScriptWasm(binaryPath) { - const loader = require("../lib/loader/umd/index"); - const rtrace = new (require("../lib/rtrace/umd/index").Rtrace)({ - onerror(err, info) { - console.log(err, info); - }, - getMemory() { - return exports.memory; - }, - oncollect() { - var gcProfile = rtrace.gcProfile; - if (gcProfile && gcProfile.length && fs.writeFileSync) { - let timestamp = Date.now(); - fs.writeFileSync( - `rtrace-gc-profile-${timestamp}.json`, - JSON.stringify(gcProfile) - ); - fs.writeFileSync( - `rtrace-gc-profile-${timestamp}.csv`, - `time,memory,pause\n${gcProfile.join("\n")}` - ); - } - } - }); - var { exports } = loader.instantiateSync(fs.readFileSync(binaryPath), rtrace.install({ binaryen })); - if (exports._start) exports._start(); - return exports; -} - /** Ensures that an object is a wrapper class instead of just a pointer. */ function __wrap(ptrOrObj, wrapperClass) { if (typeof ptrOrObj === "number") { @@ -162,74 +132,29 @@ function __wrap(ptrOrObj, wrapperClass) { return ptrOrObj; } -var assemblyscript, __newString, __getString, __pin, __unpin, __collect; - -function loadAssemblyScript() { - const wasmArg = process.argv.findIndex(arg => arg == "--wasm"); - if (~wasmArg) { - let binaryPath = process.argv[wasmArg + 1]; - process.argv.splice(wasmArg, 2); - assemblyscript = loadAssemblyScriptWasm(binaryPath); - __newString = assemblyscript.__newString; - __getString = assemblyscript.__getString; - __pin = assemblyscript.__pin; - __unpin = assemblyscript.__unpin; - __collect = assemblyscript.__collect; - } else { - assemblyscript = loadAssemblyScriptJS(); - __newString = str => str; - __getString = ptr => ptr; - __pin = ptr => ptr; - __unpin = _ => undefined; - __collect = _ => undefined; - } -} -loadAssemblyScript(); - -/** Whether this is a webpack bundle or not. */ -exports.isBundle = typeof BUNDLE_VERSION === "string"; - /** AssemblyScript version. */ -exports.version = exports.isBundle ? BUNDLE_VERSION : dynrequire("../package.json").version; +export const version = generated.version; /** Available CLI options. */ -exports.options = require("./asc.json"); +export const options = generated.options; /** Prefix used for library files. */ -exports.libraryPrefix = __getString(assemblyscript.LIBRARY_PREFIX.valueOf()); - -/** Default Binaryen optimization level. */ -exports.defaultOptimizeLevel = 3; - -/** Default Binaryen shrink level. */ -exports.defaultShrinkLevel = 0; +export const libraryPrefix = __getString(assemblyscript.LIBRARY_PREFIX.valueOf()); /** Bundled library files. */ -exports.libraryFiles = exports.isBundle ? BUNDLE_LIBRARY : (() => { // set up if not a bundle - const libDir = path.join(__dirname, "..", "std", "assembly"); - const bundled = {}; - find - .files(libDir, defaultExtension.re_except_d) - .forEach(file => { - bundled[file.replace(defaultExtension.re, "")] = fs.readFileSync(path.join(libDir, file), "utf8"); - }); - return bundled; -})(); +export const libraryFiles = generated.libraryFiles; /** Bundled definition files. */ -exports.definitionFiles = exports.isBundle ? BUNDLE_DEFINITIONS : (() => { // set up if not a bundle - const readDefinition = name => fs.readFileSync( - path.join(__dirname, "..", "std", name, `index${defaultExtension.ext_d}`), - "utf8" - ); - return { - assembly: readDefinition("assembly"), - portable: readDefinition("portable") - }; -})(); +export const definitionFiles = generated.definitionFiles; + +/** Default Binaryen optimization level. */ +export const defaultOptimizeLevel = 3; + +/** Default Binaryen shrink level. */ +export const defaultShrinkLevel = 0; /** Convenience function that parses and compiles source strings directly. */ -exports.compileString = (sources, options) => { +export function compileString(sources, options) { if (typeof sources === "string") sources = { [`input${defaultExtension.ext}`]: sources }; const output = Object.create({ stdout: createMemoryStream(), @@ -241,7 +166,7 @@ exports.compileString = (sources, options) => { ]; Object.keys(options || {}).forEach(key => { var val = options[key]; - var opt = exports.options[key]; + var opt = generated.options[key]; if (opt && opt.type === "b") { if (val) argv.push(`--${key}`); } else { @@ -251,7 +176,7 @@ exports.compileString = (sources, options) => { else argv.push(`--${key}`, String(val)); } }); - exports.main(argv.concat(Object.keys(sources)), { + main(argv.concat(Object.keys(sources)), { stdout: output.stdout, stderr: output.stderr, readFile: name => Object.prototype.hasOwnProperty.call(sources, name) ? sources[name] : null, @@ -259,10 +184,10 @@ exports.compileString = (sources, options) => { listFiles: () => [] }); return output; -}; +} /** Runs the command line utility using the specified arguments array. */ -exports.main = function main(argv, options, callback) { +export function main(argv, options, callback) { if (typeof options === "function") { callback = options; options = {}; @@ -272,7 +197,7 @@ exports.main = function main(argv, options, callback) { // Bundle semantic version let bundleMinorVersion = 0, bundleMajorVersion = 0, bundlePatchVersion = 0; - const versionParts = (exports.version || "").split("."); + const versionParts = (version || "").split("."); if (versionParts.length === 3) { bundleMajorVersion = parseInt(versionParts[0]) | 0; bundleMinorVersion = parseInt(versionParts[1]) | 0; @@ -292,16 +217,16 @@ exports.main = function main(argv, options, callback) { if (!stderr) throw Error("'options.stderr' must be specified"); // Parse command line options but do not populate option defaults yet - const optionsResult = optionsUtil.parse(argv, exports.options, false); + const optionsResult = optionsUtil.parse(argv, generated.options, false); let opts = optionsResult.options; argv = optionsResult.arguments; if (opts.noColors) { - colorsUtil.stdout.supported = - colorsUtil.stderr.supported = false; + colorsUtil.stdout.enabled = + colorsUtil.stderr.enabled = false; } else { - colorsUtil.stdout = colorsUtil.from(stdout); - colorsUtil.stderr = colorsUtil.from(stderr); + colorsUtil.stdout.stream = stdout; + colorsUtil.stderr.stream = stderr; } // Check for unknown options @@ -334,7 +259,7 @@ exports.main = function main(argv, options, callback) { // Just print the version if requested if (opts.version) { - stdout.write(`Version ${exports.version}${EOL}`); + stdout.write(`Version ${version}${EOL}`); return callback(null); } @@ -373,7 +298,7 @@ exports.main = function main(argv, options, callback) { "", color.white("OPTIONS"), ].concat( - optionsUtil.help(exports.options, 24, EOL) + optionsUtil.help(generated.options, 24, EOL) ).join(EOL) + EOL); return callback(null); } @@ -394,13 +319,13 @@ exports.main = function main(argv, options, callback) { if (asconfig.targets) { const targetOptions = asconfig.targets[target]; if (targetOptions) { - opts = optionsUtil.merge(exports.options, opts, targetOptions, asconfigDir); + opts = optionsUtil.merge(generated.options, opts, targetOptions, asconfigDir); } } // Merge general options const generalOptions = asconfig.options; if (generalOptions) { - opts = optionsUtil.merge(exports.options, opts, generalOptions, asconfigDir); + opts = optionsUtil.merge(generated.options, opts, generalOptions, asconfigDir); } // Append entries @@ -424,7 +349,7 @@ exports.main = function main(argv, options, callback) { } // Populate option defaults once user-defined options are set - optionsUtil.addDefaults(exports.options, opts); + optionsUtil.addDefaults(generated.options, opts); // If showConfig print options and exit if (opts.showConfig) { @@ -530,8 +455,8 @@ exports.main = function main(argv, options, callback) { var optimizeLevel = 0; var shrinkLevel = 0; if (opts.optimize) { - optimizeLevel = exports.defaultOptimizeLevel; - shrinkLevel = exports.defaultShrinkLevel; + optimizeLevel = defaultOptimizeLevel; + shrinkLevel = defaultShrinkLevel; } if (typeof opts.optimizeLevel === "number") optimizeLevel = opts.optimizeLevel; if (typeof opts.shrinkLevel === "number") shrinkLevel = opts.shrinkLevel; @@ -551,20 +476,11 @@ exports.main = function main(argv, options, callback) { } // `--transform` CLI flag if (opts.transform) { - let tsNodeRegistered = false; let transformArgs = unique(opts.transform); for (let i = 0, k = transformArgs.length; i < k; ++i) { let filename = transformArgs[i].trim(); - if (!tsNodeRegistered && filename.endsWith(".ts")) { // ts-node requires .ts specifically - dynrequire("ts-node").register({ - transpileOnly: true, - skipProject: true, - compilerOptions: { target: "ES2016" } - }); - tsNodeRegistered = true; - } try { - transforms.push(dynrequire(dynrequire.resolve(filename, { + transforms.push(require(require.resolve(filename, { paths: [baseDir, process.cwd()] }))); } catch (e) { @@ -613,12 +529,12 @@ exports.main = function main(argv, options, callback) { } // Parse library files - Object.keys(exports.libraryFiles).forEach(libPath => { + Object.keys(libraryFiles).forEach(libPath => { if (libPath.includes("/")) return; // in sub-directory: imported on demand stats.parseCount++; stats.parseTime += measure(() => { - let textPtr = __pin(__newString(exports.libraryFiles[libPath])); - let pathPtr = __newString(exports.libraryPrefix + libPath + extension.ext); + let textPtr = __pin(__newString(libraryFiles[libPath])); + let pathPtr = __newString(libraryPrefix + libPath + extension.ext); assemblyscript.parse(program, textPtr, pathPtr, false); __unpin(textPtr); }); @@ -645,10 +561,10 @@ exports.main = function main(argv, options, callback) { return callback(Error(`Library file '${libPath}' not found.`)); } stats.parseCount++; - exports.libraryFiles[libPath.replace(extension.re, "")] = libText; + libraryFiles[libPath.replace(extension.re, "")] = libText; stats.parseTime += measure(() => { let textPtr = __pin(__newString(libText)); - let pathPtr = __newString(exports.libraryPrefix + libPath); + let pathPtr = __newString(libraryPrefix + libPath); assemblyscript.parse(program, textPtr, pathPtr, false); __unpin(textPtr); }); @@ -666,9 +582,6 @@ exports.main = function main(argv, options, callback) { var sourceText = null; // text reported back to the compiler var sourcePath = null; // path reported back to the compiler - const libraryPrefix = exports.libraryPrefix; - const libraryFiles = exports.libraryFiles; - // Try file.ext, file/index.ext, file.d.ext if (!internalPath.startsWith(libraryPrefix)) { if ((sourceText = readFile(sourcePath = internalPath + extension.ext, baseDir)) == null) { @@ -804,7 +717,7 @@ exports.main = function main(argv, options, callback) { { let runtimeName = String(opts.runtime); let runtimePath = `rt/index-${runtimeName}`; - let runtimeText = exports.libraryFiles[runtimePath]; + let runtimeText = libraryFiles[runtimePath]; if (runtimeText == null) { runtimePath = runtimeName; runtimeText = readFile(runtimePath + extension.ext, baseDir); @@ -1277,7 +1190,7 @@ exports.main = function main(argv, options, callback) { stdout.write(contents); }); } -}; +} const toString = Object.prototype.toString; @@ -1285,7 +1198,7 @@ function isObject(arg) { return toString.call(arg) === "[object Object]"; } -function getAsconfig(file, baseDir, readFile) { +export function getAsconfig(file, baseDir, readFile) { const contents = readFile(file, baseDir); const location = path.join(baseDir, file); if (!contents) return null; @@ -1327,10 +1240,8 @@ function getAsconfig(file, baseDir, readFile) { return config; } -exports.getAsconfig = getAsconfig; - /** Checks diagnostics emitted so far for errors. */ -function checkDiagnostics(program, stderr, reportDiagnostic) { +export function checkDiagnostics(program, stderr, reportDiagnostic) { var numErrors = 0; do { let diagnosticPtr = assemblyscript.nextDiagnostic(program); @@ -1375,10 +1286,8 @@ function checkDiagnostics(program, stderr, reportDiagnostic) { return numErrors; } -exports.checkDiagnostics = checkDiagnostics; - /** Creates an empty set of stats. */ -function createStats() { +export function createStats() { return { readTime: 0, readCount: 0, @@ -1401,32 +1310,26 @@ function createStats() { }; } -exports.createStats = createStats; - /** Measures the execution time of the specified function. */ -function measure(fn) { +export function measure(fn) { const start = process.hrtime(); fn(); const times = process.hrtime(start); return times[0] * 1e9 + times[1]; } -exports.measure = measure; - function pad(str, len) { while (str.length < len) str = ` ${str}`; return str; } /** Formats a high resolution time to a human readable string. */ -function formatTime(time) { +export function formatTime(time) { return time ? `${(time / 1e6).toFixed(3)} ms` : "n/a"; } -exports.formatTime = formatTime; - /** Formats and prints out the contents of a set of stats. */ -function printStats(stats, output) { +export function printStats(stats, output) { const format = (time, count) => `${pad(formatTime(time), 12)} n=${count}`; (output || process.stdout).write([ "I/O Read : " + format(stats.readTime, stats.readCount), @@ -1442,14 +1345,12 @@ function printStats(stats, output) { ].join(EOL) + EOL); } -exports.printStats = printStats; - var allocBuffer = typeof global !== "undefined" && global.Buffer ? global.Buffer.allocUnsafe || (len => new global.Buffer(len)) : len => new Uint8Array(len); /** Creates a memory stream that can be used in place of stdout/stderr. */ -function createMemoryStream(fn) { +export function createMemoryStream(fn) { var stream = []; stream.write = function(chunk) { if (fn) fn(chunk); @@ -1482,10 +1383,8 @@ function createMemoryStream(fn) { return stream; } -exports.createMemoryStream = createMemoryStream; - /** Compatible TypeScript compiler options for syntax highlighting etc. */ -exports.tscOptions = { +export const tscOptions = { alwaysStrict: true, noImplicitAny: true, noImplicitReturns: true, @@ -1502,7 +1401,7 @@ exports.tscOptions = { // Gracefully handle crashes function crash(stage, e) { - const BAR = colorsUtil.red("▌ "); + const BAR = colorsUtil.stdout.red("▌ "); console.error([ EOL, BAR, "Whoops, the AssemblyScript compiler has crashed during ", stage, " :-(", EOL, @@ -1511,10 +1410,7 @@ function crash(stage, e) { ? [ BAR, "Here is the stack trace hinting at the problem, perhaps it's useful?", EOL, BAR, EOL, - e.stack.replace(/^/mg, BAR), EOL, - BAR, EOL, - BAR, "If it refers to the dist files, try to 'npm install source-map-support' and", EOL, - BAR, "run again, which should then show the actual code location in the sources.", EOL, + e.stack.replace(/^/mg, BAR), EOL ] : [ BAR, "There is no stack trace. Perhaps a Binaryen exception above / in console?", EOL, diff --git a/cli/shim/README.md b/cli/shim/README.md deleted file mode 100644 index 73b7e60d3c..0000000000 --- a/cli/shim/README.md +++ /dev/null @@ -1 +0,0 @@ -Shims used when bundling asc for browser usage. diff --git a/cli/shim/fs.js b/cli/shim/fs.js deleted file mode 100644 index f053ebf797..0000000000 --- a/cli/shim/fs.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {}; diff --git a/cli/shim/path.js b/cli/shim/path.js deleted file mode 100644 index 28978caf27..0000000000 --- a/cli/shim/path.js +++ /dev/null @@ -1,531 +0,0 @@ -const process = require("process"); // ensure shim - -// https://github.com/browserify/path-browserify v1.0.1 -// -// Copyright (c) 2013 James Halliday -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -function assertPath(path) { - if (typeof path !== 'string') { - throw new TypeError('Path must be a string. Received ' + JSON.stringify(path)); - } -} - -// Resolves . and .. elements in a path with directory names -function normalizeStringPosix(path, allowAboveRoot) { - var res = ''; - var lastSegmentLength = 0; - var lastSlash = -1; - var dots = 0; - var code; - for (var i = 0; i <= path.length; ++i) { - if (i < path.length) - code = path.charCodeAt(i); - else if (code === 47 /*/*/) - break; - else - code = 47 /*/*/; - if (code === 47 /*/*/) { - if (lastSlash === i - 1 || dots === 1) { - // NOOP - } else if (lastSlash !== i - 1 && dots === 2) { - if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) { - if (res.length > 2) { - var lastSlashIndex = res.lastIndexOf('/'); - if (lastSlashIndex !== res.length - 1) { - if (lastSlashIndex === -1) { - res = ''; - lastSegmentLength = 0; - } else { - res = res.slice(0, lastSlashIndex); - lastSegmentLength = res.length - 1 - res.lastIndexOf('/'); - } - lastSlash = i; - dots = 0; - continue; - } - } else if (res.length === 2 || res.length === 1) { - res = ''; - lastSegmentLength = 0; - lastSlash = i; - dots = 0; - continue; - } - } - if (allowAboveRoot) { - if (res.length > 0) - res += '/..'; - else - res = '..'; - lastSegmentLength = 2; - } - } else { - if (res.length > 0) - res += '/' + path.slice(lastSlash + 1, i); - else - res = path.slice(lastSlash + 1, i); - lastSegmentLength = i - lastSlash - 1; - } - lastSlash = i; - dots = 0; - } else if (code === 46 && dots !== -1) { - ++dots; - } else { - dots = -1; - } - } - return res; -} - -function _format(sep, pathObject) { - var dir = pathObject.dir || pathObject.root; - var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || ''); - if (!dir) { - return base; - } - if (dir === pathObject.root) { - return dir + base; - } - return dir + sep + base; -} - -var posix = { - // path.resolve([from ...], to) - resolve: function resolve() { - var resolvedPath = ''; - var resolvedAbsolute = false; - var cwd; - - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path; - if (i >= 0) - path = arguments[i]; - else { - if (cwd === undefined) - cwd = process.cwd(); - path = cwd; - } - - assertPath(path); - - // Skip empty entries - if (path.length === 0) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute); - - if (resolvedAbsolute) { - if (resolvedPath.length > 0) - return '/' + resolvedPath; - else - return '/'; - } else if (resolvedPath.length > 0) { - return resolvedPath; - } else { - return '.'; - } - }, - - normalize: function normalize(path) { - assertPath(path); - - if (path.length === 0) return '.'; - - var isAbsolute = path.charCodeAt(0) === 47 /*/*/; - var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/; - - // Normalize the path - path = normalizeStringPosix(path, !isAbsolute); - - if (path.length === 0 && !isAbsolute) path = '.'; - if (path.length > 0 && trailingSeparator) path += '/'; - - if (isAbsolute) return '/' + path; - return path; - }, - - isAbsolute: function isAbsolute(path) { - assertPath(path); - return path.length > 0 && path.charCodeAt(0) === 47 /*/*/; - }, - - join: function join() { - if (arguments.length === 0) - return '.'; - var joined; - for (var i = 0; i < arguments.length; ++i) { - var arg = arguments[i]; - assertPath(arg); - if (arg.length > 0) { - if (joined === undefined) - joined = arg; - else - joined += '/' + arg; - } - } - if (joined === undefined) - return '.'; - return posix.normalize(joined); - }, - - relative: function relative(from, to) { - assertPath(from); - assertPath(to); - - if (from === to) return ''; - - from = posix.resolve(from); - to = posix.resolve(to); - - if (from === to) return ''; - - if (from === ".") return to; // FIX for 'odule.ts' (see issue #1398) - - // Trim any leading backslashes - var fromStart = 1; - for (; fromStart < from.length; ++fromStart) { - if (from.charCodeAt(fromStart) !== 47 /*/*/) - break; - } - var fromEnd = from.length; - var fromLen = fromEnd - fromStart; - - // Trim any leading backslashes - var toStart = 1; - for (; toStart < to.length; ++toStart) { - if (to.charCodeAt(toStart) !== 47 /*/*/) - break; - } - var toEnd = to.length; - var toLen = toEnd - toStart; - - // Compare paths to find the longest common path from root - var length = fromLen < toLen ? fromLen : toLen; - var lastCommonSep = -1; - var i = 0; - for (; i <= length; ++i) { - if (i === length) { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === 47 /*/*/) { - // We get here if `from` is the exact base path for `to`. - // For example: from='/foo/bar'; to='/foo/bar/baz' - return to.slice(toStart + i + 1); - } else if (i === 0) { - // We get here if `from` is the root - // For example: from='/'; to='/foo' - return to.slice(toStart + i); - } - } else if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === 47 /*/*/) { - // We get here if `to` is the exact base path for `from`. - // For example: from='/foo/bar/baz'; to='/foo/bar' - lastCommonSep = i; - } else if (i === 0) { - // We get here if `to` is the root. - // For example: from='/foo'; to='/' - lastCommonSep = 0; - } - } - break; - } - var fromCode = from.charCodeAt(fromStart + i); - var toCode = to.charCodeAt(toStart + i); - if (fromCode !== toCode) - break; - else if (fromCode === 47 /*/*/) - lastCommonSep = i; - } - - var out = ''; - // Generate the relative path based on the path difference between `to` - // and `from` - for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { - if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) { - if (out.length === 0) - out += '..'; - else - out += '/..'; - } - } - - // Lastly, append the rest of the destination (`to`) path that comes after - // the common path parts - if (out.length > 0) - return out + to.slice(toStart + lastCommonSep); - else { - toStart += lastCommonSep; - if (to.charCodeAt(toStart) === 47 /*/*/) - ++toStart; - return to.slice(toStart); - } - }, - - _makeLong: function _makeLong(path) { - return path; - }, - - dirname: function dirname(path) { - assertPath(path); - if (path.length === 0) return '.'; - var code = path.charCodeAt(0); - var hasRoot = code === 47 /*/*/; - var end = -1; - var matchedSlash = true; - for (var i = path.length - 1; i >= 1; --i) { - code = path.charCodeAt(i); - if (code === 47 /*/*/) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - - if (end === -1) return hasRoot ? '/' : '.'; - if (hasRoot && end === 1) return '//'; - return path.slice(0, end); - }, - - basename: function basename(path, ext) { - if (ext !== undefined && typeof ext !== 'string') throw new TypeError('"ext" argument must be a string'); - assertPath(path); - - var start = 0; - var end = -1; - var matchedSlash = true; - var i; - - if (ext !== undefined && ext.length > 0 && ext.length <= path.length) { - if (ext.length === path.length && ext === path) return ''; - var extIdx = ext.length - 1; - var firstNonSlashEnd = -1; - for (i = path.length - 1; i >= 0; --i) { - var code = path.charCodeAt(i); - if (code === 47 /*/*/) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } else { - if (firstNonSlashEnd === -1) { - // We saw the first non-path separator, remember this index in case - // we need it if the extension ends up not matching - matchedSlash = false; - firstNonSlashEnd = i + 1; - } - if (extIdx >= 0) { - // Try to match the explicit extension - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - // We matched the extension, so mark this as the end of our path - // component - end = i; - } - } else { - // Extension does not match, so our result is the entire path - // component - extIdx = -1; - end = firstNonSlashEnd; - } - } - } - } - - if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length; - return path.slice(start, end); - } else { - for (i = path.length - 1; i >= 0; --i) { - if (path.charCodeAt(i) === 47 /*/*/) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } else if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // path component - matchedSlash = false; - end = i + 1; - } - } - - if (end === -1) return ''; - return path.slice(start, end); - } - }, - - extname: function extname(path) { - assertPath(path); - var startDot = -1; - var startPart = 0; - var end = -1; - var matchedSlash = true; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - var preDotState = 0; - for (var i = path.length - 1; i >= 0; --i) { - var code = path.charCodeAt(i); - if (code === 47 /*/*/) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === 46) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) - startDot = i; - else if (preDotState !== 1) - preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - - if (startDot === -1 || end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ''; - } - return path.slice(startDot, end); - }, - - format: function format(pathObject) { - if (pathObject === null || typeof pathObject !== 'object') { - throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject); - } - return _format('/', pathObject); - }, - - parse: function parse(path) { - assertPath(path); - - var ret = { root: '', dir: '', base: '', ext: '', name: '' }; - if (path.length === 0) return ret; - var code = path.charCodeAt(0); - var isAbsolute = code === 47 /*/*/; - var start; - if (isAbsolute) { - ret.root = '/'; - start = 1; - } else { - start = 0; - } - var startDot = -1; - var startPart = 0; - var end = -1; - var matchedSlash = true; - var i = path.length - 1; - - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - var preDotState = 0; - - // Get non-dir info - for (; i >= start; --i) { - code = path.charCodeAt(i); - if (code === 47 /*/*/) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === 46) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - - if (startDot === -1 || end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - if (end !== -1) { - if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end); - } - } else { - if (startPart === 0 && isAbsolute) { - ret.name = path.slice(1, startDot); - ret.base = path.slice(1, end); - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - } - ret.ext = path.slice(startDot, end); - } - - if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/'; - - return ret; - }, - - sep: '/', - delimiter: ':', - win32: null, - posix: null -}; - -posix.posix = posix; - -module.exports = posix; diff --git a/cli/transform.js b/cli/transform.js index 8f68d7a2e5..93d806618c 100644 --- a/cli/transform.js +++ b/cli/transform.js @@ -4,4 +4,4 @@ */ // becomes replaced with the actual base by asc -exports.Transform = function Transform() { /* nop */ }; +export class Transform {} diff --git a/cli/util/browser/fs.js b/cli/util/browser/fs.js new file mode 100644 index 0000000000..040127c873 --- /dev/null +++ b/cli/util/browser/fs.js @@ -0,0 +1,2 @@ +const fs = {}; +export default fs; diff --git a/cli/util/browser/module.js b/cli/util/browser/module.js new file mode 100644 index 0000000000..88cb1de288 --- /dev/null +++ b/cli/util/browser/module.js @@ -0,0 +1,5 @@ +export function createRequire() { + return function require(path) { + throw new Error(`Cannot find module: '${path}'`); + }; +} diff --git a/cli/util/browser/path.js b/cli/util/browser/path.js new file mode 100644 index 0000000000..113b4b08dd --- /dev/null +++ b/cli/util/browser/path.js @@ -0,0 +1,520 @@ +import * as process from "./process.js"; + +// https://github.com/browserify/path-browserify v1.0.1 +// +// Copyright (c) 2013 James Halliday +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +function assertPath(path) { + if (typeof path !== 'string') { + throw new TypeError('Path must be a string. Received ' + JSON.stringify(path)); + } +} + +// Resolves . and .. elements in a path with directory names +function normalizeStringPosix(path, allowAboveRoot) { + var res = ''; + var lastSegmentLength = 0; + var lastSlash = -1; + var dots = 0; + var code; + for (var i = 0; i <= path.length; ++i) { + if (i < path.length) + code = path.charCodeAt(i); + else if (code === 47 /*/*/) + break; + else + code = 47 /*/*/; + if (code === 47 /*/*/) { + if (lastSlash === i - 1 || dots === 1) { + // NOOP + } else if (lastSlash !== i - 1 && dots === 2) { + if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) { + if (res.length > 2) { + var lastSlashIndex = res.lastIndexOf('/'); + if (lastSlashIndex !== res.length - 1) { + if (lastSlashIndex === -1) { + res = ''; + lastSegmentLength = 0; + } else { + res = res.slice(0, lastSlashIndex); + lastSegmentLength = res.length - 1 - res.lastIndexOf('/'); + } + lastSlash = i; + dots = 0; + continue; + } + } else if (res.length === 2 || res.length === 1) { + res = ''; + lastSegmentLength = 0; + lastSlash = i; + dots = 0; + continue; + } + } + if (allowAboveRoot) { + if (res.length > 0) + res += '/..'; + else + res = '..'; + lastSegmentLength = 2; + } + } else { + if (res.length > 0) + res += '/' + path.slice(lastSlash + 1, i); + else + res = path.slice(lastSlash + 1, i); + lastSegmentLength = i - lastSlash - 1; + } + lastSlash = i; + dots = 0; + } else if (code === 46 && dots !== -1) { + ++dots; + } else { + dots = -1; + } + } + return res; +} + +function _format(sep, pathObject) { + var dir = pathObject.dir || pathObject.root; + var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || ''); + if (!dir) { + return base; + } + if (dir === pathObject.root) { + return dir + base; + } + return dir + sep + base; +} + +// path.resolve([from ...], to) +export function resolve() { + var resolvedPath = ''; + var resolvedAbsolute = false; + var cwd; + + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path; + if (i >= 0) + path = arguments[i]; + else { + if (cwd === undefined) + cwd = process.cwd(); + path = cwd; + } + + assertPath(path); + + // Skip empty entries + if (path.length === 0) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/; + } + + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + + // Normalize the path + resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute); + + if (resolvedAbsolute) { + if (resolvedPath.length > 0) + return '/' + resolvedPath; + else + return '/'; + } else if (resolvedPath.length > 0) { + return resolvedPath; + } else { + return '.'; + } +} + +export function normalize(path) { + assertPath(path); + + if (path.length === 0) return '.'; + + var isAbsolute = path.charCodeAt(0) === 47 /*/*/; + var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/; + + // Normalize the path + path = normalizeStringPosix(path, !isAbsolute); + + if (path.length === 0 && !isAbsolute) path = '.'; + if (path.length > 0 && trailingSeparator) path += '/'; + + if (isAbsolute) return '/' + path; + return path; +} + +export function isAbsolute(path) { + assertPath(path); + return path.length > 0 && path.charCodeAt(0) === 47 /*/*/; +} + +export function join() { + if (arguments.length === 0) + return '.'; + var joined; + for (var i = 0; i < arguments.length; ++i) { + var arg = arguments[i]; + assertPath(arg); + if (arg.length > 0) { + if (joined === undefined) + joined = arg; + else + joined += '/' + arg; + } + } + if (joined === undefined) + return '.'; + return normalize(joined); +} + +export function relative(from, to) { + assertPath(from); + assertPath(to); + + if (from === to) return ''; + + from = resolve(from); + to = resolve(to); + + if (from === to) return ''; + + if (from === ".") return to; // FIX for 'odule.ts' (see issue #1398) + + // Trim any leading backslashes + var fromStart = 1; + for (; fromStart < from.length; ++fromStart) { + if (from.charCodeAt(fromStart) !== 47 /*/*/) + break; + } + var fromEnd = from.length; + var fromLen = fromEnd - fromStart; + + // Trim any leading backslashes + var toStart = 1; + for (; toStart < to.length; ++toStart) { + if (to.charCodeAt(toStart) !== 47 /*/*/) + break; + } + var toEnd = to.length; + var toLen = toEnd - toStart; + + // Compare paths to find the longest common path from root + var length = fromLen < toLen ? fromLen : toLen; + var lastCommonSep = -1; + var i = 0; + for (; i <= length; ++i) { + if (i === length) { + if (toLen > length) { + if (to.charCodeAt(toStart + i) === 47 /*/*/) { + // We get here if `from` is the exact base path for `to`. + // For example: from='/foo/bar'; to='/foo/bar/baz' + return to.slice(toStart + i + 1); + } else if (i === 0) { + // We get here if `from` is the root + // For example: from='/'; to='/foo' + return to.slice(toStart + i); + } + } else if (fromLen > length) { + if (from.charCodeAt(fromStart + i) === 47 /*/*/) { + // We get here if `to` is the exact base path for `from`. + // For example: from='/foo/bar/baz'; to='/foo/bar' + lastCommonSep = i; + } else if (i === 0) { + // We get here if `to` is the root. + // For example: from='/foo'; to='/' + lastCommonSep = 0; + } + } + break; + } + var fromCode = from.charCodeAt(fromStart + i); + var toCode = to.charCodeAt(toStart + i); + if (fromCode !== toCode) + break; + else if (fromCode === 47 /*/*/) + lastCommonSep = i; + } + + var out = ''; + // Generate the relative path based on the path difference between `to` + // and `from` + for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { + if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) { + if (out.length === 0) + out += '..'; + else + out += '/..'; + } + } + + // Lastly, append the rest of the destination (`to`) path that comes after + // the common path parts + if (out.length > 0) + return out + to.slice(toStart + lastCommonSep); + else { + toStart += lastCommonSep; + if (to.charCodeAt(toStart) === 47 /*/*/) + ++toStart; + return to.slice(toStart); + } +} + +export function dirname(path) { + assertPath(path); + if (path.length === 0) return '.'; + var code = path.charCodeAt(0); + var hasRoot = code === 47 /*/*/; + var end = -1; + var matchedSlash = true; + for (var i = path.length - 1; i >= 1; --i) { + code = path.charCodeAt(i); + if (code === 47 /*/*/) { + if (!matchedSlash) { + end = i; + break; + } + } else { + // We saw the first non-path separator + matchedSlash = false; + } + } + + if (end === -1) return hasRoot ? '/' : '.'; + if (hasRoot && end === 1) return '//'; + return path.slice(0, end); +} + +export function basename(path, ext) { + if (ext !== undefined && typeof ext !== 'string') throw new TypeError('"ext" argument must be a string'); + assertPath(path); + + var start = 0; + var end = -1; + var matchedSlash = true; + var i; + + if (ext !== undefined && ext.length > 0 && ext.length <= path.length) { + if (ext.length === path.length && ext === path) return ''; + var extIdx = ext.length - 1; + var firstNonSlashEnd = -1; + for (i = path.length - 1; i >= 0; --i) { + var code = path.charCodeAt(i); + if (code === 47 /*/*/) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + start = i + 1; + break; + } + } else { + if (firstNonSlashEnd === -1) { + // We saw the first non-path separator, remember this index in case + // we need it if the extension ends up not matching + matchedSlash = false; + firstNonSlashEnd = i + 1; + } + if (extIdx >= 0) { + // Try to match the explicit extension + if (code === ext.charCodeAt(extIdx)) { + if (--extIdx === -1) { + // We matched the extension, so mark this as the end of our path + // component + end = i; + } + } else { + // Extension does not match, so our result is the entire path + // component + extIdx = -1; + end = firstNonSlashEnd; + } + } + } + } + + if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length; + return path.slice(start, end); + } else { + for (i = path.length - 1; i >= 0; --i) { + if (path.charCodeAt(i) === 47 /*/*/) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + start = i + 1; + break; + } + } else if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // path component + matchedSlash = false; + end = i + 1; + } + } + + if (end === -1) return ''; + return path.slice(start, end); + } +} + +export function extname(path) { + assertPath(path); + var startDot = -1; + var startPart = 0; + var end = -1; + var matchedSlash = true; + // Track the state of characters (if any) we see before our first dot and + // after any path separator we find + var preDotState = 0; + for (var i = path.length - 1; i >= 0; --i) { + var code = path.charCodeAt(i); + if (code === 47 /*/*/) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + startPart = i + 1; + break; + } + continue; + } + if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // extension + matchedSlash = false; + end = i + 1; + } + if (code === 46) { + // If this is our first dot, mark it as the start of our extension + if (startDot === -1) + startDot = i; + else if (preDotState !== 1) + preDotState = 1; + } else if (startDot !== -1) { + // We saw a non-dot and non-path separator before our dot, so we should + // have a good chance at having a non-empty extension + preDotState = -1; + } + } + + if (startDot === -1 || end === -1 || + // We saw a non-dot character immediately before the dot + preDotState === 0 || + // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + return ''; + } + return path.slice(startDot, end); +} + +export function format(pathObject) { + if (pathObject === null || typeof pathObject !== 'object') { + throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject); + } + return _format('/', pathObject); +} + +export function parse(path) { + assertPath(path); + + var ret = { root: '', dir: '', base: '', ext: '', name: '' }; + if (path.length === 0) return ret; + var code = path.charCodeAt(0); + var isAbsolute = code === 47 /*/*/; + var start; + if (isAbsolute) { + ret.root = '/'; + start = 1; + } else { + start = 0; + } + var startDot = -1; + var startPart = 0; + var end = -1; + var matchedSlash = true; + var i = path.length - 1; + + // Track the state of characters (if any) we see before our first dot and + // after any path separator we find + var preDotState = 0; + + // Get non-dir info + for (; i >= start; --i) { + code = path.charCodeAt(i); + if (code === 47 /*/*/) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + startPart = i + 1; + break; + } + continue; + } + if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // extension + matchedSlash = false; + end = i + 1; + } + if (code === 46) { + // If this is our first dot, mark it as the start of our extension + if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1; + } else if (startDot !== -1) { + // We saw a non-dot and non-path separator before our dot, so we should + // have a good chance at having a non-empty extension + preDotState = -1; + } + } + + if (startDot === -1 || end === -1 || + // We saw a non-dot character immediately before the dot + preDotState === 0 || + // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + if (end !== -1) { + if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end); + } + } else { + if (startPart === 0 && isAbsolute) { + ret.name = path.slice(1, startDot); + ret.base = path.slice(1, end); + } else { + ret.name = path.slice(startPart, startDot); + ret.base = path.slice(startPart, end); + } + ret.ext = path.slice(startDot, end); + } + + if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/'; + + return ret; +} + +export const sep = '/'; +export const delimiter = ':'; +export const win32 = null; diff --git a/cli/shim/process.js b/cli/util/browser/process.js similarity index 86% rename from cli/shim/process.js rename to cli/util/browser/process.js index 91489f31b0..99d54a26f7 100644 --- a/cli/shim/process.js +++ b/cli/util/browser/process.js @@ -1,17 +1,18 @@ -module.exports = { - platform: "linux", - cwd() { - return "."; - }, - umask() { - return 0; - }, - hrtime, - argv: [], - exit(code = 0) { - throw Error(`exit ${code}`); - } -}; +export const platform = "linux"; + +export function cwd() { + return "."; +} + +export function umask() { + return 0; +} + +export const argv = []; + +export function exit(code = 0) { + throw Error(`exit ${code}`); +} // https://github.com/kumavis/browser-process-hrtime v1.0.0 // @@ -39,7 +40,7 @@ module.exports = { // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -var performance = global.performance || {}; +var performance = globalThis.performance || {}; var performanceNow = performance.now || performance.mozNow || @@ -48,7 +49,7 @@ var performanceNow = performance.webkitNow || function(){ return (new Date()).getTime(); }; -function hrtime(previousTimestamp) { +export function hrtime(previousTimestamp) { var clocktime = performanceNow.call(performance); var seconds = Math.floor(clocktime * 1e-3); var nanoseconds = Math.floor(clocktime * 1e6 - seconds * 1e9); diff --git a/cli/util/colors.d.ts b/cli/util/colors.d.ts index 75d689a50f..549f26df3e 100644 --- a/cli/util/colors.d.ts +++ b/cli/util/colors.d.ts @@ -3,9 +3,19 @@ * @license Apache-2.0 */ -interface Colors { - /** Whether terminal colors are supported. */ - supported: boolean; +export const GRAY: string; +export const RED: string; +export const GREEN: string; +export const YELLOW: string; +export const BLUE: string; +export const MAGENTA: string; +export const CYAN: string; +export const WHITE: string; +export const RESET: string; + +export class Colors { + /** Whether terminal colors are enabled. */ + enabled: boolean; /** Colors a string in gray if {@link supported}. */ gray(text: string): string; /** Colors a string in red if {@link supported}. */ @@ -24,32 +34,5 @@ interface Colors { white(text: string): string; } -interface Exports extends Colors { - /** Standard output wrapper. */ - stdout: Colors; - /** Standard error wrapper. */ - stderr: Colors; - /** Creates an instance for the specified stream. */ - from(stream: Record, base?: Record): Colors; - /** Gray color escape sequence. */ - GRAY: string; - /** Red color escape sequence. */ - RED: string; - /** Green color escape sequence. */ - GREEN: string; - /** Yellow color escape sequence. */ - YELLOW: string; - /** Blue color escape sequence. */ - BLUE: string; - /** Magenta color escape sequence. */ - MAGENTA: string; - /** Cyan color escape sequence. */ - CYAN: string; - /** White color escape sequence. */ - WHITE: string; - /** Reset color escape sequence. */ - RESET: string; -} - -declare const colors: Exports; -export = colors; +export const stdout: Colors; +export const stderr: Colors; diff --git a/cli/util/colors.js b/cli/util/colors.js index 798960c7a0..13edb153d9 100644 --- a/cli/util/colors.js +++ b/cli/util/colors.js @@ -4,32 +4,32 @@ */ var proc = typeof process !== "undefined" && process || {}; -var isCI = proc.env && "CI" in proc.env; // doesn't work when bundled because 'process' is a mock +var isCI = proc.env && "CI" in proc.env; -function from(stream, base) { - var colors = base || {}; - colors.supported = (stream && !!stream.isTTY) || isCI; - colors.gray = text => colors.supported ? exports.GRAY + text + exports.RESET : text; - colors.red = text => colors.supported ? exports.RED + text + exports.RESET : text; - colors.green = text => colors.supported ? exports.GREEN + text + exports.RESET : text; - colors.yellow = text => colors.supported ? exports.YELLOW + text + exports.RESET : text; - colors.blue = text => colors.supported ? exports.BLUE + text + exports.RESET : text; - colors.magenta = text => colors.supported ? exports.MAGENTA + text + exports.RESET : text; - colors.cyan = text => colors.supported ? exports.CYAN + text + exports.RESET : text; - colors.white = text => colors.supported ? exports.WHITE + text + exports.RESET : text; - return colors; -} +export const GRAY = "\u001b[90m"; +export const RED = "\u001b[91m"; +export const GREEN = "\u001b[92m"; +export const YELLOW = "\u001b[93m"; +export const BLUE = "\u001b[94m"; +export const MAGENTA = "\u001b[95m"; +export const CYAN = "\u001b[96m"; +export const WHITE = "\u001b[97m"; +export const RESET = "\u001b[0m"; -exports.stdout = from(proc.stdout, exports); -exports.stderr = from(proc.stderr); -exports.from = from; +export class Colors { + constructor(stream) { + this.stream = stream; + this.enabled = Boolean((this.stream && this.stream.isTTY) || isCI); + } + gray(text) { return this.enabled ? GRAY + text + RESET : text; } + red(text) { return this.enabled ? RED + text + RESET : text; } + green(text) { return this.enabled ? GREEN + text + RESET : text; } + yellow(text) { return this.enabled ? YELLOW + text + RESET : text; } + blue(text) { return this.enabled ? BLUE + text + RESET : text; } + magenta(text) { return this.enabled ? MAGENTA + text + RESET : text; } + cyan(text) { return this.enabled ? CYAN + text + RESET : text; } + white(text) { return this.enabled ? WHITE + text + RESET : text; } +} -exports.GRAY = "\u001b[90m"; -exports.RED = "\u001b[91m"; -exports.GREEN = "\u001b[92m"; -exports.YELLOW = "\u001b[93m"; -exports.BLUE = "\u001b[94m"; -exports.MAGENTA = "\u001b[95m"; -exports.CYAN = "\u001b[96m"; -exports.WHITE = "\u001b[97m"; -exports.RESET = "\u001b[0m"; +export const stdout = new Colors(proc.stdout); +export const stderr = new Colors(proc.stderr); diff --git a/cli/util/fetch.d.ts b/cli/util/fetch.d.ts new file mode 100644 index 0000000000..3f79f0749f --- /dev/null +++ b/cli/util/fetch.d.ts @@ -0,0 +1,5 @@ +export default function fetch(url: string): Promise<{ + arrayBuffer(): Promise; + text(): Promise; + json(): Promise; // eslint-disable-line @typescript-eslint/no-explicit-any +}>; diff --git a/cli/util/fetch.js b/cli/util/fetch.js new file mode 100644 index 0000000000..147ba38533 --- /dev/null +++ b/cli/util/fetch.js @@ -0,0 +1,26 @@ +import { fs } from "./node.js"; + +var _fetch = typeof fetch === "function" ? fetch : + url => new Promise((resolve, reject) => { // eslint-disable-line no-global-assign + fs.readFile(url, (err, data) => { + if (err) reject(err); + resolve({ + arrayBuffer() { + let offset = data.byteOffset; + return Promise.resolve(data.buffer.slice(offset, offset + data.byteLength)); + }, + text() { + return Promise.resolve(data.toString()); + }, + json() { + try { + return Promise.resolve(JSON.parse(data.toString())); + } catch (err) { + return Promise.reject(err); + } + } + }); + }); + }); + +export default _fetch; diff --git a/cli/util/find.d.ts b/cli/util/find.d.ts index cc2aeaed37..4e46155df2 100644 --- a/cli/util/find.d.ts +++ b/cli/util/find.d.ts @@ -3,4 +3,4 @@ * @license Apache-2.0 */ -export function files(dirname: string, filter?: ((name: string) => bool) | RegExp): string[]; +export function findFiles(dirname: string, filter?: ((name: string) => bool) | RegExp): string[]; diff --git a/cli/util/find.js b/cli/util/find.js index 57230109a7..8e1ed7881e 100644 --- a/cli/util/find.js +++ b/cli/util/find.js @@ -3,10 +3,9 @@ * @license Apache-2.0 */ -const fs = require("fs"); -const path = require("path"); +import { fs, path } from "./node.js"; -function findFiles(dirname, filter) { +export function findFiles(dirname, filter) { var out = []; fs.readdirSync(dirname).forEach(name => { if (fs.statSync(path.join(dirname, name)).isDirectory()) { @@ -18,4 +17,4 @@ function findFiles(dirname, filter) { return out; } -exports.files = findFiles; +export default findFiles; diff --git a/cli/util/mkdirp.js b/cli/util/mkdirp.js index 24d94043b0..4a981e4952 100644 --- a/cli/util/mkdirp.js +++ b/cli/util/mkdirp.js @@ -24,11 +24,9 @@ * THE SOFTWARE. */ -const path = require("path"); -const fs = require("fs"); -const process = require("process"); // ensure shim +import { fs, path, process } from "./node.js"; -module.exports = function mkdirp(p, opts, made) { +export default function mkdirp(p, opts, made) { if (!opts || typeof opts !== "object") { opts = { mode: opts }; } @@ -59,4 +57,4 @@ module.exports = function mkdirp(p, opts, made) { } } return made; -}; +} diff --git a/cli/util/node.d.ts b/cli/util/node.d.ts new file mode 100644 index 0000000000..1610a8fa53 --- /dev/null +++ b/cli/util/node.d.ts @@ -0,0 +1,10 @@ +import fs from "fs"; +import module from "module"; +import path from "path"; +import process from "process"; +export { + fs, + module, + path, + process +}; diff --git a/cli/util/node.js b/cli/util/node.js new file mode 100644 index 0000000000..8e45c8bb5b --- /dev/null +++ b/cli/util/node.js @@ -0,0 +1,36 @@ +/** + * @fileoverview Node.js re-exports or shims depending on environment. + * @license Apache-2.0 + */ + +/* global globalThis */ + +if (typeof globalThis === "undefined") { + globalThis = typeof global !== "undefined" ? global : window; // eslint-disable-line no-global-assign +} + +export const isNode = Object.prototype.toString.call(typeof globalThis.process !== 'undefined' ? globalThis.process : 0) === '[object process]'; + +var fs; +var module; +var path; +var process; + +if (isNode) { + fs = await import("fs"); + module = await import("module"); + path = await import("path"); + process = globalThis.process; +} else { + fs = await import("./browser/fs.js"); + module = await import("./browser/module.js"); + path = await import("./browser/path.js"); + process = await import("./browser/process.js"); +} + +export { + fs, + module, + path, + process +}; diff --git a/cli/util/options.js b/cli/util/options.js index c4159fec27..7cbdb1992e 100644 --- a/cli/util/options.js +++ b/cli/util/options.js @@ -3,8 +3,10 @@ * @license Apache-2.0 */ -const path = require("path"); -const colorsUtil = require("./colors"); +import { path, module } from "./node.js"; +import * as colorsUtil from "./colors.js"; + +const require = module.createRequire(import.meta.url); // type | meaning // -----|--------------- @@ -17,7 +19,7 @@ const colorsUtil = require("./colors"); // S | string array /** Parses the specified command line arguments according to the given configuration. */ -function parse(argv, config, propagateDefaults = true) { +export function parse(argv, config, propagateDefaults = true) { var options = {}; var unknown = []; var args = []; @@ -93,10 +95,8 @@ function parse(argv, config, propagateDefaults = true) { return { options, unknown, arguments: args, trailing }; } -exports.parse = parse; - /** Generates the help text for the specified configuration. */ -function help(config, options) { +export function help(config, options) { if (!options) options = {}; var indent = options.indent || 2; var padding = options.padding || 24; @@ -130,18 +130,16 @@ function help(config, options) { var hasCategories = false; Object.keys(sbCategories).forEach(category => { hasCategories = true; - sb.push(eol + " " + colorsUtil.gray(category) + eol); + sb.push(eol + " " + colorsUtil.stdout.gray(category) + eol); sb.push(sbCategories[category].join(eol)); }); if (hasCategories) { - sb.push(eol + " " + colorsUtil.gray("Other") + eol); + sb.push(eol + " " + colorsUtil.stdout.gray("Other") + eol); } sb.push(sbOther.join(eol)); return sb.join(eol); } -exports.help = help; - /** Sanitizes an option value to be a valid value of the option's type. */ function sanitizeValue(value, type) { if (value != null) { @@ -172,7 +170,7 @@ function sanitizeValue(value, type) { } /** Merges two sets of options into one, preferring the current over the parent set. */ -function merge(config, currentOptions, parentOptions, parentBaseDir) { +export function merge(config, currentOptions, parentOptions, parentBaseDir) { const mergedOptions = {}; for (const [key, { type, mutuallyExclusive, isPath, useNodeResolution, cliOnly }] of Object.entries(config)) { let currentValue = sanitizeValue(currentOptions[key], type); @@ -235,9 +233,7 @@ function merge(config, currentOptions, parentOptions, parentBaseDir) { return mergedOptions; } -exports.merge = merge; - -function normalizePath(p) { +export function normalizePath(p) { const parsed = path.parse(p); if (!parsed.root) { parsed.root = "./"; @@ -245,30 +241,20 @@ function normalizePath(p) { return path.format(parsed); } -exports.normalizePath = normalizePath; - -const dynrequire = typeof __webpack_require__ === "function" - ? __non_webpack_require__ - : require; - /** Resolves a single possibly relative path. Keeps absolute paths, otherwise prepends baseDir. */ -function resolvePath(p, baseDir, useNodeResolution = false) { +export function resolvePath(p, baseDir, useNodeResolution = false) { if (path.isAbsolute(p)) return p; - if (useNodeResolution && !p.startsWith(".")) { - return dynrequire.resolve(p, { paths: [ baseDir ] }); + if (useNodeResolution && !p.startsWith(".") && require.resolve) { + return require.resolve(p, { paths: [ baseDir ] }); } return normalizePath(path.join(baseDir, p)); } -exports.resolvePath = resolvePath; - /** Populates default values on a parsed options result. */ -function addDefaults(config, options) { +export function addDefaults(config, options) { for (const [key, { default: defaultValue }] of Object.entries(config)) { if (options[key] == null && defaultValue != null) { options[key] = defaultValue; } } } - -exports.addDefaults = addDefaults; diff --git a/cli/util/utf8.js b/cli/util/utf8.js index 22f16671e9..22d07f3502 100644 --- a/cli/util/utf8.js +++ b/cli/util/utf8.js @@ -1,39 +1,30 @@ /** - * @fileoverview UTF8 utility. + * @fileoverview UTF-8 utility. * @license Apache-2.0 */ -// @protobufjs/utf8 - -/** - * A minimal UTF8 implementation for number arrays. - * @memberof util - * @namespace - */ -var utf8 = exports; - /** * Calculates the UTF8 byte length of a string. * @param {string} string String * @returns {number} Byte length */ -utf8.length = function utf8_length(string) { - var len = 0, - c = 0; - for (var i = 0, l = string.length; i < l; ++i) { - c = string.charCodeAt(i); - if (c < 128) +export function length(string) { + var len = 0; + for (var i = 0, k = string.length; i < k; ++i) { + let c = string.charCodeAt(i); + if (c < 128) { len += 1; - else if (c < 2048) + } else if (c < 2048) { len += 2; - else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { + } else if ((c & 0xFC00) === 0xD800 && i + 1 < k && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { ++i; len += 4; - } else + } else { len += 3; + } } return len; -}; +} /** * Reads UTF8 bytes as a string. @@ -42,38 +33,37 @@ utf8.length = function utf8_length(string) { * @param {number} end Source end * @returns {string} String read */ -utf8.read = function utf8_read(buffer, start, end) { +export function read(buffer, start, end) { var len = end - start; - if (len < 1) - return ""; + if (len < 1) return ""; var parts = null, chunk = [], i = 0, // char offset t; // temporary while (start < end) { t = buffer[start++]; - if (t < 128) + if (t < 128) { chunk[i++] = t; - else if (t > 191 && t < 224) + } else if (t > 191 && t < 224) { chunk[i++] = (t & 31) << 6 | buffer[start++] & 63; - else if (t > 239 && t < 365) { + } else if (t > 239 && t < 365) { t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000; chunk[i++] = 0xD800 + (t >> 10); chunk[i++] = 0xDC00 + (t & 1023); - } else + } else { chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63; - if (i > 8191) { + } + if (i >= 8192) { (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); i = 0; } } if (parts) { - if (i) - parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + if (i) parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); return parts.join(""); } return String.fromCharCode.apply(String, chunk.slice(0, i)); -}; +} /** * Writes a string as UTF8 bytes. @@ -82,18 +72,16 @@ utf8.read = function utf8_read(buffer, start, end) { * @param {number} offset Destination offset * @returns {number} Bytes written */ -utf8.write = function utf8_write(string, buffer, offset) { - var start = offset, - c1, // character 1 - c2; // character 2 - for (var i = 0; i < string.length; ++i) { - c1 = string.charCodeAt(i); +export function write(string, buffer, offset) { + var start = offset; + for (var i = 0, k = string.length; i < k; ++i) { + let c1 = string.charCodeAt(i), c2; if (c1 < 128) { buffer[offset++] = c1; } else if (c1 < 2048) { buffer[offset++] = c1 >> 6 | 192; buffer[offset++] = c1 & 63 | 128; - } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { + } else if ((c1 & 0xFC00) === 0xD800 && i + 1 < k && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); ++i; buffer[offset++] = c1 >> 18 | 240; @@ -107,4 +95,4 @@ utf8.write = function utf8_write(string, buffer, offset) { } } return offset - start; -}; +} diff --git a/index.d.ts b/index.d.ts index c039a8000c..c5bb6a415d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,2 +1,2 @@ -import "./src/glue/js"; -export * from "./src"; +import "./src/glue/js/index"; +export * from "./src/index"; diff --git a/index.js b/index.js index a2ab787e8e..991c584105 100644 --- a/index.js +++ b/index.js @@ -1,11 +1,5 @@ -require("ts-node").register({ - project: require("path").join(__dirname, "src", "tsconfig.json"), - compilerHost: true, - skipIgnore: true, - files: true, - compilerOptions: { - removeComments: false - } -}); -require("./src/glue/js"); -module.exports = require("./src"); +import sourceMapSupport from "source-map-support"; +sourceMapSupport.install(); +export * from "./dist/assemblyscript.js"; +import * as assemblyscript from "./dist/assemblyscript.js"; +export default assemblyscript; diff --git a/index.release.d.ts b/index.release.d.ts deleted file mode 100644 index 388aca2060..0000000000 --- a/index.release.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/// -export * from "assemblyscript"; diff --git a/index.release.js b/index.release.js deleted file mode 100644 index b459cec30a..0000000000 --- a/index.release.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./dist/assemblyscript"); diff --git a/package-lock.json b/package-lock.json index 5b72ca0360..6d6db925da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "binaryen": "102.0.0-nightly.20211028", + "binaryen": "102.0.0-nightly.20211118", "long": "^5.1.0", "source-map-support": "^0.5.20", "ts-node": "^10.4.0" @@ -22,15 +22,14 @@ "@typescript-eslint/eslint-plugin": "^5.3.1", "@typescript-eslint/parser": "^5.3.1", "diff": "^5.0.0", + "esbuild": "^0.13.14", "eslint": "^8.2.0", "glob": "^7.2.0", "mkdirp": "^1.0.4", "physical-cpu-count": "^2.0.0", "ts-loader": "^9.2.6", "ts-node": "^10.4.0", - "typescript": "~4.4.4", - "webpack": "^5.61.0", - "webpack-cli": "^4.9.1" + "typescript": "~4.4.4" }, "funding": { "type": "opencollective", @@ -39,16 +38,14 @@ }, "node_modules/@cspotcode/source-map-consumer": { "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", + "license": "BSD-3-Clause", "engines": { "node": ">= 12" } }, "node_modules/@cspotcode/source-map-support": { "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "license": "MIT", "dependencies": { "@cspotcode/source-map-consumer": "0.8.0" }, @@ -56,20 +53,10 @@ "node": ">=12" } }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.5.tgz", - "integrity": "sha512-6nFkfkmSeV/rqSaS4oWHgmpnYw194f6hmWF5is6b0J1naJZoiD0NTc9AiUwPHvWsowkjuHErCZT1wa0jg+BLIA==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/@eslint/eslintrc": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", - "integrity": "sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -87,18 +74,16 @@ }, "node_modules/@eslint/eslintrc/node_modules/ignore": { "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/@humanwhocodes/config-array": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", - "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@humanwhocodes/object-schema": "^1.2.0", "debug": "^4.1.1", @@ -110,15 +95,13 @@ }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -129,18 +112,16 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -151,29 +132,25 @@ }, "node_modules/@tsconfig/node10": { "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==" + "license": "MIT" }, "node_modules/@tsconfig/node12": { "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==" + "license": "MIT" }, "node_modules/@tsconfig/node14": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==" + "license": "MIT" }, "node_modules/@tsconfig/node16": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==" + "license": "MIT" }, "node_modules/@types/eslint": { "version": "7.28.2", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.2.tgz", - "integrity": "sha512-KubbADPkfoU75KgKeKLsFHXnU4ipH7wYg0TRT33NK3N3yiu7jlFAAoygIWBV+KbuHx/G+AvuGX6DllnK35gfJA==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -181,9 +158,9 @@ }, "node_modules/@types/eslint-scope": { "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@types/eslint": "*", "@types/estree": "*" @@ -191,26 +168,23 @@ }, "node_modules/@types/estree": { "version": "0.0.50", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", - "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/@types/json-schema": { "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/node": { "version": "16.11.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.7.tgz", - "integrity": "sha512-QB5D2sqfSjCmTuWcBWyJ+/44bcjO7VbjSbOE0ucoVbAsSNQc4Lt6QkgkVXkTDwkL4z/beecZNDvVX15D4P8Jbw==" + "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.3.1.tgz", - "integrity": "sha512-cFImaoIr5Ojj358xI/SDhjog57OK2NqlpxwdcgyxDA3bJlZcJq5CPzUXtpD7CxI2Hm6ATU7w5fQnnkVnmwpHqw==", "dev": true, + "license": "MIT", "dependencies": { "@typescript-eslint/experimental-utils": "5.3.1", "@typescript-eslint/scope-manager": "5.3.1", @@ -240,9 +214,8 @@ }, "node_modules/@typescript-eslint/experimental-utils": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.3.1.tgz", - "integrity": "sha512-RgFn5asjZ5daUhbK5Sp0peq0SSMytqcrkNfU4pnDma2D8P3ElZ6JbYjY8IMSFfZAJ0f3x3tnO3vXHweYg0g59w==", "dev": true, + "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.9", "@typescript-eslint/scope-manager": "5.3.1", @@ -264,9 +237,8 @@ }, "node_modules/@typescript-eslint/parser": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.3.1.tgz", - "integrity": "sha512-TD+ONlx5c+Qhk21x9gsJAMRohWAUMavSOmJgv3JGy9dgPhuBd5Wok0lmMClZDyJNLLZK1JRKiATzCKZNUmoyfw==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "@typescript-eslint/scope-manager": "5.3.1", "@typescript-eslint/types": "5.3.1", @@ -291,9 +263,8 @@ }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.3.1.tgz", - "integrity": "sha512-XksFVBgAq0Y9H40BDbuPOTUIp7dn4u8oOuhcgGq7EoDP50eqcafkMVGrypyVGvDYHzjhdUCUwuwVUK4JhkMAMg==", "dev": true, + "license": "MIT", "dependencies": { "@typescript-eslint/types": "5.3.1", "@typescript-eslint/visitor-keys": "5.3.1" @@ -308,9 +279,8 @@ }, "node_modules/@typescript-eslint/types": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.3.1.tgz", - "integrity": "sha512-bG7HeBLolxKHtdHG54Uac750eXuQQPpdJfCYuw4ZI3bZ7+GgKClMWM8jExBtp7NSP4m8PmLRM8+lhzkYnSmSxQ==", "dev": true, + "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -321,9 +291,8 @@ }, "node_modules/@typescript-eslint/typescript-estree": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.3.1.tgz", - "integrity": "sha512-PwFbh/PKDVo/Wct6N3w+E4rLZxUDgsoII/GrWM2A62ETOzJd4M6s0Mu7w4CWsZraTbaC5UQI+dLeyOIFF1PquQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "@typescript-eslint/types": "5.3.1", "@typescript-eslint/visitor-keys": "5.3.1", @@ -348,9 +317,8 @@ }, "node_modules/@typescript-eslint/visitor-keys": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.3.1.tgz", - "integrity": "sha512-3cHUzUuVTuNHx0Gjjt5pEHa87+lzyqOiHXy/Gz+SJOCW1mpw9xQHIIEwnKn+Thph1mgWyZ90nboOcSuZr/jTTQ==", "dev": true, + "license": "MIT", "dependencies": { "@typescript-eslint/types": "5.3.1", "eslint-visitor-keys": "^3.0.0" @@ -365,9 +333,9 @@ }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/helper-numbers": "1.11.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.1" @@ -375,27 +343,27 @@ }, "node_modules/@webassemblyjs/floating-point-hex-parser": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.11.1", "@webassemblyjs/helper-api-error": "1.11.1", @@ -404,15 +372,15 @@ }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-buffer": "1.11.1", @@ -422,33 +390,33 @@ }, "node_modules/@webassemblyjs/ieee754": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } }, "node_modules/@webassemblyjs/leb128": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", "dev": true, + "license": "Apache-2.0", + "peer": true, "dependencies": { "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/utf8": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-buffer": "1.11.1", @@ -462,9 +430,9 @@ }, "node_modules/@webassemblyjs/wasm-gen": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.1", @@ -475,9 +443,9 @@ }, "node_modules/@webassemblyjs/wasm-opt": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-buffer": "1.11.1", @@ -487,9 +455,9 @@ }, "node_modules/@webassemblyjs/wasm-parser": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-api-error": "1.11.1", @@ -501,66 +469,29 @@ }, "node_modules/@webassemblyjs/wast-printer": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.11.1", "@xtuc/long": "4.2.2" } }, - "node_modules/@webpack-cli/configtest": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.1.0.tgz", - "integrity": "sha512-ttOkEkoalEHa7RaFYpM0ErK1xc4twg3Am9hfHhL7MVqlHebnkYd2wuI/ZqTDj0cVzZho6PdinY0phFZV3O0Mzg==", - "dev": true, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x", - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/info": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.4.0.tgz", - "integrity": "sha512-F6b+Man0rwE4n0409FyAJHStYA5OIZERxmnUfLVwv0mc0V1wLad3V7jqRlMkgKBeAq07jUvglacNaa6g9lOpuw==", - "dev": true, - "dependencies": { - "envinfo": "^7.7.3" - }, - "peerDependencies": { - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/serve": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.6.0.tgz", - "integrity": "sha512-ZkVeqEmRpBV2GHvjjUZqEai2PpUbuq8Bqd//vEYsp63J8WyexI8ppCqVS3Zs0QADf6aWuPdU+0XsPI647PVlQA==", - "dev": true, - "peerDependencies": { - "webpack-cli": "4.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } - } - }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true + "dev": true, + "license": "BSD-3-Clause", + "peer": true }, "node_modules/@xtuc/long": { "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true + "dev": true, + "license": "Apache-2.0", + "peer": true }, "node_modules/acorn": { "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -570,35 +501,32 @@ }, "node_modules/acorn-import-assertions": { "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", "dev": true, + "license": "MIT", + "peer": true, "peerDependencies": { "acorn": "^8" } }, "node_modules/acorn-jsx": { "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/acorn-walk": { "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/ajv": { "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -612,36 +540,33 @@ }, "node_modules/ajv-keywords": { "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true, + "license": "MIT", + "peer": true, "peerDependencies": { "ajv": "^6.9.1" } }, "node_modules/ansi-colors": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/ansi-regex": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -654,43 +579,39 @@ }, "node_modules/arg": { "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + "license": "MIT" }, "node_modules/argparse": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/array-union": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/binaryen": { - "version": "102.0.0-nightly.20211028", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-102.0.0-nightly.20211028.tgz", - "integrity": "sha512-GCJBVB5exbxzzvyt8MGDv/MeUjs6gkXDvf4xOIItRBptYl0Tz5sm1o/uG95YK0L0VeG5ajDu3hRtkBP2kzqC5w==", + "version": "102.0.0-nightly.20211118", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-102.0.0-nightly.20211118.tgz", + "integrity": "sha512-bueSEfwXWdBavp5Q0xqpeKHlKgmh+7n0pwlFditPGCbIHvH87vFuHiqdsqGedTrmV1Ar3f7zBBIQeg8P0/slOA==", "bin": { - "wasm-opt": "bin/wasm-opt" + "wasm-opt": "bin/wasm-opt", + "wasm2js": "bin/wasm2js" } }, "node_modules/brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -698,9 +619,8 @@ }, "node_modules/braces": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, + "license": "MIT", "dependencies": { "fill-range": "^7.0.1" }, @@ -710,9 +630,9 @@ }, "node_modules/browserslist": { "version": "4.17.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.6.tgz", - "integrity": "sha512-uPgz3vyRTlEiCv4ee9KlsKgo2V6qPk7Jsn0KAn2OBqbqKo3iNcPEC1Ti6J4dwnz+aIRfEEEuOzC9IBk8tXUomw==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001274", "electron-to-chromium": "^1.3.886", @@ -733,23 +653,21 @@ }, "node_modules/buffer-from": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + "license": "MIT" }, "node_modules/callsites": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/caniuse-lite": { "version": "1.0.30001278", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001278.tgz", - "integrity": "sha512-mpF9KeH8u5cMoEmIic/cr7PNS+F5LWBk0t2ekGT60lFf0Wq+n9LspAj0g3P+o7DQhD3sUdlMln4YFAWhFYn9jg==", "dev": true, + "license": "CC-BY-4.0", + "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/browserslist" @@ -757,9 +675,8 @@ }, "node_modules/chalk": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -773,32 +690,17 @@ }, "node_modules/chrome-trace-event": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=6.0" } }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -808,38 +710,28 @@ }, "node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/colorette": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz", - "integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/commander": { "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/create-require": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + "license": "MIT" }, "node_modules/cross-spawn": { "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -851,9 +743,8 @@ }, "node_modules/debug": { "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -868,24 +759,21 @@ }, "node_modules/deep-is": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/diff": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "node_modules/dir-glob": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, + "license": "MIT", "dependencies": { "path-type": "^4.0.0" }, @@ -895,9 +783,8 @@ }, "node_modules/doctrine": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -907,15 +794,14 @@ }, "node_modules/electron-to-chromium": { "version": "1.3.891", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.891.tgz", - "integrity": "sha512-3cpwR82QkIS01CN/dup/4Yr3BiOiRLlZlcAFn/5FbNCunMO9ojqDgEP9JEo1QNLflu3pEnPWve50gHOEKc7r6w==", - "dev": true + "dev": true, + "license": "ISC", + "peer": true }, "node_modules/enhanced-resolve": { "version": "5.8.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz", - "integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -926,9 +812,8 @@ }, "node_modules/enquirer": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, + "license": "MIT", "dependencies": { "ansi-colors": "^4.1.1" }, @@ -936,38 +821,65 @@ "node": ">=8.6" } }, - "node_modules/envinfo": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", - "dev": true, - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/es-module-lexer": { "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/esbuild": { + "version": "0.13.14", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "optionalDependencies": { + "esbuild-android-arm64": "0.13.14", + "esbuild-darwin-64": "0.13.14", + "esbuild-darwin-arm64": "0.13.14", + "esbuild-freebsd-64": "0.13.14", + "esbuild-freebsd-arm64": "0.13.14", + "esbuild-linux-32": "0.13.14", + "esbuild-linux-64": "0.13.14", + "esbuild-linux-arm": "0.13.14", + "esbuild-linux-arm64": "0.13.14", + "esbuild-linux-mips64le": "0.13.14", + "esbuild-linux-ppc64le": "0.13.14", + "esbuild-netbsd-64": "0.13.14", + "esbuild-openbsd-64": "0.13.14", + "esbuild-sunos-64": "0.13.14", + "esbuild-windows-32": "0.13.14", + "esbuild-windows-64": "0.13.14", + "esbuild-windows-arm64": "0.13.14" + } + }, + "node_modules/esbuild-windows-64": { + "version": "0.13.14", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] }, "node_modules/escalade": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -977,9 +889,8 @@ }, "node_modules/eslint": { "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.2.0.tgz", - "integrity": "sha512-erw7XmM+CLxTOickrimJ1SiF55jiNlVSp2qqm0NuBWPtHYQCegD5ZMaW0c3i5ytPqL+SSLaCxdvQXFPLJn+ABw==", "dev": true, + "license": "MIT", "dependencies": { "@eslint/eslintrc": "^1.0.4", "@humanwhocodes/config-array": "^0.6.0", @@ -1032,9 +943,8 @@ }, "node_modules/eslint-scope": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -1045,9 +955,8 @@ }, "node_modules/eslint-utils": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, + "license": "MIT", "dependencies": { "eslint-visitor-keys": "^2.0.0" }, @@ -1063,27 +972,24 @@ }, "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=10" } }, "node_modules/eslint-visitor-keys": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/eslint/node_modules/eslint-scope": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-6.0.0.tgz", - "integrity": "sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -1094,27 +1000,24 @@ }, "node_modules/eslint/node_modules/estraverse": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/eslint/node_modules/ignore": { "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/espree": { "version": "9.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.0.0.tgz", - "integrity": "sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.5.0", "acorn-jsx": "^5.3.1", @@ -1126,9 +1029,8 @@ }, "node_modules/esquery": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -1138,18 +1040,16 @@ }, "node_modules/esquery/node_modules/estraverse": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/esrecurse": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -1159,74 +1059,46 @@ }, "node_modules/esrecurse/node_modules/estraverse": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/estraverse": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/esutils": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/events": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=0.8.x" } }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-glob": { "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -1240,9 +1112,8 @@ }, "node_modules/fast-glob/node_modules/glob-parent": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -1252,36 +1123,26 @@ }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", - "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fastq": { "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, + "license": "ISC", "dependencies": { "reusify": "^1.0.4" } }, "node_modules/file-entry-cache": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, + "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -1291,9 +1152,8 @@ }, "node_modules/fill-range": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1301,24 +1161,10 @@ "node": ">=8" } }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/flat-cache": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, + "license": "MIT", "dependencies": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -1329,45 +1175,23 @@ }, "node_modules/flatted": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", - "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/functional-red-black-tree": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "license": "MIT" }, "node_modules/glob": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1385,9 +1209,8 @@ }, "node_modules/glob-parent": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -1397,15 +1220,14 @@ }, "node_modules/glob-to-regexp": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true + "dev": true, + "license": "BSD-2-Clause", + "peer": true }, "node_modules/globals": { "version": "13.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", - "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -1418,9 +1240,8 @@ }, "node_modules/globby": { "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", "dev": true, + "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -1438,54 +1259,29 @@ }, "node_modules/graceful-fs": { "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } + "license": "ISC" }, "node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, "node_modules/ignore": { "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/import-fresh": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -1497,36 +1293,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-local": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.3.tgz", - "integrity": "sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/imurmurhash": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } }, "node_modules/inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, + "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -1534,45 +1312,21 @@ }, "node_modules/inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/interpret": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", - "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-core-module": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", - "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "ISC" }, "node_modules/is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-glob": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -1582,57 +1336,22 @@ }, "node_modules/is-number": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } }, - "node_modules/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, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true, - "engines": { - "node": ">=0.10.0" - } + "license": "ISC" }, "node_modules/jest-worker": { "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.3.1.tgz", - "integrity": "sha512-ks3WCzsiZaOPJl/oMsDjaf0TRiSv7ctNgs0FqRr2nARsovz6AWWy4oLElwcquGSz692DzgZQrCLScPNs5YlC4g==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -1644,9 +1363,9 @@ }, "node_modules/jest-worker/node_modules/supports-color": { "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -1659,9 +1378,8 @@ }, "node_modules/js-yaml": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -1671,36 +1389,24 @@ }, "node_modules/json-parse-better-errors": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, - "engines": { - "node": ">=0.10.0" - } + "license": "MIT" }, "node_modules/levn": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -1711,41 +1417,26 @@ }, "node_modules/loader-runner": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", - "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=6.11.5" } }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/lodash.merge": { "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/long": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/long/-/long-5.1.0.tgz", - "integrity": "sha512-eNc10JP6ezXp/qxXZlKS4OHAKNae3je9LUkjmXPDEa+Iidlz0n4nFi/9LT+GOgcayMWhykLoISN+v0THeOiWQQ==" + "license": "Apache-2.0" }, "node_modules/lru-cache": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -1755,29 +1446,26 @@ }, "node_modules/make-error": { "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + "license": "ISC" }, "node_modules/merge-stream": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/merge2": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/micromatch": { "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, + "license": "MIT", "dependencies": { "braces": "^3.0.1", "picomatch": "^2.2.3" @@ -1788,18 +1476,18 @@ }, "node_modules/mime-db": { "version": "1.50.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", - "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.33", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", - "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "mime-db": "1.50.0" }, @@ -1807,20 +1495,10 @@ "node": ">= 0.6" } }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1830,9 +1508,8 @@ }, "node_modules/mkdirp": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, + "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -1842,69 +1519,38 @@ }, "node_modules/ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/natural-compare": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/neo-async": { "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true + "dev": true, + "license": "MIT", + "peer": true }, "node_modules/node-releases": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", - "integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==", - "dev": true - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } + "license": "MIT", + "peer": true }, "node_modules/once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, + "license": "ISC", "dependencies": { "wrappy": "1" } }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/optionator": { "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, + "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -1917,47 +1563,10 @@ "node": ">= 0.8.0" } }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/parent-module": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -1965,65 +1574,45 @@ "node": ">=6" } }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-key": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, "node_modules/path-type": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/physical-cpu-count": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/physical-cpu-count/-/physical-cpu-count-2.0.0.tgz", - "integrity": "sha1-GN4vl+S/epVRrXURlCtUlverpmA=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/picocolors": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "dev": true, + "license": "ISC", + "peer": true }, "node_modules/picomatch": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -2031,49 +1620,32 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/progress": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/punycode": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/queue-microtask": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -2088,34 +1660,22 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/randombytes": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "safe-buffer": "^5.1.0" } }, - "node_modules/rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, - "dependencies": { - "resolve": "^1.9.0" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/regexpp": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -2123,54 +1683,18 @@ "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/resolve-from": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/reusify": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, + "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -2178,9 +1702,8 @@ }, "node_modules/rimraf": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -2193,8 +1716,6 @@ }, "node_modules/run-parallel": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -2210,14 +1731,13 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } }, "node_modules/safe-buffer": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ { @@ -2232,13 +1752,15 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT", + "peer": true }, "node_modules/schema-utils": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -2254,9 +1776,8 @@ }, "node_modules/semver": { "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, + "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -2269,30 +1790,17 @@ }, "node_modules/serialize-javascript": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, + "license": "BSD-3-Clause", + "peer": true, "dependencies": { "randombytes": "^2.1.0" } }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -2302,40 +1810,30 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/signal-exit": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", - "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", - "dev": true - }, "node_modules/slash": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/source-map-support": { "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -2343,9 +1841,8 @@ }, "node_modules/strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -2353,20 +1850,10 @@ "node": ">=8" } }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/strip-json-comments": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -2376,9 +1863,8 @@ }, "node_modules/supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2388,18 +1874,17 @@ }, "node_modules/tapable": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/terser": { "version": "5.9.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.9.0.tgz", - "integrity": "sha512-h5hxa23sCdpzcye/7b8YqbE5OwKca/ni0RQz1uRX3tGh8haaGHqcuSqbGRybuAKNdntZ0mDgFNXPJ48xQ2RXKQ==", "dev": true, + "license": "BSD-2-Clause", + "peer": true, "dependencies": { "commander": "^2.20.0", "source-map": "~0.7.2", @@ -2414,9 +1899,9 @@ }, "node_modules/terser-webpack-plugin": { "version": "5.2.5", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.2.5.tgz", - "integrity": "sha512-3luOVHku5l0QBeYS8r4CdHYWEGMmIj3H1U64jgkdZzECcSOJAyJ9TjuqcQZvw1Y+4AOBN9SeYJPJmFn2cM4/2g==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "jest-worker": "^27.0.6", "schema-utils": "^3.1.1", @@ -2448,24 +1933,22 @@ }, "node_modules/terser/node_modules/source-map": { "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", "dev": true, + "license": "BSD-3-Clause", + "peer": true, "engines": { "node": ">= 8" } }, "node_modules/text-table": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/to-regex-range": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -2475,9 +1958,8 @@ }, "node_modules/ts-loader": { "version": "9.2.6", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.2.6.tgz", - "integrity": "sha512-QMTC4UFzHmu9wU2VHZEmWWE9cUajjfcdcws+Gh7FhiO+Dy0RnR1bNz0YCHqhI0yRowCE9arVnNxYHqELOy9Hjw==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.1.0", "enhanced-resolve": "^5.0.0", @@ -2494,8 +1976,7 @@ }, "node_modules/ts-node": { "version": "10.4.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.4.0.tgz", - "integrity": "sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==", + "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "0.7.0", "@tsconfig/node10": "^1.0.7", @@ -2534,23 +2015,20 @@ }, "node_modules/ts-node/node_modules/diff": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "node_modules/tslib": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/tsutils": { "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, + "license": "MIT", "dependencies": { "tslib": "^1.8.1" }, @@ -2563,9 +2041,8 @@ }, "node_modules/type-check": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -2575,9 +2052,8 @@ }, "node_modules/type-fest": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -2587,8 +2063,7 @@ }, "node_modules/typescript": { "version": "4.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", - "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==", + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -2599,24 +2074,22 @@ }, "node_modules/uri-js": { "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/v8-compile-cache": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/watchpack": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", - "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -2627,9 +2100,9 @@ }, "node_modules/webpack": { "version": "5.62.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.62.1.tgz", - "integrity": "sha512-jNLtnWChS2CMZ7vqWtztv0G6fYB5hz11Zsadp5tE7e4/66zVDj7/KUeQZOsOl8Hz5KrLJH1h2eIDl6AnlyE12Q==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.0", "@types/estree": "^0.0.50", @@ -2649,108 +2122,42 @@ "json-parse-better-errors": "^1.0.2", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.2.0", - "webpack-sources": "^3.2.0" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-cli": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.9.1.tgz", - "integrity": "sha512-JYRFVuyFpzDxMDB+v/nanUdQYcZtqFPGzmlW4s+UkPMFhSpfRNmf1z4AwYcHJVdvEFAM7FFCQdNTpsBYhDLusQ==", - "dev": true, - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.1.0", - "@webpack-cli/info": "^1.4.0", - "@webpack-cli/serve": "^1.6.0", - "colorette": "^2.0.14", - "commander": "^7.0.0", - "execa": "^5.0.0", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "webpack-merge": "^5.7.3" + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.2.0", + "webpack-sources": "^3.2.0" }, "bin": { - "webpack-cli": "bin/cli.js" + "webpack": "bin/webpack.js" }, "engines": { "node": ">=10.13.0" }, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" }, "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "@webpack-cli/migrate": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { + "webpack-cli": { "optional": true } } }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-merge": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", - "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", - "dev": true, - "dependencies": { - "clone-deep": "^4.0.1", - "wildcard": "^2.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/webpack-sources": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.1.tgz", - "integrity": "sha512-t6BMVLQ0AkjBOoRTZgqrWm7xbXMBzD+XDq2EZ96+vMfn3qKgsvdXZhbPZ4ElUOpdv4u+iiGe+w3+J75iy/bYGA==", "dev": true, + "license": "MIT", + "peer": true, "engines": { "node": ">=10.13.0" } }, "node_modules/which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -2761,37 +2168,27 @@ "node": ">= 8" } }, - "node_modules/wildcard": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", - "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", - "dev": true - }, "node_modules/word-wrap": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/yallist": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/yn": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "license": "MIT", "engines": { "node": ">=6" } @@ -2799,28 +2196,16 @@ }, "dependencies": { "@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==" + "version": "0.8.0" }, "@cspotcode/source-map-support": { "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", "requires": { "@cspotcode/source-map-consumer": "0.8.0" } }, - "@discoveryjs/json-ext": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.5.tgz", - "integrity": "sha512-6nFkfkmSeV/rqSaS4oWHgmpnYw194f6hmWF5is6b0J1naJZoiD0NTc9AiUwPHvWsowkjuHErCZT1wa0jg+BLIA==", - "dev": true - }, "@eslint/eslintrc": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", - "integrity": "sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -2836,16 +2221,12 @@ "dependencies": { "ignore": { "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true } } }, "@humanwhocodes/config-array": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", - "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.0", @@ -2855,14 +2236,10 @@ }, "@humanwhocodes/object-schema": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, "@nodelib/fs.scandir": { "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "requires": { "@nodelib/fs.stat": "2.0.5", @@ -2871,14 +2248,10 @@ }, "@nodelib/fs.stat": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true }, "@nodelib/fs.walk": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "requires": { "@nodelib/fs.scandir": "2.1.5", @@ -2886,30 +2259,21 @@ } }, "@tsconfig/node10": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==" + "version": "1.0.8" }, "@tsconfig/node12": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==" + "version": "1.0.9" }, "@tsconfig/node14": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==" + "version": "1.0.1" }, "@tsconfig/node16": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==" + "version": "1.0.2" }, "@types/eslint": { "version": "7.28.2", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.2.tgz", - "integrity": "sha512-KubbADPkfoU75KgKeKLsFHXnU4ipH7wYg0TRT33NK3N3yiu7jlFAAoygIWBV+KbuHx/G+AvuGX6DllnK35gfJA==", "dev": true, + "peer": true, "requires": { "@types/estree": "*", "@types/json-schema": "*" @@ -2917,9 +2281,8 @@ }, "@types/eslint-scope": { "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", "dev": true, + "peer": true, "requires": { "@types/eslint": "*", "@types/estree": "*" @@ -2927,25 +2290,18 @@ }, "@types/estree": { "version": "0.0.50", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", - "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", - "dev": true + "dev": true, + "peer": true }, "@types/json-schema": { "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", "dev": true }, "@types/node": { - "version": "16.11.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.7.tgz", - "integrity": "sha512-QB5D2sqfSjCmTuWcBWyJ+/44bcjO7VbjSbOE0ucoVbAsSNQc4Lt6QkgkVXkTDwkL4z/beecZNDvVX15D4P8Jbw==" + "version": "16.11.7" }, "@typescript-eslint/eslint-plugin": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.3.1.tgz", - "integrity": "sha512-cFImaoIr5Ojj358xI/SDhjog57OK2NqlpxwdcgyxDA3bJlZcJq5CPzUXtpD7CxI2Hm6ATU7w5fQnnkVnmwpHqw==", "dev": true, "requires": { "@typescript-eslint/experimental-utils": "5.3.1", @@ -2960,8 +2316,6 @@ }, "@typescript-eslint/experimental-utils": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.3.1.tgz", - "integrity": "sha512-RgFn5asjZ5daUhbK5Sp0peq0SSMytqcrkNfU4pnDma2D8P3ElZ6JbYjY8IMSFfZAJ0f3x3tnO3vXHweYg0g59w==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", @@ -2974,8 +2328,6 @@ }, "@typescript-eslint/parser": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.3.1.tgz", - "integrity": "sha512-TD+ONlx5c+Qhk21x9gsJAMRohWAUMavSOmJgv3JGy9dgPhuBd5Wok0lmMClZDyJNLLZK1JRKiATzCKZNUmoyfw==", "dev": true, "requires": { "@typescript-eslint/scope-manager": "5.3.1", @@ -2986,8 +2338,6 @@ }, "@typescript-eslint/scope-manager": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.3.1.tgz", - "integrity": "sha512-XksFVBgAq0Y9H40BDbuPOTUIp7dn4u8oOuhcgGq7EoDP50eqcafkMVGrypyVGvDYHzjhdUCUwuwVUK4JhkMAMg==", "dev": true, "requires": { "@typescript-eslint/types": "5.3.1", @@ -2996,14 +2346,10 @@ }, "@typescript-eslint/types": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.3.1.tgz", - "integrity": "sha512-bG7HeBLolxKHtdHG54Uac750eXuQQPpdJfCYuw4ZI3bZ7+GgKClMWM8jExBtp7NSP4m8PmLRM8+lhzkYnSmSxQ==", "dev": true }, "@typescript-eslint/typescript-estree": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.3.1.tgz", - "integrity": "sha512-PwFbh/PKDVo/Wct6N3w+E4rLZxUDgsoII/GrWM2A62ETOzJd4M6s0Mu7w4CWsZraTbaC5UQI+dLeyOIFF1PquQ==", "dev": true, "requires": { "@typescript-eslint/types": "5.3.1", @@ -3017,8 +2363,6 @@ }, "@typescript-eslint/visitor-keys": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.3.1.tgz", - "integrity": "sha512-3cHUzUuVTuNHx0Gjjt5pEHa87+lzyqOiHXy/Gz+SJOCW1mpw9xQHIIEwnKn+Thph1mgWyZ90nboOcSuZr/jTTQ==", "dev": true, "requires": { "@typescript-eslint/types": "5.3.1", @@ -3027,9 +2371,8 @@ }, "@webassemblyjs/ast": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", "dev": true, + "peer": true, "requires": { "@webassemblyjs/helper-numbers": "1.11.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.1" @@ -3037,27 +2380,23 @@ }, "@webassemblyjs/floating-point-hex-parser": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", - "dev": true + "dev": true, + "peer": true }, "@webassemblyjs/helper-api-error": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", - "dev": true + "dev": true, + "peer": true }, "@webassemblyjs/helper-buffer": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", - "dev": true + "dev": true, + "peer": true }, "@webassemblyjs/helper-numbers": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", "dev": true, + "peer": true, "requires": { "@webassemblyjs/floating-point-hex-parser": "1.11.1", "@webassemblyjs/helper-api-error": "1.11.1", @@ -3066,15 +2405,13 @@ }, "@webassemblyjs/helper-wasm-bytecode": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", - "dev": true + "dev": true, + "peer": true }, "@webassemblyjs/helper-wasm-section": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", "dev": true, + "peer": true, "requires": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-buffer": "1.11.1", @@ -3084,33 +2421,29 @@ }, "@webassemblyjs/ieee754": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", "dev": true, + "peer": true, "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", "dev": true, + "peer": true, "requires": { "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", - "dev": true + "dev": true, + "peer": true }, "@webassemblyjs/wasm-edit": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", "dev": true, + "peer": true, "requires": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-buffer": "1.11.1", @@ -3124,9 +2457,8 @@ }, "@webassemblyjs/wasm-gen": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", "dev": true, + "peer": true, "requires": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.1", @@ -3137,9 +2469,8 @@ }, "@webassemblyjs/wasm-opt": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", "dev": true, + "peer": true, "requires": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-buffer": "1.11.1", @@ -3149,9 +2480,8 @@ }, "@webassemblyjs/wasm-parser": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", "dev": true, + "peer": true, "requires": { "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/helper-api-error": "1.11.1", @@ -3163,77 +2493,42 @@ }, "@webassemblyjs/wast-printer": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", "dev": true, + "peer": true, "requires": { "@webassemblyjs/ast": "1.11.1", "@xtuc/long": "4.2.2" } }, - "@webpack-cli/configtest": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.1.0.tgz", - "integrity": "sha512-ttOkEkoalEHa7RaFYpM0ErK1xc4twg3Am9hfHhL7MVqlHebnkYd2wuI/ZqTDj0cVzZho6PdinY0phFZV3O0Mzg==", - "dev": true, - "requires": {} - }, - "@webpack-cli/info": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.4.0.tgz", - "integrity": "sha512-F6b+Man0rwE4n0409FyAJHStYA5OIZERxmnUfLVwv0mc0V1wLad3V7jqRlMkgKBeAq07jUvglacNaa6g9lOpuw==", - "dev": true, - "requires": { - "envinfo": "^7.7.3" - } - }, - "@webpack-cli/serve": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.6.0.tgz", - "integrity": "sha512-ZkVeqEmRpBV2GHvjjUZqEai2PpUbuq8Bqd//vEYsp63J8WyexI8ppCqVS3Zs0QADf6aWuPdU+0XsPI647PVlQA==", - "dev": true, - "requires": {} - }, "@xtuc/ieee754": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true + "dev": true, + "peer": true }, "@xtuc/long": { "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true + "dev": true, + "peer": true }, "acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==" + "version": "8.5.0" }, "acorn-import-assertions": { "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", "dev": true, + "peer": true, "requires": {} }, "acorn-jsx": { "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "requires": {} }, "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==" + "version": "8.2.0" }, "ajv": { "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -3244,64 +2539,47 @@ }, "ajv-keywords": { "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true, + "peer": true, "requires": {} }, "ansi-colors": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "ansi-regex": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" } }, "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + "version": "4.1.3" }, "argparse": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, "array-union": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, "balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "binaryen": { - "version": "102.0.0-nightly.20211028", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-102.0.0-nightly.20211028.tgz", - "integrity": "sha512-GCJBVB5exbxzzvyt8MGDv/MeUjs6gkXDvf4xOIItRBptYl0Tz5sm1o/uG95YK0L0VeG5ajDu3hRtkBP2kzqC5w==" + "version": "102.0.0-nightly.20211118", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-102.0.0-nightly.20211118.tgz", + "integrity": "sha512-bueSEfwXWdBavp5Q0xqpeKHlKgmh+7n0pwlFditPGCbIHvH87vFuHiqdsqGedTrmV1Ar3f7zBBIQeg8P0/slOA==" }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -3310,8 +2588,6 @@ }, "braces": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { "fill-range": "^7.0.1" @@ -3319,9 +2595,8 @@ }, "browserslist": { "version": "4.17.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.6.tgz", - "integrity": "sha512-uPgz3vyRTlEiCv4ee9KlsKgo2V6qPk7Jsn0KAn2OBqbqKo3iNcPEC1Ti6J4dwnz+aIRfEEEuOzC9IBk8tXUomw==", "dev": true, + "peer": true, "requires": { "caniuse-lite": "^1.0.30001274", "electron-to-chromium": "^1.3.886", @@ -3331,26 +2606,19 @@ } }, "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + "version": "1.1.2" }, "callsites": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "caniuse-lite": { "version": "1.0.30001278", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001278.tgz", - "integrity": "sha512-mpF9KeH8u5cMoEmIic/cr7PNS+F5LWBk0t2ekGT60lFf0Wq+n9LspAj0g3P+o7DQhD3sUdlMln4YFAWhFYn9jg==", - "dev": true + "dev": true, + "peer": true }, "chalk": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -3359,25 +2627,11 @@ }, "chrome-trace-event": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true - }, - "clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", "dev": true, - "requires": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - } + "peer": true }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -3385,37 +2639,22 @@ }, "color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "colorette": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz", - "integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==", "dev": true }, "commander": { "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "dev": true, + "peer": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + "version": "1.1.1" }, "cross-spawn": { "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -3425,8 +2664,6 @@ }, "debug": { "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { "ms": "2.1.2" @@ -3434,20 +2671,14 @@ }, "deep-is": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "diff": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, "dir-glob": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "requires": { "path-type": "^4.0.0" @@ -3455,8 +2686,6 @@ }, "doctrine": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "requires": { "esutils": "^2.0.2" @@ -3464,14 +2693,11 @@ }, "electron-to-chromium": { "version": "1.3.891", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.891.tgz", - "integrity": "sha512-3cpwR82QkIS01CN/dup/4Yr3BiOiRLlZlcAFn/5FbNCunMO9ojqDgEP9JEo1QNLflu3pEnPWve50gHOEKc7r6w==", - "dev": true + "dev": true, + "peer": true }, "enhanced-resolve": { "version": "5.8.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz", - "integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==", "dev": true, "requires": { "graceful-fs": "^4.2.4", @@ -3480,41 +2706,55 @@ }, "enquirer": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, "requires": { "ansi-colors": "^4.1.1" } }, - "envinfo": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", - "dev": true - }, "es-module-lexer": { "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", - "dev": true + "dev": true, + "peer": true + }, + "esbuild": { + "version": "0.13.14", + "dev": true, + "requires": { + "esbuild-android-arm64": "0.13.14", + "esbuild-darwin-64": "0.13.14", + "esbuild-darwin-arm64": "0.13.14", + "esbuild-freebsd-64": "0.13.14", + "esbuild-freebsd-arm64": "0.13.14", + "esbuild-linux-32": "0.13.14", + "esbuild-linux-64": "0.13.14", + "esbuild-linux-arm": "0.13.14", + "esbuild-linux-arm64": "0.13.14", + "esbuild-linux-mips64le": "0.13.14", + "esbuild-linux-ppc64le": "0.13.14", + "esbuild-netbsd-64": "0.13.14", + "esbuild-openbsd-64": "0.13.14", + "esbuild-sunos-64": "0.13.14", + "esbuild-windows-32": "0.13.14", + "esbuild-windows-64": "0.13.14", + "esbuild-windows-arm64": "0.13.14" + } + }, + "esbuild-windows-64": { + "version": "0.13.14", + "dev": true, + "optional": true }, "escalade": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true + "dev": true, + "peer": true }, "escape-string-regexp": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, "eslint": { "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.2.0.tgz", - "integrity": "sha512-erw7XmM+CLxTOickrimJ1SiF55jiNlVSp2qqm0NuBWPtHYQCegD5ZMaW0c3i5ytPqL+SSLaCxdvQXFPLJn+ABw==", "dev": true, "requires": { "@eslint/eslintrc": "^1.0.4", @@ -3559,8 +2799,6 @@ "dependencies": { "eslint-scope": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-6.0.0.tgz", - "integrity": "sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -3569,22 +2807,16 @@ }, "estraverse": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, "ignore": { "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true } } }, "eslint-scope": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -3593,8 +2825,6 @@ }, "eslint-utils": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "requires": { "eslint-visitor-keys": "^2.0.0" @@ -3602,22 +2832,16 @@ "dependencies": { "eslint-visitor-keys": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true } } }, "eslint-visitor-keys": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", "dev": true }, "espree": { "version": "9.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.0.0.tgz", - "integrity": "sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==", "dev": true, "requires": { "acorn": "^8.5.0", @@ -3627,8 +2851,6 @@ }, "esquery": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -3636,16 +2858,12 @@ "dependencies": { "estraverse": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } }, "esrecurse": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { "estraverse": "^5.2.0" @@ -3653,57 +2871,29 @@ "dependencies": { "estraverse": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } }, "estraverse": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, "esutils": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, "events": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } + "peer": true }, "fast-deep-equal": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "fast-glob": { "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -3715,8 +2905,6 @@ "dependencies": { "glob-parent": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -3726,26 +2914,14 @@ }, "fast-json-stable-stringify": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, "fast-levenshtein": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fastest-levenshtein": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", - "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", "dev": true }, "fastq": { "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -3753,8 +2929,6 @@ }, "file-entry-cache": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { "flat-cache": "^3.0.4" @@ -3762,27 +2936,13 @@ }, "fill-range": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { "to-regex-range": "^5.0.1" } }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "flat-cache": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { "flatted": "^3.1.0", @@ -3791,38 +2951,18 @@ }, "flatted": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", - "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", "dev": true }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "functional-red-black-tree": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true }, "glob": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -3835,8 +2975,6 @@ }, "glob-parent": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { "is-glob": "^4.0.3" @@ -3844,14 +2982,11 @@ }, "glob-to-regexp": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true + "dev": true, + "peer": true }, "globals": { "version": "13.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", - "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -3859,8 +2994,6 @@ }, "globby": { "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", "dev": true, "requires": { "array-union": "^2.1.0", @@ -3873,67 +3006,30 @@ }, "graceful-fs": { "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "dev": true }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true }, "ignore": { "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", "dev": true }, "import-fresh": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, - "import-local": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.3.tgz", - "integrity": "sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA==", - "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, "imurmurhash": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { "once": "^1.3.0", @@ -3942,35 +3038,14 @@ }, "inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "interpret": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", - "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", "dev": true }, - "is-core-module": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", - "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, "is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, "is-glob": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -3978,42 +3053,16 @@ }, "is-number": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "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" - } - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true }, "isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, "jest-worker": { "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.3.1.tgz", - "integrity": "sha512-ks3WCzsiZaOPJl/oMsDjaf0TRiSv7ctNgs0FqRr2nARsovz6AWWy4oLElwcquGSz692DzgZQrCLScPNs5YlC4g==", "dev": true, + "peer": true, "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -4022,9 +3071,8 @@ "dependencies": { "supports-color": { "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "peer": true, "requires": { "has-flag": "^4.0.0" } @@ -4033,8 +3081,6 @@ }, "js-yaml": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { "argparse": "^2.0.1" @@ -4042,32 +3088,19 @@ }, "json-parse-better-errors": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true + "dev": true, + "peer": true }, "json-schema-traverse": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "levn": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { "prelude-ls": "^1.2.1", @@ -4076,60 +3109,37 @@ }, "loader-runner": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", - "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "requires": { - "p-locate": "^4.1.0" - } + "peer": true }, "lodash.merge": { "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "long": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/long/-/long-5.1.0.tgz", - "integrity": "sha512-eNc10JP6ezXp/qxXZlKS4OHAKNae3je9LUkjmXPDEa+Iidlz0n4nFi/9LT+GOgcayMWhykLoISN+v0THeOiWQQ==" + "version": "5.1.0" }, "lru-cache": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "requires": { "yallist": "^4.0.0" } }, "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + "version": "1.3.6" }, "merge-stream": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "dev": true, + "peer": true }, "merge2": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true }, "micromatch": { "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, "requires": { "braces": "^3.0.1", @@ -4138,29 +3148,19 @@ }, "mime-db": { "version": "1.50.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", - "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==", - "dev": true + "dev": true, + "peer": true }, "mime-types": { "version": "2.1.33", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", - "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", "dev": true, + "peer": true, "requires": { "mime-db": "1.50.0" } }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -4168,65 +3168,35 @@ }, "mkdirp": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true }, "ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "natural-compare": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, "neo-async": { "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true + "dev": true, + "peer": true }, "node-releases": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", - "integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "requires": { - "path-key": "^3.0.0" - } + "peer": true }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" } }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, "optionator": { "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { "deep-is": "^0.1.3", @@ -4237,187 +3207,76 @@ "word-wrap": "^1.2.3" } }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, "parent-module": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "requires": { "callsites": "^3.0.0" } }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "path-key": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, "path-type": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, "physical-cpu-count": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/physical-cpu-count/-/physical-cpu-count-2.0.0.tgz", - "integrity": "sha1-GN4vl+S/epVRrXURlCtUlverpmA=", "dev": true }, "picocolors": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "dev": true, + "peer": true }, "picomatch": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, "prelude-ls": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "progress": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, "punycode": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, "queue-microtask": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, "randombytes": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "peer": true, "requires": { "safe-buffer": "^5.1.0" } }, - "rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, - "requires": { - "resolve": "^1.9.0" - } - }, "regexpp": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "requires": { - "resolve-from": "^5.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } - }, "resolve-from": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "reusify": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, "rimraf": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -4425,8 +3284,6 @@ }, "run-parallel": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "requires": { "queue-microtask": "^1.2.2" @@ -4434,15 +3291,13 @@ }, "safe-buffer": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true + "dev": true, + "peer": true }, "schema-utils": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", "dev": true, + "peer": true, "requires": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -4451,8 +3306,6 @@ }, "semver": { "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -4460,26 +3313,14 @@ }, "serialize-javascript": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, + "peer": true, "requires": { "randombytes": "^2.1.0" } }, - "shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, "shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { "shebang-regex": "^3.0.0" @@ -4487,31 +3328,17 @@ }, "shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "signal-exit": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", - "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", "dev": true }, "slash": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "version": "0.6.1" }, "source-map-support": { "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -4519,29 +3346,17 @@ }, "strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { "ansi-regex": "^5.0.1" } }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true - }, "strip-json-comments": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -4549,15 +3364,12 @@ }, "tapable": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true }, "terser": { "version": "5.9.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.9.0.tgz", - "integrity": "sha512-h5hxa23sCdpzcye/7b8YqbE5OwKca/ni0RQz1uRX3tGh8haaGHqcuSqbGRybuAKNdntZ0mDgFNXPJ48xQ2RXKQ==", "dev": true, + "peer": true, "requires": { "commander": "^2.20.0", "source-map": "~0.7.2", @@ -4566,17 +3378,15 @@ "dependencies": { "source-map": { "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true + "dev": true, + "peer": true } } }, "terser-webpack-plugin": { "version": "5.2.5", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.2.5.tgz", - "integrity": "sha512-3luOVHku5l0QBeYS8r4CdHYWEGMmIj3H1U64jgkdZzECcSOJAyJ9TjuqcQZvw1Y+4AOBN9SeYJPJmFn2cM4/2g==", "dev": true, + "peer": true, "requires": { "jest-worker": "^27.0.6", "schema-utils": "^3.1.1", @@ -4587,14 +3397,10 @@ }, "text-table": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, "to-regex-range": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { "is-number": "^7.0.0" @@ -4602,8 +3408,6 @@ }, "ts-loader": { "version": "9.2.6", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.2.6.tgz", - "integrity": "sha512-QMTC4UFzHmu9wU2VHZEmWWE9cUajjfcdcws+Gh7FhiO+Dy0RnR1bNz0YCHqhI0yRowCE9arVnNxYHqELOy9Hjw==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -4614,8 +3418,6 @@ }, "ts-node": { "version": "10.4.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.4.0.tgz", - "integrity": "sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==", "requires": { "@cspotcode/source-map-support": "0.7.0", "@tsconfig/node10": "^1.0.7", @@ -4632,22 +3434,16 @@ }, "dependencies": { "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + "version": "4.0.2" } } }, "tslib": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, "tsutils": { "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, "requires": { "tslib": "^1.8.1" @@ -4655,8 +3451,6 @@ }, "type-check": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { "prelude-ls": "^1.2.1" @@ -4664,19 +3458,13 @@ }, "type-fest": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, "typescript": { - "version": "4.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", - "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==" + "version": "4.4.4" }, "uri-js": { "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { "punycode": "^2.1.0" @@ -4684,15 +3472,12 @@ }, "v8-compile-cache": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, "watchpack": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", - "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", "dev": true, + "peer": true, "requires": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -4700,9 +3485,8 @@ }, "webpack": { "version": "5.62.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.62.1.tgz", - "integrity": "sha512-jNLtnWChS2CMZ7vqWtztv0G6fYB5hz11Zsadp5tE7e4/66zVDj7/KUeQZOsOl8Hz5KrLJH1h2eIDl6AnlyE12Q==", "dev": true, + "peer": true, "requires": { "@types/eslint-scope": "^3.7.0", "@types/estree": "^0.0.50", @@ -4730,87 +3514,32 @@ "webpack-sources": "^3.2.0" } }, - "webpack-cli": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.9.1.tgz", - "integrity": "sha512-JYRFVuyFpzDxMDB+v/nanUdQYcZtqFPGzmlW4s+UkPMFhSpfRNmf1z4AwYcHJVdvEFAM7FFCQdNTpsBYhDLusQ==", - "dev": true, - "requires": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.1.0", - "@webpack-cli/info": "^1.4.0", - "@webpack-cli/serve": "^1.6.0", - "colorette": "^2.0.14", - "commander": "^7.0.0", - "execa": "^5.0.0", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "webpack-merge": "^5.7.3" - }, - "dependencies": { - "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true - } - } - }, - "webpack-merge": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", - "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", - "dev": true, - "requires": { - "clone-deep": "^4.0.1", - "wildcard": "^2.0.0" - } - }, "webpack-sources": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.1.tgz", - "integrity": "sha512-t6BMVLQ0AkjBOoRTZgqrWm7xbXMBzD+XDq2EZ96+vMfn3qKgsvdXZhbPZ4ElUOpdv4u+iiGe+w3+J75iy/bYGA==", - "dev": true + "dev": true, + "peer": true }, "which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" } }, - "wildcard": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", - "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", - "dev": true - }, "word-wrap": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "yallist": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" + "version": "3.1.1" } } } diff --git a/package.json b/package.json index 0453808fb6..14591a024f 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "102.0.0-nightly.20211028", + "binaryen": "102.0.0-nightly.20211118", "long": "^5.1.0", "source-map-support": "^0.5.20", "ts-node": "^10.4.0" @@ -31,17 +31,16 @@ "@typescript-eslint/eslint-plugin": "^5.3.1", "@typescript-eslint/parser": "^5.3.1", "diff": "^5.0.0", + "esbuild": "^0.13.14", "eslint": "^8.2.0", "glob": "^7.2.0", "mkdirp": "^1.0.4", "physical-cpu-count": "^2.0.0", "ts-loader": "^9.2.6", "ts-node": "^10.4.0", - "typescript": "~4.4.4", - "webpack": "^5.61.0", - "webpack-cli": "^4.9.1" + "typescript": "~4.4.4" }, - "type": "commonjs", + "type": "module", "main": "index.js", "types": "index.d.ts", "exports": { @@ -63,18 +62,19 @@ "./dist/asc": "./dist/asc.js" }, "bin": { - "asc": "bin/asc", - "asinit": "bin/asinit" + "asc": "bin/asc.js", + "asinit": "bin/asinit.js" }, "scripts": { - "build": "npm run build:bundle && npm run build:dts && npm run build:sdk", - "build:bundle": "webpack --config webpack.config.js", - "build:dts": "node scripts/build-dts && tsc --noEmit --target ESNEXT --module commonjs --experimentalDecorators tests/require/index-release", + "build": "npm run build:lib && npm run build:dts && npm run build:sdk", + "build:lib": "node scripts/build", + "build:dts": "node scripts/build-dts", "build:sdk": "node scripts/build-sdk", + "watch": "node scripts/build --watch", "clean": "node scripts/clean", - "check": "npm run check:config && npm run check:require && npm run check:lint", + "check": "npm run check:config && npm run check:import && npm run check:lint", "check:config": "tsc --noEmit -p src --diagnostics --listFiles", - "check:require": "tsc --noEmit --target ESNEXT --module commonjs --experimentalDecorators tests/require/index", + "check:import": "tsc --noEmit --target ESNEXT --module es6 --experimentalDecorators tests/import/index", "check:lint": "eslint --max-warnings 0 --ext js . && eslint --max-warnings 0 --ext ts .", "test": "npm run test:parser && npm run test:compiler && npm run test:packages && npm run test:extension && npm run test:asconfig", "test:parser": "node tests/parser", diff --git a/scripts/build-diagnostics.js b/scripts/build-diagnostics.js index 3253bb13d2..e2f1efb368 100644 --- a/scripts/build-diagnostics.js +++ b/scripts/build-diagnostics.js @@ -1,6 +1,14 @@ -var fs = require("fs"); +import fs from "fs"; +import path from 'path'; +import { fileURLToPath } from 'url'; -var messages = require(__dirname + "/../src/diagnosticMessages.json"); +const __dirname = path.dirname(fileURLToPath(import.meta.url)); + +var messages = JSON.parse( + fs.readFileSync( + path.join(__dirname, "..", "src", "diagnosticMessages.json") + ) +); var header = `/** * @fileoverview Generated from diagnosticsMessages.json. Do not edit. @@ -39,4 +47,8 @@ Object.keys(messages).forEach(text => { sb.push(" default: return \"\";\n }\n}\n"); -fs.writeFileSync(__dirname + "/../src/diagnosticMessages.generated.ts", sb.join(""), { encoding: "utf8" }); +fs.writeFileSync( + path.join(__dirname, "..", "src", "diagnosticMessages.generated.ts"), + sb.join(""), + { encoding: "utf8" } +); diff --git a/scripts/build-dts.js b/scripts/build-dts.js index f0d893a1c1..5d51abf373 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -1,13 +1,18 @@ +import fs from "fs"; +import glob from "glob"; +import mkdirp from "mkdirp"; +import os from "os"; +import pathUtil from "path"; +import ts from "typescript"; +import stream from "stream"; +import util from "util"; +import { fileURLToPath } from 'url'; + +const __dirname = pathUtil.dirname(fileURLToPath(import.meta.url)); + // © 2015-2019 SitePen, Inc. New BSD License. // see: https://github.com/SitePen/dts-generator -(function() { - const fs = require("fs"); - const glob = require("glob"); - const mkdirp = require("mkdirp"); - const os = require("os"); - const pathUtil = require("path"); - const ts = require("typescript"); - +const generate = (function() { // declare some constants so we don't have magic integers without explanation const DTSLEN = '.d.ts'.length; const filenameToMid = (function () { @@ -402,14 +407,9 @@ } } } - exports.default = generate; + return generate; })(); -const path = require("path"); -const fs = require("fs"); -const stream = require("stream"); -const util = require("util"); - function OutputStream(options) { stream.Writable.call(this, options); this.chunks = []; @@ -432,8 +432,8 @@ stdout.write(`declare module 'assemblyscript' { } `); -module.exports.default({ - project: path.resolve(__dirname, "..", "src"), +generate({ + project: pathUtil.resolve(__dirname, "..", "src"), prefix: "assemblyscript", exclude: [ "glue/**", @@ -445,8 +445,8 @@ module.exports.default({ stdout.write("\n"); -module.exports.default({ - project: path.resolve(__dirname, "..", "std/assembly/shared"), +generate({ + project: pathUtil.resolve(__dirname, "..", "std/assembly/shared"), prefix: "assemblyscript/std/assembly/shared", exclude: [], verbose: true, @@ -456,8 +456,8 @@ module.exports.default({ stdout.write("\n"); -module.exports.default({ - project: path.resolve(__dirname, "..", "src/glue"), +generate({ + project: pathUtil.resolve(__dirname, "..", "src/glue"), prefix: "assemblyscript/src/glue", exclude: [ "js/index.ts", @@ -470,7 +470,6 @@ module.exports.default({ var source = stdout.toString().replace(/\/\/\/ ]*>\r?\n/g, ""); -const ts = require("typescript"); const sourceFile = ts.createSourceFile("assemblyscript.d.ts", source, ts.ScriptTarget.ESNext, false, ts.ScriptKind.TS); console.log("transforming:"); @@ -497,11 +496,11 @@ const result = ts.transform(sourceFile, [ ]); console.log(" replaced " + numReplaced + " AS types with JS types"); -if (!fs.existsSync(path.join(__dirname, "..", "dist"))) { - fs.mkdirSync(path.join(__dirname, "..", "dist")); +if (!fs.existsSync(pathUtil.join(__dirname, "..", "dist"))) { + fs.mkdirSync(pathUtil.join(__dirname, "..", "dist")); } fs.writeFileSync( - path.resolve(__dirname, "..", "dist", "assemblyscript.d.ts"), + pathUtil.resolve(__dirname, "..", "dist", "assemblyscript.d.ts"), ts.createPrinter().printFile(result.transformed[0]), "utf8" ); diff --git a/scripts/build-sdk.js b/scripts/build-sdk.js index 6ab50e1099..a42a33a2ae 100644 --- a/scripts/build-sdk.js +++ b/scripts/build-sdk.js @@ -1,3 +1,5 @@ +// TODO: what about the sdk? + const path = require("path"); const fs = require("fs"); const pkg = require("../package-lock.json"); diff --git a/scripts/build.js b/scripts/build.js index 9e6d573d49..43b4b42833 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -1,6 +1,159 @@ -const webpack = require("webpack"); -const config = require("../webpack.config.js"); +import fs from "fs"; +import path from "path"; +import { fileURLToPath } from "url"; +import esbuild from "esbuild"; +import glob from "glob"; +import { createRequire } from "module"; -webpack(config, err => { - if (err) throw err; +const require = createRequire(import.meta.url); +const dirname = path.dirname(fileURLToPath(import.meta.url)); +const watch = process.argv[2] === "--watch"; + +function prelude(name) { + return [ + "/**\n", + " * @license\n", + " * ", name, "\n", + " * Copyright ", new Date().getFullYear().toString(), " Daniel Wirtz / The AssemblyScript Authors\n", + " * SPDX-License-Identifier: Apache-2.0\n", + " */" + ].join(""); +} + +// Report what's going on + +let started = false; +let startTime = 0; + +const INFO = "\u001b[90m"; +const SUCCESS = "\u001b[92m"; +const ERROR = "\u001b[91m"; +const RESET = "\u001b[0m"; +const status = { [INFO]: "INFO", [SUCCESS]: "SUCCESS", [ERROR]: "ERROR" }; + +function log(KIND, ...args) { + console.log(`${new Date().toISOString()} - ${KIND}${status[KIND]}${RESET} -`, ...args); +} + +function onRebuild(error, result) { + const time = Date.now() - startTime; + if (error) log(ERROR, `${error.errors.length} errors, ${error.warnings.length} warnings (${time} ms)`); + else log(SUCCESS, `${result.errors.length} errors, ${result.warnings.length} warnings (${time} ms)`); +} + +class ReportPlugin { + constructor(name) { + this.name = name; + } + setup = (build) => { + build.onStart(() => { + log(INFO, `Starting new ${this.name} build ...`); + startTime = Date.now(); + }); + build.onEnd(result => { + if (started) return; + started = true; + onRebuild(Boolean(result.errors && result.errors.length), result); + }); + }; +} + +// Standard library integration + +function bundleFile(filename) { + return fs.readFileSync(filename, { encoding: "utf8" }).replace(/\r\n/g, "\n"); +} + +class StdlibPlugin { + name = "stdlib"; + setup(build) { + build.onResolve({ filter: /asc\.generated\.js$/ }, args => { + return { + path: path.join(args.resolveDir, args.path), + watchFiles: glob.sync(path.join(dirname, "..", "std", "assembly") + "/**/*.ts") + .concat([ + path.join(dirname, "..", "package.json"), + path.join(dirname, "..", "cli", "asc.json"), + path.join(dirname, "..", "std", "portable", "index.d.ts") + ]) + }; + }); + build.onLoad({ filter: /asc\.generated\.js$/ }, args => { + const out = [ + `// GENERATED FILE. DO NOT EDIT.\n` + ]; + const version = require("../package.json").version; + out.push( + `export const version = ${JSON.stringify(version)};\n` + ); + const options = require("../cli/asc.json"); + out.push( + `export const options = ${JSON.stringify(options, null, 2)};\n` + ); + const definitionFiles = { + assembly: bundleFile(path.join(dirname, "..", "std", "assembly", "index.d.ts")), + portable: bundleFile(path.join(dirname, "..", "std", "portable", "index.d.ts")) + }; + out.push( + `export const definitionFiles = ${JSON.stringify(definitionFiles, null, 2)};\n` + ); + const libraryDir = path.join(dirname, "..", "std", "assembly"); + const libraryFiles = {}; + for (const file of glob.sync("**/!(*.d).ts", { cwd: libraryDir })) { + libraryFiles[file.replace(/\.ts$/, "")] = bundleFile(path.join(libraryDir, file)); + } + out.push( + `export const libraryFiles = ${JSON.stringify(libraryFiles, null, 2)};\n` + ); + const generated = out.join(""); + fs.writeFileSync(path.join(dirname, "..", "cli", "asc.generated.js"), generated); + return { + contents: generated, + loader: "js" + }; + }); + } +} + +// Build compiler and CLI + +const externals = [ "assemblyscript", "binaryen", "long" ]; + +esbuild.build({ + tsconfig: "./src/tsconfig.json", + entryPoints: [ "./src/index-js.ts" ], + bundle: true, + target: "esnext", + outfile: "./dist/assemblyscript.js", + platform: "node", + format: "esm", + sourcemap: true, + external: externals, + treeShaking: true, + minify: true, + legalComments: "none", + banner: { + js: prelude("The AssemblyScript compiler") + }, + watch: watch && { onRebuild }, + plugins: [ new ReportPlugin("AS") ] +}); + +esbuild.build({ + entryPoints: [ "./cli/asc.js" ], + bundle: true, + target: "esnext", + outfile: "./dist/asc.js", + platform: "node", + format: "esm", + sourcemap: true, + external: externals, + treeShaking: true, + minify: true, + legalComments: "none", + banner: { + js: prelude("The AssemblyScript frontend") + }, + watch: watch && { onRebuild }, + plugins: [ new StdlibPlugin(), new ReportPlugin("ASC") ] }); diff --git a/scripts/clean.js b/scripts/clean.js index 956dea952e..11c4236071 100644 --- a/scripts/clean.js +++ b/scripts/clean.js @@ -1,5 +1,9 @@ -var fs = require("fs"); -var glob = require("glob"); +import fs from "fs"; +import path from "path"; +import glob from "glob"; +import { fileURLToPath } from 'url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); glob("*", { cwd: __dirname + "/../dist" }, (err, matches) => { if (err) diff --git a/src/glue/binaryen.d.ts b/src/glue/binaryen.d.ts index a0f520d8d6..45adb16939 100644 --- a/src/glue/binaryen.d.ts +++ b/src/glue/binaryen.d.ts @@ -643,11 +643,6 @@ export declare function _BinaryenSetAllowInliningFunctionsWithLoops(enabled: boo // Helpers -// Binaryen.js only (ASC_TARGET = 0) -export declare const HEAPU8: Uint8Array; -export declare const HEAPU32: Uint32Array; -export declare const HEAP32: Int32Array; - export declare function _malloc(size: usize): usize; export declare function _free(ptr: usize): void; export declare function __i32_store8(ptr: usize, value: number): void; diff --git a/src/glue/binaryen.js b/src/glue/binaryen.js index b652e1b54e..5ab237a6fa 100644 --- a/src/glue/binaryen.js +++ b/src/glue/binaryen.js @@ -3,11 +3,8 @@ * @license Apache-2.0 */ -const binaryen = global.binaryen || (global.binaryen = require("binaryen")); - -module.exports = binaryen; - -const { Module } = require("../module"); +import binaryen from "binaryen"; +import { Module } from "../module.ts"; Module.prototype.toText = function toText(watFormat = true) { if (watFormat) { @@ -24,3 +21,628 @@ Module.prototype.toText = function toText(watFormat = true) { Module.prototype.toAsmjs = function toAsmjs() { return binaryen.wrapModule(this.ref).emitAsmjs(); }; + +export const { + _BinaryenTypeCreate, + _BinaryenTypeArity, + _BinaryenTypeExpand, + + _BinaryenModuleCreate, + _BinaryenModuleDispose, + + _BinaryenSizeofLiteral, + _BinaryenLiteralInt32, + _BinaryenLiteralInt64, + _BinaryenLiteralFloat32, + _BinaryenLiteralFloat64, + _BinaryenLiteralVec128, + _BinaryenLiteralFloat32Bits, + _BinaryenLiteralFloat64Bits, + + _BinaryenExpressionGetId, + _BinaryenExpressionGetType, + _BinaryenExpressionSetType, + _BinaryenExpressionPrint, + _BinaryenExpressionCopy, + _BinaryenExpressionFinalize, + + _BinaryenBlock, + _BinaryenBlockGetName, + _BinaryenBlockSetName, + _BinaryenBlockGetNumChildren, + _BinaryenBlockGetChildAt, + _BinaryenBlockSetChildAt, + _BinaryenBlockAppendChild, + _BinaryenBlockInsertChildAt, + _BinaryenBlockRemoveChildAt, + + _BinaryenIf, + _BinaryenIfGetCondition, + _BinaryenIfSetCondition, + _BinaryenIfGetIfTrue, + _BinaryenIfSetIfTrue, + _BinaryenIfGetIfFalse, + _BinaryenIfSetIfFalse, + + _BinaryenLoop, + _BinaryenLoopGetName, + _BinaryenLoopSetName, + _BinaryenLoopGetBody, + _BinaryenLoopSetBody, + + _BinaryenBreak, + _BinaryenBreakGetName, + _BinaryenBreakSetName, + _BinaryenBreakGetCondition, + _BinaryenBreakSetCondition, + _BinaryenBreakGetValue, + _BinaryenBreakSetValue, + + _BinaryenSwitch, + _BinaryenSwitchGetNumNames, + _BinaryenSwitchGetNameAt, + _BinaryenSwitchSetNameAt, + _BinaryenSwitchAppendName, + _BinaryenSwitchInsertNameAt, + _BinaryenSwitchRemoveNameAt, + _BinaryenSwitchGetDefaultName, + _BinaryenSwitchSetDefaultName, + _BinaryenSwitchGetCondition, + _BinaryenSwitchSetCondition, + _BinaryenSwitchGetValue, + _BinaryenSwitchSetValue, + + _BinaryenCall, + _BinaryenCallGetTarget, + _BinaryenCallSetTarget, + _BinaryenCallGetNumOperands, + _BinaryenCallGetOperandAt, + _BinaryenCallSetOperandAt, + _BinaryenCallAppendOperand, + _BinaryenCallInsertOperandAt, + _BinaryenCallRemoveOperandAt, + _BinaryenCallIsReturn, + _BinaryenCallSetReturn, + _BinaryenReturnCall, + + _BinaryenCallIndirect, + _BinaryenCallIndirectGetTable, + _BinaryenCallIndirectSetTable, + _BinaryenCallIndirectGetTarget, + _BinaryenCallIndirectSetTarget, + _BinaryenCallIndirectGetNumOperands, + _BinaryenCallIndirectGetOperandAt, + _BinaryenCallIndirectSetOperandAt, + _BinaryenCallIndirectAppendOperand, + _BinaryenCallIndirectInsertOperandAt, + _BinaryenCallIndirectRemoveOperandAt, + _BinaryenCallIndirectIsReturn, + _BinaryenCallIndirectSetReturn, + _BinaryenReturnCallIndirect, + + _BinaryenLocalGet, + _BinaryenLocalGetGetIndex, + _BinaryenLocalGetSetIndex, + + _BinaryenLocalSet, + _BinaryenLocalSetIsTee, + _BinaryenLocalSetGetIndex, + _BinaryenLocalSetSetIndex, + _BinaryenLocalSetGetValue, + _BinaryenLocalSetSetValue, + _BinaryenLocalTee, + + _BinaryenGlobalGet, + _BinaryenGlobalGetGetName, + _BinaryenGlobalGetSetName, + + _BinaryenGlobalSet, + _BinaryenGlobalSetGetName, + _BinaryenGlobalSetSetName, + _BinaryenGlobalSetGetValue, + _BinaryenGlobalSetSetValue, + + _BinaryenMemorySize, + + _BinaryenMemoryGrow, + _BinaryenMemoryGrowGetDelta, + _BinaryenMemoryGrowSetDelta, + + _BinaryenLoad, + _BinaryenLoadIsAtomic, + _BinaryenLoadSetAtomic, + _BinaryenLoadIsSigned, + _BinaryenLoadSetSigned, + _BinaryenLoadGetOffset, + _BinaryenLoadSetOffset, + _BinaryenLoadGetBytes, + _BinaryenLoadSetBytes, + _BinaryenLoadGetAlign, + _BinaryenLoadSetAlign, + _BinaryenLoadGetPtr, + _BinaryenLoadSetPtr, + _BinaryenAtomicLoad, + + _BinaryenStore, + _BinaryenStoreIsAtomic, + _BinaryenStoreSetAtomic, + _BinaryenStoreGetBytes, + _BinaryenStoreSetBytes, + _BinaryenStoreGetOffset, + _BinaryenStoreSetOffset, + _BinaryenStoreGetAlign, + _BinaryenStoreSetAlign, + _BinaryenStoreGetPtr, + _BinaryenStoreSetPtr, + _BinaryenStoreGetValue, + _BinaryenStoreSetValue, + _BinaryenStoreGetValueType, + _BinaryenStoreSetValueType, + _BinaryenAtomicStore, + + _BinaryenConst, + _BinaryenConstGetValueI32, + _BinaryenConstSetValueI32, + _BinaryenConstGetValueI64Low, + _BinaryenConstSetValueI64Low, + _BinaryenConstGetValueI64High, + _BinaryenConstSetValueI64High, + _BinaryenConstGetValueF32, + _BinaryenConstSetValueF32, + _BinaryenConstGetValueF64, + _BinaryenConstSetValueF64, + _BinaryenConstGetValueV128, + _BinaryenConstSetValueV128, + + _BinaryenUnary, + _BinaryenUnaryGetOp, + _BinaryenUnarySetOp, + _BinaryenUnaryGetValue, + _BinaryenUnarySetValue, + + _BinaryenBinary, + _BinaryenBinaryGetOp, + _BinaryenBinarySetOp, + _BinaryenBinaryGetLeft, + _BinaryenBinarySetLeft, + _BinaryenBinaryGetRight, + _BinaryenBinarySetRight, + + _BinaryenSelect, + _BinaryenSelectGetIfTrue, + _BinaryenSelectSetIfTrue, + _BinaryenSelectGetIfFalse, + _BinaryenSelectSetIfFalse, + _BinaryenSelectGetCondition, + _BinaryenSelectSetCondition, + + _BinaryenDrop, + _BinaryenDropGetValue, + _BinaryenDropSetValue, + + _BinaryenReturn, + _BinaryenReturnGetValue, + _BinaryenReturnSetValue, + + _BinaryenNop, + + _BinaryenUnreachable, + + _BinaryenAtomicRMW, + _BinaryenAtomicRMWGetOp, + _BinaryenAtomicRMWSetOp, + _BinaryenAtomicRMWGetBytes, + _BinaryenAtomicRMWSetBytes, + _BinaryenAtomicRMWGetOffset, + _BinaryenAtomicRMWSetOffset, + _BinaryenAtomicRMWGetPtr, + _BinaryenAtomicRMWSetPtr, + _BinaryenAtomicRMWGetValue, + _BinaryenAtomicRMWSetValue, + + _BinaryenAtomicCmpxchg, + _BinaryenAtomicCmpxchgGetBytes, + _BinaryenAtomicCmpxchgSetBytes, + _BinaryenAtomicCmpxchgGetOffset, + _BinaryenAtomicCmpxchgSetOffset, + _BinaryenAtomicCmpxchgGetPtr, + _BinaryenAtomicCmpxchgSetPtr, + _BinaryenAtomicCmpxchgGetExpected, + _BinaryenAtomicCmpxchgSetExpected, + _BinaryenAtomicCmpxchgGetReplacement, + _BinaryenAtomicCmpxchgSetReplacement, + + _BinaryenAtomicWait, + _BinaryenAtomicWaitGetPtr, + _BinaryenAtomicWaitSetPtr, + _BinaryenAtomicWaitGetExpected, + _BinaryenAtomicWaitSetExpected, + _BinaryenAtomicWaitGetTimeout, + _BinaryenAtomicWaitSetTimeout, + _BinaryenAtomicWaitGetExpectedType, + _BinaryenAtomicWaitSetExpectedType, + + _BinaryenAtomicNotify, + _BinaryenAtomicNotifyGetPtr, + _BinaryenAtomicNotifySetPtr, + _BinaryenAtomicNotifyGetNotifyCount, + _BinaryenAtomicNotifySetNotifyCount, + + _BinaryenAtomicFence, + _BinaryenAtomicFenceGetOrder, + _BinaryenAtomicFenceSetOrder, + + _BinaryenSIMDExtract, + _BinaryenSIMDExtractGetOp, + _BinaryenSIMDExtractSetOp, + _BinaryenSIMDExtractGetVec, + _BinaryenSIMDExtractSetVec, + _BinaryenSIMDExtractGetIndex, + _BinaryenSIMDExtractSetIndex, + + _BinaryenSIMDReplace, + _BinaryenSIMDReplaceGetOp, + _BinaryenSIMDReplaceSetOp, + _BinaryenSIMDReplaceGetVec, + _BinaryenSIMDReplaceSetVec, + _BinaryenSIMDReplaceGetIndex, + _BinaryenSIMDReplaceSetIndex, + _BinaryenSIMDReplaceGetValue, + _BinaryenSIMDReplaceSetValue, + + _BinaryenSIMDShuffle, + _BinaryenSIMDShuffleGetLeft, + _BinaryenSIMDShuffleSetLeft, + _BinaryenSIMDShuffleGetRight, + _BinaryenSIMDShuffleSetRight, + _BinaryenSIMDShuffleGetMask, + _BinaryenSIMDShuffleSetMask, + + _BinaryenSIMDTernary, + _BinaryenSIMDTernaryGetOp, + _BinaryenSIMDTernarySetOp, + _BinaryenSIMDTernaryGetA, + _BinaryenSIMDTernarySetA, + _BinaryenSIMDTernaryGetB, + _BinaryenSIMDTernarySetB, + _BinaryenSIMDTernaryGetC, + _BinaryenSIMDTernarySetC, + + _BinaryenSIMDShift, + _BinaryenSIMDShiftGetOp, + _BinaryenSIMDShiftSetOp, + _BinaryenSIMDShiftGetVec, + _BinaryenSIMDShiftSetVec, + _BinaryenSIMDShiftGetShift, + _BinaryenSIMDShiftSetShift, + + _BinaryenSIMDLoad, + _BinaryenSIMDLoadGetOp, + _BinaryenSIMDLoadSetOp, + _BinaryenSIMDLoadGetOffset, + _BinaryenSIMDLoadSetOffset, + _BinaryenSIMDLoadGetAlign, + _BinaryenSIMDLoadSetAlign, + _BinaryenSIMDLoadGetPtr, + _BinaryenSIMDLoadSetPtr, + + _BinaryenSIMDLoadStoreLane, + _BinaryenSIMDLoadStoreLaneGetOp, + _BinaryenSIMDLoadStoreLaneSetOp, + _BinaryenSIMDLoadStoreLaneGetOffset, + _BinaryenSIMDLoadStoreLaneSetOffset, + _BinaryenSIMDLoadStoreLaneGetAlign, + _BinaryenSIMDLoadStoreLaneSetAlign, + _BinaryenSIMDLoadStoreLaneGetIndex, + _BinaryenSIMDLoadStoreLaneSetIndex, + _BinaryenSIMDLoadStoreLaneGetPtr, + _BinaryenSIMDLoadStoreLaneSetPtr, + _BinaryenSIMDLoadStoreLaneGetVec, + _BinaryenSIMDLoadStoreLaneSetVec, + _BinaryenSIMDLoadStoreLaneIsStore, + + _BinaryenMemoryInit, + _BinaryenMemoryInitGetSegment, + _BinaryenMemoryInitSetSegment, + _BinaryenMemoryInitGetDest, + _BinaryenMemoryInitSetDest, + _BinaryenMemoryInitGetOffset, + _BinaryenMemoryInitSetOffset, + _BinaryenMemoryInitGetSize, + _BinaryenMemoryInitSetSize, + + _BinaryenDataDrop, + _BinaryenDataDropGetSegment, + _BinaryenDataDropSetSegment, + + _BinaryenMemoryCopy, + _BinaryenMemoryCopyGetDest, + _BinaryenMemoryCopySetDest, + _BinaryenMemoryCopyGetSource, + _BinaryenMemoryCopySetSource, + _BinaryenMemoryCopyGetSize, + _BinaryenMemoryCopySetSize, + + _BinaryenMemoryFill, + _BinaryenMemoryFillGetDest, + _BinaryenMemoryFillSetDest, + _BinaryenMemoryFillGetValue, + _BinaryenMemoryFillSetValue, + _BinaryenMemoryFillGetSize, + _BinaryenMemoryFillSetSize, + + _BinaryenRefNull, + + _BinaryenRefIs, + _BinaryenRefIsGetOp, + _BinaryenRefIsSetOp, + _BinaryenRefIsGetValue, + _BinaryenRefIsSetValue, + + _BinaryenRefAs, + _BinaryenRefAsGetOp, + _BinaryenRefAsSetOp, + _BinaryenRefAsGetValue, + _BinaryenRefAsSetValue, + + _BinaryenRefFunc, + _BinaryenRefFuncGetFunc, + _BinaryenRefFuncSetFunc, + + _BinaryenRefEq, + _BinaryenRefEqGetLeft, + _BinaryenRefEqSetLeft, + _BinaryenRefEqGetRight, + _BinaryenRefEqSetRight, + + _BinaryenTableGet, + _BinaryenTableGetGetTable, + _BinaryenTableGetSetTable, + _BinaryenTableGetGetIndex, + _BinaryenTableGetSetIndex, + + _BinaryenTableSet, + _BinaryenTableSetGetTable, + _BinaryenTableSetSetTable, + _BinaryenTableSetGetIndex, + _BinaryenTableSetSetIndex, + _BinaryenTableSetGetValue, + _BinaryenTableSetSetValue, + + _BinaryenTableSize, + _BinaryenTableSizeGetTable, + _BinaryenTableSizeSetTable, + + _BinaryenTableGrow, + _BinaryenTableGrowGetTable, + _BinaryenTableGrowSetTable, + _BinaryenTableGrowGetValue, + _BinaryenTableGrowSetValue, + _BinaryenTableGrowGetDelta, + _BinaryenTableGrowSetDelta, + + _BinaryenTry, + _BinaryenTryGetName, + _BinaryenTrySetName, + _BinaryenTryGetBody, + _BinaryenTrySetBody, + _BinaryenTryGetNumCatchTags, + _BinaryenTryGetNumCatchBodies, + _BinaryenTryGetCatchTagAt, + _BinaryenTrySetCatchTagAt, + _BinaryenTryAppendCatchTag, + _BinaryenTryInsertCatchTagAt, + _BinaryenTryRemoveCatchTagAt, + _BinaryenTryGetCatchBodyAt, + _BinaryenTrySetCatchBodyAt, + _BinaryenTryAppendCatchBody, + _BinaryenTryInsertCatchBodyAt, + _BinaryenTryRemoveCatchBodyAt, + _BinaryenTryHasCatchAll, + _BinaryenTryGetDelegateTarget, + _BinaryenTrySetDelegateTarget, + _BinaryenTryIsDelegate, + + _BinaryenThrow, + _BinaryenThrowGetTag, + _BinaryenThrowSetTag, + _BinaryenThrowGetNumOperands, + _BinaryenThrowGetOperandAt, + _BinaryenThrowSetOperandAt, + _BinaryenThrowAppendOperand, + _BinaryenThrowInsertOperandAt, + _BinaryenThrowRemoveOperandAt, + + _BinaryenRethrow, + _BinaryenRethrowGetTarget, + _BinaryenRethrowSetDepth, + + _BinaryenTupleMake, + _BinaryenTupleMakeGetNumOperands, + _BinaryenTupleMakeGetOperandAt, + _BinaryenTupleMakeSetOperandAt, + _BinaryenTupleMakeAppendOperand, + _BinaryenTupleMakeInsertOperandAt, + _BinaryenTupleMakeRemoveOperandAt, + + _BinaryenTupleExtract, + _BinaryenTupleExtractGetTuple, + _BinaryenTupleExtractSetTuple, + _BinaryenTupleExtractGetIndex, + _BinaryenTupleExtractSetIndex, + + _BinaryenPop, + + _BinaryenI31New, + _BinaryenI31NewGetValue, + _BinaryenI31NewSetValue, + + _BinaryenI31Get, + _BinaryenI31GetGetI31, + _BinaryenI31GetSetI31, + _BinaryenI31GetIsSigned, + _BinaryenI31GetSetSigned, + + _BinaryenAddFunction, + _BinaryenGetFunction, + _BinaryenRemoveFunction, + _BinaryenGetNumFunctions, + _BinaryenGetFunctionByIndex, + + _BinaryenFunctionGetName, + _BinaryenFunctionGetParams, + _BinaryenFunctionGetResults, + _BinaryenFunctionGetNumVars, + _BinaryenFunctionGetVar, + _BinaryenFunctionGetNumLocals, + _BinaryenFunctionHasLocalName, + _BinaryenFunctionGetLocalName, + _BinaryenFunctionSetLocalName, + _BinaryenFunctionGetBody, + _BinaryenFunctionSetBody, + _BinaryenFunctionOptimize, + _BinaryenFunctionRunPasses, + _BinaryenFunctionSetDebugLocation, + + _BinaryenAddFunctionImport, + _BinaryenAddTableImport, + _BinaryenAddMemoryImport, + _BinaryenAddGlobalImport, + _BinaryenAddTagImport, + + _BinaryenAddFunctionExport, + _BinaryenAddTableExport, + _BinaryenAddMemoryExport, + _BinaryenAddGlobalExport, + _BinaryenAddTagExport, + _BinaryenGetExport, + _BinaryenRemoveExport, + _BinaryenGetNumExports, + _BinaryenGetExportByIndex, + _BinaryenExportGetKind, + _BinaryenExportGetName, + _BinaryenExportGetValue, + + _BinaryenAddGlobal, + _BinaryenGetGlobal, + _BinaryenRemoveGlobal, + _BinaryenGetNumGlobals, + _BinaryenGetGlobalByIndex, + + _BinaryenGlobalGetName, + _BinaryenGlobalGetType, + _BinaryenGlobalIsMutable, + _BinaryenGlobalGetInitExpr, + + _BinaryenAddTag, + _BinaryenGetTag, + _BinaryenRemoveTag, + + _BinaryenTagGetName, + _BinaryenTagGetParams, + _BinaryenTagGetResults, + + _BinaryenAddTable, + _BinaryenRemoveTable, + _BinaryenGetNumTables, + _BinaryenGetTable, + _BinaryenGetTableByIndex, + + _BinaryenTableGetName, + _BinaryenTableSetName, + _BinaryenTableGetInitial, + _BinaryenTableSetInitial, + _BinaryenTableHasMax, + _BinaryenTableGetMax, + _BinaryenTableSetMax, + + _BinaryenAddActiveElementSegment, + _BinaryenAddPassiveElementSegment, + _BinaryenRemoveElementSegment, + _BinaryenGetNumElementSegments, + _BinaryenGetElementSegment, + _BinaryenGetElementSegmentByIndex, + + _BinaryenSetMemory, + _BinaryenGetNumMemorySegments, + _BinaryenGetMemorySegmentByteOffset, + _BinaryenGetMemorySegmentByteLength, + _BinaryenCopyMemorySegmentData, + + _BinaryenSetStart, + + _BinaryenModuleParse, + _BinaryenModulePrint, + _BinaryenModulePrintAsmjs, + _BinaryenModuleValidate, + _BinaryenModuleOptimize, + _BinaryenModuleRunPasses, + _BinaryenModuleAutoDrop, + _BinaryenModuleAllocateAndWrite, + _BinaryenModuleRead, + _BinaryenModuleInterpret, + _BinaryenModuleAddDebugInfoFileName, + _BinaryenModuleGetDebugInfoFileName, + _BinaryenModuleGetFeatures, + _BinaryenModuleSetFeatures, + + _BinaryenAddCustomSection, + + _BinaryenExpressionGetSideEffects, + + _RelooperCreate, + _RelooperAddBlock, + _RelooperAddBranch, + _RelooperAddBlockWithSwitch, + _RelooperAddBranchForSwitch, + _RelooperRenderAndDispose, + + _ExpressionRunnerCreate, + _ExpressionRunnerSetLocalValue, + _ExpressionRunnerSetGlobalValue, + _ExpressionRunnerRunAndDispose, + + _BinaryenGetOptimizeLevel, + _BinaryenSetOptimizeLevel, + _BinaryenGetShrinkLevel, + _BinaryenSetShrinkLevel, + _BinaryenGetDebugInfo, + _BinaryenSetDebugInfo, + _BinaryenGetLowMemoryUnused, + _BinaryenSetLowMemoryUnused, + _BinaryenGetZeroFilledMemory, + _BinaryenSetZeroFilledMemory, + _BinaryenGetFastMath, + _BinaryenSetFastMath, + _BinaryenGetPassArgument, + _BinaryenSetPassArgument, + _BinaryenClearPassArguments, + _BinaryenGetAlwaysInlineMaxSize, + _BinaryenSetAlwaysInlineMaxSize, + _BinaryenGetFlexibleInlineMaxSize, + _BinaryenSetFlexibleInlineMaxSize, + _BinaryenGetOneCallerInlineMaxSize, + _BinaryenSetOneCallerInlineMaxSize, + _BinaryenGetAllowInliningFunctionsWithLoops, + _BinaryenSetAllowInliningFunctionsWithLoops, + + // Helpers + + _malloc, + _free, + __i32_store8, + __i32_store16, + __i32_store, + __f32_store, + __f64_store, + __i32_load8_s, + __i32_load8_u, + __i32_load16_s, + __i32_load16_u, + __i32_load, + __f32_load, + __f64_load + +} = binaryen; + +export default binaryen; diff --git a/src/glue/js/i64.js b/src/glue/js/i64.js index 97a7279bf1..7c64f71205 100644 --- a/src/glue/js/i64.js +++ b/src/glue/js/i64.js @@ -5,7 +5,7 @@ /* eslint-disable no-undef */ -const Long = global.Long || require("long"); +import Long from "long"; global.i64_zero = Long.ZERO; global.i64_one = Long.ONE; diff --git a/src/index-js.ts b/src/index-js.ts new file mode 100644 index 0000000000..126a1a4136 --- /dev/null +++ b/src/index-js.ts @@ -0,0 +1,2 @@ +import "./glue/js/index"; +export * from "./index"; diff --git a/src/index.ts b/src/index.ts index 560ca8fd5c..34f5e268b8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -304,5 +304,5 @@ export * from "./resolver"; export * from "./tokenizer"; export * from "./types"; export * from "./extra/ast"; -import * as util from "./util/index"; +import * as util from "./util"; export { util }; diff --git a/src/module.ts b/src/module.ts index 791f49bd60..e6c46d8acc 100644 --- a/src/module.ts +++ b/src/module.ts @@ -3043,12 +3043,8 @@ function allocU8Array(u8s: Uint8Array | null): usize { if (!u8s) return 0; var len = u8s.length; var ptr = binaryen._malloc(len); - if (!ASC_TARGET) { - binaryen.HEAPU8.set(u8s, ptr); - } else { - for (let i = 0; i < len; ++i) { - binaryen.__i32_store8(ptr + i, u8s[i]); - } + for (let i = 0; i < len; ++i) { + binaryen.__i32_store8(ptr + i, u8s[i]); } return ptr; } @@ -3057,15 +3053,11 @@ function allocI32Array(i32s: i32[] | null): usize { if (!i32s) return 0; var len = i32s.length; var ptr = binaryen._malloc(len << 2); - if (!ASC_TARGET) { - binaryen.HEAP32.set(i32s, ptr >>> 2); - } else { - var idx = ptr; - for (let i = 0; i < len; ++i) { - let val = i32s[i]; - binaryen.__i32_store(idx, val); - idx += 4; - } + var idx = ptr; + for (let i = 0; i < len; ++i) { + let val = i32s[i]; + binaryen.__i32_store(idx, val); + idx += 4; } return ptr; } @@ -3074,15 +3066,11 @@ function allocU32Array(u32s: u32[] | null): usize { if (!u32s) return 0; var len = u32s.length; var ptr = binaryen._malloc(len << 2); - if (!ASC_TARGET) { - binaryen.HEAPU32.set(u32s, ptr >>> 2); - } else { - var idx = ptr; - for (let i = 0; i < len; ++i) { - let val = u32s[i]; - binaryen.__i32_store(idx, val); - idx += 4; - } + var idx = ptr; + for (let i = 0; i < len; ++i) { + let val = u32s[i]; + binaryen.__i32_store(idx, val); + idx += 4; } return ptr; } @@ -3093,15 +3081,11 @@ export function allocPtrArray(ptrs: usize[] | null): usize { assert(ASC_TARGET != Target.WASM64); var len = ptrs.length; var ptr = binaryen._malloc(len << 2); - if (!ASC_TARGET) { - binaryen.HEAPU32.set(ptrs, ptr >>> 2); - } else { - var idx = ptr; - for (let i = 0, k = len; i < k; ++i) { - let val = ptrs[i]; - binaryen.__i32_store(idx, val); - idx += 4; - } + var idx = ptr; + for (let i = 0, k = len; i < k; ++i) { + let val = ptrs[i]; + binaryen.__i32_store(idx, val); + idx += 4; } return ptr; } @@ -3134,15 +3118,9 @@ function allocString(str: string | null): usize { var idx = ptr; if (len === str.length) { // fast path when all chars are ascii - if (!ASC_TARGET) { - for (let i = 0, k = str.length; i < k; ++i) { - binaryen.HEAPU8[idx++] = str.charCodeAt(i); - } - } else { - for (let i = 0, k = str.length; i < k; ++i) { - let u = str.charCodeAt(i) >>> 0; - binaryen.__i32_store8(idx++, u as u8); - } + for (let i = 0, k = str.length; i < k; ++i) { + let u = str.charCodeAt(i) >>> 0; + binaryen.__i32_store8(idx++, u as u8); } } else { for (let i = 0, k = str.length; i < k; ++i) { @@ -3174,15 +3152,11 @@ function allocString(str: string | null): usize { } function readBuffer(ptr: usize, len: i32): Uint8Array { - if (!ASC_TARGET) { - return binaryen.HEAPU8.slice(ptr, ptr + len); - } else { - var ret = new Uint8Array(len); - for (let i = 0; i < len; ++i) { - ret[i] = binaryen.__i32_load8_u(ptr + i); - } - return ret; + var ret = new Uint8Array(len); + for (let i = 0; i < len; ++i) { + ret[i] = binaryen.__i32_load8_u(ptr + i); } + return ret; } export function readString(ptr: usize): string | null { diff --git a/src/passes/shadowstack.ts b/src/passes/shadowstack.ts index c0201c2e17..c925999f12 100644 --- a/src/passes/shadowstack.ts +++ b/src/passes/shadowstack.ts @@ -675,4 +675,4 @@ class InstrumentReturns extends Pass { ); this.replaceCurrent(module.flatten(stmts, TypeRef.Unreachable)); } -} \ No newline at end of file +} diff --git a/src/tsconfig.json b/src/tsconfig.json index 0acc81470a..ed2a784086 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -10,7 +10,8 @@ "useDefineForClassFields": false, "strict": true, "noImplicitReturns": true, - "noPropertyAccessFromIndexSignature": true + "noPropertyAccessFromIndexSignature": true, + "esModuleInterop": true }, "include": [ "./**/*.ts" diff --git a/src/util.ts b/src/util.ts new file mode 100644 index 0000000000..6cbfb53383 --- /dev/null +++ b/src/util.ts @@ -0,0 +1,12 @@ +/** + * @fileoverview Various utility. + * @license Apache-2.0 + */ + +export * from "./util/binary"; +export * from "./util/collections"; +export * from "./util/math"; +export * from "./util/path"; +export * from "./util/terminal"; +export * from "./util/text"; +export * from "./util/vector"; diff --git a/src/util/index.ts b/src/util/index.ts deleted file mode 100644 index 5900f8c1ca..0000000000 --- a/src/util/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @fileoverview Various utility. - * @license Apache-2.0 - */ - -export * from "./binary"; -export * from "./collections"; -export * from "./math"; -export * from "./path"; -export * from "./terminal"; -export * from "./text"; -export * from "./vector"; diff --git a/tests/browser-asc.js b/tests/browser-asc.js index d8a40cb0c3..96ee989c1e 100644 --- a/tests/browser-asc.js +++ b/tests/browser-asc.js @@ -1,4 +1,4 @@ -const asc = require("../dist/asc.js"); +import * as asc from "../dist/asc.js"; if (typeof asc.definitionFiles.assembly !== "string") throw Error("missing bundled assembly.d.ts"); if (typeof asc.definitionFiles.portable !== "string") throw Error("missing bundled portable.d.ts"); diff --git a/tests/compiler.js b/tests/compiler.js index affd483713..0374fd569e 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -1,17 +1,26 @@ +import fs from "fs"; +import path from "path"; +import os from "os"; +import v8 from "v8"; +import cluster from "cluster"; +import { createRequire } from "module"; +import { fileURLToPath } from "url"; +import { WASI } from "wasi"; +import glob from "glob"; +import coreCount from "physical-cpu-count"; +import * as colorsUtil from "../cli/util/colors.js"; +import * as optionsUtil from "../cli/util/options.js"; +import diff from "./util/diff.js"; +import { Rtrace } from "../lib/rtrace/index.js"; + +const dirname = path.dirname(fileURLToPath(import.meta.url)); +const require = createRequire(import.meta.url); + +global.binaryen = (await import("binaryen")).default; +global.assemblyscript = (await import("../index.js")).default; +const asc = (await import("../cli/asc.js")); + const startTime = Date.now(); -const fs = require("fs"); -const path = require("path"); -const os = require("os"); -const v8 = require("v8"); -const WASI = require("wasi").WASI; -const glob = require("glob"); -const colorsUtil = require("../cli/util/colors"); -const optionsUtil = require("../cli/util/options"); -const diff = require("./util/diff"); -const asc = require("../cli/asc.js"); -const { Rtrace } = require("../lib/rtrace/umd"); -const cluster = require("cluster"); -const coreCount = require("physical-cpu-count"); const config = { "create": { @@ -55,10 +64,10 @@ const argv = opts.arguments; if (args.help) { console.log([ - colorsUtil.white("SYNTAX"), - " " + colorsUtil.cyan("npm run test:compiler --") + " [test1, test2 ...] [options]", + colorsUtil.stdout.white("SYNTAX"), + " " + colorsUtil.stdout.cyan("npm run test:compiler --") + " [test1, test2 ...] [options]", "", - colorsUtil.white("OPTIONS"), + colorsUtil.stdout.white("OPTIONS"), optionsUtil.help(config) ].join(os.EOL) + os.EOL); process.exit(0); @@ -72,7 +81,7 @@ var failedMessages = new Map(); var skippedTests = new Set(); var skippedMessages = new Map(); -const basedir = path.join(__dirname, "compiler"); +const basedir = path.join(dirname, "compiler"); // Gets a list of all relevant tests function getTests() { @@ -80,7 +89,7 @@ function getTests() { if (argv.length) { // run matching tests only tests = tests.filter(filename => argv.indexOf(filename.replace(/\.ts$/, "")) >= 0); if (!tests.length) { - console.log(colorsUtil.red("FAILURE: ") + colorsUtil.white("No matching tests: " + argv.join(" ") + "\n")); + console.log(colorsUtil.stdout.red("FAILURE: ") + colorsUtil.stdout.white("No matching tests: " + argv.join(" ") + "\n")); process.exit(1); } } @@ -97,9 +106,9 @@ function section(title) { const times = process.hrtime(start); const time = asc.formatTime(times[0] * 1e9 + times[1]); switch (code) { - case SUCCESS: console.log(" " + colorsUtil.green ("SUCCESS") + " (" + time + ")\n"); break; - default: console.log(" " + colorsUtil.red("FAILURE") + " (" + time + ")\n"); break; - case SKIPPED: console.log(" " + colorsUtil.yellow("SKIPPED") + " (" + time + ")\n"); break; + case SUCCESS: console.log(" " + colorsUtil.stdout.green ("SUCCESS") + " (" + time + ")\n"); break; + default: console.log(" " + colorsUtil.stdout.red("FAILURE") + " (" + time + ")\n"); break; + case SKIPPED: console.log(" " + colorsUtil.stdout.yellow("SKIPPED") + " (" + time + ")\n"); break; } } }; @@ -110,7 +119,7 @@ const SKIPPED = 2; // Runs a single test function runTest(basename) { - console.log(colorsUtil.white("# compiler/" + basename) + "\n"); + console.log(colorsUtil.stdout.white("# compiler/" + basename) + "\n"); const configPath = path.join(basedir, basename + ".json"); const config = fs.existsSync(configPath) @@ -149,7 +158,7 @@ function runTest(basename) { } }); if (missing_features.length) { - console.log("- " + colorsUtil.yellow("feature SKIPPED") + " (" + missing_features.join(", ") + ")\n"); + console.log("- " + colorsUtil.stdout.yellow("feature SKIPPED") + " (" + missing_features.join(", ") + ")\n"); skippedTests.add(basename); skippedMessages.set(basename, "feature not enabled"); if (cluster.isWorker) process.send({ cmd: "skipped", message: skippedMessages.get(basename) }); @@ -222,7 +231,7 @@ function runTest(basename) { var actual = stdout.toString().replace(/\r\n/g, "\n"); if (args.create) { fs.writeFileSync(path.join(basedir, basename + ".untouched.wat"), actual, { encoding: "utf8" }); - console.log(" " + colorsUtil.yellow("Created fixture")); + console.log(" " + colorsUtil.stdout.yellow("Created fixture")); compareFixture.end(SKIPPED); } else { let expected = fs.readFileSync(path.join(basedir, basename + ".untouched.wat"), { encoding: "utf8" }).replace(/\r\n/g, "\n"); @@ -394,7 +403,7 @@ function testInstantiate(basename, binaryBuffer, glue, stderr, wasiOptions) { env: { memory, abort: function(msg, file, line, column) { - console.log(colorsUtil.red(" abort: " + getString(msg) + " in " + getString(file) + "(" + line + ":" + column + ")")); + console.log(colorsUtil.stdout.red(" abort: " + getString(msg) + " in " + getString(file) + "(" + line + ":" + column + ")")); }, trace: function(msg, n) { console.log(" trace: " + getString(msg) + (n ? " " : "") + Array.prototype.slice.call(arguments, 2, 2 + n).join(", ")); @@ -468,93 +477,90 @@ function testInstantiate(basename, binaryBuffer, glue, stderr, wasiOptions) { // Evaluates the overall test result function evaluateResult() { if (skippedTests.size) { - console.log(colorsUtil.yellow("WARNING: ") + colorsUtil.white(skippedTests.size + " compiler tests have been skipped:\n")); + console.log(colorsUtil.stdout.yellow("WARNING: ") + colorsUtil.stdout.white(skippedTests.size + " compiler tests have been skipped:\n")); skippedTests.forEach(name => { - var message = skippedMessages.has(name) ? colorsUtil.gray("[" + skippedMessages.get(name) + "]") : ""; + var message = skippedMessages.has(name) ? colorsUtil.stdout.gray("[" + skippedMessages.get(name) + "]") : ""; console.log(" " + name + " " + message); }); console.log(); } if (failedTests.size) { process.exitCode = 1; - console.log(colorsUtil.red("FAILURE: ") + colorsUtil.white(failedTests.size + " compiler tests had failures:\n")); + console.log(colorsUtil.stdout.red("FAILURE: ") + colorsUtil.stdout.white(failedTests.size + " compiler tests had failures:\n")); failedTests.forEach(name => { - var message = failedMessages.has(name) ? colorsUtil.gray("[" + failedMessages.get(name) + "]") : ""; + var message = failedMessages.has(name) ? colorsUtil.stdout.gray("[" + failedMessages.get(name) + "]") : ""; console.log(" " + name + " " + message); }); console.log(); } console.log("Time: " + (Date.now() - startTime) + " ms\n"); if (!process.exitCode) { - console.log("[ " + colorsUtil.white("SUCCESS") + " ]"); + console.log("[ " + colorsUtil.stdout.white("SUCCESS") + " ]"); } } -asc.ready.then(() => { - - // Run tests in parallel if requested - if (args.parallel && coreCount > 1) { - if (cluster.isWorker) { - colorsUtil.supported = true; - process.on("message", msg => { - if (msg.cmd != "run") throw Error("invalid command: " + msg.cmd); - try { - runTest(msg.test); - } catch (e) { - process.send({ cmd: "done", failed: true, message: e.message }); +// Run tests in parallel if requested +if (args.parallel && coreCount > 1) { + if (cluster.isWorker) { + colorsUtil.stdout.enabled = true; + process.on("message", msg => { + if (msg.cmd != "run") throw Error("invalid command: " + msg.cmd); + try { + runTest(msg.test); + } catch (e) { + process.send({ cmd: "done", failed: true, message: e.message }); + } + }); + process.send({ cmd: "ready" }); + } else { + const tests = getTests(); + // const sizes = new Map(); + // tests.forEach(name => sizes.set(name, fs.statSync(path.join(basedir, name + ".ts")).size)); + // tests.sort((a, b) => sizes.get(b) - sizes.get(a)); + const workers = []; + const current = []; + const outputs = []; + let numWorkers = Math.min(coreCount - 1, tests.length); + console.log("Spawning " + numWorkers + " workers ..."); + cluster.settings.silent = true; + let index = 0; + for (let i = 0; i < numWorkers; ++i) { + let worker = cluster.fork(); + workers[i] = worker; + current[i] = null; + outputs[i] = []; + worker.process.stdout.on("data", buf => outputs[i].push(buf)); + worker.process.stderr.on("data", buf => outputs[i].push(buf)); + worker.on("message", msg => { + if (msg.cmd == "done") { + process.stdout.write(Buffer.concat(outputs[i]).toString()); + if (msg.failed) failedTests.add(current[i]); + if (msg.message) failedMessages.set(current[i], msg.message); + } else if (msg.cmd == "skipped") { + process.stdout.write(Buffer.concat(outputs[i]).toString()); + skippedTests.add(current[i]); + if (msg.message) skippedMessages.set(current[i], msg.message); + } else if (msg.cmd != "ready") { + throw Error("invalid command: " + msg.cmd); } - }); - process.send({ cmd: "ready" }); - } else { - const tests = getTests(); - // const sizes = new Map(); - // tests.forEach(name => sizes.set(name, fs.statSync(path.join(basedir, name + ".ts")).size)); - // tests.sort((a, b) => sizes.get(b) - sizes.get(a)); - const workers = []; - const current = []; - const outputs = []; - let numWorkers = Math.min(coreCount - 1, tests.length); - console.log("Spawning " + numWorkers + " workers ..."); - cluster.settings.silent = true; - let index = 0; - for (let i = 0; i < numWorkers; ++i) { - let worker = cluster.fork(); - workers[i] = worker; - current[i] = null; + if (index >= tests.length) { + workers[i] = null; + worker.kill(); + return; + } + current[i] = tests[index++]; outputs[i] = []; - worker.process.stdout.on("data", buf => outputs[i].push(buf)); - worker.process.stderr.on("data", buf => outputs[i].push(buf)); - worker.on("message", msg => { - if (msg.cmd == "done") { - process.stdout.write(Buffer.concat(outputs[i]).toString()); - if (msg.failed) failedTests.add(current[i]); - if (msg.message) failedMessages.set(current[i], msg.message); - } else if (msg.cmd == "skipped") { - process.stdout.write(Buffer.concat(outputs[i]).toString()); - skippedTests.add(current[i]); - if (msg.message) skippedMessages.set(current[i], msg.message); - } else if (msg.cmd != "ready") { - throw Error("invalid command: " + msg.cmd); - } - if (index >= tests.length) { - workers[i] = null; - worker.kill(); - return; - } - current[i] = tests[index++]; - outputs[i] = []; - worker.send({ cmd: "run", test: current[i] }); - }); - worker.on("disconnect", () => { - if (workers[i]) throw Error("worker#" + i + " died unexpectedly"); - if (!--numWorkers) evaluateResult(); - }); - } + worker.send({ cmd: "run", test: current[i] }); + }); + worker.on("disconnect", () => { + if (workers[i]) throw Error("worker#" + i + " died unexpectedly"); + if (!--numWorkers) evaluateResult(); + }); } - - // Otherwise run tests sequentially - } else { - getTests().forEach(runTest); - evaluateResult(); } -}); + +// Otherwise run tests sequentially +} else { + getTests().forEach(runTest); + evaluateResult(); +} diff --git a/tests/compiler/package.json b/tests/compiler/package.json new file mode 100644 index 0000000000..5bbefffbab --- /dev/null +++ b/tests/compiler/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/tests/decompiler.js b/tests/decompiler.js deleted file mode 100644 index 3d22d199d0..0000000000 --- a/tests/decompiler.js +++ /dev/null @@ -1,29 +0,0 @@ -var binaryen = global.binaryen = require("../lib/binaryen"); - -require("ts-node").register({ - project: require("path").join(__dirname, "..", "src", "tsconfig.json"), - compilerHost: true, - files: true -}); -require("../src/glue/js"); - -var mod = new binaryen.Module(); -var ftype = mod.addFunctionType("i", binaryen.i32, [ ]); -var fn = mod.addFunction("main", ftype, [], - mod.block(null, [ - mod.return( - mod.i32.add( - mod.i32.const(1), - mod.i32.const(2) - ) - ) - ]) -); - -mod.validate(); -mod.emitText(); - -var Decompiler = require("../src/decompiler").Decompiler; -var decompiler = new Decompiler(); -decompiler.decompileFunction(fn); -console.log(decompiler.finish()); diff --git a/tests/require/index.ts b/tests/import/index.ts similarity index 57% rename from tests/require/index.ts rename to tests/import/index.ts index 2fdcb82c5e..7f1d09b7e1 100644 --- a/tests/require/index.ts +++ b/tests/import/index.ts @@ -1,6 +1,3 @@ -// used to check `require`ing portable sources -// - src/glue/js/index.ts -// - src/index.ts import * as as from "../../index"; var program: as.Program = as.newProgram(as.newOptions()); as.parse(program, "", "empty"); diff --git a/tests/parser.js b/tests/parser.js index b02bc7556a..65046119d4 100644 --- a/tests/parser.js +++ b/tests/parser.js @@ -1,10 +1,13 @@ -const fs = require("fs"); -const path = require("path"); -const os = require("os"); -const glob = require("glob"); -const colorsUtil = require("../cli/util/colors"); -const optionsUtil = require("../cli/util/options"); -const diff = require("./util/diff"); +import fs from "fs"; +import path from "path"; +import os from "os"; +import { fileURLToPath } from "url"; +import glob from "glob"; +import colorsUtil from "../cli/util/colors.js"; +import optionsUtil from "../cli/util/options.js"; +import diff from "./util/diff.js"; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); const config = { "create": { @@ -49,15 +52,7 @@ if (argv.length) { } } -require("ts-node").register({ - project: path.join(__dirname, "..", "src", "tsconfig.json"), - compilerHost: true, - files: true -}); -require("../src/glue/js"); - -const { Program, Options } = require("../src"); -const ASTBuilder = require("../src/extra/ast").ASTBuilder; +import { Program, Options, ASTBuilder } from "../index.js"; var failures = 0; @@ -91,12 +86,12 @@ tests.forEach(filename => { } console.log(); - if (failed) - ++failures; + if (failed) ++failures; }); if (failures) { process.exitCode = 1; console.log(colorsUtil.red("ERROR: ") + failures + " parser tests failed"); -} else +} else { console.log("[ " + colorsUtil.white("SUCCESS") + " ]"); +} diff --git a/tests/require/index-release.ts b/tests/require/index-release.ts deleted file mode 100644 index e535d1c99f..0000000000 --- a/tests/require/index-release.ts +++ /dev/null @@ -1,6 +0,0 @@ -// used to check `require`ing distribution files -// - dist/assemblyscript.js -// - dist/assemblyscript.d.ts -import * as as from "../../index.release"; -var program: as.Program = as.newProgram(as.newOptions()); -as.parse(program, "", "empty"); diff --git a/tests/tokenizer.js b/tests/tokenizer.js index d4c43f4b4a..1f47fd13e4 100644 --- a/tests/tokenizer.js +++ b/tests/tokenizer.js @@ -1,21 +1,13 @@ -const fs = require("fs"); -const path = require("path"); +import fs from "fs"; +import path from "path"; +import { fileURLToPath } from "url"; +import { Tokenizer, Token, Source, SourceKind } from "../index.js"; -require("ts-node").register({ - project: path.join(__dirname, "..", "src", "tsconfig.json"), - typeCheck: false, - transpileOnly: true, - compilerHost: true, - files: true, -}); -require("../src/glue/js"); +const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const { Tokenizer, Token } = require("../src/tokenizer"); -const { Source, SourceKind } = require("../src/ast"); - -var file = process.argv.length > 2 ? process.argv[2] : path.join(__dirname, "..", "src", "tokenizer.ts"); +const file = process.argv.length > 2 ? process.argv[2] : path.join(__dirname, "..", "src", "tokenizer.ts"); const text = fs.readFileSync(file).toString(); -const tn = new Tokenizer(new Source("compiler.ts", text, SourceKind.ENTRY)); +const tn = new Tokenizer(new Source(SourceKind.ENTRY, "compiler.ts", text)); do { let token = tn.next(); diff --git a/tests/util-path.js b/tests/util-path.js index e3d5e9319f..119953c93c 100644 --- a/tests/util-path.js +++ b/tests/util-path.js @@ -1,18 +1,10 @@ -const path = require("path"); -const assert = require("assert"); +import path from "path"; +import assert from "assert"; +import { util } from "../index.js"; -require("ts-node").register({ - project: path.join(__dirname, "..", "src", "tsconfig.json"), - typeCheck: false, - transpileOnly: true, - compilerHost: true, - files: true -}); -require("../src/glue/js"); - -const { normalize, resolve } = require("../src/util/path"); +const { normalizePath, resolvePath } = util; var test = "./Y/./N/./N/../../././../Y/./."; -assert.strictEqual(normalize(test), path.posix.normalize(test)); +assert.strictEqual(normalizePath(test), path.posix.normalize(test)); -assert.strictEqual(resolve("../../..", "lib/util/i64.ts"), ".."); +assert.strictEqual(resolvePath("../../..", "lib/util/i64.ts"), ".."); diff --git a/tests/util/diff.js b/tests/util/diff.js index 4d2a94d9df..4a4be69cef 100644 --- a/tests/util/diff.js +++ b/tests/util/diff.js @@ -1,7 +1,7 @@ -var Diff = require("diff"); -var colors = require("../../cli/util/colors"); +import * as Diff from "diff"; +import * as colors from "../../cli/util/colors.js"; -module.exports = function diff(filename, expected, actual) { +export default function diff(filename, expected, actual) { var diff = Diff.structuredPatch(filename, filename, expected, actual, "expected", "actual", { context: 5 }); if (!diff.hunks.length) return null; @@ -19,12 +19,12 @@ module.exports = function diff(filename, expected, actual) { ); ret.push.apply(ret, hunk.lines.map(line => line.charAt(0) === "+" - ? colors.green(line) + ? colors.stdout.green(line) : line.charAt(0) === "-" - ? line = colors.red(line) + ? line = colors.stdout.red(line) : line )); } return ret.join('\n') + '\n'; -}; +} diff --git a/tsconfig-docs.json b/tsconfig-docs.json deleted file mode 100644 index 90405cb1ef..0000000000 --- a/tsconfig-docs.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./src/tsconfig.json", - "include": [ - "./src/**/*.ts" - ], - "exclude": [ - "./std/**" - ] -} diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index a3775f9d53..0000000000 --- a/webpack.config.js +++ /dev/null @@ -1,135 +0,0 @@ -const path = require("path"); -const fs = require("fs"); -const webpack = require("webpack"); -const TerserPlugin = require('terser-webpack-plugin'); - -function preamble(name) { - return [ - "/**", - " * @license", - " * " + name, - " * Copyright Daniel Wirtz / The AssemblyScript Authors.", - " * SPDX-License-Identifier: Apache-2.0", - " */" - ].join("\n"); -} - -// Build the C-like library -const lib = { - mode: "production", - target: ["web", "es6"], - entry: [ "./src/glue/js", "./src/index.ts" ], - module: { - rules: [ - { - test: /\.ts$/, - use: "ts-loader", - exclude: /node_modules/ - } - ] - }, - externals: [ - "binaryen" - ], - resolve: { - extensions: [ ".ts", ".js" ] - }, - output: { - filename: "assemblyscript.js", - path: path.resolve(__dirname, "dist"), - library: "assemblyscript", - libraryTarget: "umd", - globalObject: "typeof self !== 'undefined' ? self : this", - hashFunction: "xxhash64" - }, - devtool: "source-map", - performance: { - hints : false - }, - optimization: { - minimize: true, - minimizer: [ - new TerserPlugin({ - terserOptions: { - output: { - comments: false, - preamble: preamble("The AssemblyScript Compiler.") - } - }, - parallel: true, - extractComments: false - }) - ], - } -}; - -// Build asc for browser usage -const shimDir = path.join(__dirname, "cli", "shim"); -const bin = { - mode: "production", - target: ["web", "es6"], - context: path.join(__dirname, "cli"), - entry: [ "./asc.js" ], - externals: [ - "binaryen", - "assemblyscript" - ], - node: { - global: true - }, - output: { - filename: "asc.js", - path: path.resolve(__dirname, "dist"), - library: "asc", - libraryTarget: "umd", - globalObject: "typeof self !== 'undefined' ? self : this", - hashFunction: "xxhash64" - }, - devtool: "source-map", - performance: { - hints : false - }, - plugins: [ - new webpack.DefinePlugin({ - BUNDLE_VERSION: JSON.stringify(require("./package.json").version), - BUNDLE_LIBRARY: (() => { - const libDir = path.join(__dirname, "std", "assembly"); - const libFiles = require("glob").sync("**/!(*.d).ts", { cwd: libDir }); - const lib = {}; - libFiles.forEach(file => lib[file.replace(/\.ts$/, "")] = bundleFile(path.join(libDir, file))); - return lib; - })(), - BUNDLE_DEFINITIONS: { - "assembly": bundleFile(path.join(__dirname, "std", "assembly", "index.d.ts")), - "portable": bundleFile(path.join(__dirname, "std", "portable", "index.d.ts")) - }, - __dirname: JSON.stringify(".") - }), - - // Browser shims - new webpack.NormalModuleReplacementPlugin(/^path$/, path.join(shimDir, "path")), - new webpack.NormalModuleReplacementPlugin(/^process$/, path.join(shimDir, "process")), - new webpack.NormalModuleReplacementPlugin(/^fs$/, path.join(shimDir, "fs")) - ], - optimization: { - minimize: true, - minimizer: [ - new TerserPlugin({ - terserOptions: { - output: { - comments: false, - preamble: preamble("The AssemblyScript Compiler Frontend.") - } - }, - parallel: true, - extractComments: false - }) - ], - } -}; - -function bundleFile(filename) { - return JSON.stringify(fs.readFileSync(filename, { encoding: "utf8" }).replace(/\r\n/g, "\n")); -} - -module.exports = [ lib, bin ]; From 219498826ef203f13d518a74a5aecb2efe0f06fa Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 26 Nov 2021 20:26:33 +0100 Subject: [PATCH 002/175] remove unused dependencies --- package-lock.json | 1209 +-------------------------------------------- package.json | 5 +- 2 files changed, 13 insertions(+), 1201 deletions(-) diff --git a/package-lock.json b/package-lock.json index c90f3508c3..1d1bd338ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,7 @@ "dependencies": { "binaryen": "102.0.0-nightly.20211118", "long": "^5.1.0", - "source-map-support": "^0.5.20", - "ts-node": "^10.4.0" + "source-map-support": "^0.5.20" }, "bin": { "asc": "bin/asc.js", @@ -27,8 +26,6 @@ "glob": "^7.2.0", "mkdirp": "^1.0.4", "physical-cpu-count": "^2.0.0", - "ts-loader": "^9.2.6", - "ts-node": "^10.4.0", "typescript": "~4.5.2" }, "funding": { @@ -36,23 +33,6 @@ "url": "https://opencollective.com/assemblyscript" } }, - "node_modules/@cspotcode/source-map-consumer": { - "version": "0.8.0", - "license": "BSD-3-Clause", - "engines": { - "node": ">= 12" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.7.0", - "license": "MIT", - "dependencies": { - "@cspotcode/source-map-consumer": "0.8.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/@eslint/eslintrc": { "version": "1.0.4", "dev": true, @@ -133,48 +113,6 @@ "node": ">= 8" } }, - "node_modules/@tsconfig/node10": { - "version": "1.0.8", - "license": "MIT" - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.9", - "license": "MIT" - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.1", - "license": "MIT" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.2", - "license": "MIT" - }, - "node_modules/@types/eslint": { - "version": "7.28.2", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/estree": { - "version": "0.0.50", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/@types/json-schema": { "version": "7.0.9", "dev": true, @@ -182,6 +120,7 @@ }, "node_modules/@types/node": { "version": "16.11.7", + "dev": true, "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { @@ -341,166 +280,9 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@webassemblyjs/ast": { - "version": "1.11.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.11.1", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.11.1", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "dev": true, - "license": "BSD-3-Clause", - "peer": true - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "dev": true, - "license": "Apache-2.0", - "peer": true - }, "node_modules/acorn": { "version": "8.5.0", + "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -509,15 +291,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-assertions": { - "version": "1.8.0", - "dev": true, - "license": "MIT", - "peer": true, - "peerDependencies": { - "acorn": "^8" - } - }, "node_modules/acorn-jsx": { "version": "5.3.2", "dev": true, @@ -526,13 +299,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/ajv": { "version": "6.12.6", "dev": true, @@ -548,15 +314,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "dev": true, - "license": "MIT", - "peer": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, "node_modules/ansi-colors": { "version": "4.1.1", "dev": true, @@ -587,10 +344,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/arg": { - "version": "4.1.3", - "license": "MIT" - }, "node_modules/argparse": { "version": "2.0.1", "dev": true, @@ -639,29 +392,6 @@ "node": ">=8" } }, - "node_modules/browserslist": { - "version": "4.17.6", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "caniuse-lite": "^1.0.30001274", - "electron-to-chromium": "^1.3.886", - "escalade": "^3.1.1", - "node-releases": "^2.0.1", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "license": "MIT" @@ -674,16 +404,6 @@ "node": ">=6" } }, - "node_modules/caniuse-lite": { - "version": "1.0.30001278", - "dev": true, - "license": "CC-BY-4.0", - "peer": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } - }, "node_modules/chalk": { "version": "4.1.2", "dev": true, @@ -699,15 +419,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chrome-trace-event": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "dev": true, @@ -724,21 +435,11 @@ "dev": true, "license": "MIT" }, - "node_modules/commander": { - "version": "2.20.3", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/concat-map": { "version": "0.0.1", "dev": true, "license": "MIT" }, - "node_modules/create-require": { - "version": "1.1.1", - "license": "MIT" - }, "node_modules/cross-spawn": { "version": "7.0.3", "dev": true, @@ -804,24 +505,6 @@ "node": ">=6.0.0" } }, - "node_modules/electron-to-chromium": { - "version": "1.3.891", - "dev": true, - "license": "ISC", - "peer": true - }, - "node_modules/enhanced-resolve": { - "version": "5.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/enquirer": { "version": "2.3.6", "dev": true, @@ -833,12 +516,6 @@ "node": ">=8.6" } }, - "node_modules/es-module-lexer": { - "version": "0.9.3", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/esbuild": { "version": "0.13.14", "dev": true, @@ -879,15 +556,6 @@ "win32" ] }, - "node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/escape-string-regexp": { "version": "4.0.0", "dev": true, @@ -1093,15 +761,6 @@ "node": ">=0.10.0" } }, - "node_modules/events": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.8.x" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "dev": true, @@ -1233,12 +892,6 @@ "node": ">=10.13.0" } }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "dev": true, - "license": "BSD-2-Clause", - "peer": true - }, "node_modules/globals": { "version": "13.12.0", "dev": true, @@ -1273,11 +926,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/graceful-fs": { - "version": "4.2.8", - "dev": true, - "license": "ISC" - }, "node_modules/has-flag": { "version": "4.0.0", "dev": true, @@ -1363,35 +1011,6 @@ "dev": true, "license": "ISC" }, - "node_modules/jest-worker": { - "version": "27.3.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/js-yaml": { "version": "4.1.0", "dev": true, @@ -1403,12 +1022,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/json-schema-traverse": { "version": "0.4.1", "dev": true, @@ -1431,15 +1044,6 @@ "node": ">= 0.8.0" } }, - "node_modules/loader-runner": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6.11.5" - } - }, "node_modules/lodash.merge": { "version": "4.6.2", "dev": true, @@ -1460,16 +1064,6 @@ "node": ">=10" } }, - "node_modules/make-error": { - "version": "1.3.6", - "license": "ISC" - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -1491,27 +1085,6 @@ "node": ">=8.6" } }, - "node_modules/mime-db": { - "version": "1.50.0", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.33", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "mime-db": "1.50.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/minimatch": { "version": "3.0.4", "dev": true, @@ -1544,18 +1117,6 @@ "dev": true, "license": "MIT" }, - "node_modules/neo-async": { - "version": "2.6.2", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/node-releases": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/once": { "version": "1.4.0", "dev": true, @@ -1621,12 +1182,6 @@ "dev": true, "license": "ISC" }, - "node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "peer": true - }, "node_modules/picomatch": { "version": "2.3.0", "dev": true, @@ -1682,15 +1237,6 @@ } ] }, - "node_modules/randombytes": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, "node_modules/regexpp": { "version": "3.2.0", "dev": true, @@ -1757,46 +1303,8 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "peer": true - }, - "node_modules/schema-utils": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/semver": { - "version": "7.3.5", + "node_modules/semver": { + "version": "7.3.5", "dev": true, "license": "ISC", "dependencies": { @@ -1809,15 +1317,6 @@ "node": ">=10" } }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "dev": true, @@ -1894,74 +1393,6 @@ "node": ">=8" } }, - "node_modules/tapable": { - "version": "2.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/terser": { - "version": "5.9.0", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "commander": "^2.20.0", - "source-map": "~0.7.2", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser-webpack-plugin": { - "version": "5.2.5", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "jest-worker": "^27.0.6", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "source-map": "^0.6.1", - "terser": "^5.7.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } - } - }, - "node_modules/terser/node_modules/source-map": { - "version": "0.7.3", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "engines": { - "node": ">= 8" - } - }, "node_modules/text-table": { "version": "0.2.0", "dev": true, @@ -1978,70 +1409,6 @@ "node": ">=8.0" } }, - "node_modules/ts-loader": { - "version": "9.2.6", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "enhanced-resolve": "^5.0.0", - "micromatch": "^4.0.0", - "semver": "^7.3.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "typescript": "*", - "webpack": "^5.0.0" - } - }, - "node_modules/ts-node": { - "version": "10.4.0", - "license": "MIT", - "dependencies": { - "@cspotcode/source-map-support": "0.7.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/ts-node/node_modules/diff": { - "version": "4.0.2", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/tslib": { "version": "1.14.1", "dev": true, @@ -2087,6 +1454,7 @@ "version": "4.5.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -2109,75 +1477,6 @@ "dev": true, "license": "MIT" }, - "node_modules/watchpack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack": { - "version": "5.62.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.50", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.8.3", - "es-module-lexer": "^0.9.0", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.4", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.2.0", - "webpack-sources": "^3.2.0" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-sources": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/which": { "version": "2.0.2", "dev": true, @@ -2209,25 +1508,9 @@ "version": "4.0.0", "dev": true, "license": "ISC" - }, - "node_modules/yn": { - "version": "3.1.1", - "license": "MIT", - "engines": { - "node": ">=6" - } } }, "dependencies": { - "@cspotcode/source-map-consumer": { - "version": "0.8.0" - }, - "@cspotcode/source-map-support": { - "version": "0.7.0", - "requires": { - "@cspotcode/source-map-consumer": "0.8.0" - } - }, "@eslint/eslintrc": { "version": "1.0.4", "dev": true, @@ -2288,47 +1571,13 @@ "fastq": "^1.6.0" } }, - "@tsconfig/node10": { - "version": "1.0.8" - }, - "@tsconfig/node12": { - "version": "1.0.9" - }, - "@tsconfig/node14": { - "version": "1.0.1" - }, - "@tsconfig/node16": { - "version": "1.0.2" - }, - "@types/eslint": { - "version": "7.28.2", - "dev": true, - "peer": true, - "requires": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "@types/eslint-scope": { - "version": "3.7.1", - "dev": true, - "peer": true, - "requires": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "@types/estree": { - "version": "0.0.50", - "dev": true, - "peer": true - }, "@types/json-schema": { "version": "7.0.9", "dev": true }, "@types/node": { - "version": "16.11.7" + "version": "16.11.7", + "dev": true }, "@typescript-eslint/eslint-plugin": { "version": "5.4.0", @@ -2413,164 +1662,15 @@ "eslint-visitor-keys": "^3.0.0" } }, - "@webassemblyjs/ast": { - "version": "1.11.1", - "dev": true, - "peer": true, - "requires": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "dev": true, - "peer": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "dev": true, - "peer": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "dev": true, - "peer": true - }, - "@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "dev": true, - "peer": true, - "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "dev": true, - "peer": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "dev": true, - "peer": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.11.1", - "dev": true, - "peer": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.11.1", - "dev": true, - "peer": true, - "requires": { - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/utf8": { - "version": "1.11.1", - "dev": true, - "peer": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "dev": true, - "peer": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "dev": true, - "peer": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "dev": true, - "peer": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "dev": true, - "peer": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.11.1", - "dev": true, - "peer": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@xtuc/long": "4.2.2" - } - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "dev": true, - "peer": true - }, - "@xtuc/long": { - "version": "4.2.2", - "dev": true, - "peer": true - }, "acorn": { - "version": "8.5.0" - }, - "acorn-import-assertions": { - "version": "1.8.0", - "dev": true, - "peer": true, - "requires": {} + "version": "8.5.0", + "dev": true }, "acorn-jsx": { "version": "5.3.2", "dev": true, "requires": {} }, - "acorn-walk": { - "version": "8.2.0" - }, "ajv": { "version": "6.12.6", "dev": true, @@ -2581,12 +1681,6 @@ "uri-js": "^4.2.2" } }, - "ajv-keywords": { - "version": "3.5.2", - "dev": true, - "peer": true, - "requires": {} - }, "ansi-colors": { "version": "4.1.1", "dev": true @@ -2602,9 +1696,6 @@ "color-convert": "^2.0.1" } }, - "arg": { - "version": "4.1.3" - }, "argparse": { "version": "2.0.1", "dev": true @@ -2639,18 +1730,6 @@ "fill-range": "^7.0.1" } }, - "browserslist": { - "version": "4.17.6", - "dev": true, - "peer": true, - "requires": { - "caniuse-lite": "^1.0.30001274", - "electron-to-chromium": "^1.3.886", - "escalade": "^3.1.1", - "node-releases": "^2.0.1", - "picocolors": "^1.0.0" - } - }, "buffer-from": { "version": "1.1.2" }, @@ -2658,11 +1737,6 @@ "version": "3.1.0", "dev": true }, - "caniuse-lite": { - "version": "1.0.30001278", - "dev": true, - "peer": true - }, "chalk": { "version": "4.1.2", "dev": true, @@ -2671,11 +1745,6 @@ "supports-color": "^7.1.0" } }, - "chrome-trace-event": { - "version": "1.0.3", - "dev": true, - "peer": true - }, "color-convert": { "version": "2.0.1", "dev": true, @@ -2687,18 +1756,10 @@ "version": "1.1.4", "dev": true }, - "commander": { - "version": "2.20.3", - "dev": true, - "peer": true - }, "concat-map": { "version": "0.0.1", "dev": true }, - "create-require": { - "version": "1.1.1" - }, "cross-spawn": { "version": "7.0.3", "dev": true, @@ -2739,19 +1800,6 @@ "esutils": "^2.0.2" } }, - "electron-to-chromium": { - "version": "1.3.891", - "dev": true, - "peer": true - }, - "enhanced-resolve": { - "version": "5.8.3", - "dev": true, - "requires": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - } - }, "enquirer": { "version": "2.3.6", "dev": true, @@ -2759,11 +1807,6 @@ "ansi-colors": "^4.1.1" } }, - "es-module-lexer": { - "version": "0.9.3", - "dev": true, - "peer": true - }, "esbuild": { "version": "0.13.14", "dev": true, @@ -2792,11 +1835,6 @@ "dev": true, "optional": true }, - "escalade": { - "version": "3.1.1", - "dev": true, - "peer": true - }, "escape-string-regexp": { "version": "4.0.0", "dev": true @@ -2931,11 +1969,6 @@ "version": "2.0.3", "dev": true }, - "events": { - "version": "3.3.0", - "dev": true, - "peer": true - }, "fast-deep-equal": { "version": "3.1.3", "dev": true @@ -3034,11 +2067,6 @@ "is-glob": "^4.0.3" } }, - "glob-to-regexp": { - "version": "0.4.1", - "dev": true, - "peer": true - }, "globals": { "version": "13.12.0", "dev": true, @@ -3060,10 +2088,6 @@ "slash": "^3.0.0" } }, - "graceful-fs": { - "version": "4.2.8", - "dev": true - }, "has-flag": { "version": "4.0.0", "dev": true @@ -3115,26 +2139,6 @@ "version": "2.0.0", "dev": true }, - "jest-worker": { - "version": "27.3.1", - "dev": true, - "peer": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "dependencies": { - "supports-color": { - "version": "8.1.1", - "dev": true, - "peer": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "js-yaml": { "version": "4.1.0", "dev": true, @@ -3142,11 +2146,6 @@ "argparse": "^2.0.1" } }, - "json-parse-better-errors": { - "version": "1.0.2", - "dev": true, - "peer": true - }, "json-schema-traverse": { "version": "0.4.1", "dev": true @@ -3163,11 +2162,6 @@ "type-check": "~0.4.0" } }, - "loader-runner": { - "version": "4.2.0", - "dev": true, - "peer": true - }, "lodash.merge": { "version": "4.6.2", "dev": true @@ -3182,14 +2176,6 @@ "yallist": "^4.0.0" } }, - "make-error": { - "version": "1.3.6" - }, - "merge-stream": { - "version": "2.0.0", - "dev": true, - "peer": true - }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -3204,19 +2190,6 @@ "picomatch": "^2.2.3" } }, - "mime-db": { - "version": "1.50.0", - "dev": true, - "peer": true - }, - "mime-types": { - "version": "2.1.33", - "dev": true, - "peer": true, - "requires": { - "mime-db": "1.50.0" - } - }, "minimatch": { "version": "3.0.4", "dev": true, @@ -3236,16 +2209,6 @@ "version": "1.4.0", "dev": true }, - "neo-async": { - "version": "2.6.2", - "dev": true, - "peer": true - }, - "node-releases": { - "version": "2.0.1", - "dev": true, - "peer": true - }, "once": { "version": "1.4.0", "dev": true, @@ -3290,11 +2253,6 @@ "version": "2.0.0", "dev": true }, - "picocolors": { - "version": "1.0.0", - "dev": true, - "peer": true - }, "picomatch": { "version": "2.3.0", "dev": true @@ -3317,14 +2275,6 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, - "randombytes": { - "version": "2.1.0", - "dev": true, - "peer": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, "regexpp": { "version": "3.2.0", "dev": true @@ -3355,21 +2305,6 @@ "queue-microtask": "^1.2.2" } }, - "safe-buffer": { - "version": "5.2.1", - "dev": true, - "peer": true - }, - "schema-utils": { - "version": "3.1.1", - "dev": true, - "peer": true, - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - }, "semver": { "version": "7.3.5", "dev": true, @@ -3377,14 +2312,6 @@ "lru-cache": "^6.0.0" } }, - "serialize-javascript": { - "version": "6.0.0", - "dev": true, - "peer": true, - "requires": { - "randombytes": "^2.1.0" - } - }, "shebang-command": { "version": "2.0.0", "dev": true, @@ -3430,39 +2357,6 @@ "has-flag": "^4.0.0" } }, - "tapable": { - "version": "2.2.1", - "dev": true - }, - "terser": { - "version": "5.9.0", - "dev": true, - "peer": true, - "requires": { - "commander": "^2.20.0", - "source-map": "~0.7.2", - "source-map-support": "~0.5.20" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "dev": true, - "peer": true - } - } - }, - "terser-webpack-plugin": { - "version": "5.2.5", - "dev": true, - "peer": true, - "requires": { - "jest-worker": "^27.0.6", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "source-map": "^0.6.1", - "terser": "^5.7.2" - } - }, "text-table": { "version": "0.2.0", "dev": true @@ -3474,38 +2368,6 @@ "is-number": "^7.0.0" } }, - "ts-loader": { - "version": "9.2.6", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "enhanced-resolve": "^5.0.0", - "micromatch": "^4.0.0", - "semver": "^7.3.4" - } - }, - "ts-node": { - "version": "10.4.0", - "requires": { - "@cspotcode/source-map-support": "0.7.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "yn": "3.1.1" - }, - "dependencies": { - "diff": { - "version": "4.0.2" - } - } - }, "tslib": { "version": "1.14.1", "dev": true @@ -3531,7 +2393,8 @@ "typescript": { "version": "4.5.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", - "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==" + "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", + "dev": true }, "uri-js": { "version": "4.4.1", @@ -3544,51 +2407,6 @@ "version": "2.3.0", "dev": true }, - "watchpack": { - "version": "2.2.0", - "dev": true, - "peer": true, - "requires": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - } - }, - "webpack": { - "version": "5.62.1", - "dev": true, - "peer": true, - "requires": { - "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.50", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.8.3", - "es-module-lexer": "^0.9.0", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.4", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.2.0", - "webpack-sources": "^3.2.0" - } - }, - "webpack-sources": { - "version": "3.2.1", - "dev": true, - "peer": true - }, "which": { "version": "2.0.2", "dev": true, @@ -3607,9 +2425,6 @@ "yallist": { "version": "4.0.0", "dev": true - }, - "yn": { - "version": "3.1.1" } } } diff --git a/package.json b/package.json index 8529e1e40e..d3e24a0160 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,7 @@ "dependencies": { "binaryen": "102.0.0-nightly.20211118", "long": "^5.1.0", - "source-map-support": "^0.5.20", - "ts-node": "^10.4.0" + "source-map-support": "^0.5.20" }, "devDependencies": { "@types/node": "^16.11.6", @@ -36,8 +35,6 @@ "glob": "^7.2.0", "mkdirp": "^1.0.4", "physical-cpu-count": "^2.0.0", - "ts-loader": "^9.2.6", - "ts-node": "^10.4.0", "typescript": "~4.5.2" }, "type": "module", From 83b659f30e147c0f8becd6fc56daa7c3ddd0b280 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 26 Nov 2021 20:54:26 +0100 Subject: [PATCH 003/175] various fixes --- .github/workflows/test.yml | 42 +++++++++---------------------- cli/util/browser/process.js | 6 +++++ package.json | 3 +-- src/module.ts | 11 ++------ tests/asconfig/index.js | 11 +++++--- tests/asconfig/package.json | 1 + tests/packages/package.json | 1 + tests/packages/packages/g/test.js | 2 +- tests/parser.js | 20 +++++++-------- 9 files changed, 41 insertions(+), 56 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d1de8c02a..396c71bf15 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,17 +34,11 @@ jobs: node-version: ${{ matrix.node_version }} - name: Install dependencies run: npm ci --no-audit - - name: Clean distribution files - run: npm run clean - - name: Check sources - run: npm run check - - name: Test sources - run: npm test - - name: Build distribution files + - name: Build run: npm run build - - name: Update entry file - run: npm run prepare-ci - - name: Test distribution + - name: Check + run: npm run check + - name: Test run: npm test - name: Test browser build run: node tests/browser-asc @@ -59,15 +53,9 @@ jobs: node-version: current - name: Install dependencies run: npm ci --no-audit - - name: Clean distribution files - run: npm run clean - - name: Test sources - run: npm test - - name: Build distribution files + - name: Build run: npm run build - - name: Update entry file - run: npm run prepare-ci - - name: Test distribution + - name: Test run: npm test - name: Test browser build run: node tests/browser-asc @@ -82,15 +70,9 @@ jobs: node-version: current - name: Install dependencies run: npm ci --no-audit - - name: Clean distribution files - run: npm run clean - - name: Test sources - run: npm test - - name: Build distribution files + - name: Build run: npm run build - - name: Update entry file - run: npm run prepare-ci - - name: Test distribution + - name: Test run: npm test - name: Test browser build run: node tests/browser-asc @@ -105,8 +87,8 @@ jobs: node-version: current - name: Install dependencies run: npm ci --no-audit - - name: Clean distribution files - run: npm run clean + - name: Build + run: npm run build - name: Bootstrap the compiler run: npm run bootstrap - name: Run compiler tests (untouched-bootstrap) @@ -125,8 +107,8 @@ jobs: node-version: 18.0.0-v8-canary20211115037fd7ae8d - name: Install dependencies run: npm ci --no-audit - - name: Clean distribution files - run: npm run clean + - name: Build + run: npm run build - name: Test experimental features env: ASC_FEATURES: threads,reference-types,bigint-integration,gc diff --git a/cli/util/browser/process.js b/cli/util/browser/process.js index 99d54a26f7..0d59333fd4 100644 --- a/cli/util/browser/process.js +++ b/cli/util/browser/process.js @@ -40,6 +40,12 @@ export function exit(code = 0) { // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +/* global globalThis */ + +if (typeof globalThis === "undefined") { + globalThis = typeof global !== "undefined" ? global : window; // eslint-disable-line no-global-assign +} + var performance = globalThis.performance || {}; var performanceNow = performance.now || diff --git a/package.json b/package.json index d3e24a0160..a74b66c7ac 100644 --- a/package.json +++ b/package.json @@ -63,10 +63,9 @@ "asinit": "bin/asinit.js" }, "scripts": { - "build": "npm run build:lib && npm run build:dts && npm run build:sdk", + "build": "npm run build:lib && npm run build:dts", "build:lib": "node scripts/build", "build:dts": "node scripts/build-dts", - "build:sdk": "node scripts/build-sdk", "watch": "node scripts/build --watch", "clean": "node scripts/clean", "check": "npm run check:config && npm run check:import && npm run check:lint", diff --git a/src/module.ts b/src/module.ts index 65bb3b4f8d..e4daa5f252 100644 --- a/src/module.ts +++ b/src/module.ts @@ -2619,15 +2619,8 @@ export function expandType(type: TypeRef): TypeRef[] { var cArr = binaryen._malloc(arity << 2); binaryen._BinaryenTypeExpand(type, cArr); var types = new Array(arity); - if (!ASC_TARGET) { - let ptr = cArr >>> 2; - for (let i: u32 = 0; i < arity; ++i) { - types[i] = binaryen.HEAPU32[ptr + i]; - } - } else { - for (let i: u32 = 0; i < arity; ++i) { - types[i] = binaryen.__i32_load(cArr + (i << 2)); - } + for (let i: u32 = 0; i < arity; ++i) { + types[i] = binaryen.__i32_load(cArr + (i << 2)); } binaryen._free(cArr); return types; diff --git a/tests/asconfig/index.js b/tests/asconfig/index.js index b323e34b96..7626e80a41 100644 --- a/tests/asconfig/index.js +++ b/tests/asconfig/index.js @@ -1,8 +1,11 @@ -const asc = require("../../cli/asc"); -const loader = require("../../lib/loader/umd"); +import path from "path"; +import fs from "fs"; +import { createRequire } from "module"; +import * as asc from "../../cli/asc.js"; +import loader from "../../lib/loader/index.js"; + +const require = createRequire(import.meta.url); const args = process.argv.slice(2); -const path = require('path'); -const fs = require("fs"); /** @type {string} */ let stderr; diff --git a/tests/asconfig/package.json b/tests/asconfig/package.json index 1c6818ce3b..7fa748c1cb 100644 --- a/tests/asconfig/package.json +++ b/tests/asconfig/package.json @@ -1,4 +1,5 @@ { + "type": "module", "private": true, "scripts": { "test": "npm run test:use-consts && npm run test:target && npm run test:entry-points && npm run test:complicated && npm run test:extends", diff --git a/tests/packages/package.json b/tests/packages/package.json index 0ae45ee9c8..8f58bd6be2 100644 --- a/tests/packages/package.json +++ b/tests/packages/package.json @@ -1,4 +1,5 @@ { + "type": "module", "scripts": { "test": "npm run a && npm run b && npm run c && npm run d && npm run e && npm run f && npm run g && npm run as && npm run h", "a": "cd ./packages/a && node ../../../../bin/asc assembly/index.ts --noEmit", diff --git a/tests/packages/packages/g/test.js b/tests/packages/packages/g/test.js index 01eb5232ae..383ec3531c 100644 --- a/tests/packages/packages/g/test.js +++ b/tests/packages/packages/g/test.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -const asc = require("../../../../cli/asc"); +import * as asc from "../../../../cli/asc.js"; const stderr = asc.createMemoryStream(); asc.main([ diff --git a/tests/parser.js b/tests/parser.js index 65046119d4..eb580a5f7e 100644 --- a/tests/parser.js +++ b/tests/parser.js @@ -3,9 +3,9 @@ import path from "path"; import os from "os"; import { fileURLToPath } from "url"; import glob from "glob"; -import colorsUtil from "../cli/util/colors.js"; -import optionsUtil from "../cli/util/options.js"; import diff from "./util/diff.js"; +import * as colorsUtil from "../cli/util/colors.js"; +import * as optionsUtil from "../cli/util/options.js"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); @@ -29,10 +29,10 @@ const argv = opts.arguments; if (args.help) { console.log([ - colorsUtil.white("SYNTAX"), - " " + colorsUtil.cyan("npm run test:parser --") + " [test1, test2 ...] [options]", + colorsUtil.stdout.white("SYNTAX"), + " " + colorsUtil.stdout.cyan("npm run test:parser --") + " [test1, test2 ...] [options]", "", - colorsUtil.white("OPTIONS"), + colorsUtil.stdout.white("OPTIONS"), optionsUtil.help(config) ].join(os.EOL) + os.EOL); process.exit(0); @@ -59,7 +59,7 @@ var failures = 0; tests.forEach(filename => { if (filename.charAt(0) == "_" || filename.endsWith(".fixture.ts")) return; - console.log(colorsUtil.white("Testing parser/" + filename)); + console.log(colorsUtil.stdout.white("Testing parser/" + filename)); var failed = false; var program = new Program(new Options()); @@ -79,9 +79,9 @@ tests.forEach(filename => { if (diffs !== null) { failed = true; console.log(diffs); - console.log(colorsUtil.red("diff ERROR")); + console.log(colorsUtil.stdout.red("diff ERROR")); } else { - console.log(colorsUtil.green("diff OK")); + console.log(colorsUtil.stdout.green("diff OK")); } } @@ -91,7 +91,7 @@ tests.forEach(filename => { if (failures) { process.exitCode = 1; - console.log(colorsUtil.red("ERROR: ") + failures + " parser tests failed"); + console.log(colorsUtil.stdout.red("ERROR: ") + failures + " parser tests failed"); } else { - console.log("[ " + colorsUtil.white("SUCCESS") + " ]"); + console.log("[ " + colorsUtil.stdout.white("SUCCESS") + " ]"); } From 14eedb6d8a062943f60b63b6c411588f951b71b5 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 26 Nov 2021 23:06:57 +0100 Subject: [PATCH 004/175] update allocator and loader tests --- .github/workflows/test.yml | 8 +- lib/loader/tests/build/default.wasm | Bin 12096 -> 12104 bytes lib/loader/tests/build/legacy.wasm | Bin 12096 -> 12104 bytes tests/allocators/default/optimized.wat | 1518 +++++++++++++++++------- tests/allocators/default/package.json | 1 + tests/allocators/default/untouched.wat | 303 +++-- tests/allocators/forever.js | 2 +- tests/allocators/index.js | 12 +- tests/allocators/package.json | 1 + tests/allocators/runner.js | 2 +- tests/allocators/stub/optimized.wat | 1139 +++++++++++++++--- tests/allocators/stub/package.json | 1 + tests/allocators/stub/untouched.wat | 34 +- 13 files changed, 2238 insertions(+), 783 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 396c71bf15..b91e36b267 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -125,8 +125,8 @@ jobs: node-version: current - name: Install dependencies run: npm ci --no-audit - - name: Clean distribution files - run: npm run clean + - name: Build + run: npm run build - name: Test default allocator run: | cd tests/allocators/default @@ -150,8 +150,8 @@ jobs: node-version: current - name: Install dependencies run: npm ci --no-audit - - name: Clean distribution files - run: npm run clean + - name: Build + run: npm run build - name: Test the loader run: | cd lib/loader diff --git a/lib/loader/tests/build/default.wasm b/lib/loader/tests/build/default.wasm index b105c1038df01f7ed7131609a0cb046f0d3d536e..6412bfa1146ae8ddb03dd0ddf486f9993eedce1d 100644 GIT binary patch delta 1655 zcma)5QHxte6rMBp-Za}uHsjtTO>P!DlbNJ;SrOT~S`d>dZqgJ{=tC)pg#}w_(l?6; z74PC7uyUXL1s1dj-bWF9lKQqU;)9PB`XVSk_#lXWb2nKRwt;0~PVUZkzWL5~&iVev zqZ{{s3x1&fXTM*qGRH*99QlK119~m+@g6zS`FHeysGHvk0;2tF8h%J;vd7`4)XUzF z#?;NejXt7Q_DbpOT1zM1b-3LTnOGjn%}5!BCOu zgY~QFx;7B zN0VvE)0!1(QQKH^#k~aE!n;Dz*ncRJRZju|^(mNkeYGF~1i2LwLL9zP(0Q9+44{o; z{Mqj6`9Vi>sOczf+lp)g2T$9UoC)+ckD`)dF{a9!o;RNL!8_J zB;Tz~f|bK2<@ws56abJtsO!~^N#q(@!)0@78>mK-;0<0Sh@uT)tO)E0zij z^P%YeF)HQLFt?%iqi{lzSPpyfD6EUk^ht~Q=UgbEH0Kiibm@y*C!@Nspn7f@6W+VE zw8*q*`=ZL1j=s6P%I%ZEE}j6E!rNDm;+C8C`l8Z}<&|QocXTiZssO97qy+%J;b8%0 KC?9S79sUQm*8v&; delta 1590 zcma)5&ud&o9G~xdZ?~JwZg#S}Z+~@7W_Bit#;BC&N}-aSU=p_!Ed@a+tq7vB8+wo` zBH9gJya-z6rhkB5dhwll>%l_~g7vPqfF6`uFNz@enU~#kOR`vayx}pQ`ON3@`F`I1 z)jLI4wpDFA>dHWrb=gwilsR9cV5p^{pc{52X_ef`Ue188 zmH(F-u35O!QN5^JAYJ0b z#^wRr`x@xJna8mr=4RP>MUo24`vMG`TIl%!*52+REP1cE9nKuhB>ArNCxyVc+Z8oe z*ELbXBmz344qM@%Oy+O88|@Tp+GS>Pu%Nj z4Kw^qU7C|Q86kR^mC-;v?GDsy)Jk4x|3cJqOXeli@S0hF(sSTEiE;+7BKnj{;rvx1 zAB*>XK0?!U$$f7c2A?}VWi(4S(>Wf`B$-|Mgq~_~!#0=|*R>j0dLL2UB{5?v_7A^Q z?Ouqb&Kpciz36T)pKeGS4U80TaxE?E1PpVzn?c{C`+a%+3GDWb;#bv5hEeP z`z!UKv>3aT5${bCGLm8Qb_N9Ai01@@4aD2&w`3fBK9ab6j7j=asBYxlr@kfe6gGUw z`WSa+64%DRIhoH01P9p>*&)?QAhG^GOhc~=RL_p79-k&2ptl~)<#UsFP7kBwVZ(>g vIMKq{N25D837ekTi({j!snOnv$>P7=QsD?GLo|QN2mrh=f+a7n{uBKN_J93r diff --git a/lib/loader/tests/build/legacy.wasm b/lib/loader/tests/build/legacy.wasm index b105c1038df01f7ed7131609a0cb046f0d3d536e..6412bfa1146ae8ddb03dd0ddf486f9993eedce1d 100644 GIT binary patch delta 1655 zcma)5QHxte6rMBp-Za}uHsjtTO>P!DlbNJ;SrOT~S`d>dZqgJ{=tC)pg#}w_(l?6; z74PC7uyUXL1s1dj-bWF9lKQqU;)9PB`XVSk_#lXWb2nKRwt;0~PVUZkzWL5~&iVev zqZ{{s3x1&fXTM*qGRH*99QlK119~m+@g6zS`FHeysGHvk0;2tF8h%J;vd7`4)XUzF z#?;NejXt7Q_DbpOT1zM1b-3LTnOGjn%}5!BCOu zgY~QFx;7B zN0VvE)0!1(QQKH^#k~aE!n;Dz*ncRJRZju|^(mNkeYGF~1i2LwLL9zP(0Q9+44{o; z{Mqj6`9Vi>sOczf+lp)g2T$9UoC)+ckD`)dF{a9!o;RNL!8_J zB;Tz~f|bK2<@ws56abJtsO!~^N#q(@!)0@78>mK-;0<0Sh@uT)tO)E0zij z^P%YeF)HQLFt?%iqi{lzSPpyfD6EUk^ht~Q=UgbEH0Kiibm@y*C!@Nspn7f@6W+VE zw8*q*`=ZL1j=s6P%I%ZEE}j6E!rNDm;+C8C`l8Z}<&|QocXTiZssO97qy+%J;b8%0 KC?9S79sUQm*8v&; delta 1590 zcma)5&ud&o9G~xdZ?~JwZg#S}Z+~@7W_Bit#;BC&N}-aSU=p_!Ed@a+tq7vB8+wo` zBH9gJya-z6rhkB5dhwll>%l_~g7vPqfF6`uFNz@enU~#kOR`vayx}pQ`ON3@`F`I1 z)jLI4wpDFA>dHWrb=gwilsR9cV5p^{pc{52X_ef`Ue188 zmH(F-u35O!QN5^JAYJ0b z#^wRr`x@xJna8mr=4RP>MUo24`vMG`TIl%!*52+REP1cE9nKuhB>ArNCxyVc+Z8oe z*ELbXBmz344qM@%Oy+O88|@Tp+GS>Pu%Nj z4Kw^qU7C|Q86kR^mC-;v?GDsy)Jk4x|3cJqOXeli@S0hF(sSTEiE;+7BKnj{;rvx1 zAB*>XK0?!U$$f7c2A?}VWi(4S(>Wf`B$-|Mgq~_~!#0=|*R>j0dLL2UB{5?v_7A^Q z?Ouqb&Kpciz36T)pKeGS4U80TaxE?E1PpVzn?c{C`+a%+3GDWb;#bv5hEeP z`z!UKv>3aT5${bCGLm8Qb_N9Ai01@@4aD2&w`3fBK9ab6j7j=asBYxlr@kfe6gGUw z`WSa+64%DRIhoH01P9p>*&)?QAhG^GOhc~=RL_p79-k&2ptl~)<#UsFP7kBwVZ(>g vIMKq{N25D837ekTi({j!snOnv$>P7=QsD?GLo|QN2mrh=f+a7n{uBKN_J93r diff --git a/tests/allocators/default/optimized.wat b/tests/allocators/default/optimized.wat index 521cabbb5e..c11d48d0eb 100644 --- a/tests/allocators/default/optimized.wat +++ b/tests/allocators/default/optimized.wat @@ -1,23 +1,23 @@ (module - (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 1036) "<") - (data (i32.const 1048) "\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 1048) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") (data (i32.const 1100) "<") (data (i32.const 1112) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 1164) "<") (data (i32.const 1176) "\01\00\00\00\1e\00\00\00N\00o\00t\00 \00i\00m\00p\00l\00e\00m\00e\00n\00t\00e\00d") (data (i32.const 1228) ",") (data (i32.const 1240) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (export "heap.alloc" (func $~lib/memory/heap.alloc)) (export "heap.realloc" (func $~lib/memory/heap.realloc)) (export "heap.free" (func $~lib/memory/heap.free)) @@ -32,99 +32,104 @@ i32.load i32.const -4 i32.and - local.tee $2 + local.tee $3 i32.const 256 i32.lt_u - if - local.get $2 + if (result i32) + local.get $3 i32.const 4 i32.shr_u - local.set $3 else - local.get $2 i32.const 31 - local.get $2 + local.get $3 + i32.const 1073741820 + local.get $3 + i32.const 1073741820 + i32.lt_u + select + local.tee $3 i32.clz i32.sub - local.tee $2 + local.tee $4 + i32.const 7 + i32.sub + local.set $2 + local.get $3 + local.get $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $3 - local.get $2 - i32.const 7 - i32.sub - local.set $4 end + local.set $3 local.get $1 i32.load offset=8 - local.set $2 + local.set $4 local.get $1 i32.load offset=4 local.tee $5 if local.get $5 - local.get $2 + local.get $4 i32.store offset=8 end - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $5 i32.store offset=4 end - local.get $1 - local.get $0 local.get $3 - local.get $4 + local.get $2 i32.const 4 i32.shl i32.add i32.const 2 i32.shl + local.get $0 i32.add i32.load offset=96 + local.get $1 i32.eq if - local.get $0 local.get $3 - local.get $4 + local.get $2 i32.const 4 i32.shl i32.add i32.const 2 i32.shl + local.get $0 i32.add - local.get $2 + local.get $4 i32.store offset=96 - local.get $2 + local.get $4 i32.eqz if - local.get $0 - local.get $4 + local.get $2 i32.const 2 i32.shl + local.get $0 i32.add - local.tee $2 + local.tee $1 i32.load offset=4 i32.const -2 local.get $3 i32.rotl i32.and - local.set $1 - local.get $2 + local.set $3 local.get $1 + local.get $3 i32.store offset=4 - local.get $1 + local.get $3 i32.eqz if local.get $0 local.get $0 i32.load i32.const -2 - local.get $4 + local.get $2 i32.rotl i32.and i32.store @@ -138,28 +143,26 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.load - local.set $4 local.get $1 i32.const 4 i32.add local.get $1 i32.load + local.tee $3 i32.const -4 i32.and i32.add - local.tee $5 + local.tee $4 i32.load local.tee $2 i32.const 1 i32.and if + local.get $0 local.get $4 - i32.const -4 - i32.and + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $3 i32.const 4 i32.add local.get $2 @@ -167,34 +170,20 @@ i32.and i32.add local.tee $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $5 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $3 - local.get $4 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $5 - i32.load - local.set $2 - end + i32.store + local.get $1 + i32.const 4 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + i32.load + local.set $2 end - local.get $4 + local.get $3 i32.const 2 i32.and if @@ -202,106 +191,97 @@ i32.const 4 i32.sub i32.load - local.tee $3 + local.tee $1 i32.load - local.tee $7 - i32.const -4 - i32.and + local.set $6 + local.get $0 + local.get $1 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $6 i32.const 4 i32.add - local.get $4 + local.get $3 i32.const -4 i32.and i32.add - local.tee $8 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $3 - local.get $8 - local.get $7 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $3 - local.set $1 - end + local.tee $3 + i32.store end - local.get $5 + local.get $4 local.get $2 i32.const 2 i32.or i32.store - local.get $5 + local.get $4 i32.const 4 i32.sub local.get $1 i32.store - local.get $4 + local.get $3 i32.const -4 i32.and - local.tee $3 + local.tee $2 i32.const 256 i32.lt_u - if - local.get $3 + if (result i32) + local.get $2 i32.const 4 i32.shr_u - local.set $3 else - local.get $3 i32.const 31 - local.get $3 + local.get $2 + i32.const 1073741820 + local.get $2 + i32.const 1073741820 + i32.lt_u + select + local.tee $2 i32.clz i32.sub - local.tee $4 + local.tee $3 + i32.const 7 + i32.sub + local.set $5 + local.get $2 + local.get $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $3 - local.get $4 - i32.const 7 - i32.sub - local.set $6 end - local.get $0 - local.get $3 - local.get $6 + local.tee $2 + local.get $5 i32.const 4 i32.shl i32.add i32.const 2 i32.shl + local.get $0 i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=4 local.get $1 - local.get $4 + local.get $3 i32.store offset=8 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=4 end - local.get $0 - local.get $3 - local.get $6 + local.get $2 + local.get $5 i32.const 4 i32.shl i32.add i32.const 2 i32.shl + local.get $0 i32.add local.get $1 i32.store offset=96 @@ -309,26 +289,34 @@ local.get $0 i32.load i32.const 1 - local.get $6 + local.get $5 i32.shl i32.or i32.store - local.get $0 - local.get $6 + local.get $5 i32.const 2 i32.shl + local.get $0 i32.add local.tee $0 local.get $0 i32.load offset=4 i32.const 1 - local.get $3 + local.get $2 i32.shl i32.or i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + local.get $2 + i32.const -16 + i32.and + local.get $0 + i32.load offset=1568 + local.tee $2 + i32.const 0 + local.get $2 local.get $1 i32.const 19 i32.add @@ -336,28 +324,19 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 - i32.const -16 - i32.and - local.get $0 - i32.load offset=1568 - local.tee $2 + local.tee $1 + i32.const 16 + i32.sub + i32.eq + select if local.get $2 + i32.load + local.set $3 local.get $1 i32.const 16 i32.sub - i32.eq - if - local.get $2 - i32.load - local.set $3 - local.get $1 - i32.const 16 - i32.sub - local.set $1 - end + local.set $1 end local.get $1 i32.sub @@ -404,12 +383,12 @@ (local $0 i32) (local $1 i32) memory.size - local.tee $0 - i32.const 1 - i32.lt_s + local.tee $1 + i32.const 0 + i32.le_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -420,74 +399,74 @@ if unreachable end - i32.const 1280 + i32.const 17664 i32.const 0 i32.store - i32.const 2848 + i32.const 19232 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl - i32.const 1280 + i32.const 17664 i32.add i32.const 0 i32.store offset=4 i32.const 0 - local.set $0 + local.set $1 loop $for-loop|1 - local.get $0 + local.get $1 i32.const 16 i32.lt_u if - local.get $0 local.get $1 + local.get $0 i32.const 4 i32.shl i32.add i32.const 2 i32.shl - i32.const 1280 + i32.const 17664 i32.add i32.const 0 i32.store offset=96 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end - i32.const 1280 - i32.const 2852 + i32.const 17664 + i32.const 19236 memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory - i32.const 1280 + i32.const 17664 global.set $~lib/rt/tlsf/ROOT ) (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) local.get $0 i32.const 1073741820 - i32.ge_u + i32.gt_u if i32.const 1056 i32.const 1120 - i32.const 461 - i32.const 30 + i32.const 458 + i32.const 29 call $~lib/builtins/abort unreachable end @@ -506,23 +485,23 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u - if + if (result i32) local.get $1 i32.const 4 i32.shr_u - local.set $1 else i32.const 31 - local.get $1 i32.const 1 i32.const 27 local.get $1 i32.clz i32.sub i32.shl + local.get $1 i32.add i32.const 1 i32.sub @@ -534,24 +513,23 @@ local.tee $1 i32.clz i32.sub + local.tee $3 + i32.const 7 + i32.sub local.set $2 local.get $1 - local.get $2 + local.get $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $1 - local.get $2 - i32.const 7 - i32.sub - local.set $2 end - local.get $0 + local.set $1 local.get $2 i32.const 2 i32.shl + local.get $0 i32.add i32.load offset=4 i32.const -1 @@ -560,7 +538,6 @@ i32.and local.tee $1 if (result i32) - local.get $0 local.get $1 i32.ctz local.get $2 @@ -569,6 +546,7 @@ i32.add i32.const 2 i32.shl + local.get $0 i32.add i32.load offset=96 else @@ -583,18 +561,18 @@ local.tee $1 if (result i32) local.get $0 - local.get $1 - i32.ctz - local.tee $1 - i32.const 4 - i32.shl local.get $0 local.get $1 + i32.ctz + local.tee $0 i32.const 2 i32.shl i32.add i32.load offset=4 i32.ctz + local.get $0 + i32.const 4 + i32.shl i32.add i32.const 2 i32.shl @@ -620,10 +598,10 @@ i32.ge_u if local.get $1 - local.get $2 local.get $3 i32.const 2 i32.and + local.get $2 i32.or i32.store local.get $2 @@ -650,18 +628,13 @@ local.get $1 i32.const 4 i32.add - local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add + local.tee $0 local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add i32.load i32.const -3 i32.and @@ -679,18 +652,18 @@ local.tee $1 i32.eqz if - i32.const 4 memory.size - local.tee $1 + local.tee $3 + i32.const 4 + local.get $0 + i32.load offset=1568 + local.get $3 i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl - local.get $2 i32.const 1 i32.const 27 local.get $2 @@ -699,6 +672,7 @@ i32.shl i32.const 1 i32.sub + local.get $2 i32.add local.get $2 local.get $2 @@ -712,18 +686,16 @@ i32.and i32.const 16 i32.shr_u - local.set $3 - local.get $1 - local.get $3 + local.tee $1 local.get $1 local.get $3 - i32.gt_s + i32.lt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -732,7 +704,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -768,153 +740,849 @@ i32.const 4 i32.add ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 4 - i32.sub - local.set $1 + (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + loop $while-continue|0 + local.get $1 + i32.const 3 + i32.and + i32.const 0 + local.get $2 + select + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end local.get $0 - i32.const 15 + i32.const 3 i32.and i32.eqz - i32.const 0 - local.get $0 - select if - local.get $1 - i32.load - drop - end - local.get $1 - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 + loop $while-continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + local.get $1 + i32.load offset=4 + i32.store offset=4 + local.get $0 + local.get $1 + i32.load offset=8 + i32.store offset=8 + local.get $0 + local.get $1 + i32.load offset=12 + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $while-continue|1 + end + end local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.lt_u + i32.const 8 + i32.and if + local.get $0 local.get $1 - i32.const 7 - i32.and + i32.load + i32.store local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 + local.get $1 + i32.load offset=4 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 8 + i32.add + local.set $0 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.add + local.set $0 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.add + local.set $1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 + i32.const 3 + i32.and i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + br_table $case0|2 $case1|2 $case2|2 $break|2 end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $1 + i32.load + local.set $5 local.get $0 - local.tee $2 - i32.const 1 - i32.add + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $3 + i32.const 1 + i32.add local.set $0 local.get $1 + i32.const 2 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + loop $while-continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load offset=1 + local.tee $3 + i32.const 8 + i32.shl + local.get $5 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + local.get $1 + i32.load offset=5 + local.tee $4 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store offset=4 + local.get $0 + local.get $1 + i32.load offset=9 + local.tee $3 + i32.const 8 + i32.shl + local.get $4 + i32.const 24 + i32.shr_u + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.load offset=13 + local.tee $5 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $while-continue|3 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + local.tee $3 + i32.const 2 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 2 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + loop $while-continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load offset=2 + local.tee $3 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + local.get $1 + i32.load offset=6 + local.tee $4 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store offset=4 + local.get $0 + local.get $1 + i32.load offset=10 + local.tee $3 + i32.const 16 + i32.shl + local.get $4 + i32.const 16 + i32.shr_u + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.load offset=14 + local.tee $5 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $while-continue|4 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load offset=3 local.tee $3 + i32.const 24 + i32.shl + local.get $5 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + local.get $1 + i32.load offset=7 + local.tee $4 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store offset=4 + local.get $0 + local.get $1 + i32.load offset=11 + local.tee $3 + i32.const 24 + i32.shl + local.get $4 + i32.const 8 + i32.shr_u + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.load offset=15 + local.tee $5 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $while-continue|5 + end + end + end + end + local.get $2 + i32.const 16 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $3 + i32.load8_u + i32.store8 + local.get $3 + i32.const 2 + i32.add + local.set $1 + local.get $0 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $3 + i32.load8_u + i32.store8 + local.get $3 + i32.const 2 + i32.add + local.set $1 + local.get $0 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $3 + i32.load8_u + i32.store8 + local.get $3 + i32.const 2 + i32.add + local.set $1 + local.get $0 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + local.tee $3 + i32.const 2 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 2 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u offset=1 + i32.store8 offset=1 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + ) + (func $~lib/rt/tlsf/moveBlock (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.get $0 + local.get $2 + call $~lib/rt/tlsf/allocateBlock + local.set $6 + local.get $1 + i32.load + i32.const -4 + i32.and + local.set $7 + block $~lib/util/memory/memmove|inlined.0 + local.get $6 + i32.const 4 + i32.add + local.tee $2 + local.get $1 + i32.const 4 + i32.add + local.tee $3 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $3 + local.get $2 + i32.sub + local.get $7 + i32.sub + i32.const 0 + local.get $7 + i32.const 1 + i32.shl + i32.sub + i32.le_u + if + local.get $2 + local.get $3 + local.get $7 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + local.get $3 + i32.lt_u + if + local.get $3 + i32.const 7 + i32.and + local.get $2 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|0 + local.get $2 + i32.const 7 + i32.and + if + local.get $7 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $7 + i32.const 1 + i32.sub + local.set $7 + local.get $2 + local.tee $4 + i32.const 1 + i32.add + local.set $2 + local.get $3 + local.tee $5 + i32.const 1 + i32.add + local.set $3 + local.get $4 + local.get $5 + i32.load8_u + i32.store8 + br $while-continue|0 + end + end + loop $while-continue|1 + local.get $7 + i32.const 8 + i32.ge_u + if + local.get $2 + local.get $3 + i64.load + i64.store + local.get $7 + i32.const 8 + i32.sub + local.set $7 + local.get $2 + i32.const 8 + i32.add + local.set $2 + local.get $3 + i32.const 8 + i32.add + local.set $3 + br $while-continue|1 + end + end + end + loop $while-continue|2 + local.get $7 + if + local.get $2 + local.tee $4 i32.const 1 i32.add - local.set $1 - local.get $2 + local.set $2 local.get $3 + local.tee $5 + i32.const 1 + i32.add + local.set $3 + local.get $4 + local.get $5 i32.load8_u i32.store8 - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 + local.set $7 br $while-continue|2 end end else - local.get $1 + local.get $3 i32.const 7 i32.and - local.get $0 + local.get $2 i32.const 7 i32.and i32.eq if loop $while-continue|3 - local.get $0 - local.get $4 + local.get $2 + local.get $7 i32.add i32.const 7 i32.and if - local.get $4 + local.get $7 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 + local.get $7 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $7 + local.get $2 i32.add - local.get $1 - local.get $4 + local.get $3 + local.get $7 i32.add i32.load8_u i32.store8 @@ -922,18 +1590,18 @@ end end loop $while-continue|4 - local.get $4 + local.get $7 i32.const 8 i32.ge_u if - local.get $4 + local.get $7 i32.const 8 i32.sub - local.tee $4 - local.get $0 + local.tee $7 + local.get $2 i32.add - local.get $1 - local.get $4 + local.get $3 + local.get $7 i32.add i64.load i64.store @@ -942,16 +1610,16 @@ end end loop $while-continue|5 - local.get $4 + local.get $7 if - local.get $4 + local.get $7 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $7 + local.get $2 i32.add - local.get $1 - local.get $4 + local.get $3 + local.get $7 i32.add i32.load8_u i32.store8 @@ -960,42 +1628,21 @@ end end end - ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/tlsf/moveBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $2 - call $~lib/rt/tlsf/allocateBlock - local.tee $2 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - call $~lib/memory/memory.copy local.get $1 - i32.const 1276 + i32.const 17660 i32.ge_u if + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock end - local.get $2 + local.get $6 ) (func $~lib/memory/heap.realloc (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1010,92 +1657,129 @@ call $~lib/rt/tlsf/initialize end local.get $0 - i32.const 1276 + i32.const 17660 i32.lt_u - if - global.get $~lib/rt/tlsf/ROOT + if (result i32) + local.get $0 + i32.const 4 + i32.sub + local.set $2 + local.get $0 + i32.const 15 + i32.and + i32.const 1 local.get $0 - call $~lib/rt/tlsf/checkUsedBlock + select + if (result i32) + i32.const 1 + else + local.get $2 + i32.load + i32.const 1 + i32.and + end + drop + global.get $~lib/rt/tlsf/ROOT + local.get $2 local.get $1 call $~lib/rt/tlsf/moveBlock - local.set $0 else - block $__inlined_func$~lib/rt/tlsf/reallocateBlock - global.get $~lib/rt/tlsf/ROOT + block $__inlined_func$~lib/rt/tlsf/reallocateBlock (result i32) + local.get $0 + i32.const 4 + i32.sub local.set $2 local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.set $0 - block $folding-inner0 - local.get $1 - call $~lib/rt/tlsf/prepareSize - local.tee $4 - local.get $0 + i32.const 15 + i32.and + i32.const 1 + local.get $0 + select + if (result i32) + i32.const 1 + else + local.get $2 i32.load - local.tee $5 - i32.const -4 + i32.const 1 i32.and - local.tee $3 - i32.le_u - br_if $folding-inner0 - local.get $0 + end + drop + global.get $~lib/rt/tlsf/ROOT + local.set $5 + local.get $1 + call $~lib/rt/tlsf/prepareSize + local.tee $3 + local.get $2 + i32.load + local.tee $6 + i32.const -4 + i32.and + local.tee $4 + i32.le_u + if + local.get $5 + local.get $2 + local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $2 + br $__inlined_func$~lib/rt/tlsf/reallocateBlock + end + local.get $2 + i32.const 4 + i32.add + local.get $2 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $0 + i32.load + local.tee $7 + i32.const 1 + i32.and + if + local.get $3 + local.get $4 i32.const 4 i32.add - local.get $0 - i32.load + local.get $7 i32.const -4 i32.and i32.add - local.tee $6 - i32.load - local.tee $7 - i32.const 1 - i32.and + local.tee $4 + i32.le_u if + local.get $5 + local.get $0 + call $~lib/rt/tlsf/removeBlock + local.get $2 local.get $4 - local.get $3 - i32.const 4 - i32.add - local.get $7 - i32.const -4 + local.get $6 + i32.const 3 i32.and - i32.add - local.tee $3 - i32.le_u - if - local.get $2 - local.get $6 - call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $5 - i32.const 3 - i32.and - i32.or - i32.store - br $folding-inner0 - end + i32.or + i32.store + local.get $5 + local.get $2 + local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $2 + br $__inlined_func$~lib/rt/tlsf/reallocateBlock end - local.get $2 - local.get $0 - local.get $1 - call $~lib/rt/tlsf/moveBlock - local.set $0 - br $__inlined_func$~lib/rt/tlsf/reallocateBlock end + local.get $5 local.get $2 - local.get $0 - local.get $4 - call $~lib/rt/tlsf/prepareBlock + local.get $1 + call $~lib/rt/tlsf/moveBlock end end - local.get $0 i32.const 4 i32.add ) (func $~lib/memory/heap.free (param $0 i32) + (local $1 i32) local.get $0 - i32.const 1276 + i32.const 17660 i32.ge_u if global.get $~lib/rt/tlsf/ROOT @@ -1103,16 +1787,40 @@ if call $~lib/rt/tlsf/initialize end - global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock + i32.const 4 + i32.sub + local.set $1 + local.get $0 + i32.const 15 + i32.and + i32.const 1 + local.get $0 + select + if (result i32) + i32.const 1 + else + local.get $1 + i32.load + i32.const 1 + i32.and + end + drop + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store + global.get $~lib/rt/tlsf/ROOT + local.get $1 + call $~lib/rt/tlsf/insertBlock end ) (func $~lib/memory/heap.reset i32.const 1184 i32.const 1248 - i32.const 101 + i32.const 109 i32.const 7 call $~lib/builtins/abort unreachable diff --git a/tests/allocators/default/package.json b/tests/allocators/default/package.json index 8519148c6f..44552fb8b4 100644 --- a/tests/allocators/default/package.json +++ b/tests/allocators/default/package.json @@ -1,5 +1,6 @@ { "private": true, + "type": "module", "scripts": { "build": "npm run build:untouched && npm run build:optimized", "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --sourceMap --measure --debug", diff --git a/tests/allocators/default/untouched.wat b/tests/allocators/default/untouched.wat index b89363a127..c544acfb77 100644 --- a/tests/allocators/default/untouched.wat +++ b/tests/allocators/default/untouched.wat @@ -2,22 +2,25 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/memory/__data_end i32 (i32.const 252)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16636)) + (global $~lib/memory/__heap_base i32 (i32.const 16636)) (memory $0 1) (data (i32.const 12) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 76) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") + (data (i32.const 76) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") (data (i32.const 140) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00N\00o\00t\00 \00i\00m\00p\00l\00e\00m\00e\00n\00t\00e\00d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 204) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") (table $0 1 funcref) - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/memory/__heap_base i32 (i32.const 252)) + (elem $0 (i32.const 1)) (export "heap.alloc" (func $~lib/memory/heap.alloc)) (export "heap.realloc" (func $~lib/memory/heap.realloc)) (export "heap.free" (func $~lib/memory/heap.free)) @@ -66,7 +69,7 @@ if i32.const 0 i32.const 32 - i32.const 272 + i32.const 268 i32.const 14 call $~lib/builtins/abort unreachable @@ -82,18 +85,11 @@ local.get $3 i32.const 12 i32.ge_u - if (result i32) - local.get $3 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end i32.eqz if i32.const 0 i32.const 32 - i32.const 274 + i32.const 270 i32.const 14 call $~lib/builtins/abort unreachable @@ -109,12 +105,21 @@ i32.shr_u local.set $5 else - i32.const 31 local.get $3 + local.tee $6 + i32.const 1073741820 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_u + select + local.set $6 + i32.const 31 + local.get $6 i32.clz i32.sub local.set $4 - local.get $3 + local.get $6 local.get $4 i32.const 4 i32.sub @@ -147,41 +152,41 @@ if i32.const 0 i32.const 32 - i32.const 287 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=4 - local.set $6 + local.set $8 local.get $1 i32.load offset=8 - local.set $7 - local.get $6 + local.set $9 + local.get $8 if - local.get $6 - local.get $7 + local.get $8 + local.get $9 call $~lib/rt/tlsf/Block#set:next end - local.get $7 + local.get $9 if - local.get $7 - local.get $6 + local.get $9 + local.get $8 call $~lib/rt/tlsf/Block#set:prev end local.get $1 local.get $0 local.set $10 local.get $4 - local.set $9 + local.set $6 local.get $5 - local.set $8 + local.set $7 local.get $10 - local.get $9 + local.get $6 i32.const 4 i32.shl - local.get $8 + local.get $7 i32.add i32.const 2 i32.shl @@ -194,55 +199,55 @@ local.get $4 local.set $10 local.get $5 - local.set $9 - local.get $7 - local.set $8 + local.set $6 + local.get $9 + local.set $7 local.get $11 local.get $10 i32.const 4 i32.shl - local.get $9 + local.get $6 i32.add i32.const 2 i32.shl i32.add - local.get $8 - i32.store offset=96 local.get $7 + i32.store offset=96 + local.get $9 i32.eqz if local.get $0 - local.set $9 + local.set $6 local.get $4 - local.set $8 - local.get $9 - local.get $8 + local.set $7 + local.get $6 + local.get $7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $9 + local.set $6 local.get $0 - local.set $8 + local.set $7 local.get $4 local.set $11 - local.get $9 + local.get $6 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 + local.tee $6 local.set $10 - local.get $8 + local.get $7 local.get $11 i32.const 2 i32.shl i32.add local.get $10 i32.store offset=4 - local.get $9 + local.get $6 i32.eqz if local.get $0 @@ -279,7 +284,7 @@ if i32.const 0 i32.const 32 - i32.const 200 + i32.const 201 i32.const 14 call $~lib/builtins/abort unreachable @@ -296,7 +301,7 @@ if i32.const 0 i32.const 32 - i32.const 202 + i32.const 203 i32.const 14 call $~lib/builtins/abort unreachable @@ -321,86 +326,73 @@ i32.const 1 i32.and if + local.get $0 + local.get $4 + call $~lib/rt/tlsf/removeBlock + local.get $1 local.get $2 + i32.const 4 + i32.add + local.get $5 i32.const 3 i32.const -1 i32.xor i32.and + i32.add + local.tee $2 + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $1 + local.set $3 + local.get $3 i32.const 4 i32.add - local.get $5 + local.get $3 + i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $4 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 - i32.const 3 - i32.and - local.get $3 - i32.or - local.tee $2 - call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.add - local.get $6 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - end + local.set $4 + local.get $4 + i32.load + local.set $5 end local.get $2 i32.const 2 i32.and if local.get $1 - local.set $6 - local.get $6 + local.set $3 + local.get $3 i32.const 4 i32.sub i32.load - local.set $6 - local.get $6 - i32.load local.set $3 + local.get $3 + i32.load + local.set $6 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 32 - i32.const 223 + i32.const 221 i32.const 16 call $~lib/builtins/abort unreachable end + local.get $0 local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and + call $~lib/rt/tlsf/removeBlock + local.get $3 + local.set $1 + local.get $1 + local.get $6 i32.const 4 i32.add local.get $2 @@ -409,25 +401,8 @@ i32.xor i32.and i32.add - local.set $7 - local.get $7 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $6 - call $~lib/rt/tlsf/removeBlock - local.get $6 - local.get $3 - i32.const 3 - i32.and - local.get $7 - i32.or - local.tee $2 - call $~lib/rt/common/BLOCK#set:mmInfo - local.get $6 - local.set $1 - end + local.tee $2 + call $~lib/rt/common/BLOCK#set:mmInfo end local.get $4 local.get $5 @@ -439,24 +414,17 @@ i32.const -1 i32.xor i32.and - local.set $8 + local.set $7 i32.const 1 drop - local.get $8 + local.get $7 i32.const 12 i32.ge_u - if (result i32) - local.get $8 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end i32.eqz if i32.const 0 i32.const 32 - i32.const 238 + i32.const 233 i32.const 14 call $~lib/builtins/abort unreachable @@ -466,7 +434,7 @@ local.get $1 i32.const 4 i32.add - local.get $8 + local.get $7 i32.add local.get $4 i32.eq @@ -474,7 +442,7 @@ if i32.const 0 i32.const 32 - i32.const 239 + i32.const 234 i32.const 14 call $~lib/builtins/abort unreachable @@ -484,24 +452,33 @@ i32.sub local.get $1 i32.store - local.get $8 + local.get $7 i32.const 256 i32.lt_u if i32.const 0 - local.set $9 - local.get $8 + local.set $8 + local.get $7 i32.const 4 i32.shr_u - local.set $10 + local.set $9 else + local.get $7 + local.tee $3 + i32.const 1073741820 + local.tee $6 + local.get $3 + local.get $6 + i32.lt_u + select + local.set $3 i32.const 31 - local.get $8 + local.get $3 i32.clz i32.sub - local.set $9 + local.set $8 + local.get $3 local.get $8 - local.get $9 i32.const 4 i32.sub i32.shr_u @@ -509,21 +486,21 @@ i32.const 4 i32.shl i32.xor - local.set $10 - local.get $9 + local.set $9 + local.get $8 i32.const 8 i32.const 1 i32.sub i32.sub - local.set $9 + local.set $8 end i32.const 1 drop - local.get $9 + local.get $8 i32.const 23 i32.lt_u if (result i32) - local.get $10 + local.get $9 i32.const 16 i32.lt_u else @@ -533,18 +510,18 @@ if i32.const 0 i32.const 32 - i32.const 255 + i32.const 251 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 - local.get $9 + local.set $10 + local.get $8 local.set $3 - local.get $10 + local.get $9 local.set $6 - local.get $7 + local.get $10 local.get $3 i32.const 4 i32.shl @@ -569,14 +546,14 @@ end local.get $0 local.set $12 + local.get $8 + local.set $10 local.get $9 - local.set $7 - local.get $10 local.set $3 local.get $1 local.set $6 local.get $12 - local.get $7 + local.get $10 i32.const 4 i32.shl local.get $3 @@ -590,17 +567,17 @@ local.get $0 i32.load i32.const 1 - local.get $9 + local.get $8 i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap local.get $0 local.set $13 - local.get $9 + local.get $8 local.set $12 local.get $0 local.set $3 - local.get $9 + local.get $8 local.set $6 local.get $3 local.get $6 @@ -609,16 +586,16 @@ i32.add i32.load offset=4 i32.const 1 - local.get $10 + local.get $9 i32.shl i32.or - local.set $7 + local.set $10 local.get $13 local.get $12 i32.const 2 i32.shl i32.add - local.get $7 + local.get $10 i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -638,7 +615,7 @@ if i32.const 0 i32.const 32 - i32.const 380 + i32.const 377 i32.const 14 call $~lib/builtins/abort unreachable @@ -681,7 +658,7 @@ if i32.const 0 i32.const 32 - i32.const 387 + i32.const 384 i32.const 16 call $~lib/builtins/abort unreachable @@ -714,7 +691,7 @@ if i32.const 0 i32.const 32 - i32.const 400 + i32.const 397 i32.const 5 call $~lib/builtins/abort unreachable @@ -950,12 +927,12 @@ (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) local.get $0 i32.const 1073741820 - i32.ge_u + i32.gt_u if i32.const 96 i32.const 32 - i32.const 461 - i32.const 30 + i32.const 458 + i32.const 29 call $~lib/builtins/abort unreachable end @@ -1038,7 +1015,7 @@ if i32.const 0 i32.const 32 - i32.const 333 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable @@ -1103,7 +1080,7 @@ if i32.const 0 i32.const 32 - i32.const 346 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable @@ -1254,7 +1231,7 @@ if i32.const 0 i32.const 32 - i32.const 360 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1363,7 +1340,7 @@ if i32.const 0 i32.const 32 - i32.const 499 + i32.const 496 i32.const 16 call $~lib/builtins/abort unreachable @@ -1383,7 +1360,7 @@ if i32.const 0 i32.const 32 - i32.const 501 + i32.const 498 i32.const 14 call $~lib/builtins/abort unreachable @@ -1445,7 +1422,7 @@ if i32.const 0 i32.const 32 - i32.const 564 + i32.const 559 i32.const 3 call $~lib/builtins/abort unreachable @@ -2896,7 +2873,7 @@ drop i32.const 160 i32.const 224 - i32.const 101 + i32.const 109 i32.const 7 call $~lib/builtins/abort unreachable diff --git a/tests/allocators/forever.js b/tests/allocators/forever.js index 60f6363b5b..fb68cd76bb 100644 --- a/tests/allocators/forever.js +++ b/tests/allocators/forever.js @@ -1,4 +1,4 @@ -var child_process = require("child_process"); +import child_process from "child_process"; // restarts the test forever, that is, until an issue is detected diff --git a/tests/allocators/index.js b/tests/allocators/index.js index 013d8d6dbc..4c9d1a317e 100644 --- a/tests/allocators/index.js +++ b/tests/allocators/index.js @@ -1,10 +1,16 @@ -const fs = require("fs"); +import fs from "fs"; +import path from "path"; +import { fileURLToPath } from "url"; +import runner from "./runner.js"; + +const dirname = path.dirname(fileURLToPath(import.meta.url)); + const COMMON_MAX = 1 << 30; function test(file) { console.log("Testing '" + file + "' ...\n"); - const exports = new WebAssembly.Instance(new WebAssembly.Module(fs.readFileSync(__dirname + "/" + file)), { + const exports = new WebAssembly.Instance(new WebAssembly.Module(fs.readFileSync(dirname + "/" + file)), { env: { abort(msg, file, line, column) { throw Error("Assertion failed: " + (msg ? "'" + getString(msg) + "' " : "") + "at " + getString(file) + ":" + line + ":" + column); @@ -24,7 +30,7 @@ function test(file) { return String.fromCharCode.apply(String, U16.subarray(offset, offset + length)); } - require("./runner")(exports, 20, 20000); + runner(exports, 20, 20000); console.log("mem final: " + exports.memory.buffer.byteLength); console.log(); diff --git a/tests/allocators/package.json b/tests/allocators/package.json index fc58f3778c..d2e0ff1c72 100644 --- a/tests/allocators/package.json +++ b/tests/allocators/package.json @@ -1,4 +1,5 @@ { + "type": "module", "private": true, "scripts": { "test": "node ./index", diff --git a/tests/allocators/runner.js b/tests/allocators/runner.js index 96fed174d8..ed8f6fa975 100644 --- a/tests/allocators/runner.js +++ b/tests/allocators/runner.js @@ -1,4 +1,4 @@ -function runner(exports, runs, allocs) { +export default function runner(exports, runs, allocs) { const alloc = exports["heap.alloc"]; const free = exports["heap.free"]; const reset = exports["heap.reset"]; diff --git a/tests/allocators/stub/optimized.wat b/tests/allocators/stub/optimized.wat index 43ff393683..be14710bda 100644 --- a/tests/allocators/stub/optimized.wat +++ b/tests/allocators/stub/optimized.wat @@ -1,36 +1,70 @@ (module - (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (memory $0 0) + (type $i32_=>_none (func (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) + (memory $0 1) + (data (i32.const 1036) "<") + (data (i32.const 1048) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 1100) "<") + (data (i32.const 1112) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00s\00t\00u\00b\00.\00t\00s") (export "heap.alloc" (func $~lib/memory/heap.alloc)) (export "heap.realloc" (func $~lib/memory/heap.realloc)) (export "heap.free" (func $~lib/memory/heap.free)) (export "heap.reset" (func $~lib/memory/heap.reset)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (param $0 i32) + (func $~lib/rt/stub/__alloc (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - memory.size + i32.const 1073741820 + i32.gt_u + if + i32.const 1056 + i32.const 1120 + i32.const 33 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/stub/offset + local.tee $1 + i32.const 4 + i32.add local.tee $2 + local.get $0 + i32.const 19 + i32.add + i32.const -16 + i32.and + i32.const 4 + i32.sub + local.tee $0 + i32.add + local.tee $3 + memory.size + local.tee $4 i32.const 16 i32.shl i32.const 15 i32.add i32.const -16 i32.and - local.tee $1 + local.tee $5 i32.gt_u if - local.get $2 - local.get $0 - local.get $1 + local.get $4 + local.get $3 + local.get $5 i32.sub i32.const 65535 i32.add @@ -38,16 +72,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $1 - local.get $2 - i32.lt_s + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $5 memory.grow i32.const 0 i32.lt_s @@ -56,33 +90,9 @@ end end end - local.get $0 + local.get $3 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 1073741820 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - global.get $~lib/rt/stub/offset - i32.const 4 - i32.add - local.tee $2 - local.get $0 - i32.const 19 - i32.add - i32.const -16 - i32.and - i32.const 4 - i32.sub - local.tee $0 - i32.add - call $~lib/rt/stub/maybeGrowMemory + local.get $1 local.get $0 i32.store local.get $2 @@ -91,178 +101,687 @@ local.get $0 call $~lib/rt/stub/__alloc ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 + (local $5 i32) + loop $while-continue|0 local.get $1 - i32.lt_u + i32.const 3 + i32.and + i32.const 0 + local.get $2 + select if - local.get $1 - i32.const 7 - i32.and local.get $0 - i32.const 7 - i32.and - i32.eq + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.const 3 + i32.and + i32.eqz + if + loop $while-continue|1 + local.get $2 + i32.const 16 + i32.ge_u if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + local.get $1 + i32.load offset=4 + i32.store offset=4 + local.get $0 + local.get $1 + i32.load offset=8 + i32.store offset=8 + local.get $0 + local.get $1 + i32.load offset=12 + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $while-continue|1 + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + local.get $1 + i32.load offset=4 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 8 + i32.add + local.set $0 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.add + local.set $0 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.add + local.set $1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 + i32.const 3 + i32.and i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + br_table $case0|2 $case1|2 $case2|2 $break|2 end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 local.get $0 - local.tee $2 + i32.const 2 + i32.add + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + i32.const 2 + i32.add + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 + local.get $2 + i32.const 3 i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 + local.set $2 + loop $while-continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load offset=1 + local.tee $3 + i32.const 8 + i32.shl + local.get $5 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + local.get $1 + i32.load offset=5 + local.tee $4 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store offset=4 + local.get $0 + local.get $1 + i32.load offset=9 + local.tee $3 + i32.const 8 + i32.shl + local.get $4 + i32.const 24 + i32.shr_u + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.load offset=13 + local.tee $5 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $while-continue|3 + end end + br $break|2 end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + local.tee $3 + i32.const 2 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 2 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $2 + i32.const 2 + i32.sub + local.set $2 loop $while-continue|4 - local.get $4 - i32.const 8 + local.get $2 + i32.const 18 i32.ge_u if - local.get $4 - i32.const 8 - i32.sub + local.get $0 + local.get $1 + i32.load offset=2 + local.tee $3 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + local.get $1 + i32.load offset=6 local.tee $4 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store offset=4 local.get $0 - i32.add local.get $1 + i32.load offset=10 + local.tee $3 + i32.const 16 + i32.shl local.get $4 + i32.const 16 + i32.shr_u + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.load offset=14 + local.tee $5 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store offset=12 + local.get $1 + i32.const 16 i32.add - i64.load - i64.store + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 br $while-continue|4 end end + br $break|2 end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 loop $while-continue|5 - local.get $4 + local.get $2 + i32.const 19 + i32.ge_u if - local.get $4 - i32.const 1 - i32.sub + local.get $0 + local.get $1 + i32.load offset=3 + local.tee $3 + i32.const 24 + i32.shl + local.get $5 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + local.get $1 + i32.load offset=7 local.tee $4 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store offset=4 local.get $0 - i32.add local.get $1 + i32.load offset=11 + local.tee $3 + i32.const 24 + i32.shl local.get $4 + i32.const 8 + i32.shr_u + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.load offset=15 + local.tee $5 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store offset=12 + local.get $1 + i32.const 16 i32.add - i32.load8_u - i32.store8 + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 br $while-continue|5 end end end end + local.get $2 + i32.const 16 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $3 + i32.load8_u + i32.store8 + local.get $3 + i32.const 2 + i32.add + local.set $1 + local.get $0 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $3 + i32.load8_u + i32.store8 + local.get $3 + i32.const 2 + i32.add + local.set $1 + local.get $0 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + local.get $1 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + local.get $1 + i32.const 2 + i32.add + local.tee $3 + i32.load8_u + i32.store8 + local.get $3 + i32.const 2 + i32.add + local.set $1 + local.get $0 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + local.tee $3 + i32.const 2 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 2 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u offset=1 + i32.store8 offset=1 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end ) (func $~lib/memory/heap.realloc (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -272,14 +791,15 @@ global.get $~lib/rt/stub/offset local.get $0 local.get $0 + local.tee $2 i32.const 4 i32.sub - local.tee $4 - i32.load local.tee $3 + i32.load + local.tee $5 i32.add i32.eq - local.set $5 + local.set $0 local.get $1 i32.const 19 i32.add @@ -287,57 +807,286 @@ i32.and i32.const 4 i32.sub - local.set $2 + local.set $4 local.get $1 - local.get $3 + local.get $5 i32.gt_u if - local.get $5 + local.get $0 if local.get $1 i32.const 1073741820 i32.gt_u if + i32.const 1056 + i32.const 1120 + i32.const 52 + i32.const 33 + call $~lib/builtins/abort unreachable end - local.get $0 local.get $2 - i32.add - call $~lib/rt/stub/maybeGrowMemory local.get $4 - local.get $2 - i32.store - else - local.get $2 - local.get $3 - i32.const 1 - i32.shl - local.tee $1 - local.get $1 - local.get $2 - i32.lt_u - select - call $~lib/rt/stub/__alloc + i32.add + local.tee $0 + memory.size local.tee $1 + i32.const 16 + i32.shl + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $5 + i32.gt_u + if + local.get $1 + local.get $0 + local.get $5 + i32.sub + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $1 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + end local.get $0 + global.set $~lib/rt/stub/offset local.get $3 - call $~lib/memory/memory.copy - local.get $1 - local.set $0 + local.get $4 + i32.store + else + block $~lib/util/memory/memmove|inlined.0 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + local.tee $0 + local.get $0 + local.get $4 + i32.lt_u + select + call $~lib/rt/stub/__alloc + local.tee $4 + local.tee $0 + local.get $2 + local.tee $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 + local.get $0 + i32.sub + local.get $5 + i32.sub + i32.const 0 + local.get $5 + i32.const 1 + i32.shl + i32.sub + i32.le_u + if + local.get $0 + local.get $1 + local.get $5 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $5 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $5 + i32.const 1 + i32.sub + local.set $5 + local.get $0 + local.tee $2 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $2 + local.get $3 + i32.load8_u + i32.store8 + br $while-continue|0 + end + end + loop $while-continue|1 + local.get $5 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $5 + i32.const 8 + i32.sub + local.set $5 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $while-continue|1 + end + end + end + loop $while-continue|2 + local.get $5 + if + local.get $0 + local.tee $2 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $2 + local.get $3 + i32.load8_u + i32.store8 + local.get $5 + i32.const 1 + i32.sub + local.set $5 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $5 + i32.add + i32.const 7 + i32.and + if + local.get $5 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + local.get $0 + i32.add + local.get $1 + local.get $5 + i32.add + i32.load8_u + i32.store8 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $5 + i32.const 8 + i32.ge_u + if + local.get $5 + i32.const 8 + i32.sub + local.tee $5 + local.get $0 + i32.add + local.get $1 + local.get $5 + i32.add + i64.load + i64.store + br $while-continue|4 + end + end + end + loop $while-continue|5 + local.get $5 + if + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + local.get $0 + i32.add + local.get $1 + local.get $5 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end + end + end + local.get $4 + local.set $2 end else - local.get $5 + local.get $0 if - local.get $0 local.get $2 + local.get $4 i32.add global.set $~lib/rt/stub/offset + local.get $3 local.get $4 - local.get $2 i32.store end end - local.get $0 + local.get $2 ) (func $~lib/memory/heap.free (param $0 i32) global.get $~lib/rt/stub/offset @@ -359,9 +1108,9 @@ global.set $~lib/rt/stub/offset ) (func $~start - i32.const 1036 + i32.const 1164 global.set $~lib/rt/stub/startOffset - i32.const 1036 + i32.const 1164 global.set $~lib/rt/stub/offset ) ) diff --git a/tests/allocators/stub/package.json b/tests/allocators/stub/package.json index 395f939013..c15f70749b 100644 --- a/tests/allocators/stub/package.json +++ b/tests/allocators/stub/package.json @@ -1,5 +1,6 @@ { "private": true, + "type": "module", "scripts": { "build": "npm run build:untouched && npm run build:optimized", "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --runtime stub --sourceMap --measure", diff --git a/tests/allocators/stub/untouched.wat b/tests/allocators/stub/untouched.wat index 8932e17c1f..333eb068a7 100644 --- a/tests/allocators/stub/untouched.wat +++ b/tests/allocators/stub/untouched.wat @@ -1,19 +1,21 @@ (module - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 12) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00s\00t\00u\00b\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (table $0 1 funcref) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/memory/__heap_base i32 (i32.const 76)) + (global $~lib/memory/__heap_base i32 (i32.const 140)) + (memory $0 1) + (data (i32.const 12) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") + (data (i32.const 76) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00s\00t\00u\00b\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (table $0 1 funcref) + (elem $0 (i32.const 1)) (export "heap.alloc" (func $~lib/memory/heap.alloc)) (export "heap.realloc" (func $~lib/memory/heap.realloc)) (export "heap.free" (func $~lib/memory/heap.free)) @@ -94,6 +96,11 @@ i32.const 1073741820 i32.gt_u if + i32.const 32 + i32.const 96 + i32.const 33 + i32.const 29 + call $~lib/builtins/abort unreachable end global.get $~lib/rt/stub/offset @@ -1403,8 +1410,8 @@ i32.eqz if i32.const 0 - i32.const 32 - i32.const 44 + i32.const 96 + i32.const 45 i32.const 3 call $~lib/builtins/abort unreachable @@ -1446,6 +1453,11 @@ i32.const 1073741820 i32.gt_u if + i32.const 32 + i32.const 96 + i32.const 52 + i32.const 33 + call $~lib/builtins/abort unreachable end local.get $0 @@ -1513,8 +1525,8 @@ i32.eqz if i32.const 0 - i32.const 32 - i32.const 69 + i32.const 96 + i32.const 70 i32.const 3 call $~lib/builtins/abort unreachable From ff9e30bc10abdf9a1fd31de2bb9a1c425cde81f9 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 26 Nov 2021 23:35:29 +0100 Subject: [PATCH 005/175] integrate diagnostics into build --- cli/asc.generated.js | 1 + scripts/build-diagnostics.js | 54 ------------------------ scripts/build.js | 65 +++++++++++++++++++++++++++-- src/diagnosticMessages.generated.ts | 5 +-- 4 files changed, 63 insertions(+), 62 deletions(-) delete mode 100644 scripts/build-diagnostics.js diff --git a/cli/asc.generated.js b/cli/asc.generated.js index 8d694e7906..6c8e4246b5 100644 --- a/cli/asc.generated.js +++ b/cli/asc.generated.js @@ -1,4 +1,5 @@ // GENERATED FILE. DO NOT EDIT. + export const version = "0.0.0"; export const options = { "version": { diff --git a/scripts/build-diagnostics.js b/scripts/build-diagnostics.js deleted file mode 100644 index e2f1efb368..0000000000 --- a/scripts/build-diagnostics.js +++ /dev/null @@ -1,54 +0,0 @@ -import fs from "fs"; -import path from 'path'; -import { fileURLToPath } from 'url'; - -const __dirname = path.dirname(fileURLToPath(import.meta.url)); - -var messages = JSON.parse( - fs.readFileSync( - path.join(__dirname, "..", "src", "diagnosticMessages.json") - ) -); - -var header = `/** - * @fileoverview Generated from diagnosticsMessages.json. Do not edit. - * @license Apache-2.0 - */ - -`.replace(/\r\n/g, "\n"); - -var sb = [ header ]; - -function makeKey(text) { - return text.replace(/[^\w]+/g, "_").replace(/_+$/, ""); -} - -sb.push("/** Enum of available diagnostic codes. */\n"); -sb.push("export enum DiagnosticCode {\n"); - -var first = true; -Object.keys(messages).forEach(text => { - var key = makeKey(text); - if (first) - first = false; - else { - sb.push(",\n"); - } - sb.push(" " + key + " = " + messages[text]); -}); - -sb.push("\n}\n\n"); -sb.push("/** Translates a diagnostic code to its respective string. */\n"); -sb.push("export function diagnosticCodeToString(code: DiagnosticCode): string {\n switch (code) {\n"); - -Object.keys(messages).forEach(text => { - sb.push(" case " + messages[text] + ": return " + JSON.stringify(text) + ";\n"); -}); - -sb.push(" default: return \"\";\n }\n}\n"); - -fs.writeFileSync( - path.join(__dirname, "..", "src", "diagnosticMessages.generated.ts"), - sb.join(""), - { encoding: "utf8" } -); diff --git a/scripts/build.js b/scripts/build.js index 43b4b42833..986e6be9d0 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -67,7 +67,7 @@ function bundleFile(filename) { class StdlibPlugin { name = "stdlib"; setup(build) { - build.onResolve({ filter: /asc\.generated\.js$/ }, args => { + build.onResolve({ filter: /\basc\.generated\.js$/ }, args => { return { path: path.join(args.resolveDir, args.path), watchFiles: glob.sync(path.join(dirname, "..", "std", "assembly") + "/**/*.ts") @@ -78,9 +78,9 @@ class StdlibPlugin { ]) }; }); - build.onLoad({ filter: /asc\.generated\.js$/ }, args => { + build.onLoad({ filter: /\basc\.generated\.js$/ }, args => { const out = [ - `// GENERATED FILE. DO NOT EDIT.\n` + `// GENERATED FILE. DO NOT EDIT.\n\n` ]; const version = require("../package.json").version; out.push( @@ -115,6 +115,63 @@ class StdlibPlugin { } } +// Diagnostic messages integration + +class DiagnosticsPlugin { + name = "diagnostics"; + setup(build) { + build.onResolve({ filter: /\bdiagnosticMessages\.generated$/ }, args => { + return { + path: path.join(args.resolveDir, args.path), + watchFiles: [ + path.join(dirname, "..", "src", "diagnosticMessages.json") + ] + }; + }); + build.onLoad({ filter: /\bdiagnosticMessages\.generated$/ }, args => { + const out = [ + `// GENERATED FILE. DO NOT EDIT.\n\n` + ]; + + function makeKey(text) { + return text.replace(/[^\w]+/g, "_").replace(/_+$/, ""); + } + + out.push("/** Enum of available diagnostic codes. */\n"); + out.push("export enum DiagnosticCode {\n"); + + var first = true; + const messages = JSON.parse(fs.readFileSync(path.join(dirname, "..", "src", "diagnosticMessages.json"))); + Object.keys(messages).forEach(text => { + var key = makeKey(text); + if (first) + first = false; + else { + out.push(",\n"); + } + out.push(" " + key + " = " + messages[text]); + }); + + out.push("\n}\n\n"); + out.push("/** Translates a diagnostic code to its respective string. */\n"); + out.push("export function diagnosticCodeToString(code: DiagnosticCode): string {\n switch (code) {\n"); + + Object.keys(messages).forEach(text => { + out.push(" case " + messages[text] + ": return " + JSON.stringify(text) + ";\n"); + }); + + out.push(" default: return \"\";\n }\n}\n"); + + const generated = out.join(""); + fs.writeFileSync(path.join(dirname, "..", "src", "diagnosticMessages.generated.ts"), generated); + return { + contents: generated, + loader: "ts" + }; + }); + } +} + // Build compiler and CLI const externals = [ "assemblyscript", "binaryen", "long" ]; @@ -136,7 +193,7 @@ esbuild.build({ js: prelude("The AssemblyScript compiler") }, watch: watch && { onRebuild }, - plugins: [ new ReportPlugin("AS") ] + plugins: [ new DiagnosticsPlugin(), new ReportPlugin("AS") ] }); esbuild.build({ diff --git a/src/diagnosticMessages.generated.ts b/src/diagnosticMessages.generated.ts index 2db65faca4..cd7016e15b 100644 --- a/src/diagnosticMessages.generated.ts +++ b/src/diagnosticMessages.generated.ts @@ -1,7 +1,4 @@ -/** - * @fileoverview Generated from diagnosticsMessages.json. Do not edit. - * @license Apache-2.0 - */ +// GENERATED FILE. DO NOT EDIT. /** Enum of available diagnostic codes. */ export enum DiagnosticCode { From df44d478f4434d4deec2d198f7857ec028a06666 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 03:12:53 +0100 Subject: [PATCH 006/175] update binaryen to latest --- package-lock.json | 14 +++++++------- package.json | 2 +- scripts/update-constants.js | 18 +++++++++--------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1d1bd338ea..7e5562cd11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "binaryen": "102.0.0-nightly.20211118", + "binaryen": "102.0.0-nightly.20211126", "long": "^5.1.0", "source-map-support": "^0.5.20" }, @@ -364,9 +364,9 @@ "license": "MIT" }, "node_modules/binaryen": { - "version": "102.0.0-nightly.20211118", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-102.0.0-nightly.20211118.tgz", - "integrity": "sha512-bueSEfwXWdBavp5Q0xqpeKHlKgmh+7n0pwlFditPGCbIHvH87vFuHiqdsqGedTrmV1Ar3f7zBBIQeg8P0/slOA==", + "version": "102.0.0-nightly.20211126", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-102.0.0-nightly.20211126.tgz", + "integrity": "sha512-VuUXjmae5m42itc4ZUz08LWddPIIydBoay0mPIh7aiD3O3iXMtRlPt+bbcw3JWCnxa053c8Tkigyr2mJZaSbFg==", "bin": { "wasm-opt": "bin/wasm-opt", "wasm2js": "bin/wasm2js" @@ -1711,9 +1711,9 @@ "dev": true }, "binaryen": { - "version": "102.0.0-nightly.20211118", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-102.0.0-nightly.20211118.tgz", - "integrity": "sha512-bueSEfwXWdBavp5Q0xqpeKHlKgmh+7n0pwlFditPGCbIHvH87vFuHiqdsqGedTrmV1Ar3f7zBBIQeg8P0/slOA==" + "version": "102.0.0-nightly.20211126", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-102.0.0-nightly.20211126.tgz", + "integrity": "sha512-VuUXjmae5m42itc4ZUz08LWddPIIydBoay0mPIh7aiD3O3iXMtRlPt+bbcw3JWCnxa053c8Tkigyr2mJZaSbFg==" }, "brace-expansion": { "version": "1.1.11", diff --git a/package.json b/package.json index a74b66c7ac..77cd1217a5 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "102.0.0-nightly.20211118", + "binaryen": "102.0.0-nightly.20211126", "long": "^5.1.0", "source-map-support": "^0.5.20" }, diff --git a/scripts/update-constants.js b/scripts/update-constants.js index 5f94354372..87fa152b61 100644 --- a/scripts/update-constants.js +++ b/scripts/update-constants.js @@ -1,14 +1,15 @@ // Updates the Binaryen constants in src/module.ts -const fs = require("fs"); -const path = require("path"); -const binaryen = require("binaryen"); +import fs from "fs"; +import path from "path"; +import { fileURLToPath } from "url"; +import binaryen from "binaryen"; -const srcfile = path.join(__dirname, "..", "src", "module.ts"); -var src = fs.readFileSync(srcfile, "utf8"); +const __dirname = path.dirname(fileURLToPath(import.meta.url)); -binaryen.ready.then(() => { - src = src.replace(/(?:enum|namespace) (\w+) \{([^}]*)\}/g, function($0) { +const srcfile = path.join(__dirname, "..", "src", "module.ts"); +var src = fs.readFileSync(srcfile, "utf8") + .replace(/(?:enum|namespace) (\w+) \{([^}]*)\}/g, function($0) { return $0.replace(/(\w+)[ ]+=[ ]+([^,;\n]+)/g, function($0, key, val) { var match = val.match(/\b(_(?:Binaryen|Relooper|ExpressionRunner)\w+)\b/); if (match) { @@ -21,5 +22,4 @@ binaryen.ready.then(() => { return $0; }); }); - fs.writeFileSync(srcfile, src, "utf8"); -}); +fs.writeFileSync(srcfile, src, "utf8"); From 77158826309c56e198ca808d48103d367e460351 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 04:06:25 +0100 Subject: [PATCH 007/175] clean up scripts --- package.json | 20 +++------- scripts/clean.js | 20 ---------- scripts/postpublish-files.json | 5 --- scripts/postpublish.js | 22 ----------- scripts/prepublish.js | 69 ---------------------------------- 5 files changed, 6 insertions(+), 130 deletions(-) delete mode 100644 scripts/clean.js delete mode 100644 scripts/postpublish-files.json delete mode 100644 scripts/postpublish.js delete mode 100644 scripts/prepublish.js diff --git a/package.json b/package.json index 77cd1217a5..eb0aca11b1 100644 --- a/package.json +++ b/package.json @@ -63,27 +63,20 @@ "asinit": "bin/asinit.js" }, "scripts": { - "build": "npm run build:lib && npm run build:dts", - "build:lib": "node scripts/build", - "build:dts": "node scripts/build-dts", - "watch": "node scripts/build --watch", - "clean": "node scripts/clean", "check": "npm run check:config && npm run check:import && npm run check:lint", "check:config": "tsc --noEmit -p src --diagnostics --listFiles", "check:import": "tsc --noEmit --target ESNEXT --module es6 --experimentalDecorators tests/import/index", "check:lint": "eslint --max-warnings 0 --ext js . && eslint --max-warnings 0 --ext ts .", + "build": "npm run build:lib && npm run build:dts", + "build:lib": "node scripts/build", + "build:dts": "node scripts/build-dts", + "watch": "node scripts/build --watch", "test": "npm run test:parser && npm run test:compiler && npm run test:packages && npm run test:extension && npm run test:asconfig", "test:parser": "node tests/parser", "test:compiler": "node --experimental-wasi-unstable-preview1 tests/compiler", "test:packages": "cd tests/packages && npm run test", "test:extension": "cd tests/extension && npm run test", "test:asconfig": "cd tests/asconfig && npm run test", - "make": "npm run clean && npm test && npm run build && npm test", - "all": "npm run check && npm run make", - "docs": "typedoc --tsconfig tsconfig-docs.json --mode modules --name \"AssemblyScript Compiler API\" --out ./docs/api --ignoreCompilerErrors --excludeNotExported --excludePrivate --excludeExternals --exclude **/std/** --includeDeclarations --readme src/README.md", - "prepare-ci": "node scripts/prepublish --prepare-for-ci", - "prepublishOnly": "node scripts/prepublish", - "postpublish": "node scripts/postpublish", "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized", "asbuild:untouched": "node bin/asc --config src/asconfig.json --target untouched", "asbuild:optimized": "node bin/asc --config src/asconfig.json --target optimized", @@ -91,10 +84,9 @@ "bootstrap": "npm run bootstrap:untouched && npm run bootstrap:optimized", "bootstrap:untouched": "node bin/asc --config src/asconfig.json --target untouched && node bin/asc --config src/asconfig.json --target untouched-bootstrap --wasm out/assemblyscript.untouched.wasm && node bin/asc --config src/asconfig.json --target untouched-bootstrap --wasm out/assemblyscript.untouched-bootstrap.wasm && git --no-pager diff --no-index out/assemblyscript.untouched.wast out/assemblyscript.untouched-bootstrap.wast", "bootstrap:optimized": "node bin/asc --config src/asconfig.json --target optimized && node bin/asc --config src/asconfig.json --target optimized-bootstrap --wasm out/assemblyscript.optimized.wasm && node bin/asc --config src/asconfig.json --target optimized-bootstrap --wasm out/assemblyscript.optimized-bootstrap.wasm && git --no-pager diff --no-index out/assemblyscript.optimized.wast out/assemblyscript.optimized-bootstrap.wast", - "bootstrap:rtraced": "node bin/asc --config src/asconfig.json --target rtraced && node bin/asc --config src/asconfig.json --target rtraced --wasm out/assemblyscript.rtraced.wasm", - "astest": "ts-node tests/bootstrap" + "bootstrap:rtraced": "node bin/asc --config src/asconfig.json --target rtraced && node bin/asc --config src/asconfig.json --target rtraced --wasm out/assemblyscript.rtraced.wasm" }, - "releaseFiles": [ + "files": [ "lib/loader/index.d.ts", "lib/loader/index.js", "lib/loader/package.json", diff --git a/scripts/clean.js b/scripts/clean.js deleted file mode 100644 index 11c4236071..0000000000 --- a/scripts/clean.js +++ /dev/null @@ -1,20 +0,0 @@ -import fs from "fs"; -import path from "path"; -import glob from "glob"; -import { fileURLToPath } from 'url'; - -const __dirname = path.dirname(fileURLToPath(import.meta.url)); - -glob("*", { cwd: __dirname + "/../dist" }, (err, matches) => { - if (err) - console.log("Failed to list files in 'dist/': " + err.message); - else - matches.forEach(match => { - fs.unlink(__dirname + "/../dist/" + match, err => { - if (err) - console.log("Failed to delete 'dist/" + match + "': " + err.message); - else - console.log("Deleted 'dist/" + match + "'"); - }); - }); -}); diff --git a/scripts/postpublish-files.json b/scripts/postpublish-files.json deleted file mode 100644 index c2a9b27bf0..0000000000 --- a/scripts/postpublish-files.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - "package.json", - "index.js", - "index.d.ts" -] diff --git a/scripts/postpublish.js b/scripts/postpublish.js deleted file mode 100644 index 4c0ddb5fe9..0000000000 --- a/scripts/postpublish.js +++ /dev/null @@ -1,22 +0,0 @@ -// Reconfigures the repository after publishing - -const fs = require("fs"); -const path = require("path"); -const devFiles = require("./postpublish-files.json"); - -console.log("Restoring development files ..."); - -devFiles.forEach(originalName => { - const backupName = originalName + ".backup"; - const backupPath = path.join(__dirname, "..", backupName); - if (!fs.existsSync(backupPath)) { - console.log("- " + backupName + " does not exist"); - } else { - console.log("- " + backupName + " -> " + originalName); - fs.copyFileSync( - backupPath, - path.join(__dirname, "..", originalName) - ); - fs.unlinkSync(backupPath); - } -}); diff --git a/scripts/prepublish.js b/scripts/prepublish.js deleted file mode 100644 index 62217dbf54..0000000000 --- a/scripts/prepublish.js +++ /dev/null @@ -1,69 +0,0 @@ -// Reconfigures the repository before publishing - -const fs = require("fs"); -const path = require("path"); -const pkg = require("../package.json"); -const devFiles = require("./postpublish-files.json"); - -var isCI = process.argv[2] === '--prepare-for-ci'; - -if (!isCI) { - if (!pkg.releaseFiles) { - console.log("Package has already been updated"); - return; - } - - console.log("Backing up development files ..."); - - devFiles.forEach(originalName => { - const backupName = originalName + ".backup"; - console.log("- " + originalName + " -> " + backupName); - fs.copyFileSync( - path.join(__dirname, "..", originalName), - path.join(__dirname, "..", backupName) - ); - }); - - console.log("Updating package.json ..."); - - // Stuff we don't need in release - Object.keys(pkg.devDependencies).forEach(dep => delete pkg.dependencies[dep]); - delete pkg.devDependencies; - delete pkg.scripts; - - // Stuff we want in release - pkg.files = pkg.releaseFiles; - delete pkg.releaseFiles; - - // Copy contributors from NOTICE to .contributors - const notice = fs.readFileSync(path.join(__dirname, "..", "NOTICE"), "utf8"); - const noticeRange = ["dcode.io>", "Portions of this software"]; - const posStart = notice.indexOf(noticeRange[0]); - const posEnd = notice.indexOf(noticeRange[1], posStart); - if (posStart < 0 || posEnd < 0) throw Error("unexpected NOTICE format"); - pkg.contributors = []; - for (let entry of notice.substring(posStart + noticeRange[0].length, posEnd).trim().matchAll(/^\* ([^<\n]+(?: <([^>\n]+)>))/mg)) { - pkg.contributors.push(entry[1]); - } - if (!pkg.contributors.length) throw Error("missing contributors"); - fs.writeFileSync(path.join(__dirname, "..", "package.json"), [ - JSON.stringify(pkg, null, 2), '\n' - ].join("")); -} - -console.log("Copying index.release.js -> index.js ..."); -fs.copyFileSync( - path.join(__dirname, "..", "index.release.js"), - path.join(__dirname, "..", "index.js") -); - -console.log("Copying index.release.d.ts -> index.d.ts ..."); -fs.copyFileSync( - path.join(__dirname, "..", "index.release.d.ts"), - path.join(__dirname, "..", "index.d.ts") -); - -if (!isCI) { - // We are going to use these immediately, so, to be sure: - setTimeout(() => console.log("OK"), 2000); -} From 7b89619c5106ae2c09d399a2abe734566db1960e Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 05:53:05 +0100 Subject: [PATCH 008/175] restructure --- bin/asc.js | 6 +++--- cli/README.md | 4 ++-- cli/{asc.d.ts => index.d.ts} | 2 +- cli/{asc.generated.js => index.generated.js} | 0 cli/{asc.js => index.js} | 2 +- cli/{asc.json => options.json} | 0 index.js | 2 -- package.json | 1 - scripts/build.js | 12 ++++++------ tests/asconfig/index.js | 2 +- tests/compiler.js | 4 +--- tests/packages/packages/g/test.js | 2 +- cli/transform.d.ts => transform.d.ts | 4 ++-- cli/transform.js => transform.js | 0 14 files changed, 18 insertions(+), 23 deletions(-) rename cli/{asc.d.ts => index.d.ts} (99%) rename cli/{asc.generated.js => index.generated.js} (100%) rename cli/{asc.js => index.js} (99%) rename cli/{asc.json => options.json} (100%) rename cli/transform.d.ts => transform.d.ts (92%) rename cli/transform.js => transform.js (100%) diff --git a/bin/asc.js b/bin/asc.js index 687467fa0a..7f035affdf 100644 --- a/bin/asc.js +++ b/bin/asc.js @@ -1,6 +1,7 @@ #!/usr/bin/env node import childProcess from "child_process"; +import sourceMapSupport from "source-map-support"; function tryApplyNodeArguments() { const argv = process.argv; @@ -19,9 +20,8 @@ function tryApplyNodeArguments() { var asc; if (!tryApplyNodeArguments()) { - global.binaryen = (await import("binaryen")).default; - global.assemblyscript = (await import("../index.js")).default; - asc = await import("../cli/asc.js"); + sourceMapSupport.install(); + asc = await import("../dist/asc.js"); process.exitCode = asc.main(process.argv.slice(2)); } diff --git a/cli/README.md b/cli/README.md index 6033f60451..b90cdf85cd 100644 --- a/cli/README.md +++ b/cli/README.md @@ -38,14 +38,14 @@ asc.ready.then(() => { Available command line options can also be obtained programmatically: ```js -const options = require("assemblyscript/cli/asc.json"); +const options = require("assemblyscript/cli/options.json"); ... ``` You can also compile a source string directly, for example in a browser environment: ```js -const asc = require("assemblyscript/cli/asc"); +const asc = require("assemblyscript/cli/index"); asc.ready.then(() => { const { binary, text, stdout, stderr } = asc.compileString(`...`, { optimize: 2 }); }); diff --git a/cli/asc.d.ts b/cli/index.d.ts similarity index 99% rename from cli/asc.d.ts rename to cli/index.d.ts index 528e31e1e1..e353a59e5a 100644 --- a/cli/asc.d.ts +++ b/cli/index.d.ts @@ -5,7 +5,7 @@ import { OptionDescription } from "./util/options"; export { OptionDescription }; -import { Transform } from "./transform"; +import { Transform } from "../transform"; /** AssemblyScript version. */ export const version: string; diff --git a/cli/asc.generated.js b/cli/index.generated.js similarity index 100% rename from cli/asc.generated.js rename to cli/index.generated.js diff --git a/cli/asc.js b/cli/index.js similarity index 99% rename from cli/asc.js rename to cli/index.js index ee0561f3ef..2b8f06970e 100644 --- a/cli/asc.js +++ b/cli/index.js @@ -33,7 +33,7 @@ import fetch from "./util/fetch.js"; import * as utf8 from "./util/utf8.js"; import * as colorsUtil from "./util/colors.js"; import * as optionsUtil from "./util/options.js"; -import * as generated from "./asc.generated.js"; +import * as generated from "./index.generated.js"; import binaryen from "binaryen"; import assemblyscriptJS from "assemblyscript"; diff --git a/cli/asc.json b/cli/options.json similarity index 100% rename from cli/asc.json rename to cli/options.json diff --git a/index.js b/index.js index 991c584105..c57d7ed8db 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,3 @@ -import sourceMapSupport from "source-map-support"; -sourceMapSupport.install(); export * from "./dist/assemblyscript.js"; import * as assemblyscript from "./dist/assemblyscript.js"; export default assemblyscript; diff --git a/package.json b/package.json index eb0aca11b1..fb75760d73 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,6 @@ }, "./*": "./*.js", "./cli/asc": "./cli/asc.js", - "./cli/transform": "./cli/transform.js", "./cli/util/options": "./cli/util/options.js", "./dist/assemblyscript": "./dist/assemblyscript.js", "./dist/asc": "./dist/asc.js" diff --git a/scripts/build.js b/scripts/build.js index 986e6be9d0..d092ef1650 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -67,18 +67,18 @@ function bundleFile(filename) { class StdlibPlugin { name = "stdlib"; setup(build) { - build.onResolve({ filter: /\basc\.generated\.js$/ }, args => { + build.onResolve({ filter: /\bindex\.generated\.js$/ }, args => { return { path: path.join(args.resolveDir, args.path), watchFiles: glob.sync(path.join(dirname, "..", "std", "assembly") + "/**/*.ts") .concat([ path.join(dirname, "..", "package.json"), - path.join(dirname, "..", "cli", "asc.json"), + path.join(dirname, "..", "cli", "options.json"), path.join(dirname, "..", "std", "portable", "index.d.ts") ]) }; }); - build.onLoad({ filter: /\basc\.generated\.js$/ }, args => { + build.onLoad({ filter: /\bindex\.generated\.js$/ }, args => { const out = [ `// GENERATED FILE. DO NOT EDIT.\n\n` ]; @@ -86,7 +86,7 @@ class StdlibPlugin { out.push( `export const version = ${JSON.stringify(version)};\n` ); - const options = require("../cli/asc.json"); + const options = require("../cli/options.json"); out.push( `export const options = ${JSON.stringify(options, null, 2)};\n` ); @@ -106,7 +106,7 @@ class StdlibPlugin { `export const libraryFiles = ${JSON.stringify(libraryFiles, null, 2)};\n` ); const generated = out.join(""); - fs.writeFileSync(path.join(dirname, "..", "cli", "asc.generated.js"), generated); + fs.writeFileSync(path.join(dirname, "..", "cli", "index.generated.js"), generated); return { contents: generated, loader: "js" @@ -197,7 +197,7 @@ esbuild.build({ }); esbuild.build({ - entryPoints: [ "./cli/asc.js" ], + entryPoints: [ "./cli/index.js" ], bundle: true, target: "esnext", outfile: "./dist/asc.js", diff --git a/tests/asconfig/index.js b/tests/asconfig/index.js index 7626e80a41..961ff6828f 100644 --- a/tests/asconfig/index.js +++ b/tests/asconfig/index.js @@ -1,7 +1,7 @@ import path from "path"; import fs from "fs"; import { createRequire } from "module"; -import * as asc from "../../cli/asc.js"; +import * as asc from "../../cli/index.js"; import loader from "../../lib/loader/index.js"; const require = createRequire(import.meta.url); diff --git a/tests/compiler.js b/tests/compiler.js index 0374fd569e..9532cac200 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -16,9 +16,7 @@ import { Rtrace } from "../lib/rtrace/index.js"; const dirname = path.dirname(fileURLToPath(import.meta.url)); const require = createRequire(import.meta.url); -global.binaryen = (await import("binaryen")).default; -global.assemblyscript = (await import("../index.js")).default; -const asc = (await import("../cli/asc.js")); +const asc = (await import("../cli/index.js")); const startTime = Date.now(); diff --git a/tests/packages/packages/g/test.js b/tests/packages/packages/g/test.js index 383ec3531c..b25067e0d3 100644 --- a/tests/packages/packages/g/test.js +++ b/tests/packages/packages/g/test.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -import * as asc from "../../../../cli/asc.js"; +import * as asc from "../../../../cli/index.js"; const stderr = asc.createMemoryStream(); asc.main([ diff --git a/cli/transform.d.ts b/transform.d.ts similarity index 92% rename from cli/transform.d.ts rename to transform.d.ts index c63b3cb4ee..9ae95fbad0 100644 --- a/cli/transform.d.ts +++ b/transform.d.ts @@ -3,8 +3,8 @@ * @license Apache-2.0 */ -import { Program, Parser, Module } from ".."; -import { OutputStream } from "./asc"; +import { Program, Parser, Module } from "."; +import { OutputStream } from "./cli/index"; export abstract class Transform { diff --git a/cli/transform.js b/transform.js similarity index 100% rename from cli/transform.js rename to transform.js From a0b5077aa3b92ee6dc8cb5692729afcd423e57f2 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 06:11:26 +0100 Subject: [PATCH 009/175] restructure --- asc.d.ts | 1 + asc.js | 3 +++ cli/README.md | 42 +++++++++++++++++++----------------------- cli/index.js | 2 ++ package.json | 6 +----- 5 files changed, 26 insertions(+), 28 deletions(-) create mode 100644 asc.d.ts create mode 100644 asc.js diff --git a/asc.d.ts b/asc.d.ts new file mode 100644 index 0000000000..898cb5da11 --- /dev/null +++ b/asc.d.ts @@ -0,0 +1 @@ +export * from "./cli/index"; diff --git a/asc.js b/asc.js new file mode 100644 index 0000000000..75a00c0909 --- /dev/null +++ b/asc.js @@ -0,0 +1,3 @@ +export * from "./dist/asc.js"; +import * as asc from "./dist/asc.js"; +export default asc; diff --git a/cli/README.md b/cli/README.md index b90cdf85cd..b0f2d4e710 100644 --- a/cli/README.md +++ b/cli/README.md @@ -16,38 +16,34 @@ API The API accepts the same options as the CLI but also lets you override stdout and stderr and/or provide a callback. Example: ```js -const asc = require("assemblyscript/cli/asc"); -asc.ready.then(() => { - asc.main([ - "myModule.ts", - "--binaryFile", "myModule.wasm", - "--optimize", - "--sourceMap", - "--measure" - ], { - stdout: process.stdout, - stderr: process.stderr - }, function(err) { - if (err) - throw err; - ... - }); +import asc from "assemblyscript/asc"; +asc.main([ + "myModule.ts", + "--binaryFile", "myModule.wasm", + "--optimize", + "--sourceMap", + "--measure" +], { + stdout: process.stdout, + stderr: process.stderr +}, function(err) { + if (err) throw err; + ... }); ``` -Available command line options can also be obtained programmatically: +You can also compile a source string directly, for example in a browser environment: ```js -const options = require("assemblyscript/cli/options.json"); +import asc from "assemblyscript/asc"; +const { binary, text, stdout, stderr } = asc.compileString(`...`, { optimize: 2 }); ... ``` -You can also compile a source string directly, for example in a browser environment: + +Available command line options can also be obtained programmatically: ```js -const asc = require("assemblyscript/cli/index"); -asc.ready.then(() => { - const { binary, text, stdout, stderr } = asc.compileString(`...`, { optimize: 2 }); -}); +import { options } from "assemblyscript/asc"; ... ``` diff --git a/cli/index.js b/cli/index.js index 2b8f06970e..a69abca838 100644 --- a/cli/index.js +++ b/cli/index.js @@ -1426,3 +1426,5 @@ function crash(stage, e) { ].join("")); process.exit(1); } + +export * as default from "./index.js"; diff --git a/package.json b/package.json index fb75760d73..04ab4cde3f 100644 --- a/package.json +++ b/package.json @@ -51,11 +51,7 @@ "import": "./lib/rtrace/index.js", "require": "./lib/rtrace/umd/index.js" }, - "./*": "./*.js", - "./cli/asc": "./cli/asc.js", - "./cli/util/options": "./cli/util/options.js", - "./dist/assemblyscript": "./dist/assemblyscript.js", - "./dist/asc": "./dist/asc.js" + "./*": "./*.js" }, "bin": { "asc": "bin/asc.js", From 10699dd7488a1ca56cef6473418a57306e451efc Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 06:18:38 +0100 Subject: [PATCH 010/175] restructure --- asc.d.ts | 1 + asc.js | 3 +-- index.d.ts | 3 ++- index.js | 3 +-- src/index-js.ts | 2 ++ 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/asc.d.ts b/asc.d.ts index 898cb5da11..1e70e90c82 100644 --- a/asc.d.ts +++ b/asc.d.ts @@ -1 +1,2 @@ export * from "./cli/index"; +export { default } from "./cli/index"; diff --git a/asc.js b/asc.js index 75a00c0909..557b83a8ae 100644 --- a/asc.js +++ b/asc.js @@ -1,3 +1,2 @@ export * from "./dist/asc.js"; -import * as asc from "./dist/asc.js"; -export default asc; +export { default } from "./dist/asc.js"; diff --git a/index.d.ts b/index.d.ts index c5bb6a415d..8341198e70 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,2 +1,3 @@ import "./src/glue/js/index"; -export * from "./src/index"; +export * from "./src/index-js"; +export { default } from "./src/index-js"; diff --git a/index.js b/index.js index c57d7ed8db..1cba573f8b 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,2 @@ export * from "./dist/assemblyscript.js"; -import * as assemblyscript from "./dist/assemblyscript.js"; -export default assemblyscript; +export { default } from "./dist/assemblyscript.js"; diff --git a/src/index-js.ts b/src/index-js.ts index 126a1a4136..c03709d9f3 100644 --- a/src/index-js.ts +++ b/src/index-js.ts @@ -1,2 +1,4 @@ import "./glue/js/index"; export * from "./index"; +import * as assemblyscript from "./index"; +export default assemblyscript; From 0fba4d34987625f70175c5663eb9f5fa66deb413 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 06:23:59 +0100 Subject: [PATCH 011/175] update instructions --- src/README.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/README.md b/src/README.md index 60a15098e9..b9de9c826c 100644 --- a/src/README.md +++ b/src/README.md @@ -11,30 +11,27 @@ Architecture Usage ----- -Note that using the compiler as a library requires awaiting Binaryen ready state, like so: - ```js -const binaryen = require("binaryen"); -const assemblyscript = require("assemblyscript"); -binaryen.ready.then(() => { - // do something with assemblyscript -}); +import assemblyscript from "assemblyscript"; +... ``` Building -------- -Note that building the compiler is not necessary if you only want to run it (in development). If not built, `ts-node` is used to run the sources directly. - ### Building to JavaScript -To build the compiler to a JavaScript bundle, run: +To build the compiler, run: ```sh npm run build ``` -Uses webpack under the hood, building to `dist/`. +The rebuild automatically when there are changes, do: + +```sh +npm run watch +``` ### Building to WebAssembly From 1bee65999b392dc61cfabb95f7e4edb6aa1d6559 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 06:25:45 +0100 Subject: [PATCH 012/175] update instructions --- cli/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/README.md b/cli/README.md index b0f2d4e710..57347e56c0 100644 --- a/cli/README.md +++ b/cli/README.md @@ -32,7 +32,7 @@ asc.main([ }); ``` -You can also compile a source string directly, for example in a browser environment: +You can also compile a single source string directly (note that this API has limited functionality): ```js import asc from "assemblyscript/asc"; From 4492b4a4b6faa0165635f0008bcee97e3fac3f69 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 06:27:37 +0100 Subject: [PATCH 013/175] remove generated files from source control --- .gitignore | 2 + cli/index.generated.js | 547 ---------------------------- src/diagnosticMessages.generated.ts | 370 ------------------- 3 files changed, 2 insertions(+), 917 deletions(-) delete mode 100644 cli/index.generated.js delete mode 100644 src/diagnosticMessages.generated.ts diff --git a/.gitignore b/.gitignore index 2efb8995ec..fb6f9f527b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ raw/ *.backup .vscode .idea +cli/index.generated.js +src/diagnosticMessages.generated.ts diff --git a/cli/index.generated.js b/cli/index.generated.js deleted file mode 100644 index 6c8e4246b5..0000000000 --- a/cli/index.generated.js +++ /dev/null @@ -1,547 +0,0 @@ -// GENERATED FILE. DO NOT EDIT. - -export const version = "0.0.0"; -export const options = { - "version": { - "category": "General", - "description": "Prints just the compiler's version and exits.", - "type": "b", - "alias": "v" - }, - "help": { - "category": "General", - "description": "Prints this message and exits.", - "type": "b", - "alias": "h" - }, - "noColors": { - "category": "General", - "description": "Disables terminal colors.", - "type": "b", - "default": false - }, - "config": { - "category": "General", - "description": "Configuration file to apply. CLI arguments take precedence.", - "type": "s", - "cliOnly": true - }, - "target": { - "category": "General", - "description": "Target configuration to use. Defaults to 'release'.", - "type": "s", - "cliOnly": true - }, - "optimize": { - "category": "Optimization", - "description": [ - "Optimizes the module. Typical shorthands are:", - "", - " Default optimizations -O", - " Make a release build -O --noAssert", - " Make a debug build --debug", - " Optimize for speed -Ospeed", - " Optimize for size -Osize", - "" - ], - "type": "b", - "alias": "O" - }, - "optimizeLevel": { - "category": "Optimization", - "description": "How much to focus on optimizing code. [0-3]", - "type": "i" - }, - "shrinkLevel": { - "category": "Optimization", - "description": "How much to focus on shrinking code size. [0-2, s=1, z=2]", - "type": "i" - }, - "converge": { - "category": "Optimization", - "description": "Re-optimizes until no further improvements can be made.", - "type": "b", - "default": false - }, - "noAssert": { - "category": "Optimization", - "description": "Replaces assertions with just their value without trapping.", - "type": "b", - "default": false - }, - "outFile": { - "category": "Output", - "description": "Specifies the output file. File extension indicates format.", - "type": "s", - "alias": "o", - "isPath": true - }, - "binaryFile": { - "category": "Output", - "description": "Specifies the binary output file (.wasm).", - "type": "s", - "alias": "b", - "isPath": true - }, - "textFile": { - "category": "Output", - "description": "Specifies the text output file (.wat).", - "type": "s", - "alias": "t", - "isPath": true - }, - "jsFile": { - "category": "Output", - "description": "Specifies the JavaScript (via wasm2js) output file (.js).", - "type": "s", - "alias": "j", - "isPath": true - }, - "idlFile": { - "category": "Output", - "description": "Specifies the WebIDL output file (.webidl).", - "type": "s", - "alias": "i", - "isPath": true - }, - "tsdFile": { - "category": "Output", - "description": "Specifies the TypeScript definition output file (.d.ts).", - "type": "s", - "alias": "d", - "isPath": true - }, - "sourceMap": { - "category": "Debugging", - "description": [ - "Enables source map generation. Optionally takes the URL", - "used to reference the source map from the binary file." - ], - "type": "s" - }, - "debug": { - "category": "Debugging", - "description": "Enables debug information in emitted binaries.", - "type": "b", - "default": false - }, - "importMemory": { - "category": "Features", - "description": "Imports the memory from 'env.memory'.", - "type": "b", - "default": false - }, - "noExportMemory": { - "category": "Features", - "description": "Does not export the memory as 'memory'.", - "type": "b", - "default": false - }, - "initialMemory": { - "category": "Features", - "description": "Sets the initial memory size in pages.", - "type": "i", - "default": 0 - }, - "maximumMemory": { - "category": "Features", - "description": "Sets the maximum memory size in pages.", - "type": "i", - "default": 0 - }, - "sharedMemory": { - "category": "Features", - "description": "Declare memory as shared. Requires maximumMemory.", - "type": "b", - "default": false - }, - "zeroFilledMemory": { - "category": "Features", - "description": "Assume that imported memory is zero filled. Requires importMemory.", - "type": "b", - "default": false - }, - "importTable": { - "category": "Features", - "description": "Imports the function table from 'env.table'.", - "type": "b", - "default": false - }, - "exportTable": { - "category": "Features", - "description": "Exports the function table as 'table'.", - "type": "b", - "default": false - }, - "runtime": { - "category": "Features", - "description": [ - "Specifies the runtime variant to include in the program.", - "", - " incremental TLSF + incremental GC (default)", - " minimal TLSF + lightweight GC invoked externally", - " stub Minimal runtime stub (never frees)", - " ... Path to a custom runtime implementation", - "" - ], - "type": "s", - "default": "incremental" - }, - "exportRuntime": { - "category": "Features", - "description": "Exports the runtime helpers (__new, __collect etc.).", - "type": "b", - "default": false - }, - "stackSize": { - "category": "Features", - "description": [ - "Overrides the stack size. Only relevant for incremental GC", - "or when using a custom runtime that requires stack space.", - "Defaults to 0 without and to 16384 with incremental GC." - ], - "default": 0, - "type": "i" - }, - "explicitStart": { - "category": "Features", - "description": "Exports an explicit '_start' function to call.", - "type": "b", - "default": false - }, - "enable": { - "category": "Features", - "description": [ - "Enables WebAssembly features being disabled by default.", - "", - " nontrapping-f2i Non-trapping float to integer ops.", - " bulk-memory Bulk memory operations.", - " simd SIMD types and operations.", - " threads Threading and atomic operations.", - " reference-types Reference types and operations.", - " gc Garbage collection (WIP).", - "" - ], - "TODO_doesNothingYet": [ - " exception-handling Exception handling.", - " tail-calls Tail call operations.", - " multi-value Multi value types.", - " memory64 Memory64 operations." - ], - "type": "S", - "mutuallyExclusive": "disable" - }, - "disable": { - "category": "Features", - "description": [ - "Disables WebAssembly features being enabled by default.", - "", - " mutable-globals Mutable global imports and exports.", - " sign-extension Sign-extension operations", - "" - ], - "type": "S", - "mutuallyExclusive": "enable" - }, - "use": { - "category": "Features", - "description": [ - "Aliases a global object under another name, e.g., to switch", - "the default 'Math' implementation used: --use Math=JSMath", - "Can also be used to introduce an integer constant." - ], - "type": "S", - "alias": "u" - }, - "lowMemoryLimit": { - "category": "Features", - "description": "Enforces very low (<64k) memory constraints.", - "default": 0, - "type": "i" - }, - "memoryBase": { - "category": "Linking", - "description": "Sets the start offset of emitted memory segments.", - "type": "i", - "default": 0 - }, - "tableBase": { - "category": "Linking", - "description": "Sets the start offset of emitted table elements.", - "type": "i", - "default": 0 - }, - "transform": { - "category": "API", - "description": "Specifies the path to a custom transform to 'require'.", - "type": "S", - "isPath": true, - "useNodeResolution": true - }, - "trapMode": { - "category": "Binaryen", - "description": [ - "Sets the trap mode to use.", - "", - " allow Allow trapping operations. This is the default.", - " clamp Replace trapping operations with clamping semantics.", - " js Replace trapping operations with JS semantics.", - "" - ], - "type": "s", - "default": "allow" - }, - "runPasses": { - "category": "Binaryen", - "description": [ - "Specifies additional Binaryen passes to run after other", - "optimizations, if any. See: Binaryen/src/passes/pass.cpp" - ], - "type": "s" - }, - "noValidate": { - "category": "Binaryen", - "description": "Skips validating the module using Binaryen.", - "type": "b", - "default": false - }, - "baseDir": { - "description": "Specifies the base directory of input and output files.", - "type": "s", - "default": "." - }, - "extension": { - "description": "Specifies an alternative file extension to use.", - "type": "s", - "cliOnly": true - }, - "noUnsafe": { - "description": [ - "Disallows the use of unsafe features in user code.", - "Does not affect library files and external modules." - ], - "type": "b", - "default": false - }, - "noEmit": { - "description": "Performs compilation as usual but does not emit code.", - "type": "b", - "default": false - }, - "showConfig": { - "description": "Print computed compiler options and exit.", - "type": "b", - "default": false - }, - "measure": { - "description": "Prints measuring information on I/O and compile times.", - "type": "b", - "default": false - }, - "pedantic": { - "description": "Make yourself sad for no good reason.", - "type": "b", - "default": false - }, - "lib": { - "description": [ - "Adds one or multiple paths to custom library components and", - "uses exports of all top-level files at this path as globals." - ], - "type": "S", - "isPath": true - }, - "path": { - "description": [ - "Adds one or multiple paths to package resolution, similar", - "to node_modules. Prefers an 'ascMain' entry in a package's", - "package.json and falls back to an inner 'assembly/' folder." - ], - "type": "S", - "isPath": true - }, - "traceResolution": { - "description": "Enables tracing of package resolution.", - "type": "b", - "default": false - }, - "listFiles": { - "description": "Lists files to be compiled and exits.", - "type": "b", - "default": false - }, - "wasm": { - "description": "Uses the specified Wasm binary of the compiler.", - "type": "s" - }, - " ...": { - "description": "Specifies node.js options (CLI only). See: node --help" - }, - "-Os": { - "value": { - "optimizeLevel": 0, - "shrinkLevel": 1 - } - }, - "-Oz": { - "value": { - "optimizeLevel": 0, - "shrinkLevel": 2 - } - }, - "-O0": { - "value": { - "optimizeLevel": 0, - "shrinkLevel": 0 - } - }, - "-O1": { - "value": { - "optimizeLevel": 1, - "shrinkLevel": 0 - } - }, - "-O2": { - "value": { - "optimizeLevel": 2, - "shrinkLevel": 0 - } - }, - "-O3": { - "value": { - "optimizeLevel": 3, - "shrinkLevel": 0 - } - }, - "-O0s": { - "value": { - "optimizeLevel": 0, - "shrinkLevel": 1 - } - }, - "-O1s": { - "value": { - "optimizeLevel": 1, - "shrinkLevel": 1 - } - }, - "-O2s": { - "value": { - "optimizeLevel": 2, - "shrinkLevel": 1 - } - }, - "-O3s": { - "value": { - "optimizeLevel": 3, - "shrinkLevel": 1 - } - }, - "-O0z": { - "value": { - "optimizeLevel": 0, - "shrinkLevel": 2 - } - }, - "-O1z": { - "value": { - "optimizeLevel": 1, - "shrinkLevel": 2 - } - }, - "-O2z": { - "value": { - "optimizeLevel": 2, - "shrinkLevel": 2 - } - }, - "-O3z": { - "value": { - "optimizeLevel": 3, - "shrinkLevel": 2 - } - }, - "-Ospeed": { - "value": { - "optimizeLevel": 3, - "shrinkLevel": 0 - } - }, - "-Osize": { - "value": { - "optimizeLevel": 0, - "shrinkLevel": 2, - "converge": true - } - } -}; -export const definitionFiles = { - "assembly": "/**\n * Environment definitions for compiling AssemblyScript to WebAssembly using asc.\n * @module std/assembly\n *//***/\n\n/// \n\n// Types\n\n/** An 8-bit signed integer. */\ndeclare type i8 = number;\n/** A 16-bit signed integer. */\ndeclare type i16 = number;\n/** A 32-bit signed integer. */\ndeclare type i32 = number;\n/** A 64-bit signed integer. */\ndeclare type i64 = number;\n/** A 32-bit signed integer when targeting 32-bit WebAssembly or a 64-bit signed integer when targeting 64-bit WebAssembly. */\ndeclare type isize = number;\n/** An 8-bit unsigned integer. */\ndeclare type u8 = number;\n/** A 16-bit unsigned integer. */\ndeclare type u16 = number;\n/** A 32-bit unsigned integer. */\ndeclare type u32 = number;\n/** A 64-bit unsigned integer. */\ndeclare type u64 = number;\n/** A 32-bit unsigned integer when targeting 32-bit WebAssembly or a 64-bit unsigned integer when targeting 64-bit WebAssembly. */\ndeclare type usize = number;\n/** A 1-bit unsigned integer. */\ndeclare type bool = boolean | number;\n/** A 32-bit float. */\ndeclare type f32 = number;\n/** A 64-bit float. */\ndeclare type f64 = number;\n/** A 128-bit vector. */\ndeclare type v128 = object;\n/** Function reference. */\ndeclare type funcref = object | null;\n/** External reference. */\ndeclare type externref = object | null;\n/** Any reference. */\ndeclare type anyref = object | null;\n/** Equatable reference. */\ndeclare type eqref = object | null;\n/** 31-bit integer reference. */\ndeclare type i31ref = object | null;\n/** Data reference. */\ndeclare type dataref = object | null;\n\n// Compiler hints\n\n/** Compiler target. 0 = JS, 1 = WASM32, 2 = WASM64. */\ndeclare const ASC_TARGET: i32;\n/** Runtime type. 0 = Stub, 1 = Minimal, 2 = Incremental. */\ndeclare const ASC_RUNTIME: i32;\n/** Provided noAssert option. */\ndeclare const ASC_NO_ASSERT: bool;\n/** Provided memoryBase option. */\ndeclare const ASC_MEMORY_BASE: i32;\n/** Provided tableBase option. */\ndeclare const ASC_TABLE_BASE: i32;\n/** Provided optimizeLevel option. */\ndeclare const ASC_OPTIMIZE_LEVEL: i32;\n/** Provided shrinkLevel option. */\ndeclare const ASC_SHRINK_LEVEL: i32;\n/** Provided lowMemoryLimit option. */\ndeclare const ASC_LOW_MEMORY_LIMIT: i32;\n/** Provided noExportRuntime option. */\ndeclare const ASC_NO_EXPORT_RUNTIME: i32;\n/** Whether the sign extension feature is enabled. */\ndeclare const ASC_FEATURE_SIGN_EXTENSION: bool;\n/** Whether the mutable globals feature is enabled. */\ndeclare const ASC_FEATURE_MUTABLE_GLOBALS: bool;\n/** Whether the non-trapping float-to-int feature is enabled. */\ndeclare const ASC_FEATURE_NONTRAPPING_F2I: bool;\n/** Whether the bulk memory feature is enabled. */\ndeclare const ASC_FEATURE_BULK_MEMORY: bool;\n/** Whether the SIMD feature is enabled. */\ndeclare const ASC_FEATURE_SIMD: bool;\n/** Whether the threads feature is enabled. */\ndeclare const ASC_FEATURE_THREADS: bool;\n/** Whether the exception handling feature is enabled. */\ndeclare const ASC_FEATURE_EXCEPTION_HANDLING: bool;\n/** Whether the tail calls feature is enabled. */\ndeclare const ASC_FEATURE_TAIL_CALLS: bool;\n/** Whether the reference types feature is enabled. */\ndeclare const ASC_FEATURE_REFERENCE_TYPES: bool;\n/** Whether the multi value types feature is enabled. */\ndeclare const ASC_FEATURE_MULTI_VALUE: bool;\n/** Whether the garbage collection feature is enabled. */\ndeclare const ASC_FEATURE_GC: bool;\n/** Whether the memory64 feature is enabled. */\ndeclare const ASC_FEATURE_MEMORY64: bool;\n/** Major version of the compiler. */\ndeclare const ASC_VERSION_MAJOR: i32;\n/** Minor version of the compiler. */\ndeclare const ASC_VERSION_MINOR: i32;\n/** Patch version of the compiler. */\ndeclare const ASC_VERSION_PATCH: i32;\n\n// Builtins\n\n/** Performs the sign-agnostic count leading zero bits operation on a 32-bit or 64-bit integer. All zero bits are considered leading if the value is zero. */\ndeclare function clz(value: T): T;\n/** Performs the sign-agnostic count tailing zero bits operation on a 32-bit or 64-bit integer. All zero bits are considered trailing if the value is zero. */\ndeclare function ctz(value: T): T;\n/** Performs the sign-agnostic count number of one bits operation on a 32-bit or 64-bit integer. */\ndeclare function popcnt(value: T): T;\n/** Performs the sign-agnostic rotate left operation on a 32-bit or 64-bit integer. */\ndeclare function rotl(value: T, shift: T): T;\n/** Performs the sign-agnostic rotate right operation on a 32-bit or 64-bit integer. */\ndeclare function rotr(value: T, shift: T): T;\n/** Computes the absolute value of an integer or float. */\ndeclare function abs(value: T): T;\n/** Determines the maximum of two integers or floats. If either operand is `NaN`, returns `NaN`. */\ndeclare function max(left: T, right: T): T;\n/** Determines the minimum of two integers or floats. If either operand is `NaN`, returns `NaN`. */\ndeclare function min(left: T, right: T): T;\n/** Performs the ceiling operation on a 32-bit or 64-bit float. */\ndeclare function ceil(value: T): T;\n/** Composes a 32-bit or 64-bit float from the magnitude of `x` and the sign of `y`. */\ndeclare function copysign(x: T, y: T): T;\n/** Performs the floor operation on a 32-bit or 64-bit float. */\ndeclare function floor(value: T): T;\n/** Rounds to the nearest integer tied to even of a 32-bit or 64-bit float. */\ndeclare function nearest(value: T): T;\n/** Reinterprets the bits of the specified value as type `T`. Valid reinterpretations are u32/i32 to/from f32 and u64/i64 to/from f64. */\ndeclare function reinterpret(value: number): T;\n/** Selects one of two pre-evaluated values depending on the condition. */\ndeclare function select(ifTrue: T, ifFalse: T, condition: bool): T;\n/** Calculates the square root of a 32-bit or 64-bit float. */\ndeclare function sqrt(value: T): T;\n/** Rounds to the nearest integer towards zero of a 32-bit or 64-bit float. */\ndeclare function trunc(value: T): T;\n/** Computes the sum of two integers or floats. */\ndeclare function add(left: T, right: T): T;\n/** Computes the difference of two integers or floats. */\ndeclare function sub(left: T, right: T): T;\n/** Computes the product of two integers or floats. */\ndeclare function mul(left: T, right: T): T;\n/** Computes the quotient of two integers or floats. */\ndeclare function div(left: T, right: T): T;\n/** Loads a value of the specified type from memory. Equivalent to dereferncing a pointer in other languages. */\ndeclare function load(ptr: usize, immOffset?: usize, immAlign?: usize): T;\n/** Stores a value of the specified type to memory. Equivalent to dereferencing a pointer in other languages when assigning a value. */\ndeclare function store(ptr: usize, value: T, immOffset?: usize, immAlign?: usize): void;\n/** Emits an unreachable operation that results in a runtime error when executed. Both a statement and an expression. */\ndeclare function unreachable(): never;\n\n/** NaN (not a number) as a 32-bit or 64-bit float depending on context. */\ndeclare const NaN: f32 | f64;\n/** Positive infinity as a 32-bit or 64-bit float depending on context. */\ndeclare const Infinity: f32 | f64;\n/** Data end offset. */\ndeclare const __data_end: usize;\n/** Stack pointer offset. */\ndeclare var __stack_pointer: usize;\n/** Heap base offset. */\ndeclare const __heap_base: usize;\n/** Determines the byte size of the specified underlying core type. Compiles to a constant. */\ndeclare function sizeof(): usize;\n/** Determines the alignment (log2) of the specified underlying core type. Compiles to a constant. */\ndeclare function alignof(): usize;\n/** Determines the end offset of the given class type. Compiles to a constant. */\ndeclare function offsetof(): usize;\n/** Determines the offset of the specified field within the given class type. Compiles to a constant. */\ndeclare function offsetof(fieldName: keyof T | string): usize;\n/** Determines the offset of the specified field within the given class type. Returns the class type's end offset if field name has been omitted. Compiles to a constant. */\ndeclare function offsetof(fieldName?: string): usize;\n/** Determines the name of a given type. */\ndeclare function nameof(value?: T): string;\n/** Determines the unique runtime id of a class type. Compiles to a constant. */\ndeclare function idof(): u32;\n/** Changes the type of any value of `usize` kind to another one of `usize` kind. Useful for casting class instances to their pointer values and vice-versa. Beware that this is unsafe.*/\ndeclare function changetype(value: any): T;\n/** Explicitly requests no bounds checks on the provided expression. Useful for array accesses. */\ndeclare function unchecked(value: T): T;\n/** Emits a `call_indirect` instruction, calling the specified function in the function table by index with the specified arguments. Does result in a runtime error if the arguments do not match the called function. */\ndeclare function call_indirect(index: u32, ...args: unknown[]): T;\n/** Instantiates a new instance of `T` using the specified constructor arguments. */\ndeclare function instantiate(...args: any[]): T;\n/** Tests if a 32-bit or 64-bit float is `NaN`. */\ndeclare function isNaN(value: T): bool;\n/** Tests if a 32-bit or 64-bit float is finite, that is not `NaN` or +/-`Infinity`. */\ndeclare function isFinite(value: T): bool;\n/** Tests if the specified type *or* expression is of an integer type and not a reference. Compiles to a constant. */\ndeclare function isInteger(value?: any): value is number;\n/** Tests if the specified type *or* expression is of a float type. Compiles to a constant. */\ndeclare function isFloat(value?: any): value is number;\n/** Tests if the specified type *or* expression is of a boolean type. */\ndeclare function isBoolean(value?: any): value is number;\n/** Tests if the specified type *or* expression can represent negative numbers. Compiles to a constant. */\ndeclare function isSigned(value?: any): value is number;\n/** Tests if the specified type *or* expression is of a reference type. Compiles to a constant. */\ndeclare function isReference(value?: any): value is object | string;\n/** Tests if the specified type *or* expression can be used as a string. Compiles to a constant. */\ndeclare function isString(value?: any): value is string | String;\n/** Tests if the specified type *or* expression can be used as an array. Compiles to a constant. */\ndeclare function isArray(value?: any): value is Array;\n/** Tests if the specified type *or* expression can be used as an array like object. Compiles to a constant. */\ndeclare function isArrayLike(value?: any): value is ArrayLike;\n/** Tests if the specified type *or* expression is of a function type. Compiles to a constant. */\ndeclare function isFunction(value?: any): value is (...args: any) => any;\n/** Tests if the specified type *or* expression is of a nullable reference type. Compiles to a constant. */\ndeclare function isNullable(value?: any): bool;\n/** Tests if the specified expression resolves to a defined element. Compiles to a constant. */\ndeclare function isDefined(expression: any): bool;\n/** Tests if the specified expression evaluates to a constant value. Compiles to a constant. */\ndeclare function isConstant(expression: any): bool;\n/** Tests if the specified type *or* expression is of a managed type. Compiles to a constant. */\ndeclare function isManaged(value?: any): bool;\n/** Tests if the specified type is void. Compiles to a constant. */\ndeclare function isVoid(): bool;\n/** Traps if the specified value is not true-ish, otherwise returns the (non-nullable) value. */\ndeclare function assert(isTrueish: T, message?: string): T & (object | string | number); // any better way to model `: T != null`?\n/** Parses an integer string to a 64-bit float. */\ndeclare function parseInt(str: string, radix?: i32): f64;\n/** Parses a string to a 64-bit float. */\ndeclare function parseFloat(str: string): f64;\n/** Returns the 64-bit floating-point remainder of `x/y`. */\ndeclare function fmod(x: f64, y: f64): f64;\n/** Returns the 32-bit floating-point remainder of `x/y`. */\ndeclare function fmodf(x: f32, y: f32): f32;\n/** Returns the number of parameters in the given function signature type. */\ndeclare function lengthof any>(func?: T): i32;\n/** Encodes a text string as a valid Uniform Resource Identifier (URI). */\ndeclare function encodeURI(str: string): string;\n/** Encodes a text string as a valid component of a Uniform Resource Identifier (URI). */\ndeclare function encodeURIComponent(str: string): string;\n/** Decodes a Uniform Resource Identifier (URI) previously created by encodeURI. */\ndeclare function decodeURI(str: string): string;\n/** Decodes a Uniform Resource Identifier (URI) component previously created by encodeURIComponent. */\ndeclare function decodeURIComponent(str: string): string;\n\n/** Atomic operations. */\ndeclare namespace atomic {\n /** Atomically loads an integer value from memory and returns it. */\n export function load(ptr: usize, immOffset?: usize): T;\n /** Atomically stores an integer value to memory. */\n export function store(ptr: usize, value: T, immOffset?: usize): void;\n /** Atomically adds an integer value in memory. */\n export function add(ptr: usize, value: T, immOffset?: usize): T;\n /** Atomically subtracts an integer value in memory. */\n export function sub(ptr: usize, value: T, immOffset?: usize): T;\n /** Atomically performs a bitwise AND operation on an integer value in memory. */\n export function and(ptr: usize, value: T, immOffset?: usize): T;\n /** Atomically performs a bitwise OR operation on an integer value in memory. */\n export function or(ptr: usize, value: T, immOffset?: usize): T;\n /** Atomically performs a bitwise XOR operation on an integer value in memory. */\n export function xor(ptr: usize, value: T, immOffset?: usize): T;\n /** Atomically exchanges an integer value in memory. */\n export function xchg(ptr: usize, value: T, immOffset?: usize): T;\n /** Atomically compares and exchanges an integer value in memory if the condition is met. */\n export function cmpxchg(ptr: usize, expected: T, replacement: T, immOffset?: usize): T;\n /** Performs a wait operation on an address in memory suspending this agent if the integer condition is met. */\n export function wait(ptr: usize, expected: T, timeout?: i64): AtomicWaitResult;\n /** Performs a notify operation on an address in memory waking up suspended agents. */\n export function notify(ptr: usize, count?: i32): i32;\n /** Performs a fence operation, preserving synchronization guarantees of higher level languages. */\n export function fence(): void;\n}\n\n/** Describes the result of an atomic wait operation. */\ndeclare enum AtomicWaitResult {\n /** Woken by another agent. */\n OK,\n /** Loaded value did not match the expected value. */\n NOT_EQUAL,\n /** Not woken before the timeout expired. */\n TIMED_OUT\n}\n\n/** Converts any other numeric value to an 8-bit signed integer. */\ndeclare function i8(value: any): i8;\ndeclare namespace i8 {\n /** Smallest representable value. */\n export const MIN_VALUE: i8;\n /** Largest representable value. */\n export const MAX_VALUE: i8;\n}\n/** Converts any other numeric value to a 16-bit signed integer. */\ndeclare function i16(value: any): i16;\ndeclare namespace i16 {\n /** Smallest representable value. */\n export const MIN_VALUE: i16;\n /** Largest representable value. */\n export const MAX_VALUE: i16;\n}\n/** Converts any other numeric value to a 32-bit signed integer. */\ndeclare function i32(value: any): i32;\ndeclare namespace i32 {\n /** Smallest representable value. */\n export const MIN_VALUE: i32;\n /** Largest representable value. */\n export const MAX_VALUE: i32;\n /** Loads an 8-bit signed integer value from memory and returns it as a 32-bit integer. */\n export function load8_s(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n /** Loads an 8-bit unsigned integer value from memory and returns it as a 32-bit integer. */\n export function load8_u(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n /** Loads a 16-bit signed integer value from memory and returns it as a 32-bit integer. */\n export function load16_s(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n /** Loads a 16-bit unsigned integer value from memory and returns it as a 32-bit integer. */\n export function load16_u(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n /** Loads a 32-bit integer value from memory. */\n export function load(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n /** Stores a 32-bit integer value to memory as an 8-bit integer. */\n export function store8(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n /** Stores a 32-bit integer value to memory as a 16-bit integer. */\n export function store16(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n /** Stores a 32-bit integer value to memory. */\n export function store(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n /** Performs the sign-agnostic count leading zero bits operation on a 32-bit integer. All zero bits are considered leading if the value is zero. */\n export function clz(value: i32): i32;\n /** Performs the sign-agnostic count tailing zero bits operation on a 32-bit integer. All zero bits are considered trailing if the value is zero. */\n export function ctz(value: i32): i32;\n /** Performs the sign-agnostic count number of one bits operation on a 32-bit integer. */\n export function popcnt(value: i32): i32;\n /** Performs the sign-agnostic rotate left operation on a 32-bit integer. */\n export function rotl(value: i32, shift: i32): i32;\n /** Performs the sign-agnostic rotate right operation on a 32-bit integer. */\n export function rotr(value: i32, shift: i32): i32;\n /** Reinterprets the bits of the specified 32-bit float as a 32-bit integer. */\n export function reinterpret_f32(value: f32): i32;\n /** Computes the sum of two 32-bit integers. */\n export function add(left: i32, right: i32): i32;\n /** Computes the difference of two 32-bit integers. */\n export function sub(left: i32, right: i32): i32;\n /** Computes the product of two 32-bit integers. */\n export function mul(left: i32, right: i32): i32;\n /** Computes the signed quotient of two 32-bit integers. */\n export function div_s(left: i32, right: i32): i32;\n /** Computes the unsigned quotient of two 32-bit integers. */\n export function div_u(left: i32, right: i32): i32;\n /** Atomic 32-bit integer operations. */\n export namespace atomic {\n /** Atomically loads an 8-bit unsigned integer value from memory and returns it as a 32-bit integer. */\n export function load8_u(ptr: usize, immOffset?: usize): i32;\n /** Atomically loads a 16-bit unsigned integer value from memory and returns it as a 32-bit integer. */\n export function load16_u(ptr: usize, immOffset?: usize): i32;\n /** Atomically loads a 32-bit integer value from memory and returns it. */\n export function load(ptr: usize, immOffset?: usize): i32;\n /** Atomically stores a 32-bit integer value to memory as an 8-bit integer. */\n export function store8(ptr: usize, value: i32, immOffset?: usize): void;\n /** Atomically stores a 32-bit integer value to memory as a 16-bit integer. */\n export function store16(ptr: usize, value: i32, immOffset?: usize): void;\n /** Atomically stores a 32-bit integer value to memory. */\n export function store(ptr: usize, value: i32, immOffset?: usize): void;\n /** Performs a wait operation on a 32-bit integer value in memory suspending this agent if the condition is met. */\n export function wait(ptr: usize, expected: i32, timeout?: i64): AtomicWaitResult;\n /** Atomic 32-bit integer read-modify-write operations on 8-bit values. */\n export namespace rmw8 {\n /** Atomically adds an 8-bit unsigned integer value in memory. */\n export function add_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically subtracts an 8-bit unsigned integer value in memory. */\n export function sub_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise AND operation an 8-bit unsigned integer value in memory. */\n export function and_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise OR operation an 8-bit unsigned integer value in memory. */\n export function or_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise XOR operation an 8-bit unsigned integer value in memory. */\n export function xor_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically exchanges an 8-bit unsigned integer value in memory. */\n export function xchg_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically compares and exchanges an 8-bit unsigned integer value in memory if the condition is met. */\n export function cmpxchg_u(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n /** Atomic 32-bit integer read-modify-write operations on 16-bit values. */\n export namespace rmw16 {\n /** Atomically adds a 16-bit unsigned integer value in memory. */\n export function add_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically adds a 16-bit unsigned integer value in memory. */\n export function sub_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise AND operation a 16-bit unsigned integer value in memory. */\n export function and_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise OR operation a 16-bit unsigned integer value in memory. */\n export function or_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise XOR operation a 16-bit unsigned integer value in memory. */\n export function xor_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically exchanges a 16-bit unsigned integer value in memory. */\n export function xchg_u(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically compares and exchanges a 16-bit unsigned integer value in memory if the condition is met. */\n export function cmpxchg_u(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n /** Atomic 32-bit integer read-modify-write operations. */\n export namespace rmw {\n /** Atomically adds a 32-bit integer value in memory. */\n export function add(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically subtracts a 32-bit integer value in memory. */\n export function sub(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise AND operation a 32-bit integer value in memory. */\n export function and(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise OR operation a 32-bit integer value in memory. */\n export function or(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically performs a bitwise XOR operation a 32-bit integer value in memory. */\n export function xor(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically exchanges a 32-bit integer value in memory. */\n export function xchg(ptr: usize, value: i32, immOffset?: usize): i32;\n /** Atomically compares and exchanges a 32-bit integer value in memory if the condition is met. */\n export function cmpxchg(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n }\n}\n/** Converts any other numeric value to a 64-bit signed integer. */\ndeclare function i64(value: any): i64;\ndeclare namespace i64 {\n /** Smallest representable value. */\n export const MIN_VALUE: i64;\n /** Largest representable value. */\n export const MAX_VALUE: i64;\n /** Loads an 8-bit signed integer value from memory and returns it as a 64-bit integer. */\n export function load8_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n /** Loads an 8-bit unsigned integer value from memory and returns it as a 64-bit integer. */\n export function load8_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n /** Loads a 16-bit signed integer value from memory and returns it as a 64-bit integer. */\n export function load16_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n /** Loads a 16-bit unsigned integer value from memory and returns it as a 64-bit integer. */\n export function load16_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n /** Loads a 32-bit signed integer value from memory and returns it as a 64-bit integer. */\n export function load32_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n /** Loads a 32-bit unsigned integer value from memory and returns it as a 64-bit integer. */\n export function load32_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n /** Loads a 64-bit unsigned integer value from memory. */\n export function load(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n /** Stores a 64-bit integer value to memory as an 8-bit integer. */\n export function store8(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n /** Stores a 64-bit integer value to memory as a 16-bit integer. */\n export function store16(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n /** Stores a 64-bit integer value to memory as a 32-bit integer. */\n export function store32(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n /** Stores a 64-bit integer value to memory. */\n export function store(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n /** Performs the sign-agnostic count leading zero bits operation on a 64-bit integer. All zero bits are considered leading if the value is zero. */\n export function clz(value: i64): i64;\n /** Performs the sign-agnostic count tailing zero bits operation on a 64-bit integer. All zero bits are considered trailing if the value is zero. */\n export function ctz(value: i64): i64;\n /** Performs the sign-agnostic count number of one bits operation on a 64-bit integer. */\n export function popcnt(value: i64): i64;\n /** Performs the sign-agnostic rotate left operation on a 64-bit integer. */\n export function rotl(value: i64, shift: i64): i64;\n /** Performs the sign-agnostic rotate right operation on a 64-bit integer. */\n export function rotr(value: i64, shift: i64): i64;\n /** Reinterprets the bits of the specified 64-bit float as a 64-bit integer. */\n export function reinterpret_f64(value: f64): i64;\n /** Computes the sum of two 64-bit integers. */\n export function add(left: i64, right: i64): i64;\n /** Computes the difference of two 64-bit integers. */\n export function sub(left: i64, right: i64): i64;\n /** Computes the product of two 64-bit integers. */\n export function mul(left: i64, right: i64): i64;\n /** Computes the signed quotient of two 64-bit integers. */\n export function div_s(left: i64, right: i64): i64;\n /** Computes the unsigned quotient of two 64-bit integers. */\n export function div_u(left: i64, right: i64): i64;\n /** Atomic 64-bit integer operations. */\n export namespace atomic {\n /** Atomically loads an 8-bit unsigned integer value from memory and returns it as a 64-bit integer. */\n export function load8_u(ptr: usize, immOffset?: usize): i64;\n /** Atomically loads a 16-bit unsigned integer value from memory and returns it as a 64-bit integer. */\n export function load16_u(ptr: usize, immOffset?: usize): i64;\n /** Atomically loads a 32-bit unsigned integer value from memory and returns it as a 64-bit integer. */\n export function load32_u(ptr: usize, immOffset?: usize): i64;\n /** Atomically loads a 64-bit integer value from memory and returns it. */\n export function load(ptr: usize, immOffset?: usize): i64;\n /** Atomically stores a 64-bit integer value to memory as an 8-bit integer. */\n export function store8(ptr: usize, value: i64, immOffset?: usize): void;\n /** Atomically stores a 64-bit integer value to memory as a 16-bit integer. */\n export function store16(ptr: usize, value: i64, immOffset?: usize): void;\n /** Atomically stores a 64-bit integer value to memory as a 32-bit integer. */\n export function store32(ptr: usize, value: i64, immOffset?: usize): void;\n /** Atomically stores a 64-bit integer value to memory. */\n export function store(ptr: usize, value: i64, immOffset?: usize): void;\n /** Performs a wait operation on a 64-bit integer value in memory suspending this agent if the condition is met. */\n export function wait(ptr: usize, expected: i64, timeout?: i64): AtomicWaitResult;\n /** Atomic 64-bit integer read-modify-write operations on 8-bit values. */\n export namespace rmw8 {\n /** Atomically adds an 8-bit unsigned integer value in memory. */\n export function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically subtracts an 8-bit unsigned integer value in memory. */\n export function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise AND operation on an 8-bit unsigned integer value in memory. */\n export function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise OR operation on an 8-bit unsigned integer value in memory. */\n export function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise XOR operation on an 8-bit unsigned integer value in memory. */\n export function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically exchanges an 8-bit unsigned integer value in memory. */\n export function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically compares and exchanges an 8-bit unsigned integer value in memory if the condition is met. */\n export function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n /** Atomic 64-bit integer read-modify-write operations on 16-bit values. */\n export namespace rmw16 {\n /** Atomically adds a 16-bit unsigned integer value in memory. */\n export function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically subtracts a 16-bit unsigned integer value in memory. */\n export function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise AND operation on a 16-bit unsigned integer value in memory. */\n export function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise OR operation on a 16-bit unsigned integer value in memory. */\n export function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise XOR operation on a 16-bit unsigned integer value in memory. */\n export function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically exchanges a 16-bit unsigned integer value in memory. */\n export function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically compares and exchanges a 16-bit unsigned integer value in memory if the condition is met. */\n export function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n /** Atomic 64-bit integer read-modify-write operations on 32-bit values. */\n export namespace rmw32 {\n /** Atomically adds a 32-bit unsigned integer value in memory. */\n export function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically subtracts a 32-bit unsigned integer value in memory. */\n export function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise AND operation on a 32-bit unsigned integer value in memory. */\n export function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise OR operation on a 32-bit unsigned integer value in memory. */\n export function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise XOR operation on a 32-bit unsigned integer value in memory. */\n export function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically exchanges a 32-bit unsigned integer value in memory. */\n export function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically compares and exchanges a 32-bit unsigned integer value in memory if the condition is met. */\n export function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n /** Atomic 64-bit integer read-modify-write operations. */\n export namespace rmw {\n /** Atomically adds a 64-bit integer value in memory. */\n export function add(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically subtracts a 64-bit integer value in memory. */\n export function sub(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise AND operation on a 64-bit integer value in memory. */\n export function and(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise OR operation on a 64-bit integer value in memory. */\n export function or(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically performs a bitwise XOR operation on a 64-bit integer value in memory. */\n export function xor(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically exchanges a 64-bit integer value in memory. */\n export function xchg(ptr: usize, value: i64, immOffset?: usize): i64;\n /** Atomically compares and exchanges a 64-bit integer value in memory if the condition is met. */\n export function cmpxchg(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n }\n}\n/** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) signed integer. */\ndeclare var isize: typeof i32 | typeof i64;\n/** Converts any other numeric value to an 8-bit unsigned integer. */\ndeclare function u8(value: any): u8;\ndeclare namespace u8 {\n /** Smallest representable value. */\n export const MIN_VALUE: u8;\n /** Largest representable value. */\n export const MAX_VALUE: u8;\n}\n/** Converts any other numeric value to a 16-bit unsigned integer. */\ndeclare function u16(value: any): u16;\ndeclare namespace u16 {\n /** Smallest representable value. */\n export const MIN_VALUE: u16;\n /** Largest representable value. */\n export const MAX_VALUE: u16;\n}\n/** Converts any other numeric value to a 32-bit unsigned integer. */\ndeclare function u32(value: any): u32;\ndeclare namespace u32 {\n /** Smallest representable value. */\n export const MIN_VALUE: u32;\n /** Largest representable value. */\n export const MAX_VALUE: u32;\n}\n/** Converts any other numeric value to a 64-bit unsigned integer. */\ndeclare function u64(value: any): u64;\ndeclare namespace u64 {\n /** Smallest representable value. */\n export const MIN_VALUE: u64;\n /** Largest representable value. */\n export const MAX_VALUE: u64;\n}\n/** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) unsigned integer. */\ndeclare var usize: typeof u32 | typeof u64;\n/** Converts any other numeric value to a 1-bit unsigned integer. */\ndeclare function bool(value: any): bool;\ndeclare namespace bool {\n /** Smallest representable value. */\n export const MIN_VALUE: bool;\n /** Largest representable value. */\n export const MAX_VALUE: bool;\n}\n/** Converts any other numeric value to a 32-bit float. */\ndeclare function f32(value: any): f32;\ndeclare namespace f32 {\n /** Smallest representable value. */\n export const MIN_VALUE: f32;\n /** Largest representable value. */\n export const MAX_VALUE: f32;\n /** Smallest normalized positive value. */\n export const MIN_NORMAL_VALUE: f32;\n /** Smallest safely representable integer value. */\n export const MIN_SAFE_INTEGER: f32;\n /** Largest safely representable integer value. */\n export const MAX_SAFE_INTEGER: f32;\n /** Positive infinity value. */\n export const POSITIVE_INFINITY: f32;\n /** Negative infinity value. */\n export const NEGATIVE_INFINITY: f32;\n /** Not a number value. */\n export const NaN: f32;\n /** Difference between 1 and the smallest representable value greater than 1. */\n export const EPSILON: f32;\n /** Loads a 32-bit float from memory. */\n export function load(ptr: usize, immOffset?: usize, immAlign?: usize): f32;\n /** Stores a 32-bit float to memory. */\n export function store(ptr: usize, value: f32, immOffset?: usize, immAlign?: usize): void;\n /** Computes the sum of two 32-bit floats. */\n export function add(left: f32, right: f32): f32;\n /** Computes the difference of two 32-bit floats. */\n export function sub(left: f32, right: f32): f32;\n /** Computes the product of two 32-bit floats. */\n export function mul(left: f32, right: f32): f32;\n /** Computes the quotient of two 32-bit floats. */\n export function div(left: f32, right: f32): f32;\n /** Computes the absolute value of a 32-bit float. */\n export function abs(value: f32): f32;\n /** Determines the maximum of two 32-bit floats. If either operand is `NaN`, returns `NaN`. */\n export function max(left: f32, right: f32): f32;\n /** Determines the minimum of two 32-bit floats. If either operand is `NaN`, returns `NaN`. */\n export function min(left: f32, right: f32): f32;\n /** Performs the ceiling operation on a 32-bit float. */\n export function ceil(value: f32): f32;\n /** Composes a 32-bit float from the magnitude of `x` and the sign of `y`. */\n export function copysign(x: f32, y: f32): f32;\n /** Performs the floor operation on a 32-bit float. */\n export function floor(value: f32): f32;\n /** Rounds to the nearest integer tied to even of a 32-bit float. */\n export function nearest(value: f32): f32;\n /** Reinterprets the bits of the specified 32-bit integer as a 32-bit float. */\n export function reinterpret_i32(value: i32): f32;\n /** Calculates the square root of a 32-bit float. */\n export function sqrt(value: f32): f32;\n /** Rounds to the nearest integer towards zero of a 32-bit float. */\n export function trunc(value: f32): f32;\n}\n/** Converts any other numeric value to a 64-bit float. */\ndeclare function f64(value: any): f64;\ndeclare namespace f64 {\n /** Smallest representable value. */\n export const MIN_VALUE: f64;\n /** Largest representable value. */\n export const MAX_VALUE: f64;\n /** Smallest normalized positive value. */\n export const MIN_NORMAL_VALUE: f64;\n /** Smallest safely representable integer value. */\n export const MIN_SAFE_INTEGER: f64;\n /** Largest safely representable integer value. */\n export const MAX_SAFE_INTEGER: f64;\n /** Positive infinity value. */\n export const POSITIVE_INFINITY: f64;\n /** Negative infinity value. */\n export const NEGATIVE_INFINITY: f64;\n /** Not a number value. */\n export const NaN: f64;\n /** Difference between 1 and the smallest representable value greater than 1. */\n export const EPSILON: f64;\n /** Loads a 64-bit float from memory. */\n export function load(ptr: usize, immOffset?: usize, immAlign?: usize): f64;\n /** Stores a 64-bit float to memory. */\n export function store(ptr: usize, value: f64, immOffset?: usize, immAlign?: usize): void;\n /** Computes the sum of two 64-bit floats. */\n export function add(left: f64, right: f64): f64;\n /** Computes the difference of two 64-bit floats. */\n export function sub(left: f64, right: f64): f64;\n /** Computes the product of two 64-bit floats. */\n export function mul(left: f64, right: f64): f64;\n /** Computes the quotient of two 64-bit floats. */\n export function div(left: f64, right: f64): f64;\n /** Computes the absolute value of a 64-bit float. */\n export function abs(value: f64): f64;\n /** Determines the maximum of two 64-bit floats. If either operand is `NaN`, returns `NaN`. */\n export function max(left: f64, right: f64): f64;\n /** Determines the minimum of two 64-bit floats. If either operand is `NaN`, returns `NaN`. */\n export function min(left: f64, right: f64): f64;\n /** Performs the ceiling operation on a 64-bit float. */\n export function ceil(value: f64): f64;\n /** Composes a 64-bit float from the magnitude of `x` and the sign of `y`. */\n export function copysign(x: f64, y: f64): f64;\n /** Performs the floor operation on a 64-bit float. */\n export function floor(value: f64): f64;\n /** Rounds to the nearest integer tied to even of a 64-bit float. */\n export function nearest(value: f64): f64;\n /** Reinterprets the bits of the specified 64-bit integer as a 64-bit float. */\n export function reinterpret_i64(value: i64): f64;\n /** Calculates the square root of a 64-bit float. */\n export function sqrt(value: f64): f64;\n /** Rounds to the nearest integer towards zero of a 64-bit float. */\n export function trunc(value: f64): f64;\n}\n/** Initializes a 128-bit vector from sixteen 8-bit integer values. Arguments must be compile-time constants. */\ndeclare function v128(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8): v128;\ndeclare namespace v128 {\n /** Creates a vector with identical lanes. */\n export function splat(x: T): v128;\n /** Extracts one lane as a scalar. */\n export function extract_lane(x: v128, idx: u8): T;\n /** Replaces one lane. */\n export function replace_lane(x: v128, idx: u8, value: T): v128;\n /** Selects lanes from either vector according to the specified lane indexes. */\n export function shuffle(a: v128, b: v128, ...lanes: u8[]): v128;\n /** Selects 8-bit lanes from the first vector according to the indexes [0-15] specified by the 8-bit lanes of the second vector. */\n export function swizzle(a: v128, s: v128): v128;\n /** Loads a vector from memory. */\n export function load(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Creates a vector by loading the lanes of the specified type and extending each to the next larger type. */\n export function load_ext(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Creates a vector by loading a value of the specified type into the lowest bits and initializing all other bits of the vector to zero. */\n export function load_zero(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a single lane from memory into the specified lane of the given vector. Other lanes are bypassed as is. */\n export function load_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Stores the single lane at the specified index of the given vector to memory. */\n export function store_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Creates a vector with eight 16-bit integer lanes by loading and sign extending eight 8-bit integers. */\n export function load8x8_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n /** Creates a vector with eight 16-bit integer lanes by loading and zero extending eight 8-bit integers. */\n export function load8x8_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n /** Creates a vector with four 32-bit integer lanes by loading and sign extending four 16-bit integers. */\n export function load16x4_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n /** Creates a vector with four 32-bit integer lanes by loading and zero extending four 16-bit integers. */\n export function load16x4_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n /** Creates a vector with two 64-bit integer lanes by loading and sign extending two 32-bit integers. */\n export function load32x2_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n /** Creates a vector with two 64-bit integer lanes by loading and zero extending two 32-bit integers. */\n export function load32x2_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n /** Creates a vector with identical lanes by loading the splatted value. */\n export function load_splat(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Loads an 8-bit integer and splats it sixteen times forming a new vector. */\n export function load8_splat(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a 16-bit integer and splats it eight times forming a new vector. */\n export function load16_splat(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a 32-bit integer and splats it four times forming a new vector. */\n export function load32_splat(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a 64-bit integer and splats it two times forming a new vector. */\n export function load64_splat(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Creates a vector by loading a 32-bit value into the lowest bits and initializing all other bits of the vector to zero. */\n export function load32_zero(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Creates a vector by loading a 64-bit value into the lowest bits and initializing all other bits of the vector to zero. */\n export function load64_zero(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a single 8-bit lane from memory into the specified lane of the given vector. Other lanes are bypassed as is. */\n export function load8_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a single 16-bit lane from memory into the specified lane of the given vector. Other lanes are bypassed as is. */\n export function load16_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a single 32-bit lane from memory into the specified lane of the given vector. Other lanes are bypassed as is. */\n export function load32_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Loads a single 64-bit lane from memory into the specified lane of the given vector. Other lanes are bypassed as is. */\n export function load64_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Stores the 8-bit lane at the specified lane of the given vector to memory. */\n export function store8_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Stores the 16-bit lane at the specified lane of the given vector to memory. */\n export function store16_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Stores the 32-bit lane at the specified lane of the given vector to memory. */\n export function store32_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Stores the 64-bit lane at the specified lane of the given vector to memory. */\n export function store64_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n /** Stores a vector to memory. */\n export function store(ptr: usize, value: v128, immOffset?: usize, immAlign?: usize): void;\n /** Adds each lane. */\n export function add(a: v128, b: v128): v128;\n /** Subtracts each lane. */\n export function sub(a: v128, b: v128): v128;\n /** Multiplies each lane. */\n export function mul(a: v128, b: v128): v128; // except i64\n /** Divides each lane. */\n export function div(a: v128, b: v128): v128;\n /** Negates each lane of a vector. */\n export function neg(a: v128): v128;\n /** Adds each lane using saturation. */\n export function add_sat(a: v128, b: v128): v128;\n /** Subtracts each lane using saturation. */\n export function sub_sat(a: v128, b: v128): v128;\n /** Performs a bitwise left shift on each lane of a vector by a scalar. */\n export function shl(a: v128, b: i32): v128;\n /** Performs a bitwise right shift on each lane of a vector by a scalar. */\n export function shr(a: v128, b: i32): v128;\n /** Performs the bitwise AND operation on two vectors. */\n export function and(a: v128, b: v128): v128;\n /** Performs the bitwise OR operation on two vectors. */\n export function or(a: v128, b: v128): v128;\n /** Performs the bitwise XOR operation on two vectors. */\n export function xor(a: v128, b: v128): v128;\n /** Performs the bitwise ANDNOT operation on two vectors. */\n export function andnot(a: v128, b: v128): v128;\n /** Performs the bitwise NOT operation on a vector. */\n export function not(a: v128): v128;\n /** Selects bits of either vector according to the specified mask. */\n export function bitselect(v1: v128, v2: v128, mask: v128): v128;\n /** Reduces a vector to a scalar indicating whether any lane is considered `true`. */\n export function any_true(a: v128): bool;\n /** Reduces a vector to a scalar indicating whether all lanes are considered `true`. */\n export function all_true(a: v128): bool;\n /** Extracts the high bit of each lane and produces a scalar mask with all bits concatenated. */\n export function bitmask(a: v128): i32;\n /** Counts the number of bits set to one within each lane. */\n export function popcnt(a: v128): v128;\n /** Computes the minimum of each lane. */\n export function min(a: v128, b: v128): v128;\n /** Computes the maximum of each lane. */\n export function max(a: v128, b: v128): v128;\n /** Computes the pseudo-minimum of each lane. */\n export function pmin(a: v128, b: v128): v128;\n /** Computes the pseudo-maximum of each lane. */\n export function pmax(a: v128, b: v128): v128;\n /** Computes the dot product of two lanes each, yielding lanes one size wider than the input. */\n export function dot(a: v128, b: v128): v128;\n /** Computes the average of each lane. */\n export function avgr(a: v128, b: v128): v128;\n /** Computes the absolute value of each lane. */\n export function abs(a: v128): v128;\n /** Computes the square root of each lane. */\n export function sqrt(a: v128): v128;\n /** Performs the ceiling operation on each lane. */\n export function ceil(a: v128): v128;\n /** Performs the floor operation on each lane. */\n export function floor(a: v128): v128;\n /** Rounds to the nearest integer towards zero of each lane. */\n export function trunc(a: v128): v128;\n /** Rounds to the nearest integer tied to even of each lane. */\n export function nearest(a: v128): v128;\n /** Computes which lanes are equal. */\n export function eq(a: v128, b: v128): v128;\n /** Computes which lanes are not equal. */\n export function ne(a: v128, b: v128): v128;\n /** Computes which lanes of the first vector are less than those of the second. */\n export function lt(a: v128, b: v128): v128;\n /** Computes which lanes of the first vector are less than or equal those of the second. */\n export function le(a: v128, b: v128): v128;\n /** Computes which lanes of the first vector are greater than those of the second. */\n export function gt(a: v128, b: v128): v128;\n /** Computes which lanes of the first vector are greater than or equal those of the second. */\n export function ge(a: v128, b: v128): v128;\n /** Converts each lane of a vector from integer to single-precision floating point. */\n export function convert(a: v128): v128;\n /** Converts the low lanes of a vector from integer to double-precision floating point. */\n export function convert_low(a: v128): v128;\n /** Truncates each lane of a vector from single-precision floating point to integer with saturation. Takes the target type. */\n export function trunc_sat(a: v128): v128;\n /** Truncates each lane of a vector from double-precision floating point to integer with saturation. Takes the target type. */\n export function trunc_sat_zero(a: v128): v128;\n /** Narrows each lane to their respective narrower lanes. */\n export function narrow(a: v128, b: v128): v128;\n /** Extends the low lanes of a vector to their respective wider lanes. */\n export function extend_low(a: v128): v128;\n /** Extends the high lanes of a vector to their respective wider lanes. */\n export function extend_high(a: v128): v128;\n /** Adds lanes pairwise producing twice wider extended results. */\n export function extadd_pairwise(a: v128): v128;\n /** Demotes each float lane to lower precision. The higher lanes of the result are initialized to zero. */\n export function demote_zero(a: v128): v128;\n /** Promotes the lower float lanes to higher precision. */\n export function promote_low(a: v128): v128;\n /** Performs the line-wise saturating rounding multiplication in Q15 format. */\n export function q15mulr_sat(a: v128, b: v128): v128;\n /** Performs the lane-wise integer extended multiplication of the lower lanes producing a twice wider result than the inputs. */\n export function extmul_low(a: v128, b: v128): v128;\n /** Performs the lane-wise integer extended multiplication of the higher lanes producing a twice wider result than the inputs. */\n export function extmul_high(a: v128, b: v128): v128;\n}\n/** Initializes a 128-bit vector from sixteen 8-bit integer values. Arguments must be compile-time constants. */\ndeclare function i8x16(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8): v128;\ndeclare namespace i8x16 {\n /** Creates a vector with sixteen identical 8-bit integer lanes. */\n export function splat(x: i8): v128;\n /** Extracts one 8-bit integer lane as a signed scalar. */\n export function extract_lane_s(x: v128, idx: u8): i8;\n /** Extracts one 8-bit integer lane as an unsigned scalar. */\n export function extract_lane_u(x: v128, idx: u8): u8;\n /** Replaces one 8-bit integer lane. */\n export function replace_lane(x: v128, idx: u8, value: i8): v128;\n /** Adds each 8-bit integer lane. */\n export function add(a: v128, b: v128): v128;\n /** Subtracts each 8-bit integer lane. */\n export function sub(a: v128, b: v128): v128;\n /** Computes the signed minimum of each 8-bit integer lane. */\n export function min_s(a: v128, b: v128): v128;\n /** Computes the unsigned minimum of each 8-bit integer lane. */\n export function min_u(a: v128, b: v128): v128;\n /** Computes the signed maximum of each 8-bit integer lane. */\n export function max_s(a: v128, b: v128): v128;\n /** Computes the unsigned maximum of each 8-bit integer lane. */\n export function max_u(a: v128, b: v128): v128;\n /** Computes the unsigned average of each 8-bit integer lane. */\n export function avgr_u(a: v128, b: v128): v128;\n /** Computes the absolute value of each 8-bit integer lane. */\n export function abs(a: v128): v128;\n /** Negates each 8-bit integer lane. */\n export function neg(a: v128): v128;\n /** Adds each 8-bit integer lane using signed saturation. */\n export function add_sat_s(a: v128, b: v128): v128;\n /** Adds each 8-bit integer lane using unsigned saturation. */\n export function add_sat_u(a: v128, b: v128): v128;\n /** Subtracts each 8-bit integer lane using signed saturation. */\n export function sub_sat_s(a: v128, b: v128): v128;\n /** Subtracts each 8-bit integer lane using unsigned saturation. */\n export function sub_sat_u(a: v128, b: v128): v128;\n /** Performs a bitwise left shift on each 8-bit integer lane by a scalar. */\n export function shl(a: v128, b: i32): v128;\n /** Performs a bitwise arithmetic right shift on each 8-bit integer lane by a scalar. */\n export function shr_s(a: v128, b: i32): v128;\n /** Performs a bitwise logical right shift on each 8-bit integer lane by a scalar. */\n export function shr_u(a: v128, b: i32): v128;\n /** Reduces a vector to a scalar indicating whether all 8-bit integer lanes are considered `true`. */\n export function all_true(a: v128): bool;\n /** Extracts the high bit of each 8-bit integer lane and produces a scalar mask with all bits concatenated. */\n export function bitmask(a: v128): i32;\n /** Counts the number of bits set to one within each 8-bit integer lane. */\n export function popcnt(a: v128): v128;\n /** Computes which 8-bit integer lanes are equal. */\n export function eq(a: v128, b: v128): v128;\n /** Computes which 8-bit integer lanes are not equal. */\n export function ne(a: v128, b: v128): v128;\n /** Computes which 8-bit signed integer lanes of the first vector are less than those of the second. */\n export function lt_s(a: v128, b: v128): v128;\n /** Computes which 8-bit unsigned integer lanes of the first vector are less than those of the second. */\n export function lt_u(a: v128, b: v128): v128;\n /** Computes which 8-bit signed integer lanes of the first vector are less than or equal those of the second. */\n export function le_s(a: v128, b: v128): v128;\n /** Computes which 8-bit unsigned integer lanes of the first vector are less than or equal those of the second. */\n export function le_u(a: v128, b: v128): v128;\n /** Computes which 8-bit signed integer lanes of the first vector are greater than those of the second. */\n export function gt_s(a: v128, b: v128): v128;\n /** Computes which 8-bit unsigned integer lanes of the first vector are greater than those of the second. */\n export function gt_u(a: v128, b: v128): v128;\n /** Computes which 8-bit signed integer lanes of the first vector are greater than or equal those of the second. */\n export function ge_s(a: v128, b: v128): v128;\n /** Computes which 8-bit unsigned integer lanes of the first vector are greater than or equal those of the second. */\n export function ge_u(a: v128, b: v128): v128;\n /** Narrows each 16-bit signed integer lane to 8-bit signed integer lanes. */\n export function narrow_i16x8_s(a: v128, b: v128): v128;\n /** Narrows each 16-bit signed integer lane to 8-bit unsigned integer lanes. */\n export function narrow_i16x8_u(a: v128, b: v128): v128;\n /** Selects 8-bit lanes from either vector according to the specified [0-15] respectively [16-31] lane indexes. */\n export function shuffle(a: v128, b: v128, l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8, l8: u8, l9: u8, l10: u8, l11: u8, l12: u8, l13: u8, l14: u8, l15: u8): v128;\n /** Selects 8-bit lanes from the first vector according to the indexes [0-15] specified by the 8-bit lanes of the second vector. */\n export function swizzle(a: v128, s: v128): v128;\n}\n/** Initializes a 128-bit vector from eight 16-bit integer values. Arguments must be compile-time constants. */\ndeclare function i16x8(a: i16, b: i16, c: i16, d: i16, e: i16, f: i16, g: i16, h: i16): v128;\ndeclare namespace i16x8 {\n /** Creates a vector with eight identical 16-bit integer lanes. */\n export function splat(x: i16): v128;\n /** Extracts one 16-bit integer lane as a signed scalar. */\n export function extract_lane_s(x: v128, idx: u8): i16;\n /** Extracts one 16-bit integer lane as an unsigned scalar. */\n export function extract_lane_u(x: v128, idx: u8): u16;\n /** Replaces one 16-bit integer lane. */\n export function replace_lane(x: v128, idx: u8, value: i16): v128;\n /** Adds each 16-bit integer lane. */\n export function add(a: v128, b: v128): v128;\n /** Subtracts each 16-bit integer lane. */\n export function sub(a: v128, b: v128): v128;\n /** Multiplies each 16-bit integer lane. */\n export function mul(a: v128, b: v128): v128;\n /** Computes the signed minimum of each 16-bit integer lane. */\n export function min_s(a: v128, b: v128): v128;\n /** Computes the unsigned minimum of each 16-bit integer lane. */\n export function min_u(a: v128, b: v128): v128;\n /** Computes the signed maximum of each 16-bit integer lane. */\n export function max_s(a: v128, b: v128): v128;\n /** Computes the unsigned maximum of each 16-bit integer lane. */\n export function max_u(a: v128, b: v128): v128;\n /** Computes the unsigned average of each 16-bit integer lane. */\n export function avgr_u(a: v128, b: v128): v128;\n /** Computes the absolute value of each 16-bit integer lane. */\n export function abs(a: v128): v128;\n /** Negates each 16-bit integer lane. */\n export function neg(a: v128): v128;\n /** Adds each 16-bit integer lane using signed saturation. */\n export function add_sat_s(a: v128, b: v128): v128;\n /** Adds each 16-bit integer lane using unsigned saturation. */\n export function add_sat_u(a: v128, b: v128): v128;\n /** Subtracts each 16-bit integer lane using signed saturation. */\n export function sub_sat_s(a: v128, b: v128): v128;\n /** Subtracts each 16-bit integer lane using unsigned saturation. */\n export function sub_sat_u(a: v128, b: v128): v128;\n /** Performs a bitwise left shift on each 16-bit integer lane by a scalar. */\n export function shl(a: v128, b: i32): v128;\n /** Performs a bitwise arithmetic right shift each 16-bit integer lane by a scalar. */\n export function shr_s(a: v128, b: i32): v128;\n /** Performs a bitwise logical right shift on each 16-bit integer lane by a scalar. */\n export function shr_u(a: v128, b: i32): v128;\n /** Reduces a vector to a scalar indicating whether all 16-bit integer lanes are considered `true`. */\n export function all_true(a: v128): bool;\n /** Extracts the high bit of each 16-bit integer lane and produces a scalar mask with all bits concatenated. */\n export function bitmask(a: v128): i32;\n /** Computes which 16-bit integer lanes are equal. */\n export function eq(a: v128, b: v128): v128;\n /** Computes which 16-bit integer lanes are not equal. */\n export function ne(a: v128, b: v128): v128;\n /** Computes which 16-bit signed integer lanes of the first vector are less than those of the second. */\n export function lt_s(a: v128, b: v128): v128;\n /** Computes which 16-bit unsigned integer lanes of the first vector are less than those of the second. */\n export function lt_u(a: v128, b: v128): v128;\n /** Computes which 16-bit signed integer lanes of the first vector are less than or equal those of the second. */\n export function le_s(a: v128, b: v128): v128;\n /** Computes which 16-bit unsigned integer lanes of the first vector are less than or equal those of the second. */\n export function le_u(a: v128, b: v128): v128;\n /** Computes which 16-bit signed integer lanes of the first vector are greater than those of the second. */\n export function gt_s(a: v128, b: v128): v128;\n /** Computes which 16-bit unsigned integer lanes of the first vector are greater than those of the second. */\n export function gt_u(a: v128, b: v128): v128;\n /** Computes which 16-bit signed integer lanes of the first vector are greater than or equal those of the second. */\n export function ge_s(a: v128, b: v128): v128;\n /** Computes which 16-bit unsigned integer lanes of the first vector are greater than or equal those of the second. */\n export function ge_u(a: v128, b: v128): v128;\n /** Narrows each 32-bit signed integer lane to 16-bit signed integer lanes. */\n export function narrow_i32x4_s(a: v128, b: v128): v128;\n /** Narrows each 32-bit signed integer lane to 16-bit unsigned integer lanes. */\n export function narrow_i32x4_u(a: v128, b: v128): v128;\n /** Extends the low 8-bit signed integer lanes to 16-bit signed integer lanes. */\n export function extend_low_i8x16_s(a: v128): v128;\n /** Extends the low 8-bit unsigned integer lanes to 16-bit unsigned integer lanes. */\n export function extend_low_i8x16_u(a: v128): v128;\n /** Extends the high 8-bit signed integer lanes to 16-bit signed integer lanes. */\n export function extend_high_i8x16_s(a: v128): v128;\n /** Extends the high 8-bit unsigned integer lanes to 16-bit unsigned integer lanes. */\n export function extend_high_i8x16_u(a: v128): v128;\n /** Adds the sixteen 8-bit signed integer lanes pairwise producing eight 16-bit signed integer results. */\n export function extadd_pairwise_i8x16_s(a: v128): v128;\n /** Adds the sixteen 8-bit unsigned integer lanes pairwise producing eight 16-bit unsigned integer results. */\n export function extadd_pairwise_i8x16_u(a: v128): v128;\n /** Performs the line-wise 16-bit signed integer saturating rounding multiplication in Q15 format. */\n export function q15mulr_sat_s(a: v128, b: v128): v128;\n /** Performs the lane-wise 8-bit signed integer extended multiplication of the eight lower lanes producing twice wider 16-bit integer results. */\n export function extmul_low_i8x16_s(a: v128, b: v128): v128;\n /** Performs the lane-wise 8-bit unsigned integer extended multiplication of the eight lower lanes producing twice wider 16-bit integer results. */\n export function extmul_low_i8x16_u(a: v128, b: v128): v128;\n /** Performs the lane-wise 8-bit signed integer extended multiplication of the eight higher lanes producing twice wider 16-bit integer results. */\n export function extmul_high_i8x16_s(a: v128, b: v128): v128;\n /** Performs the lane-wise 8-bit unsigned integer extended multiplication of the eight higher lanes producing twice wider 16-bit integer results. */\n export function extmul_high_i8x16_u(a: v128, b: v128): v128;\n}\n/** Initializes a 128-bit vector from four 32-bit integer values. Arguments must be compile-time constants. */\ndeclare function i32x4(a: i32, b: i32, c: i32, d: i32): v128;\ndeclare namespace i32x4 {\n /** Creates a vector with four identical 32-bit integer lanes. */\n export function splat(x: i32): v128;\n /** Extracts one 32-bit integer lane as a scalar. */\n export function extract_lane(x: v128, idx: u8): i32;\n /** Replaces one 32-bit integer lane. */\n export function replace_lane(x: v128, idx: u8, value: i32): v128;\n /** Adds each 32-bit integer lane. */\n export function add(a: v128, b: v128): v128;\n /** Subtracts each 32-bit integer lane. */\n export function sub(a: v128, b: v128): v128;\n /** Multiplies each 32-bit integer lane. */\n export function mul(a: v128, b: v128): v128;\n /** Computes the signed minimum of each 32-bit integer lane. */\n export function min_s(a: v128, b: v128): v128;\n /** Computes the unsigned minimum of each 32-bit integer lane. */\n export function min_u(a: v128, b: v128): v128;\n /** Computes the signed maximum of each 32-bit integer lane. */\n export function max_s(a: v128, b: v128): v128;\n /** Computes the unsigned maximum of each 32-bit integer lane. */\n export function max_u(a: v128, b: v128): v128;\n /** Computes the dot product of two 16-bit integer lanes each, yielding 32-bit integer lanes. */\n export function dot_i16x8_s(a: v128, b: v128): v128;\n /** Computes the absolute value of each 32-bit integer lane. */\n export function abs(a: v128): v128;\n /** Negates each 32-bit integer lane. */\n export function neg(a: v128): v128;\n /** Performs a bitwise left shift on each 32-bit integer lane by a scalar. */\n export function shl(a: v128, b: i32): v128;\n /** Performs a bitwise arithmetic right shift on each 32-bit integer lane by a scalar. */\n export function shr_s(a: v128, b: i32): v128;\n /** Performs a bitwise logical right shift on each 32-bit integer lane by a scalar. */\n export function shr_u(a: v128, b: i32): v128;\n /** Reduces a vector to a scalar indicating whether all 32-bit integer lanes are considered `true`. */\n export function all_true(a: v128): bool;\n /** Extracts the high bit of each 32-bit integer lane and produces a scalar mask with all bits concatenated. */\n export function bitmask(a: v128): i32;\n /** Computes which 32-bit integer lanes are equal. */\n export function eq(a: v128, b: v128): v128;\n /** Computes which 32-bit integer lanes are not equal. */\n export function ne(a: v128, b: v128): v128;\n /** Computes which 32-bit signed integer lanes of the first vector are less than those of the second. */\n export function lt_s(a: v128, b: v128): v128;\n /** Computes which 32-bit unsigned integer lanes of the first vector are less than those of the second. */\n export function lt_u(a: v128, b: v128): v128;\n /** Computes which 32-bit signed integer lanes of the first vector are less than or equal those of the second. */\n export function le_s(a: v128, b: v128): v128;\n /** Computes which 32-bit unsigned integer lanes of the first vector are less than or equal those of the second. */\n export function le_u(a: v128, b: v128): v128;\n /** Computes which 32-bit signed integer lanes of the first vector are greater than those of the second. */\n export function gt_s(a: v128, b: v128): v128;\n /** Computes which 32-bit unsigned integer lanes of the first vector are greater than those of the second. */\n export function gt_u(a: v128, b: v128): v128;\n /** Computes which 32-bit signed integer lanes of the first vector are greater than or equal those of the second. */\n export function ge_s(a: v128, b: v128): v128;\n /** Computes which 32-bit unsigned integer lanes of the first vector are greater than or equal those of the second. */\n export function ge_u(a: v128, b: v128): v128;\n /** Truncates each 32-bit float lane to a signed integer with saturation. */\n export function trunc_sat_f32x4_s(a: v128): v128;\n /** Truncates each 32-bit float lane to an unsigned integer with saturation. */\n export function trunc_sat_f32x4_u(a: v128): v128;\n /** Truncates the two 64-bit float lanes to the two lower signed integer lanes with saturation. The two higher integer lanes of the result are initialized to zero. */\n export function trunc_sat_f64x2_s_zero(a: v128): v128;\n /** Truncates the two 64-bit float lanes to the two lower unsigned integer lanes with saturation. The two higher integer lanes of the result are initialized to zero. */\n export function trunc_sat_f64x2_u_zero(a: v128): v128;\n /** Extends the low 16-bit signed integer lanes to 32-bit signed integer lanes. */\n export function extend_low_i16x8_s(a: v128): v128;\n /** Extends the low 16-bit unsigned integer lane to 32-bit unsigned integer lanes. */\n export function extend_low_i16x8_u(a: v128): v128;\n /** Extends the high 16-bit signed integer lanes to 32-bit signed integer lanes. */\n export function extend_high_i16x8_s(a: v128): v128;\n /** Extends the high 16-bit unsigned integer lanes to 32-bit unsigned integer lanes. */\n export function extend_high_i16x8_u(a: v128): v128;\n /** Adds the eight 16-bit signed integer lanes pairwise producing four 32-bit signed integer results. */\n export function extadd_pairwise_i16x8_s(a: v128): v128;\n /** Adds the eight 16-bit unsigned integer lanes pairwise producing four 32-bit unsigned integer results. */\n export function extadd_pairwise_i16x8_u(a: v128): v128;\n /** Performs the lane-wise 16-bit signed integer extended multiplication of the four lower lanes producing twice wider 32-bit integer results. */\n export function extmul_low_i16x8_s(a: v128, b: v128): v128;\n /** Performs the lane-wise 16-bit unsigned integer extended multiplication of the four lower lanes producing twice wider 32-bit integer results. */\n export function extmul_low_i16x8_u(a: v128, b: v128): v128;\n /** Performs the lane-wise 16-bit signed integer extended multiplication of the four higher lanes producing twice wider 32-bit integer results. */\n export function extmul_high_i16x8_s(a: v128, b: v128): v128;\n /** Performs the lane-wise 16-bit unsigned integer extended multiplication of the four higher lanes producing twice wider 32-bit integer results. */\n export function extmul_high_i16x8_u(a: v128, b: v128): v128;\n}\n/** Initializes a 128-bit vector from two 64-bit integer values. Arguments must be compile-time constants. */\ndeclare function i64x2(a: i64, b: i64): v128;\ndeclare namespace i64x2 {\n /** Creates a vector with two identical 64-bit integer lanes. */\n export function splat(x: i64): v128;\n /** Extracts one 64-bit integer lane as a scalar. */\n export function extract_lane(x: v128, idx: u8): i64;\n /** Replaces one 64-bit integer lane. */\n export function replace_lane(x: v128, idx: u8, value: i64): v128;\n /** Adds each 64-bit integer lane. */\n export function add(a: v128, b: v128): v128;\n /** Subtracts each 64-bit integer lane. */\n export function sub(a: v128, b: v128): v128;\n /** Multiplies each 64-bit integer lane. */\n export function mul(a: v128, b: v128): v128;\n /** Computes the absolute value of each 64-bit integer lane. */\n export function abs(a: v128): v128;\n /** Negates each 64-bit integer lane. */\n export function neg(a: v128): v128;\n /** Performs a bitwise left shift on each 64-bit integer lane by a scalar. */\n export function shl(a: v128, b: i32): v128;\n /** Performs a bitwise arithmetic right shift on each 64-bit integer lane by a scalar. */\n export function shr_s(a: v128, b: i32): v128;\n /** Performs a bitwise logical right shift on each 64-bit integer lane by a scalar. */\n export function shr_u(a: v128, b: i32): v128;\n /** Reduces a vector to a scalar indicating whether all 64-bit integer lanes are considered `true`. */\n export function all_true(a: v128): bool;\n /** Extracts the high bit of each 64-bit integer lane and produces a scalar mask with all bits concatenated. */\n export function bitmask(a: v128): i32;\n /** Computes which 64-bit integer lanes are equal. */\n export function eq(a: v128, b: v128): v128;\n /** Computes which 64-bit integer lanes are not equal. */\n export function ne(a: v128, b: v128): v128;\n /** Computes which 64-bit signed integer lanes of the first vector are less than those of the second. */\n export function lt_s(a: v128, b: v128): v128;\n /** Computes which 64-bit signed integer lanes of the first vector are less than or equal those of the second. */\n export function le_s(a: v128, b: v128): v128;\n /** Computes which 64-bit signed integer lanes of the first vector are greater than those of the second. */\n export function gt_s(a: v128, b: v128): v128;\n /** Computes which 64-bit signed integer lanes of the first vector are greater than or equal those of the second. */\n export function ge_s(a: v128, b: v128): v128;\n /** Extends the low 32-bit signed integer lanes to 64-bit signed integer lanes. */\n export function extend_low_i32x4_s(a: v128): v128;\n /** Extends the low 32-bit unsigned integer lane to 64-bit unsigned integer lanes. */\n export function extend_low_i32x4_u(a: v128): v128;\n /** Extends the high 32-bit signed integer lanes to 64-bit signed integer lanes. */\n export function extend_high_i32x4_s(a: v128): v128;\n /** Extends the high 32-bit unsigned integer lanes to 64-bit unsigned integer lanes. */\n export function extend_high_i32x4_u(a: v128): v128;\n /** Performs the lane-wise 32-bit signed integer extended multiplication of the two lower lanes producing twice wider 64-bit integer results. */\n export function extmul_low_i32x4_s(a: v128, b: v128): v128;\n /** Performs the lane-wise 32-bit unsigned integer extended multiplication of the two lower lanes producing twice wider 64-bit integer results. */\n export function extmul_low_i32x4_u(a: v128, b: v128): v128;\n /** Performs the lane-wise 32-bit signed integer extended multiplication of the two higher lanes producing twice wider 64-bit integer results. */\n export function extmul_high_i32x4_s(a: v128, b: v128): v128;\n /** Performs the lane-wise 32-bit unsigned integer extended multiplication of the two higher lanes producing twice wider 64-bit integer results. */\n export function extmul_high_i32x4_u(a: v128, b: v128): v128;\n}\n/** Initializes a 128-bit vector from four 32-bit float values. Arguments must be compile-time constants. */\ndeclare function f32x4(a: f32, b: f32, c: f32, d: f32): v128;\ndeclare namespace f32x4 {\n /** Creates a vector with four identical 32-bit float lanes. */\n export function splat(x: f32): v128;\n /** Extracts one 32-bit float lane as a scalar. */\n export function extract_lane(x: v128, idx: u8): f32;\n /** Replaces one 32-bit float lane. */\n export function replace_lane(x: v128, idx: u8, value: f32): v128;\n /** Adds each 32-bit float lane. */\n export function add(a: v128, b: v128): v128;\n /** Subtracts each 32-bit float lane. */\n export function sub(a: v128, b: v128): v128;\n /** Multiplies each 32-bit float lane. */\n export function mul(a: v128, b: v128): v128;\n /** Divides each 32-bit float lane. */\n export function div(a: v128, b: v128): v128;\n /** Negates each 32-bit float lane. */\n export function neg(a: v128): v128;\n /** Computes the minimum of each 32-bit float lane. */\n export function min(a: v128, b: v128): v128;\n /** Computes the maximum of each 32-bit float lane. */\n export function max(a: v128, b: v128): v128;\n /** Computes the pseudo-minimum of each 32-bit float lane. */\n export function pmin(a: v128, b: v128): v128;\n /** Computes the pseudo-maximum of each 32-bit float lane. */\n export function pmax(a: v128, b: v128): v128;\n /** Computes the absolute value of each 32-bit float lane. */\n export function abs(a: v128): v128;\n /** Computes the square root of each 32-bit float lane. */\n export function sqrt(a: v128): v128;\n /** Performs the ceiling operation on each 32-bit float lane. */\n export function ceil(a: v128): v128;\n /** Performs the floor operation on each each 32-bit float lane. */\n export function floor(a: v128): v128;\n /** Rounds to the nearest integer towards zero of each 32-bit float lane. */\n export function trunc(a: v128): v128;\n /** Rounds to the nearest integer tied to even of each 32-bit float lane. */\n export function nearest(a: v128): v128;\n /** Computes which 32-bit float lanes are equal. */\n export function eq(a: v128, b: v128): v128;\n /** Computes which 32-bit float lanes are not equal. */\n export function ne(a: v128, b: v128): v128;\n /** Computes which 32-bit float lanes of the first vector are less than those of the second. */\n export function lt(a: v128, b: v128): v128;\n /** Computes which 32-bit float lanes of the first vector are less than or equal those of the second. */\n export function le(a: v128, b: v128): v128;\n /** Computes which 32-bit float lanes of the first vector are greater than those of the second. */\n export function gt(a: v128, b: v128): v128;\n /** Computes which 32-bit float lanes of the first vector are greater than or equal those of the second. */\n export function ge(a: v128, b: v128): v128;\n /** Converts each 32-bit signed integer lane of a vector to single-precision floating point. */\n export function convert_i32x4_s(a: v128): v128;\n /** Converts each 32-bit unsigned integer lane of a vector to single-precision floating point. */\n export function convert_i32x4_u(a: v128): v128;\n /** Demotes each 64-bit float lane of a vector to single-precision. The higher lanes of the result are initialized to zero. */\n export function demote_f64x2_zero(a: v128): v128;\n}\n/** Initializes a 128-bit vector from two 64-bit float values. Arguments must be compile-time constants. */\ndeclare function f64x2(a: f64, b: f64): v128;\ndeclare namespace f64x2 {\n /** Creates a vector with two identical 64-bit float lanes. */\n export function splat(x: f64): v128;\n /** Extracts one 64-bit float lane as a scalar. */\n export function extract_lane(x: v128, idx: u8): f64;\n /** Replaces one 64-bit float lane. */\n export function replace_lane(x: v128, idx: u8, value: f64): v128;\n /** Adds each 64-bit float lane. */\n export function add(a: v128, b: v128): v128;\n /** Subtracts each 64-bit float lane. */\n export function sub(a: v128, b: v128): v128;\n /** Multiplies each 64-bit float lane. */\n export function mul(a: v128, b: v128): v128;\n /** Divides each 64-bit float lane. */\n export function div(a: v128, b: v128): v128;\n /** Negates each 64-bit float lane. */\n export function neg(a: v128): v128;\n /** Computes the minimum of each 64-bit float lane. */\n export function min(a: v128, b: v128): v128;\n /** Computes the maximum of each 64-bit float lane. */\n export function max(a: v128, b: v128): v128;\n /** Computes the pseudo-minimum of each 64-bit float lane. */\n export function pmin(a: v128, b: v128): v128;\n /** Computes the pseudo-maximum of each 64-bit float lane. */\n export function pmax(a: v128, b: v128): v128;\n /** Computes the absolute value of each 64-bit float lane. */\n export function abs(a: v128): v128;\n /** Computes the square root of each 64-bit float lane. */\n export function sqrt(a: v128): v128;\n /** Performs the ceiling operation on each 64-bit float lane. */\n export function ceil(a: v128): v128;\n /** Performs the floor operation on each each 64-bit float lane. */\n export function floor(a: v128): v128;\n /** Rounds to the nearest integer towards zero of each 64-bit float lane. */\n export function trunc(a: v128): v128;\n /** Rounds to the nearest integer tied to even of each 64-bit float lane. */\n export function nearest(a: v128): v128;\n /** Computes which 64-bit float lanes are equal. */\n export function eq(a: v128, b: v128): v128;\n /** Computes which 64-bit float lanes are not equal. */\n export function ne(a: v128, b: v128): v128;\n /** Computes which 64-bit float lanes of the first vector are less than those of the second. */\n export function lt(a: v128, b: v128): v128;\n /** Computes which 64-bit float lanes of the first vector are less than or equal those of the second. */\n export function le(a: v128, b: v128): v128;\n /** Computes which 64-bit float lanes of the first vector are greater than those of the second. */\n export function gt(a: v128, b: v128): v128;\n /** Computes which 64-bit float lanes of the first vector are greater than or equal those of the second. */\n export function ge(a: v128, b: v128): v128;\n /** Converts the low 32-bit signed integer lanes of a vector to double-precision floating point. */\n export function convert_low_i32x4_s(a: v128): v128;\n /** Converts the low 32-bit unsigned integer lanes of a vector to double-precision floating point. */\n export function convert_low_i32x4_u(a: v128): v128;\n /** Promotes the low 32-bit float lanes of a vector to double-precision. */\n export function promote_low_f32x4(a: v128): v128;\n}\n\ndeclare abstract class i31 {\n /** Creates a new i31ref from the specified integer value. */\n static new(value: i32): i31ref;\n /** Gets the integer value of an i31ref. */\n static get(i31expr: i31ref): i32;\n}\n\n/** Macro type evaluating to the underlying native WebAssembly type. */\ndeclare type native = T;\n/** Special type evaluating the indexed access index type. */\ndeclare type indexof = keyof T;\n/** Special type evaluating the indexed access value type. */\ndeclare type valueof = T[0];\n/** A special type evaluated to the return type of T if T is a callable function. */\ndeclare type ReturnType any> = T extends (...args: any) => infer R ? R : any;\n/** A special type evaluated to the return type of T if T is a callable function. */\ndeclare type returnof any> = ReturnType;\n/** A special type that excludes null and undefined from T. */\ndeclare type NonNullable = T extends null | undefined ? never : T;\n/** A special type that excludes null and undefined from T. */\ndeclare type nonnull = NonNullable;\n\n/** Pseudo-class representing the backing class of integer types. */\n/** @internal */\ndeclare class _Integer {\n /** Smallest representable value. */\n static readonly MIN_VALUE: number;\n /** Largest representable value. */\n static readonly MAX_VALUE: number;\n /** Converts a string to an integer of this type. */\n static parseInt(value: string, radix?: number): number;\n /** Converts this integer to a string. */\n toString(radix?: number): string;\n}\n\n/** Pseudo-class representing the backing class of floating-point types. */\n/** @internal */\ndeclare class _Float {\n /** Difference between 1 and the smallest representable value greater than 1. */\n static readonly EPSILON: f32 | f64;\n /** Smallest representable value. */\n static readonly MIN_VALUE: f32 | f64;\n /** Largest representable value. */\n static readonly MAX_VALUE: f32 | f64;\n /** Smallest safely representable integer value. */\n static readonly MIN_SAFE_INTEGER: f32 | f64;\n /** Largest safely representable integer value. */\n static readonly MAX_SAFE_INTEGER: f32 | f64;\n /** Value representing positive infinity. */\n static readonly POSITIVE_INFINITY: f32 | f64;\n /** Value representing negative infinity. */\n static readonly NEGATIVE_INFINITY: f32 | f64;\n /** Value representing 'not a number'. */\n static readonly NaN: f32 | f64;\n /** Returns a boolean value that indicates whether a value is the reserved value NaN (not a number). */\n static isNaN(value: f32 | f64): bool;\n /** Returns true if passed value is finite. */\n static isFinite(value: f32 | f64): bool;\n /** Returns true if the value passed is a safe integer. */\n static isSafeInteger(value: f32 | f64): bool;\n /** Returns true if the value passed is an integer, false otherwise. */\n static isInteger(value: f32 | f64): bool;\n /** Converts a string to an integer. */\n static parseInt(value: string, radix?: i32): f32 | f64;\n /** Converts a string to a floating-point number. */\n static parseFloat(value: string): f32 | f64;\n /** Converts this floating-point number to a string. */\n toString(radix?: number): string;\n}\n\n/** Backing class of signed 8-bit integers. */\ndeclare const I8: typeof _Integer;\n/** Backing class of signed 16-bit integers. */\ndeclare const I16: typeof _Integer;\n/** Backing class of signed 32-bit integers. */\ndeclare const I32: typeof _Integer;\n/** Backing class of signed 64-bit integers. */\ndeclare const I64: typeof _Integer;\n/** Backing class of signed size integers. */\ndeclare const Isize: typeof _Integer;\n/** Backing class of unsigned 8-bit integers. */\ndeclare const U8: typeof _Integer;\n/** Backing class of unsigned 16-bit integers. */\ndeclare const U16: typeof _Integer;\n/** Backing class of unsigned 32-bit integers. */\ndeclare const U32: typeof _Integer;\n/** Backing class of unsigned 64-bit integers. */\ndeclare const U64: typeof _Integer;\n/** Backing class of unsigned size integers. */\ndeclare const Usize: typeof _Integer;\n/** Backing class of 32-bit floating-point values. */\ndeclare const F32: typeof _Float;\n/** Backing class of 64-bit floating-point values. */\ndeclare const F64: typeof _Float;\n\n// User-defined diagnostic macros\n\n/** Emits a user-defined diagnostic error when encountered. */\ndeclare function ERROR(message?: any): never;\n/** Emits a user-defined diagnostic warning when encountered. */\ndeclare function WARNING(message?: any): void;\n/** Emits a user-defined diagnostic info when encountered. */\ndeclare function INFO(message?: any): void;\n\n// Polyfills\n\n/** Performs the sign-agnostic reverse bytes **/\ndeclare function bswap(value: T): T;\n/** Performs the sign-agnostic reverse bytes only for last 16-bit **/\ndeclare function bswap16(value: T): T;\n\n// Standard library\n\n/** Memory operations. */\ndeclare namespace memory {\n /** Whether the memory managed interface is implemented. */\n export const implemented: bool;\n /** Returns the current memory size in units of pages. One page is 64kb. */\n export function size(): i32;\n /** Grows linear memory by a given unsigned delta of pages. One page is 64kb. Returns the previous memory size in units of pages or `-1` on failure. */\n export function grow(value: i32): i32;\n /** Sets n bytes beginning at the specified destination in memory to the specified byte value. */\n export function fill(dst: usize, value: u8, count: usize): void;\n /** Copies n bytes from the specified source to the specified destination in memory. These regions may overlap. */\n export function copy(dst: usize, src: usize, n: usize): void;\n /** Repeats `src` of length `srcLength` `count` times at `dst`. */\n export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void;\n /** Copies elements from a passive element segment to a table. */\n export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void;\n /** Prevents further use of a passive element segment. */\n export function drop(segmentIndex: u32): void;\n /** Compares two chunks of memory. Returns `0` if equal, otherwise the difference of the first differing bytes. */\n export function compare(vl: usize, vr: usize, n: usize): i32;\n /** Gets a pointer to a zeroed static chunk of memory of the given size. Alignment defaults to `16`. Arguments must be compile-time constants. */\n export function data(size: i32, align?: i32): usize;\n /** Gets a pointer to a pre-initialized static chunk of memory. Alignment defaults to the size of `T`. Arguments must be compile-time constants. */\n export function data(values: T[], align?: i32): usize;\n}\n\n/** Heap memory interface. */\ndeclare namespace heap {\n /** Allocates a chunk of memory of at least the specified size. */\n export function alloc(size: usize): usize;\n /** Reallocates a chunk of memory to have at least the specified size. */\n export function realloc(ptr: usize, size: usize): usize;\n /** Frees a chunk of memory. Does hardly anything (most recent block only) with the stub/none runtime. */\n export function free(ptr: usize): void;\n}\n\n/** Table operations. */\ndeclare namespace table {\n /** Copies elements from a passive element segment to a table. */\n export function init(elementIndex: u32, srcOffset: u32, dstOffset: u32, n: u32): void;\n /** Prevents further use of a passive element segment. */\n export function drop(elementIndex: u32): void;\n /** Copies elements from one region of a table to another region. */\n export function copy(dest: u32, src: u32, n: u32): void;\n}\n\ndeclare namespace Atomics {\n export function load(array: TypedArray, index: i32): T;\n export function store(array: TypedArray, index: i32, value: T): void;\n export function add(array: TypedArray, index: i32, value: T): T;\n export function sub(array: TypedArray, index: i32, value: T): T;\n export function and(array: TypedArray, index: i32, value: T): T;\n export function or(array: TypedArray, index: i32, value: T): T;\n export function xor(array: TypedArray, index: i32, value: T): T;\n export function exchange(array: TypedArray, index: i32, value: T): T;\n export function compareExchange(array: TypedArray, index: i32, expectedValue: T, replacementValue: T): T;\n export function wait(array: TypedArray, value: T, timeout?: i64): AtomicWaitResult;\n export function notify(array: TypedArray, index: i32, count?: i32): i32;\n /** The static Atomics.isLockFree() method is used to determine whether to use locks or atomic operations. It returns true, if the given size is one of the BYTES_PER_ELEMENT */\n export function isLockFree(size: usize): bool;\n}\n\n/** Class representing a generic, fixed-length raw binary data buffer. */\ndeclare class ArrayBuffer {\n /** The size, in bytes, of the array. */\n readonly byteLength: i32;\n /** Returns true if value is one of the ArrayBuffer views, such as typed array or a DataView **/\n static isView(value: T): bool;\n /** Constructs a new array buffer of the given length in bytes. */\n constructor(length: i32);\n /** Returns a copy of this array buffer's bytes from begin, inclusive, up to end, exclusive. */\n slice(begin?: i32, end?: i32): ArrayBuffer;\n /** Returns a string representation of ArrayBuffer. */\n toString(): string;\n}\n\n/** The `DataView` view provides a low-level interface for reading and writing multiple number types in a binary `ArrayBuffer`, without having to care about the platform's endianness. */\ndeclare class DataView {\n /** The `buffer` accessor property represents the `ArrayBuffer` or `SharedArrayBuffer` referenced by the `DataView` at construction time. */\n readonly buffer: ArrayBuffer;\n /** The `byteLength` accessor property represents the length (in bytes) of this view from the start of its `ArrayBuffer` or `SharedArrayBuffer`. */\n readonly byteLength: i32;\n /** The `byteOffset` accessor property represents the offset (in bytes) of this view from the start of its `ArrayBuffer` or `SharedArrayBuffer`. */\n readonly byteOffset: i32;\n /** Constructs a new `DataView` with the given properties */\n constructor(buffer: ArrayBuffer, byteOffset?: i32, byteLength?: i32);\n /** The `getFloat32()` method gets a signed 32-bit float (float) at the specified byte offset from the start of the `DataView`. */\n getFloat32(byteOffset: i32, littleEndian?: bool): f32;\n /** The `getFloat64()` method gets a signed 64-bit float (double) at the specified byte offset from the start of the `DataView`. */\n getFloat64(byteOffset: i32, littleEndian?: bool): f64;\n /** The `getInt8()` method gets a signed 8-bit integer (byte) at the specified byte offset from the start of the `DataView`. */\n getInt8(byteOffset: i32): i8;\n /** The `getInt16()` method gets a signed 16-bit integer (short) at the specified byte offset from the start of the `DataView`. */\n getInt16(byteOffset: i32, littleEndian?: bool): i16;\n /** The `getInt32()` method gets a signed 32-bit integer (long) at the specified byte offset from the start of the `DataView`. */\n getInt32(byteOffset: i32, littleEndian?: bool): i32;\n /** The `getInt64()` method gets a signed 64-bit integer (long long) at the specified byte offset from the start of the `DataView`. */\n getInt64(byteOffset: i32, littleEndian?: bool): i64;\n /** The `getUint8()` method gets an unsigned 8-bit integer (unsigned byte) at the specified byte offset from the start of the `DataView`. */\n getUint8(byteOffset: i32): u8;\n /** The `getUint16()` method gets an unsigned 16-bit integer (unsigned short) at the specified byte offset from the start of the `DataView`. */\n getUint16(byteOffset: i32, littleEndian?: bool): u16;\n /** The `getUint32()` method gets an unsigned 32-bit integer (unsigned long) at the specified byte offset from the start of the `DataView`. */\n getUint32(byteOffset: i32, littleEndian?: bool): u32;\n /** The `getUint64()` method gets an unsigned 64-bit integer (unsigned long long) at the specified byte offset from the start of the `DataView`. */\n getUint64(byteOffset: i32, littleEndian?: bool): u64;\n /** The `setFloat32()` method stores a signed 32-bit float (float) value at the specified byte offset from the start of the `DataView`. */\n setFloat32(byteOffset: i32, value: f32, littleEndian?: bool): void;\n /** The `setFloat64()` method stores a signed 64-bit float (double) value at the specified byte offset from the start of the `DataView`. */\n setFloat64(byteOffset: i32, value: f64, littleEndian?: bool): void;\n /** The `setInt8()` method stores a signed 8-bit integer (byte) value at the specified byte offset from the start of the `DataView`. */\n setInt8(byteOffset: i32, value: i8): void;\n /** The `setInt16()` method stores a signed 16-bit integer (short) value at the specified byte offset from the start of the `DataView`. */\n setInt16(byteOffset: i32, value: i16, littleEndian?: bool): void;\n /** The `setInt32()` method stores a signed 32-bit integer (long) value at the specified byte offset from the start of the `DataView`. */\n setInt32(byteOffset: i32, value: i32, littleEndian?: bool): void;\n /** The `setInt64()` method stores a signed 64-bit integer (long long) value at the specified byte offset from the start of the `DataView`. */\n setInt64(byteOffset: i32, value: i64, littleEndian?: bool): void;\n /** The `setUint8()` method stores an unsigned 8-bit integer (byte) value at the specified byte offset from the start of the `DataView`. */\n setUint8(byteOffset: i32, value: u8): void;\n /** The `setUint16()` method stores an unsigned 16-bit integer (unsigned short) value at the specified byte offset from the start of the `DataView`. */\n setUint16(byteOffset: i32, value: u16, littleEndian?: bool): void;\n /** The `setUint32()` method stores an unsigned 32-bit integer (unsigned long) value at the specified byte offset from the start of the `DataView`. */\n setUint32(byteOffset: i32, value: u32, littleEndian?: bool): void;\n /** The `setUint64()` method stores an unsigned 64-bit integer (unsigned long long) value at the specified byte offset from the start of the `DataView`. */\n setUint64(byteOffset: i32, value: u64, littleEndian?: bool): void;\n /** Returns a string representation of DataView. */\n toString(): string;\n}\n\ninterface ArrayLike {\n [key: number]: T;\n length: i32;\n}\n\n/** Interface for a typed view on an array buffer. */\ninterface ArrayBufferView {\n /** The {@link ArrayBuffer} referenced by this view. */\n readonly buffer: ArrayBuffer;\n /** The offset in bytes from the start of the referenced {@link ArrayBuffer}. */\n readonly byteOffset: i32;\n /** The length in bytes from the start of the referenced {@link ArrayBuffer}. */\n readonly byteLength: i32;\n /** Returns raw pointer to data storage including offset (unsafe). */\n readonly dataStart: usize;\n}\n\n/** @internal */\ndeclare abstract class TypedArray implements ArrayBufferView {\n [key: number]: T;\n /** Number of bytes per element. */\n static readonly BYTES_PER_ELEMENT: usize;\n /** Constructs a new typed array. */\n constructor(length: i32);\n /** The {@link ArrayBuffer} referenced by this view. */\n readonly buffer: ArrayBuffer;\n /** The offset in bytes from the start of the referenced {@link ArrayBuffer}. */\n readonly byteOffset: i32;\n /** The length in bytes from the start of the referenced {@link ArrayBuffer}. */\n readonly byteLength: i32;\n /** Returns raw pointer to data storage including offset (unsafe). */\n readonly dataStart: usize;\n /** The length (in elements). */\n readonly length: i32;\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): T;\n /** The includes() method determines whether a typed array includes a certain element, returning true or false as appropriate. */\n includes(searchElement: T, fromIndex?: i32): bool;\n /** The indexOf() method returns the first index at which a given element can be found in the typed array, or -1 if it is not present. */\n indexOf(searchElement: T, fromIndex?: i32): i32;\n /** The lastIndexOf() method returns the last index at which a given element can be found in the typed array, or -1 if it is not present. The typed array is searched backwards, starting at fromIndex. */\n lastIndexOf(searchElement: T, fromIndex?: i32): i32;\n /** Returns copied section of an TypedArray from begin inclusive to end exclusive */\n slice(begin?: i32, end?: i32): TypedArray;\n /** Returns a new TypedArray of this type on the same ArrayBuffer from begin inclusive to end exclusive. */\n subarray(begin?: i32, end?: i32): TypedArray;\n /** The copyWithin() method copies the sequence of array elements within the array to the position starting at target. The copy is taken from the index positions of the second and third arguments start and end. The end argument is optional and defaults to the length of the array. */\n copyWithin(target: i32, start: i32, end?: i32): this;\n /** The reduce() method applies a function against an accumulator and each value of the typed array (from left-to-right) has to reduce it to a single value. This method has the same algorithm as Array.prototype.reduce(). */\n reduce(callbackfn: (accumulator: U, value: T, index: i32, self: this) => U, initialValue: U): U;\n /** The reduceRight() method applies a function against an accumulator and each value of the typed array (from left-to-right) has to reduce it to a single value, starting from the end of the array. This method has the same algorithm as Array.prototype.reduceRight(). */\n reduceRight(callbackfn: (accumulator: U, value: T, index: i32, self: this) => U, initialValue: U): U;\n /** The some() method tests whether some element in the typed array passes the test implemented by the provided function. This method has the same algorithm as Array.prototype.some().*/\n some(callbackfn: (value: T, index: i32, self: this) => bool): bool;\n /** The map() method creates a new typed array with the results of calling a provided function on every element in this typed array. This method has the same algorithm as Array.prototype.map().*/\n map(callbackfn: (value: T, index: i32, self: this) => T): TypedArray;\n /** The filter() method creates a new typed array with all elements that pass the test implemented by the provided function. This method has the same algorithm as Array.prototype.filter(). */\n filter(callbackfn: (value: T, index: i32, self: this) => bool): TypedArray;\n /** The sort() method sorts the elements of a typed array numerically in place and returns the typed array. This method has the same algorithm as Array.prototype.sort(), except that sorts the values numerically instead of as strings. TypedArray is one of the typed array types here. */\n sort(callback?: (a: T, b: T) => i32): this;\n /** The fill() method fills all the elements of a typed array from a start index to an end index with a static value. This method has the same algorithm as Array.prototype.fill(). */\n fill(value: T, start?: i32, end?: i32): this;\n /** The findIndex() method returns an index in the typed array, if an element in the typed array satisfies the provided testing function. Otherwise -1 is returned. See also the find() [not implemented] method, which returns the value of a found element in the typed array instead of its index. */\n findIndex(callbackfn: (value: T, index: i32, self: this) => bool): i32;\n /** The findLastIndex() method returns an index start searching from the end in the typed array, if an element in the typed array satisfies the provided testing function. Otherwise -1 is returned. See also the find() [not implemented] method, which returns the value of a found element in the typed array instead of its index. */\n findLastIndex(callbackfn: (value: T, index: i32, self: this) => bool): i32;\n /** The every() method tests whether all elements in the typed array pass the test implemented by the provided function. This method has the same algorithm as Array.prototype.every(). */\n every(callbackfn: (value: T, index: i32, self: this) => bool): bool;\n /** The forEach() method executes a provided function once per array element. This method has the same algorithm as Array.prototype.forEach().*/\n forEach(callbackfn: (value: T, index: i32, self: this) => void): void;\n /** The reverse() method reverses a typed array in place. The first typed array element becomes the last and the last becomes the first. This method has the same algorithm as Array.prototype.reverse(). */\n reverse(): this;\n /** The join() method joins all elements of an array into a string. This method has the same algorithm as Array.prototype.join(). */\n join(separator?: string): string;\n /** The set() method stores multiple values in the typed array, reading input values from a specified array. */\n set(source: U, offset?: i32): void\n /** The toString() method returns a string representing the specified array and its elements. This method has the same algorithm as Array.prototype.toString() */\n toString(): string;\n}\n\n/** An array of twos-complement 8-bit signed integers. */\ndeclare class Int8Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Int8Array;\n}\n/** An array of 8-bit unsigned integers. */\ndeclare class Uint8Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint8Array;\n}\n/** A clamped array of 8-bit unsigned integers. */\ndeclare class Uint8ClampedArray extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint8ClampedArray;\n}\n/** An array of twos-complement 16-bit signed integers. */\ndeclare class Int16Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Int16Array;\n}\n/** An array of 16-bit unsigned integers. */\ndeclare class Uint16Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint16Array;\n}\n/** An array of twos-complement 32-bit signed integers. */\ndeclare class Int32Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Int32Array;\n}\n/** An array of 32-bit unsigned integers. */\ndeclare class Uint32Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint32Array;\n}\n/** An array of twos-complement 64-bit signed integers. */\ndeclare class Int64Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Int64Array;\n}\n/** An array of 64-bit unsigned integers. */\ndeclare class Uint64Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint64Array;\n}\n/** An array of 32-bit floating point numbers. */\ndeclare class Float32Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Float32Array;\n}\n/** An array of 64-bit floating point numbers. */\ndeclare class Float64Array extends TypedArray {\n /** Wrap an ArrayBuffer */\n static wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Float64Array;\n}\n\n/** Class representing a sequence of values of type `T`. */\ndeclare class Array {\n\n /** Tests if a value is an array. */\n static isArray(value: any): value is Array;\n\n [key: number]: T;\n /** Current length of the array. */\n length: i32;\n /** Returns raw pointer to data storage (unsafe). */\n readonly dataStart: usize;\n /** Constructs a new array. */\n constructor(length?: i32);\n at(index: i32): T;\n fill(value: T, start?: i32, end?: i32): this;\n findIndex(callbackfn: (value: T, index: i32, array: Array) => bool): i32;\n findLastIndex(callbackfn: (value: T, index: i32, array: Array) => bool): i32;\n includes(searchElement: T, fromIndex?: i32): bool;\n indexOf(searchElement: T, fromIndex?: i32): i32;\n lastIndexOf(searchElement: T, fromIndex?: i32): i32;\n push(element: T): i32;\n concat(items: T[]): T[];\n copyWithin(target: i32, start: i32, end?: i32): this;\n pop(): T;\n forEach(callbackfn: (value: T, index: i32, array: Array) => void): void;\n map(callbackfn: (value: T, index: i32, array: Array) => U): Array;\n filter(callbackfn: (value: T, index: i32, array: Array) => bool): Array;\n reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array) => U, initialValue: U): U;\n reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array) => U, initialValue: U): U;\n every(callbackfn: (value: T, index: i32, array: Array) => bool): bool;\n some(callbackfn: (value: T, index: i32, array: Array) => bool): bool;\n shift(): T;\n unshift(element: T): i32;\n slice(from: i32, to?: i32): Array;\n splice(start: i32, deleteCount?: i32): Array;\n sort(comparator?: (a: T, b: T) => i32): this;\n join(separator?: string): string;\n reverse(): this;\n /** Flattens an array of arrays. If any null entries exist in the array, they are ignored, unlike JavaScript's version of Array#flat(). */\n flat(): T extends unknown[] ? T : never;\n toString(): string;\n}\n\n/** Class representing a static (not resizable) sequence of values of type `T`. This class is @final. */\ndeclare class StaticArray {\n [key: number]: T;\n static fromArray(source: Array): StaticArray;\n static concat(source: StaticArray, other: StaticArray): StaticArray;\n static slice(source: StaticArray, start?: i32, end?: i32): StaticArray;\n readonly length: i32;\n constructor(length?: i32);\n at(index: i32): T;\n fill(value: T, start?: i32, end?: i32): this;\n findIndex(callbackfn: (value: T, index: i32, array: StaticArray) => bool): i32;\n findLastIndex(callbackfn: (value: T, index: i32, array: StaticArray) => bool): i32;\n copyWithin(target: i32, start: i32, end?: i32): this;\n includes(searchElement: T, fromIndex?: i32): bool;\n indexOf(searchElement: T, fromIndex?: i32): i32;\n lastIndexOf(searchElement: T, fromIndex?: i32): i32;\n forEach(callbackfn: (value: T, index: i32, array: StaticArray) => void): void;\n map(callbackfn: (value: T, index: i32, array: StaticArray) => U): Array;\n filter(callbackfn: (value: T, index: i32, array: StaticArray) => bool): Array;\n reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray) => U, initialValue: U): U;\n reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray) => U, initialValue: U): U;\n every(callbackfn: (value: T, index: i32, array: StaticArray) => bool): bool;\n some(callbackfn: (value: T, index: i32, array: StaticArray) => bool): bool;\n concat(items: Array): Array;\n slice(from: i32, to?: i32): Array;\n sort(comparator?: (a: T, b: T) => i32): this;\n join(separator?: string): string;\n reverse(): this;\n toString(): string;\n}\n\n/** Class representing a sequence of characters. */\ndeclare class String {\n static fromCharCode(ls: i32, hs?: i32): string;\n static fromCharCodes(arr: u16[]): string;\n static fromCodePoint(code: i32): string;\n static fromCodePoints(arr: i32[]): string;\n static raw(parts: TemplateStringsArray, ...args: any[]): string;\n readonly length: i32;\n at(index: i32): string;\n charAt(index: i32): string;\n charCodeAt(index: i32): i32;\n codePointAt(index: i32): i32;\n concat(other: string): string;\n endsWith(other: string): bool;\n indexOf(other: string, fromIndex?: i32): i32;\n lastIndexOf(other: string, fromIndex?: i32): i32;\n localeCompare(other: string): i32;\n includes(other: string): bool;\n startsWith(other: string): bool;\n substr(start: i32, length?: i32): string;\n substring(start: i32, end?: i32): string;\n trim(): string;\n trimLeft(): string;\n trimRight(): string;\n trimStart(): string;\n trimEnd(): string;\n padStart(targetLength: i32, padString?: string): string;\n padEnd(targetLength: i32, padString?: string): string;\n repeat(count?: i32): string;\n replace(search: string, replacement: string): string;\n replaceAll(search: string, replacement: string): string;\n slice(beginIndex: i32, endIndex?: i32): string;\n split(separator?: string, limit?: i32): string[];\n toLowerCase(): string;\n toUpperCase(): string;\n toString(): string;\n}\n\ndeclare namespace String {\n /** Encoding helpers for UTF-8. */\n export namespace UTF8 {\n /** UTF-8 encoding error modes. */\n export const enum ErrorMode {\n /** Keeps unpaired surrogates as of WTF-8. This is the default. */\n WTF8,\n /** Replaces unpaired surrogates with the replacement character (U+FFFD). */\n REPLACE,\n /** Throws an error on unpaired surrogates. */\n ERROR\n }\n /** Calculates the byte length of the specified string when encoded as UTF-8, optionally null terminated. */\n export function byteLength(str: string, nullTerminated?: bool): i32;\n /** Encodes the specified string to UTF-8 bytes, optionally null terminated. ErrorMode defaults to WTF-8. */\n export function encode(str: string, nullTerminated?: bool, errorMode?: ErrorMode): ArrayBuffer;\n /** Encodes the specified raw string to UTF-8 bytes, opionally null terminated. ErrorMode defaults to WTF-8. Returns the number of bytes written. */\n export function encodeUnsafe(str: usize, len: i32, buf: usize, nullTerminated?: bool, errorMode?: ErrorMode): usize;\n /** Decodes the specified buffer from UTF-8 bytes to a string, optionally null terminated. */\n export function decode(buf: ArrayBuffer, nullTerminated?: bool): string;\n /** Decodes raw UTF-8 bytes to a string, optionally null terminated. */\n export function decodeUnsafe(buf: usize, len: usize, nullTerminated?: bool): string;\n }\n /** Encoding helpers for UTF-16. */\n export namespace UTF16 {\n /** Calculates the byte length of the specified string when encoded as UTF-16. */\n export function byteLength(str: string): i32;\n /** Encodes the specified string to UTF-16 bytes. */\n export function encode(str: string): ArrayBuffer;\n /** Encodes the specified raw string to UTF-16 bytes. Returns the number of bytes written. */\n export function encodeUnsafe(str: usize, len: i32, buf: usize): usize;\n /** Decodes the specified buffer from UTF-16 bytes to a string. */\n export function decode(buf: ArrayBuffer): string;\n /** Decodes raw UTF-16 bytes to a string. */\n export function decodeUnsafe(buf: usize, len: usize): string;\n }\n}\n\ndeclare class TemplateStringsArray extends Array {\n readonly raw: string[];\n}\n\ndeclare class Object {\n /** The Object.is() method determines whether two values are the same value. */\n static is(value1: T, value2: T): bool;\n}\n\ndeclare class Date {\n /** Returns the UTC timestamp in milliseconds of the specified date. */\n static UTC(\n year: i32,\n month: i32,\n day: i32,\n hour: i32,\n minute: i32,\n second: i32,\n millisecond: i32\n ): i64;\n /** Returns the current UTC timestamp in milliseconds. */\n static now(): i64;\n /** Parses a string representation of a date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC. */\n static parse(dateString: string): Date;\n static fromString(dateString: string): Date;\n /** Constructs a new date object from an UTC timestamp in milliseconds. */\n constructor(value: i64);\n /** Returns the UTC timestamp of this date in milliseconds. */\n getTime(): i64;\n /** Sets the UTC timestamp of this date in milliseconds. */\n setTime(value: i64): i64;\n\n getUTCFullYear(): i32;\n getUTCMonth(): i32;\n getUTCDate(): i32;\n getUTCDay(): i32;\n getUTCHours(): i32;\n getUTCMinutes(): i32;\n getUTCSeconds(): i32;\n getUTCMilliseconds(): i32;\n\n setUTCFullYear(value: i32): void;\n setUTCMonth(value: i32): void;\n setUTCDate(value: i32): void;\n setUTCHours(value: i32): void;\n setUTCMinutes(value: i32): void;\n setUTCSeconds(value: i32): void;\n setUTCMilliseconds(value: i32): void;\n\n toString(): string;\n toISOString(): string;\n toUTCString(): string;\n toDateString(): string;\n toTimeString(): string;\n}\n\n/** Class for representing a runtime error. Base class of all errors. */\ndeclare class Error {\n\n /** Error name. */\n name: string;\n\n /** Message provided on construction. */\n message: string;\n\n /** Stack trace. */\n stack?: string;\n\n /** Constructs a new error, optionally with a message. */\n constructor(message?: string);\n\n /** Method returns a string representing the specified Error class. */\n toString(): string;\n}\n\n/** Class for indicating an error when a value is not in the set or range of allowed values. */\ndeclare class RangeError extends Error { }\n\n/** Class for indicating an error when a value is not of the expected type. */\ndeclare class TypeError extends Error { }\n\n/** Class for indicating an error when trying to interpret syntactically invalid code. */\ndeclare class SyntaxError extends Error { }\n\n/** Class for indicating an error when a global URI handling function was used in a wrong way. */\ndeclare class URIError extends Error { }\n\ninterface Boolean {\n toString(radix?: number): string;\n}\n\ninterface Number {\n toString(radix?: number): string;\n}\n\ninterface Function {\n /** Function table index. */\n readonly index: u32;\n /** Function name. Always an empty string. */\n readonly name: string;\n /** Number of expected parameters. */\n readonly length: u32;\n /** Calls this function indirectly with the specified arguments. */\n call(thisArg: unknown, ...args: unknown[]): any;\n /** Returns a string representation of this function. */\n toString(): string;\n}\ninterface IArguments {}\ninterface RegExp {}\n\ndeclare class Map {\n readonly size: i32;\n has(key: K): bool;\n set(key: K, value: V): this;\n get(key: K): V;\n delete(key: K): bool;\n clear(): void;\n keys(): K[]; // preliminary\n values(): V[]; // preliminary\n toString(): string;\n}\n\ndeclare class Set {\n readonly size: i32;\n has(value: K): bool;\n add(value: K): this;\n delete(value: K): bool;\n clear(): void;\n values(): K[]; // preliminary\n toString(): string;\n}\n\ninterface SymbolConstructor {\n readonly hasInstance: symbol;\n readonly isConcatSpreadable: symbol;\n readonly isRegExp: symbol;\n readonly iterator: symbol;\n readonly match: symbol;\n readonly replace: symbol;\n readonly search: symbol;\n readonly species: symbol;\n readonly split: symbol;\n readonly toPrimitive: symbol;\n readonly toStringTag: symbol;\n readonly unscopables: symbol;\n (description?: string | null): symbol;\n for(key: string): symbol;\n keyFor(sym: symbol): string | null;\n}\n\ndeclare const Symbol: SymbolConstructor;\n\n/** @internal */\ninterface IMath {\n /** The base of natural logarithms, e, approximately 2.718. */\n readonly E: T;\n /** The natural logarithm of 2, approximately 0.693. */\n readonly LN2: T;\n /** The natural logarithm of 10, approximately 2.302. */\n readonly LN10: T;\n /** The base 2 logarithm of e, approximately 1.442. */\n readonly LOG2E: T;\n /** The base 10 logarithm of e, approximately 0.434. */\n readonly LOG10E: T;\n /** The ratio of the circumference of a circle to its diameter, approximately 3.14159. */\n readonly PI: T;\n /** The square root of 1/2, approximately 0.707. */\n readonly SQRT1_2: T;\n /** The square root of 2, approximately 1.414. */\n readonly SQRT2: T;\n /** Returns the absolute value of `x`. */\n abs(x: T): T;\n /** Returns the arccosine (in radians) of `x`. */\n acos(x: T): T;\n /** Returns the hyperbolic arc-cosine of `x`. */\n acosh(x: T): T;\n /** Returns the arcsine (in radians) of `x`. */\n asin(x: T): T;\n /** Returns the hyperbolic arcsine of `x`. */\n asinh(x: T): T;\n /** Returns the arctangent (in radians) of `x`. */\n atan(x: T): T;\n /** Returns the arctangent of the quotient of its arguments. */\n atan2(y: T, x: T): T;\n /** Returns the hyperbolic arctangent of `x`. */\n atanh(x: T): T;\n /** Returns the cube root of `x`. */\n cbrt(x: T): T;\n /** Returns the smallest integer greater than or equal to `x`. */\n ceil(x: T): T;\n /** Returns the number of leading zero bits in the 32-bit binary representation of `x`. */\n clz32(x: T): T;\n /** Returns the cosine (in radians) of `x`. */\n cos(x: T): T;\n /** Returns the hyperbolic cosine of `x`. */\n cosh(x: T): T;\n /** Returns e to the power of `x`. */\n exp(x: T): T;\n /** Returns e to the power of `x`, minus 1. */\n expm1(x: T): T;\n /** Returns the largest integer less than or equal to `x`. */\n floor(x: T): T;\n /** Returns the nearest 32-bit single precision float representation of `x`. */\n fround(x: T): T;\n /** Returns the square root of the sum of squares of its arguments. */\n hypot(value1: T, value2: T): T; // TODO: rest\n /** Returns the result of the C-like 32-bit multiplication of `a` and `b`. */\n imul(a: T, b: T): T;\n /** Returns the natural logarithm (base e) of `x`. */\n log(x: T): T;\n /** Returns the base 10 logarithm of `x`. */\n log10(x: T): T;\n /** Returns the natural logarithm (base e) of 1 + `x`. */\n log1p(x: T): T;\n /** Returns the base 2 logarithm of `x`. */\n log2(x: T): T;\n /** Returns the largest-valued number of its arguments. */\n max(value1: T, value2: T): T; // TODO: rest\n /** Returns the lowest-valued number of its arguments. */\n min(value1: T, value2: T): T; // TODO: rest\n /** Returns `base` to the power of `exponent`. */\n pow(base: T, exponent: T): T;\n /** Returns a pseudo-random number in the range from 0.0 inclusive up to but not including 1.0. */\n random(): T;\n /** Returns the value of `x` rounded to the nearest integer. */\n round(x: T): T;\n /** Returns the sign of `x`, indicating whether the number is positive, negative or zero. */\n sign(x: T): T;\n /** Returns whether the sign bit of `x` is set. */\n signbit(x: T): bool;\n /** Returns the sine of `x`. */\n sin(x: T): T;\n /** Returns the hyperbolic sine of `x`. */\n sinh(x: T): T;\n /** Returns the square root of `x`. */\n sqrt(x: T): T;\n /** Returns the tangent of `x`. */\n tan(x: T): T;\n /** Returns the hyperbolic tangent of `x`. */\n tanh(x: T): T;\n /** Returns the integer part of `x` by removing any fractional digits. */\n trunc(x: T): T;\n}\n\n/** @internal */\ninterface INativeMath extends IMath {\n /** Contains sin value produced after Math/Mathf.sincos */\n sincos_sin: T;\n /** Contains cos value produced after Math/Mathf.sincos */\n sincos_cos: T;\n /** Seeds the random number generator. */\n seedRandom(value: i64): void;\n /** Multiplies a floating point `x` by 2 raised to power exp `n`. */\n scalbn(x: T, n: i32): T;\n /** Returns the floating-point remainder of `x / y` (rounded towards zero). */\n mod(x: T, y: T): T;\n /** Returns the floating-point remainder of `x / y` (rounded to nearest). */\n rem(x: T, y: T): T;\n /** Returns sin and cos simultaneously for same angle. Results stored to `sincos_s32/64` and `sincos_c32/64` globals */\n sincos(x: T): void;\n /** Returns 2 raised to the given power x. Equivalent to 2 ** x. */\n exp2(x: T): T;\n}\n\n/** Double precision math imported from JavaScript. */\ndeclare const JSMath: IMath;\n/** Double precision math implemented natively. */\ndeclare const NativeMath: INativeMath;\n/** Single precision math implemented natively. */\ndeclare const NativeMathf: INativeMath;\n/** Alias of {@link NativeMath} or {@link JSMath} respectively. Defaults to `NativeMath`. */\ndeclare const Math: IMath;\n/** Alias of {@link NativeMathf} or {@link JSMath} respectively. Defaults to `NativeMathf`. */\ndeclare const Mathf: IMath;\n\n/** Environmental abort function. */\ndeclare function abort(msg?: string | null, fileName?: string | null, lineNumber?: i32, columnNumber?: i32): never;\n/** Environmental tracing function. */\ndeclare function trace(msg: string, n?: i32, a0?: f64, a1?: f64, a2?: f64, a3?: f64, a4?: f64): void;\n/** Environmental seeding function. */\ndeclare function seed(): f64;\n\n/** Node-like process on top of WASI. */\ndeclare namespace process {\n /** String representing the CPU architecture for which the binary was compiled. Either `wasm32` or `wasm64`. */\n export const arch: string;\n /** String representing the operating system platform for which the binary was compiled. Always `wasm`. */\n export const platform: string;\n /** Array of command line arguments passed to the binary upon instantiation. */\n export const argv: string[];\n /** Map of variables in the binary's user environment. */\n export const env: Map;\n /** Process exit code to use when the process exits gracefully. Defaults to `0`. */\n export var exitCode: i32;\n /** Terminates the process with either the given exit code, or `process.exitCode` if omitted. */\n export function exit(code?: i32): void;\n /** Stream connected to `stdin` (fd `0`). */\n export const stdin: ReadableStream;\n /** Stream connected to `stdout` (fd `1`). */\n export const stdout: WritableStream;\n /** Stream connected to `stderr` (fd `2`). */\n export const stderr: WritableStream;\n /** Obtains the system's current time of day, in milliseconds since Unix epoch. */\n export function time(): i64;\n /** Obtains the system's monotonic high resolution time, in nanoseconds since an arbitrary time in the past. */\n export function hrtime(): u64;\n\n interface Stream {\n /** Closes the stream. Throws if already closed or if the stream cannot be closed. */\n close(): void;\n }\n interface ReadableStream extends Stream {\n /** Reads available data from the stream, into `buffer` at offset `offset`, returning the number of bytes read. */\n read(buffer: ArrayBuffer, offset?: isize): i32;\n }\n interface WritableStream extends Stream {\n /** Writes string or buffer to the stream. */\n write(data: T): void;\n }\n}\n\n/** Browser-like console on top of WASI. */\ndeclare namespace console {\n /** Logs `message` to console if `assertion` is false-ish. */\n export function assert(assertion: T, message?: string): void;\n /** Outputs `message` to the console. */\n export function log(message?: string): void;\n /** Outputs `message` to the console, prefixed with \"Debug:\". */\n export function debug(message?: string): void;\n /** Outputs `message` to the console, prefixed with \"Info:\". */\n export function info(message?: string): void;\n /** Outputs `message` to the console, prefixed with \"Warning:\". */\n export function warn(message?: string): void;\n /** Outputs `message` to the console, prefixed with \"Error:\". */\n export function error(message?: string): void;\n /** Starts a new timer using the specified `label`. */\n export function time(label?: string): void;\n /** Logs the current value of a timer previously started with `console.time`. */\n export function timeLog(label?: string): void;\n /** Logs the current value of a timer previously started with `console.time` and discards the timer. */\n export function timeEnd(label?: string): void;\n}\n\n/** Browser-like crypto utilities on top of WASI. */\ndeclare namespace crypto {\n /** Fills `array` with cryptographically strong random values. */\n export function getRandomValues(array: Uint8Array): void;\n}\n\n// Decorators\n\ninterface TypedPropertyDescriptor {\n configurable?: boolean;\n enumerable?: boolean;\n writable?: boolean;\n value?: T;\n get?(): T;\n set?(value: T): void;\n}\n\n/** Annotates a method as a binary operator overload for the specified `token`. */\ndeclare function operator(token:\n \"[]\" | \"[]=\" | \"{}\" | \"{}=\" | \"==\" | \"!=\" | \">\" | \"<\" | \"<=\" | \">=\" |\n \">>\" | \">>>\" | \"<<\" | \"&\" | \"|\" | \"^\" | \"+\" | \"-\" | \"*\" | \"**\" | \"/\" | \"%\"\n): (\n target: any,\n propertyKey: string,\n descriptor: TypedPropertyDescriptor\n) => TypedPropertyDescriptor | void;\n\ndeclare namespace operator {\n /** Annotates a method as a binary operator overload for the specified `token`. */\n export function binary(token:\n \"[]\" | \"[]=\" | \"{}\" | \"{}=\" | \"==\" | \"!=\" | \">\" | \"<\" | \"<=\" | \">=\" |\n \">>\" | \">>>\" | \"<<\" | \"&\" | \"|\" | \"^\" | \"+\" | \"-\" | \"*\" | \"**\" | \"/\" | \"%\"\n ): (\n target: any,\n propertyKey: string,\n descriptor: TypedPropertyDescriptor\n ) => TypedPropertyDescriptor | void;\n /** Annotates a method as an unary prefix operator overload for the specified `token`. */\n export function prefix(token: \"!\" | \"~\" | \"+\" | \"-\" | \"++\" | \"--\"): (\n target: any,\n propertyKey: string,\n descriptor: TypedPropertyDescriptor\n ) => TypedPropertyDescriptor | void;\n /** Annotates a method as an unary postfix operator overload for the specified `token`. */\n export function postfix(token: \"++\" | \"--\"): (\n target: any,\n propertyKey: string,\n descriptor: TypedPropertyDescriptor\n ) => TypedPropertyDescriptor | void;\n}\n\n/** Annotates an element as a program global. */\ndeclare function global(...args: any[]): any;\n\n/** Annotates a class as being unmanaged with limited capabilities. */\ndeclare function unmanaged(constructor: Function): void;\n\n/** Annotates a class as being final / non-derivable. */\ndeclare function final(constructor: Function): void;\n\n/** Annotates a method, function or constant global as always inlined. */\ndeclare function inline(...args: any[]): any;\n\n/** Annotates a method, function or constant global as unsafe. */\ndeclare function unsafe(...args: any[]): any;\n\n/** Annotates an explicit external name of a function or global. */\ndeclare function external(...args: any[]): any;\n\n/** Annotates a global for lazy compilation. */\ndeclare function lazy(...args: any[]): any;\n", - "portable": "/**\n * Environment definitions for compiling AssemblyScript to JavaScript using tsc.\n *\n * Note that semantic differences require additional explicit conversions for full compatibility.\n * For example, when casting an i32 to an u8, doing `(someI32 & 0xff)` will yield the same\n * result when compiling to WebAssembly or JS while `someI32` alone does nothing in JS.\n *\n * Note that i64's are not portable (JS numbers are IEEE754 doubles with a maximum safe integer\n * value of 2^53-1) and instead require a compatibility layer to work in JS as well, as for example\n * {@link glue/js/i64} respectively {@link glue/wasm/i64}.\n *\n * @module std/portable\n *//***/\n\n// Types\n\ndeclare type bool = boolean;\ndeclare type i8 = number;\ndeclare type i16 = number;\ndeclare type i32 = number;\ndeclare type isize = number;\ndeclare type u8 = number;\ndeclare type u16 = number;\ndeclare type u32 = number;\ndeclare type usize = number;\ndeclare type f32 = number;\ndeclare type f64 = number;\n\n/** Special type evaluating the indexed access index type. */\ndeclare type indexof = keyof T;\n/** Special type evaluating the indexed access value type. */\ndeclare type valueof = T[0];\n\n// Compiler hints\n\n/** Compiler target. 0 = JS, 1 = WASM32, 2 = WASM64. */\ndeclare const ASC_TARGET: i32;\n/** Runtime type. 0 = Stub, 1 = Minimal, 2 = Incremental. */\ndeclare const ASC_RUNTIME: i32;\n/** Provided noAssert option. */\ndeclare const ASC_NO_ASSERT: bool;\n/** Provided memoryBase option. */\ndeclare const ASC_MEMORY_BASE: i32;\n/** Provided optimizeLevel option. */\ndeclare const ASC_OPTIMIZE_LEVEL: i32;\n/** Provided shrinkLevel option. */\ndeclare const ASC_SHRINK_LEVEL: i32;\n/** Whether the mutable global feature is enabled. */\ndeclare const ASC_FEATURE_MUTABLE_GLOBAL: bool;\n/** Whether the sign extension feature is enabled. */\ndeclare const ASC_FEATURE_SIGN_EXTENSION: bool;\n\n// Builtins\n\n/** Performs the sign-agnostic count leading zero bits operation on a 32-bit integer. All zero bits are considered leading if the value is zero. */\ndeclare function clz(value: T): T;\n/** Performs the sign-agnostic count tailing zero bits operation on a 32-bit integer. All zero bits are considered trailing if the value is zero. */\ndeclare function ctz(value: T): T;\n/** Performs the sign-agnostic count number of one bits operation on a 32-bit integer. */\ndeclare function popcnt(value: T): T;\n/** Performs the sign-agnostic rotate left operation on a 32-bit integer. */\ndeclare function rotl(value: T, shift: T): T;\n/** Performs the sign-agnostic rotate right operation on a 32-bit integer. */\ndeclare function rotr(value: T, shift: T): T;\n/** Computes the absolute value of an integer or float. */\ndeclare function abs(value: T): T;\n/** Determines the maximum of two integers or floats. If either operand is `NaN`, returns `NaN`. */\ndeclare function max(left: T, right: T): T;\n/** Determines the minimum of two integers or floats. If either operand is `NaN`, returns `NaN`. */\ndeclare function min(left: T, right: T): T;\n/** Composes a 32-bit or 64-bit float from the magnitude of `x` and the sign of `y`. */\ndeclare function copysign(x: T, y: T): T;\n/** Performs the ceiling operation on a 32-bit or 64-bit float. */\ndeclare function ceil(value: T): T;\n/** Performs the floor operation on a 32-bit or 64-bit float. */\ndeclare function floor(value: T): T;\n/** Rounds to the nearest integer tied to even of a 32-bit or 64-bit float. */\ndeclare function nearest(value: T): T;\n/** Selects one of two pre-evaluated values depending on the condition. */\ndeclare function select(ifTrue: T, ifFalse: T, condition: bool): T;\n/** Calculates the square root of a 32-bit or 64-bit float. */\ndeclare function sqrt(value: T): T;\n/** Rounds to the nearest integer towards zero of a 32-bit or 64-bit float. */\ndeclare function trunc(value: T): T;\n/** Emits an unreachable operation that results in a runtime error when executed. */\ndeclare function unreachable(): any; // sic\n\n/** Changes the type of any value of `usize` kind to another one of `usize` kind. Useful for casting class instances to their pointer values and vice-versa. Beware that this is unsafe.*/\ndeclare function changetype(value: any): T;\n/** Explicitly requests no bounds checks on the provided expression. Useful for array accesses. */\ndeclare function unchecked(value: T): T;\n/** Tests if the specified value is a valid integer. Can't distinguish an integer from an integral float. */\ndeclare function isInteger(value: any): value is number;\n/** Tests if the specified value is a valid float. Can't distinguish a float from an integer. */\ndeclare function isFloat(value: any): value is number;\n/** Tests if the specified value is of a nullable reference type. */\ndeclare function isNullable(value: any): bool;\n/** Tests if the specified value is of a reference type. */\ndeclare function isReference(value: any): value is object | string;\n/** Tests if the specified value is of a function type */\ndeclare function isFunction(value: any): value is Function;\n/** Tests if the specified value can be used as a string. */\ndeclare function isString(value: any): value is string | String;\n/** Tests if the specified value can be used as an array. */\ndeclare function isArray(value: any): value is Array;\n/** Tests if the specified type *or* expression can be used as an array like object. */\ndeclare function isArrayLike(value: any): value is ArrayLike;\n/** Tests if the specified expression resolves to a defined element. */\ndeclare function isDefined(expression: any): bool;\n/** Tests if the specified expression evaluates to a constant value. */\ndeclare function isConstant(expression: any): bool;\n/** Traps if the specified value is not true-ish, otherwise returns the value. */\ndeclare function assert(isTrueish: T, message?: string): T & (object | string | number); // any better way to model `: T != null`?\n/** Parses an integer string to a 64-bit float. */\ndeclare function parseInt(str: string, radix?: i32): f64;\n/** Parses a floating point string to a 64-bit float. */\ndeclare function parseFloat(str: string): f64;\n/** Returns the 64-bit floating-point remainder of `x/y`. */\ndeclare function fmod(x: f64, y: f64): f64;\n/** Returns the 32-bit floating-point remainder of `x/y`. */\ndeclare function fmodf(x: f32, y: f32): f32;\n\n/** Converts any other numeric value to an 8-bit signed integer. */\ndeclare function i8(value: any): i8;\ndeclare namespace i8 {\n /** Smallest representable value. */\n export const MIN_VALUE: i8;\n /** Largest representable value. */\n export const MAX_VALUE: i8;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): i8;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): i8;\n}\n/** Converts any other numeric value to a 16-bit signed integer. */\ndeclare function i16(value: any): i16;\ndeclare namespace i16 {\n /** Smallest representable value. */\n export const MIN_VALUE: i16;\n /** Largest representable value. */\n export const MAX_VALUE: i16;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): i16;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): i16;\n}\n/** Converts any other numeric value to a 32-bit signed integer. */\ndeclare function i32(value: any): i32;\ndeclare namespace i32 {\n /** Smallest representable value. */\n export const MIN_VALUE: i32;\n /** Largest representable value. */\n export const MAX_VALUE: i32;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): i32;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): i32;\n}\n/** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) signed integer. */\ndeclare function isize(value: any): isize;\ndeclare namespace isize {\n /** Smallest representable value. */\n export const MIN_VALUE: isize;\n /** Largest representable value. */\n export const MAX_VALUE: isize;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): isize;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): isize;\n}\n/** Converts any other numeric value to an 8-bit unsigned integer. */\ndeclare function u8(value: any): u8;\ndeclare namespace u8 {\n /** Smallest representable value. */\n export const MIN_VALUE: u8;\n /** Largest representable value. */\n export const MAX_VALUE: u8;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): u8;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): u8;\n}\n/** Converts any other numeric value to a 16-bit unsigned integer. */\ndeclare function u16(value: any): u16;\ndeclare namespace u16 {\n /** Smallest representable value. */\n export const MIN_VALUE: u16;\n /** Largest representable value. */\n export const MAX_VALUE: u16;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): u16;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): u16;\n}\n/** Converts any other numeric value to a 32-bit unsigned integer. */\ndeclare function u32(value: any): u32;\ndeclare namespace u32 {\n /** Smallest representable value. */\n export const MIN_VALUE: u32;\n /** Largest representable value. */\n export const MAX_VALUE: u32;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): u32;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): u32;\n}\n/** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) unsigned integer. */\ndeclare function usize(value: any): isize;\ndeclare namespace usize {\n /** Smallest representable value. */\n export const MIN_VALUE: usize;\n /** Largest representable value. */\n export const MAX_VALUE: usize;\n /** Converts a string to a floating-point number and cast to target integer after. */\n export function parseFloat(string: string): usize;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): usize;\n}\n/** Converts any other numeric value to a 1-bit unsigned integer. */\ndeclare function bool(value: any): bool;\ndeclare namespace bool {\n /** Smallest representable value. */\n export const MIN_VALUE: bool;\n /** Largest representable value. */\n export const MAX_VALUE: bool;\n}\n/** Converts any other numeric value to a 32-bit float. */\ndeclare function f32(value: any): f32;\ndeclare namespace f32 {\n /** Smallest representable value. */\n export const MIN_VALUE: f32;\n /** Largest representable value. */\n export const MAX_VALUE: f32;\n /** Smallest normalized positive value. */\n export const MIN_NORMAL_VALUE: f32;\n /** Smallest safely representable integer value. */\n export const MIN_SAFE_INTEGER: f32;\n /** Largest safely representable integer value. */\n export const MAX_SAFE_INTEGER: f32;\n /** Positive infinity value. */\n export const POSITIVE_INFINITY: f32;\n /** Negative infinity value. */\n export const NEGATIVE_INFINITY: f32;\n /** Not a number value. */\n /* eslint no-shadow-restricted-names: \"off\" */\n export const NaN: f32;\n /** Difference between 1 and the smallest representable value greater than 1. */\n export const EPSILON: f32;\n /** Returns a boolean value that indicates whether a value is the reserved value NaN (not a number). */\n export function isNaN(value: f32): bool;\n /** Returns true if passed value is finite. */\n export function isFinite(value: f32): bool;\n /** Returns true if the value passed is a safe integer. */\n export function isSafeInteger(value: f32): bool;\n /** Returns true if the value passed is an integer, false otherwise. */\n export function isInteger(value: f32): bool;\n /** Converts a string to a floating-point number. */\n export function parseFloat(string: string): f32;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): f32;\n}\n/** Converts any other numeric value to a 64-bit float. */\ndeclare function f64(value: any): f64;\ndeclare namespace f64 {\n /** Smallest representable value. */\n export const MIN_VALUE: f64;\n /** Largest representable value. */\n export const MAX_VALUE: f64;\n /** Smallest normalized positive value. */\n export const MIN_NORMAL_VALUE: f64;\n /** Smallest safely representable integer value. */\n export const MIN_SAFE_INTEGER: f64;\n /** Largest safely representable integer value. */\n export const MAX_SAFE_INTEGER: f64;\n /** Positive infinity value. */\n export const POSITIVE_INFINITY: f64;\n /** Negative infinity value. */\n export const NEGATIVE_INFINITY: f64;\n /** Not a number value. */\n /* eslint no-shadow-restricted-names: \"off\" */\n export const NaN: f64;\n /** Difference between 1 and the smallest representable value greater than 1. */\n export const EPSILON: f64;\n /** Returns a boolean value that indicates whether a value is the reserved value NaN (not a number). */\n export function isNaN(value: f32): bool;\n /** Returns true if passed value is finite. */\n export function isFinite(value: f32): bool;\n /** Returns true if the value passed is a safe integer. */\n export function isSafeInteger(value: f64): bool;\n /** Returns true if the value passed is an integer, false otherwise. */\n export function isInteger(value: f64): bool;\n /** Converts a string to a floating-point number. */\n export function parseFloat(string: string): f64;\n /** Converts A string to an integer. */\n export function parseInt(string: string, radix?: i32): f64;\n}\n\n// Polyfills\n\n/** [Polyfill] Performs the sign-agnostic reverse bytes **/\ndeclare function bswap(value: T): T;\n/** [Polyfill] Performs the sign-agnostic reverse bytes only for last 16-bit **/\ndeclare function bswap16(value: T): T;\n\n// Standard library\n\ndeclare const Mathf: typeof Math;\ndeclare const JSMath: typeof Math;\n\ndeclare interface StringConstructor {\n /** Equivalent to calling `String.fromCharCode` with multiple arguments. */\n fromCharCodes(arr: u16[]): string;\n /** Equivalent to calling `String.fromCodePoint` with multiple arguments. */\n fromCodePoints(arr: i32[]): string;\n}\n\ndeclare interface String {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): string;\n}\n\n/** Annotates a class as being unmanaged with limited capabilities. */\ndeclare function unmanaged(constructor: Function): void;\n\n/** Environmental tracing function. */\ndeclare function trace(msg: string, n?: i32, a0?: f64, a1?: f64, a2?: f64, a3?: f64, a4?: f64): void;\n\ndeclare interface Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): T;\n /** Returns an index start searching from the end in the array */\n findLastIndex(callbackfn: (value: T, index: i32, self: Array) => bool): i32;\n}\n\ndeclare interface Int8ArrayConstructor {\n /** Equivalent to calling `new Int8Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Int8Array;\n}\n\ndeclare interface Int8Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): i8;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: i8, index: i32, self: Int8Array) => bool): i32;\n}\n\ndeclare interface Uint8ArrayConstructor {\n /** Equivalent to calling `new Uint8Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint8Array;\n}\n\ndeclare interface Uint8Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): u8;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: u8, index: i32, self: Uint8Array) => bool): i32;\n}\n\ndeclare interface Uint8ClampedArrayConstructor {\n /** Equivalent to calling `new Uint8ClampedArray` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint8ClampedArray;\n}\n\ndeclare interface Uint8ClampedArray {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): u8;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: u8, index: i32, self: Uint8ClampedArray) => bool): i32;\n}\n\ndeclare interface Int16ArrayConstructor {\n /** Equivalent to calling `new Int16Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Int16Array;\n}\n\ndeclare interface Int16Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): i16;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: i16, index: i32, self: Int16Array) => bool): i32;\n}\n\ndeclare interface Uint16ArrayConstructor {\n /** Equivalent to calling `new Uint16Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint16Array;\n}\n\ndeclare interface Uint16Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): u16;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: u16, index: i32, self: Uint16Array) => bool): i32;\n}\n\ndeclare interface Int32ArrayConstructor {\n /** Equivalent to calling `new Int32Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Int32Array;\n}\n\ndeclare interface Int32Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): i32;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: i32, index: i32, self: Int32Array) => bool): i32;\n}\n\ndeclare interface Uint32ArrayConstructor {\n /** Equivalent to calling `new Uint32Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Uint32Array;\n}\n\ndeclare interface Uint32Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): u32;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: u32, index: i32, self: Uint32Array) => bool): i32;\n}\n\ndeclare interface Float32ArrayConstructor {\n /** Equivalent to calling `new Float32Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Float32Array;\n}\n\ndeclare interface Float32Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): f32;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: f32, index: i32, self: Float32Array) => bool): i32;\n}\n\ndeclare interface Float64ArrayConstructor {\n /** Equivalent to calling `new Float64Array` with multiple arguments. */\n wrap(buffer: ArrayBuffer, byteOffset?: i32, length?: i32): Float64Array;\n}\n\ndeclare interface Float64Array {\n /** Returns value using relative indexing. Index may be negative */\n at(index: i32): f64;\n /** Returns an index start searching from the end in the typedarray */\n findLastIndex(callbackfn: (value: f64, index: i32, self: Float64Array) => bool): i32;\n}\n\n// FIXME: remove\ndeclare function offsetof(fieldName?: string): usize;\ndeclare function idof(): u32;\n" -}; -export const libraryFiles = { - "array": "/// \n\nimport { BLOCK_MAXSIZE } from \"./rt/common\";\nimport { Runtime } from \"shared/runtime\";\nimport { COMPARATOR, SORT } from \"./util/sort\";\nimport { REVERSE } from \"./util/bytes\";\nimport { joinBooleanArray, joinIntegerArray, joinFloatArray, joinStringArray, joinReferenceArray } from \"./util/string\";\nimport { idof, isArray as builtin_isArray } from \"./builtins\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_ILLEGALGENTYPE, E_EMPTYARRAY, E_HOLEYARRAY } from \"./util/error\";\n\n// @ts-ignore: decorator\n@inline @lazy const MIN_SIZE: usize = 8;\n\n/** Ensures that the given array has _at least_ the specified backing size. */\nfunction ensureCapacity(array: usize, newSize: usize, alignLog2: u32, canGrow: bool = true): void {\n // Depends on the fact that Arrays mimic ArrayBufferView\n var oldCapacity = changetype(array).byteLength;\n if (newSize > oldCapacity >>> alignLog2) {\n if (newSize > BLOCK_MAXSIZE >>> alignLog2) throw new RangeError(E_INVALIDLENGTH);\n let oldData = changetype(changetype(array).buffer);\n // Grows old capacity by factor of two.\n // Make sure we don't reach BLOCK_MAXSIZE for new growed capacity.\n let newCapacity = max(newSize, MIN_SIZE) << alignLog2;\n if (canGrow) newCapacity = max(min(oldCapacity << 1, BLOCK_MAXSIZE), newCapacity);\n let newData = __renew(oldData, newCapacity);\n // __new / __renew already init memory range as zeros in Incremental runtime.\n // So try to avoid this.\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(newData + oldCapacity, 0, newCapacity - oldCapacity);\n }\n if (newData !== oldData) { // oldData has been free'd\n store(array, newData, offsetof(\"buffer\"));\n store(array, newData, offsetof(\"dataStart\"));\n __link(array, changetype(newData), false);\n }\n store(array, newCapacity, offsetof(\"byteLength\"));\n }\n}\n\nexport class Array {\n [key: number]: T;\n\n // Mimicking ArrayBufferView isn't strictly necessary here but is done to allow glue code\n // to work with typed and normal arrays interchangeably. Technically, normal arrays do not need\n // `dataStart` (equals `buffer`) and `byteLength` (equals computed `buffer.byteLength`), but the\n // block is 16 bytes anyway so it's fine to have a couple extra fields in there.\n\n private buffer: ArrayBuffer;\n @unsafe readonly dataStart: usize;\n private byteLength: i32; // Uses here as capacity\n\n // Also note that Array with non-nullable T must guard against uninitialized null values\n // whenever an element is accessed. Otherwise, the compiler wouldn't be able to guarantee\n // type-safety anymore. For lack of a better word, such an array is \"holey\".\n\n private length_: i32;\n\n static isArray(value: U): bool {\n return isReference() ? builtin_isArray(value) && value !== null : false;\n }\n\n static create(capacity: i32 = 0): Array {\n WARNING(\"'Array.create' is deprecated. Use 'new Array' instead, making sure initial elements are initialized.\");\n var array = new Array(capacity);\n array.length = 0;\n return array;\n }\n\n constructor(length: i32 = 0) {\n if (length > BLOCK_MAXSIZE >>> alignof()) throw new RangeError(E_INVALIDLENGTH);\n // reserve capacity for at least MIN_SIZE elements\n var bufferSize = max(length, MIN_SIZE) << alignof();\n var buffer = changetype(__new(bufferSize, idof()));\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(changetype(buffer), 0, bufferSize);\n }\n this.buffer = buffer; // links\n this.dataStart = changetype(buffer);\n this.byteLength = bufferSize;\n this.length_ = length;\n }\n\n get length(): i32 {\n return this.length_;\n }\n\n set length(newLength: i32) {\n ensureCapacity(changetype(this), newLength, alignof(), false);\n this.length_ = newLength;\n }\n\n every(fn: (value: T, index: i32, array: Array) => bool): bool {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n if (!fn(load(this.dataStart + (i << alignof())), i, this)) return false;\n }\n return true;\n }\n\n findIndex(fn: (value: T, index: i32, array: Array) => bool): i32 {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n if (fn(load(this.dataStart + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n findLastIndex(fn: (value: T, index: i32, array: Array) => bool): i32 {\n for (let i = this.length_ - 1; i >= 0; --i) {\n if (fn(load(this.dataStart + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n @operator(\"[]\") private __get(index: i32): T {\n if (index >= this.length_) throw new RangeError(E_INDEXOUTOFRANGE);\n var value = load(this.dataStart + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n @unsafe @operator(\"{}\") private __uget(index: i32): T {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\") private __set(index: i32, value: T): void {\n if (index >= this.length_) {\n if (index < 0) throw new RangeError(E_INDEXOUTOFRANGE);\n ensureCapacity(changetype(this), index + 1, alignof());\n this.length_ = index + 1;\n }\n this.__uset(index, value);\n }\n\n @unsafe @operator(\"{}=\") private __uset(index: i32, value: T): void {\n store(this.dataStart + (index << alignof()), value);\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n }\n\n at(index: i32): T {\n var len = this.length_;\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n var value = load(this.dataStart + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): this {\n var ptr = this.dataStart;\n var len = this.length_;\n start = start < 0 ? max(len + start, 0) : min(start, len);\n end = end < 0 ? max(len + end, 0) : min(end, len);\n if (isManaged()) {\n for (; start < end; ++start) {\n store(ptr + (start << alignof()), changetype(value));\n __link(changetype(this), changetype(value), true);\n }\n } else if (sizeof() == 1) {\n if (start < end) {\n memory.fill(\n ptr + start,\n u8(value),\n (end - start)\n );\n }\n } else {\n for (; start < end; ++start) {\n store(ptr + (start << alignof()), value);\n }\n }\n return this;\n }\n\n includes(value: T, fromIndex: i32 = 0): bool {\n if (isFloat()) {\n let len = this.length_;\n if (len == 0 || fromIndex >= len) return false;\n if (fromIndex < 0) fromIndex = max(len + fromIndex, 0);\n let ptr = this.dataStart;\n while (fromIndex < len) {\n let elem = load(ptr + (fromIndex << alignof()));\n // @ts-ignore\n if (elem == value || isNaN(elem) & isNaN(value)) return true;\n ++fromIndex;\n }\n return false;\n } else {\n return this.indexOf(value, fromIndex) >= 0;\n }\n }\n\n indexOf(value: T, fromIndex: i32 = 0): i32 {\n var len = this.length_;\n if (len == 0 || fromIndex >= len) return -1;\n if (fromIndex < 0) fromIndex = max(len + fromIndex, 0);\n var ptr = this.dataStart;\n while (fromIndex < len) {\n if (load(ptr + (fromIndex << alignof())) == value) return fromIndex;\n ++fromIndex;\n }\n return -1;\n }\n\n lastIndexOf(value: T, fromIndex: i32 = this.length_): i32 {\n var len = this.length_;\n if (len == 0) return -1;\n if (fromIndex < 0) fromIndex = len + fromIndex;\n else if (fromIndex >= len) fromIndex = len - 1;\n var ptr = this.dataStart;\n while (fromIndex >= 0) {\n if (load(ptr + (fromIndex << alignof())) == value) return fromIndex;\n --fromIndex;\n }\n return -1;\n }\n\n push(value: T): i32 {\n var oldLen = this.length_;\n var len = oldLen + 1;\n ensureCapacity(changetype(this), len, alignof());\n if (isManaged()) {\n store(this.dataStart + (oldLen << alignof()), changetype(value));\n __link(changetype(this), changetype(value), true);\n } else {\n store(this.dataStart + (oldLen << alignof()), value);\n }\n this.length_ = len;\n return len;\n }\n\n concat(other: Array): Array {\n var thisLen = this.length_;\n var otherLen = select(0, other.length_, other === null);\n var outLen = thisLen + otherLen;\n if (outLen > BLOCK_MAXSIZE >>> alignof()) throw new Error(E_INVALIDLENGTH);\n var out = changetype>(__newArray(outLen, alignof(), idof>()));\n var outStart = out.dataStart;\n var thisSize = thisLen << alignof();\n if (isManaged()) {\n let thisStart = this.dataStart;\n for (let offset: usize = 0; offset < thisSize; offset += sizeof()) {\n let ref = load(thisStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n outStart += thisSize;\n let otherStart = other.dataStart;\n let otherSize = otherLen << alignof();\n for (let offset: usize = 0; offset < otherSize; offset += sizeof()) {\n let ref = load(otherStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(outStart, this.dataStart, thisSize);\n memory.copy(outStart + thisSize, other.dataStart, otherLen << alignof());\n }\n return out;\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): this {\n var ptr = this.dataStart;\n var len = this.length_;\n\n end = min(end, len);\n\n var to = target < 0 ? max(len + target, 0) : min(target, len);\n var from = start < 0 ? max(len + start, 0) : min(start, len);\n var last = end < 0 ? max(len + end, 0) : min(end, len);\n var count = min(last - from, len - to);\n\n memory.copy( // is memmove\n ptr + (to << alignof()),\n ptr + (from << alignof()),\n count << alignof()\n );\n return this;\n }\n\n pop(): T {\n var len = this.length_;\n if (len < 1) throw new RangeError(E_EMPTYARRAY);\n var val = load(this.dataStart + ((--len) << alignof()));\n this.length_ = len;\n return val;\n }\n\n forEach(fn: (value: T, index: i32, array: Array) => void): void {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n fn(load(this.dataStart + (i << alignof())), i, this);\n }\n }\n\n map(fn: (value: T, index: i32, array: Array) => U): Array {\n var len = this.length_;\n var out = changetype>(__newArray(len, alignof(), idof>()));\n var outStart = out.dataStart;\n for (let i = 0; i < min(len, this.length_); ++i) {\n let result = fn(load(this.dataStart + (i << alignof())), i, this);\n store(outStart + (i << alignof()), result);\n if (isManaged()) {\n __link(changetype(out), changetype(result), true);\n }\n }\n return out;\n }\n\n filter(fn: (value: T, index: i32, array: Array) => bool): Array {\n var result = changetype>(__newArray(0, alignof(), idof>()));\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n let value = load(this.dataStart + (i << alignof()));\n if (fn(value, i, this)) result.push(value);\n }\n return result;\n }\n\n reduce(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array) => U,\n initialValue: U\n ): U {\n var acc = initialValue;\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n acc = fn(acc, load(this.dataStart + (i << alignof())), i, this);\n }\n return acc;\n }\n\n reduceRight(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array) => U,\n initialValue: U\n ): U {\n var acc = initialValue;\n for (let i = this.length_ - 1; i >= 0; --i) {\n acc = fn(acc, load(this.dataStart + (i << alignof())), i, this);\n }\n return acc;\n }\n\n shift(): T {\n var len = this.length_;\n if (len < 1) throw new RangeError(E_EMPTYARRAY);\n var base = this.dataStart;\n var element = load(base);\n var lastIndex = len - 1;\n memory.copy(\n base,\n base + sizeof(),\n lastIndex << alignof()\n );\n if (isReference()) {\n store(base + (lastIndex << alignof()), 0);\n } else {\n // @ts-ignore\n store(base + (lastIndex << alignof()), 0);\n }\n this.length_ = lastIndex;\n return element;\n }\n\n some(fn: (value: T, index: i32, array: Array) => bool): bool {\n for (let i = 0, len = this.length_; i < min(len, this.length_); ++i) {\n if (fn(load(this.dataStart + (i << alignof())), i, this)) return true;\n }\n return false;\n }\n\n unshift(value: T): i32 {\n var len = this.length_ + 1;\n ensureCapacity(changetype(this), len, alignof());\n var ptr = this.dataStart;\n memory.copy(\n ptr + sizeof(),\n ptr,\n (len - 1) << alignof()\n );\n store(ptr, value);\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n this.length_ = len;\n return len;\n }\n\n slice(start: i32 = 0, end: i32 = i32.MAX_VALUE): Array {\n var len = this.length_;\n start = start < 0 ? max(start + len, 0) : min(start, len);\n end = end < 0 ? max(end + len, 0) : min(end , len);\n len = max(end - start, 0);\n var slice = changetype>(__newArray(len, alignof(), idof>()));\n var sliceBase = slice.dataStart;\n var thisBase = this.dataStart + (start << alignof());\n if (isManaged()) {\n let off = 0;\n let end = len << alignof();\n while (off < end) {\n let ref = load(thisBase + off);\n store(sliceBase + off, ref);\n __link(changetype(slice), ref, true);\n off += sizeof();\n }\n } else {\n memory.copy(sliceBase, thisBase, len << alignof());\n }\n return slice;\n }\n\n splice(start: i32, deleteCount: i32 = i32.MAX_VALUE): Array {\n var len = this.length_;\n start = start < 0 ? max(len + start, 0) : min(start, len);\n deleteCount = max(min(deleteCount, len - start), 0);\n var result = changetype>(__newArray(deleteCount, alignof(), idof>()));\n var resultStart = result.dataStart;\n var thisStart = this.dataStart;\n var thisBase = thisStart + (start << alignof());\n memory.copy(\n resultStart,\n thisBase,\n deleteCount << alignof()\n );\n var offset = start + deleteCount;\n if (len != offset) {\n memory.copy(\n thisBase,\n thisStart + (offset << alignof()),\n (len - offset) << alignof()\n );\n }\n this.length_ = len - deleteCount;\n return result;\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length_);\n return this;\n }\n\n sort(comparator: (a: T, b: T) => i32 = COMPARATOR()): this {\n SORT(this.dataStart, this.length_, comparator);\n return this;\n }\n\n join(separator: string = \",\"): string {\n var ptr = this.dataStart;\n var len = this.length_;\n if (isBoolean()) return joinBooleanArray(ptr, len, separator);\n if (isInteger()) return joinIntegerArray(ptr, len, separator);\n if (isFloat()) return joinFloatArray(ptr, len, separator);\n\n if (ASC_SHRINK_LEVEL < 1) {\n if (isString()) return joinStringArray(ptr, len, separator);\n }\n // For rest objects and arrays use general join routine\n if (isReference()) return joinReferenceArray(ptr, len, separator);\n ERROR(\"unspported element type\");\n return unreachable();\n }\n\n flat(): T {\n if (!isArray()) {\n throw new TypeError(E_ILLEGALGENTYPE);\n }\n // Get the length and data start values\n var ptr = this.dataStart;\n var len = this.length_;\n\n // calculate the end size with an initial pass\n var size = 0;\n for (let i = 0; i < len; ++i) {\n let child = load(ptr + (i << alignof()));\n size += child == 0 ? 0 : load(child, offsetof(\"length_\"));\n }\n\n // calculate the byteLength of the resulting backing ArrayBuffer\n const align = alignof>();\n var byteLength = size << align;\n var outBuffer = changetype(__new(byteLength, idof()));\n\n // create the return value and initialize it\n var outArray = changetype(__new(offsetof(), idof()));\n store(changetype(outArray), size, offsetof(\"length_\"));\n\n // byteLength, dataStart, and buffer are all readonly\n store(changetype(outArray), byteLength, offsetof(\"byteLength\"));\n store(changetype(outArray), changetype(outBuffer), offsetof(\"dataStart\"));\n store(changetype(outArray), changetype(outBuffer), offsetof(\"buffer\"));\n __link(changetype(outArray), changetype(outBuffer), false);\n\n // set the elements\n var resultOffset: usize = 0;\n for (let i = 0; i < len; ++i) { // for each child\n let child = load(ptr + (i << alignof()));\n\n // ignore null arrays\n if (!child) continue;\n\n // copy the underlying buffer data to the result buffer\n let childDataLength = load(child, offsetof(\"length_\")) << align;\n memory.copy(\n changetype(outBuffer) + resultOffset,\n load(child, offsetof(\"dataStart\")),\n childDataLength\n );\n\n // advance the result length\n resultOffset += childDataLength;\n }\n\n // if the `valueof` type is managed, we must link each reference\n if (isManaged>()) {\n for (let i = 0; i < size; ++i) {\n let ref = load(changetype(outBuffer) + (i << usize(alignof>())));\n __link(changetype(outBuffer), ref, true);\n }\n }\n\n return outArray;\n }\n\n toString(): string {\n return this.join();\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n if (isManaged()) {\n let cur = this.dataStart;\n let end = cur + (this.length_ << alignof());\n while (cur < end) {\n let val = load(cur);\n if (val) __visit(val, cookie);\n cur += sizeof();\n }\n }\n __visit(changetype(this.buffer), cookie);\n }\n}\n", - "arraybuffer": "/// \n\nimport { OBJECT, BLOCK_MAXSIZE, TOTAL_OVERHEAD } from \"./rt/common\";\nimport { Runtime } from \"shared/runtime\";\nimport { idof } from \"./builtins\";\nimport { E_INVALIDLENGTH } from \"./util/error\";\n\nexport abstract class ArrayBufferView {\n\n readonly buffer: ArrayBuffer;\n @unsafe readonly dataStart: usize;\n readonly byteLength: i32;\n\n get byteOffset(): i32 {\n return (this.dataStart - changetype(this.buffer));\n }\n\n protected constructor(length: i32, alignLog2: i32) {\n if (length > BLOCK_MAXSIZE >>> alignLog2) throw new RangeError(E_INVALIDLENGTH);\n var buffer = changetype(__new(length = length << alignLog2, idof()));\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(changetype(buffer), 0, length);\n }\n this.buffer = buffer; // links\n this.dataStart = changetype(buffer);\n this.byteLength = length;\n }\n}\n\n@final export class ArrayBuffer {\n\n static isView(value: T): bool {\n if (isNullable()) {\n if (value === null) return false;\n }\n if (value instanceof Int8Array) return true;\n if (value instanceof Uint8Array) return true;\n if (value instanceof Uint8ClampedArray) return true;\n if (value instanceof Int16Array) return true;\n if (value instanceof Uint16Array) return true;\n if (value instanceof Int32Array) return true;\n if (value instanceof Uint32Array) return true;\n if (value instanceof Int64Array) return true;\n if (value instanceof Uint64Array) return true;\n if (value instanceof Float32Array) return true;\n if (value instanceof Float64Array) return true;\n if (value instanceof DataView) return true;\n return false;\n }\n\n constructor(length: i32) {\n if (length > BLOCK_MAXSIZE) throw new RangeError(E_INVALIDLENGTH);\n var buffer = changetype(__new(length, idof()));\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(changetype(buffer), 0, length);\n }\n return buffer;\n }\n\n get byteLength(): i32 {\n return changetype(changetype(this) - TOTAL_OVERHEAD).rtSize;\n }\n\n slice(begin: i32 = 0, end: i32 = BLOCK_MAXSIZE): ArrayBuffer {\n var length = this.byteLength;\n begin = begin < 0 ? max(length + begin, 0) : min(begin, length);\n end = end < 0 ? max(length + end , 0) : min(end , length);\n var outSize = max(end - begin, 0);\n var out = changetype(__new(outSize, idof()));\n memory.copy(changetype(out), changetype(this) + begin, outSize);\n return out;\n }\n\n toString(): string {\n return \"[object ArrayBuffer]\";\n }\n}\n", - "atomics": "import { ArrayBufferView } from \"./arraybuffer\";\nimport { E_INDEXOUTOFRANGE } from \"./util/error\";\n\nexport namespace Atomics {\n\n // @ts-ignore: decorator\n @inline\n export function load(array: T, index: i32): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.load>(\n changetype(array.buffer) + (index << align) + array.byteOffset\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function store(array: T, index: i32, value: valueof): void {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n atomic.store>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n value\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function add(array: T, index: i32, value: valueof): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.add>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n value\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function sub(array: T, index: i32, value: valueof): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.sub>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n value\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function and(array: T, index: i32, value: valueof): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.and>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n value\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function or(array: T, index: i32, value: valueof): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.or>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n value\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function xor(array: T, index: i32, value: valueof): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.xor>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n value\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function exchange(array: T, index: i32, value: valueof): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.xchg>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n value\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function compareExchange(\n array: T,\n index: i32,\n expectedValue: valueof,\n replacementValue: valueof\n ): valueof {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.cmpxchg>(\n changetype(array.buffer) + (index << align) + array.byteOffset,\n expectedValue,\n replacementValue\n );\n }\n\n // @ts-ignore: decorator\n @inline\n export function wait(array: T, value: valueof, timeout: i64 = -1): AtomicWaitResult {\n return atomic.wait>(changetype(array.buffer) + array.byteOffset, value, timeout);\n }\n\n // @ts-ignore: decorator\n @inline\n export function notify(array: T, index: i32, count: i32 = -1): i32 {\n const align = alignof>();\n if (index < 0 || (index << align) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return atomic.notify(changetype(array.buffer) + (index << align) + array.byteOffset, count);\n }\n\n export function isLockFree(size: usize): bool {\n return size == 1 || size == 2 || size == 4;\n }\n}\n", - "bindings/asyncify": "@unmanaged\nexport class StackDescriptor {\n /** The index in linear memory of the start of the “asyncify stack”. */\n stackStart: usize;\n /** The index of the end of that stack region, which implies how big it is. */\n stackEnd: usize;\n}\n\n/** Starts to unwind the call stack. */\nexport declare function start_unwind(data: StackDescriptor): void;\n/** Stops unwinding the call stack. */\nexport declare function stop_unwind(): void;\n/** Starts to rewind the call stack. */\nexport declare function start_rewind(data: StackDescriptor): void;\n/** Stops rewinding the call stack. */\nexport declare function stop_rewind(): void;\n", - "bindings/console": "export declare function assert(value: externref): void;\nexport declare function clear(): void;\nexport declare function error(value: externref): void;\nexport declare function info(value: externref): void;\nexport declare function log(value: externref): void;\nexport declare function time(label: externref): externref;\nexport declare function timeEnd(label: externref): void;\nexport declare function timeLog(label: externref): void;\nexport declare function trace(): void;\nexport declare function warn(value: externref): void;\n", - "bindings/Date": "export declare function now(): f64;\n", - "bindings/Math": "export declare const E: f64;\nexport declare const LN2: f64;\nexport declare const LN10: f64;\nexport declare const LOG2E: f64;\nexport declare const LOG10E: f64;\nexport declare const PI: f64;\nexport declare const SQRT1_2: f64;\nexport declare const SQRT2: f64;\n\nexport declare function abs(x: f64): f64;\nexport declare function acos(x: f64): f64;\nexport declare function acosh(x: f64): f64;\nexport declare function asin(x: f64): f64;\nexport declare function asinh(x: f64): f64;\nexport declare function atan(x: f64): f64;\nexport declare function atan2(y: f64, x: f64): f64;\nexport declare function atanh(x: f64): f64;\nexport declare function cbrt(x: f64): f64;\nexport declare function ceil(x: f64): f64;\nexport declare function clz32(x: f64): f64;\nexport declare function cos(x: f64): f64;\nexport declare function cosh(x: f64): f64;\nexport declare function exp(x: f64): f64;\nexport declare function expm1(x: f64): f64;\nexport declare function floor(x: f64): f64;\nexport declare function fround(x: f64): f32;\nexport declare function hypot(value1: f64, value2: f64): f64; // TODO: rest\nexport declare function imul(a: f64, b: f64): f64;\nexport declare function log(x: f64): f64;\nexport declare function log10(x: f64): f64;\nexport declare function log1p(x: f64): f64;\nexport declare function log2(x: f64): f64;\nexport declare function max(value1: f64, value2: f64): f64; // TODO: rest\nexport declare function min(value1: f64, value2: f64): f64; // TODO: rest\nexport declare function pow(base: f64, exponent: f64): f64;\nexport declare function random(): f64;\nexport declare function round(x: f64): f64;\nexport declare function sign(x: f64): f64;\nexport declare function sin(x: f64): f64;\nexport declare function sinh(x: f64): f64;\nexport declare function sqrt(x: f64): f64;\nexport declare function tan(x: f64): f64;\nexport declare function tanh(x: f64): f64;\nexport declare function trunc(x: f64): f64;\n", - "bindings/Reflect": "export declare function get(target: externref, propertyKey: externref/* , receiver: externref */): externref;\nexport declare function has(target: externref, propertyKey: externref): bool;\nexport declare function set(target: externref, propertyKey: externref, value: externref/* , receiver: externref */): externref;\nexport declare function apply(target: externref, thisArgument: externref, argumentsList: externref): externref;\n", - "bindings/wasi_snapshot_preview1": "// Phase: wasi_snapshot_preview1\n// See: https://github.com/WebAssembly/WASI/tree/main/phases/snapshot/witx\n\n// helper types to be more explicit\ntype char = u8;\ntype ptr = usize; // all pointers are usize'd\ntype struct = T; // structs are references already in AS\n\n/** Read command-line argument data. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function args_get(\n /** Input: Pointer to a buffer to write the argument pointers. */\n argv: ptr>,\n /** Input: Pointer to a buffer to write the argument string data. */\n argv_buf: ptr\n): errno;\n\n/** Return command-line argument data sizes. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function args_sizes_get(\n /** Output: Number of arguments. */\n argc: ptr,\n /** Output: Size of the argument string data. */\n argv_buf_size: ptr\n): errno;\n\n/** Return the resolution of a clock. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function clock_res_get(\n /** Input: The clock for which to return the resolution. */\n clock: clockid,\n /** Output: The resolution of the clock. */\n resolution: ptr\n): errno;\n\n/** Return the time value of a clock. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function clock_time_get(\n /** Input: Cock for which to return the time. */\n clock: clockid,\n /** Input: Maximum lag (exclusive) that the returned time value may have, compared to its actual value. */\n precision: timestamp,\n /** Output: Time value of the clock. */\n time: ptr\n): errno;\n\n/** Read environment variable data. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function environ_get(\n /** Input: Pointer to a buffer to write the environment variable pointers. */\n environ: ptr,\n /** Input: Pointer to a buffer to write the environment variable string data. */\n environ_buf: usize\n): errno;\n\n/** Return command-line argument data sizes. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function environ_sizes_get(\n /** Output: The number of environment variables. */\n environ_count: ptr,\n /** Output: The size of the environment variable string data. */\n environ_buf_size: ptr\n): errno;\n\n/** Provide file advisory information on a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_advise(\n /** Input: The file descriptor for the file for which to provide file advisory information. */\n fd: fd,\n /** Input: The offset within the file to which the advisory applies. */\n offset: filesize,\n /** Input: The length of the region to which the advisory applies. */\n len: filesize,\n /** Input: The advice. */\n advice: advice\n): errno;\n\n/** Provide file advisory information on a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_allocate(\n /** Input: The file descriptor for the file in which to allocate space. */\n fd: fd,\n /** Input: The offset at which to start the allocation. */\n offset: filesize,\n /** Input: The length of the area that is allocated. */\n len: filesize\n): errno;\n\n/** Close a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_close(\n /** Input: The file descriptor to close. */\n fd: fd\n): errno;\n\n/** Synchronize the data of a file to disk. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_datasync(\n /** Input: The file descriptor of the file to synchronize to disk. */\n fd: fd\n): errno;\n\n/** Get the attributes of a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_fdstat_get(\n /** Input: The file descriptor to inspect. */\n fd: fd,\n /** Input: The buffer where the file descriptor's attributes are stored. */\n buf: struct\n): errno;\n\n/** Adjust the flags associated with a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_fdstat_set_flags(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The desired values of the file descriptor flags. */\n flags: fdflags\n): errno;\n\n/** Adjust the rights associated with a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_fdstat_set_rights(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The desired rights of the file descriptor. */\n fs_rights_base: rights,\n /** Input: The desired rights of the file descriptor. */\n fs_rights_inheriting: rights\n): errno;\n\n/** Return the attributes of an open file. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_filestat_get(\n /** Input: The file descriptor to inspect. */\n fd: fd,\n /** Input: The buffer where the file's attributes are stored. */\n buf: struct\n): errno;\n\n/** Adjust the size of an open file. If this increases the file's size, the extra bytes are filled with zeros. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_filestat_set_size(\n /** Input: A file descriptor for the file to adjust. */\n fd: fd,\n /** Input: The desired file size. */\n size: filesize\n): errno;\n\n/** Adjust the timestamps of an open file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_filestat_set_times(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The desired values of the data access timestamp. */\n st_atim: timestamp,\n /** Input: The desired values of the data modification timestamp. */\n st_mtim: timestamp,\n /** Input: A bitmask indicating which timestamps to adjust. */\n fstflags: fstflags\n): errno;\n\n/** Read from a file descriptor, without using and updating the file descriptor's offset. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_pread(\n /** Input: The file descriptor from which to read data. */\n fd: fd,\n /** Input: List of scatter/gather vectors in which to store data. */\n iovs: ptr>,\n /** Input: Length of the list of scatter/gather vectors in which to store data. */\n iovs_len: usize,\n /** Input: The offset within the file at which to read. */\n offset: filesize,\n /** Output: The number of bytes read. */\n nread: ptr\n): errno;\n\n/** Return a description of the given preopened file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_prestat_get(\n /** Input: The file descriptor about which to retrieve information. */\n fd: fd,\n /** Input: The buffer where the description is stored. */\n buf: struct\n): errno;\n\n/** Return a description of the given preopened file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_prestat_dir_name(\n /** Input: The file descriptor about which to retrieve information. */\n fd: fd,\n /** Input: Buffer into which to write the preopened directory name. */\n path: ptr,\n /** Input: Length of the buffer into which to write the preopened directory name. */\n path_len: usize\n): errno;\n\n/** Write to a file descriptor, without using and updating the file descriptor's offset. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_pwrite(\n /** Input: The file descriptor to which to write data. */\n fd: fd,\n /** Input: List of scatter/gather vectors from which to retrieve data. */\n iovs: ptr>,\n /** Input: Length of the list of scatter/gather vectors from which to retrieve data. */\n iovs_len: usize,\n /** Input: The offset within the file at which to write. */\n offset: filesize,\n /** Output: The number of bytes written. */\n nwritten: ptr\n): errno;\n\n/** Read from a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_read(\n /** Input: The file descriptor from which to read data. */\n fd: fd,\n /** Input: List of scatter/gather vectors to which to store data. */\n iovs: ptr>,\n /** Input: Length of the list of scatter/gather vectors to which to store data. */\n iovs_len: usize,\n /** Output: The number of bytes read. */\n nread: ptr\n): errno;\n\n/** Read directory entries from a directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_readdir(\n /** Input: Directory from which to read the directory entries. */\n fd: fd,\n /** Input: Buffer where directory entries are stored. */\n buf: ptr>,\n /** Input: Length of the buffer where directory entries are stored. */\n buf_len: usize,\n /** Input: Location within the directory to start reading. */\n cookie: dircookie,\n /** Output: Number of bytes stored in the read buffer. If less than the size of the read buffer, the end of the directory has been reached. */\n buf_used: ptr\n): errno;\n\n/** Atomically replace a file descriptor by renumbering another file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_renumber(\n /** Input: The file descriptor to renumber. */\n from: fd,\n /** Input: The file descriptor to overwrite. */\n to: fd\n): errno;\n\n/** Move the offset of a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_seek(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The number of bytes to move. */\n offset: filedelta,\n /** Input: The base from which the offset is relative. */\n whence: whence,\n /** Output: The new offset of the file descriptor, relative to the start of the file. */\n newoffset: ptr\n): errno;\n\n/** Synchronize the data and metadata of a file to disk. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_sync(\n /** Input: The file descriptor of the file containing the data and metadata to synchronize to disk. */\n fd: fd\n): errno;\n\n/** Return the current offset of a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_tell(\n /** Input: The file descriptor to inspect. */\n fd: fd,\n /** Output: The current offset of the file descriptor, relative to the start of the file. */\n newoffset: ptr\n): errno;\n\n/** Write to a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_write(\n /** Input: The file descriptor to which to write data. */\n fd: fd,\n /** Input: List of scatter/gather vectors from which to retrieve data. */\n iovs: ptr>,\n /** Input: List of scatter/gather vectors from which to retrieve data. */\n iovs_len: usize,\n /** Output: The number of bytes written. */\n nwritten: ptr\n): errno;\n\n/* Create a directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_create_directory(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path at which to create the directory. */\n path: ptr,\n /** Input: The path at which to create the directory. */\n path_len: usize\n): errno;\n\n/** Return the attributes of a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_filestat_get(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n flags: lookupflags,\n /** Input: The path of the file or directory to inspect. */\n path: ptr,\n /** Input: The path of the file or directory to inspect. */\n path_len: usize,\n /** Input: The buffer where the file's attributes are stored. */\n buf: struct\n): errno;\n\n/** Adjust the timestamps of a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_filestat_set_times(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n flags: lookupflags,\n /** Input: The path of the file or directory to operate on. */\n path: ptr,\n /** Input: The path of the file or directory to operate on. */\n path_len: usize,\n /** Input: The desired values of the data access timestamp. */\n st_atim: timestamp,\n /** Input: The desired values of the data modification timestamp. */\n st_mtim: timestamp,\n /** Input: A bitmask indicating which timestamps to adjust. */\n fstflags: fstflags\n): errno;\n\n/** Create a hard link. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_link(\n /** Input: The working directory at which the resolution of the old path starts. */\n old_fd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n old_flags: lookupflags,\n /** Input: The source path from which to link. */\n old_path: ptr,\n /** Input: The source path from which to link. */\n old_path_len: usize,\n /** Input: The working directory at which the resolution of the new path starts. */\n new_fd: fd,\n /** Input: The destination path at which to create the hard link. */\n new_path: ptr,\n /** Input: The length of the destination path at which to create the hard link. */\n new_path_len: usize\n): errno;\n\n/** Open a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_open(\n /** Input: The working directory at which the resolution of the path starts. */\n dirfd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n dirflags: lookupflags,\n /** Input: The path of the file or directory to open. */\n path: ptr,\n /** Input: The length of the path of the file or directory to open. */\n path_len: usize,\n /** Input: The method by which to open the file. */\n oflags: oflags,\n /** Input: The initial base rights that apply to operations using the file descriptor itself. */\n fs_rights_base: rights,\n /** Input: The initial inheriting rights that apply to file descriptors derived from it. */\n fs_rights_inheriting: rights,\n /** Input: The initial flags of the file descriptor. */\n fs_flags: fdflags,\n /** Output: The file descriptor of the file that has been opened. */\n fd: ptr\n): errno;\n\n/** Read the contents of a symbolic link. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_readlink(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path of the symbolic link from which to read. */\n path: ptr,\n /** Input: The length of the path of the symbolic link from which to read. */\n path_len: usize,\n /** Input: The buffer to which to write the contents of the symbolic link. */\n buf: ptr,\n /** Input: The length of the buffer to which to write the contents of the symbolic link. */\n buf_len: usize,\n /** Output: The number of bytes placed in the buffer. */\n buf_used: ptr\n): errno;\n\n/** Remove a directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_remove_directory(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path to a directory to remove. */\n path: ptr,\n /** Input: The length of the path to a directory to remove. */\n path_len: usize\n): errno;\n\n/** Rename a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_rename(\n /** Input: The working directory at which the resolution of the old path starts. */\n old_fd: fd,\n /** Input: The source path of the file or directory to rename. */\n old_path: ptr,\n /** Input: The length of the source path of the file or directory to rename. */\n old_path_len: usize,\n /** Input: The working directory at which the resolution of the new path starts. */\n new_fd: fd,\n /** Input: The destination path to which to rename the file or directory. */\n new_path: ptr,\n /** Input: The length of the destination path to which to rename the file or directory. */\n new_path_len: usize\n): errno;\n\n/** Create a symbolic link. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_symlink(\n /** Input: The contents of the symbolic link. */\n old_path: ptr,\n /** Input: The length of the contents of the symbolic link. */\n old_path_len: usize,\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The destination path at which to create the symbolic link. */\n new_path: ptr,\n /** Input: The length of the destination path at which to create the symbolic link. */\n new_path_len: usize\n): errno;\n\n/** Unlink a file. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_unlink_file(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path to a file to unlink. */\n path: ptr,\n /** Input: The length of the path to a file to unlink. */\n path_len: usize\n): errno;\n\n/** Concurrently poll for the occurrence of a set of events. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function poll_oneoff(\n /** Input: The events to which to subscribe. */\n in_: ptr>,\n /** Input: The events that have occurred. */\n out: ptr>,\n /** Input: Both the number of subscriptions and events. */\n nsubscriptions: usize,\n /** Output: The number of events stored. */\n nevents: ptr\n): errno;\n\n/** Terminate the process normally. An exit code of 0 indicates successful termination of the program. The meanings of other values is dependent on the environment. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function proc_exit(\n /** Input: The exit code returned by the process. */\n rval: u32\n): void;\n\n/** Send a signal to the process of the calling thread. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function proc_raise(\n /** Input: The signal condition to trigger. */\n sig: signal\n): errno;\n\n/** Write high-quality random data into a buffer. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function random_get(\n /** Input: The buffer to fill with random data. */\n buf: usize,\n /** Input: The length of the buffer to fill with random data. */\n buf_len: usize\n): errno;\n\n/** Temporarily yield execution of the calling thread. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sched_yield(): errno;\n\n/** Receive a message from a socket. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sock_recv(\n /** Input: The socket on which to receive data. */\n sock: fd,\n /** Input: List of scatter/gather vectors to which to store data. */\n ri_data: ptr>,\n /** Input: The length of the list of scatter/gather vectors to which to store data. */\n ri_data_len: usize,\n /** Input: Message flags. */\n ri_flags: riflags,\n /** Output: Number of bytes stored in `ri_data`. */\n ro_datalen: ptr,\n /** Output: Message flags. */\n ro_flags: ptr\n): errno;\n\n/** Send a message on a socket. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sock_send(\n /** Input: The socket on which to send data. */\n sock: fd,\n /** Input: List of scatter/gather vectors to which to retrieve data */\n si_data: ptr>,\n /** Input: The length of the list of scatter/gather vectors to which to retrieve data */\n si_data_len: usize,\n /** Input: Message flags. */\n si_flags: siflags,\n /** Output: Number of bytes transmitted. */\n so_datalen: ptr\n): errno;\n\n/** Shut down socket send and receive channels. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sock_shutdown(\n /** Input: The socket on which to shutdown channels. */\n sock: fd,\n /** Input: Which channels on the socket to shut down. */\n how: sdflags\n): errno;\n\n// === Types ======================================================================================\n\n/** File or memory access pattern advisory information. */\nexport namespace advice {\n /** The application has no advice to give on its behavior with respect to the specified data. */\n // @ts-ignore: decorator\n @inline\n export const NORMAL: advice = 0;\n /** The application expects to access the specified data sequentially from lower offsets to higher offsets. */\n // @ts-ignore: decorator\n @inline\n export const SEQUENTIAL : advice = 1;\n /** The application expects to access the specified data in a random order. */\n // @ts-ignore: decorator\n @inline\n export const RANDOM: advice = 2;\n /** The application expects to access the specified data in the near future. */\n // @ts-ignore: decorator\n @inline\n export const WILLNEED: advice = 3;\n /** The application expects that it will not access the specified data in the near future. */\n // @ts-ignore: decorator\n @inline\n export const DONTNEED: advice = 4;\n /** The application expects to access the specified data once and then not reuse it thereafter. */\n // @ts-ignore: decorator\n @inline\n export const NOREUSE: advice = 5;\n}\nexport type advice = u8;\n\n/** Identifiers for clocks. */\nexport namespace clockid {\n /** The clock measuring real time. Time value zero corresponds with 1970-01-01T00:00:00Z. */\n // @ts-ignore: decorator\n @inline\n export const REALTIME: clockid = 0;\n /** The store-wide monotonic clock. Absolute value has no meaning. */\n // @ts-ignore: decorator\n @inline\n export const MONOTONIC: clockid = 1;\n /** The CPU-time clock associated with the current process. */\n // @ts-ignore: decorator\n @inline\n export const PROCESS_CPUTIME_ID: clockid = 2;\n /** The CPU-time clock associated with the current thread. */\n // @ts-ignore: decorator\n @inline\n export const THREAD_CPUTIME_ID: clockid = 3;\n}\nexport type clockid = u32;\n\n/** Identifier for a device containing a file system. Can be used in combination with `inode` to uniquely identify a file or directory in the filesystem. */\nexport type device = u64;\n\n/** A reference to the offset of a directory entry. The value 0 signifies the start of the directory. */\nexport type dircookie = u64;\n\n/** A directory entry. */\n@unmanaged export class dirent {\n /** The offset of the next directory entry stored in this directory. */\n next: dircookie;\n /** The serial number of the file referred to by this directory entry. */\n ino: inode;\n /** The length of the name of the directory entry. */\n namlen: u32;\n /** The type of the file referred to by this directory entry. */\n type: filetype;\n private __padding0: u16;\n}\n\n/** Error codes returned by functions. */\nexport namespace errno {\n /** No error occurred. System call completed successfully. */\n // @ts-ignore: decorator\n @inline\n export const SUCCESS: errno = 0;\n /** Argument list too long. */\n // @ts-ignore: decorator\n @inline\n export const TOOBIG: errno = 1;\n /** Permission denied. */\n // @ts-ignore: decorator\n @inline\n export const ACCES: errno = 2;\n /** Address in use. */\n // @ts-ignore: decorator\n @inline\n export const ADDRINUSE: errno = 3;\n /** Address not available. */\n // @ts-ignore: decorator\n @inline\n export const ADDRNOTAVAIL: errno = 4;\n /** Address family not supported. */\n // @ts-ignore: decorator\n @inline\n export const AFNOSUPPORT: errno = 5;\n /** Resource unavailable, or operation would block. */\n // @ts-ignore: decorator\n @inline\n export const AGAIN: errno = 6;\n /** Connection already in progress. */\n // @ts-ignore: decorator\n @inline\n export const ALREADY: errno = 7;\n /** Bad file descriptor. */\n // @ts-ignore: decorator\n @inline\n export const BADF: errno = 8;\n /** Bad message. */\n // @ts-ignore: decorator\n @inline\n export const BADMSG: errno = 9;\n /** Device or resource busy. */\n // @ts-ignore: decorator\n @inline\n export const BUSY: errno = 10;\n /** Operation canceled. */\n // @ts-ignore: decorator\n @inline\n export const CANCELED: errno = 11;\n /** No child processes. */\n // @ts-ignore: decorator\n @inline\n export const CHILD: errno = 12;\n /** Connection aborted. */\n // @ts-ignore: decorator\n @inline\n export const CONNABORTED: errno = 13;\n /** Connection refused. */\n // @ts-ignore: decorator\n @inline\n export const CONNREFUSED: errno = 14;\n /** Connection reset. */\n // @ts-ignore: decorator\n @inline\n export const CONNRESET: errno = 15;\n /** Resource deadlock would occur. */\n // @ts-ignore: decorator\n @inline\n export const DEADLK: errno = 16;\n /** Destination address required. */\n // @ts-ignore: decorator\n @inline\n export const DESTADDRREQ: errno = 17;\n /** Mathematics argument out of domain of function. */\n // @ts-ignore: decorator\n @inline\n export const DOM: errno = 18;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const DQUOT: errno = 19;\n /** File exists. */\n // @ts-ignore: decorator\n @inline\n export const EXIST: errno = 20;\n /** Bad address. */\n // @ts-ignore: decorator\n @inline\n export const FAULT: errno = 21;\n /** File too large. */\n // @ts-ignore: decorator\n @inline\n export const FBIG: errno = 22;\n /** Host is unreachable. */\n // @ts-ignore: decorator\n @inline\n export const HOSTUNREACH: errno = 23;\n /** Identifier removed. */\n // @ts-ignore: decorator\n @inline\n export const IDRM: errno = 24;\n /** Illegal byte sequence. */\n // @ts-ignore: decorator\n @inline\n export const ILSEQ: errno = 25;\n /** Operation in progress. */\n // @ts-ignore: decorator\n @inline\n export const INPROGRESS: errno = 26;\n /** Interrupted function. */\n // @ts-ignore: decorator\n @inline\n export const INTR: errno = 27;\n /** Invalid argument. */\n // @ts-ignore: decorator\n @inline\n export const INVAL: errno = 28;\n /** I/O error. */\n // @ts-ignore: decorator\n @inline\n export const IO: errno = 29;\n /** Socket is connected. */\n // @ts-ignore: decorator\n @inline\n export const ISCONN: errno = 30;\n /** Is a directory. */\n // @ts-ignore: decorator\n @inline\n export const ISDIR: errno = 31;\n /** Too many levels of symbolic links. */\n // @ts-ignore: decorator\n @inline\n export const LOOP: errno = 32;\n /** File descriptor value too large. */\n // @ts-ignore: decorator\n @inline\n export const MFILE: errno = 33;\n /** Too many links. */\n // @ts-ignore: decorator\n @inline\n export const MLINK: errno = 34;\n /** Message too large. */\n // @ts-ignore: decorator\n @inline\n export const MSGSIZE: errno = 35;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const MULTIHOP: errno = 36;\n /** Filename too long. */\n // @ts-ignore: decorator\n @inline\n export const NAMETOOLONG: errno = 37;\n /** Network is down. */\n // @ts-ignore: decorator\n @inline\n export const NETDOWN: errno = 38;\n /** Connection aborted by network. */\n // @ts-ignore: decorator\n @inline\n export const NETRESET: errno = 39;\n /** Network unreachable. */\n // @ts-ignore: decorator\n @inline\n export const NETUNREACH: errno = 40;\n /** Too many files open in system. */\n // @ts-ignore: decorator\n @inline\n export const NFILE: errno = 41;\n /** No buffer space available. */\n // @ts-ignore: decorator\n @inline\n export const NOBUFS: errno = 42;\n /** No such device. */\n // @ts-ignore: decorator\n @inline\n export const NODEV: errno = 43;\n /** No such file or directory. */\n // @ts-ignore: decorator\n @inline\n export const NOENT: errno = 44;\n /** Executable file format error. */\n // @ts-ignore: decorator\n @inline\n export const NOEXEC: errno = 45;\n /** No locks available. */\n // @ts-ignore: decorator\n @inline\n export const NOLCK: errno = 46;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const NOLINK: errno = 47;\n /** Not enough space. */\n // @ts-ignore: decorator\n @inline\n export const NOMEM: errno = 48;\n /** No message of the desired type. */\n // @ts-ignore: decorator\n @inline\n export const NOMSG: errno = 49;\n /** Protocol not available. */\n // @ts-ignore: decorator\n @inline\n export const NOPROTOOPT: errno = 50;\n /** No space left on device. */\n // @ts-ignore: decorator\n @inline\n export const NOSPC: errno = 51;\n /** Function not supported. */\n // @ts-ignore: decorator\n @inline\n export const NOSYS: errno = 52;\n /** The socket is not connected. */\n // @ts-ignore: decorator\n @inline\n export const NOTCONN: errno = 53;\n /** Not a directory or a symbolic link to a directory. */\n // @ts-ignore: decorator\n @inline\n export const NOTDIR: errno = 54;\n /** Directory not empty. */\n // @ts-ignore: decorator\n @inline\n export const NOTEMPTY: errno = 55;\n /** State not recoverable. */\n // @ts-ignore: decorator\n @inline\n export const NOTRECOVERABLE: errno = 56;\n /** Not a socket. */\n // @ts-ignore: decorator\n @inline\n export const NOTSOCK: errno = 57;\n /** Not supported, or operation not supported on socket. */\n // @ts-ignore: decorator\n @inline\n export const NOTSUP: errno = 58;\n /** Inappropriate I/O control operation. */\n // @ts-ignore: decorator\n @inline\n export const NOTTY: errno = 59;\n /** No such device or address. */\n // @ts-ignore: decorator\n @inline\n export const NXIO: errno = 60;\n /** Value too large to be stored in data type. */\n // @ts-ignore: decorator\n @inline\n export const OVERFLOW: errno = 61;\n /** Previous owner died. */\n // @ts-ignore: decorator\n @inline\n export const OWNERDEAD: errno = 62;\n /** Operation not permitted. */\n // @ts-ignore: decorator\n @inline\n export const PERM: errno = 63;\n /** Broken pipe. */\n // @ts-ignore: decorator\n @inline\n export const PIPE: errno = 64;\n /** Protocol error. */\n // @ts-ignore: decorator\n @inline\n export const PROTO: errno = 65;\n /** Protocol not supported. */\n // @ts-ignore: decorator\n @inline\n export const PROTONOSUPPORT: errno = 66;\n /** Protocol wrong type for socket. */\n // @ts-ignore: decorator\n @inline\n export const PROTOTYPE: errno = 67;\n /** Result too large. */\n // @ts-ignore: decorator\n @inline\n export const RANGE: errno = 68;\n /** Read-only file system. */\n // @ts-ignore: decorator\n @inline\n export const ROFS: errno = 69;\n /** Invalid seek. */\n // @ts-ignore: decorator\n @inline\n export const SPIPE: errno = 70;\n /** No such process. */\n // @ts-ignore: decorator\n @inline\n export const SRCH: errno = 71;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const STALE: errno = 72;\n /** Connection timed out. */\n // @ts-ignore: decorator\n @inline\n export const TIMEDOUT: errno = 73;\n /** Text file busy. */\n // @ts-ignore: decorator\n @inline\n export const TXTBSY: errno = 74;\n /** Cross-device link. */\n // @ts-ignore: decorator\n @inline\n export const XDEV: errno = 75;\n /** Extension: Capabilities insufficient. */\n // @ts-ignore: decorator\n @inline\n export const NOTCAPABLE: errno = 76;\n}\nexport type errno = u16;\n\n/** Translates an error code to a string. */\nexport function errnoToString(err: errno): string {\n switch (err) {\n case errno.SUCCESS: return \"SUCCESS\";\n case errno.TOOBIG: return \"TOOBIG\";\n case errno.ACCES: return \"ACCES\";\n case errno.ADDRINUSE: return \"ADDRINUSE\";\n case errno.ADDRNOTAVAIL: return \"ADDRNOTAVAIL\";\n case errno.AFNOSUPPORT: return \"AFNOSUPPORT\";\n case errno.AGAIN: return \"AGAIN\";\n case errno.ALREADY: return \"ALREADY\";\n case errno.BADF: return \"BADF\";\n case errno.BADMSG: return \"BADMSG\";\n case errno.BUSY: return \"BUSY\";\n case errno.CANCELED: return \"CANCELED\";\n case errno.CHILD: return \"CHILD\";\n case errno.CONNABORTED: return \"CONNABORTED\";\n case errno.CONNREFUSED: return \"CONNREFUSED\";\n case errno.CONNRESET: return \"CONNRESET\";\n case errno.DEADLK: return \"DEADLK\";\n case errno.DESTADDRREQ: return \"DESTADDRREQ\";\n case errno.DOM: return \"DOM\";\n case errno.DQUOT: return \"DQUOT\";\n case errno.EXIST: return \"EXIST\";\n case errno.FAULT: return \"FAULT\";\n case errno.FBIG: return \"FBIG\";\n case errno.HOSTUNREACH: return \"HOSTUNREACH\";\n case errno.IDRM: return \"IDRM\";\n case errno.ILSEQ: return \"ILSEQ\";\n case errno.INPROGRESS: return \"INPROGRESS\";\n case errno.INTR: return \"INTR\";\n case errno.INVAL: return \"INVAL\";\n case errno.IO: return \"IO\";\n case errno.ISCONN: return \"ISCONN\";\n case errno.ISDIR: return \"ISDIR\";\n case errno.LOOP: return \"LOOP\";\n case errno.MFILE: return \"MFILE\";\n case errno.MLINK: return \"MLINK\";\n case errno.MSGSIZE: return \"MSGSIZE\";\n case errno.MULTIHOP: return \"MULTIHOP\";\n case errno.NAMETOOLONG: return \"NAMETOOLONG\";\n case errno.NETDOWN: return \"NETDOWN\";\n case errno.NETRESET: return \"NETRESET\";\n case errno.NETUNREACH: return \"NETUNREACH\";\n case errno.NFILE: return \"NFILE\";\n case errno.NOBUFS: return \"NOBUFS\";\n case errno.NODEV: return \"NODEV\";\n case errno.NOENT: return \"NOENT\";\n case errno.NOEXEC: return \"NOEXEC\";\n case errno.NOLCK: return \"NOLCK\";\n case errno.NOLINK: return \"NOLINK\";\n case errno.NOMEM: return \"NOMEM\";\n case errno.NOMSG: return \"NOMSG\";\n case errno.NOPROTOOPT: return \"NOPROTOOPT\";\n case errno.NOSPC: return \"NOSPC\";\n case errno.NOSYS: return \"NOSYS\";\n case errno.NOTCONN: return \"NOTCONN\";\n case errno.NOTDIR: return \"NOTDIR\";\n case errno.NOTEMPTY: return \"NOTEMPTY\";\n case errno.NOTRECOVERABLE: return \"NOTRECOVERABLE\";\n case errno.NOTSOCK: return \"NOTSOCK\";\n case errno.NOTSUP: return \"NOTSUP\";\n case errno.NOTTY: return \"NOTTY\";\n case errno.NXIO: return \"NXIO\";\n case errno.OVERFLOW: return \"OVERFLOW\";\n case errno.OWNERDEAD: return \"OWNERDEAD\";\n case errno.PERM: return \"PERM\";\n case errno.PIPE: return \"PIPE\";\n case errno.PROTO: return \"PROTO\";\n case errno.PROTONOSUPPORT: return \"PROTONOSUPPORT\";\n case errno.PROTOTYPE: return \"PROTOTYPE\";\n case errno.RANGE: return \"RANGE\";\n case errno.ROFS: return \"ROFS\";\n case errno.SPIPE: return \"SPIPE\";\n case errno.SRCH: return \"SRCH\";\n case errno.STALE: return \"STALE\";\n case errno.TIMEDOUT: return \"TIMEDOUT\";\n case errno.TXTBSY: return \"TXTBSY\";\n case errno.XDEV: return \"XDEV\";\n case errno.NOTCAPABLE: return \"NOTCAPABLE\";\n }\n return \"UNKNOWN\";\n}\n\n@unmanaged abstract class $event { // size=16/32\n /** User-provided value that got attached to `subscription#userdata`. */\n userdata: userdata;\n /** If non-zero, an error that occurred while processing the subscription request. */\n error: errno;\n /** The type of the event that occurred. */\n type: eventtype;\n\n private __padding0: u16;\n}\n\n/** An event that occurred. */\n@unmanaged export abstract class event extends $event {\n private __padding1: u64;\n private __padding2: u64;\n}\n\n/** An event that occurred when type is `eventtype.FD_READ` or `eventtype.FD_WRITE`. */\n@unmanaged export class event_fd_readwrite extends $event {\n /* The number of bytes available for reading or writing. */\n nbytes: filesize;\n /* The state of the file descriptor. */\n flags: eventrwflags;\n\n private __padding1: u32;\n}\n\n/** The state of the file descriptor subscribed to with `eventtype.FD_READ` or `eventtype.FD_WRITE`. */\nexport namespace eventrwflags {\n /** The peer of this socket has closed or disconnected. */\n // @ts-ignore: decorator\n @inline\n export const HANGUP: eventrwflags = 1;\n}\nexport type eventrwflags = u16;\n\n/** Type of a subscription to an event or its occurrence. */\nexport namespace eventtype {\n /** The time value of clock has reached the timestamp. */\n // @ts-ignore: decorator\n @inline\n export const CLOCK: eventtype = 0;\n /** File descriptor has data available for reading. */\n // @ts-ignore: decorator\n @inline\n export const FD_READ: eventtype = 1;\n /** File descriptor has capacity available for writing */\n // @ts-ignore: decorator\n @inline\n export const FD_WRITE: eventtype = 2;\n}\nexport type eventtype = u8;\n\n/** Exit code generated by a process when exiting. */\nexport type exitcode = u32;\n\n/** A file descriptor number. */\nexport type fd = u32;\n\n/** File descriptor flags. */\nexport namespace fdflags {\n /** Append mode: Data written to the file is always appended to the file's end. */\n // @ts-ignore: decorator\n @inline\n export const APPEND: fdflags = 1;\n /** Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized. */\n // @ts-ignore: decorator\n @inline\n export const DSYNC: fdflags = 2;\n /** Non-blocking mode. */\n // @ts-ignore: decorator\n @inline\n export const NONBLOCK: fdflags = 4;\n /** Synchronized read I/O operations. */\n // @ts-ignore: decorator\n @inline\n export const RSYNC: fdflags = 8;\n /** Write according to synchronized I/O file integrity completion. */\n // @ts-ignore: decorator\n @inline\n export const SYNC: fdflags = 16;\n}\nexport type fdflags = u16;\n\n/** File descriptor attributes. */\n@unmanaged export class fdstat {\n /** File type. */\n filetype: filetype;\n /** File descriptor flags. */\n flags: fdflags;\n /** Rights that apply to this file descriptor. */\n rights_base: rights;\n /** Maximum set of rights that may be installed on new file descriptors that are created through this file descriptor, e.g., through `path_open`. */\n rights_inheriting: rights;\n}\n\n/** Relative offset within a file. */\nexport type filedelta = i64;\n\n/** Non-negative file size or length of a region within a file. */\nexport type filesize = u64;\n\n/** File attributes. */\n@unmanaged export class filestat {\n /** Device ID of device containing the file. */\n dev: device;\n /** File serial number. */\n ino: inode;\n /** File type. */\n filetype: filetype;\n /** Number of hard links to the file. */\n nlink: linkcount;\n /** For regular files, the file size in bytes. For symbolic links, the length in bytes of the pathname contained in the symbolic link. */\n size: filesize;\n /** Last data access timestamp. */\n atim: timestamp;\n /** Last data modification timestamp. */\n mtim: timestamp;\n /** Last file status change timestamp. */\n ctim: timestamp;\n}\n\n/** The type of a file descriptor or file. */\nexport namespace filetype {\n /** The type of the file descriptor or file is unknown or is different from any of the other types specified. */\n // @ts-ignore: decorator\n @inline\n export const UNKNOWN: filetype = 0;\n /** The file descriptor or file refers to a block device inode. */\n // @ts-ignore: decorator\n @inline\n export const BLOCK_DEVICE: filetype = 1;\n /** The file descriptor or file refers to a character device inode. */\n // @ts-ignore: decorator\n @inline\n export const CHARACTER_DEVICE: filetype = 2;\n /** The file descriptor or file refers to a directory inode. */\n // @ts-ignore: decorator\n @inline\n export const DIRECTORY: filetype = 3;\n /** The file descriptor or file refers to a regular file inode. */\n // @ts-ignore: decorator\n @inline\n export const REGULAR_FILE: filetype = 4;\n /** The file descriptor or file refers to a datagram socket. */\n // @ts-ignore: decorator\n @inline\n export const SOCKET_DGRAM: filetype = 5;\n /** The file descriptor or file refers to a byte-stream socket. */\n // @ts-ignore: decorator\n @inline\n export const SOCKET_STREAM: filetype = 6;\n /** The file refers to a symbolic link inode. */\n // @ts-ignore: decorator\n @inline\n export const SYMBOLIC_LINK: filetype = 7;\n}\nexport type filetype = u8;\n\n/** Which file time attributes to adjust. */\nexport namespace fstflags {\n /** Adjust the last data access timestamp to the value stored in `filestat#st_atim`. */\n // @ts-ignore: decorator\n @inline\n export const SET_ATIM: fstflags = 1;\n /** Adjust the last data access timestamp to the time of clock `clockid.REALTIME`. */\n // @ts-ignore: decorator\n @inline\n export const SET_ATIM_NOW: fstflags = 2;\n /** Adjust the last data modification timestamp to the value stored in `filestat#st_mtim`. */\n // @ts-ignore: decorator\n @inline\n export const SET_MTIM: fstflags = 4;\n /** Adjust the last data modification timestamp to the time of clock `clockid.REALTIME`. */\n // @ts-ignore: decorator\n @inline\n export const SET_MTIM_NOW: fstflags = 8;\n}\nexport type fstflags = u16;\n\n/** File serial number that is unique within its file system. */\nexport type inode = u64;\n\n/** A region of memory for scatter/gather reads. */\n@unmanaged export class iovec {\n /** The address of the buffer to be filled. */\n buf: usize;\n /** The length of the buffer to be filled. */\n buf_len: usize;\n}\n\n/** Number of hard links to an inode. */\nexport type linkcount = u64;\n\n/** Flags determining the method of how paths are resolved. */\nexport namespace lookupflags {\n /** As long as the resolved path corresponds to a symbolic link, it is expanded. */\n // @ts-ignore: decorator\n @inline\n export const SYMLINK_FOLLOW: lookupflags = 1;\n}\nexport type lookupflags = u32;\n\n/** Open flags. */\nexport namespace oflags {\n /** Create file if it does not exist. */\n // @ts-ignore: decorator\n @inline\n export const CREAT: oflags = 1;\n /** Fail if not a directory. */\n // @ts-ignore: decorator\n @inline\n export const DIRECTORY: oflags = 2;\n /** Fail if file already exists. */\n // @ts-ignore: decorator\n @inline\n export const EXCL: oflags = 4;\n /** Truncate file to size 0. */\n // @ts-ignore: decorator\n @inline\n export const TRUNC: oflags = 8;\n}\nexport type oflags = u16;\n\n/** Identifiers for preopened capabilities. */\nexport namespace preopentype {\n /** A pre-opened directory. */\n // @ts-ignore: decorator\n @inline\n export const DIR: preopentype = 0;\n}\nexport type preopentype = u8;\n\n@unmanaged abstract class $prestat { // WASM32: size=1/8, WASM64: size=1/16\n /* The type of the pre-opened capability. */\n type: preopentype;\n}\n\n/* Information about a pre-opened capability. */\n@unmanaged export abstract class prestat extends $prestat {\n private __padding0: usize;\n}\n\n/** The contents of a $prestat when type is `preopentype.DIR`. */\n@unmanaged export class prestat_dir extends $prestat {\n /** The length of the directory name for use with `fd_prestat_dir_name`. */\n name_len: usize;\n}\n\n/** Flags provided to `sock_recv`. */\nexport namespace riflags {\n /** Returns the message without removing it from the socket's receive queue. */\n // @ts-ignore: decorator\n @inline\n export const PEEK: riflags = 1;\n /** On byte-stream sockets, block until the full amount of data can be returned. */\n // @ts-ignore: decorator\n @inline\n export const WAITALL: riflags = 2;\n}\nexport type riflags = u16;\n\n/** File descriptor rights, determining which actions may be performed. */\nexport namespace rights {\n /** The right to invoke `fd_datasync`. */\n // @ts-ignore: decorator\n @inline\n export const FD_DATASYNC: rights = 1;\n /** The right to invoke `fd_read` and `sock_recv`. */\n // @ts-ignore: decorator\n @inline\n export const FD_READ: rights = 2;\n /** The right to invoke `fd_seek`. This flag implies `rights.FD_TELL`. */\n // @ts-ignore: decorator\n @inline\n export const FD_SEEK: rights = 4;\n /** The right to invoke `fd_fdstat_set_flags`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FDSTAT_SET_FLAGS: rights = 8;\n /** The right to invoke `fd_sync`. */\n // @ts-ignore: decorator\n @inline\n export const FD_SYNC: rights = 16;\n /** The right to invoke `fd_seek` in such a way that the file offset remains unaltered (i.e., `whence.CUR` with offset zero), or to invoke `fd_tell`). */\n // @ts-ignore: decorator\n @inline\n export const FD_TELL: rights = 32;\n /** The right to invoke `fd_write` and `sock_send`. If `rights.FD_SEEK` is set, includes the right to invoke `fd_pwrite`. */\n // @ts-ignore: decorator\n @inline\n export const FD_WRITE: rights = 64;\n /** The right to invoke `fd_advise`. */\n // @ts-ignore: decorator\n @inline\n export const FD_ADVISE: rights = 128;\n /** The right to invoke `fd_allocate`. */\n // @ts-ignore: decorator\n @inline\n export const FD_ALLOCATE: rights = 256;\n /** The right to invoke `path_create_directory`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_CREATE_DIRECTORY: rights = 512;\n /** If `rights.PATH_OPEN` is set, the right to invoke `path_open` with `oflags.CREAT`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_CREATE_FILE: rights = 1024;\n /** The right to invoke `path_link` with the file descriptor as the source directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_LINK_SOURCE: rights = 2048;\n /** The right to invoke `path_link` with the file descriptor as the target directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_LINK_TARGET: rights = 4096;\n /** The right to invoke `path_open`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_OPEN: rights = 8192;\n /** The right to invoke `fd_readdir`. */\n // @ts-ignore: decorator\n @inline\n export const FD_READDIR: rights = 16384;\n /** The right to invoke `path_readlink`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_READLINK: rights = 32768;\n /** The right to invoke `path_rename` with the file descriptor as the source directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_RENAME_SOURCE: rights = 65536;\n /** The right to invoke `path_rename` with the file descriptor as the target directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_RENAME_TARGET: rights = 131072;\n /** The right to invoke `path_filestat_get`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_FILESTAT_GET: rights = 262144;\n /** The right to change a file's size (there is no `path_filestat_set_size`). If `rights.PATH_OPEN` is set, includes the right to invoke `path_open` with `oflags.TRUNC`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_FILESTAT_SET_SIZE: rights = 524288;\n /** The right to invoke `path_filestat_set_times`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_FILESTAT_SET_TIMES: rights = 1048576;\n /** The right to invoke `fd_filestat_get`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FILESTAT_GET: rights = 2097152;\n /** The right to invoke `fd_filestat_set_size`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FILESTAT_SET_SIZE: rights = 4194304;\n /** The right to invoke `fd_filestat_set_times`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FILESTAT_SET_TIMES: rights = 8388608;\n /** The right to invoke `path_symlink`. */\n // @ts-ignore: decorator\n @inline\n export const RIGHT_PATH_SYMLINK: rights = 16777216;\n /** The right to invoke `path_remove_directory`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_REMOVE_DIRECTORY: rights = 33554432;\n /** The right to invoke `path_unlink_file`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_UNLINK_FILE: rights = 67108864;\n /** If `rights.FD_READ` is set, includes the right to invoke `poll_oneoff` to subscribe to `eventtype.FD_READ`. If `rights.FD_WRITE` is set, includes the right to invoke `poll_oneoff` to subscribe to `eventtype.FD_WRITE`. */\n // @ts-ignore: decorator\n @inline\n export const POLL_FD_READWRITE: rights = 134217728;\n /** The right to invoke `sock_shutdown`. */\n // @ts-ignore: decorator\n @inline\n export const SOCK_SHUTDOWN: rights = 268435456;\n}\nexport type rights = u64;\n\n/** Flags returned by `sock_recv`. */\nexport namespace roflags {\n /** Message data has been truncated. */\n // @ts-ignore: decorator\n @inline\n export const DATA_TRUNCATED: roflags = 1;\n}\nexport type roflags = u16;\n\n/** Which channels on a socket to shut down. */\nexport namespace sdflags {\n /** Disables further receive operations. */\n // @ts-ignore: decorator\n @inline\n export const RD: sdflags = 1;\n /** Disables further send operations. */\n // @ts-ignore: decorator\n @inline\n export const WR: sdflags = 2;\n}\nexport type sdflags = u8;\n\n/** Flags provided to `sock_send`. */\nexport namespace siflags {\n // As there are currently no flags defined, it must be set to zero.\n}\nexport type siflags = u16;\n\n/** Signal condition. */\nexport namespace signal {\n /** Hangup. */\n // @ts-ignore: decorator\n @inline\n export const HUP: signal = 1;\n /** Terminate interrupt signal. */\n // @ts-ignore: decorator\n @inline\n export const INT: signal = 2;\n /** Terminal quit signal. */\n // @ts-ignore: decorator\n @inline\n export const QUIT: signal = 3;\n /** Illegal instruction. */\n // @ts-ignore: decorator\n @inline\n export const ILL: signal = 4;\n /** Trace/breakpoint trap. */\n // @ts-ignore: decorator\n @inline\n export const TRAP: signal = 5;\n /** Process abort signal. */\n // @ts-ignore: decorator\n @inline\n export const ABRT: signal = 6;\n /** Access to an undefined portion of a memory object. */\n // @ts-ignore: decorator\n @inline\n export const BUS: signal = 7;\n /** Erroneous arithmetic operation. */\n // @ts-ignore: decorator\n @inline\n export const FPE: signal = 8;\n /** Kill. */\n // @ts-ignore: decorator\n @inline\n export const KILL: signal = 9;\n /** User-defined signal 1. */\n // @ts-ignore: decorator\n @inline\n export const USR1: signal = 10;\n /** Invalid memory reference. */\n // @ts-ignore: decorator\n @inline\n export const SEGV: signal = 11;\n /** User-defined signal 2. */\n // @ts-ignore: decorator\n @inline\n export const USR2: signal = 12;\n /** Write on a pipe with no one to read it. */\n // @ts-ignore: decorator\n @inline\n export const PIPE: signal = 13;\n /** Alarm clock. */\n // @ts-ignore: decorator\n @inline\n export const ALRM: signal = 14;\n /** Termination signal. */\n // @ts-ignore: decorator\n @inline\n export const TERM: signal = 15;\n /** Child process terminated, stopped, or continued. */\n // @ts-ignore: decorator\n @inline\n export const CHLD: signal = 16;\n /** Continue executing, if stopped. */\n // @ts-ignore: decorator\n @inline\n export const CONT: signal = 17;\n /** Stop executing. */\n // @ts-ignore: decorator\n @inline\n export const STOP: signal = 18;\n /** Terminal stop signal. */\n // @ts-ignore: decorator\n @inline\n export const TSTP: signal = 19;\n /** Background process attempting read. */\n // @ts-ignore: decorator\n @inline\n export const TTIN: signal = 20;\n /** Background process attempting write. */\n // @ts-ignore: decorator\n @inline\n export const TTOU: signal = 21;\n /** High bandwidth data is available at a socket. */\n // @ts-ignore: decorator\n @inline\n export const URG: signal = 22;\n /** CPU time limit exceeded. */\n // @ts-ignore: decorator\n @inline\n export const XCPU: signal = 23;\n /** File size limit exceeded. */\n // @ts-ignore: decorator\n @inline\n export const XFSZ: signal = 24;\n /** Virtual timer expired. */\n // @ts-ignore: decorator\n @inline\n export const VTALRM: signal = 25;\n // @ts-ignore: decorator\n @inline\n export const PROF: signal = 26;\n // @ts-ignore: decorator\n @inline\n export const WINCH: signal = 27;\n // @ts-ignore: decorator\n @inline\n export const POLL: signal = 28;\n // @ts-ignore: decorator\n @inline\n export const PWR: signal = 29;\n /** Bad system call. */\n // @ts-ignore: decorator\n @inline\n export const SYS: signal = 30;\n}\nexport type signal = u8;\n\n/** Flags determining how to interpret the timestamp provided in `subscription_t::u.clock.timeout. */\nexport namespace subclockflags {\n /** If set, treat the timestamp provided in `clocksubscription` as an absolute timestamp. */\n // @ts-ignore: decorator\n @inline\n export const ABSTIME: subclockflags = 1;\n}\nexport type subclockflags = u16;\n\n@unmanaged abstract class $subscription { // size=16/48\n /** User-provided value that is attached to the subscription. */\n userdata: userdata;\n /** The type of the event to which to subscribe. */\n type: eventtype;\n\n private __padding0: u32;\n}\n\n/** Subscription to an event. */\n@unmanaged export abstract class subscription extends $subscription {\n private __padding1: u64;\n private __padding2: u64;\n private __padding3: u64;\n private __padding4: u64;\n}\n\n/* Subscription to an event of type `eventtype.CLOCK`.**/\n@unmanaged export class subscription_clock extends $subscription {\n /** The clock against which to compare the timestamp. */\n clock_id: clockid;\n /** The absolute or relative timestamp. */\n timeout: timestamp;\n /** The amount of time that the implementation may wait additionally to coalesce with other events. */\n precision: timestamp;\n /** Flags specifying whether the timeout is absolute or relative. */\n flags: subclockflags;\n\n private __padding1: u32;\n}\n\n/* Subscription to an event of type `eventtype.FD_READ` or `eventtype.FD_WRITE`.**/\n@unmanaged export class subscription_fd_readwrite extends $subscription {\n /** The file descriptor on which to wait for it to become ready for reading or writing. */\n file_descriptor: fd;\n\n private __padding1: u64;\n private __padding2: u64;\n private __padding3: u64;\n}\n\n/** Timestamp in nanoseconds. */\nexport type timestamp = u64;\n\n/** User-provided value that may be attached to objects that is retained when extracted from the implementation. */\nexport type userdata = u64;\n\n/** The position relative to which to set the offset of the file descriptor. */\nexport namespace whence {\n /** Seek relative to start-of-file. */\n // @ts-ignore: decorator\n @inline\n export const SET: whence = 0;\n /** Seek relative to current position. */\n // @ts-ignore: decorator\n @inline\n export const CUR: whence = 1;\n /** Seek relative to end-of-file. */\n // @ts-ignore: decorator\n @inline\n export const END: whence = 2;\n}\n\nexport type whence = u8;\n", - "bindings/wasi_unstable": "// Phase: wasi_unstable / wasi_snapshot_preview0\n// See: https://github.com/WebAssembly/WASI/tree/main/phases/old/snapshot_0/witx\n\n// helper types to be more explicit\ntype char = u8;\ntype ptr = usize; // all pointers are usize'd\ntype struct = T; // structs are references already in AS\n\n/** Read command-line argument data. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function args_get(\n /** Input: Pointer to a buffer to write the argument pointers. */\n argv: ptr>,\n /** Input: Pointer to a buffer to write the argument string data. */\n argv_buf: ptr\n): errno;\n\n/** Return command-line argument data sizes. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function args_sizes_get(\n /** Output: Number of arguments. */\n argc: ptr,\n /** Output: Size of the argument string data. */\n argv_buf_size: ptr\n): errno;\n\n/** Return the resolution of a clock. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function clock_res_get(\n /** Input: The clock for which to return the resolution. */\n clock: clockid,\n /** Output: The resolution of the clock. */\n resolution: ptr\n): errno;\n\n/** Return the time value of a clock. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function clock_time_get(\n /** Input: Cock for which to return the time. */\n clock: clockid,\n /** Input: Maximum lag (exclusive) that the returned time value may have, compared to its actual value. */\n precision: timestamp,\n /** Output: Time value of the clock. */\n time: ptr\n): errno;\n\n/** Read environment variable data. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function environ_get(\n /** Input: Pointer to a buffer to write the environment variable pointers. */\n environ: ptr,\n /** Input: Pointer to a buffer to write the environment variable string data. */\n environ_buf: usize\n): errno;\n\n/** Return command-line argument data sizes. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function environ_sizes_get(\n /** Output: The number of environment variables. */\n environ_count: ptr,\n /** Output: The size of the environment variable string data. */\n environ_buf_size: ptr\n): errno;\n\n/** Provide file advisory information on a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_advise(\n /** Input: The file descriptor for the file for which to provide file advisory information. */\n fd: fd,\n /** Input: The offset within the file to which the advisory applies. */\n offset: filesize,\n /** Input: The length of the region to which the advisory applies. */\n len: filesize,\n /** Input: The advice. */\n advice: advice\n): errno;\n\n/** Provide file advisory information on a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_allocate(\n /** Input: The file descriptor for the file in which to allocate space. */\n fd: fd,\n /** Input: The offset at which to start the allocation. */\n offset: filesize,\n /** Input: The length of the area that is allocated. */\n len: filesize\n): errno;\n\n/** Close a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_close(\n /** Input: The file descriptor to close. */\n fd: fd\n): errno;\n\n/** Synchronize the data of a file to disk. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_datasync(\n /** Input: The file descriptor of the file to synchronize to disk. */\n fd: fd\n): errno;\n\n/** Get the attributes of a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_fdstat_get(\n /** Input: The file descriptor to inspect. */\n fd: fd,\n /** Input: The buffer where the file descriptor's attributes are stored. */\n buf: struct\n): errno;\n\n/** Adjust the flags associated with a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_fdstat_set_flags(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The desired values of the file descriptor flags. */\n flags: fdflags\n): errno;\n\n/** Adjust the rights associated with a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_fdstat_set_rights(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The desired rights of the file descriptor. */\n fs_rights_base: rights,\n /** Input: The desired rights of the file descriptor. */\n fs_rights_inheriting: rights\n): errno;\n\n/** Return the attributes of an open file. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_filestat_get(\n /** Input: The file descriptor to inspect. */\n fd: fd,\n /** Input: The buffer where the file's attributes are stored. */\n buf: struct\n): errno;\n\n/** Adjust the size of an open file. If this increases the file's size, the extra bytes are filled with zeros. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_filestat_set_size(\n /** Input: A file descriptor for the file to adjust. */\n fd: fd,\n /** Input: The desired file size. */\n size: filesize\n): errno;\n\n/** Adjust the timestamps of an open file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_filestat_set_times(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The desired values of the data access timestamp. */\n st_atim: timestamp,\n /** Input: The desired values of the data modification timestamp. */\n st_mtim: timestamp,\n /** Input: A bitmask indicating which timestamps to adjust. */\n fstflags: fstflags\n): errno;\n\n/** Read from a file descriptor, without using and updating the file descriptor's offset. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_pread(\n /** Input: The file descriptor from which to read data. */\n fd: fd,\n /** Input: List of scatter/gather vectors in which to store data. */\n iovs: ptr>,\n /** Input: Length of the list of scatter/gather vectors in which to store data. */\n iovs_len: usize,\n /** Input: The offset within the file at which to read. */\n offset: filesize,\n /** Output: The number of bytes read. */\n nread: ptr\n): errno;\n\n/** Return a description of the given preopened file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_prestat_get(\n /** Input: The file descriptor about which to retrieve information. */\n fd: fd,\n /** Input: The buffer where the description is stored. */\n buf: struct\n): errno;\n\n/** Return a description of the given preopened file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_prestat_dir_name(\n /** Input: The file descriptor about which to retrieve information. */\n fd: fd,\n /** Input: Buffer into which to write the preopened directory name. */\n path: ptr,\n /** Input: Length of the buffer into which to write the preopened directory name. */\n path_len: usize\n): errno;\n\n/** Write to a file descriptor, without using and updating the file descriptor's offset. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_pwrite(\n /** Input: The file descriptor to which to write data. */\n fd: fd,\n /** Input: List of scatter/gather vectors from which to retrieve data. */\n iovs: ptr>,\n /** Input: Length of the list of scatter/gather vectors from which to retrieve data. */\n iovs_len: usize,\n /** Input: The offset within the file at which to write. */\n offset: filesize,\n /** Output: The number of bytes written. */\n nwritten: ptr\n): errno;\n\n/** Read from a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_read(\n /** Input: The file descriptor from which to read data. */\n fd: fd,\n /** Input: List of scatter/gather vectors to which to store data. */\n iovs: ptr>,\n /** Input: Length of the list of scatter/gather vectors to which to store data. */\n iovs_len: usize,\n /** Output: The number of bytes read. */\n nread: ptr\n): errno;\n\n/** Read directory entries from a directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_readdir(\n /** Input: Directory from which to read the directory entries. */\n fd: fd,\n /** Input: Buffer where directory entries are stored. */\n buf: ptr>,\n /** Input: Length of the buffer where directory entries are stored. */\n buf_len: usize,\n /** Input: Location within the directory to start reading. */\n cookie: dircookie,\n /** Output: Number of bytes stored in the read buffer. If less than the size of the read buffer, the end of the directory has been reached. */\n buf_used: ptr\n): errno;\n\n/** Atomically replace a file descriptor by renumbering another file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_renumber(\n /** Input: The file descriptor to renumber. */\n from: fd,\n /** Input: The file descriptor to overwrite. */\n to: fd\n): errno;\n\n/** Move the offset of a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_seek(\n /** Input: The file descriptor to operate on. */\n fd: fd,\n /** Input: The number of bytes to move. */\n offset: filedelta,\n /** Input: The base from which the offset is relative. */\n whence: whence,\n /** Output: The new offset of the file descriptor, relative to the start of the file. */\n newoffset: ptr\n): errno;\n\n/** Synchronize the data and metadata of a file to disk. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_sync(\n /** Input: The file descriptor of the file containing the data and metadata to synchronize to disk. */\n fd: fd\n): errno;\n\n/** Return the current offset of a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_tell(\n /** Input: The file descriptor to inspect. */\n fd: fd,\n /** Output: The current offset of the file descriptor, relative to the start of the file. */\n newoffset: ptr\n): errno;\n\n/** Write to a file descriptor. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function fd_write(\n /** Input: The file descriptor to which to write data. */\n fd: fd,\n /** Input: List of scatter/gather vectors from which to retrieve data. */\n iovs: ptr>,\n /** Input: List of scatter/gather vectors from which to retrieve data. */\n iovs_len: usize,\n /** Output: The number of bytes written. */\n nwritten: ptr\n): errno;\n\n/* Create a directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_create_directory(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path at which to create the directory. */\n path: ptr,\n /** Input: The path at which to create the directory. */\n path_len: usize\n): errno;\n\n/** Return the attributes of a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_filestat_get(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n flags: lookupflags,\n /** Input: The path of the file or directory to inspect. */\n path: ptr,\n /** Input: The path of the file or directory to inspect. */\n path_len: usize,\n /** Input: The buffer where the file's attributes are stored. */\n buf: struct\n): errno;\n\n/** Adjust the timestamps of a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_filestat_set_times(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n flags: lookupflags,\n /** Input: The path of the file or directory to operate on. */\n path: ptr,\n /** Input: The path of the file or directory to operate on. */\n path_len: usize,\n /** Input: The desired values of the data access timestamp. */\n st_atim: timestamp,\n /** Input: The desired values of the data modification timestamp. */\n st_mtim: timestamp,\n /** Input: A bitmask indicating which timestamps to adjust. */\n fstflags: fstflags\n): errno;\n\n/** Create a hard link. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_link(\n /** Input: The working directory at which the resolution of the old path starts. */\n old_fd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n old_flags: lookupflags,\n /** Input: The source path from which to link. */\n old_path: ptr,\n /** Input: The source path from which to link. */\n old_path_len: usize,\n /** Input: The working directory at which the resolution of the new path starts. */\n new_fd: fd,\n /** Input: The destination path at which to create the hard link. */\n new_path: ptr,\n /** Input: The length of the destination path at which to create the hard link. */\n new_path_len: usize\n): errno;\n\n/** Open a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_open(\n /** Input: The working directory at which the resolution of the path starts. */\n dirfd: fd,\n /** Input: Flags determining the method of how the path is resolved. */\n dirflags: lookupflags,\n /** Input: The path of the file or directory to open. */\n path: ptr,\n /** Input: The length of the path of the file or directory to open. */\n path_len: usize,\n /** Input: The method by which to open the file. */\n oflags: oflags,\n /** Input: The initial base rights that apply to operations using the file descriptor itself. */\n fs_rights_base: rights,\n /** Input: The initial inheriting rights that apply to file descriptors derived from it. */\n fs_rights_inheriting: rights,\n /** Input: The initial flags of the file descriptor. */\n fs_flags: fdflags,\n /** Output: The file descriptor of the file that has been opened. */\n fd: ptr\n): errno;\n\n/** Read the contents of a symbolic link. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_readlink(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path of the symbolic link from which to read. */\n path: ptr,\n /** Input: The length of the path of the symbolic link from which to read. */\n path_len: usize,\n /** Input: The buffer to which to write the contents of the symbolic link. */\n buf: ptr,\n /** Input: The length of the buffer to which to write the contents of the symbolic link. */\n buf_len: usize,\n /** Output: The number of bytes placed in the buffer. */\n buf_used: ptr\n): errno;\n\n/** Remove a directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_remove_directory(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path to a directory to remove. */\n path: ptr,\n /** Input: The length of the path to a directory to remove. */\n path_len: usize\n): errno;\n\n/** Rename a file or directory. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_rename(\n /** Input: The working directory at which the resolution of the old path starts. */\n old_fd: fd,\n /** Input: The source path of the file or directory to rename. */\n old_path: ptr,\n /** Input: The length of the source path of the file or directory to rename. */\n old_path_len: usize,\n /** Input: The working directory at which the resolution of the new path starts. */\n new_fd: fd,\n /** Input: The destination path to which to rename the file or directory. */\n new_path: ptr,\n /** Input: The length of the destination path to which to rename the file or directory. */\n new_path_len: usize\n): errno;\n\n/** Create a symbolic link. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_symlink(\n /** Input: The contents of the symbolic link. */\n old_path: ptr,\n /** Input: The length of the contents of the symbolic link. */\n old_path_len: usize,\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The destination path at which to create the symbolic link. */\n new_path: ptr,\n /** Input: The length of the destination path at which to create the symbolic link. */\n new_path_len: usize\n): errno;\n\n/** Unlink a file. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function path_unlink_file(\n /** Input: The working directory at which the resolution of the path starts. */\n fd: fd,\n /** Input: The path to a file to unlink. */\n path: ptr,\n /** Input: The length of the path to a file to unlink. */\n path_len: usize\n): errno;\n\n/** Concurrently poll for the occurrence of a set of events. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function poll_oneoff(\n /** Input: The events to which to subscribe. */\n in_: ptr>,\n /** Input: The events that have occurred. */\n out: ptr>,\n /** Input: Both the number of subscriptions and events. */\n nsubscriptions: usize,\n /** Output: The number of events stored. */\n nevents: ptr\n): errno;\n\n/** Terminate the process normally. An exit code of 0 indicates successful termination of the program. The meanings of other values is dependent on the environment. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function proc_exit(\n /** Input: The exit code returned by the process. */\n rval: u32\n): void;\n\n/** Send a signal to the process of the calling thread. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function proc_raise(\n /** Input: The signal condition to trigger. */\n sig: signal\n): errno;\n\n/** Write high-quality random data into a buffer. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function random_get(\n /** Input: The buffer to fill with random data. */\n buf: usize,\n /** Input: The length of the buffer to fill with random data. */\n buf_len: usize\n): errno;\n\n/** Temporarily yield execution of the calling thread. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sched_yield(): errno;\n\n/** Receive a message from a socket. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sock_recv(\n /** Input: The socket on which to receive data. */\n sock: fd,\n /** Input: List of scatter/gather vectors to which to store data. */\n ri_data: ptr>,\n /** Input: The length of the list of scatter/gather vectors to which to store data. */\n ri_data_len: usize,\n /** Input: Message flags. */\n ri_flags: riflags,\n /** Output: Number of bytes stored in `ri_data`. */\n ro_datalen: ptr,\n /** Output: Message flags. */\n ro_flags: ptr\n): errno;\n\n/** Send a message on a socket. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sock_send(\n /** Input: The socket on which to send data. */\n sock: fd,\n /** Input: List of scatter/gather vectors to which to retrieve data */\n si_data: ptr>,\n /** Input: The length of the list of scatter/gather vectors to which to retrieve data */\n si_data_len: usize,\n /** Input: Message flags. */\n si_flags: siflags,\n /** Output: Number of bytes transmitted. */\n so_datalen: ptr\n): errno;\n\n/** Shut down socket send and receive channels. */\n// @ts-ignore: decorator\n@unsafe\nexport declare function sock_shutdown(\n /** Input: The socket on which to shutdown channels. */\n sock: fd,\n /** Input: Which channels on the socket to shut down. */\n how: sdflags\n): errno;\n\n// === Types ======================================================================================\n\n/** File or memory access pattern advisory information. */\nexport namespace advice {\n /** The application has no advice to give on its behavior with respect to the specified data. */\n // @ts-ignore: decorator\n @inline\n export const NORMAL: advice = 0;\n /** The application expects to access the specified data sequentially from lower offsets to higher offsets. */\n // @ts-ignore: decorator\n @inline\n export const SEQUENTIAL : advice = 1;\n /** The application expects to access the specified data in a random order. */\n // @ts-ignore: decorator\n @inline\n export const RANDOM: advice = 2;\n /** The application expects to access the specified data in the near future. */\n // @ts-ignore: decorator\n @inline\n export const WILLNEED: advice = 3;\n /** The application expects that it will not access the specified data in the near future. */\n // @ts-ignore: decorator\n @inline\n export const DONTNEED: advice = 4;\n /** The application expects to access the specified data once and then not reuse it thereafter. */\n // @ts-ignore: decorator\n @inline\n export const NOREUSE: advice = 5;\n}\nexport type advice = u8;\n\n/** Identifiers for clocks. */\nexport namespace clockid {\n /** The clock measuring real time. Time value zero corresponds with 1970-01-01T00:00:00Z. */\n // @ts-ignore: decorator\n @inline\n export const REALTIME: clockid = 0;\n /** The store-wide monotonic clock. Absolute value has no meaning. */\n // @ts-ignore: decorator\n @inline\n export const MONOTONIC: clockid = 1;\n /** The CPU-time clock associated with the current process. */\n // @ts-ignore: decorator\n @inline\n export const PROCESS_CPUTIME_ID: clockid = 2;\n /** The CPU-time clock associated with the current thread. */\n // @ts-ignore: decorator\n @inline\n export const THREAD_CPUTIME_ID: clockid = 3;\n}\nexport type clockid = u32;\n\n/** Identifier for a device containing a file system. Can be used in combination with `inode` to uniquely identify a file or directory in the filesystem. */\nexport type device = u64;\n\n/** A reference to the offset of a directory entry. */\nexport type dircookie = u64;\n\n/** A directory entry. */\n@unmanaged export class dirent {\n /** The offset of the next directory entry stored in this directory. */\n next: dircookie;\n /** The serial number of the file referred to by this directory entry. */\n ino: inode;\n /** The length of the name of the directory entry. */\n namlen: u32;\n /** The type of the file referred to by this directory entry. */\n type: filetype;\n private __padding0: u16;\n}\n\n/** Error codes returned by functions. */\nexport namespace errno {\n /** No error occurred. System call completed successfully. */\n // @ts-ignore: decorator\n @inline\n export const SUCCESS: errno = 0;\n /** Argument list too long. */\n // @ts-ignore: decorator\n @inline\n export const TOOBIG: errno = 1;\n /** Permission denied. */\n // @ts-ignore: decorator\n @inline\n export const ACCES: errno = 2;\n /** Address in use. */\n // @ts-ignore: decorator\n @inline\n export const ADDRINUSE: errno = 3;\n /** Address not available. */\n // @ts-ignore: decorator\n @inline\n export const ADDRNOTAVAIL: errno = 4;\n /** Address family not supported. */\n // @ts-ignore: decorator\n @inline\n export const AFNOSUPPORT: errno = 5;\n /** Resource unavailable, or operation would block. */\n // @ts-ignore: decorator\n @inline\n export const AGAIN: errno = 6;\n /** Connection already in progress. */\n // @ts-ignore: decorator\n @inline\n export const ALREADY: errno = 7;\n /** Bad file descriptor. */\n // @ts-ignore: decorator\n @inline\n export const BADF: errno = 8;\n /** Bad message. */\n // @ts-ignore: decorator\n @inline\n export const BADMSG: errno = 9;\n /** Device or resource busy. */\n // @ts-ignore: decorator\n @inline\n export const BUSY: errno = 10;\n /** Operation canceled. */\n // @ts-ignore: decorator\n @inline\n export const CANCELED: errno = 11;\n /** No child processes. */\n // @ts-ignore: decorator\n @inline\n export const CHILD: errno = 12;\n /** Connection aborted. */\n // @ts-ignore: decorator\n @inline\n export const CONNABORTED: errno = 13;\n /** Connection refused. */\n // @ts-ignore: decorator\n @inline\n export const CONNREFUSED: errno = 14;\n /** Connection reset. */\n // @ts-ignore: decorator\n @inline\n export const CONNRESET: errno = 15;\n /** Resource deadlock would occur. */\n // @ts-ignore: decorator\n @inline\n export const DEADLK: errno = 16;\n /** Destination address required. */\n // @ts-ignore: decorator\n @inline\n export const DESTADDRREQ: errno = 17;\n /** Mathematics argument out of domain of function. */\n // @ts-ignore: decorator\n @inline\n export const DOM: errno = 18;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const DQUOT: errno = 19;\n /** File exists. */\n // @ts-ignore: decorator\n @inline\n export const EXIST: errno = 20;\n /** Bad address. */\n // @ts-ignore: decorator\n @inline\n export const FAULT: errno = 21;\n /** File too large. */\n // @ts-ignore: decorator\n @inline\n export const FBIG: errno = 22;\n /** Host is unreachable. */\n // @ts-ignore: decorator\n @inline\n export const HOSTUNREACH: errno = 23;\n /** Identifier removed. */\n // @ts-ignore: decorator\n @inline\n export const IDRM: errno = 24;\n /** Illegal byte sequence. */\n // @ts-ignore: decorator\n @inline\n export const ILSEQ: errno = 25;\n /** Operation in progress. */\n // @ts-ignore: decorator\n @inline\n export const INPROGRESS: errno = 26;\n /** Interrupted function. */\n // @ts-ignore: decorator\n @inline\n export const INTR: errno = 27;\n /** Invalid argument. */\n // @ts-ignore: decorator\n @inline\n export const INVAL: errno = 28;\n /** I/O error. */\n // @ts-ignore: decorator\n @inline\n export const IO: errno = 29;\n /** Socket is connected. */\n // @ts-ignore: decorator\n @inline\n export const ISCONN: errno = 30;\n /** Is a directory. */\n // @ts-ignore: decorator\n @inline\n export const ISDIR: errno = 31;\n /** Too many levels of symbolic links. */\n // @ts-ignore: decorator\n @inline\n export const LOOP: errno = 32;\n /** File descriptor value too large. */\n // @ts-ignore: decorator\n @inline\n export const MFILE: errno = 33;\n /** Too many links. */\n // @ts-ignore: decorator\n @inline\n export const MLINK: errno = 34;\n /** Message too large. */\n // @ts-ignore: decorator\n @inline\n export const MSGSIZE: errno = 35;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const MULTIHOP: errno = 36;\n /** Filename too long. */\n // @ts-ignore: decorator\n @inline\n export const NAMETOOLONG: errno = 37;\n /** Network is down. */\n // @ts-ignore: decorator\n @inline\n export const NETDOWN: errno = 38;\n /** Connection aborted by network. */\n // @ts-ignore: decorator\n @inline\n export const NETRESET: errno = 39;\n /** Network unreachable. */\n // @ts-ignore: decorator\n @inline\n export const NETUNREACH: errno = 40;\n /** Too many files open in system. */\n // @ts-ignore: decorator\n @inline\n export const NFILE: errno = 41;\n /** No buffer space available. */\n // @ts-ignore: decorator\n @inline\n export const NOBUFS: errno = 42;\n /** No such device. */\n // @ts-ignore: decorator\n @inline\n export const NODEV: errno = 43;\n /** No such file or directory. */\n // @ts-ignore: decorator\n @inline\n export const NOENT: errno = 44;\n /** Executable file format error. */\n // @ts-ignore: decorator\n @inline\n export const NOEXEC: errno = 45;\n /** No locks available. */\n // @ts-ignore: decorator\n @inline\n export const NOLCK: errno = 46;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const NOLINK: errno = 47;\n /** Not enough space. */\n // @ts-ignore: decorator\n @inline\n export const NOMEM: errno = 48;\n /** No message of the desired type. */\n // @ts-ignore: decorator\n @inline\n export const NOMSG: errno = 49;\n /** Protocol not available. */\n // @ts-ignore: decorator\n @inline\n export const NOPROTOOPT: errno = 50;\n /** No space left on device. */\n // @ts-ignore: decorator\n @inline\n export const NOSPC: errno = 51;\n /** Function not supported. */\n // @ts-ignore: decorator\n @inline\n export const NOSYS: errno = 52;\n /** The socket is not connected. */\n // @ts-ignore: decorator\n @inline\n export const NOTCONN: errno = 53;\n /** Not a directory or a symbolic link to a directory. */\n // @ts-ignore: decorator\n @inline\n export const NOTDIR: errno = 54;\n /** Directory not empty. */\n // @ts-ignore: decorator\n @inline\n export const NOTEMPTY: errno = 55;\n /** State not recoverable. */\n // @ts-ignore: decorator\n @inline\n export const NOTRECOVERABLE: errno = 56;\n /** Not a socket. */\n // @ts-ignore: decorator\n @inline\n export const NOTSOCK: errno = 57;\n /** Not supported, or operation not supported on socket. */\n // @ts-ignore: decorator\n @inline\n export const NOTSUP: errno = 58;\n /** Inappropriate I/O control operation. */\n // @ts-ignore: decorator\n @inline\n export const NOTTY: errno = 59;\n /** No such device or address. */\n // @ts-ignore: decorator\n @inline\n export const NXIO: errno = 60;\n /** Value too large to be stored in data type. */\n // @ts-ignore: decorator\n @inline\n export const OVERFLOW: errno = 61;\n /** Previous owner died. */\n // @ts-ignore: decorator\n @inline\n export const OWNERDEAD: errno = 62;\n /** Operation not permitted. */\n // @ts-ignore: decorator\n @inline\n export const PERM: errno = 63;\n /** Broken pipe. */\n // @ts-ignore: decorator\n @inline\n export const PIPE: errno = 64;\n /** Protocol error. */\n // @ts-ignore: decorator\n @inline\n export const PROTO: errno = 65;\n /** Protocol not supported. */\n // @ts-ignore: decorator\n @inline\n export const PROTONOSUPPORT: errno = 66;\n /** Protocol wrong type for socket. */\n // @ts-ignore: decorator\n @inline\n export const PROTOTYPE: errno = 67;\n /** Result too large. */\n // @ts-ignore: decorator\n @inline\n export const RANGE: errno = 68;\n /** Read-only file system. */\n // @ts-ignore: decorator\n @inline\n export const ROFS: errno = 69;\n /** Invalid seek. */\n // @ts-ignore: decorator\n @inline\n export const SPIPE: errno = 70;\n /** No such process. */\n // @ts-ignore: decorator\n @inline\n export const SRCH: errno = 71;\n /** Reserved. */\n // @ts-ignore: decorator\n @inline\n export const STALE: errno = 72;\n /** Connection timed out. */\n // @ts-ignore: decorator\n @inline\n export const TIMEDOUT: errno = 73;\n /** Text file busy. */\n // @ts-ignore: decorator\n @inline\n export const TXTBSY: errno = 74;\n /** Cross-device link. */\n // @ts-ignore: decorator\n @inline\n export const XDEV: errno = 75;\n /** Extension: Capabilities insufficient. */\n // @ts-ignore: decorator\n @inline\n export const NOTCAPABLE: errno = 76;\n}\nexport type errno = u16;\n\n/** An event that occurred. */\n@unmanaged export abstract class event {\n /** User-provided value that got attached to `subscription#userdata`. */\n userdata: userdata;\n /** If non-zero, an error that occurred while processing the subscription request. */\n error: errno;\n /* The type of the event that occurred. */\n type: eventtype;\n private __padding0: u16;\n}\n\n/** An event that occurred when type is `eventtype.FD_READ` or `eventtype.FD_WRITE`. */\n@unmanaged export class rwevent extends event {\n /* The number of bytes available for reading or writing. */\n nbytes: filesize;\n /* The state of the file descriptor. */\n flags: eventrwflags;\n private __padding1: u32;\n}\n\n/** The state of the file descriptor subscribed to with `eventtype.FD_READ` or `eventtype.FD_WRITE`. */\nexport namespace eventrwflags {\n /** The peer of this socket has closed or disconnected. */\n // @ts-ignore: decorator\n @inline\n export const HANGUP: eventrwflags = 1;\n}\nexport type eventrwflags = u16;\n\n/** Type of a subscription to an event or its occurrence. */\nexport namespace eventtype {\n /** The time value of clock has reached the timestamp. */\n // @ts-ignore: decorator\n @inline\n export const CLOCK: eventtype = 0;\n /** File descriptor has data available for reading. */\n // @ts-ignore: decorator\n @inline\n export const FD_READ: eventtype = 1;\n /** File descriptor has capacity available for writing */\n // @ts-ignore: decorator\n @inline\n export const FD_WRITE: eventtype = 2;\n}\nexport type eventtype = u8;\n\n/** Exit code generated by a process when exiting. */\nexport type exitcode = u32;\n\n/** A file descriptor number. */\nexport type fd = u32;\n\n/** File descriptor flags. */\nexport namespace fdflags {\n /** Append mode: Data written to the file is always appended to the file's end. */\n // @ts-ignore: decorator\n @inline\n export const APPEND: fdflags = 1;\n /** Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized. */\n // @ts-ignore: decorator\n @inline\n export const DSYNC: fdflags = 2;\n /** Non-blocking mode. */\n // @ts-ignore: decorator\n @inline\n export const NONBLOCK: fdflags = 4;\n /** Synchronized read I/O operations. */\n // @ts-ignore: decorator\n @inline\n export const RSYNC: fdflags = 8;\n /** Write according to synchronized I/O file integrity completion. */\n // @ts-ignore: decorator\n @inline\n export const SYNC: fdflags = 16;\n}\nexport type fdflags = u16;\n\n/** File descriptor attributes. */\n@unmanaged export class fdstat {\n /** File type. */\n filetype: filetype;\n /** File descriptor flags. */\n flags: fdflags;\n /** Rights that apply to this file descriptor. */\n rights_base: rights;\n /** Maximum set of rights that may be installed on new file descriptors that are created through this file descriptor, e.g., through `path_open`. */\n rights_inheriting: rights;\n}\n\n/** Relative offset within a file. */\nexport type filedelta = i64;\n\n/** Non-negative file size or length of a region within a file. */\nexport type filesize = u64;\n\n/** File attributes. */\n@unmanaged export class filestat {\n /** Device ID of device containing the file. */\n dev: device;\n /** File serial number. */\n ino: inode;\n /** File type. */\n filetype: filetype;\n /** Number of hard links to the file. */\n nlink: linkcount;\n /** For regular files, the file size in bytes. For symbolic links, the length in bytes of the pathname contained in the symbolic link. */\n size: filesize;\n /** Last data access timestamp. */\n atim: timestamp;\n /** Last data modification timestamp. */\n mtim: timestamp;\n /** Last file status change timestamp. */\n ctim: timestamp;\n}\n\n/** The type of a file descriptor or file. */\nexport namespace filetype {\n /** The type of the file descriptor or file is unknown or is different from any of the other types specified. */\n // @ts-ignore: decorator\n @inline\n export const UNKNOWN: filetype = 0;\n /** The file descriptor or file refers to a block device inode. */\n // @ts-ignore: decorator\n @inline\n export const BLOCK_DEVICE: filetype = 1;\n /** The file descriptor or file refers to a character device inode. */\n // @ts-ignore: decorator\n @inline\n export const CHARACTER_DEVICE: filetype = 2;\n /** The file descriptor or file refers to a directory inode. */\n // @ts-ignore: decorator\n @inline\n export const DIRECTORY: filetype = 3;\n /** The file descriptor or file refers to a regular file inode. */\n // @ts-ignore: decorator\n @inline\n export const REGULAR_FILE: filetype = 4;\n /** The file descriptor or file refers to a datagram socket. */\n // @ts-ignore: decorator\n @inline\n export const SOCKET_DGRAM: filetype = 5;\n /** The file descriptor or file refers to a byte-stream socket. */\n // @ts-ignore: decorator\n @inline\n export const SOCKET_STREAM: filetype = 6;\n /** The file refers to a symbolic link inode. */\n // @ts-ignore: decorator\n @inline\n export const SYMBOLIC_LINK: filetype = 7;\n}\nexport type filetype = u8;\n\n/** Which file time attributes to adjust. */\nexport namespace fstflags {\n /** Adjust the last data access timestamp to the value stored in `filestat#st_atim`. */\n // @ts-ignore: decorator\n @inline\n export const SET_ATIM: fstflags = 1;\n /** Adjust the last data access timestamp to the time of clock `clockid.REALTIME`. */\n // @ts-ignore: decorator\n @inline\n export const SET_ATIM_NOW: fstflags = 2;\n /** Adjust the last data modification timestamp to the value stored in `filestat#st_mtim`. */\n // @ts-ignore: decorator\n @inline\n export const SET_MTIM: fstflags = 4;\n /** Adjust the last data modification timestamp to the time of clock `clockid.REALTIME`. */\n // @ts-ignore: decorator\n @inline\n export const SET_MTIM_NOW: fstflags = 8;\n}\nexport type fstflags = u16;\n\n/** File serial number that is unique within its file system. */\nexport type inode = u64;\n\n/** A region of memory for scatter/gather reads. */\n@unmanaged export class iovec {\n /** The address of the buffer to be filled. */\n buf: usize;\n /** The length of the buffer to be filled. */\n buf_len: usize;\n}\n\n/** Number of hard links to an inode. */\nexport type linkcount = u32;\n\n/** Flags determining the method of how paths are resolved. */\nexport namespace lookupflags {\n /** As long as the resolved path corresponds to a symbolic link, it is expanded. */\n // @ts-ignore: decorator\n @inline\n export const SYMLINK_FOLLOW: lookupflags = 1;\n}\nexport type lookupflags = u32;\n\n/** Open flags. */\nexport namespace oflags {\n /** Create file if it does not exist. */\n // @ts-ignore: decorator\n @inline\n export const CREAT: oflags = 1;\n /** Fail if not a directory. */\n // @ts-ignore: decorator\n @inline\n export const DIRECTORY: oflags = 2;\n /** Fail if file already exists. */\n // @ts-ignore: decorator\n @inline\n export const EXCL: oflags = 4;\n /** Truncate file to size 0. */\n // @ts-ignore: decorator\n @inline\n export const TRUNC: oflags = 8;\n}\nexport type oflags = u16;\n\n// TODO: undocumented\nexport namespace preopentype {\n // @ts-ignore: decorator\n @inline\n export const DIR: preopentype = 0;\n}\nexport type preopentype = u8;\n\n// TODO: undocumented\nexport abstract class prestat {\n type: preopentype;\n}\n\n// TODO: undocumented\nexport class dirprestat extends prestat {\n name_len: usize;\n}\n\n/** Flags provided to `sock_recv`. */\nexport namespace riflags {\n /** Returns the message without removing it from the socket's receive queue. */\n // @ts-ignore: decorator\n @inline\n export const PEEK: riflags = 1;\n /** On byte-stream sockets, block until the full amount of data can be returned. */\n // @ts-ignore: decorator\n @inline\n export const WAITALL: riflags = 2;\n}\nexport type riflags = u16;\n\n/** File descriptor rights, determining which actions may be performed. */\nexport namespace rights {\n /** The right to invoke `fd_datasync`. */\n // @ts-ignore: decorator\n @inline\n export const FD_DATASYNC: rights = 1;\n /** The right to invoke `fd_read` and `sock_recv`. */\n // @ts-ignore: decorator\n @inline\n export const FD_READ: rights = 2;\n /** The right to invoke `fd_seek`. This flag implies `rights.FD_TELL`. */\n // @ts-ignore: decorator\n @inline\n export const FD_SEEK: rights = 4;\n /** The right to invoke `fd_fdstat_set_flags`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FDSTAT_SET_FLAGS: rights = 8;\n /** The right to invoke `fd_sync`. */\n // @ts-ignore: decorator\n @inline\n export const FD_SYNC: rights = 16;\n /** The right to invoke `fd_seek` in such a way that the file offset remains unaltered (i.e., `whence.CUR` with offset zero), or to invoke `fd_tell`). */\n // @ts-ignore: decorator\n @inline\n export const FD_TELL: rights = 32;\n /** The right to invoke `fd_write` and `sock_send`. If `rights.FD_SEEK` is set, includes the right to invoke `fd_pwrite`. */\n // @ts-ignore: decorator\n @inline\n export const FD_WRITE: rights = 64;\n /** The right to invoke `fd_advise`. */\n // @ts-ignore: decorator\n @inline\n export const FD_ADVISE: rights = 128;\n /** The right to invoke `fd_allocate`. */\n // @ts-ignore: decorator\n @inline\n export const FD_ALLOCATE: rights = 256;\n /** The right to invoke `path_create_directory`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_CREATE_DIRECTORY: rights = 512;\n /** If `rights.PATH_OPEN` is set, the right to invoke `path_open` with `oflags.CREAT`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_CREATE_FILE: rights = 1024;\n /** The right to invoke `path_link` with the file descriptor as the source directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_LINK_SOURCE: rights = 2048;\n /** The right to invoke `path_link` with the file descriptor as the target directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_LINK_TARGET: rights = 4096;\n /** The right to invoke `path_open`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_OPEN: rights = 8192;\n /** The right to invoke `fd_readdir`. */\n // @ts-ignore: decorator\n @inline\n export const FD_READDIR: rights = 16384;\n /** The right to invoke `path_readlink`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_READLINK: rights = 32768;\n /** The right to invoke `path_rename` with the file descriptor as the source directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_RENAME_SOURCE: rights = 65536;\n /** The right to invoke `path_rename` with the file descriptor as the target directory. */\n // @ts-ignore: decorator\n @inline\n export const PATH_RENAME_TARGET: rights = 131072;\n /** The right to invoke `path_filestat_get`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_FILESTAT_GET: rights = 262144;\n /** The right to change a file's size (there is no `path_filestat_set_size`). If `rights.PATH_OPEN` is set, includes the right to invoke `path_open` with `oflags.TRUNC`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_FILESTAT_SET_SIZE: rights = 524288;\n /** The right to invoke `path_filestat_set_times`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_FILESTAT_SET_TIMES: rights = 1048576;\n /** The right to invoke `fd_filestat_get`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FILESTAT_GET: rights = 2097152;\n /** The right to invoke `fd_filestat_set_size`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FILESTAT_SET_SIZE: rights = 4194304;\n /** The right to invoke `fd_filestat_set_times`. */\n // @ts-ignore: decorator\n @inline\n export const FD_FILESTAT_SET_TIMES: rights = 8388608;\n /** The right to invoke `path_symlink`. */\n // @ts-ignore: decorator\n @inline\n export const RIGHT_PATH_SYMLINK: rights = 16777216;\n /** The right to invoke `path_remove_directory`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_REMOVE_DIRECTORY: rights = 33554432;\n /** The right to invoke `path_unlink_file`. */\n // @ts-ignore: decorator\n @inline\n export const PATH_UNLINK_FILE: rights = 67108864;\n /** If `rights.FD_READ` is set, includes the right to invoke `poll_oneoff` to subscribe to `eventtype.FD_READ`. If `rights.FD_WRITE` is set, includes the right to invoke `poll_oneoff` to subscribe to `eventtype.FD_WRITE`. */\n // @ts-ignore: decorator\n @inline\n export const POLL_FD_READWRITE: rights = 134217728;\n /** The right to invoke `sock_shutdown`. */\n // @ts-ignore: decorator\n @inline\n export const SOCK_SHUTDOWN: rights = 268435456;\n}\nexport type rights = u64;\n\n/** Flags returned by `sock_recv`. */\nexport namespace roflags {\n /** Message data has been truncated. */\n // @ts-ignore: decorator\n @inline\n export const DATA_TRUNCATED: roflags = 1;\n}\nexport type roflags = u16;\n\n/** Which channels on a socket to shut down. */\nexport namespace sdflags {\n /** Disables further receive operations. */\n // @ts-ignore: decorator\n @inline\n export const RD: sdflags = 1;\n /** Disables further send operations. */\n // @ts-ignore: decorator\n @inline\n export const WR: sdflags = 2;\n}\nexport type sdflags = u8;\n\n/** Flags provided to `sock_send`. */\nexport namespace siflags {\n // As there are currently no flags defined, it must be set to zero.\n}\nexport type siflags = u16;\n\n/** Signal condition. */\nexport namespace signal {\n /** Hangup. */\n // @ts-ignore: decorator\n @inline\n export const HUP: signal = 1;\n /** Terminate interrupt signal. */\n // @ts-ignore: decorator\n @inline\n export const INT: signal = 2;\n /** Terminal quit signal. */\n // @ts-ignore: decorator\n @inline\n export const QUIT: signal = 3;\n /** Illegal instruction. */\n // @ts-ignore: decorator\n @inline\n export const ILL: signal = 4;\n /** Trace/breakpoint trap. */\n // @ts-ignore: decorator\n @inline\n export const TRAP: signal = 5;\n /** Process abort signal. */\n // @ts-ignore: decorator\n @inline\n export const ABRT: signal = 6;\n /** Access to an undefined portion of a memory object. */\n // @ts-ignore: decorator\n @inline\n export const BUS: signal = 7;\n /** Erroneous arithmetic operation. */\n // @ts-ignore: decorator\n @inline\n export const FPE: signal = 8;\n /** Kill. */\n // @ts-ignore: decorator\n @inline\n export const KILL: signal = 9;\n /** User-defined signal 1. */\n // @ts-ignore: decorator\n @inline\n export const USR1: signal = 10;\n /** Invalid memory reference. */\n // @ts-ignore: decorator\n @inline\n export const SEGV: signal = 11;\n /** User-defined signal 2. */\n // @ts-ignore: decorator\n @inline\n export const USR2: signal = 12;\n /** Write on a pipe with no one to read it. */\n // @ts-ignore: decorator\n @inline\n export const PIPE: signal = 13;\n /** Alarm clock. */\n // @ts-ignore: decorator\n @inline\n export const ALRM: signal = 14;\n /** Termination signal. */\n // @ts-ignore: decorator\n @inline\n export const TERM: signal = 15;\n /** Child process terminated, stopped, or continued. */\n // @ts-ignore: decorator\n @inline\n export const CHLD: signal = 16;\n /** Continue executing, if stopped. */\n // @ts-ignore: decorator\n @inline\n export const CONT: signal = 17;\n /** Stop executing. */\n // @ts-ignore: decorator\n @inline\n export const STOP: signal = 18;\n /** Terminal stop signal. */\n // @ts-ignore: decorator\n @inline\n export const TSTP: signal = 19;\n /** Background process attempting read. */\n // @ts-ignore: decorator\n @inline\n export const TTIN: signal = 20;\n /** Background process attempting write. */\n // @ts-ignore: decorator\n @inline\n export const TTOU: signal = 21;\n /** High bandwidth data is available at a socket. */\n // @ts-ignore: decorator\n @inline\n export const URG: signal = 22;\n /** CPU time limit exceeded. */\n // @ts-ignore: decorator\n @inline\n export const XCPU: signal = 23;\n /** File size limit exceeded. */\n // @ts-ignore: decorator\n @inline\n export const XFSZ: signal = 24;\n /** Virtual timer expired. */\n // @ts-ignore: decorator\n @inline\n export const VTALRM: signal = 25;\n // @ts-ignore: decorator\n @inline\n export const PROF: signal = 26;\n // @ts-ignore: decorator\n @inline\n export const WINCH: signal = 27;\n // @ts-ignore: decorator\n @inline\n export const POLL: signal = 28;\n // @ts-ignore: decorator\n @inline\n export const PWR: signal = 29;\n /** Bad system call. */\n // @ts-ignore: decorator\n @inline\n export const SYS: signal = 30;\n}\nexport type signal = u8;\n\n/** Flags determining how to interpret the timestamp provided in `subscription_t::u.clock.timeout. */\nexport namespace subclockflags {\n /** If set, treat the timestamp provided in `clocksubscription` as an absolute timestamp. */\n // @ts-ignore: decorator\n @inline\n export const ABSTIME: subclockflags = 1;\n}\nexport type subclockflags = u16;\n\n/** Subscription to an event. */\n@unmanaged export abstract class subscription {\n /** User-provided value that is attached to the subscription. */\n userdata: userdata;\n /** The type of the event to which to subscribe. */\n type: eventtype;\n private __padding0: u32;\n}\n\n/* Subscription to an event of type `eventtype.CLOCK`.**/\n@unmanaged export class clocksubscription extends subscription {\n /** The user-defined unique identifier of the clock. */\n identifier: userdata;\n /** The clock against which to compare the timestamp. */\n clock_id: clockid;\n /** The absolute or relative timestamp. */\n timeout: timestamp;\n /** The amount of time that the implementation may wait additionally to coalesce with other events. */\n precision: timestamp;\n /** Flags specifying whether the timeout is absolute or relative. */\n flags: subclockflags;\n private __padding1: u32;\n}\n\n/* Subscription to an event of type `eventtype.FD_READ` or `eventtype.FD_WRITE`.**/\n@unmanaged export class fdsubscription extends subscription {\n /** The file descriptor on which to wait for it to become ready for reading or writing. */\n fd: fd;\n}\n\n/** Timestamp in nanoseconds. */\nexport type timestamp = u64;\n\n/** User-provided value that may be attached to objects that is retained when extracted from the implementation. */\nexport type userdata = u64;\n\n/** The position relative to which to set the offset of the file descriptor. */\nexport namespace whence {\n /** Seek relative to current position. */\n // @ts-ignore: decorator\n @inline\n export const CUR: whence = 0;\n /** Seek relative to end-of-file. */\n // @ts-ignore: decorator\n @inline\n export const END: whence = 1;\n /** Seek relative to start-of-file. */\n // @ts-ignore: decorator\n @inline\n export const SET: whence = 2;\n}\nexport type whence = u8;", - "bindings/wasi": "export * from \"./wasi_snapshot_preview1\";\n\n// A WASI-wide reusable temporary buffer to store and work with out values. Must\n// be large enough to fit any operation it is used in, i.e. process/writeString.\n// @ts-ignore: decorator\n@lazy export const tempbuf = memory.data(4 * sizeof());\n", - "builtins": "type auto = i32;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isInteger(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isFloat(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isBoolean(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isSigned(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isReference(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isString(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isArray(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isArrayLike(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isFunction(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isNullable(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isDefined(expression: auto): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isConstant(expression: auto): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isManaged(value?: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isVoid(): bool;\n\n// @ts-ignore\n@builtin\nexport declare function lengthof(func?: T): i32;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function clz(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function ctz(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function popcnt(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function rotl(value: T, shift: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function rotr(value: T, shift: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function abs(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function max(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function min(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function ceil(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function floor(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function copysign(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function nearest(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function reinterpret(value: number): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function sqrt(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function trunc(value: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function add(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function sub(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function mul(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function div(left: T, right: T): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function store(ptr: usize, value: auto, immOffset?: usize, immAlign?: usize): void;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function sizeof(): usize; // | u32 / u64\n\n// @ts-ignore: decorator\n@builtin\nexport declare function alignof(): usize; // | u32 / u64\n\n// @ts-ignore: decorator\n@builtin\nexport declare function offsetof(fieldName?: string): usize; // | u32 / u64\n\n// @ts-ignore: decorator\n@builtin\nexport declare function idof(): u32;\n\n// @ts-ignore\n@builtin\nexport declare function nameof(): string;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function select(ifTrue: T, ifFalse: T, condition: bool): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function unreachable(): auto;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function changetype(value: auto): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function assert(isTrueish: T, message?: string): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function unchecked(expr: T): T;\n\n// @ts-ignore: decorator\n@unsafe @builtin\nexport declare function call_indirect(index: u32, ...args: auto[]): T;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function instantiate(...args: auto[]): T;\n\nexport namespace atomic {\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load(ptr: usize, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: T, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg(ptr: usize, value: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg(ptr: usize, expected: T, replacement: T, immOffset?: usize): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function wait(ptr: usize, expected: T, timeout: i64): AtomicWaitResult;\n\n // @ts-ignore: decorator\n @builtin\n export declare function notify(ptr: usize, count: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function fence(): void;\n}\n\n// @ts-ignore: decorator\n@lazy\nexport const enum AtomicWaitResult {\n OK = 0,\n NOT_EQUAL = 1,\n TIMED_OUT = 2\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i8(value: auto): i8;\n\nexport namespace i8 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i8 = -128;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i8 = 127;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i16(value: auto): i16;\n\nexport namespace i16 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i16 = -32768;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i16 = 32767;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i32(value: auto): i32;\n\nexport namespace i32 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i32 = -2147483648;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i32 = 2147483647;\n\n // @ts-ignore: decorator\n @builtin\n export declare function clz(value: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ctz(value: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(value: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_s(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_u(left: i32, right:i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotl(value: i32, shift: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotr(value: i32, shift: i32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_f32(value: f32): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_s(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_s(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i32, immOffset?: usize, immAlign?: usize): void;\n\n export namespace atomic {\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i32, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i32, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i32, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function wait(ptr: usize, expected: i32, timeout: i64): AtomicWaitResult;\n\n export namespace rmw8 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n\n export namespace rmw16 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n\n export namespace rmw {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg(ptr: usize, value: i32, immOffset?: usize): i32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg(ptr: usize, expected: i32, replacement: i32, immOffset?: usize): i32;\n }\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i64(value: auto): i64;\n\nexport namespace i64 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: i64 = -9223372036854775808;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: i64 = 9223372036854775807;\n\n // @ts-ignore: decorator\n @builtin\n export declare function clz(value: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ctz(value: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_s(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div_u(left: i64, right:i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32_s(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32_u(ptr: usize, immOffset?: usize, immAlign?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(value: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotl(value: i64, shift: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function rotr(value: i64, shift: i64): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_f64(value: f64): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store32(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i64, immOffset?: usize, immAlign?: usize): void;\n\n export namespace atomic {\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8_u(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16_u(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32_u(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8(ptr: usize, value: i64, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16(ptr: usize, value: i64, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store32(ptr: usize, value: i64, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: i64, immOffset?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function wait(ptr: usize, expected: i64, timeout: i64): AtomicWaitResult;\n\n export namespace rmw8 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n\n export namespace rmw16 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n\n export namespace rmw32 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg_u(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg_u(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n\n export namespace rmw {\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function xchg(ptr: usize, value: i64, immOffset?: usize): i64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function cmpxchg(ptr: usize, expected: i64, replacement: i64, immOffset?: usize): i64;\n }\n }\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isize(value: auto): isize;\n\nexport namespace isize {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: isize = sizeof() == sizeof()\n ? -2147483648\n : -9223372036854775808;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: isize = sizeof() == sizeof()\n ? 2147483647\n : 9223372036854775807;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u8(value: auto): u8;\n\nexport namespace u8 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u8 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u8 = 255;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u16(value: auto): u16;\n\nexport namespace u16 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u16 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u16 = 65535;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u32(value: auto): u32;\n\nexport namespace u32 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u32 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u32 = 4294967295;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function u64(value: auto): u64;\n\nexport namespace u64 {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: u64 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: u64 = 18446744073709551615;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function usize(value: auto): usize;\n\nexport namespace usize {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: usize = 0;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: usize = sizeof() == sizeof()\n ? 4294967295\n : 18446744073709551615;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function bool(value: auto): bool;\n\nexport namespace bool {\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE: bool = false;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE: bool = true;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f32(value: auto): f32;\n\nexport namespace f32 {\n\n // @ts-ignore: decorator\n @lazy\n export const EPSILON = reinterpret(0x34000000); // 0x1p-23f\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE = reinterpret(0x00000001); // 0x0.000001p+0f\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE = reinterpret(0x7F7FFFFF); // 0x1.fffffep+127f\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_NORMAL_VALUE = reinterpret(0x00800000); // 0x1p-126f\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_SAFE_INTEGER: f32 = -16777215;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_SAFE_INTEGER: f32 = 16777215;\n\n // @ts-ignore: decorator\n @lazy\n export const POSITIVE_INFINITY: f32 = Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NEGATIVE_INFINITY: f32 = -Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NaN: f32 = 0.0 / 0.0;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function copysign(x: f32, y: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_i32(value: i32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(value: f32): f32;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: f32, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(value: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: f32, right: f32): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(left: f32, right: f32): f32;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f64(value: auto): f64;\n\nexport namespace f64 {\n\n // @ts-ignore: decorator\n @lazy\n export const EPSILON = reinterpret(0x3CB0000000000000); // 0x1p-52\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_VALUE = reinterpret(0x0000000000000001); // 0x0.0000000000001p+0\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_VALUE = reinterpret(0x7FEFFFFFFFFFFFFF); // 0x1.fffffffffffffp+1023\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_NORMAL_VALUE = reinterpret(0x0010000000000000); // 0x1p-1022\n\n // @ts-ignore: decorator\n @lazy\n export const MIN_SAFE_INTEGER: f64 = -9007199254740991;\n\n // @ts-ignore: decorator\n @lazy\n export const MAX_SAFE_INTEGER: f64 = 9007199254740991;\n\n // @ts-ignore: decorator\n @lazy\n export const POSITIVE_INFINITY: f64 = Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NEGATIVE_INFINITY: f64 = -Infinity;\n\n // @ts-ignore: decorator\n @lazy\n export const NaN: f64 = 0.0 / 0.0;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function copysign(x: f64, y: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function reinterpret_i64(value: i64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(value: f64): f64;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: f64, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(value: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(left: f64, right: f64): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(left: f64, right: f64): f64;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function v128(\n a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8,\n i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8\n): v128;\n\nexport namespace v128 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: T): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): T;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: T): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(a: v128, b: v128, ...lanes: u8[]): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function swizzle(a: v128, s: v128): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_ext(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_zero(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8x8_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load8x8_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16x4_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load16x4_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32x2_s(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function load32x2_u(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load_splat(ptr: usize, immOffset?: usize, immAlign?: usize): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load8_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load16_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load32_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load64_splat(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load32_zero(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load64_zero(ptr: usize, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load8_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load16_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load32_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function load64_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store8_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store16_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store32_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store64_lane(ptr: usize, vec: v128, idx: u8, immOffset?: u32, immAlign?: u32): v128;\n\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function store(ptr: usize, value: v128, immOffset?: usize, immAlign?: usize): void;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(a: v128, b: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function and(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function or(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function xor(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function andnot(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function not(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitselect(v1: v128, v2: v128, c: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function any_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmin(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmax(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function dot(a: v128, b: v128): v128; // i16 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function avgr(a: v128, b: v128): v128; // u8, u16 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(a: v128): v128; // f32, f64 only\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_low(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function demote_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function promote_low(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function q15mulr_sat(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high(a: v128, b: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i8x16(\n a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8,\n i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8\n): v128;\n\nexport namespace i8x16 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_s(x: v128, idx: u8): i8;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_u(x: v128, idx: u8): u8;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i8): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function avgr_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function popcnt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i16x8_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shuffle(\n a: v128, b: v128,\n l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8,\n l8: u8, l9: u8, l10: u8, l11: u8, l12: u8, l13: u8, l14: u8, l15: u8\n ): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function swizzle(a: v128, s: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i16x8(a: i16, b: i16, c: i16, d: i16, e: i16, f: i16, g: i16, h: i16): v128;\n\nexport namespace i16x8 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i16): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_s(x: v128, idx: u8): i16;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane_u(x: v128, idx: u8): u16;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i16): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function avgr_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub_sat_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i32x4_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function narrow_i32x4_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i8x16_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i8x16_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i8x16_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i8x16_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i8x16_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i8x16_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function q15mulr_sat_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i8x16_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i8x16_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i8x16_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i8x16_u(a: v128, b: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i32x4(a: i32, b: i32, c: i32, d: i32): v128;\n\nexport namespace i32x4 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function dot_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f64x2_s_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc_sat_f64x2_u_zero(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i16x8_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i16x8_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i16x8_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i16x8_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i16x8_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extadd_pairwise_i16x8_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i16x8_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i16x8_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i16x8_u(a: v128, b: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function i64x2(a: i64, b: i64): v128;\n\nexport namespace i64x2 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: i64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): i64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: i64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shl(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_s(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function shr_u(a: v128, b: i32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function all_true(a: v128): bool;\n\n // @ts-ignore: decorator\n @builtin\n export declare function bitmask(a: v128): i32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_low_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extend_high_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i32x4_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_low_i32x4_u(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i32x4_s(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extmul_high_i32x4_u(a: v128, b: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f32x4(a: f32, b: f32, c: f32, d: f32): v128;\n\nexport namespace f32x4 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: f32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): f32;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: f32): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmin(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmax(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function demote_f64x2_zero(a: v128): v128;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare function f64x2(a: f64, b: f64): v128;\n\nexport namespace f64x2 {\n\n // @ts-ignore: decorator\n @builtin\n export declare function splat(x: f64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function extract_lane(x: v128, idx: u8): f64;\n\n // @ts-ignore: decorator\n @builtin\n export declare function replace_lane(x: v128, idx: u8, value: f64): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function add(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sub(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function mul(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function div(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function neg(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function min(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function max(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmin(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function pmax(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function abs(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function sqrt(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ceil(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function floor(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function trunc(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function nearest(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function eq(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ne(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function lt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function le(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function gt(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function ge(a: v128, b: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_low_i32x4_s(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function convert_low_i32x4_u(a: v128): v128;\n\n // @ts-ignore: decorator\n @builtin\n export declare function promote_low_f32x4(a: v128): v128;\n}\n\n@final\nexport abstract class i31 { // FIXME: usage of 'new' requires a class :(\n\n // @ts-ignore: decorator\n @builtin\n static new(value: i32): i31ref { return changetype(unreachable()); }\n\n // @ts-ignore: decorator\n @builtin\n static get(i31expr: i31ref): i32 { return unreachable(); }\n}\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n// @ts-ignore: decorator\n@external(\"env\", \"abort\")\ndeclare function abort(\n message?: string | null,\n fileName?: string | null,\n lineNumber?: u32,\n columnNumber?: u32\n): void;\n\n// @ts-ignore: decorator\n@external(\"env\", \"trace\")\ndeclare function trace(\n message: string,\n n?: i32,\n a0?: f64,\n a1?: f64,\n a2?: f64,\n a3?: f64,\n a4?: f64\n): void;\n\n// @ts-ignore: decorator\n@external(\"env\", \"seed\")\ndeclare function seed(): f64;\n\n/* eslint-enable @typescript-eslint/no-unused-vars */\n", - "compat": "export type ReturnType = returnof;\nexport type NonNullable = nonnull;\n", - "console": "import {\n process\n} from \"./process\";\n\n// @ts-ignore: decorator\n@lazy var timers = new Map();\n\nexport namespace console {\n\n export function assert(condition: T, message: string = \"\"): void {\n if (!condition) {\n let stderr = process.stderr;\n stderr.write(\"Assertion failed: \");\n stderr.write(message);\n stderr.write(\"\\n\");\n }\n }\n\n export function log(message: string = \"\"): void {\n var stdout = process.stdout;\n stdout.write(message);\n stdout.write(\"\\n\");\n }\n\n export function debug(message: string = \"\"): void {\n var stdout = process.stdout;\n stdout.write(\"Debug: \");\n stdout.write(message);\n stdout.write(\"\\n\");\n }\n\n export function info(message: string = \"\"): void {\n var stdout = process.stdout;\n stdout.write(\"Info: \");\n stdout.write(message);\n stdout.write(\"\\n\");\n }\n\n export function warn(message: string = \"\"): void {\n var stdout = process.stdout;\n stdout.write(\"Warning: \");\n stdout.write(message);\n stdout.write(\"\\n\");\n }\n\n export function error(message: string = \"\"): void {\n var stdout = process.stdout;\n stdout.write(\"Error: \");\n stdout.write(message);\n stdout.write(\"\\n\");\n }\n\n export function time(label: string = \"default\"): void {\n var stdout = process.stdout;\n if (timers.has(label)) {\n stdout.write(\"Warning: Label '\");\n stdout.write(label);\n stdout.write(\"' already exists for console.time()\\n\");\n return;\n }\n timers.set(label, process.hrtime());\n }\n\n export function timeLog(label: string = \"default\"): void {\n var stdout = process.stdout;\n if (!timers.has(label)) {\n stdout.write(\"Warning: No such label '\");\n stdout.write(label);\n stdout.write(\"' for console.timeLog()\\n\");\n return;\n }\n timeLogImpl(label);\n }\n\n export function timeEnd(label: string = \"default\"): void {\n var stdout = process.stdout;\n if (!timers.has(label)) {\n stdout.write(\"Warning: No such label '\");\n stdout.write(label);\n stdout.write(\"' for console.timeEnd()\\n\");\n return;\n }\n timeLogImpl(label);\n timers.delete(label);\n }\n}\n\nfunction timeLogImpl(label: string): void {\n var start = changetype(timers.get(label));\n var end = process.hrtime();\n var nanos = end - start;\n var millis = nanos / 1000000;\n var millisStr = millis.toString();\n var stdout = process.stdout;\n stdout.write(label);\n stdout.write(\": \");\n stdout.write(millisStr);\n stdout.write(\"ms\\n\");\n // __dispose(changetype(millisStr));\n}\n", - "crypto": "import {\n errnoToString,\n random_get\n} from \"bindings/wasi_snapshot_preview1\";\n\nexport namespace crypto {\n export function getRandomValues(array: Uint8Array): void {\n var err = random_get(changetype(array.buffer) + array.byteOffset, array.byteLength);\n if (err) throw new Error(errnoToString(err));\n }\n}\n", - "dataview": "import { BLOCK_MAXSIZE } from \"./rt/common\";\nimport { ArrayBuffer } from \"./arraybuffer\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH } from \"./util/error\";\n\n// TODO: there is probably a smarter way to check byteOffset for accesses larger than 1 byte\n\nexport class DataView {\n\n readonly buffer: ArrayBuffer;\n @unsafe readonly dataStart: usize;\n readonly byteLength: i32;\n\n get byteOffset(): i32 {\n return (this.dataStart - changetype(this.buffer));\n }\n\n constructor(\n buffer: ArrayBuffer,\n byteOffset: i32 = 0,\n byteLength: i32 = buffer.byteLength\n ) {\n if (\n i32(byteLength > BLOCK_MAXSIZE) |\n i32(byteOffset + byteLength > buffer.byteLength)\n ) throw new RangeError(E_INVALIDLENGTH);\n this.buffer = buffer; // links\n var dataStart = changetype(buffer) + byteOffset;\n this.dataStart = dataStart;\n this.byteLength = byteLength;\n }\n\n getFloat32(byteOffset: i32, littleEndian: bool = false): f32 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 4 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n return littleEndian\n ? load(this.dataStart + byteOffset)\n : reinterpret(bswap(load(this.dataStart + byteOffset)));\n }\n\n getFloat64(byteOffset: i32, littleEndian: bool = false): f64 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 8 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n return littleEndian\n ? load(this.dataStart + byteOffset)\n : reinterpret(bswap(load(this.dataStart + byteOffset)));\n }\n\n getInt8(byteOffset: i32): i8 {\n if (byteOffset >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + byteOffset);\n }\n\n getInt16(byteOffset: i32, littleEndian: bool = false): i16 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 2 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n var result: i16 = load(this.dataStart + byteOffset);\n return littleEndian ? result : bswap(result);\n }\n\n getInt32(byteOffset: i32, littleEndian: bool = false): i32 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 4 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n var result: i32 = load(this.dataStart + byteOffset);\n return littleEndian ? result : bswap(result);\n }\n\n getUint8(byteOffset: i32): u8 {\n if (byteOffset >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + byteOffset);\n }\n\n getUint16(byteOffset: i32, littleEndian: bool = false): u16 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 2 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n var result: u16 = load(this.dataStart + byteOffset);\n return littleEndian ? result : bswap(result);\n }\n\n getUint32(byteOffset: i32, littleEndian: bool = false): u32 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 4 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n var result: u32 = load(this.dataStart + byteOffset);\n return littleEndian ? result : bswap(result);\n }\n\n setFloat32(byteOffset: i32, value: f32, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 4 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n if (littleEndian) store(this.dataStart + byteOffset, value);\n else store(this.dataStart + byteOffset, bswap(reinterpret(value)));\n }\n\n setFloat64(byteOffset: i32, value: f64, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 8 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n if (littleEndian) store(this.dataStart + byteOffset, value);\n else store(this.dataStart + byteOffset, bswap(reinterpret(value)));\n }\n\n setInt8(byteOffset: i32, value: i8): void {\n if (byteOffset >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, value);\n }\n\n setInt16(byteOffset: i32, value: i16, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 2 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, littleEndian ? value : bswap(value));\n }\n\n setInt32(byteOffset: i32, value: i32, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 4 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, littleEndian ? value : bswap(value));\n }\n\n setUint8(byteOffset: i32, value: u8): void {\n if (byteOffset >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, value);\n }\n\n setUint16(byteOffset: i32, value: u16, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 2 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, littleEndian ? value : bswap(value));\n }\n\n setUint32(byteOffset: i32, value: u32, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 4 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, littleEndian ? value : bswap(value));\n }\n\n // Non-standard additions that make sense in WebAssembly, but won't work in JS:\n\n getInt64(byteOffset: i32, littleEndian: bool = false): i64 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 8 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n var result: i64 = load(this.dataStart + byteOffset);\n return littleEndian ? result : bswap(result);\n }\n\n getUint64(byteOffset: i32, littleEndian: bool = false): u64 {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 8 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n var result = load(this.dataStart + byteOffset);\n return littleEndian ? result : bswap(result);\n }\n\n setInt64(byteOffset: i32, value: i64, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 8 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, littleEndian ? value : bswap(value));\n }\n\n setUint64(byteOffset: i32, value: u64, littleEndian: bool = false): void {\n if (\n (byteOffset >>> 31) | i32(byteOffset + 8 > this.byteLength)\n ) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + byteOffset, littleEndian ? value : bswap(value));\n }\n\n toString(): string {\n return \"[object DataView]\";\n }\n}\n", - "date": "import { E_INVALIDDATE } from \"util/error\";\nimport { now as Date_now } from \"./bindings/Date\";\n\n// @ts-ignore: decorator\n@inline const\n MILLIS_PER_DAY = 1000 * 60 * 60 * 24,\n MILLIS_PER_HOUR = 1000 * 60 * 60,\n MILLIS_PER_MINUTE = 1000 * 60,\n MILLIS_PER_SECOND = 1000;\n\n// ymdFromEpochDays returns values via globals to avoid allocations\n// @ts-ignore: decorator\n@lazy let _month: i32, _day: i32;\n\nexport class Date {\n private year: i32 = 0;\n private month: i32 = 0;\n private day: i32 = 0;\n\n @inline static UTC(\n year: i32,\n month: i32 = 0,\n day: i32 = 1,\n hour: i32 = 0,\n minute: i32 = 0,\n second: i32 = 0,\n millisecond: i32 = 0\n ): i64 {\n if (year >= 0 && year <= 99) year += 1900;\n var ms = epochMillis(year, month + 1, day, hour, minute, second, millisecond);\n if (invalidDate(ms)) throw new RangeError(E_INVALIDDATE);\n return ms;\n }\n\n @inline static now(): i64 {\n return Date_now();\n }\n\n // It can parse only ISO 8601 inputs like YYYY-MM-DDTHH:MM:SS.000Z\n @inline static parse(dateString: string): Date {\n return this.fromString(dateString);\n }\n\n static fromString(dateTimeString: string): Date {\n if (!dateTimeString.length) throw new RangeError(E_INVALIDDATE);\n var\n hour: i32 = 0,\n min: i32 = 0,\n sec: i32 = 0,\n ms: i32 = 0;\n\n var dateString = dateTimeString;\n var posT = dateTimeString.indexOf(\"T\");\n if (~posT) {\n // includes a time component\n let timeString: string;\n dateString = dateTimeString.substring(0, posT);\n timeString = dateTimeString.substring(posT + 1);\n // parse the HH-MM-SS component\n let timeParts = timeString.split(\":\");\n let len = timeParts.length;\n if (len <= 1) throw new RangeError(E_INVALIDDATE);\n\n hour = I32.parseInt(timeParts[0]);\n min = I32.parseInt(timeParts[1]);\n if (len >= 3) {\n let secAndMs = timeParts[2];\n let posDot = secAndMs.indexOf(\".\");\n if (~posDot) {\n // includes milliseconds\n sec = I32.parseInt(secAndMs.substring(0, posDot));\n ms = I32.parseInt(secAndMs.substring(posDot + 1));\n } else {\n sec = I32.parseInt(secAndMs);\n }\n }\n }\n // parse the YYYY-MM-DD component\n var parts = dateString.split(\"-\");\n var year = I32.parseInt(parts[0]);\n var month = 1, day = 1;\n var len = parts.length;\n if (len >= 2) {\n month = I32.parseInt(parts[1]);\n if (len >= 3) {\n day = I32.parseInt(parts[2]);\n }\n }\n return new Date(epochMillis(year, month, day, hour, min, sec, ms));\n }\n\n constructor(private epochMillis: i64) {\n // this differs from JavaScript which prefer return NaN or \"Invalid Date\" string\n // instead throwing exception.\n if (invalidDate(epochMillis)) throw new RangeError(E_INVALIDDATE);\n\n this.year = ymdFromEpochDays(i32(floorDiv(epochMillis, MILLIS_PER_DAY)));\n this.month = _month;\n this.day = _day;\n }\n\n @inline getTime(): i64 {\n return this.epochMillis;\n }\n\n setTime(time: i64): i64 {\n if (invalidDate(time)) throw new RangeError(E_INVALIDDATE);\n\n this.epochMillis = time;\n this.year = ymdFromEpochDays(i32(floorDiv(time, MILLIS_PER_DAY)));\n this.month = _month;\n this.day = _day;\n\n return time;\n }\n\n @inline getUTCFullYear(): i32 {\n return this.year;\n }\n\n @inline getUTCMonth(): i32 {\n return this.month - 1;\n }\n\n @inline getUTCDate(): i32 {\n return this.day;\n }\n\n @inline getUTCDay(): i32 {\n return dayOfWeek(this.year, this.month, this.day);\n }\n\n getUTCHours(): i32 {\n return i32(euclidRem(this.epochMillis, MILLIS_PER_DAY)) / MILLIS_PER_HOUR;\n }\n\n getUTCMinutes(): i32 {\n return i32(euclidRem(this.epochMillis, MILLIS_PER_HOUR)) / MILLIS_PER_MINUTE;\n }\n\n getUTCSeconds(): i32 {\n return i32(euclidRem(this.epochMillis, MILLIS_PER_MINUTE)) / MILLIS_PER_SECOND;\n }\n\n getUTCMilliseconds(): i32 {\n return i32(euclidRem(this.epochMillis, MILLIS_PER_SECOND));\n }\n\n setUTCMilliseconds(millis: i32): void {\n this.setTime(this.epochMillis + (millis - this.getUTCMilliseconds()));\n }\n\n setUTCSeconds(seconds: i32): void {\n this.setTime(this.epochMillis + (seconds - this.getUTCSeconds()) * MILLIS_PER_SECOND);\n }\n\n setUTCMinutes(minutes: i32): void {\n this.setTime(this.epochMillis + (minutes - this.getUTCMinutes()) * MILLIS_PER_MINUTE);\n }\n\n setUTCHours(hours: i32): void {\n this.setTime(this.epochMillis + (hours - this.getUTCHours()) * MILLIS_PER_HOUR);\n }\n\n setUTCDate(day: i32): void {\n if (this.day == day) return;\n var ms = euclidRem(this.epochMillis, MILLIS_PER_DAY);\n this.setTime(i64(daysSinceEpoch(this.year, this.month, day)) * MILLIS_PER_DAY + ms);\n }\n\n setUTCMonth(month: i32): void {\n if (this.month == month) return;\n var ms = euclidRem(this.epochMillis, MILLIS_PER_DAY);\n this.setTime(i64(daysSinceEpoch(this.year, month + 1, this.day)) * MILLIS_PER_DAY + ms);\n }\n\n setUTCFullYear(year: i32): void {\n if (this.year == year) return;\n var ms = euclidRem(this.epochMillis, MILLIS_PER_DAY);\n this.setTime(i64(daysSinceEpoch(year, this.month, this.day)) * MILLIS_PER_DAY + ms);\n }\n\n toISOString(): string {\n // TODO: add more low-level helper which combine toString and padStart without extra allocation\n var yearStr: string;\n var year = this.year;\n var isNeg = year < 0;\n if (isNeg || year >= 10000) {\n yearStr = (isNeg ? \"-\" : \"+\") + abs(year).toString().padStart(6, \"0\");\n } else {\n yearStr = year.toString().padStart(4, \"0\");\n }\n\n return (\n yearStr +\n \"-\" +\n this.month.toString().padStart(2, \"0\") +\n \"-\" +\n this.day.toString().padStart(2, \"0\") +\n \"T\" +\n this.getUTCHours().toString().padStart(2, \"0\") +\n \":\" +\n this.getUTCMinutes().toString().padStart(2, \"0\") +\n \":\" +\n this.getUTCSeconds().toString().padStart(2, \"0\") +\n \".\" +\n this.getUTCMilliseconds().toString().padStart(3, \"0\") +\n \"Z\"\n );\n }\n\n toUTCString(): string {\n const weeks: StaticArray = [\n \"Sun, \", \"Mon, \", \"Tue, \", \"Wed, \", \"Thu, \", \"Fri, \", \"Sat, \"\n ];\n\n const months: StaticArray = [\n \" Jan \", \" Feb \", \" Mar \", \" Apr \", \" May \", \" Jun \",\n \" Jul \", \" Aug \", \" Sep \", \" Oct \", \" Nov \", \" Dec \"\n ];\n\n var mo = this.month;\n var da = this.day;\n var yr = this.year;\n var wd = dayOfWeek(yr, mo, da);\n var year = abs(yr).toString().padStart(4, \"0\");\n if (yr < 0) year = \"-\" + year;\n\n return (\n unchecked(weeks[wd]) +\n da.toString().padStart(2, \"0\") +\n unchecked(months[mo - 1]) +\n year +\n \" \" +\n this.getUTCHours().toString().padStart(2, \"0\") +\n \":\" +\n this.getUTCMinutes().toString().padStart(2, \"0\") +\n \":\" +\n this.getUTCSeconds().toString().padStart(2, \"0\") +\n \" GMT\"\n );\n }\n\n toDateString(): string {\n // TODO: use u64 static data instead 4 chars\n // also use stream itoa variants.\n const weeks: StaticArray = [\n \"Sun \", \"Mon \", \"Tue \", \"Wed \", \"Thu \", \"Fri \", \"Sat \"\n ];\n\n const months: StaticArray = [\n \"Jan \", \"Feb \", \"Mar \", \"Apr \", \"May \", \"Jun \",\n \"Jul \", \"Aug \", \"Sep \", \"Oct \", \"Nov \", \"Dec \"\n ];\n\n var mo = this.month;\n var da = this.day;\n var yr = this.year;\n var wd = dayOfWeek(yr, mo, da);\n var year = abs(yr).toString().padStart(4, \"0\");\n if (yr < 0) year = \"-\" + year;\n\n return (\n unchecked(weeks[wd]) +\n unchecked(months[mo - 1]) +\n da.toString().padStart(2, \"0\") +\n \" \" + year\n );\n }\n\n // Note: it uses UTC time instead local time (without timezone offset)\n toTimeString(): string {\n // TODO: add timezone\n return (\n this.getUTCHours().toString().padStart(2, \"0\") +\n \":\" +\n this.getUTCMinutes().toString().padStart(2, \"0\") +\n \":\" +\n this.getUTCSeconds().toString().padStart(2, \"0\")\n );\n }\n\n // Note: it uses UTC datetime instead local datetime (without timezone offset)\n toString(): string {\n return this.toDateString() + \" \" + this.toTimeString();\n }\n}\n\nfunction epochMillis(\n year: i32,\n month: i32,\n day: i32,\n hour: i32,\n minute: i32,\n second: i32,\n milliseconds: i32\n): i64 {\n return (\n i64(daysSinceEpoch(year, month, day)) * MILLIS_PER_DAY +\n hour * MILLIS_PER_HOUR +\n minute * MILLIS_PER_MINUTE +\n second * MILLIS_PER_SECOND +\n milliseconds\n );\n}\n\n// @ts-ignore: decorator\n@inline function floorDiv(a: T, b: T): T {\n return (a >= 0 ? a : a - b + 1) / b as T;\n}\n\n// @ts-ignore: decorator\n@inline function euclidRem(a: T, b: T): T {\n var m = a % b;\n return m + (m < 0 ? b : 0) as T;\n}\n\nfunction invalidDate(millis: i64): bool {\n // @ts-ignore\n return (millis < -8640000000000000) | (millis > 8640000000000000);\n}\n\n// see: http://howardhinnant.github.io/date_algorithms.html#civil_from_days\nfunction ymdFromEpochDays(z: i32): i32 {\n z += 719468;\n var era = floorDiv(z, 146097);\n var doe = z - era * 146097; // [0, 146096]\n var yoe = (doe - doe / 1460 + doe / 36524 - doe / 146096) / 365; // [0, 399]\n var year = yoe + era * 400;\n var doy = doe - (365 * yoe + yoe / 4 - yoe / 100); // [0, 365]\n var mo = (5 * doy + 2) / 153; // [0, 11]\n _day = doy - (153 * mo + 2) / 5 + 1; // [1, 31]\n mo += mo < 10 ? 3 : -9; // [1, 12]\n _month = mo;\n year += u32(mo <= 2);\n return year;\n}\n\n// http://howardhinnant.github.io/date_algorithms.html#days_from_civil\nfunction daysSinceEpoch(y: i32, m: i32, d: i32): i32 {\n y -= i32(m <= 2);\n var era = floorDiv(y, 400);\n var yoe = y - era * 400; // [0, 399]\n var doy = (153 * (m + (m > 2 ? -3 : 9)) + 2) / 5 + d - 1; // [0, 365]\n var doe = yoe * 365 + yoe / 4 - yoe / 100 + doy; // [0, 146096]\n return era * 146097 + doe - 719468;\n}\n\n// TomohikoSakamoto algorithm from https://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week\nfunction dayOfWeek(year: i32, month: i32, day: i32): i32 {\n const tab = memory.data([0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]);\n\n year -= i32(month < 3);\n year += floorDiv(year, 4) - floorDiv(year, 100) + floorDiv(year, 400);\n month = load(tab + month - 1);\n return euclidRem(year + month + day, 7);\n}\n", - "diagnostics": "// @ts-ignore: decorator\n@builtin\nexport declare function ERROR(message?: string): void;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function WARNING(message?: string): void;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function INFO(message?: string): void;\n", - "error": "export class Error {\n\n name: string = \"Error\";\n stack: string = \"\"; // TODO\n\n constructor(\n public message: string = \"\"\n ) {}\n\n toString(): string {\n var message = this.message;\n return message.length\n ? this.name + \": \" + message\n : this.name;\n }\n}\n\nexport class RangeError extends Error {\n constructor(message: string = \"\") {\n super(message);\n this.name = \"RangeError\";\n }\n}\n\nexport class TypeError extends Error {\n constructor(message: string = \"\") {\n super(message);\n this.name = \"TypeError\";\n }\n}\n\nexport class SyntaxError extends Error {\n constructor(message: string = \"\") {\n super(message);\n this.name = \"SyntaxError\";\n }\n}\n\nexport class URIError extends Error {\n constructor(message: string = \"\") {\n super(message);\n this.name = \"URIError\";\n }\n}\n", - "function": "type auto = i32;\n\n@final export abstract class Function {\n private _index: u32;\n private _env: usize;\n\n // @ts-ignore: this on getter\n get index(this: T): u32 {\n return load(changetype(this), offsetof>(\"_index\"));\n }\n\n // @ts-ignore: this on getter\n get name(this: T): string {\n return \"\";\n }\n\n // @ts-ignore: this on getter\n get length(this: T): i32 {\n // @ts-ignore: T is function\n return lengthof();\n }\n\n // @ts-ignore: T is function\n @builtin call(thisArg: thisof | null, ...args: auto[]): returnof {\n return unreachable();\n }\n\n toString(this: T): string {\n return \"function() { [native code] }\";\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n // Env is either `null` (nop) or compiler-generated\n __visit(this._env, cookie);\n }\n}\n", - "iterator": "export abstract class Iterable {\n // ?\n}\n\n@final\nexport abstract class Iterator {\n\n // private constructor(iterable: Iterable) {\n // }\n\n // TODO: these need to evaluate the classId at the respective reference in order to obtain the\n // next value, i.e. arrays work differently than maps. we'd then have:\n //\n // ╒═══════════════════ Iterator layout (32-bit) ══════════════════╕\n // 3 2 1\n // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n // ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n // │ index │\n // ├─────────────────────────────────────────────────────────┬───┬─┤\n // │ reference │ 0 │D│\n // └─────────────────────────────────────────────────────────┴───┴─┘\n // D: Done flag\n\n // get value(this: u64): T {\n // ?\n // }\n\n // next(this: u64): Iterator {\n // ?\n // }\n\n done(this: u64): bool {\n return (this & 1);\n }\n}\n", - "map": "/// \n\nimport { HASH } from \"./util/hash\";\nimport { E_KEYNOTFOUND } from \"./util/error\";\n\n// A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht\n\n// @ts-ignore: decorator\n@inline const INITIAL_CAPACITY = 4;\n\n// @ts-ignore: decorator\n@inline const FILL_FACTOR_N = 8;\n\n// @ts-ignore: decorator\n@inline const FILL_FACTOR_D = 3;\n\n// @ts-ignore: decorator\n@inline const FREE_FACTOR_N = 3;\n\n// @ts-ignore: decorator\n@inline const FREE_FACTOR_D = 4;\n\n/** Structure of a map entry. */\n@unmanaged class MapEntry {\n key: K;\n value: V;\n taggedNext: usize; // LSB=1 indicates EMPTY\n}\n\n/** Empty bit. */\n// @ts-ignore: decorator\n@inline const EMPTY: usize = 1 << 0;\n\n/** Size of a bucket. */\n// @ts-ignore: decorator\n@inline const BUCKET_SIZE = sizeof();\n\n/** Computes the alignment of an entry. */\n// @ts-ignore: decorator\n@inline\nfunction ENTRY_ALIGN(): usize {\n // can align to 4 instead of 8 if 32-bit and K/V is <= 32-bits\n const maxkv = sizeof() > sizeof() ? sizeof() : sizeof();\n const align = (maxkv > sizeof() ? maxkv : sizeof()) - 1;\n return align;\n}\n\n/** Computes the aligned size of an entry. */\n// @ts-ignore: decorator\n@inline\nfunction ENTRY_SIZE(): usize {\n const align = ENTRY_ALIGN();\n const size = (offsetof>() + align) & ~align;\n return size;\n}\n\nexport class Map {\n\n // buckets referencing their respective first entry, usize[bucketsMask + 1]\n private buckets: ArrayBuffer = new ArrayBuffer(INITIAL_CAPACITY * BUCKET_SIZE);\n private bucketsMask: u32 = INITIAL_CAPACITY - 1;\n\n // entries in insertion order, MapEntry[entriesCapacity]\n private entries: ArrayBuffer = new ArrayBuffer(INITIAL_CAPACITY * ENTRY_SIZE());\n private entriesCapacity: i32 = INITIAL_CAPACITY;\n private entriesOffset: i32 = 0;\n private entriesCount: i32 = 0;\n\n constructor() {\n /* nop */\n }\n\n get size(): i32 {\n return this.entriesCount;\n }\n\n clear(): void {\n this.buckets = new ArrayBuffer(INITIAL_CAPACITY * BUCKET_SIZE);\n this.bucketsMask = INITIAL_CAPACITY - 1;\n this.entries = new ArrayBuffer(INITIAL_CAPACITY * ENTRY_SIZE());\n this.entriesCapacity = INITIAL_CAPACITY;\n this.entriesOffset = 0;\n this.entriesCount = 0;\n }\n\n private find(key: K, hashCode: u32): MapEntry | null {\n var entry = load>( // unmanaged!\n changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE\n );\n while (entry) {\n let taggedNext = entry.taggedNext;\n if (!(taggedNext & EMPTY) && entry.key == key) return entry;\n entry = changetype>(taggedNext & ~EMPTY);\n }\n return null;\n }\n\n has(key: K): bool {\n return this.find(key, HASH(key)) !== null;\n }\n\n @operator(\"[]\")\n get(key: K): V {\n var entry = this.find(key, HASH(key));\n if (!entry) throw new Error(E_KEYNOTFOUND); // cannot represent `undefined`\n return entry.value;\n }\n\n @operator(\"[]=\")\n set(key: K, value: V): this {\n var hashCode = HASH(key);\n var entry = this.find(key, hashCode); // unmanaged!\n if (entry) {\n entry.value = value;\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n } else {\n // check if rehashing is necessary\n if (this.entriesOffset == this.entriesCapacity) {\n this.rehash(\n this.entriesCount < this.entriesCapacity * FREE_FACTOR_N / FREE_FACTOR_D\n ? this.bucketsMask // just rehash if 1/4+ entries are empty\n : (this.bucketsMask << 1) | 1 // grow capacity to next 2^N\n );\n }\n // append new entry\n let entries = this.entries;\n entry = changetype>(changetype(entries) + (this.entriesOffset++) * ENTRY_SIZE());\n // link with the map\n entry.key = key;\n if (isManaged()) {\n __link(changetype(this), changetype(key), true);\n }\n entry.value = value;\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n ++this.entriesCount;\n // link with previous entry in bucket\n let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE;\n entry.taggedNext = load(bucketPtrBase);\n store(bucketPtrBase, changetype(entry));\n }\n return this;\n }\n\n delete(key: K): bool {\n var entry = this.find(key, HASH(key));\n if (!entry) return false;\n entry.taggedNext |= EMPTY;\n --this.entriesCount;\n // check if rehashing is appropriate\n var halfBucketsMask = this.bucketsMask >> 1;\n if (\n halfBucketsMask + 1 >= max(INITIAL_CAPACITY, this.entriesCount) &&\n this.entriesCount < this.entriesCapacity * FREE_FACTOR_N / FREE_FACTOR_D\n ) this.rehash(halfBucketsMask);\n return true;\n }\n\n private rehash(newBucketsMask: u32): void {\n var newBucketsCapacity = (newBucketsMask + 1);\n var newBuckets = new ArrayBuffer(newBucketsCapacity * BUCKET_SIZE);\n var newEntriesCapacity = newBucketsCapacity * FILL_FACTOR_N / FILL_FACTOR_D;\n var newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE());\n\n // copy old entries to new entries\n var oldPtr = changetype(this.entries);\n var oldEnd = oldPtr + this.entriesOffset * ENTRY_SIZE();\n var newPtr = changetype(newEntries);\n while (oldPtr != oldEnd) {\n let oldEntry = changetype>(oldPtr);\n if (!(oldEntry.taggedNext & EMPTY)) {\n let newEntry = changetype>(newPtr);\n let oldEntryKey = oldEntry.key;\n newEntry.key = oldEntryKey;\n newEntry.value = oldEntry.value;\n let newBucketIndex = HASH(oldEntryKey) & newBucketsMask;\n let newBucketPtrBase = changetype(newBuckets) + newBucketIndex * BUCKET_SIZE;\n newEntry.taggedNext = load(newBucketPtrBase);\n store(newBucketPtrBase, newPtr);\n newPtr += ENTRY_SIZE();\n }\n oldPtr += ENTRY_SIZE();\n }\n\n this.buckets = newBuckets;\n this.bucketsMask = newBucketsMask;\n this.entries = newEntries;\n this.entriesCapacity = newEntriesCapacity;\n this.entriesOffset = this.entriesCount;\n }\n\n keys(): K[] {\n // FIXME: this is preliminary, needs iterators/closures\n var start = changetype(this.entries);\n var size = this.entriesOffset;\n var keys = new Array(size);\n var length = 0;\n for (let i = 0; i < size; ++i) {\n let entry = changetype>(start + i * ENTRY_SIZE());\n if (!(entry.taggedNext & EMPTY)) {\n keys[length++] = entry.key;\n }\n }\n keys.length = length;\n return keys;\n }\n\n values(): V[] {\n // FIXME: this is preliminary, needs iterators/closures\n var start = changetype(this.entries);\n var size = this.entriesOffset;\n var values = new Array(size);\n var length = 0;\n for (let i = 0; i < size; ++i) {\n let entry = changetype>(start + i * ENTRY_SIZE());\n if (!(entry.taggedNext & EMPTY)) {\n values[length++] = entry.value;\n }\n }\n values.length = length;\n return values;\n }\n\n toString(): string {\n return \"[object Map]\";\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n __visit(changetype(this.buckets), cookie);\n var entries = changetype(this.entries);\n if (isManaged() || isManaged()) {\n let cur = entries;\n let end = cur + this.entriesOffset * ENTRY_SIZE();\n while (cur < end) {\n let entry = changetype>(cur);\n if (!(entry.taggedNext & EMPTY)) {\n if (isManaged()) {\n let val = changetype(entry.key);\n if (isNullable()) {\n if (val) __visit(val, cookie);\n } else __visit(val, cookie);\n }\n if (isManaged()) {\n let val = changetype(entry.value);\n if (isNullable()) {\n if (val) __visit(val, cookie);\n } else __visit(val, cookie);\n }\n }\n cur += ENTRY_SIZE();\n }\n }\n __visit(entries, cookie);\n }\n}\n", - "math": "import * as JSMath from \"./bindings/Math\";\nexport { JSMath };\n\nimport {\n pow_lut, exp_lut, exp2_lut, log_lut, log2_lut,\n powf_lut, expf_lut, exp2f_lut, logf_lut, log2f_lut\n} from \"./util/math\";\n\nimport {\n abs as builtin_abs,\n ceil as builtin_ceil,\n clz as builtin_clz,\n copysign as builtin_copysign,\n floor as builtin_floor,\n max as builtin_max,\n min as builtin_min,\n sqrt as builtin_sqrt,\n trunc as builtin_trunc\n} from \"./builtins\";\n\n// SUN COPYRIGHT NOTICE\n//\n// Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n// Developed at SunPro, a Sun Microsystems, Inc. business.\n// Permission to use, copy, modify, and distribute this software\n// is freely granted, provided that this notice is preserved.\n//\n// Applies to all functions marked with a comment referring here.\n\n/** @internal */\n// @ts-ignore: decorator\n@lazy var rempio2_y0: f64, rempio2_y1: f64, res128_hi: u64;\n\n/** @internal */\n// @ts-ignore: decorator\n@lazy @inline const PIO2_TABLE = memory.data([\n 0x00000000A2F9836E, 0x4E441529FC2757D1, 0xF534DDC0DB629599, 0x3C439041FE5163AB,\n 0xDEBBC561B7246E3A, 0x424DD2E006492EEA, 0x09D1921CFE1DEB1C, 0xB129A73EE88235F5,\n 0x2EBB4484E99C7026, 0xB45F7E413991D639, 0x835339F49C845F8B, 0xBDF9283B1FF897FF,\n 0xDE05980FEF2F118B, 0x5A0A6D1F6D367ECF, 0x27CB09B74F463F66, 0x9E5FEA2D7527BAC7,\n 0xEBE5F17B3D0739F7, 0x8A5292EA6BFB5FB1, 0x1F8D5D0856033046, 0xFC7B6BABF0CFBC20,\n 0x9AF4361DA9E39161, 0x5EE61B086599855F, 0x14A068408DFFD880, 0x4D73273106061557\n]);\n\n/** @internal */\nfunction R(z: f64): f64 { // Rational approximation of (asin(x)-x)/x^3\n const // see: musl/src/math/asin.c and SUN COPYRIGHT NOTICE above\n pS0 = reinterpret(0x3FC5555555555555), // 1.66666666666666657415e-01\n pS1 = reinterpret(0xBFD4D61203EB6F7D), // -3.25565818622400915405e-01\n pS2 = reinterpret(0x3FC9C1550E884455), // 2.01212532134862925881e-01\n pS3 = reinterpret(0xBFA48228B5688F3B), // -4.00555345006794114027e-02\n pS4 = reinterpret(0x3F49EFE07501B288), // 7.91534994289814532176e-04\n pS5 = reinterpret(0x3F023DE10DFDF709), // 3.47933107596021167570e-05\n qS1 = reinterpret(0xC0033A271C8A2D4B), // -2.40339491173441421878e+00\n qS2 = reinterpret(0x40002AE59C598AC8), // 2.02094576023350569471e+00\n qS3 = reinterpret(0xBFE6066C1B8D0159), // -6.88283971605453293030e-01\n qS4 = reinterpret(0x3FB3B8C5B12E9282); // 7.70381505559019352791e-02\n\n var p = z * (pS0 + z * (pS1 + z * (pS2 + z * (pS3 + z * (pS4 + z * pS5)))));\n var q = 1.0 + z * (qS1 + z * (qS2 + z * (qS3 + z * qS4)));\n return p / q;\n}\n\n/** @internal */\n// @ts-ignore: decorator\n@inline\nfunction expo2(x: f64, sign: f64): f64 { // exp(x)/2 for x >= log(DBL_MAX)\n const // see: musl/src/math/__expo2.c\n k = 2043,\n kln2 = reinterpret(0x40962066151ADD8B); // 0x1.62066151add8bp+10\n var scale = reinterpret(((0x3FF + k / 2) << 20) << 32);\n // in directed rounding correct sign before rounding or overflow is important\n return NativeMath.exp(x - kln2) * (sign * scale) * scale;\n}\n\n/** @internal */\n/* Helper function to eventually get bits of π/2 * |x|\n *\n * y = π/4 * (frac << clz(frac) >> 11)\n * return clz(frac)\n *\n * Right shift 11 bits to make upper half fit in `double`\n */\n// @ts-ignore: decorator\n@inline\nfunction pio2_right(q0: u64, q1: u64): u64 { // see: jdh8/metallic/blob/master/src/math/double/rem_pio2.c\n // Bits of π/4\n const p0: u64 = 0xC4C6628B80DC1CD1;\n const p1: u64 = 0xC90FDAA22168C234;\n\n const Ox1p_64 = reinterpret(0x3BF0000000000000); // 0x1p-64\n const Ox1p_75 = reinterpret(0x3B40000000000000); // 0x1p-75\n\n var shift = clz(q1);\n\n q1 = q1 << shift | q0 >> (64 - shift);\n q0 <<= shift;\n\n var lo = umuldi(p1, q1);\n var hi = res128_hi;\n\n var ahi = hi >> 11;\n var alo = lo >> 11 | hi << 53;\n var blo = (Ox1p_75 * p0 * q1 + Ox1p_75 * p1 * q0);\n\n rempio2_y0 = (ahi + u64(lo < blo));\n rempio2_y1 = Ox1p_64 * (alo + blo);\n\n return shift;\n}\n\n/** @internal */\n// @ts-ignore: decorator\n@inline\nfunction umuldi(u: u64, v: u64): u64 {\n var u1: u64 , v1: u64, w0: u64, w1: u64, t: u64;\n\n u1 = u & 0xFFFFFFFF;\n v1 = v & 0xFFFFFFFF;\n\n u >>= 32;\n v >>= 32;\n\n t = u1 * v1;\n w0 = t & 0xFFFFFFFF;\n t = u * v1 + (t >> 32);\n w1 = t >> 32;\n t = u1 * v + (t & 0xFFFFFFFF);\n\n res128_hi = u * v + w1 + (t >> 32);\n return (t << 32) + w0;\n}\n\n/** @internal */\nfunction pio2_large_quot(x: f64, u: i64): i32 { // see: jdh8/metallic/blob/master/src/math/double/rem_pio2.c\n var magnitude = u & 0x7FFFFFFFFFFFFFFF;\n var offset = (magnitude >> 52) - 1045;\n var shift = offset & 63;\n var tblPtr = PIO2_TABLE + ((offset >> 6) << 3);\n var s0: u64, s1: u64, s2: u64;\n\n var b0 = load(tblPtr, 0 << 3);\n var b1 = load(tblPtr, 1 << 3);\n var b2 = load(tblPtr, 2 << 3);\n\n // Get 192 bits of 0x1p-31 / π with `offset` bits skipped\n if (shift) {\n let rshift = 64 - shift;\n let b3 = load(tblPtr, 3 << 3);\n s0 = b1 >> rshift | b0 << shift;\n s1 = b2 >> rshift | b1 << shift;\n s2 = b3 >> rshift | b2 << shift;\n } else {\n s0 = b0;\n s1 = b1;\n s2 = b2;\n }\n\n var significand = (u & 0x000FFFFFFFFFFFFF) | 0x0010000000000000;\n\n // First 128 bits of fractional part of x/(2π)\n var blo = umuldi(s1, significand);\n var bhi = res128_hi;\n\n var ahi = s0 * significand;\n var clo = (s2 >> 32) * (significand >> 32);\n var plo = blo + clo;\n var phi = ahi + bhi + u64(plo < clo);\n\n // r: u128 = p << 2\n var rlo = plo << 2;\n var rhi = phi << 2 | plo >> 62;\n\n // s: i128 = r >> 127\n var slo = rhi >> 63;\n var shi = slo >> 1;\n var q = (phi >> 62) - slo;\n\n var shifter = 0x3CB0000000000000 - (pio2_right(rlo ^ slo, rhi ^ shi) << 52);\n var signbit = (u ^ rhi) & 0x8000000000000000;\n var coeff = reinterpret(shifter | signbit);\n\n rempio2_y0 *= coeff;\n rempio2_y1 *= coeff;\n\n return q;\n}\n\n/** @internal */\n// @ts-ignore: decorator\n@inline\nfunction rempio2(x: f64, u: u64, sign: i32): i32 {\n const\n pio2_1 = reinterpret(0x3FF921FB54400000), // 1.57079632673412561417e+00\n pio2_1t = reinterpret(0x3DD0B4611A626331), // 6.07710050650619224932e-11\n pio2_2 = reinterpret(0x3DD0B4611A600000), // 6.07710050630396597660e-11\n pio2_2t = reinterpret(0x3BA3198A2E037073), // 2.02226624879595063154e-21\n pio2_3 = reinterpret(0x3BA3198A2E000000), // 2.02226624871116645580e-21\n pio2_3t = reinterpret(0x397B839A252049C1), // 8.47842766036889956997e-32\n invpio2 = reinterpret(0x3FE45F306DC9C883); // 0.63661977236758134308\n\n var ix = (u >> 32) & 0x7FFFFFFF;\n\n if (ASC_SHRINK_LEVEL < 1) {\n if (ix < 0x4002D97C) { // |x| < 3pi/4, special case with n=+-1\n let q = 1, z: f64, y0: f64, y1: f64;\n if (!sign) {\n z = x - pio2_1;\n if (ix != 0x3FF921FB) { // 33+53 bit pi is good enough\n y0 = z - pio2_1t;\n y1 = (z - y0) - pio2_1t;\n } else { // near pi/2, use 33+33+53 bit pi\n z -= pio2_2;\n y0 = z - pio2_2t;\n y1 = (z - y0) - pio2_2t;\n }\n } else { // negative x\n z = x + pio2_1;\n if (ix != 0x3FF921FB) { // 33+53 bit pi is good enough\n y0 = z + pio2_1t;\n y1 = (z - y0) + pio2_1t;\n } else { // near pi/2, use 33+33+53 bit pi\n z += pio2_2;\n y0 = z + pio2_2t;\n y1 = (z - y0) + pio2_2t;\n }\n q = -1;\n }\n rempio2_y0 = y0;\n rempio2_y1 = y1;\n return q;\n }\n }\n\n if (ix < 0x413921FB) { // |x| ~< 2^20*pi/2 (1647099)\n // Use precise Cody Waite scheme\n let q = nearest(x * invpio2);\n let r = x - q * pio2_1;\n let w = q * pio2_1t; // 1st round good to 85 bit\n let j = ix >> 20;\n let y0 = r - w;\n let hi = (reinterpret(y0) >> 32);\n let i = j - ((hi >> 20) & 0x7FF);\n\n if (i > 16) { // 2nd iteration needed, good to 118\n let t = r;\n w = q * pio2_2;\n r = t - w;\n w = q * pio2_2t - ((t - r) - w);\n y0 = r - w;\n hi = (reinterpret(y0) >> 32);\n i = j - ((hi >> 20) & 0x7FF);\n if (i > 49) { // 3rd iteration need, 151 bits acc\n let t = r;\n w = q * pio2_3;\n r = t - w;\n w = q * pio2_3t - ((t - r) - w);\n y0 = r - w;\n }\n }\n let y1 = (r - y0) - w;\n rempio2_y0 = y0;\n rempio2_y1 = y1;\n return q;\n }\n var q = pio2_large_quot(x, u);\n return select(-q, q, sign);\n}\n\n/** @internal */\n// @ts-ignore: decorator\n@inline\nfunction sin_kern(x: f64, y: f64, iy: i32): f64 { // see: musl/tree/src/math/__sin.c\n const\n S1 = reinterpret(0xBFC5555555555549), // -1.66666666666666324348e-01\n S2 = reinterpret(0x3F8111111110F8A6), // 8.33333333332248946124e-03\n S3 = reinterpret(0xBF2A01A019C161D5), // -1.98412698298579493134e-04\n S4 = reinterpret(0x3EC71DE357B1FE7D), // 2.75573137070700676789e-06\n S5 = reinterpret(0xBE5AE5E68A2B9CEB), // -2.50507602534068634195e-08\n S6 = reinterpret(0x3DE5D93A5ACFD57C); // 1.58969099521155010221e-10\n\n var z = x * x;\n var w = z * z;\n var r = S2 + z * (S3 + z * S4) + z * w * (S5 + z * S6);\n var v = z * x;\n if (!iy) {\n return x + v * (S1 + z * r);\n } else {\n return x - ((z * (0.5 * y - v * r) - y) - v * S1);\n }\n}\n\n/** @internal */\n// @ts-ignore: decorator\n@inline\nfunction cos_kern(x: f64, y: f64): f64 { // see: musl/tree/src/math/__cos.c\n const\n C1 = reinterpret(0x3FA555555555554C), // 4.16666666666666019037e-02\n C2 = reinterpret(0xBF56C16C16C15177), // -1.38888888888741095749e-03\n C3 = reinterpret(0x3EFA01A019CB1590), // 2.48015872894767294178e-05\n C4 = reinterpret(0xBE927E4F809C52AD), // -2.75573143513906633035e-07\n C5 = reinterpret(0x3E21EE9EBDB4B1C4), // 2.08757232129817482790e-09\n C6 = reinterpret(0xBDA8FAE9BE8838D4); // -1.13596475577881948265e-11\n\n var z = x * x;\n var w = z * z;\n var r = z * (C1 + z * (C2 + z * C3)) + w * w * (C4 + z * (C5 + z * C6));\n var hz = 0.5 * z;\n w = 1.0 - hz;\n return w + (((1.0 - w) - hz) + (z * r - x * y));\n}\n\n/** @internal */\nfunction tan_kern(x: f64, y: f64, iy: i32): f64 { // see: src/lib/msun/src/k_tan.c\n const\n T0 = reinterpret(0x3FD5555555555563), // 3.33333333333334091986e-01\n T1 = reinterpret(0x3FC111111110FE7A), // 1.33333333333201242699e-01\n T2 = reinterpret(0x3FABA1BA1BB341FE), // 5.39682539762260521377e-02\n T3 = reinterpret(0x3F9664F48406D637), // 2.18694882948595424599e-02\n T4 = reinterpret(0x3F8226E3E96E8493), // 8.86323982359930005737e-03\n T5 = reinterpret(0x3F6D6D22C9560328), // 3.59207910759131235356e-03\n T6 = reinterpret(0x3F57DBC8FEE08315), // 1.45620945432529025516e-03\n T7 = reinterpret(0x3F4344D8F2F26501), // 5.88041240820264096874e-04\n T8 = reinterpret(0x3F3026F71A8D1068), // 2.46463134818469906812e-04\n T9 = reinterpret(0x3F147E88A03792A6), // 7.81794442939557092300e-05\n T10 = reinterpret(0x3F12B80F32F0A7E9), // 7.14072491382608190305e-05\n T11 = reinterpret(0xBEF375CBDB605373), // -1.85586374855275456654e-05\n T12 = reinterpret(0x3EFB2A7074BF7AD4); // 2.59073051863633712884e-05\n\n const\n one = reinterpret(0x3FF0000000000000), // 1.00000000000000000000e+00\n pio4 = reinterpret(0x3FE921FB54442D18), // 7.85398163397448278999e-01\n pio4lo = reinterpret(0x3C81A62633145C07); // 3.06161699786838301793e-17\n\n var z: f64, r: f64, v: f64, w: f64, s: f64;\n var hx = (reinterpret(x) >> 32); // high word of x\n var ix = hx & 0x7FFFFFFF; // high word of |x|\n var big = ix >= 0x3FE59428;\n if (big) { // |x| >= 0.6744\n if (hx < 0) { x = -x, y = -y; }\n z = pio4 - x;\n w = pio4lo - y;\n x = z + w;\n y = 0.0;\n }\n z = x * x;\n w = z * z;\n r = T1 + w * (T3 + w * (T5 + w * (T7 + w * (T9 + w * T11))));\n v = z * (T2 + w * (T4 + w * (T6 + w * (T8 + w * (T10 + w * T12)))));\n s = z * x;\n r = y + z * (s * (r + v) + y);\n r += T0 * s;\n w = x + r;\n if (big) {\n v = iy;\n return (1 - ((hx >> 30) & 2)) * (v - 2.0 * (x - (w * w / (w + v) - r)));\n }\n if (iy == 1) return w;\n var a: f64, t: f64;\n z = w;\n z = reinterpret(reinterpret(z) & 0xFFFFFFFF00000000);\n v = r - (z - x); // z + v = r + x\n t = a = -one / w; // a = -1.0 / w\n t = reinterpret(reinterpret(t) & 0xFFFFFFFF00000000);\n s = one + t * z;\n return t + a * (s + t * v);\n}\n\n/** @internal */\nfunction dtoi32(x: f64): i32 {\n if (ASC_SHRINK_LEVEL > 0) {\n const inv32 = 1.0 / 4294967296;\n return (x - 4294967296 * floor(x * inv32));\n } else {\n let result = 0;\n let u = reinterpret(x);\n let e = (u >> 52) & 0x7FF;\n if (e <= 1023 + 30) {\n result = x;\n } else if (e <= 1023 + 30 + 53) {\n let v = (u & ((1 << 52) - 1)) | (1 << 52);\n v = v << e - 1023 - 52 + 32;\n result = (v >> 32);\n result = select(-result, result, u >> 63);\n }\n return result;\n }\n}\n\n// @ts-ignore: decorator\n@lazy var random_seeded = false;\n\n// @ts-ignore: decorator\n@lazy var random_state0_64: u64, random_state1_64: u64;\n\n// @ts-ignore: decorator\n@lazy var random_state0_32: u32, random_state1_32: u32;\n\nfunction murmurHash3(h: u64): u64 { // Force all bits of a hash block to avalanche\n h ^= h >> 33; // see: https://github.com/aappleby/smhasher\n h *= 0xFF51AFD7ED558CCD;\n h ^= h >> 33;\n h *= 0xC4CEB9FE1A85EC53;\n h ^= h >> 33;\n return h;\n}\n\nfunction splitMix32(h: u32): u32 {\n h += 0x6D2B79F5;\n h = (h ^ (h >> 15)) * (h | 1);\n h ^= h + (h ^ (h >> 7)) * (h | 61);\n return h ^ (h >> 14);\n}\n\nexport namespace NativeMath {\n\n // @ts-ignore: decorator\n @lazy\n export const E = reinterpret(0x4005BF0A8B145769); // 2.7182818284590452354\n\n // @ts-ignore: decorator\n @lazy\n export const LN2 = reinterpret(0x3FE62E42FEFA39EF); // 0.69314718055994530942\n\n // @ts-ignore: decorator\n @lazy\n export const LN10 = reinterpret(0x40026BB1BBB55516); // 2.30258509299404568402\n\n // @ts-ignore: decorator\n @lazy\n export const LOG2E = reinterpret(0x3FF71547652B82FE); // 1.4426950408889634074\n\n // @ts-ignore: decorator\n @lazy\n export const LOG10E = reinterpret(0x3FDBCB7B1526E50E); // 0.43429448190325182765\n\n // @ts-ignore: decorator\n @lazy\n export const PI = reinterpret(0x400921FB54442D18); // 3.14159265358979323846\n\n // @ts-ignore: decorator\n @lazy\n export const SQRT1_2 = reinterpret(0x3FE6A09E667F3BCD); // 0.70710678118654752440\n\n // @ts-ignore: decorator\n @lazy\n export const SQRT2 = reinterpret(0x3FF6A09E667F3BCD); // 1.41421356237309504880\n\n // @ts-ignore: decorator\n @lazy\n export var sincos_sin: f64 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export var sincos_cos: f64 = 0;\n\n // @ts-ignore: decorator\n @inline export function abs(x: f64): f64 {\n return builtin_abs(x);\n }\n\n export function acos(x: f64): f64 { // see: musl/src/math/acos.c and SUN COPYRIGHT NOTICE above\n const\n pio2_hi = reinterpret(0x3FF921FB54442D18), // 1.57079632679489655800e+00\n pio2_lo = reinterpret(0x3C91A62633145C07), // 6.12323399573676603587e-17\n Ox1p_120f = reinterpret(0x03800000);\n\n var hx = (reinterpret(x) >> 32);\n var ix = hx & 0x7FFFFFFF;\n if (ix >= 0x3FF00000) {\n let lx = reinterpret(x);\n if ((ix - 0x3FF00000 | lx) == 0) {\n if (hx >> 31) return 2 * pio2_hi + Ox1p_120f;\n return 0;\n }\n return 0 / (x - x);\n }\n if (ix < 0x3FE00000) {\n if (ix <= 0x3C600000) return pio2_hi + Ox1p_120f;\n return pio2_hi - (x - (pio2_lo - x * R(x * x)));\n }\n var s: f64, w: f64, z: f64;\n if (hx >> 31) {\n // z = (1.0 + x) * 0.5;\n z = 0.5 + x * 0.5;\n s = builtin_sqrt(z);\n w = R(z) * s - pio2_lo;\n return 2 * (pio2_hi - (s + w));\n }\n // z = (1.0 - x) * 0.5;\n z = 0.5 - x * 0.5;\n s = builtin_sqrt(z);\n var df = reinterpret(reinterpret(s) & 0xFFFFFFFF00000000);\n var c = (z - df * df) / (s + df);\n w = R(z) * s + c;\n return 2 * (df + w);\n }\n\n export function acosh(x: f64): f64 { // see: musl/src/math/acosh.c\n const s = reinterpret(0x3FE62E42FEFA39EF);\n var u = reinterpret(x);\n // Prevent propagation for all input values less than 1.0.\n // Note musl lib didn't fix this yet.\n if (u < 0x3FF0000000000000) return (x - x) / 0.0;\n var e = u >> 52 & 0x7FF;\n if (e < 0x3FF + 1) return log1p(x - 1 + builtin_sqrt((x - 1) * (x - 1) + 2 * (x - 1)));\n if (e < 0x3FF + 26) return log(2 * x - 1 / (x + builtin_sqrt(x * x - 1)));\n return log(x) + s;\n }\n\n export function asin(x: f64): f64 { // see: musl/src/math/asin.c and SUN COPYRIGHT NOTICE above\n const\n pio2_hi = reinterpret(0x3FF921FB54442D18), // 1.57079632679489655800e+00\n pio2_lo = reinterpret(0x3C91A62633145C07), // 6.12323399573676603587e-17\n Ox1p_120f = reinterpret(0x03800000);\n\n var hx = (reinterpret(x) >> 32);\n var ix = hx & 0x7FFFFFFF;\n if (ix >= 0x3FF00000) {\n let lx = reinterpret(x);\n if ((ix - 0x3FF00000 | lx) == 0) return x * pio2_hi + Ox1p_120f;\n return 0 / (x - x);\n }\n if (ix < 0x3FE00000) {\n if (ix < 0x3E500000 && ix >= 0x00100000) return x;\n return x + x * R(x * x);\n }\n // var z = (1.0 - builtin_abs(x)) * 0.5;\n var z = 0.5 - builtin_abs(x) * 0.5;\n var s = builtin_sqrt(z);\n var r = R(z);\n if (ix >= 0x3FEF3333) x = pio2_hi - (2 * (s + s * r) - pio2_lo);\n else {\n let f = reinterpret(reinterpret(s) & 0xFFFFFFFF00000000);\n let c = (z - f * f) / (s + f);\n x = 0.5 * pio2_hi - (2 * s * r - (pio2_lo - 2 * c) - (0.5 * pio2_hi - 2 * f));\n }\n if (hx >> 31) return -x;\n return x;\n }\n\n export function asinh(x: f64): f64 { // see: musl/src/math/asinh.c\n const c = reinterpret(0x3FE62E42FEFA39EF); // 0.693147180559945309417232121458176568\n var u = reinterpret(x);\n var e = u >> 52 & 0x7FF;\n var y = reinterpret(u & 0x7FFFFFFFFFFFFFFF);\n if (e >= 0x3FF + 26) y = log(y) + c;\n else if (e >= 0x3FF + 1) y = log(2 * y + 1 / (builtin_sqrt(y * y + 1) + y));\n else if (e >= 0x3FF - 26) y = log1p(y + y * y / (builtin_sqrt(y * y + 1) + 1));\n return builtin_copysign(y, x);\n }\n\n export function atan(x: f64): f64 { // see musl/src/math/atan.c and SUN COPYRIGHT NOTICE above\n const\n atanhi0 = reinterpret(0x3FDDAC670561BB4F), // 4.63647609000806093515e-01\n atanhi1 = reinterpret(0x3FE921FB54442D18), // 7.85398163397448278999e-01\n atanhi2 = reinterpret(0x3FEF730BD281F69B), // 9.82793723247329054082e-01\n atanhi3 = reinterpret(0x3FF921FB54442D18), // 1.57079632679489655800e+00\n atanlo0 = reinterpret(0x3C7A2B7F222F65E2), // 2.26987774529616870924e-17\n atanlo1 = reinterpret(0x3C81A62633145C07), // 3.06161699786838301793e-17\n atanlo2 = reinterpret(0x3C7007887AF0CBBD), // 1.39033110312309984516e-17\n atanlo3 = reinterpret(0x3C91A62633145C07), // 6.12323399573676603587e-17\n aT0 = reinterpret(0x3FD555555555550D), // 3.33333333333329318027e-01\n aT1 = reinterpret(0xBFC999999998EBC4), // -1.99999999998764832476e-01\n aT2 = reinterpret(0x3FC24924920083FF), // 1.42857142725034663711e-01\n aT3 = reinterpret(0xBFBC71C6FE231671), // -1.11111104054623557880e-01,\n aT4 = reinterpret(0x3FB745CDC54C206E), // 9.09088713343650656196e-02\n aT5 = reinterpret(0xBFB3B0F2AF749A6D), // -7.69187620504482999495e-02\n aT6 = reinterpret(0x3FB10D66A0D03D51), // 6.66107313738753120669e-02\n aT7 = reinterpret(0xBFADDE2D52DEFD9A), // -5.83357013379057348645e-02\n aT8 = reinterpret(0x3FA97B4B24760DEB), // 4.97687799461593236017e-02\n aT9 = reinterpret(0xBFA2B4442C6A6C2F), // -3.65315727442169155270e-02\n aT10 = reinterpret(0x3F90AD3AE322DA11), // 1.62858201153657823623e-02\n Ox1p_120f = reinterpret(0x03800000);\n\n var ix = (reinterpret(x) >> 32);\n var sx = x;\n ix &= 0x7FFFFFFF;\n var z: f64;\n if (ix >= 0x44100000) {\n if (isNaN(x)) return x;\n z = atanhi3 + Ox1p_120f;\n return builtin_copysign(z, sx);\n }\n var id: i32;\n if (ix < 0x3FDC0000) {\n if (ix < 0x3E400000) return x;\n id = -1;\n } else {\n x = builtin_abs(x);\n if (ix < 0x3FF30000) {\n if (ix < 0x3FE60000) {\n id = 0;\n x = (2.0 * x - 1.0) / (2.0 + x);\n } else {\n id = 1;\n x = (x - 1.0) / (x + 1.0);\n }\n } else {\n if (ix < 0x40038000) {\n id = 2;\n x = (x - 1.5) / (1.0 + 1.5 * x);\n } else {\n id = 3;\n x = -1.0 / x;\n }\n }\n }\n z = x * x;\n var w = z * z;\n var s1 = z * (aT0 + w * (aT2 + w * (aT4 + w * (aT6 + w * (aT8 + w * aT10)))));\n var s2 = w * (aT1 + w * (aT3 + w * (aT5 + w * (aT7 + w * aT9))));\n var s3 = x * (s1 + s2);\n if (id < 0) return x - s3;\n switch (id) {\n case 0: { z = atanhi0 - ((s3 - atanlo0) - x); break; }\n case 1: { z = atanhi1 - ((s3 - atanlo1) - x); break; }\n case 2: { z = atanhi2 - ((s3 - atanlo2) - x); break; }\n case 3: { z = atanhi3 - ((s3 - atanlo3) - x); break; }\n default: unreachable();\n }\n return builtin_copysign(z, sx);\n }\n\n export function atanh(x: f64): f64 { // see: musl/src/math/atanh.c\n var u = reinterpret(x);\n var e = u >> 52 & 0x7FF;\n var y = builtin_abs(x);\n if (e < 0x3FF - 1) {\n if (e >= 0x3FF - 32) y = 0.5 * log1p(2 * y + 2 * y * y / (1 - y));\n } else {\n y = 0.5 * log1p(2 * (y / (1 - y)));\n }\n return builtin_copysign(y, x);\n }\n\n export function atan2(y: f64, x: f64): f64 { // see: musl/src/math/atan2.c and SUN COPYRIGHT NOTICE above\n const pi_lo = reinterpret(0x3CA1A62633145C07); // 1.2246467991473531772E-16\n if (isNaN(x) || isNaN(y)) return x + y;\n var u = reinterpret(x);\n var ix = (u >> 32);\n var lx = u;\n u = reinterpret(y);\n var iy = (u >> 32);\n var ly = u;\n if ((ix - 0x3FF00000 | lx) == 0) return atan(y);\n var m = ((iy >> 31) & 1) | ((ix >> 30) & 2);\n ix = ix & 0x7FFFFFFF;\n iy = iy & 0x7FFFFFFF;\n if ((iy | ly) == 0) {\n switch (m) {\n case 0:\n case 1: return y;\n case 2: return PI;\n case 3: return -PI;\n }\n }\n if ((ix | lx) == 0) return m & 1 ? -PI / 2 : PI / 2;\n if (ix == 0x7FF00000) {\n if (iy == 0x7FF00000) {\n let t = m & 2 ? 3 * PI / 4 : PI / 4;\n return m & 1 ? -t : t;\n } else {\n let t = m & 2 ? PI : 0;\n return m & 1 ? -t : t;\n }\n }\n var z: f64;\n if (ix + (64 << 20) < iy || iy == 0x7FF00000) return m & 1 ? -PI / 2 : PI / 2;\n if ((m & 2) && iy + (64 << 20) < ix) z = 0;\n else z = atan(builtin_abs(y / x));\n switch (m) {\n case 0: return z;\n case 1: return -z;\n case 2: return PI - (z - pi_lo);\n case 3: return (z - pi_lo) - PI;\n }\n unreachable();\n return 0;\n }\n\n export function cbrt(x: f64): f64 { // see: musl/src/math/cbrt.c and SUN COPYRIGHT NOTICE above\n const\n B1 = 715094163,\n B2 = 696219795,\n P0 = reinterpret(0x3FFE03E60F61E692), // 1.87595182427177009643\n P1 = reinterpret(0xBFFE28E092F02420), // -1.88497979543377169875\n P2 = reinterpret(0x3FF9F1604A49D6C2), // 1.621429720105354466140\n P3 = reinterpret(0xBFE844CBBEE751D9), // -0.758397934778766047437\n P4 = reinterpret(0x3FC2B000D4E4EDD7), // 0.145996192886612446982\n Ox1p54 = reinterpret(0x4350000000000000); // 0x1p54\n\n var u = reinterpret(x);\n var hx = (u >> 32) & 0x7FFFFFFF;\n if (hx >= 0x7FF00000) return x + x;\n if (hx < 0x00100000) {\n u = reinterpret(x * Ox1p54);\n hx = (u >> 32) & 0x7FFFFFFF;\n if (hx == 0) return x;\n hx = hx / 3 + B2;\n } else {\n hx = hx / 3 + B1;\n }\n u &= 1 << 63;\n u |= hx << 32;\n var t = reinterpret(u);\n var r = (t * t) * (t / x);\n t = t * ((P0 + r * (P1 + r * P2)) + ((r * r) * r) * (P3 + r * P4));\n t = reinterpret((reinterpret(t) + 0x80000000) & 0xFFFFFFFFC0000000);\n var s = t * t;\n r = x / s;\n r = (r - t) / (2 * t + r);\n t = t + t * r;\n return t;\n }\n\n // @ts-ignore: decorator\n @inline\n export function ceil(x: f64): f64 {\n return builtin_ceil(x);\n }\n\n export function clz32(x: f64): f64 {\n if (!isFinite(x)) return 32;\n /*\n * Wasm (MVP) and JS have different approaches for double->int conversions.\n *\n * For emulate JS conversion behavior and avoid trapping from wasm we should modulate by MAX_INT\n * our float-point arguments before actual convertion to integers.\n */\n return builtin_clz(dtoi32(x));\n }\n\n export function cos(x: f64): f64 { // see: musl/src/math/cos.c\n var u = reinterpret(x);\n var ix = (u >> 32);\n var sign = ix >> 31;\n\n ix &= 0x7FFFFFFF;\n\n // |x| ~< pi/4\n if (ix <= 0x3FE921FB) {\n if (ix < 0x3E46A09E) { // |x| < 2**-27 * sqrt(2)\n return 1.0;\n }\n return cos_kern(x, 0);\n }\n\n // sin(Inf or NaN) is NaN\n if (ix >= 0x7FF00000) return x - x;\n\n // argument reduction needed\n var n = rempio2(x, u, sign);\n var y0 = rempio2_y0;\n var y1 = rempio2_y1;\n\n x = n & 1 ? sin_kern(y0, y1, 1) : cos_kern(y0, y1);\n return (n + 1) & 2 ? -x : x;\n }\n\n export function cosh(x: f64): f64 { // see: musl/src/math/cosh.c\n var u = reinterpret(x);\n u &= 0x7FFFFFFFFFFFFFFF;\n x = reinterpret(u);\n var w = (u >> 32);\n var t: f64;\n if (w < 0x3FE62E42) {\n if (w < 0x3FF00000 - (26 << 20)) return 1;\n t = expm1(x);\n // return 1 + t * t / (2 * (1 + t));\n return 1 + t * t / (2 + 2 * t);\n }\n if (w < 0x40862E42) {\n t = exp(x);\n return 0.5 * (t + 1 / t);\n }\n t = expo2(x, 1);\n return t;\n }\n\n export function exp(x: f64): f64 { // see: musl/src/math/exp.c and SUN COPYRIGHT NOTICE above\n if (ASC_SHRINK_LEVEL < 1) {\n return exp_lut(x);\n } else {\n const\n ln2hi = reinterpret(0x3FE62E42FEE00000), // 6.93147180369123816490e-01\n ln2lo = reinterpret(0x3DEA39EF35793C76), // 1.90821492927058770002e-10\n invln2 = reinterpret(0x3FF71547652B82FE), // 1.44269504088896338700e+00\n P1 = reinterpret(0x3FC555555555553E), // 1.66666666666666019037e-01\n P2 = reinterpret(0xBF66C16C16BEBD93), // -2.77777777770155933842e-03\n P3 = reinterpret(0x3F11566AAF25DE2C), // 6.61375632143793436117e-05\n P4 = reinterpret(0xBEBBBD41C5D26BF1), // -1.65339022054652515390e-06\n P5 = reinterpret(0x3E66376972BEA4D0), // 4.13813679705723846039e-08\n overflow = reinterpret(0x40862E42FEFA39EF), // 709.782712893383973096\n underflow = reinterpret(0xC0874910D52D3051), // -745.13321910194110842\n Ox1p1023 = reinterpret(0x7FE0000000000000); // 0x1p1023\n\n let hx = (reinterpret(x) >> 32);\n let sign_ = (hx >> 31);\n hx &= 0x7FFFFFFF;\n if (hx >= 0x4086232B) {\n if (isNaN(x)) return x;\n if (x > overflow) return x * Ox1p1023;\n if (x < underflow) return 0;\n }\n let hi: f64, lo: f64 = 0;\n let k = 0;\n if (hx > 0x3FD62E42) {\n if (hx >= 0x3FF0A2B2) {\n k = (invln2 * x + builtin_copysign(0.5, x));\n } else {\n k = 1 - (sign_ << 1);\n }\n hi = x - k * ln2hi;\n lo = k * ln2lo;\n x = hi - lo;\n } else if (hx > 0x3E300000) {\n hi = x;\n } else return 1.0 + x;\n let xs = x * x;\n // var c = x - xp2 * (P1 + xp2 * (P2 + xp2 * (P3 + xp2 * (P4 + xp2 * P5))));\n let xq = xs * xs;\n let c = x - (xs * P1 + xq * ((P2 + xs * P3) + xq * (P4 + xs * P5)));\n let y = 1.0 + (x * c / (2 - c) - lo + hi);\n return k == 0 ? y : scalbn(y, k);\n }\n }\n\n export function exp2(x: f64): f64 {\n return exp2_lut(x);\n }\n\n export function expm1(x: f64): f64 { // see: musl/src/math/expm1.c and SUN COPYRIGHT NOTICE above\n const\n o_threshold = reinterpret(0x40862E42FEFA39EF), // 7.09782712893383973096e+02\n ln2_hi = reinterpret(0x3FE62E42FEE00000), // 6.93147180369123816490e-01\n ln2_lo = reinterpret(0x3DEA39EF35793C76), // 1.90821492927058770002e-10\n invln2 = reinterpret(0x3FF71547652B82FE), // 1.44269504088896338700e+00\n Q1 = reinterpret(0xBFA11111111110F4), // -3.33333333333331316428e-02\n Q2 = reinterpret(0x3F5A01A019FE5585), // 1.58730158725481460165e-03\n Q3 = reinterpret(0xBF14CE199EAADBB7), // -7.93650757867487942473e-05\n Q4 = reinterpret(0x3ED0CFCA86E65239), // 4.00821782732936239552e-06\n Q5 = reinterpret(0xBE8AFDB76E09C32D), // -2.01099218183624371326e-07\n Ox1p1023 = reinterpret(0x7FE0000000000000); // 0x1p1023\n\n var u = reinterpret(x);\n var hx = (u >> 32 & 0x7FFFFFFF);\n var k = 0, sign_ = (u >> 63);\n if (hx >= 0x4043687A) {\n if (isNaN(x)) return x;\n if (sign_) return -1;\n if (x > o_threshold) return x * Ox1p1023;\n }\n var c = 0.0, t: f64;\n if (hx > 0x3FD62E42) {\n k = select(\n 1 - (sign_ << 1),\n (invln2 * x + builtin_copysign(0.5, x)),\n hx < 0x3FF0A2B2\n );\n t = k;\n let hi = x - t * ln2_hi;\n let lo = t * ln2_lo;\n x = hi - lo;\n c = (hi - x) - lo;\n } else if (hx < 0x3C900000) return x;\n var hfx = 0.5 * x;\n var hxs = x * hfx;\n // var r1 = 1.0 + hxs * (Q1 + hxs * (Q2 + hxs * (Q3 + hxs * (Q4 + hxs * Q5))));\n var hxq = hxs * hxs;\n var r1 = (1.0 + hxs * Q1) + hxq * ((Q2 + hxs * Q3) + hxq * (Q4 + hxs * Q5));\n t = 3.0 - r1 * hfx;\n var e = hxs * ((r1 - t) / (6.0 - x * t));\n if (k == 0) return x - (x * e - hxs);\n e = x * (e - c) - c;\n e -= hxs;\n if (k == -1) return 0.5 * (x - e) - 0.5;\n if (k == 1) {\n if (x < -0.25) return -2.0 * (e - (x + 0.5));\n return 1.0 + 2.0 * (x - e);\n }\n u = (0x3FF + k) << 52;\n var twopk = reinterpret(u);\n var y: f64;\n if (k < 0 || k > 56) {\n y = x - e + 1.0;\n if (k == 1024) y = y * 2.0 * Ox1p1023;\n else y = y * twopk;\n return y - 1.0;\n }\n u = (0x3FF - k) << 52;\n y = reinterpret(u);\n if (k < 20) y = (1 - y) - e;\n else y = 1 - (e + y);\n return (x + y) * twopk;\n }\n\n // @ts-ignore: decorator\n @inline\n export function floor(x: f64): f64 {\n return builtin_floor(x);\n }\n\n // @ts-ignore: decorator\n @inline\n export function fround(x: f64): f64 {\n return x;\n }\n\n export function hypot(x: f64, y: f64): f64 { // see: musl/src/math/hypot.c\n const\n SPLIT = reinterpret(0x41A0000000000000) + 1, // 0x1p27 + 1\n Ox1p700 = reinterpret(0x6BB0000000000000),\n Ox1p_700 = reinterpret(0x1430000000000000);\n\n var ux = reinterpret(x);\n var uy = reinterpret(y);\n ux &= 0x7FFFFFFFFFFFFFFF;\n uy &= 0x7FFFFFFFFFFFFFFF;\n if (ux < uy) {\n let ut = ux;\n ux = uy;\n uy = ut;\n }\n var ex = (ux >> 52);\n var ey = (uy >> 52);\n y = reinterpret(uy);\n if (ey == 0x7FF) return y;\n x = reinterpret(ux);\n if (ex == 0x7FF || uy == 0) return x;\n if (ex - ey > 64) return x + y;\n var z = 1.0;\n if (ex > 0x3FF + 510) {\n z = Ox1p700;\n x *= Ox1p_700;\n y *= Ox1p_700;\n } else if (ey < 0x3FF - 450) {\n z = Ox1p_700;\n x *= Ox1p700;\n y *= Ox1p700;\n }\n var c = x * SPLIT;\n var h = x - c + c;\n var l = x - h;\n var hx = x * x;\n var lx = h * h - hx + (2 * h + l) * l;\n c = y * SPLIT;\n h = y - c + c;\n l = y - h;\n var hy = y * y;\n var ly = h * h - hy + (2 * h + l) * l;\n return z * builtin_sqrt(ly + lx + hy + hx);\n }\n\n export function imul(x: f64, y: f64): f64 {\n /*\n * Wasm (MVP) and JS have different approaches for double->int conversions.\n *\n * For emulate JS conversion behavior and avoid trapping from wasm we should modulate by MAX_INT\n * our float-point arguments before actual convertion to integers.\n */\n if (!isFinite(x + y)) return 0;\n return dtoi32(x) * dtoi32(y);\n }\n\n export function log(x: f64): f64 { // see: musl/src/math/log.c and SUN COPYRIGHT NOTICE above\n if (ASC_SHRINK_LEVEL < 1) {\n return log_lut(x);\n } else {\n const\n ln2_hi = reinterpret(0x3FE62E42FEE00000), // 6.93147180369123816490e-01\n ln2_lo = reinterpret(0x3DEA39EF35793C76), // 1.90821492927058770002e-10\n Lg1 = reinterpret(0x3FE5555555555593), // 6.666666666666735130e-01\n Lg2 = reinterpret(0x3FD999999997FA04), // 3.999999999940941908e-01\n Lg3 = reinterpret(0x3FD2492494229359), // 2.857142874366239149e-01\n Lg4 = reinterpret(0x3FCC71C51D8E78AF), // 2.222219843214978396e-01\n Lg5 = reinterpret(0x3FC7466496CB03DE), // 1.818357216161805012e-01\n Lg6 = reinterpret(0x3FC39A09D078C69F), // 1.531383769920937332e-01\n Lg7 = reinterpret(0x3FC2F112DF3E5244), // 1.479819860511658591e-01\n Ox1p54 = reinterpret(0x4350000000000000); // 0x1p54\n\n let u = reinterpret(x);\n let hx = (u >> 32);\n let k = 0;\n if (hx < 0x00100000 || (hx >> 31)) {\n if (u << 1 == 0) return -1 / (x * x);\n if (hx >> 31) return (x - x) / 0.0;\n k -= 54;\n x *= Ox1p54;\n u = reinterpret(x);\n hx = (u >> 32);\n } else if (hx >= 0x7FF00000) {\n return x;\n } else if (hx == 0x3FF00000 && u << 32 == 0) {\n return 0;\n }\n hx += 0x3FF00000 - 0x3FE6A09E;\n k += (hx >> 20) - 0x3FF;\n hx = (hx & 0x000FFFFF) + 0x3FE6A09E;\n u = hx << 32 | (u & 0xFFFFFFFF);\n x = reinterpret(u);\n let f = x - 1.0;\n let hfsq = 0.5 * f * f;\n let s = f / (2.0 + f);\n let z = s * s;\n let w = z * z;\n let t1 = w * (Lg2 + w * (Lg4 + w * Lg6));\n let t2 = z * (Lg1 + w * (Lg3 + w * (Lg5 + w * Lg7)));\n let r = t2 + t1;\n let dk = k;\n return s * (hfsq + r) + dk * ln2_lo - hfsq + f + dk * ln2_hi;\n }\n }\n\n export function log10(x: f64): f64 { // see: musl/src/math/log10.c and SUN COPYRIGHT NOTICE above\n const\n ivln10hi = reinterpret(0x3FDBCB7B15200000), // 4.34294481878168880939e-01\n ivln10lo = reinterpret(0x3DBB9438CA9AADD5), // 2.50829467116452752298e-11\n log10_2hi = reinterpret(0x3FD34413509F6000), // 3.01029995663611771306e-01\n log10_2lo = reinterpret(0x3D59FEF311F12B36), // 3.69423907715893078616e-13\n Lg1 = reinterpret(0x3FE5555555555593), // 6.666666666666735130e-01\n Lg2 = reinterpret(0x3FD999999997FA04), // 3.999999999940941908e-01\n Lg3 = reinterpret(0x3FD2492494229359), // 2.857142874366239149e-01\n Lg4 = reinterpret(0x3FCC71C51D8E78AF), // 2.222219843214978396e-01\n Lg5 = reinterpret(0x3FC7466496CB03DE), // 1.818357216161805012e-01\n Lg6 = reinterpret(0x3FC39A09D078C69F), // 1.531383769920937332e-01\n Lg7 = reinterpret(0x3FC2F112DF3E5244), // 1.479819860511658591e-01\n Ox1p54 = reinterpret(0x4350000000000000); // 0x1p54\n\n var u = reinterpret(x);\n var hx = (u >> 32);\n var k = 0;\n if (hx < 0x00100000 || (hx >> 31)) {\n if (u << 1 == 0) return -1 / (x * x);\n if (hx >> 31) return (x - x) / 0.0;\n k -= 54;\n x *= Ox1p54;\n u = reinterpret(x);\n hx = (u >> 32);\n } else if (hx >= 0x7FF00000) {\n return x;\n } else if (hx == 0x3FF00000 && u << 32 == 0) {\n return 0;\n }\n hx += 0x3FF00000 - 0x3FE6A09E;\n k += (hx >> 20) - 0x3FF;\n hx = (hx & 0x000FFFFF) + 0x3FE6A09E;\n u = hx << 32 | (u & 0xFFFFFFFF);\n x = reinterpret(u);\n var f = x - 1.0;\n var hfsq = 0.5 * f * f;\n var s = f / (2.0 + f);\n var z = s * s;\n var w = z * z;\n var t1 = w * (Lg2 + w * (Lg4 + w * Lg6));\n var t2 = z * (Lg1 + w * (Lg3 + w * (Lg5 + w * Lg7)));\n var r = t2 + t1;\n var hi = f - hfsq;\n u = reinterpret(hi);\n u &= 0xFFFFFFFF00000000;\n hi = reinterpret(u);\n var lo = f - hi - hfsq + s * (hfsq + r);\n var val_hi = hi * ivln10hi;\n var dk = k;\n var y = dk * log10_2hi;\n var val_lo = dk * log10_2lo + (lo + hi) * ivln10lo + lo * ivln10hi;\n w = y + val_hi;\n val_lo += (y - w) + val_hi;\n return val_lo + w;\n }\n\n export function log1p(x: f64): f64 { // see: musl/src/math/log1p.c and SUN COPYRIGHT NOTICE above\n const\n ln2_hi = reinterpret(0x3FE62E42FEE00000), // 6.93147180369123816490e-01\n ln2_lo = reinterpret(0x3DEA39EF35793C76), // 1.90821492927058770002e-10\n Lg1 = reinterpret(0x3FE5555555555593), // 6.666666666666735130e-01\n Lg2 = reinterpret(0x3FD999999997FA04), // 3.999999999940941908e-01\n Lg3 = reinterpret(0x3FD2492494229359), // 2.857142874366239149e-01\n Lg4 = reinterpret(0x3FCC71C51D8E78AF), // 2.222219843214978396e-01\n Lg5 = reinterpret(0x3FC7466496CB03DE), // 1.818357216161805012e-01\n Lg6 = reinterpret(0x3FC39A09D078C69F), // 1.531383769920937332e-01\n Lg7 = reinterpret(0x3FC2F112DF3E5244); // 1.479819860511658591e-01\n\n var u = reinterpret(x);\n var hx = (u >> 32);\n var k = 1;\n var c = 0.0, f = 0.0;\n if (hx < 0x3FDA827A || (hx >> 31)) {\n if (hx >= 0xBFF00000) {\n if (x == -1) return x / 0.0;\n return (x - x) / 0.0;\n }\n if (hx << 1 < 0x3CA00000 << 1) return x;\n if (hx <= 0xBFD2BEC4) {\n k = 0;\n c = 0;\n f = x;\n }\n } else if (hx >= 0x7FF00000) return x;\n if (k) {\n u = reinterpret(1 + x);\n let hu = (u >> 32);\n hu += 0x3FF00000 - 0x3FE6A09E;\n k = (hu >> 20) - 0x3FF;\n if (k < 54) {\n let uf = reinterpret(u);\n c = k >= 2 ? 1 - (uf - x) : x - (uf - 1);\n c /= uf;\n } else c = 0;\n hu = (hu & 0x000FFFFF) + 0x3FE6A09E;\n u = hu << 32 | (u & 0xFFFFFFFF);\n f = reinterpret(u) - 1;\n }\n var hfsq = 0.5 * f * f;\n var s = f / (2.0 + f);\n var z = s * s;\n var w = z * z;\n var t1 = w * (Lg2 + w * (Lg4 + w * Lg6));\n var t2 = z * (Lg1 + w * (Lg3 + w * (Lg5 + w * Lg7)));\n var r = t2 + t1;\n var dk = k;\n return s * (hfsq + r) + (dk * ln2_lo + c) - hfsq + f + dk * ln2_hi;\n }\n\n export function log2(x: f64): f64 { // see: musl/src/math/log2.c and SUN COPYRIGHT NOTICE above\n if (ASC_SHRINK_LEVEL < 1) {\n return log2_lut(x);\n } else {\n const\n ivln2hi = reinterpret(0x3FF7154765200000), // 1.44269504072144627571e+00\n ivln2lo = reinterpret(0x3DE705FC2EEFA200), // 1.67517131648865118353e-10\n Lg1 = reinterpret(0x3FE5555555555593), // 6.666666666666735130e-01\n Lg2 = reinterpret(0x3FD999999997FA04), // 3.999999999940941908e-01\n Lg3 = reinterpret(0x3FD2492494229359), // 2.857142874366239149e-01\n Lg4 = reinterpret(0x3FCC71C51D8E78AF), // 2.222219843214978396e-01\n Lg5 = reinterpret(0x3FC7466496CB03DE), // 1.818357216161805012e-01\n Lg6 = reinterpret(0x3FC39A09D078C69F), // 1.531383769920937332e-01\n Lg7 = reinterpret(0x3FC2F112DF3E5244), // 1.479819860511658591e-01\n Ox1p54 = reinterpret(0x4350000000000000); // 1p54\n\n let u = reinterpret(x);\n let hx = (u >> 32);\n let k = 0;\n if (hx < 0x00100000 || (hx >> 31)) {\n if (u << 1 == 0) return -1 / (x * x);\n if (hx >> 31) return (x - x) / 0.0;\n k -= 54;\n x *= Ox1p54;\n u = reinterpret(x);\n hx = (u >> 32);\n } else if (hx >= 0x7FF00000) {\n return x;\n } else if (hx == 0x3FF00000 && u << 32 == 0) {\n return 0;\n }\n hx += 0x3FF00000 - 0x3FE6A09E;\n k += (hx >> 20) - 0x3FF;\n hx = (hx & 0x000FFFFF) + 0x3FE6A09E;\n u = hx << 32 | (u & 0xFFFFFFFF);\n x = reinterpret(u);\n let f = x - 1.0;\n let hfsq = 0.5 * f * f;\n let s = f / (2.0 + f);\n let z = s * s;\n let w = z * z;\n let t1 = w * (Lg2 + w * (Lg4 + w * Lg6));\n let t2 = z * (Lg1 + w * (Lg3 + w * (Lg5 + w * Lg7)));\n let r = t2 + t1;\n let hi = f - hfsq;\n u = reinterpret(hi);\n u &= 0xFFFFFFFF00000000;\n hi = reinterpret(u);\n let lo = f - hi - hfsq + s * (hfsq + r);\n let val_hi = hi * ivln2hi;\n let val_lo = (lo + hi) * ivln2lo + lo * ivln2hi;\n let y = k;\n w = y + val_hi;\n val_lo += (y - w) + val_hi;\n val_hi = w;\n return val_lo + val_hi;\n }\n }\n\n // @ts-ignore: decorator\n @inline\n export function max(value1: f64, value2: f64): f64 {\n return builtin_max(value1, value2);\n }\n\n // @ts-ignore: decorator\n @inline\n export function min(value1: f64, value2: f64): f64 {\n return builtin_min(value1, value2);\n }\n\n export function pow(x: f64, y: f64): f64 { // see: musl/src/math/pow.c and SUN COPYRIGHT NOTICE above\n // TODO: remove this fast pathes after introduced own mid-end IR with \"stdlib call simplify\" transforms\n if (builtin_abs(y) <= 2) {\n if (y == 2.0) return x * x;\n if (y == 0.5) {\n return select(\n builtin_abs(builtin_sqrt(x)),\n Infinity,\n x != -Infinity\n );\n }\n if (y == -1.0) return 1 / x;\n if (y == 1.0) return x;\n if (y == 0.0) return 1.0;\n }\n if (ASC_SHRINK_LEVEL < 1) {\n return pow_lut(x, y);\n } else {\n const\n dp_h1 = reinterpret(0x3FE2B80340000000), // 5.84962487220764160156e-01\n dp_l1 = reinterpret(0x3E4CFDEB43CFD006), // 1.35003920212974897128e-08\n two53 = reinterpret(0x4340000000000000), // 9007199254740992.0\n huge = reinterpret(0x7E37E43C8800759C), // 1e+300\n tiny = reinterpret(0x01A56E1FC2F8F359), // 1e-300\n L1 = reinterpret(0x3FE3333333333303), // 5.99999999999994648725e-01\n L2 = reinterpret(0x3FDB6DB6DB6FABFF), // 4.28571428578550184252e-01\n L3 = reinterpret(0x3FD55555518F264D), // 3.33333329818377432918e-01\n L4 = reinterpret(0x3FD17460A91D4101), // 2.72728123808534006489e-01\n L5 = reinterpret(0x3FCD864A93C9DB65), // 2.30660745775561754067e-01\n L6 = reinterpret(0x3FCA7E284A454EEF), // 2.06975017800338417784e-01\n P1 = reinterpret(0x3FC555555555553E), // 1.66666666666666019037e-01\n P2 = reinterpret(0xBF66C16C16BEBD93), // -2.77777777770155933842e-03\n P3 = reinterpret(0x3F11566AAF25DE2C), // 6.61375632143793436117e-05\n P4 = reinterpret(0xBEBBBD41C5D26BF1), // -1.65339022054652515390e-06\n P5 = reinterpret(0x3E66376972BEA4D0), // 4.13813679705723846039e-08\n lg2 = reinterpret(0x3FE62E42FEFA39EF), // 6.93147180559945286227e-01\n lg2_h = reinterpret(0x3FE62E4300000000), // 6.93147182464599609375e-01\n lg2_l = reinterpret(0xBE205C610CA86C39), // -1.90465429995776804525e-09\n ovt = reinterpret(0x3C971547652B82FE), // 8.0085662595372944372e-017\n cp = reinterpret(0x3FEEC709DC3A03FD), // 9.61796693925975554329e-01\n cp_h = reinterpret(0x3FEEC709E0000000), // 9.61796700954437255859e-01\n cp_l = reinterpret(0xBE3E2FE0145B01F5), // -7.02846165095275826516e-09\n ivln2 = reinterpret(0x3FF71547652B82FE), // 1.44269504088896338700e+00\n ivln2_h = reinterpret(0x3FF7154760000000), // 1.44269502162933349609e+00\n ivln2_l = reinterpret(0x3E54AE0BF85DDF44), // 1.92596299112661746887e-08\n inv3 = reinterpret(0x3FD5555555555555); // 0.3333333333333333333333\n\n let u_ = reinterpret(x);\n let hx = (u_ >> 32);\n let lx = u_;\n u_ = reinterpret(y);\n let hy = (u_ >> 32);\n let ly = u_;\n let ix = hx & 0x7FFFFFFF;\n let iy = hy & 0x7FFFFFFF;\n if ((iy | ly) == 0) return 1.0; // x**0 = 1, even if x is NaN\n // if (hx == 0x3FF00000 && lx == 0) return 1.0; // C: 1**y = 1, even if y is NaN, JS: NaN\n if ( // NaN if either arg is NaN\n ix > 0x7FF00000 || (ix == 0x7FF00000 && lx != 0) ||\n iy > 0x7FF00000 || (iy == 0x7FF00000 && ly != 0)\n ) return x + y;\n let yisint = 0, k: i32;\n if (hx < 0) {\n if (iy >= 0x43400000) yisint = 2;\n else if (iy >= 0x3FF00000) {\n k = (iy >> 20) - 0x3FF;\n let offset = select(52, 20, k > 20) - k;\n let Ly = select(ly, iy, k > 20);\n let jj = Ly >> offset;\n if ((jj << offset) == Ly) yisint = 2 - (jj & 1);\n }\n }\n if (ly == 0) {\n if (iy == 0x7FF00000) { // y is +-inf\n if (((ix - 0x3FF00000) | lx) == 0) return NaN; // C: (-1)**+-inf is 1, JS: NaN\n else if (ix >= 0x3FF00000) return hy >= 0 ? y : 0.0; // (|x|>1)**+-inf = inf,0\n else return hy >= 0 ? 0.0 : -y; // (|x|<1)**+-inf = 0,inf\n }\n if (iy == 0x3FF00000) {\n if (hy >= 0) return x;\n return 1 / x;\n }\n if (hy == 0x40000000) return x * x;\n if (hy == 0x3FE00000) {\n if (hx >= 0) return builtin_sqrt(x);\n }\n }\n let ax = builtin_abs(x), z: f64;\n if (lx == 0) {\n if (ix == 0 || ix == 0x7FF00000 || ix == 0x3FF00000) {\n z = ax;\n if (hy < 0) z = 1.0 / z;\n if (hx < 0) {\n if (((ix - 0x3FF00000) | yisint) == 0) {\n let d = z - z;\n z = d / d;\n } else if (yisint == 1) z = -z;\n }\n return z;\n }\n }\n let s = 1.0;\n if (hx < 0) {\n if (yisint == 0) {\n let d = x - x;\n return d / d;\n }\n if (yisint == 1) s = -1.0;\n }\n let t1: f64, t2: f64, p_h: f64, p_l: f64, r: f64, t: f64, u: f64, v: f64, w: f64;\n let j: i32, n: i32;\n if (iy > 0x41E00000) {\n if (iy > 0x43F00000) {\n if (ix <= 0x3FEFFFFF) return hy < 0 ? huge * huge : tiny * tiny;\n if (ix >= 0x3FF00000) return hy > 0 ? huge * huge : tiny * tiny;\n }\n if (ix < 0x3FEFFFFF) return hy < 0 ? s * huge * huge : s * tiny * tiny;\n if (ix > 0x3FF00000) return hy > 0 ? s * huge * huge : s * tiny * tiny;\n t = ax - 1.0;\n w = (t * t) * (0.5 - t * (inv3 - t * 0.25));\n u = ivln2_h * t;\n v = t * ivln2_l - w * ivln2;\n t1 = u + v;\n t1 = reinterpret(reinterpret(t1) & 0xFFFFFFFF00000000);\n t2 = v - (t1 - u);\n } else {\n let ss: f64, s2: f64, s_h: f64, s_l: f64, t_h: f64, t_l: f64;\n n = 0;\n if (ix < 0x00100000) {\n ax *= two53;\n n -= 53;\n ix = (reinterpret(ax) >> 32);\n }\n n += (ix >> 20) - 0x3FF;\n j = ix & 0x000FFFFF;\n ix = j | 0x3FF00000;\n if (j <= 0x3988E) k = 0;\n else if (j < 0xBB67A) k = 1;\n else {\n k = 0;\n n += 1;\n ix -= 0x00100000;\n }\n ax = reinterpret(reinterpret(ax) & 0xFFFFFFFF | (ix << 32));\n let bp = select(1.5, 1.0, k); // k ? 1.5 : 1.0\n u = ax - bp;\n v = 1.0 / (ax + bp);\n ss = u * v;\n s_h = ss;\n s_h = reinterpret(reinterpret(s_h) & 0xFFFFFFFF00000000);\n t_h = reinterpret((((ix >> 1) | 0x20000000) + 0x00080000 + (k << 18)) << 32);\n t_l = ax - (t_h - bp);\n s_l = v * ((u - s_h * t_h) - s_h * t_l);\n s2 = ss * ss;\n r = s2 * s2 * (L1 + s2 * (L2 + s2 * (L3 + s2 * (L4 + s2 * (L5 + s2 * L6)))));\n r += s_l * (s_h + ss);\n s2 = s_h * s_h;\n t_h = 3.0 + s2 + r;\n t_h = reinterpret(reinterpret(t_h) & 0xFFFFFFFF00000000);\n t_l = r - ((t_h - 3.0) - s2);\n u = s_h * t_h;\n v = s_l * t_h + t_l * ss;\n p_h = u + v;\n p_h = reinterpret(reinterpret(p_h) & 0xFFFFFFFF00000000);\n p_l = v - (p_h - u);\n let z_h = cp_h * p_h;\n let dp_l = select(dp_l1, 0.0, k);\n let z_l = cp_l * p_h + p_l * cp + dp_l;\n t = n;\n let dp_h = select(dp_h1, 0.0, k);\n t1 = ((z_h + z_l) + dp_h) + t;\n t1 = reinterpret(reinterpret(t1) & 0xFFFFFFFF00000000);\n t2 = z_l - (((t1 - t) - dp_h) - z_h);\n }\n let y1 = y;\n y1 = reinterpret(reinterpret(y1) & 0xFFFFFFFF00000000);\n p_l = (y - y1) * t1 + y * t2;\n p_h = y1 * t1;\n z = p_l + p_h;\n u_ = reinterpret(z);\n j = (u_ >> 32);\n let i = u_;\n if (j >= 0x40900000) {\n if (((j - 0x40900000) | i) != 0) return s * huge * huge;\n if (p_l + ovt > z - p_h) return s * huge * huge;\n } else if ((j & 0x7FFFFFFF) >= 0x4090CC00) {\n if (((j - 0xC090CC00) | i) != 0) return s * tiny * tiny;\n if (p_l <= z - p_h) return s * tiny * tiny;\n }\n i = j & 0x7FFFFFFF;\n k = (i >> 20) - 0x3FF;\n n = 0;\n if (i > 0x3FE00000) {\n n = j + (0x00100000 >> (k + 1));\n k = ((n & 0x7FFFFFFF) >> 20) - 0x3FF;\n t = 0.0;\n t = reinterpret((n & ~(0x000FFFFF >> k)) << 32);\n n = ((n & 0x000FFFFF) | 0x00100000) >> (20 - k);\n if (j < 0) n = -n;\n p_h -= t;\n }\n t = p_l + p_h;\n t = reinterpret(reinterpret(t) & 0xFFFFFFFF00000000);\n u = t * lg2_h;\n v = (p_l - (t - p_h)) * lg2 + t * lg2_l;\n z = u + v;\n w = v - (z - u);\n t = z * z;\n t1 = z - t * (P1 + t * (P2 + t * (P3 + t * (P4 + t * P5))));\n r = (z * t1) / (t1 - 2.0) - (w + z * w);\n z = 1.0 - (r - z);\n j = (reinterpret(z) >> 32);\n j += n << 20;\n if ((j >> 20) <= 0) z = scalbn(z, n);\n else z = reinterpret(reinterpret(z) & 0xFFFFFFFF | (j << 32));\n return s * z;\n }\n }\n\n export function seedRandom(value: i64): void {\n // Instead zero seed use golden ratio:\n // phi = (1 + sqrt(5)) / 2\n // trunc(2^64 / phi) = 0x9e3779b97f4a7c15\n if (value == 0) value = 0x9e3779b97f4a7c15;\n random_state0_64 = murmurHash3(value);\n random_state1_64 = murmurHash3(~random_state0_64);\n random_state0_32 = splitMix32(value);\n random_state1_32 = splitMix32(random_state0_32);\n random_seeded = true;\n }\n\n export function random(): f64 { // see: v8/src/base/utils/random-number-generator.cc\n if (!random_seeded) seedRandom(reinterpret(seed()));\n var s1 = random_state0_64;\n var s0 = random_state1_64;\n random_state0_64 = s0;\n s1 ^= s1 << 23;\n s1 ^= s1 >> 17;\n s1 ^= s0;\n s1 ^= s0 >> 26;\n random_state1_64 = s1;\n var r = (s0 >> 12) | 0x3FF0000000000000;\n return reinterpret(r) - 1;\n }\n\n // @ts-ignore: decorator\n @inline\n export function round(x: f64): f64 {\n let roundUp = builtin_ceil(x);\n return select(roundUp, roundUp - 1.0, roundUp - 0.5 <= x);\n }\n\n // @ts-ignore: decorator\n @inline\n export function sign(x: f64): f64 {\n if (ASC_SHRINK_LEVEL > 0) {\n return builtin_abs(x) > 0 ? builtin_copysign(1, x) : x;\n } else {\n return x > 0 ? 1 : x < 0 ? -1 : x;\n }\n }\n\n // @ts-ignore: decorator\n @inline\n export function signbit(x: f64): bool {\n return (reinterpret(x) >>> 63);\n }\n\n export function sin(x: f64): f64 { // see: musl/src/math/sin.c\n var u = reinterpret(x);\n var ix = (u >> 32);\n var sign = ix >> 31;\n\n ix &= 0x7FFFFFFF;\n\n // |x| ~< pi/4\n if (ix <= 0x3FE921FB) {\n if (ix < 0x3E500000) { // |x| < 2**-26\n return x;\n }\n return sin_kern(x, 0.0, 0);\n }\n\n // sin(Inf or NaN) is NaN\n if (ix >= 0x7FF00000) return x - x;\n\n // argument reduction needed\n var n = rempio2(x, u, sign);\n var y0 = rempio2_y0;\n var y1 = rempio2_y1;\n\n x = n & 1 ? cos_kern(y0, y1) : sin_kern(y0, y1, 1);\n return n & 2 ? -x : x;\n }\n\n export function sinh(x: f64): f64 { // see: musl/src/math/sinh.c\n var u = reinterpret(x) & 0x7FFFFFFFFFFFFFFF;\n var a = reinterpret(u);\n var w = (u >> 32);\n var h = builtin_copysign(0.5, x);\n if (w < 0x40862E42) {\n let t = expm1(a);\n if (w < 0x3FF00000) {\n if (w < 0x3FF00000 - (26 << 20)) return x;\n return h * (2 * t - t * t / (t + 1));\n }\n return h * (t + t / (t + 1));\n }\n return expo2(a, 2 * h);\n }\n\n // @ts-ignore: decorator\n @inline\n export function sqrt(x: f64): f64 {\n return builtin_sqrt(x);\n }\n\n export function tan(x: f64): f64 { // see: musl/src/math/tan.c\n var u = reinterpret(x);\n var ix = (u >> 32);\n var sign = ix >>> 31;\n\n ix &= 0x7FFFFFFF;\n\n // |x| ~< pi/4\n if (ix <= 0x3FE921FB) {\n if (ix < 0x3E400000) { // |x| < 2**-27\n return x;\n }\n return tan_kern(x, 0.0, 1);\n }\n\n // tan(Inf or NaN) is NaN\n if (ix >= 0x7FF00000) return x - x;\n\n var n = rempio2(x, u, sign);\n return tan_kern(rempio2_y0, rempio2_y1, 1 - ((n & 1) << 1));\n }\n\n export function tanh(x: f64): f64 { // see: musl/src/math/tanh.c\n var u = reinterpret(x);\n u &= 0x7FFFFFFFFFFFFFFF;\n var y = reinterpret(u);\n var w = (u >> 32);\n var t: f64;\n if (w > 0x3FE193EA) {\n if (w > 0x40340000) {\n t = 1 - 0 / y;\n } else {\n t = expm1(2 * y);\n t = 1 - 2 / (t + 2);\n }\n } else if (w > 0x3FD058AE) {\n t = expm1(2 * y);\n t = t / (t + 2);\n } else if (w >= 0x00100000) {\n t = expm1(-2 * y);\n t = -t / (t + 2);\n } else t = y;\n return builtin_copysign(t, x);\n }\n\n // @ts-ignore: decorator\n @inline\n export function trunc(x: f64): f64 {\n return builtin_trunc(x);\n }\n\n export function scalbn(x: f64, n: i32): f64 { // see: https://git.musl-libc.org/cgit/musl/tree/src/math/scalbn.c\n const\n Ox1p53 = reinterpret(0x4340000000000000),\n Ox1p1023 = reinterpret(0x7FE0000000000000),\n Ox1p_1022 = reinterpret(0x0010000000000000);\n\n var y = x;\n if (n > 1023) {\n y *= Ox1p1023;\n n -= 1023;\n if (n > 1023) {\n y *= Ox1p1023;\n n = builtin_min(n - 1023, 1023);\n }\n } else if (n < -1022) {\n // make sure final n < -53 to avoid double\n // rounding in the subnormal range\n y *= Ox1p_1022 * Ox1p53;\n n += 1022 - 53;\n if (n < -1022) {\n y *= Ox1p_1022 * Ox1p53;\n n = builtin_max(n + 1022 - 53, -1022);\n }\n }\n return y * reinterpret((0x3FF + n) << 52);\n }\n\n export function mod(x: f64, y: f64): f64 { // see: musl/src/math/fmod.c\n if (builtin_abs(y) == 1.0) {\n // x % 1, x % -1 ==> sign(x) * abs(x - 1.0 * trunc(x / 1.0))\n // TODO: move this rule to compiler's optimization pass.\n // It could be apply for any x % C_pot, where \"C_pot\" is pow of two const.\n return builtin_copysign(x - builtin_trunc(x), x);\n }\n var ux = reinterpret(x);\n var uy = reinterpret(y);\n var ex = (ux >> 52 & 0x7FF);\n var ey = (uy >> 52 & 0x7FF);\n var sx = ux >> 63;\n var uy1 = uy << 1;\n if (uy1 == 0 || ex == 0x7FF || isNaN(y)) {\n let m = x * y;\n return m / m;\n }\n var ux1 = ux << 1;\n if (ux1 <= uy1) {\n return x * f64(ux1 != uy1);\n }\n if (!ex) {\n ex -= builtin_clz(ux << 12);\n ux <<= 1 - ex;\n } else {\n ux &= -1 >> 12;\n ux |= 1 << 52;\n }\n if (!ey) {\n ey -= builtin_clz(uy << 12);\n uy <<= 1 - ey;\n } else {\n uy &= -1 >> 12;\n uy |= 1 << 52;\n }\n while (ex > ey) {\n if (ux >= uy) {\n if (ux == uy) return 0 * x;\n ux -= uy;\n }\n ux <<= 1;\n --ex;\n }\n if (ux >= uy) {\n if (ux == uy) return 0 * x;\n ux -= uy;\n }\n // for (; !(ux >> 52); ux <<= 1) --ex;\n var shift = builtin_clz(ux << 11);\n ex -= shift;\n ux <<= shift;\n if (ex > 0) {\n ux -= 1 << 52;\n ux |= ex << 52;\n } else {\n ux >>= -ex + 1;\n }\n return reinterpret(ux | (sx << 63));\n }\n\n export function rem(x: f64, y: f64): f64 { // see: musl/src/math/remquo.c\n var ux = reinterpret(x);\n var uy = reinterpret(y);\n var ex = (ux >> 52 & 0x7FF);\n var ey = (uy >> 52 & 0x7FF);\n var sx = (ux >> 63);\n if (uy << 1 == 0 || ex == 0x7FF || isNaN(y)) {\n let m = x * y;\n return m / m;\n }\n if (ux << 1 == 0) return x;\n var uxi = ux;\n if (!ex) {\n ex -= builtin_clz(uxi << 12);\n uxi <<= 1 - ex;\n } else {\n uxi &= -1 >> 12;\n uxi |= 1 << 52;\n }\n if (!ey) {\n ey -= builtin_clz(uy << 12);\n uy <<= 1 - ey;\n } else {\n uy &= -1 >> 12;\n uy |= 1 << 52;\n }\n var q: u32 = 0;\n do {\n if (ex < ey) {\n if (ex + 1 == ey) break; // goto end\n return x;\n }\n while (ex > ey) {\n if (uxi >= uy) {\n uxi -= uy;\n ++q;\n }\n uxi <<= 1;\n q <<= 1;\n --ex;\n }\n if (uxi >= uy) {\n uxi -= uy;\n ++q;\n }\n if (uxi == 0) ex = -60;\n else {\n let shift = builtin_clz(uxi << 11);\n ex -= shift;\n uxi <<= shift;\n }\n break;\n } while (false);\n // end:\n if (ex > 0) {\n uxi -= 1 << 52;\n uxi |= ex << 52;\n } else {\n uxi >>= -ex + 1;\n }\n x = reinterpret(uxi);\n y = builtin_abs(y);\n var x2 = x + x;\n if (ex == ey || (ex + 1 == ey && (x2 > y || (x2 == y && (q & 1))))) {\n x -= y;\n // ++q;\n }\n return sx ? -x : x;\n }\n\n export function sincos(x: f64): void { // see: musl/tree/src/math/sincos.c\n var u = reinterpret(x);\n var ix = (u >> 32);\n var sign = ix >> 31;\n ix &= 0x7FFFFFFF;\n\n if (ix <= 0x3FE921FB) { // |x| ~<= π/4\n if (ix < 0x3E46A09E) { // if |x| < 2**-27 * sqrt(2)\n sincos_sin = x;\n sincos_cos = 1;\n return;\n }\n sincos_sin = sin_kern(x, 0, 0);\n sincos_cos = cos_kern(x, 0);\n return;\n }\n // sin(Inf or NaN) is NaN\n if (ix >= 0x7F800000) {\n let xx = x - x;\n sincos_sin = xx;\n sincos_cos = xx;\n return;\n }\n // general argument reduction needed\n var n = rempio2(x, u, sign);\n var y0 = rempio2_y0;\n var y1 = rempio2_y1;\n var s = sin_kern(y0, y1, 1);\n var c = cos_kern(y0, y1);\n var sin = s, cos = c;\n if (n & 1) {\n sin = c;\n cos = -s;\n }\n if (n & 2) {\n sin = -sin;\n cos = -cos;\n }\n sincos_sin = sin;\n sincos_cos = cos;\n }\n}\n\n// @ts-ignore: decorator\n@lazy var rempio2f_y: f64;\n\n// @ts-ignore: decorator\n@lazy @inline const PIO2F_TABLE = memory.data([\n 0xA2F9836E4E441529,\n 0xFC2757D1F534DDC0,\n 0xDB6295993C439041,\n 0xFE5163ABDEBBC561\n]);\n\nfunction Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3\n const // see: musl/src/math/asinf.c and SUN COPYRIGHT NOTICE above\n pS0 = reinterpret(0x3E2AAA75), // 1.6666586697e-01f\n pS1 = reinterpret(0xBD2F13BA), // -4.2743422091e-02f\n pS2 = reinterpret(0xBC0DD36B), // -8.6563630030e-03f\n qS1 = reinterpret(0xBF34E5AE); // -7.0662963390e-01f\n\n var p = z * (pS0 + z * (pS1 + z * pS2));\n var q: f32 = 1 + z * qS1;\n return p / q;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction expo2f(x: f32, sign: f32): f32 { // exp(x)/2 for x >= log(DBL_MAX)\n const // see: musl/src/math/__expo2f.c\n k = 235,\n kln2 = reinterpret(0x4322E3BC); // 0x1.45c778p+7f\n var scale = reinterpret((0x7F + (k >> 1)) << 23);\n // in directed rounding correct sign before rounding or overflow is important\n return NativeMathf.exp(x - kln2) * (sign * scale) * scale;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction pio2f_large_quot(x: f32, u: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c\n const coeff = reinterpret(0x3BF921FB54442D18); // π * 0x1p-65 = 8.51530395021638647334e-20\n\n var offset = (u >> 23) - 152;\n var shift = (offset & 63);\n var tblPtr = PIO2F_TABLE + (offset >> 6 << 3);\n\n var b0 = load(tblPtr, 0 << 3);\n var b1 = load(tblPtr, 1 << 3);\n var lo: u64;\n\n if (shift > 32) {\n let b2 = load(tblPtr, 2 << 3);\n lo = b2 >> (96 - shift);\n lo |= b1 << (shift - 32);\n } else {\n lo = b1 >> (32 - shift);\n }\n\n var hi = (b1 >> (64 - shift)) | (b0 << shift);\n var mantissa: u64 = (u & 0x007FFFFF) | 0x00800000;\n var product = mantissa * hi + (mantissa * lo >> 32);\n var r: i64 = product << 2;\n var q = ((product >> 62) + (r >>> 63));\n rempio2f_y = copysign(coeff, x) * r;\n return q;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction rempio2f(x: f32, u: u32, sign: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c\n const\n pi2hi = reinterpret(0x3FF921FB50000000), // 1.57079631090164184570\n pi2lo = reinterpret(0x3E5110B4611A6263), // 1.58932547735281966916e-8\n _2_pi = reinterpret(0x3FE45F306DC9C883); // 0.63661977236758134308\n\n if (u < 0x4DC90FDB) { // π * 0x1p28\n let q = nearest(x * _2_pi);\n rempio2f_y = x - q * pi2hi - q * pi2lo;\n return q;\n }\n\n var q = pio2f_large_quot(x, u);\n return select(-q, q, sign);\n}\n\n// |sin(x)/x - s(x)| < 2**-37.5 (~[-4.89e-12, 4.824e-12]).\n// @ts-ignore: decorator\n@inline\nfunction sin_kernf(x: f64): f32 { // see: musl/tree/src/math/__sindf.c\n const\n S1 = reinterpret(0xBFC5555554CBAC77), // -0x15555554cbac77.0p-55\n S2 = reinterpret(0x3F811110896EFBB2), // 0x111110896efbb2.0p-59\n S3 = reinterpret(0xBF2A00F9E2CAE774), // -0x1a00f9e2cae774.0p-65\n S4 = reinterpret(0x3EC6CD878C3B46A7); // 0x16cd878c3b46a7.0p-71\n\n var z = x * x;\n var w = z * z;\n var r = S3 + z * S4;\n var s = z * x;\n return ((x + s * (S1 + z * S2)) + s * w * r);\n}\n\n// |cos(x) - c(x)| < 2**-34.1 (~[-5.37e-11, 5.295e-11]).\n// @ts-ignore: decorator\n@inline\nfunction cos_kernf(x: f64): f32 { // see: musl/tree/src/math/__cosdf.c\n const\n C0 = reinterpret(0xBFDFFFFFFD0C5E81), // -0x1ffffffd0c5e81.0p-54\n C1 = reinterpret(0x3FA55553E1053A42), // 0x155553e1053a42.0p-57\n C2 = reinterpret(0xBF56C087E80F1E27), // -0x16c087e80f1e27.0p-62\n C3 = reinterpret(0x3EF99342E0EE5069); // 0x199342e0ee5069.0p-68\n\n var z = x * x;\n var w = z * z;\n var r = C2 + z * C3;\n return (((1 + z * C0) + w * C1) + (w * z) * r);\n}\n\n// |tan(x)/x - t(x)| < 2**-25.5 (~[-2e-08, 2e-08]).\n// @ts-ignore: decorator\n@inline\nfunction tan_kernf(x: f64, odd: i32): f32 { // see: musl/tree/src/math/__tandf.c\n const\n T0 = reinterpret(0x3FD5554D3418C99F), // 0x15554d3418c99f.0p-54\n T1 = reinterpret(0x3FC112FD38999F72), // 0x1112fd38999f72.0p-55\n T2 = reinterpret(0x3FAB54C91D865AFE), // 0x1b54c91d865afe.0p-57\n T3 = reinterpret(0x3F991DF3908C33CE), // 0x191df3908c33ce.0p-58\n T4 = reinterpret(0x3F685DADFCECF44E), // 0x185dadfcecf44e.0p-61\n T5 = reinterpret(0x3F8362B9BF971BCD); // 0x1362b9bf971bcd.0p-59\n\n var z = x * x;\n var r = T4 + z * T5;\n var t = T2 + z * T3;\n var w = z * z;\n var s = z * x;\n var u = T0 + z * T1;\n\n r = (x + s * u) + (s * w) * (t + w * r);\n return (odd ? -1 / r : r);\n}\n\n// See: jdh8/metallic/src/math/float/log2f.c and jdh8/metallic/src/math/float/kernel/atanh.h\n// @ts-ignore: decorator\n@inline\nfunction log2f(x: f64): f64 {\n const\n log2e = reinterpret(0x3FF71547652B82FE), // 1.44269504088896340736\n c0 = reinterpret(0x3FD555554FD9CAEF), // 0.33333332822728226129\n c1 = reinterpret(0x3FC999A7A8AF4132), // 0.20000167595436263505\n c2 = reinterpret(0x3FC2438D79437030), // 0.14268654271188685375\n c3 = reinterpret(0x3FBE2F663B001C97); // 0.11791075649681414150\n\n var i = reinterpret(x);\n var exponent = (i - 0x3FE6A09E667F3BCD) >> 52;\n x = reinterpret(i - (exponent << 52));\n x = (x - 1) / (x + 1);\n var xx = x * x;\n var y = x + x * xx * (c0 + c1 * xx + (c2 + c3 * xx) * (xx * xx));\n return (2 * log2e) * y + exponent;\n}\n\n// See: jdh8/metallic/src/math/float/exp2f.h and jdh8/metallic/blob/master/src/math/float/kernel/exp2f.h\n// @ts-ignore: decorator\n@inline\nfunction exp2f(x: f64): f64 {\n const\n c0 = reinterpret(0x3FE62E4302FCC24A), // 6.931471880289532425e-1\n c1 = reinterpret(0x3FCEBFBE07D97B91), // 2.402265108421173406e-1\n c2 = reinterpret(0x3FAC6AF6CCFC1A65), // 5.550357105498874537e-2\n c3 = reinterpret(0x3F83B29E3CE9AEF6), // 9.618030771171497658e-3\n c4 = reinterpret(0x3F55F0896145A89F), // 1.339086685300950937e-3\n c5 = reinterpret(0x3F2446C81E384864); // 1.546973499989028719e-4\n\n if (x < -1022) return 0;\n if (x >= 1024) return Infinity;\n\n var n = nearest(x);\n x -= n;\n var xx = x * x;\n var y = 1 + x * (c0 + c1 * x + (c2 + c3 * x) * xx + (c4 + c5 * x) * (xx * xx));\n return reinterpret(reinterpret(y) + (n << 52));\n}\n\nexport namespace NativeMathf {\n\n // @ts-ignore: decorator\n @lazy\n export const E = NativeMath.E;\n\n // @ts-ignore: decorator\n @lazy\n export const LN2 = NativeMath.LN2;\n\n // @ts-ignore: decorator\n @lazy\n export const LN10 = NativeMath.LN10;\n\n // @ts-ignore: decorator\n @lazy\n export const LOG2E = NativeMath.LOG2E;\n\n // @ts-ignore: decorator\n @lazy\n export const LOG10E = NativeMath.LOG10E;\n\n // @ts-ignore: decorator\n @lazy\n export const PI = NativeMath.PI;\n\n // @ts-ignore: decorator\n @lazy\n export const SQRT1_2 = NativeMath.SQRT1_2;\n\n // @ts-ignore: decorator\n @lazy\n export const SQRT2 = NativeMath.SQRT2;\n\n // @ts-ignore: decorator\n @lazy\n export var sincos_sin: f32 = 0;\n\n // @ts-ignore: decorator\n @lazy\n export var sincos_cos: f32 = 0;\n\n // @ts-ignore: decorator\n @inline\n export function abs(x: f32): f32 {\n return builtin_abs(x);\n }\n\n export function acos(x: f32): f32 { // see: musl/src/math/acosf.c and SUN COPYRIGHT NOTICE above\n const\n pio2_hi = reinterpret(0x3FC90FDA), // 1.5707962513e+00f\n pio2_lo = reinterpret(0x33A22168), // 7.5497894159e-08f\n Ox1p_120f = reinterpret(0x03800000); // 0x1p-120f\n\n var hx = reinterpret(x);\n var ix = hx & 0x7FFFFFFF;\n if (ix >= 0x3F800000) {\n if (ix == 0x3F800000) {\n if (hx >> 31) return 2 * pio2_hi + Ox1p_120f;\n return 0;\n }\n return 0 / (x - x);\n }\n if (ix < 0x3F000000) {\n if (ix <= 0x32800000) return pio2_hi + Ox1p_120f;\n return pio2_hi - (x - (pio2_lo - x * Rf(x * x)));\n }\n var z: f32, w: f32, s: f32;\n if (hx >> 31) {\n // z = (1 + x) * 0.5;\n z = 0.5 + x * 0.5;\n s = builtin_sqrt(z);\n w = Rf(z) * s - pio2_lo;\n return 2 * (pio2_hi - (s + w));\n }\n // z = (1 - x) * 0.5;\n z = 0.5 - x * 0.5;\n s = builtin_sqrt(z);\n hx = reinterpret(s);\n var df = reinterpret(hx & 0xFFFFF000);\n var c = (z - df * df) / (s + df);\n w = Rf(z) * s + c;\n return 2 * (df + w);\n }\n\n export function acosh(x: f32): f32 { // see: musl/src/math/acoshf.c\n const s = reinterpret(0x3F317218); // 0.693147180559945309417232121458176568f\n var u = reinterpret(x);\n var a = u & 0x7FFFFFFF;\n if (a < 0x3F800000 + (1 << 23)) { // |x| < 2, invalid if x < 1\n let xm1 = x - 1;\n return log1p(xm1 + builtin_sqrt(xm1 * (xm1 + 2)));\n }\n if (u < 0x3F800000 + (12 << 23)) { // 2 <= x < 0x1p12\n return log(2 * x - 1 / (x + builtin_sqrt(x * x - 1)));\n }\n // x >= 0x1p12 or x <= -2 or NaN\n return log(x) + s;\n }\n\n export function asin(x: f32): f32 { // see: musl/src/math/asinf.c and SUN COPYRIGHT NOTICE above\n const\n pio2 = reinterpret(0x3FC90FDB), // 1.570796326794896558e+00f\n Ox1p_120f = reinterpret(0x03800000); // 0x1p-120f\n\n var sx = x;\n var hx = reinterpret(x) & 0x7FFFFFFF;\n if (hx >= 0x3F800000) {\n if (hx == 0x3F800000) return x * pio2 + Ox1p_120f;\n return 0 / (x - x);\n }\n if (hx < 0x3F000000) {\n if (hx < 0x39800000 && hx >= 0x00800000) return x;\n return x + x * Rf(x * x);\n }\n // var z: f32 = (1 - builtin_abs(x)) * 0.5;\n var z: f32 = 0.5 - builtin_abs(x) * 0.5;\n var s = builtin_sqrt(z); // sic\n x = (pio2 - 2 * (s + s * Rf(z)));\n return builtin_copysign(x, sx);\n }\n\n export function asinh(x: f32): f32 { // see: musl/src/math/asinhf.c\n const c = reinterpret(0x3F317218); // 0.693147180559945309417232121458176568f\n var u = reinterpret(x) & 0x7FFFFFFF;\n var y = reinterpret(u);\n if (u >= 0x3F800000 + (12 << 23)) y = log(y) + c;\n else if (u >= 0x3F800000 + (1 << 23)) y = log(2 * y + 1 / (builtin_sqrt(y * y + 1) + y));\n else if (u >= 0x3F800000 - (12 << 23)) y = log1p(y + y * y / (builtin_sqrt(y * y + 1) + 1));\n return builtin_copysign(y, x);\n }\n\n export function atan(x: f32): f32 { // see: musl/src/math/atanf.c and SUN COPYRIGHT NOTICE above\n const\n atanhi0 = reinterpret(0x3EED6338), // 4.6364760399e-01f\n atanhi1 = reinterpret(0x3F490FDA), // 7.8539812565e-01f\n atanhi2 = reinterpret(0x3F7B985E), // 9.8279368877e-01f\n atanhi3 = reinterpret(0x3FC90FDA), // 1.5707962513e+00f\n atanlo0 = reinterpret(0x31AC3769), // 5.0121582440e-09f\n atanlo1 = reinterpret(0x33222168), // 3.7748947079e-08f\n atanlo2 = reinterpret(0x33140FB4), // 3.4473217170e-08f\n atanlo3 = reinterpret(0x33A22168), // 7.5497894159e-08f\n aT0 = reinterpret(0x3EAAAAA9), // 3.3333328366e-01f\n aT1 = reinterpret(0xBE4CCA98), // -1.9999158382e-01f\n aT2 = reinterpret(0x3E11F50D), // 1.4253635705e-01f\n aT3 = reinterpret(0xBDDA1247), // -1.0648017377e-01f\n aT4 = reinterpret(0x3D7CAC25), // 6.1687607318e-02f\n Ox1p_120f = reinterpret(0x03800000); // 0x1p-120f\n\n var ix = reinterpret(x);\n var sx = x;\n ix &= 0x7FFFFFFF;\n var z: f32;\n if (ix >= 0x4C800000) {\n if (isNaN(x)) return x;\n z = atanhi3 + Ox1p_120f;\n return builtin_copysign(z, sx);\n }\n var id: i32;\n if (ix < 0x3EE00000) {\n if (ix < 0x39800000) return x;\n id = -1;\n } else {\n x = builtin_abs(x);\n if (ix < 0x3F980000) {\n if (ix < 0x3F300000) {\n id = 0;\n x = (2.0 * x - 1.0) / (2.0 + x);\n } else {\n id = 1;\n x = (x - 1.0) / (x + 1.0);\n }\n } else {\n if (ix < 0x401C0000) {\n id = 2;\n x = (x - 1.5) / (1.0 + 1.5 * x);\n } else {\n id = 3;\n x = -1.0 / x;\n }\n }\n }\n z = x * x;\n var w = z * z;\n var s1 = z * (aT0 + w * (aT2 + w * aT4));\n var s2 = w * (aT1 + w * aT3);\n var s3 = x * (s1 + s2);\n if (id < 0) return x - s3;\n switch (id) {\n case 0: { z = atanhi0 - ((s3 - atanlo0) - x); break; }\n case 1: { z = atanhi1 - ((s3 - atanlo1) - x); break; }\n case 2: { z = atanhi2 - ((s3 - atanlo2) - x); break; }\n case 3: { z = atanhi3 - ((s3 - atanlo3) - x); break; }\n default: unreachable();\n }\n return builtin_copysign(z, sx);\n }\n\n export function atanh(x: f32): f32 { // see: musl/src/math/atanhf.c\n var u = reinterpret(x);\n var y = builtin_abs(x);\n if (u < 0x3F800000 - (1 << 23)) {\n if (u >= 0x3F800000 - (32 << 23)) y = 0.5 * log1p(2 * y * (1.0 + y / (1 - y)));\n } else y = 0.5 * log1p(2 * (y / (1 - y)));\n return builtin_copysign(y, x);\n }\n\n export function atan2(y: f32, x: f32): f32 { // see: musl/src/math/atan2f.c and SUN COPYRIGHT NOTICE above\n const\n pi = reinterpret(0x40490FDB), // 3.1415927410e+00f\n pi_lo = reinterpret(0xB3BBBD2E); // -8.7422776573e-08f\n\n if (isNaN(x) || isNaN(y)) return x + y;\n var ix = reinterpret(x);\n var iy = reinterpret(y);\n if (ix == 0x3F800000) return atan(y);\n var m = (((iy >> 31) & 1) | ((ix >> 30) & 2));\n ix &= 0x7FFFFFFF;\n iy &= 0x7FFFFFFF;\n if (iy == 0) {\n switch (m) {\n case 0:\n case 1: return y;\n case 2: return pi;\n case 3: return -pi;\n }\n }\n if (ix == 0) return m & 1 ? -pi / 2 : pi / 2;\n if (ix == 0x7F800000) {\n if (iy == 0x7F800000) {\n let t: f32 = m & 2 ? 3 * pi / 4 : pi / 4;\n return m & 1 ? -t : t;\n } else {\n let t: f32 = m & 2 ? pi : 0.0;\n return m & 1 ? -t : t;\n }\n }\n if (ix + (26 << 23) < iy || iy == 0x7F800000) return m & 1 ? -pi / 2 : pi / 2;\n var z: f32;\n if ((m & 2) && iy + (26 << 23) < ix) z = 0.0;\n else z = atan(builtin_abs(y / x));\n switch (m) {\n case 0: return z;\n case 1: return -z;\n case 2: return pi - (z - pi_lo);\n case 3: return (z - pi_lo) - pi;\n }\n unreachable();\n return 0;\n }\n\n export function cbrt(x: f32): f32 { // see: musl/src/math/cbrtf.c and SUN COPYRIGHT NOTICE above\n const\n B1 = 709958130,\n B2 = 642849266,\n Ox1p24f = reinterpret(0x4B800000);\n\n var u = reinterpret(x);\n var hx = u & 0x7FFFFFFF;\n if (hx >= 0x7F800000) return x + x;\n if (hx < 0x00800000) {\n if (hx == 0) return x;\n u = reinterpret(x * Ox1p24f);\n hx = u & 0x7FFFFFFF;\n hx = hx / 3 + B2;\n } else {\n hx = hx / 3 + B1;\n }\n u &= 0x80000000;\n u |= hx;\n var t = reinterpret(u);\n var r = t * t * t;\n t = t * (x + x + r) / (x + r + r);\n r = t * t * t;\n t = t * (x + x + r) / (x + r + r);\n return t;\n }\n\n // @ts-ignore: decorator\n @inline\n export function ceil(x: f32): f32 {\n return builtin_ceil(x);\n }\n\n export function clz32(x: f32): f32 {\n if (!isFinite(x)) return 32;\n return builtin_clz(dtoi32(x));\n }\n\n export function cos(x: f32): f32 { // see: musl/src/math/cosf.c\n const\n c1pio2 = reinterpret(0x3FF921FB54442D18), // M_PI_2 * 1\n c2pio2 = reinterpret(0x400921FB54442D18), // M_PI_2 * 2\n c3pio2 = reinterpret(0x4012D97C7F3321D2), // M_PI_2 * 3\n c4pio2 = reinterpret(0x401921FB54442D18); // M_PI_2 * 4\n\n var ix = reinterpret(x);\n var sign = ix >> 31;\n ix &= 0x7FFFFFFF;\n\n if (ix <= 0x3F490FDA) { // |x| ~<= π/4\n if (ix < 0x39800000) { // |x| < 2**-12\n // raise inexact if x != 0\n return 1;\n }\n return cos_kernf(x);\n }\n\n if (ASC_SHRINK_LEVEL < 1) {\n if (ix <= 0x407B53D1) { // |x| ~<= 5π/4\n if (ix > 0x4016CBE3) { // |x| ~> 3π/4\n return -cos_kernf(sign ? x + c2pio2 : x - c2pio2);\n } else {\n return sign ? sin_kernf(x + c1pio2) : sin_kernf(c1pio2 - x);\n }\n }\n if (ix <= 0x40E231D5) { // |x| ~<= 9π/4\n if (ix > 0x40AFEDDF) { // |x| ~> 7π/4\n return cos_kernf(sign ? x + c4pio2 : x - c4pio2);\n } else {\n return sign ? sin_kernf(-x - c3pio2) : sin_kernf(x - c3pio2);\n }\n }\n }\n\n // cos(Inf or NaN) is NaN\n if (ix >= 0x7F800000) return x - x;\n\n // general argument reduction needed\n var n = rempio2f(x, ix, sign);\n var y = rempio2f_y;\n\n var t = n & 1 ? sin_kernf(y) : cos_kernf(y);\n return (n + 1) & 2 ? -t : t;\n }\n\n export function cosh(x: f32): f32 { // see: musl/src/math/coshf.c\n var u = reinterpret(x);\n u &= 0x7FFFFFFF;\n x = reinterpret(u);\n if (u < 0x3F317217) {\n if (u < 0x3F800000 - (12 << 23)) return 1;\n let t = expm1(x);\n // return 1 + t * t / (2 * (1 + t));\n return 1 + t * t / (2 + 2 * t);\n }\n if (u < 0x42B17217) {\n let t = exp(x);\n // return 0.5 * (t + 1 / t);\n return 0.5 * t + 0.5 / t;\n }\n return expo2f(x, 1);\n }\n\n // @ts-ignore: decorator\n @inline\n export function floor(x: f32): f32 {\n return builtin_floor(x);\n }\n\n export function exp(x: f32): f32 { // see: musl/src/math/expf.c and SUN COPYRIGHT NOTICE above\n if (ASC_SHRINK_LEVEL < 1) {\n return expf_lut(x);\n } else {\n const\n ln2hi = reinterpret(0x3F317200), // 6.9314575195e-1f\n ln2lo = reinterpret(0x35BFBE8E), // 1.4286067653e-6f\n invln2 = reinterpret(0x3FB8AA3B), // 1.4426950216e+0f\n P1 = reinterpret(0x3E2AAA8F), // 1.6666625440e-1f\n P2 = reinterpret(0xBB355215), // -2.7667332906e-3f\n Ox1p127f = reinterpret(0x7F000000); // 0x1p+127f\n\n let hx = reinterpret(x);\n let sign_ = (hx >> 31);\n hx &= 0x7FFFFFFF;\n if (hx >= 0x42AEAC50) {\n if (hx > 0x7F800000) return x; // NaN\n if (hx >= 0x42B17218) {\n if (!sign_) return x * Ox1p127f;\n else if (hx >= 0x42CFF1B5) return 0;\n }\n }\n let hi: f32, lo: f32;\n let k: i32;\n if (hx > 0x3EB17218) {\n if (hx > 0x3F851592) {\n k = (invln2 * x + builtin_copysign(0.5, x));\n } else {\n k = 1 - (sign_ << 1);\n }\n hi = x - k * ln2hi;\n lo = k * ln2lo;\n x = hi - lo;\n } else if (hx > 0x39000000) {\n k = 0;\n hi = x;\n lo = 0;\n } else {\n return 1 + x;\n }\n let xx = x * x;\n let c = x - xx * (P1 + xx * P2);\n let y: f32 = 1 + (x * c / (2 - c) - lo + hi);\n return k == 0 ? y : scalbn(y, k);\n }\n }\n\n export function exp2(x: f32): f32 {\n return exp2f_lut(x);\n }\n\n export function expm1(x: f32): f32 { // see: musl/src/math/expm1f.c and SUN COPYRIGHT NOTICE above\n const\n ln2_hi = reinterpret(0x3F317180), // 6.9313812256e-01f\n ln2_lo = reinterpret(0x3717F7D1), // 9.0580006145e-06f\n invln2 = reinterpret(0x3FB8AA3B), // 1.4426950216e+00f\n Q1 = reinterpret(0xBD088868), // -3.3333212137e-02f\n Q2 = reinterpret(0x3ACF3010), // 1.5807170421e-03f\n Ox1p127f = reinterpret(0x7F000000); // 0x1p+127f\n\n var u = reinterpret(x);\n var hx = u & 0x7FFFFFFF;\n var sign_ = (u >> 31);\n if (hx >= 0x4195B844) {\n if (hx > 0x7F800000) return x;\n if (sign_) return -1;\n if (hx > 0x42B17217) { // x > log(FLT_MAX)\n x *= Ox1p127f;\n return x;\n }\n }\n var c: f32 = 0.0, t: f32, k: i32;\n if (hx > 0x3EB17218) {\n k = select(\n 1 - (sign_ << 1),\n (invln2 * x + builtin_copysign(0.5, x)),\n hx < 0x3F851592\n );\n t = k;\n let hi = x - t * ln2_hi;\n let lo = t * ln2_lo;\n x = hi - lo;\n c = (hi - x) - lo;\n } else if (hx < 0x33000000) {\n return x;\n } else k = 0;\n var hfx: f32 = 0.5 * x;\n var hxs: f32 = x * hfx;\n var r1: f32 = 1.0 + hxs * (Q1 + hxs * Q2);\n t = 3.0 - r1 * hfx;\n var e = hxs * ((r1 - t) / (6.0 - x * t));\n if (k == 0) return x - (x * e - hxs);\n e = x * (e - c) - c;\n e -= hxs;\n if (k == -1) return 0.5 * (x - e) - 0.5;\n if (k == 1) {\n if (x < -0.25) return -2.0 * (e - (x + 0.5));\n return 1.0 + 2.0 * (x - e);\n }\n u = (0x7F + k) << 23;\n var twopk = reinterpret(u);\n var y: f32;\n if (k < 0 || k > 56) {\n y = x - e + 1.0;\n if (k == 128) y = y * 2.0 * Ox1p127f;\n else y = y * twopk;\n return y - 1.0;\n }\n u = (0x7F - k) << 23;\n y = reinterpret(u);\n if (k < 20) y = (1 - y) - e;\n else y = 1 - (e + y);\n return (x + y) * twopk;\n }\n\n // @ts-ignore: decorator\n @inline\n export function fround(x: f32): f32 {\n return x;\n }\n\n export function hypot(x: f32, y: f32): f32 { // see: musl/src/math/hypotf.c\n const\n Ox1p90f = reinterpret(0x6C800000),\n Ox1p_90f = reinterpret(0x12800000);\n\n var ux = reinterpret(x);\n var uy = reinterpret(y);\n ux &= 0x7FFFFFFF;\n uy &= 0x7FFFFFFF;\n if (ux < uy) {\n let ut = ux;\n ux = uy;\n uy = ut;\n }\n x = reinterpret(ux);\n y = reinterpret(uy);\n if (uy == 0xFF << 23) return y;\n if (ux >= 0xFF << 23 || uy == 0 || ux - uy >= 25 << 23) return x + y;\n var z: f32 = 1;\n if (ux >= (0x7F + 60) << 23) {\n z = Ox1p90f;\n x *= Ox1p_90f;\n y *= Ox1p_90f;\n } else if (uy < (0x7F - 60) << 23) {\n z = Ox1p_90f;\n x *= Ox1p90f;\n y *= Ox1p90f;\n }\n return z * builtin_sqrt((x * x + y * y));\n }\n\n // @ts-ignore: decorator\n @inline\n export function imul(x: f32, y: f32): f32 {\n /*\n * Wasm (MVP) and JS have different approaches for double->int conversions.\n *\n * For emulate JS conversion behavior and avoid trapping from wasm we should modulate by MAX_INT\n * our float-point arguments before actual convertion to integers.\n */\n if (!isFinite(x + y)) return 0;\n return (dtoi32(x) * dtoi32(y));\n }\n\n export function log(x: f32): f32 { // see: musl/src/math/logf.c and SUN COPYRIGHT NOTICE above\n if (ASC_SHRINK_LEVEL < 1) {\n return logf_lut(x);\n } else {\n const\n ln2_hi = reinterpret(0x3F317180), // 6.9313812256e-01f\n ln2_lo = reinterpret(0x3717F7D1), // 9.0580006145e-06f\n Lg1 = reinterpret(0x3F2AAAAA), // 0xaaaaaa.0p-24f\n Lg2 = reinterpret(0x3ECCCE13), // 0xccce13.0p-25f\n Lg3 = reinterpret(0x3E91E9EE), // 0x91e9ee.0p-25f\n Lg4 = reinterpret(0x3E789E26), // 0xf89e26.0p-26f\n Ox1p25f = reinterpret(0x4C000000);\n\n let u = reinterpret(x);\n let k = 0;\n if (u < 0x00800000 || (u >> 31)) {\n if (u << 1 == 0) return -1 / (x * x);\n if (u >> 31) return (x - x) / 0;\n k -= 25;\n x *= Ox1p25f;\n u = reinterpret(x);\n } else if (u >= 0x7F800000) {\n return x;\n } else if (u == 0x3F800000) {\n return 0;\n }\n u += 0x3F800000 - 0x3F3504F3;\n k += (u >> 23) - 0x7F;\n u = (u & 0x007FFFFF) + 0x3F3504F3;\n x = reinterpret(u);\n let f = x - 1.0;\n let s = f / (2.0 + f);\n let z = s * s;\n let w = z * z;\n let t1 = w * (Lg2 + w * Lg4);\n let t2 = z * (Lg1 + w * Lg3);\n let r = t2 + t1;\n let hfsq = 0.5 * f * f;\n let dk = k;\n return s * (hfsq + r) + dk * ln2_lo - hfsq + f + dk * ln2_hi;\n }\n }\n\n export function log10(x: f32): f32 { // see: musl/src/math/log10f.c and SUN COPYRIGHT NOTICE above\n const\n ivln10hi = reinterpret(0x3EDE6000), // 4.3432617188e-01f\n ivln10lo = reinterpret(0xB804EAD9), // -3.1689971365e-05f\n log10_2hi = reinterpret(0x3E9A2080), // 3.0102920532e-01f\n log10_2lo = reinterpret(0x355427DB), // 7.9034151668e-07f\n Lg1 = reinterpret(0x3F2AAAAA), // 0xaaaaaa.0p-24f, 0.66666662693f\n Lg2 = reinterpret(0x3ECCCE13), // 0xccce13.0p-25f, 0.40000972152f\n Lg3 = reinterpret(0x3E91E9EE), // 0x91e9ee.0p-25f, 0.28498786688f\n Lg4 = reinterpret(0x3E789E26), // 0xf89e26.0p-26f, 0.24279078841f\n Ox1p25f = reinterpret(0x4C000000); // 0x1p25f\n\n var ix = reinterpret(x);\n var k = 0;\n if (ix < 0x00800000 || (ix >> 31)) {\n if (ix << 1 == 0) return -1 / (x * x);\n if (ix >> 31) return (x - x) / 0.0;\n k -= 25;\n x *= Ox1p25f;\n ix = reinterpret(x);\n } else if (ix >= 0x7F800000) {\n return x;\n } else if (ix == 0x3F800000) {\n return 0;\n }\n ix += 0x3F800000 - 0x3F3504F3;\n k += (ix >> 23) - 0x7F;\n ix = (ix & 0x007FFFFF) + 0x3F3504F3;\n x = reinterpret(ix);\n var f = x - 1.0;\n var s = f / (2.0 + f);\n var z = s * s;\n var w = z * z;\n var t1 = w * (Lg2 + w * Lg4);\n var t2 = z * (Lg1 + w * Lg3);\n var r = t2 + t1;\n var hfsq: f32 = 0.5 * f * f;\n var hi = f - hfsq;\n ix = reinterpret(hi);\n ix &= 0xFFFFF000;\n hi = reinterpret(ix);\n var lo = f - hi - hfsq + s * (hfsq + r);\n var dk = k;\n return dk * log10_2lo + (lo + hi) * ivln10lo + lo * ivln10hi + hi * ivln10hi + dk * log10_2hi;\n }\n\n export function log1p(x: f32): f32 { // see: musl/src/math/log1pf.c and SUN COPYRIGHT NOTICE above\n const\n ln2_hi = reinterpret(0x3F317180), // 6.9313812256e-01\n ln2_lo = reinterpret(0x3717F7D1), // 9.0580006145e-06\n Lg1 = reinterpret(0x3F2AAAAA), // 0xaaaaaa.0p-24f, 0.66666662693f\n Lg2 = reinterpret(0x3ECCCE13), // 0xccce13.0p-25f, 0.40000972152f\n Lg3 = reinterpret(0x3E91E9EE), // 0x91e9ee.0p-25f, 0.28498786688f\n Lg4 = reinterpret(0x3E789E26); // 0xf89e26.0p-26f, 0.24279078841f\n\n var ix = reinterpret(x);\n var c: f32 = 0, f: f32 = 0;\n var k: i32 = 1;\n if (ix < 0x3ED413D0 || (ix >> 31)) {\n if (ix >= 0xBF800000) {\n if (x == -1) return x / 0.0;\n return (x - x) / 0.0;\n }\n if (ix << 1 < 0x33800000 << 1) return x;\n if (ix <= 0xBE95F619) {\n k = 0;\n c = 0;\n f = x;\n }\n } else if (ix >= 0x7F800000) return x;\n if (k) {\n let uf: f32 = 1 + x;\n let iu = reinterpret(uf);\n iu += 0x3F800000 - 0x3F3504F3;\n k = (iu >> 23) - 0x7F;\n if (k < 25) {\n c = k >= 2 ? 1 - (uf - x) : x - (uf - 1);\n c /= uf;\n } else c = 0;\n iu = (iu & 0x007FFFFF) + 0x3F3504F3;\n f = reinterpret(iu) - 1;\n }\n var s = f / (2.0 + f);\n var z = s * s;\n var w = z * z;\n var t1 = w * (Lg2 + w * Lg4);\n var t2 = z * (Lg1 + w * Lg3);\n var r = t2 + t1;\n var hfsq: f32 = 0.5 * f * f;\n var dk = k;\n return s * (hfsq + r) + (dk * ln2_lo + c) - hfsq + f + dk * ln2_hi;\n }\n\n export function log2(x: f32): f32 { // see: musl/src/math/log2f.c and SUN COPYRIGHT NOTICE above\n if (ASC_SHRINK_LEVEL < 1) {\n return log2f_lut(x);\n } else {\n const\n ivln2hi = reinterpret(0x3FB8B000), // 1.4428710938e+00f\n ivln2lo = reinterpret(0xB9389AD4), // -1.7605285393e-04\n Lg1 = reinterpret(0x3F2AAAAA), // 0xaaaaaa.0p-24f, 0.66666662693f\n Lg2 = reinterpret(0x3ECCCE13), // 0xccce13.0p-25f, 0.40000972152f\n Lg3 = reinterpret(0x3E91E9EE), // 0x91e9ee.0p-25f, 0.28498786688f\n Lg4 = reinterpret(0x3E789E26), // 0xf89e26.0p-26f, 0.24279078841f\n Ox1p25f = reinterpret(0x4C000000); // 0x1p25f\n\n let ix = reinterpret(x);\n let k: i32 = 0;\n if (ix < 0x00800000 || (ix >> 31)) {\n if (ix << 1 == 0) return -1 / (x * x);\n if (ix >> 31) return (x - x) / 0.0;\n k -= 25;\n x *= Ox1p25f;\n ix = reinterpret(x);\n } else if (ix >= 0x7F800000) {\n return x;\n } else if (ix == 0x3F800000) {\n return 0;\n }\n ix += 0x3F800000 - 0x3F3504F3;\n k += (ix >> 23) - 0x7F;\n ix = (ix & 0x007FFFFF) + 0x3F3504F3;\n x = reinterpret(ix);\n let f = x - 1.0;\n let s = f / (2.0 + f);\n let z = s * s;\n let w = z * z;\n let t1 = w * (Lg2 + w * Lg4);\n let t2 = z * (Lg1 + w * Lg3);\n let r = t2 + t1;\n let hfsq: f32 = 0.5 * f * f;\n let hi = f - hfsq;\n let u = reinterpret(hi);\n u &= 0xFFFFF000;\n hi = reinterpret(u);\n let lo: f32 = f - hi - hfsq + s * (hfsq + r);\n let dk = k;\n return (lo + hi) * ivln2lo + lo * ivln2hi + hi * ivln2hi + dk;\n }\n }\n\n // @ts-ignore: decorator\n @inline\n export function max(value1: f32, value2: f32): f32 {\n return builtin_max(value1, value2);\n }\n\n // @ts-ignore: decorator\n @inline\n export function min(value1: f32, value2: f32): f32 {\n return builtin_min(value1, value2);\n }\n\n export function pow(x: f32, y: f32): f32 {\n // TODO: remove this fast pathes after introduced own mid-end IR with \"stdlib call simplify\" transforms\n if (builtin_abs(y) <= 2) {\n if (y == 2.0) return x * x;\n if (y == 0.5) {\n return select(\n builtin_abs(builtin_sqrt(x)),\n Infinity,\n x != -Infinity\n );\n }\n if (y == -1.0) return 1 / x;\n if (y == 1.0) return x;\n if (y == 0.0) return 1.0;\n }\n if (ASC_SHRINK_LEVEL < 1) {\n // see: musl/src/math/powf.c\n return powf_lut(x, y);\n } else {\n // based on: jdh8/metallic/src/math/float/powf.c\n if (y == 0) return 1;\n // @ts-ignore: cast\n if (isNaN(x) | isNaN(y)) {\n return NaN;\n }\n let sign: u32 = 0;\n let uy = reinterpret(y);\n let ux = reinterpret(x);\n let sx = ux >> 31;\n ux &= 0x7FFFFFFF;\n if (sx && nearest(y) == y) {\n x = -x;\n sx = 0;\n sign = u32(nearest(y * 0.5) != y * 0.5) << 31;\n }\n let m: u32;\n if (ux == 0x3F800000) { // x == 1\n m = sx | u32((uy & 0x7FFFFFFF) == 0x7F800000) ? 0x7FC00000 : 0x3F800000;\n } else if (ux == 0) {\n m = uy >> 31 ? 0x7F800000 : 0;\n } else if (ux == 0x7F800000) {\n m = uy >> 31 ? 0 : 0x7F800000;\n } else if (sx) {\n m = 0x7FC00000;\n } else {\n m = reinterpret(exp2f(y * log2f(x)));\n }\n return reinterpret(m | sign);\n }\n }\n\n // @ts-ignore: decorator\n @inline\n export function seedRandom(value: i64): void {\n NativeMath.seedRandom(value);\n }\n\n // Using xoroshiro64starstar from http://xoshiro.di.unimi.it/xoroshiro64starstar.c\n export function random(): f32 {\n if (!random_seeded) seedRandom(reinterpret(seed()));\n\n var s0 = random_state0_32;\n var s1 = random_state1_32;\n var r = rotl(s0 * 0x9E3779BB, 5) * 5;\n\n s1 ^= s0;\n random_state0_32 = rotl(s0, 26) ^ s1 ^ (s1 << 9);\n random_state1_32 = rotl(s1, 13);\n\n return reinterpret((r >> 9) | (127 << 23)) - 1.0;\n }\n\n // @ts-ignore: decorator\n @inline\n export function round(x: f32): f32 {\n let roundUp = builtin_ceil(x);\n return select(roundUp, roundUp - 1.0, roundUp - 0.5 <= x);\n }\n\n // @ts-ignore: decorator\n @inline\n export function sign(x: f32): f32 {\n if (ASC_SHRINK_LEVEL > 0) {\n return builtin_abs(x) > 0 ? builtin_copysign(1, x) : x;\n } else {\n return x > 0 ? 1 : x < 0 ? -1 : x;\n }\n }\n\n // @ts-ignore: decorator\n @inline\n export function signbit(x: f32): bool {\n return (reinterpret(x) >>> 31);\n }\n\n export function sin(x: f32): f32 { // see: musl/src/math/sinf.c\n const\n s1pio2 = reinterpret(0x3FF921FB54442D18), // M_PI_2 * 1\n s2pio2 = reinterpret(0x400921FB54442D18), // M_PI_2 * 2\n s3pio2 = reinterpret(0x4012D97C7F3321D2), // M_PI_2 * 3\n s4pio2 = reinterpret(0x401921FB54442D18); // M_PI_2 * 4\n\n var ix = reinterpret(x);\n var sign = ix >> 31;\n ix &= 0x7FFFFFFF;\n\n if (ix <= 0x3F490FDA) { // |x| ~<= π/4\n if (ix < 0x39800000) { // |x| < 2**-12\n return x;\n }\n return sin_kernf(x);\n }\n\n if (ASC_SHRINK_LEVEL < 1) {\n if (ix <= 0x407B53D1) { // |x| ~<= 5π/4\n if (ix <= 0x4016CBE3) { // |x| ~<= 3π/4\n return sign ? -cos_kernf(x + s1pio2) : cos_kernf(x - s1pio2);\n }\n return sin_kernf(-(sign ? x + s2pio2 : x - s2pio2));\n }\n\n if (ix <= 0x40E231D5) { // |x| ~<= 9π/4\n if (ix <= 0x40AFEDDF) { // |x| ~<= 7π/4\n return sign ? cos_kernf(x + s3pio2) : -cos_kernf(x - s3pio2);\n }\n return sin_kernf(sign ? x + s4pio2 : x - s4pio2);\n }\n }\n\n // sin(Inf or NaN) is NaN\n if (ix >= 0x7F800000) return x - x;\n\n var n = rempio2f(x, ix, sign);\n var y = rempio2f_y;\n\n var t = n & 1 ? cos_kernf(y) : sin_kernf(y);\n return n & 2 ? -t : t;\n }\n\n export function sinh(x: f32): f32 { // see: musl/src/math/sinhf.c\n var u = reinterpret(x) & 0x7FFFFFFF;\n var a = reinterpret(u);\n var h = builtin_copysign(0.5, x);\n if (u < 0x42B17217) {\n let t = expm1(a);\n if (u < 0x3F800000) {\n if (u < 0x3F800000 - (12 << 23)) return x;\n return h * (2 * t - t * t / (t + 1));\n }\n return h * (t + t / (t + 1));\n }\n return expo2f(a, 2 * h);\n }\n\n // @ts-ignore: decorator\n @inline\n export function sqrt(x: f32): f32 {\n return builtin_sqrt(x);\n }\n\n export function tan(x: f32): f32 { // see: musl/src/math/tanf.c\n const\n t1pio2 = reinterpret(0x3FF921FB54442D18), // 1 * M_PI_2\n t2pio2 = reinterpret(0x400921FB54442D18), // 2 * M_PI_2\n t3pio2 = reinterpret(0x4012D97C7F3321D2), // 3 * M_PI_2\n t4pio2 = reinterpret(0x401921FB54442D18); // 4 * M_PI_2\n\n var ix = reinterpret(x);\n var sign = ix >> 31;\n ix &= 0x7FFFFFFF;\n\n if (ix <= 0x3F490FDA) { // |x| ~<= π/4\n if (ix < 0x39800000) { // |x| < 2**-12\n return x;\n }\n return tan_kernf(x, 0);\n }\n\n if (ASC_SHRINK_LEVEL < 1) {\n if (ix <= 0x407B53D1) { // |x| ~<= 5π/4\n if (ix <= 0x4016CBE3) { // |x| ~<= 3π/4\n return tan_kernf((sign ? x + t1pio2 : x - t1pio2), 1);\n } else {\n return tan_kernf((sign ? x + t2pio2 : x - t2pio2), 0);\n }\n }\n if (ix <= 0x40E231D5) { // |x| ~<= 9π/4\n if (ix <= 0x40AFEDDF) { // |x| ~<= 7π/4\n return tan_kernf((sign ? x + t3pio2 : x - t3pio2), 1);\n } else {\n return tan_kernf((sign ? x + t4pio2 : x - t4pio2), 0);\n }\n }\n }\n\n // tan(Inf or NaN) is NaN\n if (ix >= 0x7F800000) return x - x;\n\n // argument reduction\n var n = rempio2f(x, ix, sign);\n var y = rempio2f_y;\n return tan_kernf(y, n & 1);\n }\n\n export function tanh(x: f32): f32 { // see: musl/src/math/tanhf.c\n var u = reinterpret(x);\n u &= 0x7FFFFFFF;\n var y = reinterpret(u);\n var t: f32;\n if (u > 0x3F0C9F54) {\n if (u > 0x41200000) t = 1 + 0 / y;\n else {\n t = expm1(2 * y);\n t = 1 - 2 / (t + 2);\n }\n } else if (u > 0x3E82C578) {\n t = expm1(2 * y);\n t = t / (t + 2);\n } else if (u >= 0x00800000) {\n t = expm1(-2 * y);\n t = -t / (t + 2);\n } else t = y;\n return builtin_copysign(t, x);\n }\n\n // @ts-ignore: decorator\n @inline\n export function trunc(x: f32): f32 {\n return builtin_trunc(x);\n }\n\n export function scalbn(x: f32, n: i32): f32 { // see: https://git.musl-libc.org/cgit/musl/tree/src/math/scalbnf.c\n const\n Ox1p24f = reinterpret(0x4B800000),\n Ox1p127f = reinterpret(0x7F000000),\n Ox1p_126f = reinterpret(0x00800000);\n\n var y = x;\n if (n > 127) {\n y *= Ox1p127f;\n n -= 127;\n if (n > 127) {\n y *= Ox1p127f;\n n = builtin_min(n - 127, 127);\n }\n } else if (n < -126) {\n y *= Ox1p_126f * Ox1p24f;\n n += 126 - 24;\n if (n < -126) {\n y *= Ox1p_126f * Ox1p24f;\n n = builtin_max(n + 126 - 24, -126);\n }\n }\n return y * reinterpret((0x7F + n) << 23);\n }\n\n export function mod(x: f32, y: f32): f32 { // see: musl/src/math/fmodf.c\n if (builtin_abs(y) == 1.0) {\n // x % 1, x % -1 ==> sign(x) * abs(x - 1.0 * trunc(x / 1.0))\n // TODO: move this rule to compiler's optimization pass.\n // It could be apply for any x % C_pot, where \"C_pot\" is pow of two const.\n return builtin_copysign(x - builtin_trunc(x), x);\n }\n var ux = reinterpret(x);\n var uy = reinterpret(y);\n var ex = (ux >> 23 & 0xFF);\n var ey = (uy >> 23 & 0xFF);\n var sm = ux & 0x80000000;\n var uy1 = uy << 1;\n if (uy1 == 0 || ex == 0xFF || isNaN(y)) {\n let m = x * y;\n return m / m;\n }\n var ux1 = ux << 1;\n if (ux1 <= uy1) {\n return x * f32(ux1 != uy1);\n }\n if (!ex) {\n ex -= builtin_clz(ux << 9);\n ux <<= 1 - ex;\n } else {\n ux &= -1 >> 9;\n ux |= 1 << 23;\n }\n if (!ey) {\n ey -= builtin_clz(uy << 9);\n uy <<= 1 - ey;\n } else {\n uy &= -1 >> 9;\n uy |= 1 << 23;\n }\n while (ex > ey) {\n if (ux >= uy) {\n if (ux == uy) return 0 * x;\n ux -= uy;\n }\n ux <<= 1;\n --ex;\n }\n if (ux >= uy) {\n if (ux == uy) return 0 * x;\n ux -= uy;\n }\n // for (; !(ux >> 23); ux <<= 1) --ex;\n var shift = builtin_clz(ux << 8);\n ex -= shift;\n ux <<= shift;\n if (ex > 0) {\n ux -= 1 << 23;\n ux |= ex << 23;\n } else {\n ux >>= -ex + 1;\n }\n return reinterpret(ux | sm);\n }\n\n export function rem(x: f32, y: f32): f32 { // see: musl/src/math/remquof.c\n var ux = reinterpret(x);\n var uy = reinterpret(y);\n var ex = (ux >> 23 & 0xFF);\n var ey = (uy >> 23 & 0xFF);\n var sx = (ux >> 31);\n var uxi = ux;\n if (uy << 1 == 0 || ex == 0xFF || isNaN(y)) return (x * y) / (x * y);\n if (ux << 1 == 0) return x;\n if (!ex) {\n ex -= builtin_clz(uxi << 9);\n uxi <<= 1 - ex;\n } else {\n uxi &= -1 >> 9;\n uxi |= 1 << 23;\n }\n if (!ey) {\n ey -= builtin_clz(uy << 9);\n uy <<= 1 - ey;\n } else {\n uy &= -1 >> 9;\n uy |= 1 << 23;\n }\n var q = 0;\n do {\n if (ex < ey) {\n if (ex + 1 == ey) break; // goto end\n return x;\n }\n while (ex > ey) {\n if (uxi >= uy) {\n uxi -= uy;\n ++q;\n }\n uxi <<= 1;\n q <<= 1;\n --ex;\n }\n if (uxi >= uy) {\n uxi -= uy;\n ++q;\n }\n if (uxi == 0) ex = -30;\n else {\n let shift = builtin_clz(uxi << 8);\n ex -= shift;\n uxi <<= shift;\n }\n break;\n } while (false);\n // end:\n if (ex > 0) {\n uxi -= 1 << 23;\n uxi |= ex << 23;\n } else {\n uxi >>= -ex + 1;\n }\n x = reinterpret(uxi);\n y = builtin_abs(y);\n var x2 = x + x;\n if (ex == ey || (ex + 1 == ey && (x2 > y || (x2 == y && (q & 1))))) {\n x -= y;\n // q++;\n }\n return sx ? -x : x;\n }\n\n export function sincos(x: f32): void { // see: musl/tree/src/math/sincosf.c\n const\n s1pio2 = reinterpret(0x3FF921FB54442D18), // 1 * M_PI_2\n s2pio2 = reinterpret(0x400921FB54442D18), // 2 * M_PI_2\n s3pio2 = reinterpret(0x4012D97C7F3321D2), // 3 * M_PI_2\n s4pio2 = reinterpret(0x401921FB54442D18); // 4 * M_PI_2\n\n var ix = reinterpret(x);\n var sign = ix >> 31;\n ix &= 0x7FFFFFFF;\n\n if (ix <= 0x3F490FDA) { // |x| ~<= π/4\n if (ix < 0x39800000) { // |x| < 2**-12\n sincos_sin = x;\n sincos_cos = 1;\n return;\n }\n sincos_sin = sin_kernf(x);\n sincos_cos = cos_kernf(x);\n return;\n }\n if (ASC_SHRINK_LEVEL < 1) {\n if (ix <= 0x407B53D1) { // |x| ~<= 5π/4\n if (ix <= 0x4016CBE3) { // |x| ~<= 3π/4\n if (sign) {\n sincos_sin = -cos_kernf(x + s1pio2);\n sincos_cos = sin_kernf(x + s1pio2);\n } else {\n sincos_sin = cos_kernf(s1pio2 - x);\n sincos_cos = sin_kernf(s1pio2 - x);\n }\n return;\n }\n // -sin(x + c) is not correct if x+c could be 0: -0 vs +0\n sincos_sin = -sin_kernf(sign ? x + s2pio2 : x - s2pio2);\n sincos_cos = -cos_kernf(sign ? x + s2pio2 : x - s2pio2);\n return;\n }\n if (ix <= 0x40E231D5) { // |x| ~<= 9π/4\n if (ix <= 0x40AFEDDF) { // |x| ~<= 7π/4\n if (sign) {\n sincos_sin = cos_kernf(x + s3pio2);\n sincos_cos = -sin_kernf(x + s3pio2);\n } else {\n sincos_sin = -cos_kernf(x - s3pio2);\n sincos_cos = sin_kernf(x - s3pio2);\n }\n return;\n }\n sincos_sin = sin_kernf(sign ? x + s4pio2 : x - s4pio2);\n sincos_cos = cos_kernf(sign ? x + s4pio2 : x - s4pio2);\n return;\n }\n }\n // sin(Inf or NaN) is NaN\n if (ix >= 0x7F800000) {\n let xx = x - x;\n sincos_sin = xx;\n sincos_cos = xx;\n return;\n }\n // general argument reduction needed\n var n = rempio2f(x, ix, sign);\n var y = rempio2f_y;\n var s = sin_kernf(y);\n var c = cos_kernf(y);\n var sin = s, cos = c;\n if (n & 1) {\n sin = c;\n cos = -s;\n }\n if (n & 2) {\n sin = -sin;\n cos = -cos;\n }\n sincos_sin = sin;\n sincos_cos = cos;\n }\n}\n\nexport function ipow32(x: i32, e: i32): i32 {\n var out = 1;\n if (ASC_SHRINK_LEVEL < 1) {\n if (x == 2) {\n return select(1 << e, 0, e < 32);\n }\n if (e <= 0) {\n if (x == -1) return select(-1, 1, e & 1);\n return i32(e == 0) | i32(x == 1);\n }\n else if (e == 1) return x;\n else if (e == 2) return x * x;\n else if (e < 32) {\n let log = 32 - clz(e);\n // 32 = 2 ^ 5, so need only five cases.\n // But some extra cases needs for properly overflowing\n switch (log) {\n case 5: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 4: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 3: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 2: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 1: {\n if (e & 1) out *= x;\n }\n }\n return out;\n }\n }\n while (e) {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n return out;\n}\n\nexport function ipow64(x: i64, e: i64): i64 {\n var out: i64 = 1;\n if (ASC_SHRINK_LEVEL < 1) {\n if (x == 2) {\n return select(1 << e, 0, e < 64);\n }\n if (e <= 0) {\n if (x == -1) return select(-1, 1, e & 1);\n return i64(e == 0) | i64(x == 1);\n }\n else if (e == 1) return x;\n else if (e == 2) return x * x;\n else if (e < 64) {\n let log = 64 - clz(e);\n // 64 = 2 ^ 6, so need only six cases.\n // But some extra cases needs for properly overflowing\n switch (log) {\n case 6: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 5: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 4: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 3: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 2: {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n case 1: {\n if (e & 1) out *= x;\n }\n }\n return out;\n }\n }\n while (e) {\n if (e & 1) out *= x;\n e >>>= 1;\n x *= x;\n }\n return out;\n}\n\n/*\nTODO:\nIn compile time if only exponent is constant we could replace ipow32/ipow64 by shortest addition chains\nwhich usually faster than exponentiation by squaring\n\nfor ipow32 and e < 32:\n\nlet b: i32, c: i32, d: i32, h: i32, k: i32, g: i32;\nswitch (e) {\n case 1: return x;\n case 2: return x * x;\n case 3: return x * x * x;\n case 4: return (b = x * x) * b;\n case 5: return (b = x * x) * b * x;\n case 6: return (b = x * x) * b * b;\n case 7: return (b = x * x) * b * b * x;\n case 8: return (d = (b = x * x) * b) * d;\n case 9: return (c = x * x * x) * c * c;\n case 10: return (d = (b = x * x) * b) * d * b;\n case 11: return (d = (b = x * x) * b) * d * b * x;\n case 12: return (d = (b = x * x) * b) * d * d;\n case 13: return (d = (b = x * x) * b) * d * d * x;\n case 14: return (d = (b = x * x) * b) * d * d * b;\n case 15: return (k = (b = x * x) * b * x) * k * k;\n case 16: return (h = (d = (b = x * x) * b) * d) * h;\n case 17: return (h = (d = (b = x * x) * b) * d) * h * x;\n case 18: return (h = (d = (b = x * x) * b) * d * x) * h;\n case 19: return (h = (d = (b = x * x) * b) * d * x) * h * x;\n case 20: return (h = (k = (b = x * x) * b * x) * k) * h;\n case 21: return (h = (k = (b = x * x) * b * x) * k) * h * x;\n case 22: return (g = (h = (k = (b = x * x) * b * x) * k) * x) * g;\n case 23: return (h = (d = (c = (b = x * x) * x) * b) * d) * h * c;\n case 24: return (h = (d = (c = x * x * x) * c) * d) * h;\n case 25: return (h = (d = (c = x * x * x) * c) * d) * h * x;\n case 26: return (g = (h = (d = (c = x * x * x) * c) * d) * x) * g;\n case 27: return (h = (d = (c = x * x * x) * c) * d) * h * c;\n case 28: return (h = (d = (c = x * x * x) * c * x) * d) * h;\n case 29: return (h = (d = (c = x * x * x) * c * x) * d) * h * x;\n case 30: return (h = (d = (c = x * x * x) * c) * d * c) * h;\n case 31: return (h = (d = (c = x * x * x) * c) * d * c) * h * x;\n}\n\nfor ipow64: TODO\nswitch (e) {\n case 32:\n ...\n case 63:\n}\n*/\n", - "memory": "import { memcmp, memmove, memset } from \"./util/memory\";\nimport { E_NOTIMPLEMENTED } from \"./util/error\";\n\n/** Memory manager interface. */\nexport namespace memory {\n\n /** Gets the size of the memory in pages. */\n // @ts-ignore: decorator\n @builtin\n export declare function size(): i32;\n\n /** Grows the memory by the given size in pages and returns the previous size in pages. */\n // @ts-ignore: decorator\n @unsafe @builtin\n export declare function grow(pages: i32): i32;\n\n /** Fills a section in memory with the specified byte value. */\n // @ts-ignore: decorator\n @unsafe @builtin\n export function fill(dst: usize, c: u8, n: usize): void {\n memset(dst, c, n); // fallback if \"bulk-memory\" isn't enabled\n }\n\n /** Copies a section of memory to another. Has move semantics. */\n // @ts-ignore: decorator\n @unsafe @builtin\n export function copy(dst: usize, src: usize, n: usize): void {\n memmove(dst, src, n); // fallback if \"bulk-memory\" isn't enabled\n }\n\n /** Initializes a memory segment. */\n // @ts-ignore: decorator\n @unsafe\n export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void {\n throw new Error(E_NOTIMPLEMENTED);\n }\n\n /** Drops a memory segment. */\n // @ts-ignore: decorator\n @unsafe\n export function drop(segmentIndex: u32): void {\n throw new Error(E_NOTIMPLEMENTED);\n }\n\n /** Repeats a section of memory at a specific address. */\n // @ts-ignore: decorator\n @unsafe\n export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void {\n var index: usize = 0;\n var total = srcLength * count;\n while (index < total) {\n memory.copy(dst + index, src, srcLength);\n index += srcLength;\n }\n }\n\n /** Compares a section of memory to another. */\n // @ts-ignore: decorator\n @inline\n export function compare(vl: usize, vr: usize, n: usize): i32 {\n return memcmp(vl, vr, n);\n }\n\n /** Gets a pointer to a static chunk of memory of the given size. */\n // @ts-ignore: decorator\n @builtin\n export declare function data(size: T, align?: i32): usize;\n}\n\n// @ts-ignore: decorator\n@builtin\nexport declare const __data_end: usize;\n\n// @ts-ignore: decorator\n@builtin\nexport declare var __stack_pointer: usize;\n\n// @ts-ignore: decorator\n@builtin\nexport declare const __heap_base: usize;\n\n/** Heap memory interface. */\nexport namespace heap {\n\n /** Allocates a chunk of memory of at least the specified size. */\n // @ts-ignore: decorator\n @unsafe export function alloc(size: usize): usize {\n return __alloc(size);\n }\n\n /** Reallocates a chunk of memory to have at least the specified size. */\n // @ts-ignore: decorator\n @unsafe export function realloc(ptr: usize, size: usize): usize {\n return __realloc(ptr, size);\n }\n\n /** Frees a chunk of memory. Does hardly anything (most recent block only) with the stub runtime. */\n // @ts-ignore: decorator\n @unsafe export function free(ptr: usize): void {\n __free(ptr);\n }\n\n /** Dangerously resets the entire heap. Specific to the stub runtime. */\n // @ts-ignore: decorator\n @unsafe export function reset(): void {\n if (isDefined(__reset)) {\n __reset();\n } else {\n throw new Error(E_NOTIMPLEMENTED);\n }\n }\n}\n", - "node/fs": "// import {\n// args_get,\n// args_sizes_get,\n// environ_get,\n// environ_sizes_get,\n// proc_exit,\n// fd_write,\n// fd_close,\n// fd_read,\n// clock_time_get,\n// clockid,\n// errnoToString,\n// fd,\n// rights,\n// lookupflags,\n// path_open\n// } from \"bindings/wasi_snapshot_preview1\";\n\n// export function open(path: string, mode: string = \"r\"): fd {\n// var flags = stringToFlags(mode);\n// var w_oflags = flagsToOflags(flags);\n// var w_rights = flagsToRights(flags) | rights.FD_SEEK | rights.FD_TELL | rights.FD_FILESTAT_GET;\n// var w_fdflags = flagsToFdflags(flags);\n// var pathBuf = String.UTF8.encode(path);\n// var pathLen = pathBuf.byteLength;\n// var err = path_open(changetype(3),\n// lookupflags.SYMLINK_FOLLOW,\n// changetype(pathBuf), pathLen,\n// w_oflags, w_rights, w_rights, w_fdflags,\n// iobuf\n// );\n// if (err) throw new Error(errnoToString(err));\n// return load(iobuf);\n// }\n\n// export function readFileSync(path: string): T {\n// var s = changetype(open(path, \"r\"));\n// const BUFFER_SIZE = 4096;\n// var bufs = new Array();\n// var buf = new ArrayBuffer(BUFFER_SIZE);\n// var off = 0;\n// var max = BUFFER_SIZE;\n// var size = 0;\n// do {\n// let n = s.read(buf, off);\n// if (n <= 0) break;\n// size += n;\n// if (size == max) {\n// bufs.push(buf);\n// buf = new ArrayBuffer(BUFFER_SIZE);\n// max += BUFFER_SIZE;\n// }\n// } while (true);\n// s.close();\n// }\n\n// // @ts-ignore\n// @inline const O_READ = 1 << 0;\n// // @ts-ignore\n// @inline const O_WRITE = 1 << 1;\n// // @ts-ignore\n// @inline const O_SYNC = 1 << 2;\n// // @ts-ignore\n// @inline const O_APPEND = 1 << 3;\n// // @ts-ignore\n// @inline const O_CREAT = 1 << 4;\n// // @ts-ignore\n// @inline const O_TRUNC = 1 << 5;\n// // @ts-ignore\n// @inline const O_EXCL = 1 << 6;\n\n// function stringToFlags(flags: string): i32 {\n// switch (flags.length ? flags.charCodeAt(0) : 0) {\n// case CharCode.r: {\n// if (flags == \"r\") return O_READ;\n// else if (flags == \"rs\") return O_READ | O_SYNC;\n// else if (flags == \"r+\") return O_READ | O_WRITE;\n// else if (flags == \"rs+\") return O_READ | O_WRITE | O_SYNC;\n// break;\n// }\n// case CharCode.w: {\n// if (flags == \"w\") return O_WRITE | O_CREAT | O_TRUNC;\n// else if (flags == \"wx\") return O_WRITE | O_CREAT | O_TRUNC | O_EXCL;\n// else if (flags == \"w+\") return O_READ | O_WRITE | O_CREAT | O_TRUNC;\n// else if (flags == \"wx+\") return O_READ | O_WRITE | O_CREAT | O_TRUNC | O_EXCL;\n// break;\n// }\n// case CharCode.a: {\n// if (flags == \"a\") return O_WRITE | O_CREAT | O_APPEND;\n// else if (flags == \"ax\") return O_WRITE | O_CREAT | O_APPEND | O_EXCL;\n// else if (flags == \"as\") return O_WRITE | O_CREAT | O_APPEND | O_SYNC;\n// else if (flags == \"a+\") return O_READ | O_WRITE | O_APPEND | O_CREAT;\n// else if (flags == \"ax+\") return O_READ | O_WRITE | O_APPEND | O_CREAT | O_EXCL;\n// else if (flags == \"as+\") return O_READ | O_WRITE | O_APPEND | O_CREAT | O_SYNC;\n// break;\n// }\n// case CharCode.x: {\n// if (flags == \"xw\") return O_WRITE | O_CREAT | O_TRUNC | O_EXCL; // wx\n// else if (flags == \"xw+\") return O_READ | O_WRITE | O_CREAT | O_TRUNC | O_EXCL; // wx+\n// else if (flags == \"xa\") return O_WRITE | O_CREAT | O_APPEND | O_EXCL; // ax\n// else if (flags == \"xa+\") return O_READ | O_WRITE | O_APPEND | O_CREAT | O_EXCL; // ax+\n// break;\n// }\n// case CharCode.s: {\n// if (flags == \"sr\") return O_READ | O_SYNC; // rs\n// else if (flags == \"sr+\") return O_READ | O_WRITE | O_SYNC; // rs+\n// else if (flags == \"sa\") return O_WRITE | O_CREAT | O_APPEND | O_SYNC; // as\n// else if (flags == \"sa+\") return O_READ | O_WRITE | O_APPEND | O_CREAT | O_SYNC; // as+\n// break;\n// }\n// }\n// throw new Error(\"invalid open flags\");\n// }\n\n// function flagsToOflags(flags: i32): oflags {\n// return (\n// oflags.CREAT * i32((flags & O_CREAT) != 0),\n// oflags.TRUNC * i32((flags & O_TRUNC) != 0),\n// oflags.EXCL * i32((flags & O_EXCL) != 0)\n// );\n// }\n\n// function flagsToRights(flags: i32): rights {\n// return (\n// rights.FD_READ * i32((flags & O_READ) != 0),\n// rights.FD_WRITE * i32((flags & O_WRITE) != 0)\n// );\n// }\n\n// function flagsToFdflags(flags: i32): fdflags {\n// return (\n// fdflags.APPEND * i32((flags & O_APPEND) != 0),\n// fdflags.SYNC * i32((flags & O_SYNC) != 0)\n// );\n// }\n\n// export const enum CharCode {\n// PLUS = 0x2B,\n// MINUS = 0x2D,\n// DOT = 0x2E,\n// _0 = 0x30,\n// _1 = 0x31,\n// _2 = 0x32,\n// _3 = 0x33,\n// _4 = 0x34,\n// _5 = 0x35,\n// _6 = 0x36,\n// _7 = 0x37,\n// _8 = 0x38,\n// _9 = 0x39,\n// A = 0x41,\n// B = 0x42,\n// C = 0x43,\n// D = 0x44,\n// E = 0x45,\n// F = 0x46,\n// G = 0x47,\n// H = 0x48,\n// I = 0x49,\n// J = 0x4A,\n// K = 0x4B,\n// L = 0x4C,\n// M = 0x4D,\n// N = 0x4E,\n// O = 0x4F,\n// P = 0x50,\n// Q = 0x51,\n// R = 0x52,\n// S = 0x53,\n// T = 0x54,\n// U = 0x55,\n// V = 0x56,\n// W = 0x57,\n// X = 0x58,\n// Y = 0x59,\n// Z = 0x5A,\n// a = 0x61,\n// b = 0x62,\n// c = 0x63,\n// d = 0x64,\n// e = 0x65,\n// f = 0x66,\n// g = 0x67,\n// h = 0x68,\n// i = 0x69,\n// j = 0x6A,\n// k = 0x6B,\n// l = 0x6C,\n// m = 0x6D,\n// n = 0x6E,\n// o = 0x6F,\n// p = 0x70,\n// q = 0x71,\n// r = 0x72,\n// s = 0x73,\n// t = 0x74,\n// u = 0x75,\n// v = 0x76,\n// w = 0x77,\n// x = 0x78,\n// y = 0x79,\n// z = 0x7A\n// }\n", - "number": "import { itoa32, utoa32, itoa64, utoa64, dtoa } from \"./util/number\";\nimport { strtol } from \"./util/string\";\n\n// @ts-ignore: decorator\n@builtin @inline\nexport const NaN: f64 = 0 / 0;\n\n// @ts-ignore: decorator\n@builtin @inline\nexport const Infinity: f64 = 1 / 0;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isNaN(value: T): bool;\n\n// @ts-ignore: decorator\n@builtin\nexport declare function isFinite(value: T): bool;\n\n@final @unmanaged\nexport abstract class I8 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i8 = i8.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i8 = i8.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): i8 {\n return strtol(value, radix);\n }\n\n toString(this: i8, radix: i32 = 10): String {\n return itoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class I16 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i16 = i16.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i16 = i16.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): i16 {\n return strtol(value, radix);\n }\n\n toString(this: i16, radix: i32 = 10): String {\n return itoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class I32 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i32 = i32.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i32 = i32.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): i32 {\n return strtol(value, radix);\n }\n\n toString(this: i32, radix: i32 = 10): String {\n return itoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class I64 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: i64 = i64.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: i64 = i64.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): i64 {\n return strtol(value, radix);\n }\n\n toString(this: i64, radix: i32 = 10): String {\n return itoa64(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class Isize {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: isize = isize.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: isize = isize.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): isize {\n return strtol(value, radix);\n }\n\n toString(this: isize, radix: i32 = 10): String {\n if (sizeof() == 4) {\n return itoa32(this, radix);\n } else {\n return itoa64(this, radix);\n }\n }\n}\n\n@final @unmanaged\nexport abstract class U8 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u8 = u8.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u8 = u8.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): u8 {\n return strtol(value, radix);\n }\n\n toString(this: u8, radix: i32 = 10): String {\n return utoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class U16 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u16 = u16.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u16 = u16.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): u16 {\n return strtol(value, radix);\n }\n\n toString(this: u16, radix: i32 = 10): String {\n return utoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class U32 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u32 = u32.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u32 = u32.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): u32 {\n return strtol(value, radix);\n }\n\n toString(this: u32, radix: i32 = 10): String {\n return utoa32(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class U64 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: u64 = u64.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: u64 = u64.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): u64 {\n return strtol(value, radix);\n }\n\n toString(this: u64, radix: i32 = 10): String {\n return utoa64(this, radix);\n }\n}\n\n@final @unmanaged\nexport abstract class Usize {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: usize = usize.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: usize = usize.MAX_VALUE;\n\n static parseInt(value: string, radix: i32 = 0): usize {\n return strtol(value, radix);\n }\n\n toString(this: usize, radix: i32 = 10): String {\n if (sizeof() == 4) {\n return utoa32(this, radix);\n } else {\n return utoa64(this, radix);\n }\n }\n}\n\n@final @unmanaged\nexport abstract class Bool {\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: bool = bool.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: bool = bool.MAX_VALUE;\n\n toString(this: bool, radix: i32 = 0): String {\n return this ? \"true\" : \"false\";\n }\n}\n\nexport { Bool as Boolean };\n\n@final @unmanaged\nexport abstract class F32 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly EPSILON: f32 = f32.EPSILON;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: f32 = f32.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: f32 = f32.MAX_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_SAFE_INTEGER: f32 = f32.MIN_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_SAFE_INTEGER: f32 = f32.MAX_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly POSITIVE_INFINITY: f32 = f32.POSITIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NEGATIVE_INFINITY: f32 = f32.NEGATIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NaN: f32 = f32.NaN;\n\n static isNaN(value: f32): bool {\n return isNaN(value);\n }\n\n static isFinite(value: f32): bool {\n return isFinite(value);\n }\n\n static isSafeInteger(value: f32): bool {\n return abs(value) <= f32.MAX_SAFE_INTEGER && trunc(value) == value;\n }\n\n static isInteger(value: f32): bool {\n return isFinite(value) && trunc(value) == value;\n }\n\n static parseInt(value: string, radix: i32 = 0): f32 {\n return strtol(value, radix);\n }\n\n static parseFloat(value: string): f32 {\n return parseFloat(value);\n }\n\n toString(this: f32, radix: i32 = 0): String {\n return dtoa(this);\n }\n}\n\n@final @unmanaged\nexport abstract class F64 {\n\n // @ts-ignore: decorator\n @lazy\n static readonly EPSILON: f64 = f64.EPSILON;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_VALUE: f64 = f64.MIN_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_VALUE: f64 = f64.MAX_VALUE;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MIN_SAFE_INTEGER: f64 = f64.MIN_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly MAX_SAFE_INTEGER: f64 = f64.MAX_SAFE_INTEGER;\n\n // @ts-ignore: decorator\n @lazy\n static readonly POSITIVE_INFINITY: f64 = f64.POSITIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NEGATIVE_INFINITY: f64 = f64.NEGATIVE_INFINITY;\n\n // @ts-ignore: decorator\n @lazy\n static readonly NaN: f64 = f64.NaN;\n\n static isNaN(value: f64): bool {\n return isNaN(value);\n }\n\n static isFinite(value: f64): bool {\n return isFinite(value);\n }\n\n static isSafeInteger(value: f64): bool {\n return abs(value) <= f64.MAX_SAFE_INTEGER && trunc(value) == value;\n }\n\n static isInteger(value: f64): bool {\n return isFinite(value) && trunc(value) == value;\n }\n\n static parseInt(value: string, radix: i32 = 0): f64 {\n return strtol(value, radix);\n }\n\n static parseFloat(value: string): f64 {\n return parseFloat(value);\n }\n\n toString(this: f64, radix: i32 = 0): String {\n return dtoa(this);\n }\n}\n\nexport { F64 as Number };\n", - "object": "export class Object {\n static is(value1: T, value2: T): bool {\n if (isFloat()) {\n if (value1 == value2) {\n // 0 === -0, but they are not identical\n if (sizeof() == 8) {\n // @ts-ignore: typecast\n return reinterpret(value1) == reinterpret(value2);\n } else {\n // @ts-ignore: typecast\n return reinterpret(value1) == reinterpret(value2);\n }\n }\n // NaN !== NaN, but they are identical.\n // @ts-ignore: typecast\n return bool(i32(isNaN(value1)) & i32(isNaN(value2)));\n }\n // For references, strings, integers and booleans\n return value1 == value2;\n }\n}\n", - "polyfills": "export function bswap(value: T): T {\n if (isInteger()) {\n if (sizeof() == 1) {\n return value;\n }\n if (sizeof() == 2) {\n return (value << 8 | (value >> 8));\n }\n if (sizeof() == 4) {\n return (\n rotl(value & 0xFF00FF00, 8) |\n rotr(value & 0x00FF00FF, 8)\n );\n }\n if (sizeof() == 8) {\n let a = (value >> 8) & 0x00FF00FF00FF00FF;\n let b = (value & 0x00FF00FF00FF00FF) << 8;\n let v = a | b;\n\n a = (v >>> 16) & 0x0000FFFF0000FFFF;\n b = (v & 0x0000FFFF0000FFFF) << 16;\n\n return rotr(a | b, 32);\n }\n }\n ERROR(\"Unsupported generic type\");\n}\n\nexport function bswap16(value: T): T {\n if (isInteger()) {\n if (sizeof() == 1) {\n return value;\n }\n if (sizeof() == 2) {\n return (value << 8 | (value >> 8));\n }\n if (sizeof() == 4) {\n return (\n (((value & 0xFF) << 8)) |\n ((value >> 8) & 0xFF) |\n (value & 0xFFFF0000)\n );\n }\n }\n ERROR(\"Unsupported generic type\");\n}\n", - "process": "import {\n args_get,\n args_sizes_get,\n environ_get,\n environ_sizes_get,\n proc_exit,\n fd_write,\n fd_close,\n fd_read,\n clock_time_get,\n clockid,\n errnoToString,\n fd,\n tempbuf\n} from \"bindings/wasi\";\n\nimport {\n E_INDEXOUTOFRANGE\n} from \"util/error\";\n\nexport namespace process {\n\n // @ts-ignore: decorator\n @lazy export const arch = sizeof() == 4 ? \"wasm32\" : \"wasm64\";\n\n // @ts-ignore: decorator\n @lazy export const platform = \"wasm\";\n\n // @ts-ignore: decorator\n @lazy export const argv = lazyArgv();\n\n // @ts-ignore: decorator\n @lazy export const env = lazyEnv();\n\n // @ts-ignore: decorator\n @lazy export var exitCode = 0;\n\n export function exit(code: i32 = exitCode): void {\n proc_exit(code);\n }\n\n // @ts-ignore: decorator\n @lazy export const stdin = changetype(0);\n // @ts-ignore: decorator\n @lazy export const stdout = changetype(1);\n // @ts-ignore: decorator\n @lazy export const stderr = changetype(2);\n\n export function time(): i64 {\n var err = clock_time_get(clockid.REALTIME, 1000000, tempbuf);\n if (err) throw new Error(errnoToString(err));\n return load(tempbuf) / 1000000;\n }\n\n export function hrtime(): u64 {\n var err = clock_time_get(clockid.MONOTONIC, 0, tempbuf);\n if (err) throw new Error(errnoToString(err));\n return load(tempbuf);\n }\n}\n\nfunction lazyArgv(): string[] {\n var err = args_sizes_get(tempbuf, tempbuf + sizeof());\n if (err) throw new Error(errnoToString(err));\n var count = load(tempbuf);\n var ptrsSize = count * sizeof();\n var dataSize = load(tempbuf, sizeof());\n var bufSize = ptrsSize + dataSize;\n var buf = __alloc(bufSize);\n err = args_get(buf, buf + ptrsSize);\n if (err) throw new Error(errnoToString(err));\n var count32 = count;\n var argv = new Array(count32);\n for (let i = 0; i < count32; ++i) {\n let ptr = load(buf + i * sizeof());\n let str = String.UTF8.decodeUnsafe(ptr, ptr + bufSize - buf, true);\n argv[i] = str;\n }\n __free(buf);\n return argv;\n}\n\nfunction lazyEnv(): Map {\n var err = environ_sizes_get(tempbuf, tempbuf + 4);\n if (err) throw new Error(errnoToString(err));\n var count = load(tempbuf);\n var ptrsSize = count * sizeof();\n var dataSize = load(tempbuf, sizeof());\n var bufSize = ptrsSize + dataSize;\n var buf = __alloc(bufSize);\n err = environ_get(buf, buf + ptrsSize);\n if (err) throw new Error(errnoToString(err));\n var env = new Map();\n for (let i: usize = 0; i < count; ++i) {\n let ptr = load(buf + i * sizeof());\n let str = String.UTF8.decodeUnsafe(ptr, ptr + bufSize - buf, true);\n let pos = str.indexOf(\"=\");\n if (~pos) {\n env.set(str.substring(0, pos), str.substring(pos + 1));\n // __dispose(changetype(str));\n } else {\n env.set(str, \"\");\n }\n }\n __free(buf);\n return env;\n}\n\n@unmanaged\nabstract class Stream {\n close(): void {\n var err = fd_close(changetype(this));\n if (err) throw new Error(errnoToString(err));\n }\n}\n\n@unmanaged\nabstract class WritableStream extends Stream {\n write(data: T): void {\n if (isString()) {\n writeString(changetype(this), changetype(data));\n } else if (data instanceof ArrayBuffer) {\n writeBuffer(changetype(this), data);\n } else {\n ERROR(\"String or ArrayBuffer expected\");\n }\n }\n}\n\n@unmanaged\nabstract class ReadableStream extends Stream {\n read(buffer: ArrayBuffer, offset: isize = 0): i32 {\n var end = buffer.byteLength;\n if (offset < 0 || offset > end) {\n throw new Error(E_INDEXOUTOFRANGE);\n }\n store(tempbuf, changetype(buffer) + offset);\n store(tempbuf, end - offset, sizeof());\n var err = fd_read(changetype(this), tempbuf, 1, tempbuf + 2 * sizeof());\n if (err) throw new Error(errnoToString(err));\n return load(tempbuf, 2 * sizeof());\n }\n}\n\nfunction writeBuffer(fd: fd, data: ArrayBuffer): void {\n store(tempbuf, changetype(data));\n store(tempbuf, data.byteLength, sizeof());\n var err = fd_write(fd, tempbuf, 1, tempbuf + 2 * sizeof());\n if (err) throw new Error(errnoToString(err));\n}\n\nfunction writeString(fd: fd, data: string): void {\n var len = data.length;\n var\n char2: u32 = 0,\n char3: u32 = 0,\n char4: u32 = 0;\n switch (len) {\n case 4: { // \"null\"\n char4 = load(changetype(data), 6);\n if (char4 >= 0x80) break;\n }\n case 3: { // \"ms\\n\"\n char3 = load(changetype(data), 4);\n if (char3 >= 0x80) break;\n }\n case 2: { // \"\\r\\n\"\n char2 = load(changetype(data), 2);\n if (char2 >= 0x80) break;\n }\n case 1: { // \"\\n\"\n let char1 = load(changetype(data));\n if (char1 >= 0x80) break;\n store(tempbuf, tempbuf + 2 * sizeof());\n store(tempbuf, len, sizeof());\n store(tempbuf, char1 | char2 << 8 | char3 << 16 | char4 << 24, 2 * sizeof());\n let err = fd_write(fd, tempbuf, 1, tempbuf + 3 * sizeof());\n if (err) throw new Error(errnoToString(err));\n }\n case 0: return;\n }\n var utf8len = String.UTF8.byteLength(data);\n var utf8buf = __alloc(utf8len);\n assert(String.UTF8.encodeUnsafe(changetype(data), len, utf8buf) == utf8len);\n store(tempbuf, utf8buf);\n store(tempbuf, utf8len, sizeof());\n var err = fd_write(fd, tempbuf, 1, tempbuf + 2 * sizeof());\n __free(utf8buf);\n if (err) throw new Error(errnoToString(err));\n}\n", - "reference": "@unmanaged\nabstract class Ref {\n}\n\n@final @unmanaged\nexport abstract class Funcref extends Ref {\n}\n\n@final @unmanaged\nexport abstract class Externref extends Ref {\n}\n\n@final @unmanaged\nexport abstract class Anyref extends Ref {\n}\n\n@final @unmanaged\nexport abstract class Eqref extends Ref {\n}\n\n@final @unmanaged\nexport abstract class I31ref extends Ref {\n}\n\n@final @unmanaged\nexport abstract class Dataref extends Ref {\n}\n", - "regexp": "export class RegExp {\n\n // @binding(CALL_NEW, [ STRING, STRING], OBJECT_HANDLE)\n constructor(pattern: string, flags: string = \"\") { throw new Error(\"unreachable\"); }\n\n // @binding(CALL_THIS, [ STRING ], PASS_THRU)\n test(search: string): bool { throw new Error(\"unreachable\"); }\n\n // @binding(CALL_THIS, [], STRING)\n toString(): string { throw new Error(\"unreachable\"); }\n\n}\n", - "rt": "import { Typeinfo, TypeinfoFlags } from \"./shared/typeinfo\";\nimport { E_INDEXOUTOFRANGE } from \"./util/error\";\nimport { OBJECT, TOTAL_OVERHEAD } from \"./rt/common\";\nimport { ArrayBufferView } from \"./arraybuffer\";\n\n// @ts-ignore: decorator\n@builtin\nexport declare const __rtti_base: usize;\n\n// @ts-ignore: decorator\n@builtin @unsafe\nexport declare function __visit_globals(cookie: u32): void;\n\n// @ts-ignore: decorator\n@builtin @unsafe\nexport declare function __visit_members(ref: usize, cookie: u32): void;\n\n// @ts-ignore: decorator\n@unsafe\nexport function __typeinfo(id: u32): TypeinfoFlags {\n var ptr = __rtti_base;\n if (id > load(ptr)) throw new Error(E_INDEXOUTOFRANGE);\n return changetype(ptr + sizeof() + id * offsetof()).flags;\n}\n\n// @ts-ignore: decorator\n@unsafe\nexport function __instanceof(ptr: usize, classId: u32): bool { // keyword\n var id = changetype(ptr - TOTAL_OVERHEAD).rtId;\n var rttiBase = __rtti_base;\n if (id <= load(rttiBase)) {\n do if (id == classId) return true;\n while (id = changetype(rttiBase + sizeof() + id * offsetof()).base);\n }\n return false;\n}\n\n// @ts-ignore: decorator\n@unsafe\nexport function __newBuffer(size: usize, id: u32, data: usize = 0): usize {\n var buffer = __new(size, id);\n if (data) memory.copy(buffer, data, size);\n return buffer;\n}\n\n// @ts-ignore: decorator\n@unsafe\nexport function __newArray(length: i32, alignLog2: usize, id: u32, data: usize = 0): usize {\n var bufferSize = length << alignLog2;\n // make sure `buffer` is tracked by the shadow stack\n var buffer = changetype(__newBuffer(bufferSize, idof(), data));\n // ...since allocating the array may trigger GC steps\n var array = __new(offsetof(), id);\n store(array, changetype(buffer), offsetof(\"buffer\"));\n __link(array, changetype(buffer), false);\n store(array, changetype(buffer), offsetof(\"dataStart\"));\n store(array, bufferSize, offsetof(\"byteLength\"));\n store(array, length, offsetof(\"length_\"));\n return array;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nfunction __tostack(ptr: usize): usize { // eslint-disable-line\n return ptr;\n}\n\n// These are provided by the respective implementation, included as another entry file by asc:\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __alloc(size: usize): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __realloc(ptr: usize, size: usize): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __free(ptr: usize): void;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __new(size: usize, id: u32): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __renew(ptr: usize, size: usize): usize;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __link(parentPtr: usize, childPtr: usize, expectMultiple: bool): void;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __collect(): void;\n\n// // @ts-ignore: decorator\n// @builtin @unsafe\n// export declare function __visit(ptr: usize, cookie: u32): void;\n", - "rt/common": "// Alignment guarantees\n\n// @ts-ignore: decorator\n@inline export const AL_BITS: u32 = 4; // 16 bytes to fit up to v128\n// @ts-ignore: decorator\n@inline export const AL_SIZE: usize = 1 << AL_BITS;\n// @ts-ignore: decorator\n@inline export const AL_MASK: usize = AL_SIZE - 1;\n\n// Extra debugging\n\n// @ts-ignore: decorator\n@inline export const DEBUG = true;\n// @ts-ignore: decorator\n@inline export const TRACE = false;\n// @ts-ignore: decorator\n@inline export const RTRACE = isDefined(ASC_RTRACE);\n// @ts-ignore: decorator\n@inline export const PROFILE = isDefined(ASC_PROFILE);\n\n// Memory manager\n\n// ╒════════════ Memory manager block layout (32-bit) ═════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n// │ MM info │ -4\n// ╞>ptr═══════════════════════════════════════════════════════════╡\n// │ ... │\n@unmanaged export class BLOCK {\n /** Memory manager info. */\n mmInfo: usize;\n}\n\n/** Overhead of a memory manager block. */\n// @ts-ignore: decorator\n@inline export const BLOCK_OVERHEAD: usize = offsetof();\n\n/** Maximum size of a memory manager block's payload. */\n// @ts-ignore: decorator\n@inline export const BLOCK_MAXSIZE: usize = (1 << 30) - BLOCK_OVERHEAD;\n\n// Garbage collector\n\n// ╒══════════ Garbage collector object layout (32-bit) ═══════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n// │ Memory manager block │ -20\n// ╞═══════════════════════════════════════════════════════════════╡\n// │ GC info │ -16\n// ├───────────────────────────────────────────────────────────────┤\n// │ GC info │ -12\n// ├───────────────────────────────────────────────────────────────┤\n// │ RT id │ -8\n// ├───────────────────────────────────────────────────────────────┤\n// │ RT size │ -4\n// ╞>ptr═══════════════════════════════════════════════════════════╡\n// │ ... │\n@unmanaged export class OBJECT extends BLOCK {\n /** Garbage collector info. */\n gcInfo: u32;\n /** Garbage collector info. */\n gcInfo2: u32;\n /** Runtime class id. */\n rtId: u32;\n /** Runtime object size. */\n rtSize: u32;\n}\n\n/** Overhead of a garbage collector object. Excludes memory manager block overhead. */\n// @ts-ignore: decorator\n@inline export const OBJECT_OVERHEAD: usize = (offsetof() - BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK;\n\n/** Maximum size of a garbage collector object's payload. */\n// @ts-ignore: decorator\n@inline export const OBJECT_MAXSIZE: usize = BLOCK_MAXSIZE - OBJECT_OVERHEAD;\n\n/** Total of memory manager and garbage collector overhead. */\n// @ts-ignore: decorator\n@inline export const TOTAL_OVERHEAD: usize = BLOCK_OVERHEAD + OBJECT_OVERHEAD;\n", - "rt/index-incremental": "import \"rt/tlsf\";\nimport \"rt/itcms\";\n", - "rt/index-minimal": "import \"rt/tlsf\";\nimport \"rt/tcms\";\n", - "rt/index-stub": "import \"rt/stub\";\n", - "rt/itcms": "import { BLOCK, BLOCK_OVERHEAD, OBJECT_OVERHEAD, OBJECT_MAXSIZE, TOTAL_OVERHEAD, DEBUG, TRACE, RTRACE, PROFILE } from \"./common\";\nimport { onvisit, oncollect, oninterrupt, onyield } from \"./rtrace\";\nimport { TypeinfoFlags } from \"../shared/typeinfo\";\nimport { E_ALLOCATION_TOO_LARGE, E_ALREADY_PINNED, E_NOT_PINNED } from \"../util/error\";\n\n// === ITCMS: An incremental Tri-Color Mark & Sweep garbage collector ===\n// Adapted from Bach Le's μgc, see: https://github.com/bullno1/ugc\n\n// ╒═════════════╤══════════════ Colors ═══════════════════════════╕\n// │ Color │ Meaning │\n// ├─────────────┼─────────────────────────────────────────────────┤\n// │ WHITE* │ Unprocessed │\n// │ BLACK* │ Processed │\n// │ GRAY │ Processed with unprocessed children │\n// │ TRANSPARENT │ Manually pinned (always reachable) │\n// └─────────────┴─────────────────────────────────────────────────┘\n// * flipped between cycles\n\n// @ts-ignore: decorator\n@lazy var white = 0;\n// @ts-ignore: decorator\n@inline const gray = 2;\n// @ts-ignore: decorator\n@inline const transparent = 3;\n// @ts-ignore: decorator\n@inline const COLOR_MASK = 3;\n\n/** Size in memory of all objects currently managed by the GC. */\n// @ts-ignore: decorator\n@lazy var total: usize = 0;\n\n/** Currently transitioning from SWEEP to MARK state. */\n// @ts-ignore: decorator\n@inline const STATE_IDLE = 0;\n/** Currently marking reachable objects. */\n// @ts-ignore: decorator\n@inline const STATE_MARK = 1;\n/** Currently sweeping unreachable objects. */\n// @ts-ignore: decorator\n@inline const STATE_SWEEP = 2;\n/** Current collector state. */\n// @ts-ignore: decorator\n@lazy var state = STATE_IDLE;\n\n// @ts-ignore: decorator\n@lazy var fromSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy var toSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy var pinSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy var iter: Object; // null\n\nfunction initLazy(space: Object): Object {\n space.nextWithColor = changetype(space);\n space.prev = space;\n return space;\n}\n\n/** Visit cookie indicating scanning of an object. */\n// @ts-ignore: decorator\n@inline const VISIT_SCAN = 0;\n\n// ╒═══════════════ Managed object layout (32-bit) ════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n// │ Memory manager block │\n// ╞═══════════════════════════════════════════════════════════╤═══╡\n// │ next │ C │ = nextWithColor\n// ├───────────────────────────────────────────────────────────┴───┤\n// │ prev │\n// ├───────────────────────────────────────────────────────────────┤\n// │ rtId │\n// ├───────────────────────────────────────────────────────────────┤\n// │ rtSize │\n// ╞>ptr═══════════════════════════════════════════════════════════╡\n// │ ... │\n// C: color\n\n/** Represents a managed object in memory, consisting of a header followed by the object's data. */\n@unmanaged class Object extends BLOCK {\n /** Pointer to the next object with color flags stored in the alignment bits. */\n nextWithColor: usize; // *u32\n /** Pointer to the previous object. */\n prev: Object; // *u32\n /** Runtime id. */\n rtId: u32;\n /** Runtime size. */\n rtSize: u32;\n\n /** Gets the pointer to the next object. */\n get next(): Object {\n return changetype(this.nextWithColor & ~COLOR_MASK);\n }\n\n /** Sets the pointer to the next object. */\n set next(obj: Object) {\n this.nextWithColor = changetype(obj) | (this.nextWithColor & COLOR_MASK);\n }\n\n /** Gets this object's color. */\n get color(): i32 {\n return i32(this.nextWithColor & COLOR_MASK);\n }\n\n /** Sets this object's color. */\n set color(color: i32) {\n this.nextWithColor = (this.nextWithColor & ~COLOR_MASK) | color;\n }\n\n /** Gets the size of this object in memory. */\n get size(): usize {\n return BLOCK_OVERHEAD + (this.mmInfo & ~3);\n }\n\n /** Tests if this object is pointerfree. */\n get isPointerfree(): bool {\n var rtId = this.rtId;\n return rtId <= idof() || (__typeinfo(rtId) & TypeinfoFlags.POINTERFREE) != 0;\n }\n\n /** Unlinks this object from its list. */\n unlink(): void {\n var next = this.next;\n if (next == null) {\n if (DEBUG) assert(this.prev == null && changetype(this) < __heap_base);\n return; // static data not yet linked\n }\n var prev = this.prev;\n if (DEBUG) assert(prev);\n next.prev = prev;\n prev.next = next;\n }\n\n /** Links this object to the specified list, with the given color. */\n linkTo(list: Object, withColor: i32): void {\n let prev = list.prev;\n this.nextWithColor = changetype(list) | withColor;\n this.prev = prev;\n prev.next = this;\n list.prev = this;\n }\n\n /** Marks this object as gray, that is reachable with unscanned children. */\n makeGray(): void {\n if (this == iter) iter = assert(this.prev);\n this.unlink();\n this.linkTo(toSpace, this.isPointerfree ? i32(!white) : gray);\n }\n}\n\n/** Visits all objects considered to be program roots. */\nfunction visitRoots(cookie: u32): void {\n __visit_globals(cookie);\n var pn = pinSpace;\n var iter = pn.next;\n while (iter != pn) {\n if (DEBUG) assert(iter.color == transparent);\n __visit_members(changetype(iter) + TOTAL_OVERHEAD, cookie);\n iter = iter.next;\n }\n}\n\n/** Visits all objects on the stack. */\nfunction visitStack(cookie: u32): void {\n var ptr = __stack_pointer;\n while (ptr < __heap_base) {\n __visit(load(ptr), cookie);\n ptr += sizeof();\n }\n}\n\n/** Performs a single step according to the current state. */\nfunction step(): usize {\n // Magic constants responsible for pause times. Obtained experimentally\n // using the compiler compiling itself. 2048 budget pro run by default.\n const MARKCOST = isDefined(ASC_GC_MARKCOST) ? ASC_GC_MARKCOST : 1;\n const SWEEPCOST = isDefined(ASC_GC_SWEEPCOST) ? ASC_GC_SWEEPCOST : 10;\n var obj: Object;\n switch (state) {\n case STATE_IDLE: {\n state = STATE_MARK;\n visitCount = 0;\n visitRoots(VISIT_SCAN);\n iter = toSpace;\n return visitCount * MARKCOST;\n }\n case STATE_MARK: {\n let black = i32(!white);\n obj = iter.next;\n while (obj != toSpace) {\n iter = obj;\n if (obj.color != black) { // skip already-blacks (pointerfree)\n obj.color = black;\n visitCount = 0;\n __visit_members(changetype(obj) + TOTAL_OVERHEAD, VISIT_SCAN);\n return visitCount * MARKCOST;\n }\n obj = obj.next;\n }\n visitCount = 0;\n visitRoots(VISIT_SCAN);\n obj = iter.next;\n if (obj == toSpace) {\n visitStack(VISIT_SCAN);\n obj = iter.next;\n while (obj != toSpace) {\n if (obj.color != black) {\n obj.color = black;\n __visit_members(changetype(obj) + TOTAL_OVERHEAD, VISIT_SCAN);\n }\n obj = obj.next;\n }\n let from = fromSpace;\n fromSpace = toSpace;\n toSpace = from;\n white = black;\n iter = from.next;\n state = STATE_SWEEP;\n }\n return visitCount * MARKCOST;\n }\n case STATE_SWEEP: {\n obj = iter;\n if (obj != toSpace) {\n iter = obj.next;\n if (DEBUG) assert(obj.color == i32(!white)); // old white\n free(obj);\n return SWEEPCOST;\n }\n toSpace.nextWithColor = changetype(toSpace);\n toSpace.prev = toSpace;\n state = STATE_IDLE;\n break;\n }\n }\n return 0;\n}\n\n/** Frees an object. */\nfunction free(obj: Object): void {\n if (changetype(obj) < __heap_base) {\n obj.nextWithColor = 0; // may become linked again\n obj.prev = changetype(0);\n } else {\n total -= obj.size;\n if (isDefined(__finalize)) {\n __finalize(changetype(obj) + TOTAL_OVERHEAD);\n }\n __free(changetype(obj) + BLOCK_OVERHEAD);\n }\n}\n\n// Garbage collector interface\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __new(size: usize, id: i32): usize {\n if (size >= OBJECT_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n if (total >= threshold) interrupt();\n var obj = changetype(__alloc(OBJECT_OVERHEAD + size) - BLOCK_OVERHEAD);\n obj.rtId = id;\n obj.rtSize = size;\n obj.linkTo(fromSpace, white); // inits next/prev\n total += obj.size;\n var ptr = changetype(obj) + TOTAL_OVERHEAD;\n // may be visited before being fully initialized, so must fill\n memory.fill(ptr, 0, size);\n return ptr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __renew(oldPtr: usize, size: usize): usize {\n var oldObj = changetype(oldPtr - TOTAL_OVERHEAD);\n // Update object size if its block is large enough\n if (size <= (oldObj.mmInfo & ~3) - OBJECT_OVERHEAD) {\n oldObj.rtSize = size;\n return oldPtr;\n }\n // If not the same object anymore, we have to move it move it due to the\n // shadow stack potentially still referencing the old object\n var newPtr = __new(size, oldObj.rtId);\n memory.copy(newPtr, oldPtr, min(size, oldObj.rtSize));\n return newPtr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __link(parentPtr: usize, childPtr: usize, expectMultiple: bool): void {\n // Write barrier is unnecessary if non-incremental\n if (!childPtr) return;\n if (DEBUG) assert(parentPtr);\n var child = changetype(childPtr - TOTAL_OVERHEAD);\n if (child.color == white) {\n let parent = changetype(parentPtr - TOTAL_OVERHEAD);\n let parentColor = parent.color;\n if (parentColor == i32(!white)) {\n // Maintain the invariant that no black object may point to a white object.\n if (expectMultiple) {\n // Move the barrier \"backward\". Suitable for containers receiving multiple stores.\n // Avoids a barrier for subsequent objects stored into the same container.\n parent.makeGray();\n } else {\n // Move the barrier \"forward\". Suitable for objects receiving isolated stores.\n child.makeGray();\n }\n } else if (parentColor == transparent && state == STATE_MARK) {\n // Pinned objects are considered 'black' during the mark phase.\n child.makeGray();\n }\n }\n}\n\n// @ts-ignore: decorator\n@lazy var visitCount = 0;\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __visit(ptr: usize, cookie: i32): void {\n if (!ptr) return;\n let obj = changetype(ptr - TOTAL_OVERHEAD);\n if (RTRACE) if (!onvisit(obj)) return;\n if (obj.color == white) {\n obj.makeGray();\n ++visitCount;\n }\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __pin(ptr: usize): usize {\n if (ptr) {\n let obj = changetype(ptr - TOTAL_OVERHEAD);\n if (obj.color == transparent) {\n throw new Error(E_ALREADY_PINNED);\n }\n obj.unlink(); // from fromSpace\n obj.linkTo(pinSpace, transparent);\n }\n return ptr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __unpin(ptr: usize): void {\n if (!ptr) return;\n var obj = changetype(ptr - TOTAL_OVERHEAD);\n if (obj.color != transparent) {\n throw new Error(E_NOT_PINNED);\n }\n if (state == STATE_MARK) {\n // We may be right at the point after marking roots for the second time and\n // entering the sweep phase, in which case the object would be missed if it\n // is not only pinned but also a root. Make sure it isn't missed.\n obj.makeGray();\n } else {\n obj.unlink();\n obj.linkTo(fromSpace, white);\n }\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __collect(): void {\n if (TRACE) trace(\"GC (full) at\", 1, total);\n if (state > STATE_IDLE) {\n // finish current cycle\n while (state != STATE_IDLE) step();\n }\n // perform a full cycle\n step();\n while (state != STATE_IDLE) step();\n threshold = (total * IDLEFACTOR / 100) + GRANULARITY;\n if (TRACE) trace(\"GC (full) done at cur/max\", 2, total, memory.size() << 16);\n if (RTRACE || PROFILE) oncollect(total);\n}\n\n// Garbage collector automation\n\n/** How often to interrupt. The default of 1024 means \"interrupt each 1024 bytes allocated\". */\n// @ts-ignore: decorator\n@inline const GRANULARITY: usize = isDefined(ASC_GC_GRANULARITY) ? ASC_GC_GRANULARITY : 1024;\n/** How long to interrupt. The default of 200% means \"run at double the speed of allocations\". */\n// @ts-ignore: decorator\n@inline const STEPFACTOR: usize = isDefined(ASC_GC_SWEEPFACTOR) ? ASC_GC_SWEEPFACTOR : 200;\n/** How long to idle. The default of 200% means \"wait for memory to double before kicking in again\". */\n// @ts-ignore: decorator\n@inline const IDLEFACTOR: usize = isDefined(ASC_GC_IDLEFACTOR) ? ASC_GC_IDLEFACTOR : 200;\n\n/** Threshold of memory used by objects to exceed before interrupting again. */\n// @ts-ignore: decorator\n@lazy var threshold: usize = ((memory.size() << 16) - __heap_base) >> 1;\n\n/** Performs a reasonable amount of incremental GC steps. */\nfunction interrupt(): void {\n if (PROFILE) oninterrupt(total);\n if (TRACE) trace(\"GC (auto) at\", 1, total);\n var budget: isize = GRANULARITY * STEPFACTOR / 100;\n do {\n budget -= step();\n if (state == STATE_IDLE) {\n if (TRACE) trace(\"└ GC (auto) done at cur/max\", 2, total, memory.size() << 16);\n threshold = (total * IDLEFACTOR / 100) + GRANULARITY;\n if (PROFILE) onyield(total);\n return;\n }\n } while (budget > 0);\n if (TRACE) trace(\"└ GC (auto) ongoing at\", 1, total);\n threshold = total + GRANULARITY * usize(total - threshold < GRANULARITY);\n if (PROFILE) onyield(total);\n}\n", - "rt/rtrace": "import { BLOCK } from \"./common\";\n\nexport declare function oninit(heapBase: usize): void;\n\n// Memory Allocator\nexport declare function onalloc(block: BLOCK): void;\nexport declare function onresize(block: BLOCK, oldSizeInclOverhead: usize): void;\nexport declare function onmove(oldBlock: BLOCK, newBlock: BLOCK): void;\nexport declare function onfree(block: BLOCK): void;\n\n// Garbage collector\nexport declare function onvisit(block: BLOCK): bool;\nexport declare function oncollect(total: usize): void;\nexport declare function oninterrupt(total: usize): void;\nexport declare function onyield(total: usize): void;\n", - "rt/stub": "import { AL_MASK, OBJECT, OBJECT_OVERHEAD, BLOCK_MAXSIZE, BLOCK_OVERHEAD, BLOCK, OBJECT_MAXSIZE } from \"./common\";\nimport { E_ALLOCATION_TOO_LARGE } from \"../util/error\";\n\n// === A minimal runtime stub ===\n\n// @ts-ignore: decorator\n@lazy var startOffset: usize = ((__heap_base + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD;\n// @ts-ignore: decorator\n@lazy var offset: usize = startOffset;\n\nfunction maybeGrowMemory(newOffset: usize): void {\n // assumes newOffset is aligned\n var pagesBefore = memory.size();\n var maxOffset = ((pagesBefore << 16) + AL_MASK) & ~AL_MASK;\n if (newOffset > maxOffset) {\n let pagesNeeded = (((newOffset - maxOffset + 0xffff) & ~0xffff) >>> 16);\n let pagesWanted = max(pagesBefore, pagesNeeded); // double memory\n if (memory.grow(pagesWanted) < 0) {\n if (memory.grow(pagesNeeded) < 0) unreachable(); // out of memory\n }\n }\n offset = newOffset;\n}\n\n// @ts-ignore: decorator\n@inline function computeSize(size: usize): usize {\n return ((size + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@unsafe @global\nexport function __alloc(size: usize): usize {\n if (size > BLOCK_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n var block = changetype(offset);\n var ptr = offset + BLOCK_OVERHEAD;\n var payloadSize = computeSize(size);\n maybeGrowMemory(ptr + payloadSize);\n block.mmInfo = payloadSize;\n return ptr;\n}\n\n// @ts-ignore: decorator\n@unsafe @global\nexport function __realloc(ptr: usize, size: usize): usize {\n assert(ptr != 0 && !(ptr & AL_MASK)); // must exist and be aligned\n var block = changetype(ptr - BLOCK_OVERHEAD);\n var actualSize = block.mmInfo;\n var isLast = ptr + actualSize == offset;\n var payloadSize = computeSize(size);\n if (size > actualSize) {\n if (isLast) { // last block: grow\n if (size > BLOCK_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n maybeGrowMemory(ptr + payloadSize);\n block.mmInfo = payloadSize;\n } else { // copy to new block at least double the size\n let newPtr = __alloc(max(payloadSize, actualSize << 1));\n memory.copy(newPtr, ptr, actualSize);\n block = changetype((ptr = newPtr) - BLOCK_OVERHEAD);\n }\n } else if (isLast) { // last block: shrink\n offset = ptr + payloadSize;\n block.mmInfo = payloadSize;\n }\n return ptr;\n}\n\n// @ts-ignore: decorator\n@unsafe @global\nexport function __free(ptr: usize): void {\n assert(ptr != 0 && !(ptr & AL_MASK)); // must exist and be aligned\n var block = changetype(ptr - BLOCK_OVERHEAD);\n if (ptr + block.mmInfo == offset) { // last block: discard\n offset = changetype(block);\n }\n}\n\n// @ts-ignore: decorator\n@unsafe @global\nexport function __reset(): void { // special\n offset = startOffset;\n}\n\n// @ts-ignore: decorator\n@unsafe @global\nexport function __new(size: usize, id: u32): usize {\n if (size > OBJECT_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n var ptr = __alloc(OBJECT_OVERHEAD + size);\n var object = changetype(ptr - BLOCK_OVERHEAD);\n object.gcInfo = 0;\n object.gcInfo2 = 0;\n object.rtId = id;\n object.rtSize = size;\n return ptr + OBJECT_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@unsafe @global\nexport function __renew(oldPtr: usize, size: usize): usize {\n if (size > OBJECT_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n var newPtr = __realloc(oldPtr - OBJECT_OVERHEAD, OBJECT_OVERHEAD + size);\n changetype(newPtr - BLOCK_OVERHEAD).rtSize = size;\n return newPtr + OBJECT_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __link(parentPtr: usize, childPtr: usize, expectMultiple: bool): void {\n // nop\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __pin(ptr: usize): usize {\n return ptr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __unpin(ptr: usize): void {\n // nop\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nfunction __visit(ptr: usize, cookie: u32): void { // eslint-disable-line @typescript-eslint/no-unused-vars\n // nop\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __collect(): void {\n // nop\n}\n", - "rt/tcms": "import { BLOCK, BLOCK_OVERHEAD, OBJECT_OVERHEAD, OBJECT_MAXSIZE, TOTAL_OVERHEAD, DEBUG, TRACE, RTRACE } from \"./common\";\nimport { onvisit, oncollect } from \"./rtrace\";\nimport { E_ALLOCATION_TOO_LARGE, E_ALREADY_PINNED, E_NOT_PINNED } from \"../util/error\";\n\n// === TCMS: A Two-Color Mark & Sweep garbage collector ===\n\n// ╒═════════════╤══════════════ Colors ═══════════════════════════╕\n// │ Color │ Meaning │\n// ├─────────────┼─────────────────────────────────────────────────┤\n// │ WHITE* │ Unreachable │\n// │ BLACK* │ Reachable │\n// │ TRANSPARENT │ Manually pinned (always reachable) │\n// └─────────────┴─────────────────────────────────────────────────┘\n// * flipped between cycles\n\n// @ts-ignore: decorator\n@lazy var white = 0;\n// @ts-ignore: decorator\n@inline const transparent = 3;\n// @ts-ignore: decorator\n@inline const COLOR_MASK = 3;\n\n/** Size in memory of all objects currently managed by the GC. */\n// @ts-ignore: decorator\n@lazy var total: usize = 0;\n\n// @ts-ignore: decorator\n@lazy var fromSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy var toSpace = initLazy(changetype(memory.data(offsetof())));\n// @ts-ignore: decorator\n@lazy var pinSpace = initLazy(changetype(memory.data(offsetof())));\n\nfunction initLazy(space: Object): Object {\n space.nextWithColor = changetype(space);\n space.prev = space;\n return space;\n}\n\n/** Visit cookie indicating scanning of an object. */\n// @ts-ignore: decorator\n@inline const VISIT_SCAN = 0;\n\n// ╒═══════════════ Managed object layout (32-bit) ════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤\n// │ Memory manager block │\n// ╞═══════════════════════════════════════════════════════════╤═══╡\n// │ next │ C │ = nextWithColor\n// ├───────────────────────────────────────────────────────────┴───┤\n// │ prev │\n// ├───────────────────────────────────────────────────────────────┤\n// │ rtId │\n// ├───────────────────────────────────────────────────────────────┤\n// │ rtSize │\n// ╞>ptr═══════════════════════════════════════════════════════════╡\n// │ ... │\n// C: color\n\n/** Represents a managed object in memory, consisting of a header followed by the object's data. */\n@unmanaged class Object extends BLOCK {\n /** Pointer to the next object with color flags stored in the alignment bits. */\n nextWithColor: usize; // *u32\n /** Pointer to the previous object. */\n prev: Object; // *u32\n /** Runtime id. */\n rtId: u32;\n /** Runtime size. */\n rtSize: u32;\n\n /** Gets the pointer to the next object. */\n get next(): Object {\n return changetype(this.nextWithColor & ~COLOR_MASK);\n }\n\n /** Sets the pointer to the next object. */\n set next(obj: Object) {\n this.nextWithColor = changetype(obj) | (this.nextWithColor & COLOR_MASK);\n }\n\n /** Gets this object's color. */\n get color(): i32 {\n return i32(this.nextWithColor & COLOR_MASK);\n }\n\n /** Sets this object's color. */\n set color(color: i32) {\n this.nextWithColor = (this.nextWithColor & ~COLOR_MASK) | color;\n }\n\n /** Gets the size of this object in memory. */\n get size(): usize {\n return BLOCK_OVERHEAD + (this.mmInfo & ~3);\n }\n\n /** Unlinks this object from its list. */\n unlink(): void {\n let next = this.next;\n if (next == null) {\n if (DEBUG) assert(this.prev == null && changetype(this) < __heap_base);\n return; // static data not yet linked\n }\n let prev = this.prev;\n if (DEBUG) assert(prev);\n next.prev = prev;\n prev.next = next;\n }\n\n /** Links this object to the specified list, with the given color. */\n linkTo(list: Object, withColor: i32): void {\n let prev = list.prev;\n this.nextWithColor = changetype(list) | withColor;\n this.prev = prev;\n prev.next = this;\n list.prev = this;\n }\n}\n\n// Garbage collector interface\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __new(size: usize, id: i32): usize {\n if (size > OBJECT_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n var obj = changetype(__alloc(OBJECT_OVERHEAD + size) - BLOCK_OVERHEAD);\n obj.rtId = id;\n obj.rtSize = size;\n obj.linkTo(fromSpace, white);\n total += obj.size;\n return changetype(obj) + TOTAL_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __renew(oldPtr: usize, size: usize): usize {\n var oldObj = changetype(oldPtr - TOTAL_OVERHEAD);\n if (oldPtr < __heap_base) { // move to heap for simplicity\n let newPtr = __new(size, oldObj.rtId);\n memory.copy(newPtr, oldPtr, min(size, oldObj.rtSize));\n return newPtr;\n }\n if (size > OBJECT_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n total -= oldObj.size;\n var newPtr = __realloc(oldPtr - OBJECT_OVERHEAD, OBJECT_OVERHEAD + size) + OBJECT_OVERHEAD;\n var newObj = changetype(newPtr - TOTAL_OVERHEAD);\n newObj.rtSize = size;\n\n // Replace with new object\n newObj.next.prev = newObj;\n newObj.prev.next = newObj;\n\n total += newObj.size;\n return newPtr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __link(parentPtr: usize, childPtr: usize, expectMultiple: bool): void {\n // nop\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __visit(ptr: usize, cookie: i32): void {\n if (!ptr) return;\n let obj = changetype(ptr - TOTAL_OVERHEAD);\n if (RTRACE) if (!onvisit(obj)) return;\n if (obj.color == white) {\n obj.unlink(); // from fromSpace\n obj.linkTo(toSpace, i32(!white));\n }\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __pin(ptr: usize): usize {\n if (ptr) {\n let obj = changetype(ptr - TOTAL_OVERHEAD);\n if (obj.color == transparent) {\n throw new Error(E_ALREADY_PINNED);\n }\n obj.unlink(); // from fromSpace\n obj.linkTo(pinSpace, transparent);\n }\n return ptr;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __unpin(ptr: usize): void {\n if (!ptr) return;\n var obj = changetype(ptr - TOTAL_OVERHEAD);\n if (obj.color != transparent) {\n throw new Error(E_NOT_PINNED);\n }\n obj.unlink(); // from pinSpace\n obj.linkTo(fromSpace, white);\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __collect(): void {\n if (TRACE) trace(\"GC at\", 1, total);\n\n // Mark roots (add to toSpace)\n __visit_globals(VISIT_SCAN);\n\n // Mark direct members of pinned objects (add to toSpace)\n var pn = pinSpace;\n var iter = pn.next;\n while (iter != pn) {\n if (DEBUG) assert(iter.color == transparent);\n __visit_members(changetype(iter) + TOTAL_OVERHEAD, VISIT_SCAN);\n iter = iter.next;\n }\n\n // Mark what's reachable from toSpace\n var black = i32(!white);\n var to = toSpace;\n iter = to.next;\n while (iter != to) {\n if (DEBUG) assert(iter.color == black);\n __visit_members(changetype(iter) + TOTAL_OVERHEAD, VISIT_SCAN);\n iter = iter.next;\n }\n\n // Sweep what's left in fromSpace\n var from = fromSpace;\n iter = from.next;\n while (iter != from) {\n if (DEBUG) assert(iter.color == white);\n let newNext = iter.next;\n if (changetype(iter) < __heap_base) {\n iter.nextWithColor = 0; // may become linked again\n iter.prev = changetype(0);\n } else {\n total -= iter.size;\n if (isDefined(__finalize)) __finalize(changetype(iter) + TOTAL_OVERHEAD);\n __free(changetype(iter) + BLOCK_OVERHEAD);\n }\n iter = newNext;\n }\n from.nextWithColor = changetype(from);\n from.prev = from;\n\n // Flip spaces and colors\n fromSpace = to;\n toSpace = from;\n white = black;\n\n if (TRACE) trace(\"GC done at\", 1, total);\n if (RTRACE) oncollect(total);\n}\n", - "rt/tlsf": "import { AL_BITS, AL_SIZE, AL_MASK, DEBUG, BLOCK, BLOCK_OVERHEAD, BLOCK_MAXSIZE } from \"./common\";\nimport { oninit, onalloc, onresize, onmove, onfree } from \"./rtrace\";\nimport { E_ALLOCATION_TOO_LARGE } from \"../util/error\";\n\n// === The TLSF (Two-Level Segregate Fit) memory allocator ===\n// see: http://www.gii.upv.es/tlsf/\n\n// - `ffs(x)` is equivalent to `ctz(x)` with x != 0\n// - `fls(x)` is equivalent to `sizeof(x) * 8 - clz(x) - 1`\n\n// ╒══════════════ Block size interpretation (32-bit) ═════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┴─┴─┴─╫─┴─┴─┴─┤\n// │ | FL │ SB = SL + AL │ ◄─ usize\n// └───────────────────────────────────────────────┴───────╨───────┘\n// FL: first level, SL: second level, AL: alignment, SB: small block\n\n// @ts-ignore: decorator\n@inline const SL_BITS: u32 = 4;\n// @ts-ignore: decorator\n@inline const SL_SIZE: u32 = 1 << SL_BITS;\n\n// @ts-ignore: decorator\n@inline const SB_BITS: u32 = SL_BITS + AL_BITS;\n// @ts-ignore: decorator\n@inline const SB_SIZE: u32 = 1 << SB_BITS;\n\n// @ts-ignore: decorator\n@inline const FL_BITS: u32 = 31 - SB_BITS;\n\n// [00]: < 256B (SB) [12]: < 1M\n// [01]: < 512B [13]: < 2M\n// [02]: < 1K [14]: < 4M\n// [03]: < 2K [15]: < 8M\n// [04]: < 4K [16]: < 16M\n// [05]: < 8K [17]: < 32M\n// [06]: < 16K [18]: < 64M\n// [07]: < 32K [19]: < 128M\n// [08]: < 64K [20]: < 256M\n// [09]: < 128K [21]: < 512M\n// [10]: < 256K [22]: <= 1G - OVERHEAD\n// [11]: < 512K\n// VMs limit to 2GB total (currently), making one 1G block max (or three 512M etc.) due to block overhead\n\n// Tags stored in otherwise unused alignment bits\n\n// @ts-ignore: decorator\n@inline const FREE: usize = 1 << 0;\n// @ts-ignore: decorator\n@inline const LEFTFREE: usize = 1 << 1;\n// @ts-ignore: decorator\n@inline const TAGS_MASK: usize = FREE | LEFTFREE; // <= AL_MASK\n\n// ╒════════════════════ Block layout (32-bit) ════════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┼─┤ ┐\n// │ size │L│F│ ◄─┐ info overhead\n// ╞>ptr═══════════════════════════════════════════════════════╧═╧═╡ │ ┘\n// │ if free: ◄ prev │ ◄─┤ usize\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ if free: next ► │ ◄─┤\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ ... │ │ >= 0\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ if free: back ▲ │ ◄─┘\n// └───────────────────────────────────────────────────────────────┘ >= MIN SIZE\n// F: FREE, L: LEFTFREE\n@unmanaged export class Block extends BLOCK {\n\n /** Previous free block, if any. Only valid if free, otherwise part of payload. */\n prev: Block | null;\n /** Next free block, if any. Only valid if free, otherwise part of payload. */\n next: Block | null;\n\n // If the block is free, there is a 'back'reference at its end pointing at its start.\n}\n\n// Block constants. A block must have a minimum size of three pointers so it can hold `prev`,\n// `next` and `back` if free.\n\n// @ts-ignore: decorator\n@inline const BLOCK_MINSIZE: usize = ((3 * sizeof() + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD; // prev + next + back\n// @ts-ignore: decorator\n// @inline const BLOCK_MAXSIZE: usize = 1 << (FL_BITS + SB_BITS - 1); // exclusive, lives in common.ts\n\n/** Gets the left block of a block. Only valid if the left block is free. */\n// @ts-ignore: decorator\n@inline function GETFREELEFT(block: Block): Block {\n return load(changetype(block) - sizeof());\n}\n\n/** Gets the right block of a block by advancing to the right by its size. */\n// @ts-ignore: decorator\n@inline function GETRIGHT(block: Block): Block {\n return changetype(changetype(block) + BLOCK_OVERHEAD + (block.mmInfo & ~TAGS_MASK));\n}\n\n// ╒═════════════════════ Root layout (32-bit) ════════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ┐\n// │ 0 | flMap S│ ◄────┐\n// ╞═══════════════════════════════════════════════════════════════╡ │\n// │ slMap[0] S │ ◄─┐ │\n// ├───────────────────────────────────────────────────────────────┤ │ │\n// │ slMap[1] │ ◄─┤ │\n// ├───────────────────────────────────────────────────────────────┤ u32 │\n// │ slMap[22] │ ◄─┘ │\n// ╞═══════════════════════════════════════════════════════════════╡ usize\n// │ head[0] │ ◄────┤\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ ... │ ◄────┤\n// ├───────────────────────────────────────────────────────────────┤ │\n// │ head[367] │ ◄────┤\n// ╞═══════════════════════════════════════════════════════════════╡ │\n// │ tail │ ◄────┘\n// └───────────────────────────────────────────────────────────────┘ SIZE ┘\n// S: Small blocks map\n@unmanaged class Root {\n /** First level bitmap. */\n flMap: usize;\n}\n\n// Root constants. Where stuff is stored inside of the root structure.\n\n// @ts-ignore: decorator\n@inline const SL_START: usize = sizeof();\n// @ts-ignore: decorator\n@inline const SL_END: usize = SL_START + (FL_BITS << alignof());\n// @ts-ignore: decorator\n@inline const HL_START: usize = (SL_END + AL_MASK) & ~AL_MASK;\n// @ts-ignore: decorator\n@inline const HL_END: usize = HL_START + FL_BITS * SL_SIZE * sizeof();\n// @ts-ignore: decorator\n@inline const ROOT_SIZE: usize = HL_END + sizeof();\n\n// @ts-ignore: decorator\n@lazy export var ROOT: Root;\n\n/** Gets the second level map of the specified first level. */\n// @ts-ignore: decorator\n@inline function GETSL(root: Root, fl: usize): u32 {\n return load(\n changetype(root) + (fl << alignof()),\n SL_START\n );\n}\n\n/** Sets the second level map of the specified first level. */\n// @ts-ignore: decorator\n@inline function SETSL(root: Root, fl: usize, slMap: u32): void {\n store(\n changetype(root) + (fl << alignof()),\n slMap,\n SL_START\n );\n}\n\n/** Gets the head of the free list for the specified combination of first and second level. */\n// @ts-ignore: decorator\n@inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null {\n return load(\n changetype(root) + (((fl << SL_BITS) + sl) << alignof()),\n HL_START\n );\n}\n\n/** Sets the head of the free list for the specified combination of first and second level. */\n// @ts-ignore: decorator\n@inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void {\n store(\n changetype(root) + (((fl << SL_BITS) + sl) << alignof()),\n head,\n HL_START\n );\n}\n\n/** Gets the tail block.. */\n// @ts-ignore: decorator\n@inline function GETTAIL(root: Root): Block {\n return load(\n changetype(root),\n HL_END\n );\n}\n\n/** Sets the tail block. */\n// @ts-ignore: decorator\n@inline function SETTAIL(root: Root, tail: Block): void {\n store(\n changetype(root),\n tail,\n HL_END\n );\n}\n\n/** Inserts a previously used block back into the free list. */\nfunction insertBlock(root: Root, block: Block): void {\n if (DEBUG) assert(block); // cannot be null\n var blockInfo = block.mmInfo;\n if (DEBUG) assert(blockInfo & FREE); // must be free\n\n var right = GETRIGHT(block);\n var rightInfo = right.mmInfo;\n\n // merge with right block if also free\n if (rightInfo & FREE) {\n removeBlock(root, right);\n block.mmInfo = blockInfo = blockInfo + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK); // keep block tags\n right = GETRIGHT(block);\n rightInfo = right.mmInfo;\n // 'back' is set below\n }\n\n // merge with left block if also free\n if (blockInfo & LEFTFREE) {\n let left = GETFREELEFT(block);\n let leftInfo = left.mmInfo;\n if (DEBUG) assert(leftInfo & FREE); // must be free according to right tags\n removeBlock(root, left);\n block = left;\n block.mmInfo = blockInfo = leftInfo + BLOCK_OVERHEAD + (blockInfo & ~TAGS_MASK); // keep left tags\n // 'back' is set below\n }\n\n right.mmInfo = rightInfo | LEFTFREE;\n // reference to right is no longer used now, hence rightInfo is not synced\n\n // we now know the size of the block\n var size = blockInfo & ~TAGS_MASK;\n if (DEBUG) assert(size >= BLOCK_MINSIZE); // must be a valid size\n if (DEBUG) assert(changetype(block) + BLOCK_OVERHEAD + size == changetype(right)); // must match\n\n // set 'back' to itself at the end of block\n store(changetype(right) - sizeof(), block);\n\n // mapping_insert\n var fl: usize, sl: u32;\n if (size < SB_SIZE) {\n fl = 0;\n sl = (size >> AL_BITS);\n } else {\n const inv: usize = sizeof() * 8 - 1;\n let boundedSize = min(size, BLOCK_MAXSIZE);\n fl = inv - clz(boundedSize);\n sl = ((boundedSize >> (fl - SL_BITS)) ^ (1 << SL_BITS));\n fl -= SB_BITS - 1;\n }\n if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range\n\n // perform insertion\n var head = GETHEAD(root, fl, sl);\n block.prev = null;\n block.next = head;\n if (head) head.prev = block;\n SETHEAD(root, fl, sl, block);\n\n // update first and second level maps\n root.flMap |= (1 << fl);\n SETSL(root, fl, GETSL(root, fl) | (1 << sl));\n}\n\n/** Removes a free block from internal lists. */\nfunction removeBlock(root: Root, block: Block): void {\n var blockInfo = block.mmInfo;\n if (DEBUG) assert(blockInfo & FREE); // must be free\n var size = blockInfo & ~TAGS_MASK;\n if (DEBUG) assert(size >= BLOCK_MINSIZE); // must be valid\n\n // mapping_insert\n var fl: usize, sl: u32;\n if (size < SB_SIZE) {\n fl = 0;\n sl = (size >> AL_BITS);\n } else {\n const inv: usize = sizeof() * 8 - 1;\n let boundedSize = min(size, BLOCK_MAXSIZE);\n fl = inv - clz(boundedSize);\n sl = ((boundedSize >> (fl - SL_BITS)) ^ (1 << SL_BITS));\n fl -= SB_BITS - 1;\n }\n if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range\n\n // link previous and next free block\n var prev = block.prev;\n var next = block.next;\n if (prev) prev.next = next;\n if (next) next.prev = prev;\n\n // update head if we are removing it\n if (block == GETHEAD(root, fl, sl)) {\n SETHEAD(root, fl, sl, next);\n\n // clear second level map if head is empty now\n if (!next) {\n let slMap = GETSL(root, fl);\n SETSL(root, fl, slMap &= ~(1 << sl));\n\n // clear first level map if second level is empty now\n if (!slMap) root.flMap &= ~(1 << fl);\n }\n }\n // note: does not alter left/back because it is likely that splitting\n // is performed afterwards, invalidating those changes. so, the caller\n // must perform those updates.\n}\n\n/** Searches for a free block of at least the specified size. */\nfunction searchBlock(root: Root, size: usize): Block | null {\n // size was already asserted by caller\n\n // mapping_search\n var fl: usize, sl: u32;\n if (size < SB_SIZE) {\n fl = 0;\n sl = (size >> AL_BITS);\n } else {\n const halfMaxSize = BLOCK_MAXSIZE >> 1; // don't round last fl\n const inv: usize = sizeof() * 8 - 1;\n const invRound = inv - SL_BITS;\n let requestSize = size < halfMaxSize\n ? size + (1 << (invRound - clz(size))) - 1\n : size;\n fl = inv - clz(requestSize);\n sl = ((requestSize >> (fl - SL_BITS)) ^ (1 << SL_BITS));\n fl -= SB_BITS - 1;\n }\n if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range\n\n // search second level\n var slMap = GETSL(root, fl) & (~0 << sl);\n var head: Block | null = null;\n if (!slMap) {\n // search next larger first level\n let flMap = root.flMap & (~0 << (fl + 1));\n if (!flMap) {\n head = null;\n } else {\n fl = ctz(flMap);\n slMap = GETSL(root, fl);\n if (DEBUG) assert(slMap); // can't be zero if fl points here\n head = GETHEAD(root, fl, ctz(slMap));\n }\n } else {\n head = GETHEAD(root, fl, ctz(slMap));\n }\n return head;\n}\n\n/** Prepares the specified block before (re-)use, possibly splitting it. */\nfunction prepareBlock(root: Root, block: Block, size: usize): void {\n // size was already asserted by caller\n\n var blockInfo = block.mmInfo;\n if (DEBUG) assert(!((size + BLOCK_OVERHEAD) & AL_MASK)); // size must be aligned so the new block is\n\n // split if the block can hold another MINSIZE block incl. overhead\n var remaining = (blockInfo & ~TAGS_MASK) - size;\n if (remaining >= BLOCK_OVERHEAD + BLOCK_MINSIZE) {\n block.mmInfo = size | (blockInfo & LEFTFREE); // also discards FREE\n\n let spare = changetype(changetype(block) + BLOCK_OVERHEAD + size);\n spare.mmInfo = (remaining - BLOCK_OVERHEAD) | FREE; // not LEFTFREE\n insertBlock(root, spare); // also sets 'back'\n\n // otherwise tag block as no longer FREE and right as no longer LEFTFREE\n } else {\n block.mmInfo = blockInfo & ~FREE;\n GETRIGHT(block).mmInfo &= ~LEFTFREE;\n }\n}\n\n/** Adds more memory to the pool. */\nfunction addMemory(root: Root, start: usize, end: usize): bool {\n if (DEBUG) assert(start <= end); // must be valid\n start = ((start + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD;\n end &= ~AL_MASK;\n\n var tail = GETTAIL(root);\n var tailInfo: usize = 0;\n if (tail) { // more memory\n if (DEBUG) assert(start >= changetype(tail) + BLOCK_OVERHEAD);\n\n // merge with current tail if adjacent\n const offsetToTail = AL_SIZE;\n if (start - offsetToTail == changetype(tail)) {\n start -= offsetToTail;\n tailInfo = tail.mmInfo;\n } else {\n // We don't do this, but a user might `memory.grow` manually\n // leading to non-adjacent pages managed by TLSF.\n }\n\n } else if (DEBUG) { // first memory\n assert(start >= changetype(root) + ROOT_SIZE); // starts after root\n }\n\n // check if size is large enough for a free block and the tail block\n var size = end - start;\n if (size < BLOCK_OVERHEAD + BLOCK_MINSIZE + BLOCK_OVERHEAD) {\n return false;\n }\n\n // left size is total minus its own and the zero-length tail's header\n var leftSize = size - 2 * BLOCK_OVERHEAD;\n var left = changetype(start);\n left.mmInfo = leftSize | FREE | (tailInfo & LEFTFREE);\n left.prev = null;\n left.next = null;\n\n // tail is a zero-length used block\n tail = changetype(start + BLOCK_OVERHEAD + leftSize);\n tail.mmInfo = 0 | LEFTFREE;\n SETTAIL(root, tail);\n\n insertBlock(root, left); // also merges with free left before tail / sets 'back'\n\n return true;\n}\n\n/** Grows memory to fit at least another block of the specified size. */\nfunction growMemory(root: Root, size: usize): void {\n if (ASC_LOW_MEMORY_LIMIT) {\n unreachable();\n return;\n }\n // Here, both rounding performed in searchBlock ...\n const halfMaxSize = BLOCK_MAXSIZE >> 1;\n if (size < halfMaxSize) { // don't round last fl\n const invRound = (sizeof() * 8 - 1) - SL_BITS;\n size += (1 << (invRound - clz(size))) - 1;\n }\n // and additional BLOCK_OVERHEAD must be taken into account. If we are going\n // to merge with the tail block, that's one time, otherwise it's two times.\n var pagesBefore = memory.size();\n size += BLOCK_OVERHEAD << usize((pagesBefore << 16) - BLOCK_OVERHEAD != changetype(GETTAIL(root)));\n var pagesNeeded = (((size + 0xffff) & ~0xffff) >>> 16);\n var pagesWanted = max(pagesBefore, pagesNeeded); // double memory\n if (memory.grow(pagesWanted) < 0) {\n if (memory.grow(pagesNeeded) < 0) unreachable();\n }\n var pagesAfter = memory.size();\n addMemory(root, pagesBefore << 16, pagesAfter << 16);\n}\n\n/** Computes the size (excl. header) of a block. */\nfunction computeSize(size: usize): usize {\n // Size must be large enough and aligned minus preceeding overhead\n return size <= BLOCK_MINSIZE\n ? BLOCK_MINSIZE\n : ((size + BLOCK_OVERHEAD + AL_MASK) & ~AL_MASK) - BLOCK_OVERHEAD;\n}\n\n/** Prepares and checks an allocation size. */\nfunction prepareSize(size: usize): usize {\n if (size > BLOCK_MAXSIZE) throw new Error(E_ALLOCATION_TOO_LARGE);\n return computeSize(size);\n}\n\n/** Initializes the root structure. */\nfunction initialize(): void {\n if (isDefined(ASC_RTRACE)) oninit(__heap_base);\n var rootOffset = (__heap_base + AL_MASK) & ~AL_MASK;\n var pagesBefore = memory.size();\n var pagesNeeded = ((((rootOffset + ROOT_SIZE) + 0xffff) & ~0xffff) >>> 16);\n if (pagesNeeded > pagesBefore && memory.grow(pagesNeeded - pagesBefore) < 0) unreachable();\n var root = changetype(rootOffset);\n root.flMap = 0;\n SETTAIL(root, changetype(0));\n for (let fl: usize = 0; fl < FL_BITS; ++fl) {\n SETSL(root, fl, 0);\n for (let sl: u32 = 0; sl < SL_SIZE; ++sl) {\n SETHEAD(root, fl, sl, null);\n }\n }\n var memStart = rootOffset + ROOT_SIZE;\n if (ASC_LOW_MEMORY_LIMIT) {\n const memEnd = ASC_LOW_MEMORY_LIMIT & ~AL_MASK;\n if (memStart <= memEnd) addMemory(root, memStart, memEnd);\n else unreachable(); // low memory limit already exceeded\n } else {\n addMemory(root, memStart, memory.size() << 16);\n }\n ROOT = root;\n}\n\n/** Allocates a block of the specified size. */\nexport function allocateBlock(root: Root, size: usize): Block {\n var payloadSize = prepareSize(size);\n var block = searchBlock(root, payloadSize);\n if (!block) {\n growMemory(root, payloadSize);\n block = changetype(searchBlock(root, payloadSize));\n if (DEBUG) assert(block); // must be found now\n }\n if (DEBUG) assert((block.mmInfo & ~TAGS_MASK) >= payloadSize); // must fit\n removeBlock(root, block);\n prepareBlock(root, block, payloadSize);\n if (isDefined(ASC_RTRACE)) onalloc(block);\n return block;\n}\n\n/** Reallocates a block to the specified size. */\nexport function reallocateBlock(root: Root, block: Block, size: usize): Block {\n var payloadSize = prepareSize(size);\n var blockInfo = block.mmInfo;\n var blockSize = blockInfo & ~TAGS_MASK;\n\n // possibly split and update runtime size if it still fits\n if (payloadSize <= blockSize) {\n prepareBlock(root, block, payloadSize);\n if (isDefined(ASC_RTRACE)) {\n if (payloadSize != blockSize) onresize(block, BLOCK_OVERHEAD + blockSize);\n }\n return block;\n }\n\n // merge with right free block if merger is large enough\n var right = GETRIGHT(block);\n var rightInfo = right.mmInfo;\n if (rightInfo & FREE) {\n let mergeSize = blockSize + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK);\n if (mergeSize >= payloadSize) {\n removeBlock(root, right);\n block.mmInfo = (blockInfo & TAGS_MASK) | mergeSize;\n prepareBlock(root, block, payloadSize);\n if (isDefined(ASC_RTRACE)) onresize(block, BLOCK_OVERHEAD + blockSize);\n return block;\n }\n }\n\n // otherwise move the block\n return moveBlock(root, block, size);\n}\n\n/** Moves a block to a new one of the specified size. */\nfunction moveBlock(root: Root, block: Block, newSize: usize): Block {\n var newBlock = allocateBlock(root, newSize);\n memory.copy(changetype(newBlock) + BLOCK_OVERHEAD, changetype(block) + BLOCK_OVERHEAD, block.mmInfo & ~TAGS_MASK);\n if (changetype(block) >= __heap_base) {\n if (isDefined(ASC_RTRACE)) onmove(block, newBlock);\n freeBlock(root, block);\n }\n return newBlock;\n}\n\n/** Frees a block. */\nexport function freeBlock(root: Root, block: Block): void {\n if (isDefined(ASC_RTRACE)) onfree(block);\n block.mmInfo = block.mmInfo | FREE;\n insertBlock(root, block);\n}\n\n/** Checks that a used block is valid to be freed or reallocated. */\nfunction checkUsedBlock(ptr: usize): Block {\n var block = changetype(ptr - BLOCK_OVERHEAD);\n assert(\n ptr != 0 && !(ptr & AL_MASK) && // must exist and be aligned\n !(block.mmInfo & FREE) // must be used\n );\n return block;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __alloc(size: usize): usize {\n if (!ROOT) initialize();\n return changetype(allocateBlock(ROOT, size)) + BLOCK_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __realloc(ptr: usize, size: usize): usize {\n if (!ROOT) initialize();\n return (ptr < __heap_base\n ? changetype(moveBlock(ROOT, checkUsedBlock(ptr), size))\n : changetype(reallocateBlock(ROOT, checkUsedBlock(ptr), size))\n ) + BLOCK_OVERHEAD;\n}\n\n// @ts-ignore: decorator\n@global @unsafe\nexport function __free(ptr: usize): void {\n if (ptr < __heap_base) return;\n if (!ROOT) initialize();\n freeBlock(ROOT, checkUsedBlock(ptr));\n}\n", - "set": "/// \n\nimport { HASH } from \"./util/hash\";\n\n// A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht\n\n// @ts-ignore: decorator\n@inline const INITIAL_CAPACITY = 4;\n\n// @ts-ignore: decorator\n@inline const FILL_FACTOR_N = 8;\n\n// @ts-ignore: decorator\n@inline const FILL_FACTOR_D = 3;\n\n// @ts-ignore: decorator\n@inline const FREE_FACTOR_N = 3;\n\n// @ts-ignore: decorator\n@inline const FREE_FACTOR_D = 4;\n\n/** Structure of a set entry. */\n@unmanaged class SetEntry {\n key: K;\n taggedNext: usize; // LSB=1 indicates EMPTY\n}\n\n/** Empty bit. */\n// @ts-ignore: decorator\n@inline const EMPTY: usize = 1 << 0;\n\n/** Size of a bucket. */\n// @ts-ignore: decorator\n@inline const BUCKET_SIZE = sizeof();\n\n/** Computes the alignment of an entry. */\n// @ts-ignore: decorator\n@inline\nfunction ENTRY_ALIGN(): usize {\n // can align to 4 instead of 8 if 32-bit and K is <= 32-bits\n const align = (sizeof() > sizeof() ? sizeof() : sizeof()) - 1;\n return align;\n}\n\n/** Computes the aligned size of an entry. */\n// @ts-ignore: decorator\n@inline\nfunction ENTRY_SIZE(): usize {\n const align = ENTRY_ALIGN();\n const size = (offsetof>() + align) & ~align;\n return size;\n}\n\nexport class Set {\n\n // buckets referencing their respective first entry, usize[bucketsMask + 1]\n private buckets: ArrayBuffer = new ArrayBuffer(INITIAL_CAPACITY * BUCKET_SIZE);\n private bucketsMask: u32 = INITIAL_CAPACITY - 1;\n\n // entries in insertion order, SetEntry[entriesCapacity]\n private entries: ArrayBuffer = new ArrayBuffer(INITIAL_CAPACITY * ENTRY_SIZE());\n private entriesCapacity: i32 = INITIAL_CAPACITY;\n private entriesOffset: i32 = 0;\n private entriesCount: i32 = 0;\n\n constructor() {\n /* nop */\n }\n\n get size(): i32 {\n return this.entriesCount;\n }\n\n clear(): void {\n this.buckets = new ArrayBuffer(INITIAL_CAPACITY * BUCKET_SIZE);\n this.bucketsMask = INITIAL_CAPACITY - 1;\n this.entries = new ArrayBuffer(INITIAL_CAPACITY * ENTRY_SIZE());\n this.entriesCapacity = INITIAL_CAPACITY;\n this.entriesOffset = 0;\n this.entriesCount = 0;\n }\n\n private find(key: T, hashCode: u32): SetEntry | null {\n var entry = load>( // unmanaged!\n changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE\n );\n while (entry) {\n let taggedNext = entry.taggedNext;\n if (!(taggedNext & EMPTY) && entry.key == key) return entry;\n entry = changetype>(taggedNext & ~EMPTY);\n }\n return null;\n }\n\n @operator(\"[]\")\n has(key: T): bool {\n return this.find(key, HASH(key)) !== null;\n }\n\n add(key: T): this {\n var hashCode = HASH(key);\n var entry = this.find(key, hashCode); // unmanaged!\n if (!entry) {\n // check if rehashing is necessary\n if (this.entriesOffset == this.entriesCapacity) {\n this.rehash(\n this.entriesCount < this.entriesCapacity * FREE_FACTOR_N / FREE_FACTOR_D\n ? this.bucketsMask // just rehash if 1/4+ entries are empty\n : (this.bucketsMask << 1) | 1 // grow capacity to next 2^N\n );\n }\n // append new entry\n entry = changetype>(changetype(this.entries) + (this.entriesOffset++) * ENTRY_SIZE());\n entry.key = key;\n if (isManaged()) {\n __link(changetype(this), changetype(key), true);\n }\n ++this.entriesCount;\n // link with previous entry in bucket\n let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE;\n entry.taggedNext = load(bucketPtrBase);\n store(bucketPtrBase, changetype(entry));\n }\n return this;\n }\n\n @operator(\"[]=\")\n private __set(key: T, value: bool): void {\n if (value) this.add(key);\n else this.delete(key);\n }\n\n delete(key: T): bool {\n var entry = this.find(key, HASH(key)); // unmanaged!\n if (!entry) return false;\n entry.taggedNext |= EMPTY;\n --this.entriesCount;\n // check if rehashing is appropriate\n var halfBucketsMask = this.bucketsMask >> 1;\n if (\n halfBucketsMask + 1 >= max(INITIAL_CAPACITY, this.entriesCount) &&\n this.entriesCount < this.entriesCapacity * FREE_FACTOR_N / FREE_FACTOR_D\n ) this.rehash(halfBucketsMask);\n return true;\n }\n\n private rehash(newBucketsMask: u32): void {\n var newBucketsCapacity = (newBucketsMask + 1);\n var newBuckets = new ArrayBuffer(newBucketsCapacity * BUCKET_SIZE);\n var newEntriesCapacity = newBucketsCapacity * FILL_FACTOR_N / FILL_FACTOR_D;\n var newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE());\n\n // copy old entries to new entries\n var oldPtr = changetype(this.entries);\n var oldEnd = oldPtr + this.entriesOffset * ENTRY_SIZE();\n var newPtr = changetype(newEntries);\n while (oldPtr != oldEnd) {\n let oldEntry = changetype>(oldPtr); // unmanaged!\n if (!(oldEntry.taggedNext & EMPTY)) {\n let newEntry = changetype>(newPtr); // unmanaged!\n let oldEntryKey = oldEntry.key;\n newEntry.key = oldEntryKey;\n let newBucketIndex = HASH(oldEntryKey) & newBucketsMask;\n let newBucketPtrBase = changetype(newBuckets) + newBucketIndex * BUCKET_SIZE;\n newEntry.taggedNext = load(newBucketPtrBase);\n store(newBucketPtrBase, newPtr);\n newPtr += ENTRY_SIZE();\n }\n oldPtr += ENTRY_SIZE();\n }\n\n this.buckets = newBuckets;\n this.bucketsMask = newBucketsMask;\n this.entries = newEntries;\n this.entriesCapacity = newEntriesCapacity;\n this.entriesOffset = this.entriesCount;\n }\n\n values(): T[] {\n // FIXME: this is preliminary, needs iterators/closures\n var start = changetype(this.entries);\n var size = this.entriesOffset;\n var values = new Array(size);\n var length = 0;\n for (let i = 0; i < size; ++i) {\n let entry = changetype>(start + i * ENTRY_SIZE());\n if (!(entry.taggedNext & EMPTY)) {\n values[length++] = entry.key;\n }\n }\n values.length = length;\n return values;\n }\n\n toString(): string {\n return \"[object Set]\";\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n __visit(changetype(this.buckets), cookie);\n var entries = changetype(this.entries);\n if (isManaged()) {\n let cur = entries;\n let end = cur + this.entriesOffset * ENTRY_SIZE();\n while (cur < end) {\n let entry = changetype>(cur);\n if (!(entry.taggedNext & EMPTY)) {\n let val = changetype(entry.key);\n if (isNullable()) {\n if (val) __visit(val, cookie);\n } else __visit(val, cookie);\n }\n cur += ENTRY_SIZE();\n }\n }\n __visit(entries, cookie);\n }\n}\n", - "shared/feature": "// This file is shared with the compiler and must remain portable\n\n/** Indicates specific features to activate. */\nexport const enum Feature {\n /** No additional features. */\n NONE = 0,\n /** Sign extension operations. */\n SIGN_EXTENSION = 1 << 0, // see: https://github.com/WebAssembly/sign-extension-ops\n /** Mutable global imports and exports. */\n MUTABLE_GLOBALS = 1 << 1, // see: https://github.com/WebAssembly/mutable-global\n /** Non-trapping float to integer operations. */\n NONTRAPPING_F2I = 1 << 2, // see: https://github.com/WebAssembly/nontrapping-float-to-int-conversions\n /** Bulk memory operations. */\n BULK_MEMORY = 1 << 3, // see: https://github.com/WebAssembly/bulk-memory-operations\n /** SIMD types and operations. */\n SIMD = 1 << 4, // see: https://github.com/WebAssembly/simd\n /** Threading and atomic operations. */\n THREADS = 1 << 5, // see: https://github.com/WebAssembly/threads\n /** Exception handling operations. */\n EXCEPTION_HANDLING = 1 << 6, // see: https://github.com/WebAssembly/exception-handling\n /** Tail call operations. */\n TAIL_CALLS = 1 << 7, // see: https://github.com/WebAssembly/tail-call\n /** Reference types. */\n REFERENCE_TYPES = 1 << 8, // see: https://github.com/WebAssembly/reference-types\n /** Multi value types. */\n MULTI_VALUE = 1 << 9, // see: https://github.com/WebAssembly/multi-value\n /** Garbage collection. */\n GC = 1 << 10, // see: https://github.com/WebAssembly/gc\n /** Memory64. */\n MEMORY64 = 1 << 11 // see: https://github.com/WebAssembly/memory64\n}\n\n/** Gets the name of the specified feature one would specify on the command line. */\nexport function featureToString(feature: Feature): string {\n switch (feature) {\n case Feature.SIGN_EXTENSION: return \"sign-extension\";\n case Feature.MUTABLE_GLOBALS: return \"mutable-globals\";\n case Feature.NONTRAPPING_F2I: return \"nontrapping-f2i\";\n case Feature.BULK_MEMORY: return \"bulk-memory\";\n case Feature.SIMD: return \"simd\";\n case Feature.THREADS: return \"threads\";\n case Feature.EXCEPTION_HANDLING: return \"exception-handling\";\n case Feature.TAIL_CALLS: return \"tail-calls\";\n case Feature.REFERENCE_TYPES: return \"reference-types\";\n case Feature.MULTI_VALUE: return \"multi-value\";\n case Feature.GC: return \"gc\";\n case Feature.MEMORY64: return \"memory64\";\n }\n assert(false);\n return \"\";\n}\n", - "shared/runtime": "// This file is shared with the compiler and must remain portable\n\n/** Runtime types. */\nexport enum Runtime {\n /** Simple bump allocator without GC. */\n Stub = 0,\n /** Stop the world semi-automatic GC. */\n Minimal = 1,\n /** incremental GC. */\n Incremental = 2,\n}\n", - "shared/target": "// This file is shared with the compiler and must remain portable\n\n/** Compilation target. */\nexport enum Target {\n /** Portable. */\n JS = 0,\n /** WebAssembly with 32-bit pointers. */\n WASM32 = 1,\n /** WebAssembly with 64-bit pointers. Experimental and not supported by any runtime yet. */\n WASM64 = 2,\n}\n", - "shared/typeinfo": "// This file is shared with the compiler and must remain portable\n\n// ╒═══════════════════ Typeinfo interpretation ═══════════════════╕\n// 3 2 1\n// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits\n// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ◄─ __rtti_base\n// │ count │\n// ╞═══════════════════════════════════════════════════════════════╡ ┐\n// │ Typeinfo#flags [id=0] │ id < count\n// ├ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┤\n// │ Typeinfo#base [id=0] │\n// ├───────────────────────────────────────────────────────────────┤\n// │ ... │\n\n/** Runtime type information data structure. */\n@unmanaged\nexport class Typeinfo {\n /** Flags describing the shape of this class type. */\n flags: TypeinfoFlags = TypeinfoFlags.NONE;\n /** Base class id or `0` if none. */\n base: u32 = 0;\n}\n\n/** Runtime type information flags. */\nexport const enum TypeinfoFlags {\n /** No specific flags. */\n NONE = 0,\n /** Type is an `ArrayBufferView`. */\n ARRAYBUFFERVIEW = 1 << 0,\n /** Type is an `Array`. */\n ARRAY = 1 << 1,\n /** Type is a `StaticArray`. */\n STATICARRAY = 1 << 2,\n /** Type is a `Set`. */\n SET = 1 << 3,\n /** Type is a `Map`. */\n MAP = 1 << 4,\n /** Type has no outgoing pointers. */\n POINTERFREE = 1 << 5,\n /** Value alignment of 1 byte. */\n VALUE_ALIGN_0 = 1 << 6,\n /** Value alignment of 2 bytes. */\n VALUE_ALIGN_1 = 1 << 7,\n /** Value alignment of 4 bytes. */\n VALUE_ALIGN_2 = 1 << 8,\n /** Value alignment of 8 bytes. */\n VALUE_ALIGN_3 = 1 << 9,\n /** Value alignment of 16 bytes. */\n VALUE_ALIGN_4 = 1 << 10,\n /** Value is a signed type. */\n VALUE_SIGNED = 1 << 11,\n /** Value is a float type. */\n VALUE_FLOAT = 1 << 12,\n /** Value type is nullable. */\n VALUE_NULLABLE = 1 << 13,\n /** Value type is managed. */\n VALUE_MANAGED = 1 << 14,\n /** Key alignment of 1 byte. */\n KEY_ALIGN_0 = 1 << 15,\n /** Key alignment of 2 bytes. */\n KEY_ALIGN_1 = 1 << 16,\n /** Key alignment of 4 bytes. */\n KEY_ALIGN_2 = 1 << 17,\n /** Key alignment of 8 bytes. */\n KEY_ALIGN_3 = 1 << 18,\n /** Key alignment of 16 bytes. */\n KEY_ALIGN_4 = 1 << 19,\n /** Key is a signed type. */\n KEY_SIGNED = 1 << 20,\n /** Key is a float type. */\n KEY_FLOAT = 1 << 21,\n /** Key type is nullable. */\n KEY_NULLABLE = 1 << 22,\n /** Key type is managed. */\n KEY_MANAGED = 1 << 23\n}\n", - "staticarray": "/// \n\nimport { OBJECT, BLOCK_MAXSIZE, TOTAL_OVERHEAD } from \"./rt/common\";\nimport { Runtime } from \"shared/runtime\";\nimport { COMPARATOR, SORT } from \"./util/sort\";\nimport { REVERSE } from \"./util/bytes\";\nimport { idof } from \"./builtins\";\nimport { Array } from \"./array\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_HOLEYARRAY } from \"./util/error\";\nimport { joinBooleanArray, joinIntegerArray, joinFloatArray, joinStringArray, joinReferenceArray } from \"./util/string\";\n\n@final\nexport class StaticArray {\n [key: number]: T;\n\n // Note that the interface of StaticArray instances must be a semantically\n // compatible subset of Array in order for syntax highlighting to work\n // properly, for instance when creating static arrays from array literals.\n // The additionally provided static methods take care of dealing with static\n // arrays exclusively, without having to convert to Array first.\n\n static fromArray(source: Array): StaticArray {\n var length = source.length;\n var outSize = length << alignof();\n var out = changetype>(__new(outSize, idof>()));\n if (isManaged()) {\n let sourcePtr = source.dataStart;\n for (let i = 0; i < length; ++i) {\n let off = i << alignof();\n let ref = load(sourcePtr + off);\n store(changetype(out) + off, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(changetype(out), source.dataStart, outSize);\n }\n return out;\n }\n\n static concat(source: StaticArray, other: StaticArray): StaticArray {\n var sourceLen = source.length;\n var otherLen = select(0, other.length, other === null);\n var outLen = sourceLen + otherLen;\n if (outLen > BLOCK_MAXSIZE >>> alignof()) throw new Error(E_INVALIDLENGTH);\n var out = changetype>(__new(outLen << alignof(), idof>()));\n var outStart = changetype(out);\n var sourceSize = sourceLen << alignof();\n if (isManaged()) {\n for (let offset: usize = 0; offset < sourceSize; offset += sizeof()) {\n let ref = load(changetype(source) + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n outStart += sourceSize;\n let otherSize = otherLen << alignof();\n for (let offset: usize = 0; offset < otherSize; offset += sizeof()) {\n let ref = load(changetype(other) + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(outStart, changetype(source), sourceSize);\n memory.copy(outStart + sourceSize, changetype(other), otherLen << alignof());\n }\n return out;\n }\n\n static slice(source: StaticArray, start: i32 = 0, end: i32 = i32.MAX_VALUE): StaticArray {\n var length = source.length;\n start = start < 0 ? max(start + length, 0) : min(start, length);\n end = end < 0 ? max(end + length, 0) : min(end , length);\n length = max(end - start, 0);\n var sliceSize = length << alignof();\n var slice = changetype>(__new(sliceSize, idof>()));\n var sourcePtr = changetype(source) + (start << alignof());\n if (isManaged()) {\n let off: usize = 0;\n while (off < sliceSize) {\n let ref = load(sourcePtr + off);\n store(changetype(slice) + off, ref);\n __link(changetype(slice), ref, true);\n off += sizeof();\n }\n } else {\n memory.copy(changetype(slice), sourcePtr, sliceSize);\n }\n return slice;\n }\n\n constructor(length: i32) {\n if (length > BLOCK_MAXSIZE >>> alignof()) throw new RangeError(E_INVALIDLENGTH);\n var outSize = length << alignof();\n var out = changetype>(__new(outSize, idof>()));\n if (ASC_RUNTIME != Runtime.Incremental) {\n memory.fill(changetype(out), 0, outSize);\n }\n return out;\n }\n\n get length(): i32 {\n return changetype(changetype(this) - TOTAL_OVERHEAD).rtSize >>> alignof();\n }\n\n at(index: i32): T {\n var len = this.length;\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n var value = load(changetype(this) + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n @operator(\"[]\") private __get(index: i32): T {\n if (index >= this.length) throw new RangeError(E_INDEXOUTOFRANGE);\n var value = load(changetype(this) + (index << alignof()));\n if (isReference()) {\n if (!isNullable()) {\n if (!changetype(value)) throw new Error(E_HOLEYARRAY);\n }\n }\n return value;\n }\n\n @unsafe @operator(\"{}\") private __uget(index: i32): T {\n return load(changetype(this) + (index << alignof()));\n }\n\n @operator(\"[]=\") private __set(index: i32, value: T): void {\n if (index >= this.length) throw new RangeError(E_INDEXOUTOFRANGE);\n this.__uset(index, value);\n }\n\n @unsafe @operator(\"{}=\") private __uset(index: i32, value: T): void {\n store(changetype(this) + (index << alignof()), value);\n if (isManaged()) {\n __link(changetype(this), changetype(value), true);\n }\n }\n\n fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): this {\n var ptr = changetype(this);\n var len = this.length;\n start = start < 0 ? max(len + start, 0) : min(start, len);\n end = end < 0 ? max(len + end, 0) : min(end, len);\n if (isManaged()) {\n for (; start < end; ++start) {\n store(ptr + (start << alignof()), changetype(value));\n __link(changetype(this), changetype(value), true);\n }\n } else if (sizeof() == 1) {\n if (start < end) {\n memory.fill(\n ptr + start,\n u8(value),\n (end - start)\n );\n }\n } else {\n for (; start < end; ++start) {\n store(ptr + (start << alignof()), value);\n }\n }\n return this;\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): this {\n var ptr = changetype(this);\n var len = this.length;\n\n end = min(end, len);\n\n var to = target < 0 ? max(len + target, 0) : min(target, len);\n var from = start < 0 ? max(len + start, 0) : min(start, len);\n var last = end < 0 ? max(len + end, 0) : min(end, len);\n var count = min(last - from, len - to);\n\n memory.copy( // is memmove\n ptr + (to << alignof()),\n ptr + (from << alignof()),\n count << alignof()\n );\n return this;\n }\n\n includes(value: T, fromIndex: i32 = 0): bool {\n if (isFloat()) {\n let length = this.length;\n if (length == 0 || fromIndex >= length) return false;\n if (fromIndex < 0) fromIndex = max(length + fromIndex, 0);\n while (fromIndex < length) {\n let elem = load(changetype(this) + (fromIndex << alignof()));\n // @ts-ignore\n if (elem == value || isNaN(elem) & isNaN(value)) return true;\n ++fromIndex;\n }\n return false;\n } else {\n return this.indexOf(value, fromIndex) >= 0;\n }\n }\n\n indexOf(value: T, fromIndex: i32 = 0): i32 {\n var length = this.length;\n if (length == 0 || fromIndex >= length) return -1;\n if (fromIndex < 0) fromIndex = max(length + fromIndex, 0);\n while (fromIndex < length) {\n if (load(changetype(this) + (fromIndex << alignof())) == value) return fromIndex;\n ++fromIndex;\n }\n return -1;\n }\n\n lastIndexOf(value: T, fromIndex: i32 = this.length): i32 {\n var length = this.length;\n if (length == 0) return -1;\n if (fromIndex < 0) fromIndex = length + fromIndex;\n else if (fromIndex >= length) fromIndex = length - 1;\n while (fromIndex >= 0) {\n if (load(changetype(this) + (fromIndex << alignof())) == value) return fromIndex;\n --fromIndex;\n }\n return -1;\n }\n\n concat(other: Array): Array {\n var thisLen = this.length;\n var otherLen = select(0, other.length, other === null);\n var outLen = thisLen + otherLen;\n if (outLen > BLOCK_MAXSIZE >>> alignof()) throw new Error(E_INVALIDLENGTH);\n var out = changetype>(__newArray(outLen, alignof(), idof>()));\n var outStart = out.dataStart;\n var thisSize = thisLen << alignof();\n if (isManaged()) {\n let thisStart = changetype(this);\n for (let offset: usize = 0; offset < thisSize; offset += sizeof()) {\n let ref = load(thisStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n outStart += thisSize;\n let otherStart = other.dataStart;\n let otherSize = otherLen << alignof();\n for (let offset: usize = 0; offset < otherSize; offset += sizeof()) {\n let ref = load(otherStart + offset);\n store(outStart + offset, ref);\n __link(changetype(out), ref, true);\n }\n } else {\n memory.copy(outStart, changetype(this), thisSize);\n memory.copy(outStart + thisSize, other.dataStart, otherLen << alignof());\n }\n return out;\n }\n\n slice(start: i32 = 0, end: i32 = i32.MAX_VALUE): Array {\n var length = this.length;\n start = start < 0 ? max(start + length, 0) : min(start, length);\n end = end < 0 ? max(end + length, 0) : min(end , length);\n length = max(end - start, 0);\n var slice = changetype>(__newArray(length, alignof(), idof>()));\n var sliceBase = slice.dataStart;\n var thisBase = changetype(this) + (start << alignof());\n if (isManaged()) {\n let off = 0;\n let end = length << alignof();\n while (off < end) {\n let ref = load(thisBase + off);\n store(sliceBase + off, ref);\n __link(changetype(slice), ref, true);\n off += sizeof();\n }\n } else {\n memory.copy(sliceBase, thisBase, length << alignof());\n }\n return slice;\n }\n\n findIndex(fn: (value: T, index: i32, array: StaticArray) => bool): i32 {\n for (let i = 0, len = this.length; i < len; ++i) {\n if (fn(load(changetype(this) + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n findLastIndex(fn: (value: T, index: i32, array: StaticArray) => bool): i32 {\n for (let i = this.length - 1; i >= 0; --i) {\n if (fn(load(changetype(this) + (i << alignof())), i, this)) return i;\n }\n return -1;\n }\n\n forEach(fn: (value: T, index: i32, array: StaticArray) => void): void {\n for (let i = 0, len = this.length; i < len; ++i) {\n fn(load(changetype(this) + (i << alignof())), i, this);\n }\n }\n\n map(fn: (value: T, index: i32, array: StaticArray) => U): Array {\n var len = this.length;\n var out = changetype>(__newArray(len, alignof(), idof>()));\n var outStart = out.dataStart;\n for (let i = 0; i < len; ++i) {\n let result = fn(load(changetype(this) + (i << alignof())), i, this);\n store(outStart + (i << alignof()), result);\n if (isManaged()) {\n __link(changetype(out), changetype(result), true);\n }\n }\n return out;\n }\n\n filter(fn: (value: T, index: i32, array: StaticArray) => bool): Array {\n var result = changetype>(__newArray(0, alignof(), idof>()));\n for (let i = 0, len = this.length; i < len; ++i) {\n let value = load(changetype(this) + (i << alignof()));\n if (fn(value, i, this)) result.push(value);\n }\n return result;\n }\n\n reduce(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray) => U,\n initialValue: U\n ): U {\n var acc = initialValue;\n for (let i = 0, len = this.length; i < len; ++i) {\n acc = fn(acc, load(changetype(this) + (i << alignof())), i, this);\n }\n return acc;\n }\n\n reduceRight(\n fn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray) => U,\n initialValue: U\n ): U {\n var acc = initialValue;\n for (let i = this.length - 1; i >= 0; --i) {\n acc = fn(acc, load(changetype(this) + (i << alignof())), i, this);\n }\n return acc;\n }\n\n every(fn: (value: T, index: i32, array: StaticArray) => bool): bool {\n for (let i = 0, len = this.length; i < len; ++i) {\n if (!fn(load(changetype(this) + (i << alignof())), i, this)) return false;\n }\n return true;\n }\n\n some(fn: (value: T, index: i32, array: StaticArray) => bool): bool {\n for (let i = 0, len = this.length; i < len; ++i) {\n if (fn(load(changetype(this) + (i << alignof())), i, this)) return true;\n }\n return false;\n }\n\n sort(comparator: (a: T, b: T) => i32 = COMPARATOR()): this {\n SORT(changetype(this), this.length, comparator);\n return this;\n }\n\n join(separator: string = \",\"): string {\n if (isBoolean()) return joinBooleanArray(changetype(this), this.length, separator);\n if (isInteger()) return joinIntegerArray(changetype(this), this.length, separator);\n if (isFloat()) return joinFloatArray(changetype(this), this.length, separator);\n if (ASC_SHRINK_LEVEL < 1) {\n if (isString()) return joinStringArray(changetype(this), this.length, separator);\n }\n if (isReference()) return joinReferenceArray(changetype(this), this.length, separator);\n ERROR(\"unspported element type\");\n return unreachable();\n }\n\n reverse(): this {\n REVERSE(changetype(this), this.length);\n return this;\n }\n\n toString(): string {\n return this.join();\n }\n\n // RT integration\n\n @unsafe private __visit(cookie: u32): void {\n if (isManaged()) {\n let cur = changetype(this);\n let end = cur + changetype(changetype(this) - TOTAL_OVERHEAD).rtSize;\n while (cur < end) {\n let val = load(cur);\n if (val) __visit(val, cookie);\n cur += sizeof();\n }\n }\n }\n}\n", - "string": "/// \n\nimport { OBJECT, BLOCK_MAXSIZE, TOTAL_OVERHEAD } from \"./rt/common\";\nimport { compareImpl, strtol, strtod, isSpace, isAscii, isFinalSigma, toLower8, toUpper8 } from \"./util/string\";\nimport { SPECIALS_UPPER, casemap, bsearch } from \"./util/casemap\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_UNPAIRED_SURROGATE } from \"./util/error\";\nimport { idof } from \"./builtins\";\nimport { Array } from \"./array\";\n\n@final export abstract class String {\n\n @lazy static readonly MAX_LENGTH: i32 = (BLOCK_MAXSIZE >>> alignof());\n\n static fromCharCode(unit: i32, surr: i32 = -1): String {\n var hasSur = surr > 0;\n var out = changetype(__new(2 << i32(hasSur), idof()));\n store(changetype(out), unit);\n if (hasSur) store(changetype(out), surr, 2);\n return out;\n }\n\n static fromCharCodes(units: Array): String {\n var length = units.length;\n var out = changetype(__new(length << 1, idof()));\n var ptr = units.dataStart;\n for (let i = 0; i < length; ++i) {\n store(changetype(out) + (i << 1), load(ptr + (i << 2)));\n }\n return out;\n }\n\n static fromCodePoint(code: i32): String {\n var hasSur = code > 0xFFFF;\n var out = changetype(__new(2 << i32(hasSur), idof()));\n if (!hasSur) {\n store(changetype(out), code);\n } else {\n // Checks valid code point range\n assert(code <= 0x10FFFF);\n code -= 0x10000;\n let hi = (code & 0x03FF) | 0xDC00;\n let lo = code >>> 10 | 0xD800;\n store(changetype(out), lo | hi << 16);\n }\n return out;\n }\n\n @builtin static raw(parts: TemplateStringsArray, ...args: unknown[]): string { return unreachable(); }\n\n get length(): i32 {\n return changetype(changetype(this) - TOTAL_OVERHEAD).rtSize >> 1;\n }\n\n at(pos: i32): String {\n var len = this.length;\n pos += select(0, len, pos >= 0);\n if (pos >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n var out = __new(2, idof());\n store(out, load(changetype(this) + (pos << 1)));\n return changetype(out); // retains\n }\n\n @operator(\"[]\") charAt(pos: i32): String {\n if (pos >= this.length) return changetype(\"\");\n var out = changetype(__new(2, idof()));\n store(changetype(out), load(changetype(this) + (pos << 1)));\n return out;\n }\n\n charCodeAt(pos: i32): i32 {\n if (pos >= this.length) return -1; // (NaN)\n return load(changetype(this) + (pos << 1));\n }\n\n codePointAt(pos: i32): i32 {\n var len = this.length;\n if (pos >= len) return -1; // (undefined)\n var first = load(changetype(this) + (pos << 1));\n if ((first & 0xFC00) != 0xD800 || pos + 1 == len) return first;\n var second = load(changetype(this) + (pos << 1), 2);\n if ((second & 0xFC00) != 0xDC00) return first;\n return (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n }\n\n @operator(\"+\") private static __concat(left: String, right: String): String {\n return left.concat(right);\n }\n\n concat(other: String): String {\n var thisSize: isize = this.length << 1;\n var otherSize: isize = other.length << 1;\n var outSize: usize = thisSize + otherSize;\n if (outSize == 0) return changetype(\"\");\n var out = changetype(__new(outSize, idof()));\n memory.copy(changetype(out), changetype(this), thisSize);\n memory.copy(changetype(out) + thisSize, changetype(other), otherSize);\n return out;\n }\n\n endsWith(search: String, end: i32 = String.MAX_LENGTH): bool {\n end = min(max(end, 0), this.length);\n var searchLength = search.length;\n var searchStart = end - searchLength;\n if (searchStart < 0) return false;\n // @ts-ignore: string <-> String\n return !compareImpl(this, searchStart, search, 0, searchLength);\n }\n\n @operator(\"==\") private static __eq(left: String | null, right: String | null): bool {\n if (left === right) return true;\n if (left === null || right === null) return false;\n var leftLength = left.length;\n if (leftLength != right.length) return false;\n // @ts-ignore: string <-> String\n return !compareImpl(left, 0, right, 0, leftLength);\n }\n\n @operator.prefix(\"!\")\n private static __not(str: String | null): bool {\n return str === null || !str.length;\n }\n\n @operator(\"!=\")\n private static __ne(left: String | null, right: String | null): bool {\n return !this.__eq(left, right);\n }\n\n @operator(\">\") private static __gt(left: String, right: String): bool {\n if (left === right) return false;\n var leftLength = left.length;\n if (!leftLength) return false;\n var rightLength = right.length;\n if (!rightLength) return true;\n // @ts-ignore: string <-> String\n var res = compareImpl(left, 0, right, 0, min(leftLength, rightLength));\n return res ? res > 0 : leftLength > rightLength;\n }\n\n @operator(\">=\") private static __gte(left: String, right: String): bool {\n return !this.__lt(left, right);\n }\n\n @operator(\"<\") private static __lt(left: String, right: String): bool {\n if (left === right) return false;\n var rightLength = right.length;\n if (!rightLength) return false;\n var leftLength = left.length;\n if (!leftLength) return true;\n // @ts-ignore: string <-> String\n var res = compareImpl(left, 0, right, 0, min(leftLength, rightLength));\n return res ? res < 0 : leftLength < rightLength;\n }\n\n @operator(\"<=\") private static __lte(left: String, right: String): bool {\n return !this.__gt(left, right);\n }\n\n includes(search: String, start: i32 = 0): bool {\n return this.indexOf(search, start) != -1;\n }\n\n indexOf(search: String, start: i32 = 0): i32 {\n var searchLen = search.length;\n if (!searchLen) return 0;\n var len = this.length;\n if (!len) return -1;\n var searchStart = min(max(start, 0), len);\n for (len -= searchLen; searchStart <= len; ++searchStart) {\n // @ts-ignore: string <-> String\n if (!compareImpl(this, searchStart, search, 0, searchLen)) return searchStart;\n }\n return -1;\n }\n\n lastIndexOf(search: String, start: i32 = i32.MAX_VALUE): i32 {\n var searchLen = search.length;\n if (!searchLen) return this.length;\n var len = this.length;\n if (!len) return -1;\n var searchStart = min(max(start, 0), len - searchLen);\n for (; searchStart >= 0; --searchStart) {\n // @ts-ignore: string <-> String\n if (!compareImpl(this, searchStart, search, 0, searchLen)) return searchStart;\n }\n return -1;\n }\n\n // TODO: implement full locale comparison with locales and Collator options\n localeCompare(other: String): i32 {\n if (other === this) return 0; // compare pointers\n var len: isize = this.length;\n var otherLen: isize = other.length;\n if (otherLen != len) return select(1, -1, len > otherLen);\n if (!otherLen) return 0; // \"\" == \"\"\n // @ts-ignore: string <-> String\n return compareImpl(this, 0, other, 0, otherLen);\n }\n\n startsWith(search: String, start: i32 = 0): bool {\n var len = this.length;\n var searchStart = min(max(start, 0), len);\n var searchLength = search.length;\n if (searchLength + searchStart > len) return false;\n // @ts-ignore: string <-> String\n return !compareImpl(this, searchStart, search, 0, searchLength);\n }\n\n substr(start: i32, length: i32 = i32.MAX_VALUE): String { // legacy\n var intStart: isize = start;\n var end: isize = length;\n var len: isize = this.length;\n if (intStart < 0) intStart = max(len + intStart, 0);\n var size = min(max(end, 0), len - intStart) << 1;\n if (size <= 0) return changetype(\"\");\n var out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + (intStart << 1), size);\n return out;\n }\n\n substring(start: i32, end: i32 = i32.MAX_VALUE): String {\n var len: isize = this.length;\n var finalStart = min(max(start, 0), len);\n var finalEnd = min(max(end, 0), len);\n var fromPos = min(finalStart, finalEnd) << 1;\n var toPos = max(finalStart, finalEnd) << 1;\n var size = toPos - fromPos;\n if (!size) return changetype(\"\");\n if (!fromPos && toPos == len << 1) return this;\n var out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + fromPos, size);\n return out;\n }\n\n trim(): String {\n var len = this.length;\n var size: usize = len << 1;\n while (size && isSpace(load(changetype(this) + size - 2))) {\n size -= 2;\n }\n var offset: usize = 0;\n while (offset < size && isSpace(load(changetype(this) + offset))) {\n offset += 2; size -= 2;\n }\n if (!size) return changetype(\"\");\n if (!offset && size == len << 1) return this;\n var out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + offset, size);\n return out;\n }\n\n @inline\n trimLeft(): String {\n return this.trimStart();\n }\n\n @inline\n trimRight(): String {\n return this.trimEnd();\n }\n\n trimStart(): String {\n var size = this.length << 1;\n var offset: usize = 0;\n while (offset < size && isSpace(load(changetype(this) + offset))) {\n offset += 2;\n }\n if (!offset) return this;\n size -= offset;\n if (!size) return changetype(\"\");\n var out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this) + offset, size);\n return out;\n }\n\n trimEnd(): String {\n var originalSize = this.length << 1;\n var size = originalSize;\n while (size && isSpace(load(changetype(this) + size - 2))) {\n size -= 2;\n }\n if (!size) return changetype(\"\");\n if (size == originalSize) return this;\n var out = changetype(__new(size, idof()));\n memory.copy(changetype(out), changetype(this), size);\n return out;\n }\n\n padStart(length: i32, pad: string = \" \"): String {\n var thisSize = this.length << 1;\n var targetSize = length << 1;\n var padSize = pad.length << 1;\n if (targetSize < thisSize || !padSize) return this;\n var prependSize = targetSize - thisSize;\n var out = changetype(__new(targetSize, idof()));\n if (prependSize > padSize) {\n let repeatCount = (prependSize - 2) / padSize;\n let restBase = repeatCount * padSize;\n let restSize = prependSize - restBase;\n memory.repeat(changetype(out), changetype(pad), padSize, repeatCount);\n memory.copy(changetype(out) + restBase, changetype(pad), restSize);\n } else {\n memory.copy(changetype(out), changetype(pad), prependSize);\n }\n memory.copy(changetype(out) + prependSize, changetype(this), thisSize);\n return out;\n }\n\n padEnd(length: i32, pad: string = \" \"): String {\n var thisSize = this.length << 1;\n var targetSize = length << 1;\n var padSize = pad.length << 1;\n if (targetSize < thisSize || !padSize) return this;\n var appendSize = targetSize - thisSize;\n var out = changetype(__new(targetSize, idof()));\n memory.copy(changetype(out), changetype(this), thisSize);\n if (appendSize > padSize) {\n let repeatCount = (appendSize - 2) / padSize;\n let restBase = repeatCount * padSize;\n let restSize = appendSize - restBase;\n memory.repeat(changetype(out) + thisSize, changetype(pad), padSize, repeatCount);\n memory.copy(changetype(out) + thisSize + restBase, changetype(pad), restSize);\n } else {\n memory.copy(changetype(out) + thisSize, changetype(pad), appendSize);\n }\n return out;\n }\n\n repeat(count: i32 = 0): String {\n var length = this.length;\n\n // Most browsers can't handle strings 1 << 28 chars or longer\n if (count < 0 || length * count > (1 << 28)) {\n throw new RangeError(E_INVALIDLENGTH);\n }\n\n if (count == 0 || !length) return changetype(\"\");\n if (count == 1) return this;\n var out = changetype(__new((length * count) << 1, idof()));\n memory.repeat(changetype(out), changetype(this), length << 1, count);\n return out;\n }\n\n replace(search: String, replacement: String): String {\n var len: usize = this.length;\n var slen: usize = search.length;\n if (len <= slen) {\n return len < slen ? this : select(replacement, this, search == this);\n }\n var index: isize = this.indexOf(search);\n if (~index) {\n let rlen: usize = replacement.length;\n len -= slen;\n let olen = len + rlen;\n if (olen) {\n let out = changetype(__new(olen << 1, idof()));\n memory.copy(changetype(out), changetype(this), index << 1);\n memory.copy(\n changetype(out) + (index << 1),\n changetype(replacement),\n rlen << 1\n );\n memory.copy(\n changetype(out) + ((index + rlen) << 1),\n changetype(this) + ((index + slen) << 1),\n (len - index) << 1\n );\n return out;\n }\n }\n return this;\n }\n\n replaceAll(search: String, replacement: String): String {\n var thisLen: usize = this.length;\n var searchLen: usize = search.length;\n if (thisLen <= searchLen) {\n return thisLen < searchLen\n ? this\n : select(replacement, this, search == this);\n }\n var replaceLen: usize = replacement.length;\n if (!searchLen) {\n if (!replaceLen) return this;\n // Special case: 'abc'.replaceAll('', '-') -> '-a-b-c-'\n let out = changetype(__new((thisLen + (thisLen + 1) * replaceLen) << 1, idof()));\n memory.copy(changetype(out), changetype(replacement), replaceLen << 1);\n let offset = replaceLen;\n for (let i: usize = 0; i < thisLen; ++i) {\n store(\n changetype(out) + (offset++ << 1),\n load(changetype(this) + (i << 1))\n );\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(replacement),\n replaceLen << 1\n );\n offset += replaceLen;\n }\n return out;\n }\n var prev: isize = 0, next: isize = 0;\n if (searchLen == replaceLen) {\n // Fast path when search and replacement have same length\n let outSize = thisLen << 1;\n let out = changetype(__new(outSize, idof()));\n memory.copy(changetype(out), changetype(this), outSize);\n while (~(next = this.indexOf(search, prev))) {\n memory.copy(changetype(out) + (next << 1), changetype(replacement), replaceLen << 1);\n prev = next + searchLen;\n }\n return out;\n }\n var out: String | null = null, offset: usize = 0, outSize = thisLen;\n while (~(next = this.indexOf(search, prev))) {\n if (!out) out = changetype(__new(thisLen << 1, idof()));\n let chunk = next - prev;\n if (offset + chunk + replaceLen > outSize) {\n outSize <<= 1;\n out = changetype(__renew(changetype(out), outSize << 1));\n }\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(this) + (prev << 1),\n chunk << 1\n );\n offset += chunk;\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(replacement),\n replaceLen << 1\n );\n offset += replaceLen;\n prev = next + searchLen;\n }\n if (out) {\n let rest = thisLen - prev;\n if (offset + rest > outSize) {\n outSize <<= 1;\n out = changetype(__renew(changetype(out), outSize << 1));\n }\n if (rest) {\n memory.copy(\n changetype(out) + (offset << 1),\n changetype(this) + (prev << 1),\n rest << 1\n );\n }\n rest += offset;\n if (outSize > rest) {\n out = changetype(__renew(changetype(out), rest << 1));\n }\n return out;\n }\n return this;\n }\n\n slice(start: i32, end: i32 = i32.MAX_VALUE): String {\n var len = this.length;\n start = start < 0 ? max(start + len, 0) : min(start, len);\n end = end < 0 ? max(end + len, 0) : min(end, len);\n len = end - start;\n if (len <= 0) return changetype(\"\");\n var out = changetype(__new(len << 1, idof()));\n memory.copy(changetype(out), changetype(this) + (start << 1), len << 1);\n return out;\n }\n\n split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] {\n if (!limit) return changetype(__newArray(0, alignof(), idof>()));\n if (separator === null) return [this];\n var length: isize = this.length;\n var sepLen = separator.length;\n if (limit < 0) limit = i32.MAX_VALUE;\n if (!sepLen) {\n if (!length) return changetype(__newArray(0, alignof(), idof>()));\n // split by chars\n length = min(length, limit);\n let result = changetype(__newArray(length, alignof(), idof>()));\n // @ts-ignore: cast\n let resultStart = result.dataStart as usize;\n for (let i: isize = 0; i < length; ++i) {\n let charStr = changetype(__new(2, idof()));\n store(changetype(charStr), load(changetype(this) + (i << 1)));\n store(resultStart + (i << alignof()), changetype(charStr)); // result[i] = charStr\n __link(changetype(result), changetype(charStr), true);\n }\n return result;\n } else if (!length) {\n let result = changetype(__newArray(1, alignof(), idof>()));\n // @ts-ignore: cast\n store(result.dataStart as usize, changetype(\"\")); // static \"\"\n return result;\n }\n var result = changetype(__newArray(0, alignof(), idof>()));\n var end = 0, start = 0, i = 0;\n while (~(end = this.indexOf(separator, start))) {\n let len = end - start;\n if (len > 0) {\n let out = changetype(__new(len << 1, idof()));\n memory.copy(changetype(out), changetype(this) + (start << 1), len << 1);\n result.push(out);\n } else {\n result.push(changetype(\"\"));\n }\n if (++i == limit) return result;\n start = end + sepLen;\n }\n if (!start) { // also means: loop above didn't do anything\n result.push(this);\n return result;\n }\n var len = length - start;\n if (len > 0) {\n let out = changetype(__new(len << 1, idof()));\n memory.copy(changetype(out), changetype(this) + (start << 1), len << 1);\n result.push(out);\n } else {\n result.push(changetype(\"\")); // static \"\"\n }\n return result;\n }\n\n toLowerCase(): String {\n var len = this.length;\n if (!len) return this;\n var codes = changetype(__new(len * 2 * 2, idof()));\n var j: usize = 0;\n for (let i: usize = 0; i < len; ++i, ++j) {\n let c = load(changetype(this) + (i << 1));\n if (isAscii(c)) {\n store(changetype(codes) + (j << 1), toLower8(c));\n } else {\n // check and read surrogate pair\n if ((c - 0xD7FF < 0xDC00 - 0xD7FF) && i < len - 1) {\n let c1 = load(changetype(this) + (i << 1), 2);\n if (c1 - 0xDBFF < 0xE000 - 0xDBFF) {\n let c0 = c;\n c = (((c & 0x03FF) << 10) | (c1 & 0x03FF)) + 0x10000;\n ++i;\n if (c >= 0x20000) {\n store(changetype(codes) + (j << 1), c0 | (c1 << 16));\n ++j;\n continue;\n }\n }\n }\n // check special casing for lower table. It has one ently so instead lookup we just inline this.\n if (c == 0x0130) {\n // 0x0130 -> [0x0069, 0x0307]\n store(changetype(codes) + (j << 1), (0x0307 << 16) | 0x0069);\n ++j;\n } else if (c == 0x03A3) { // 'Σ'\n // Σ maps to σ but except at the end of a word where it maps to ς\n let sigma = 0x03C3; // σ\n if (len > 1 && isFinalSigma(changetype(this), i, len)) {\n sigma = 0x03C2; // ς\n }\n store(changetype(codes) + (j << 1), sigma);\n } else if (c - 0x24B6 <= 0x24CF - 0x24B6) {\n // Range 0x24B6 <= c <= 0x24CF not covered by casemap and require special early handling\n store(changetype(codes) + (j << 1), c + 26);\n } else {\n let code = casemap(c, 0) & 0x1FFFFF;\n if (code < 0x10000) {\n store(changetype(codes) + (j << 1), code);\n } else {\n // store as surrogare pair\n code -= 0x10000;\n let lo = (code >>> 10) | 0xD800;\n let hi = (code & 0x03FF) | 0xDC00;\n store(changetype(codes) + (j << 1), lo | (hi << 16));\n ++j;\n }\n }\n }\n }\n return changetype(__renew(changetype(codes), j << 1));\n }\n\n toUpperCase(): String {\n var len = this.length;\n if (!len) return this;\n var codes = changetype(__new(len * 3 * 2, idof()));\n var specialsPtr = changetype(SPECIALS_UPPER);\n var specialsLen = SPECIALS_UPPER.length;\n var j: usize = 0;\n for (let i: usize = 0; i < len; ++i, ++j) {\n let c = load(changetype(this) + (i << 1));\n if (isAscii(c)) {\n store(changetype(codes) + (j << 1), toUpper8(c));\n } else {\n // check and read surrogate pair\n if ((c - 0xD7FF < 0xDC00 - 0xD7FF) && i < len - 1) {\n let c1 = load(changetype(this) + (i << 1), 2);\n if (c1 - 0xDBFF < 0xE000 - 0xDBFF) {\n let c0 = c;\n c = (((c & 0x03FF) << 10) | (c1 & 0x03FF)) + 0x10000;\n ++i;\n if (c >= 0x20000) {\n store(changetype(codes) + (j << 1), c0 | (c1 << 16));\n ++j;\n continue;\n }\n }\n }\n // Range 0x24D0 <= c <= 0x24E9 not covered by casemap and require special early handling\n if (c - 0x24D0 <= 0x24E9 - 0x24D0) {\n // monkey patch\n store(changetype(codes) + (j << 1), c - 26);\n } else {\n let index: usize = -1;\n // Fast range check. See first and last rows in specialsUpper table\n if (c - 0x00DF <= 0xFB17 - 0x00DF) {\n index = bsearch(c, specialsPtr, specialsLen);\n }\n if (~index) {\n // load next 3 code points from row with `index` offset for specialsUpper table\n let ab = load(specialsPtr + (index << 1), 2);\n let cc = load(specialsPtr + (index << 1), 6);\n store(changetype(codes) + (j << 1), ab, 0);\n store(changetype(codes) + (j << 1), cc, 4);\n j += 1 + usize(cc != 0);\n } else {\n let code = casemap(c, 1) & 0x1FFFFF;\n if (code < 0x10000) {\n store(changetype(codes) + (j << 1), code);\n } else {\n // store as surrogare pair\n code -= 0x10000;\n let lo = (code >>> 10) | 0xD800;\n let hi = (code & 0x03FF) | 0xDC00;\n store(changetype(codes) + (j << 1), lo | (hi << 16));\n ++j;\n }\n }\n }\n }\n }\n return changetype(__renew(changetype(codes), j << 1));\n }\n\n toString(): String {\n return this;\n }\n}\n\n// @ts-ignore: nolib\nexport type string = String;\n\nexport function parseInt(str: string, radix: i32 = 0): f64 {\n return strtol(str, radix);\n}\n\nexport function parseFloat(str: string): f64 {\n return strtod(str);\n}\n\n// Encoding helpers\nexport namespace String {\n\n export namespace UTF8 {\n\n export const enum ErrorMode {\n WTF8,\n REPLACE,\n ERROR\n }\n\n export function byteLength(str: string, nullTerminated: bool = false): i32 {\n var strOff = changetype(str);\n var strEnd = strOff + changetype(changetype(str) - TOTAL_OVERHEAD).rtSize;\n var bufLen = i32(nullTerminated);\n while (strOff < strEnd) {\n let c1 = load(strOff);\n if (c1 < 128) {\n // @ts-ignore: cast\n if (nullTerminated & !c1) break;\n bufLen += 1;\n } else if (c1 < 2048) {\n bufLen += 2;\n } else {\n if ((c1 & 0xFC00) == 0xD800 && strOff + 2 < strEnd) {\n if ((load(strOff, 2) & 0xFC00) == 0xDC00) {\n bufLen += 4; strOff += 4;\n continue;\n }\n }\n bufLen += 3;\n }\n strOff += 2;\n }\n return bufLen;\n }\n\n export function encode(str: string, nullTerminated: bool = false, errorMode: ErrorMode = ErrorMode.WTF8): ArrayBuffer {\n var buf = changetype(__new(byteLength(str, nullTerminated), idof()));\n encodeUnsafe(changetype(str), str.length, changetype(buf), nullTerminated, errorMode);\n return buf;\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function encodeUnsafe(str: usize, len: i32, buf: usize, nullTerminated: bool = false, errorMode: ErrorMode = ErrorMode.WTF8): usize {\n var strEnd = str + (len << 1);\n var bufOff = buf;\n while (str < strEnd) {\n let c1 = load(str);\n if (c1 < 128) {\n store(bufOff, c1);\n bufOff++;\n } else if (c1 < 2048) {\n let b0 = c1 >> 6 | 192;\n let b1 = c1 & 63 | 128;\n store(bufOff, b1 << 8 | b0);\n bufOff += 2;\n } else {\n // D800: 11011 0 0000000000 Lead\n // DBFF: 11011 0 1111111111\n // DC00: 11011 1 0000000000 Trail\n // DFFF: 11011 1 1111111111\n // F800: 11111 0 0000000000 Mask\n // FC00: 11111 1 0000000000\n if ((c1 & 0xF800) == 0xD800) {\n if (c1 < 0xDC00 && str + 2 < strEnd) {\n let c2 = load(str, 2);\n if ((c2 & 0xFC00) == 0xDC00) {\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) | (c2 & 0x03FF);\n let b0 = c1 >> 18 | 240;\n let b1 = c1 >> 12 & 63 | 128;\n let b2 = c1 >> 6 & 63 | 128;\n let b3 = c1 & 63 | 128;\n store(bufOff, b3 << 24 | b2 << 16 | b1 << 8 | b0);\n bufOff += 4; str += 4;\n continue;\n }\n }\n if (errorMode != ErrorMode.WTF8) { // unlikely\n if (errorMode == ErrorMode.ERROR) throw new Error(E_UNPAIRED_SURROGATE);\n c1 = 0xFFFD;\n }\n }\n let b0 = c1 >> 12 | 224;\n let b1 = c1 >> 6 & 63 | 128;\n let b2 = c1 & 63 | 128;\n store(bufOff, b1 << 8 | b0);\n store(bufOff, b2, 2);\n bufOff += 3;\n }\n str += 2;\n }\n if (nullTerminated) {\n store(bufOff++, 0);\n }\n return bufOff - buf;\n }\n\n export function decode(buf: ArrayBuffer, nullTerminated: bool = false): String {\n return decodeUnsafe(changetype(buf), buf.byteLength, nullTerminated);\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function decodeUnsafe(buf: usize, len: usize, nullTerminated: bool = false): String {\n var bufOff = buf;\n var bufEnd = buf + len;\n assert(bufEnd >= bufOff); // guard wraparound\n var str = changetype(__new(len << 1, idof())); // max is one u16 char per u8 byte\n var strOff = changetype(str);\n while (bufOff < bufEnd) {\n let u0 = load(bufOff); ++bufOff;\n if (!(u0 & 128)) {\n // @ts-ignore: cast\n if (nullTerminated & !u0) break;\n store(strOff, u0);\n } else {\n if (bufEnd == bufOff) break;\n let u1 = load(bufOff) & 63; ++bufOff;\n if ((u0 & 224) == 192) {\n store(strOff, (u0 & 31) << 6 | u1);\n } else {\n if (bufEnd == bufOff) break;\n let u2 = load(bufOff) & 63; ++bufOff;\n if ((u0 & 240) == 224) {\n u0 = (u0 & 15) << 12 | u1 << 6 | u2;\n } else {\n if (bufEnd == bufOff) break;\n u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | load(bufOff) & 63;\n ++bufOff;\n }\n if (u0 < 0x10000) {\n store(strOff, u0);\n } else {\n u0 -= 0x10000;\n let lo = u0 >> 10 | 0xD800;\n let hi = (u0 & 0x03FF) | 0xDC00;\n store(strOff, lo | (hi << 16));\n strOff += 2;\n }\n }\n }\n strOff += 2;\n }\n return changetype(__renew(changetype(str), strOff - changetype(str)));\n }\n }\n\n export namespace UTF16 {\n\n export function byteLength(str: string): i32 {\n return changetype(changetype(str) - TOTAL_OVERHEAD).rtSize;\n }\n\n export function encode(str: string): ArrayBuffer {\n var buf = changetype(__new(byteLength(str), idof()));\n encodeUnsafe(changetype(str), str.length, changetype(buf));\n return buf;\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function encodeUnsafe(str: usize, len: i32, buf: usize): usize {\n var size = len << 1;\n memory.copy(buf, changetype(str), size);\n return size;\n }\n\n export function decode(buf: ArrayBuffer): String {\n return decodeUnsafe(changetype(buf), buf.byteLength);\n }\n\n // @ts-ignore: decorator\n @unsafe\n export function decodeUnsafe(buf: usize, len: usize): String {\n var str = changetype(__new(len &= ~1, idof()));\n memory.copy(changetype(str), buf, len);\n return str;\n }\n }\n}\n\nexport class TemplateStringsArray extends Array {\n readonly raw: string[];\n}\n", - "symbol": "import { Map } from \"./map\";\n\n// @ts-ignore: decorator\n@lazy var stringToId: Map;\n\n// @ts-ignore: decorator\n@lazy var idToString: Map;\n\n// @ts-ignore: decorator\n@lazy var nextId: usize = 12; // Symbol.unscopables + 1\n\n@unmanaged @final abstract class _Symbol {\n\n // TODO: all of the following default symbols are unused currently yet add to\n // binary size if #toString becomes compiled. Ultimately we'll most likely want\n // to remove the unsupported ones and only keep what's actually supported.\n\n // @ts-ignore: decorator\n @lazy\n static readonly hasInstance: symbol = changetype(1);\n\n // @ts-ignore: decorator\n @lazy\n static readonly isConcatSpreadable: symbol = changetype(2);\n\n // @ts-ignore: decorator\n @lazy\n static readonly isRegExp: symbol = changetype(3);\n\n // @ts-ignore: decorator\n @lazy\n static readonly iterator: symbol = changetype(3);\n\n // @ts-ignore: decorator\n @lazy\n static readonly match: symbol = changetype(4);\n\n // @ts-ignore: decorator\n @lazy\n static readonly replace: symbol = changetype(5);\n\n // @ts-ignore: decorator\n @lazy\n static readonly search: symbol = changetype(6);\n\n // @ts-ignore: decorator\n @lazy\n static readonly species: symbol = changetype(7);\n\n // @ts-ignore: decorator\n @lazy\n static readonly split: symbol = changetype(8);\n\n // @ts-ignore: decorator\n @lazy\n static readonly toPrimitive: symbol = changetype(9);\n\n // @ts-ignore: decorator\n @lazy\n static readonly toStringTag: symbol = changetype(10);\n\n // @ts-ignore: decorator\n @lazy\n static readonly unscopables: symbol = changetype(11);\n\n static for(key: string): symbol {\n if (!stringToId) { stringToId = new Map(); idToString = new Map(); }\n else if (stringToId.has(key)) return changetype(stringToId.get(key));\n var id = nextId++;\n if (!id) unreachable(); // out of ids\n stringToId.set(key, id);\n idToString.set(id, key);\n return changetype(id);\n }\n\n static keyFor(sym: symbol): string | null {\n return idToString !== null && idToString.has(changetype(sym))\n ? idToString.get(changetype(sym))\n : null;\n }\n\n toString(): string {\n var id = changetype(this);\n var str = \"\";\n switch (id) {\n case 1: { str = \"hasInstance\"; break; }\n case 2: { str = \"isConcatSpreadable\"; break; }\n case 3: { str = \"isRegExp\"; break; }\n case 4: { str = \"match\"; break; }\n case 5: { str = \"replace\"; break; }\n case 6: { str = \"search\"; break; }\n case 7: { str = \"species\"; break; }\n case 8: { str = \"split\"; break; }\n case 9: { str = \"toPrimitive\"; break; }\n case 10: { str = \"toStringTag\"; break; }\n case 11: { str = \"unscopables\"; break; }\n default: {\n if (idToString !== null && idToString.has(id)) str = idToString.get(id);\n break;\n }\n }\n return \"Symbol(\" + str + \")\";\n }\n}\n\nexport function Symbol(description: string | null = null): symbol {\n var id = nextId++;\n if (!id) unreachable(); // out of ids\n return changetype(id);\n}\n\nexport type Symbol = _Symbol;\n\n// @ts-ignore: nolib\nexport type symbol = _Symbol;\n", - "table": "import { E_NOTIMPLEMENTED } from \"./util/error\";\n\nexport namespace table {\n\n export function copy(dst: u32, src: u32, n: u32): void {\n throw new Error(E_NOTIMPLEMENTED);\n }\n\n export function init(elementIndex: u32, srcOffset: u32, dstOffset: u32, n: u32): void {\n throw new Error(E_NOTIMPLEMENTED);\n }\n\n export function drop(elementIndex: u32): void {\n throw new Error(E_NOTIMPLEMENTED);\n }\n}\n", - "typedarray": "import { COMPARATOR, SORT } from \"./util/sort\";\nimport { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_NOTIMPLEMENTED } from \"./util/error\";\nimport { joinIntegerArray, joinFloatArray } from \"./util/string\";\nimport { REVERSE } from \"./util/bytes\";\nimport { idof } from \"./builtins\";\nimport { ArrayBufferView } from \"./arraybuffer\";\n\nexport class Int8Array extends ArrayBufferView {\n [key: number]: i8;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength;\n }\n\n @operator(\"[]\")\n private __get(index: i32): i8 {\n if (index >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + index);\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): i8 {\n return load(this.dataStart + index);\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: native): void {\n if (index >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + index, value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: native): void {\n store(this.dataStart + index, value);\n }\n\n at(index: i32): i8 {\n var len = this.byteLength;\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + index);\n }\n\n includes(searchElement: i8, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: i8, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: i8, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int8Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: i8, b: i8) => i32 = COMPARATOR()): Int8Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int8Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int8Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Int8Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: i8, index: i32, array: Int8Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: i8, index: i32, array: Int8Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: i8, index: i32, self: Int8Array) => i8): Int8Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: i8, index: i32, self: Int8Array) => bool): Int8Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: i8, index: i32, self: Int8Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: i8, index: i32, self: Int8Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: i8, index: i32, self: Int8Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: i8, index: i32, self: Int8Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: i8, index: i32, self: Int8Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n toString(): string {\n return this.join();\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Int8Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Uint8Array extends ArrayBufferView {\n [key: number]: u8;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength;\n }\n\n @operator(\"[]\")\n private __get(index: i32): u8 {\n if (index >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + index);\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): u8 {\n return load(this.dataStart + index);\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: native): void {\n if (index >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + index, value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: native): void {\n store(this.dataStart + index, value);\n }\n\n at(index: i32): u8 {\n var len = this.byteLength;\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + index);\n }\n\n includes(searchElement: u8, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: u8, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: u8, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: u8, b: u8) => i32 = COMPARATOR()): Uint8Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Uint8Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: u8, index: i32, array: Uint8Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: u8, index: i32, array: Uint8Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: u8, index: i32, self: Uint8Array) => u8): Uint8Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: u8, index: i32, self: Uint8Array) => bool): Uint8Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: u8, index: i32, self: Uint8Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: u8, index: i32, self: Uint8Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: u8, index: i32, self: Uint8Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: u8, index: i32, self: Uint8Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: u8, index: i32, self: Uint8Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Uint8Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Uint8ClampedArray extends ArrayBufferView {\n [key: number]: u8;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength;\n }\n\n @operator(\"[]\")\n private __get(index: i32): u8 {\n if (index >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + index);\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): u8 {\n return load(this.dataStart + index);\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: native): void {\n if (index >= this.byteLength) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + index, ~(value >> 31) & (((255 - value) >> 31) | value));\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: native): void {\n store(this.dataStart + index, ~(value >> 31) & (((255 - value) >> 31) | value));\n }\n\n at(index: i32): u8 {\n var len = this.byteLength;\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + index);\n }\n\n includes(searchElement: u8, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: u8, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: u8, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: u8, b: u8) => i32 = COMPARATOR()): Uint8ClampedArray {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray {\n return SLICE(this, begin, end);\n }\n\n subarray(start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray {\n return SUBARRAY(this, start, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Uint8ClampedArray {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: u8, index: i32, array: Uint8ClampedArray) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: u8, index: i32, array: Uint8ClampedArray) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: u8, index: i32, self: Uint8ClampedArray) => u8): Uint8ClampedArray {\n return MAP(this, fn);\n }\n\n filter(fn: (value: u8, index: i32, self: Uint8ClampedArray) => bool): Uint8ClampedArray {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: u8, index: i32, self: Uint8ClampedArray) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: u8, index: i32, self: Uint8ClampedArray) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: u8, index: i32, self: Uint8ClampedArray) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: u8, index: i32, self: Uint8ClampedArray) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: u8, index: i32, self: Uint8ClampedArray) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Uint8ClampedArray {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Int16Array extends ArrayBufferView {\n [key: number]: i16;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): i16 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): i16 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: native): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: native): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): i16 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: i16, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: i16, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: i16, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int16Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: i16, b: i16) => i32 = COMPARATOR()): Int16Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int16Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int16Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Int16Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: i16, index: i32, array: Int16Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: i16, index: i32, array: Int16Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: i16, index: i32, self: Int16Array) => i16): Int16Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: i16, index: i32, self: Int16Array) => bool): Int16Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: i16, index: i32, self: Int16Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: i16, index: i32, self: Int16Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: i16, index: i32, self: Int16Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: i16, index: i32, self: Int16Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: i16, index: i32, self: Int16Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Int16Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Uint16Array extends ArrayBufferView {\n [key: number]: u16;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): u16 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): u16 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: native): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: native): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): u16 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: u16, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: u16, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: u16, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint16Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: u16, b: u16) => i32 = COMPARATOR()): Uint16Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint16Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint16Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Uint16Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: u16, index: i32, array: Uint16Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: u16, index: i32, array: Uint16Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: u16, index: i32, self: Uint16Array) => u16): Uint16Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: u16, index: i32, self: Uint16Array) => bool): Uint16Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: u16, index: i32, self: Uint16Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: u16, index: i32, self: Uint16Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: u16, index: i32, self: Uint16Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: u16, index: i32, self: Uint16Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: u16, index: i32, self: Uint16Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Uint16Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Int32Array extends ArrayBufferView {\n [key: number]: i32;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): i32 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): i32 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: i32): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: i32): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): i32 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: i32, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: i32, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: i32, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int32Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: i32, b: i32) => i32 = COMPARATOR()): Int32Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int32Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int32Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Int32Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: i32, index: i32, array: Int32Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: i32, index: i32, array: Int32Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: i32, index: i32, self: Int32Array) => i32): Int32Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: i32, index: i32, self: Int32Array) => bool): Int32Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: i32, index: i32, self: Int32Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: i32, index: i32, self: Int32Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: i32, index: i32, self: Int32Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: i32, index: i32, self: Int32Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: i32, index: i32, self: Int32Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Int32Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Uint32Array extends ArrayBufferView {\n [key: number]: u32;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): u32 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): u32 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: u32): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: u32): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): u32 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: u32, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: u32, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: u32, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint32Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: u32, b: u32) => i32 = COMPARATOR()): Uint32Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint32Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint32Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Uint32Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: u32, index: i32, array: Uint32Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: u32, index: i32, array: Uint32Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: u32, index: i32, self: Uint32Array) => u32): Uint32Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: u32, index: i32, self: Uint32Array) => bool): Uint32Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: u32, index: i32, self: Uint32Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: u32, index: i32, self: Uint32Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: u32, index: i32, self: Uint32Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: u32, index: i32, self: Uint32Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: u32, index: i32, self: Uint32Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Uint32Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Int64Array extends ArrayBufferView {\n [key: number]: i64;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): i64 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): i64 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: i64): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: i64): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): i64 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: i64, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: i64, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: i64, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: i64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int64Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: i64, b: i64) => i32 = COMPARATOR()): Int64Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int64Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Int64Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Int64Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: i64, index: i32, array: Int64Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: i64, index: i32, array: Int64Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: i64, index: i32, self: Int64Array) => i64): Int64Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: i64, index: i32, self: Int64Array) => bool): Int64Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: i64, index: i32, self: Int64Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: i64, index: i32, self: Int64Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: i64, index: i32, self: Int64Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: i64, index: i32, self: Int64Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: i64, index: i32, self: Int64Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Int64Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Uint64Array extends ArrayBufferView {\n [key: number]: u64;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): u64 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): u64 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: u64): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: u64): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): u64 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: u64, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: u64, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: u64, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: u64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint64Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: u64, b: u64) => i32 = COMPARATOR()): Uint64Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint64Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Uint64Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Uint64Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: u64, index: i32, array: Uint64Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: u64, index: i32, array: Uint64Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: u64, index: i32, self: Uint64Array) => u64): Uint64Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: u64, index: i32, self: Uint64Array) => bool): Uint64Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: u64, index: i32, self: Uint64Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: u64, index: i32, self: Uint64Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: u64, index: i32, self: Uint64Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: u64, index: i32, self: Uint64Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: u64, index: i32, self: Uint64Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinIntegerArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Uint64Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Float32Array extends ArrayBufferView {\n [key: number]: f32;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): f32 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): f32 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: f32): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: f32): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): f32 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: f32, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: f32, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: f32, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: f32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float32Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: f32, b: f32) => i32 = COMPARATOR()): Float32Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Float32Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Float32Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Float32Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: f32, index: i32, array: Float32Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: f32, index: i32, array: Float32Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: f32, index: i32, self: Float32Array) => f32): Float32Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: f32, index: i32, self: Float32Array) => bool): Float32Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: f32, index: i32, self: Float32Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: f32, index: i32, self: Float32Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: f32, index: i32, self: Float32Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: f32, index: i32, self: Float32Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: f32, index: i32, self: Float32Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinFloatArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Float32Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\nexport class Float64Array extends ArrayBufferView {\n [key: number]: f64;\n\n // @ts-ignore: decorator\n @lazy\n static readonly BYTES_PER_ELEMENT: i32 = sizeof();\n\n constructor(length: i32) {\n super(length, alignof());\n }\n\n get length(): i32 {\n return this.byteLength >>> alignof();\n }\n\n @operator(\"[]\")\n private __get(index: i32): f64 {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n @unsafe @operator(\"{}\")\n private __uget(index: i32): f64 {\n return load(this.dataStart + (index << alignof()));\n }\n\n @operator(\"[]=\")\n private __set(index: i32, value: f64): void {\n if (index >= this.byteLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE);\n store(this.dataStart + (index << alignof()), value);\n }\n\n @unsafe @operator(\"{}=\")\n private __uset(index: i32, value: f64): void {\n store(this.dataStart + (index << alignof()), value);\n }\n\n at(index: i32): f64 {\n var len = this.byteLength >>> alignof();\n index += select(0, len, index >= 0);\n if (index >= len) throw new RangeError(E_INDEXOUTOFRANGE);\n return load(this.dataStart + (index << alignof()));\n }\n\n includes(searchElement: f64, fromIndex: i32 = 0): bool {\n return INCLUDES(this, searchElement, fromIndex);\n }\n\n indexOf(searchElement: f64, fromIndex: i32 = 0): i32 {\n return INDEX_OF(this, searchElement, fromIndex);\n }\n\n lastIndexOf(searchElement: f64, fromIndex: i32 = this.length): i32 {\n return LAST_INDEX_OF(this, searchElement, fromIndex);\n }\n\n fill(value: f64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float64Array {\n return FILL(this, value, start, end);\n }\n\n sort(comparator: (a: f64, b: f64) => i32 = COMPARATOR()): Float64Array {\n SORT(this.dataStart, this.length, comparator);\n return this;\n }\n\n slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Float64Array {\n return SLICE(this, begin, end);\n }\n\n subarray(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Float64Array {\n return SUBARRAY(this, begin, end);\n }\n\n copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Float64Array {\n return COPY_WITHIN(this, target, start, end);\n }\n\n reduce(\n fn: (accumulator: T, value: f64, index: i32, array: Float64Array) => T,\n initialValue: T,\n ): T {\n return REDUCE(this, fn, initialValue);\n }\n\n reduceRight(\n fn: (accumulator: T, value: f64, index: i32, array: Float64Array) => T,\n initialValue: T,\n ): T {\n return REDUCE_RIGHT(this, fn, initialValue);\n }\n\n map(fn: (value: f64, index: i32, self: Float64Array) => f64): Float64Array {\n return MAP(this, fn);\n }\n\n filter(fn: (value: f64, index: i32, self: Float64Array) => bool): Float64Array {\n return FILTER(this, fn);\n }\n\n findIndex(fn: (value: f64, index: i32, self: Float64Array) => bool): i32 {\n return FIND_INDEX(this, fn);\n }\n\n findLastIndex(fn: (value: f64, index: i32, self: Float64Array) => bool): i32 {\n return FIND_LAST_INDEX(this, fn);\n }\n\n some(fn: (value: f64, index: i32, self: Float64Array) => bool): bool {\n return SOME(this, fn);\n }\n\n every(fn: (value: f64, index: i32, self: Float64Array) => bool): bool {\n return EVERY(this, fn);\n }\n\n forEach(fn: (value: f64, index: i32, self: Float64Array) => void): void {\n FOREACH(this, fn);\n }\n\n reverse(): this {\n REVERSE(this.dataStart, this.length);\n return this;\n }\n\n join(separator: string = \",\"): string {\n return joinFloatArray(this.dataStart, this.length, separator);\n }\n\n set(source: U, offset: i32 = 0): void {\n SET>(this, source, offset);\n }\n\n toString(): string {\n return this.join();\n }\n\n static wrap(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): Float64Array {\n return WRAP(buffer, byteOffset, length);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction FILL(\n array: TArray,\n value: native,\n start: i32,\n end: i32\n): TArray {\n var ptr = array.dataStart;\n var len = array.length;\n start = start < 0 ? max(len + start, 0) : min(start, len);\n end = end < 0 ? max(len + end, 0) : min(end, len);\n if (sizeof() == 1) {\n if (start < end) memory.fill(ptr + start, value, (end - start));\n } else {\n for (; start < end; ++start) {\n store(ptr + (start << alignof()), value);\n }\n }\n return array;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction SLICE(\n array: TArray,\n start: i32,\n end: i32\n): TArray {\n var len = array.length;\n start = start < 0 ? max(start + len, 0) : min(start, len);\n end = end < 0 ? max(end + len, 0) : min(end , len);\n len = max(end - start, 0);\n var slice = instantiate(len);\n memory.copy(\n slice.dataStart,\n array.dataStart + (start << alignof()),\n len << alignof()\n );\n return slice;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction SUBARRAY(\n array: TArray,\n begin: i32,\n end: i32\n): TArray {\n var len = array.length;\n begin = begin < 0 ? max(len + begin, 0) : min(begin, len);\n end = end < 0 ? max(len + end, 0) : min(end, len);\n end = max(end, begin);\n\n var out = changetype(__new(offsetof(), idof()));\n var buf = changetype(array.buffer);\n store(changetype(out), buf, offsetof(\"buffer\"));\n __link(changetype(out), buf, false);\n store(changetype(out), array.dataStart + (begin << alignof()), offsetof(\"dataStart\"));\n store(changetype(out), (end - begin) << alignof(), offsetof(\"byteLength\"));\n return out;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction COPY_WITHIN(\n array: TArray,\n target: i32,\n start: i32,\n end: i32\n): TArray {\n var len = array.length;\n var ptr = array.dataStart;\n\n end = min(end, len);\n var to = target < 0 ? max(len + target, 0) : min(target, len);\n var from = start < 0 ? max(len + start, 0) : min(start, len);\n var last = end < 0 ? max(len + end, 0) : min(end, len);\n var count = min(last - from, len - to);\n\n memory.copy(\n ptr + (to << alignof()),\n ptr + (from << alignof()),\n count << alignof()\n );\n return array;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction REDUCE(\n array: TArray,\n fn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet,\n initialValue: TRet\n): TRet {\n var ptr = array.dataStart;\n for (let i = 0, k = array.length; i < k; i++) {\n initialValue = fn(initialValue, load(ptr + (i << alignof())), i, array);\n }\n return initialValue;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction REDUCE_RIGHT(\n array: TArray,\n fn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet,\n initialValue: TRet\n): TRet {\n var ptr = array.dataStart;\n for (let i = array.length - 1; i >= 0; i--) {\n initialValue = fn(initialValue, load(ptr + (i << alignof())), i, array);\n }\n return initialValue;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction MAP(\n array: TArray,\n fn: (value: T, index: i32, self: TArray) => T,\n): TArray {\n var len = array.length;\n var ptr = array.dataStart;\n\n var byteLength = len << alignof();\n var out = changetype(__new(offsetof(), idof()));\n var buf = changetype(__new(byteLength, idof()));\n for (let i = 0; i < len; i++) {\n store(\n changetype(buf) + (i << alignof()),\n fn(load(ptr + (i << alignof())), i, array)\n );\n }\n store(changetype(out), changetype(buf), offsetof(\"buffer\"));\n __link(changetype(out), changetype(buf), false);\n store(changetype(out), changetype(buf), offsetof(\"dataStart\"));\n store(changetype(out), byteLength, offsetof(\"byteLength\"));\n return out;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction FILTER(\n array: TArray,\n fn: (value: T, index: i32, self: TArray) => bool,\n): TArray {\n var len = array.length;\n var out = changetype(__new(offsetof(), idof()));\n var buf = changetype(__new(len << alignof(), idof()));\n var dataStart = array.dataStart;\n var j: usize = 0;\n for (let i = 0; i < len; i++) {\n let value = load(dataStart + (i << alignof()));\n if (fn(value, i, array)) {\n store(\n changetype(buf) + (j++ << alignof()),\n value\n );\n }\n }\n // shrink output buffer\n var byteLength = j << alignof();\n var data = __renew(changetype(buf), byteLength);\n store(changetype(out), data, offsetof(\"buffer\"));\n __link(changetype(out), data, false);\n store(changetype(out), byteLength, offsetof(\"byteLength\"));\n store(changetype(out), data, offsetof(\"dataStart\"));\n return out;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction FIND_INDEX(\n array: TArray,\n fn: (value: T, index: i32, array: TArray) => bool,\n): i32 {\n var ptr = array.dataStart;\n for (let i = 0, k = array.length; i < k; i++) {\n if (fn(load(ptr + (i << alignof())), i, array)) return i;\n }\n return -1;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction FIND_LAST_INDEX(\n array: TArray,\n fn: (value: T, index: i32, array: TArray) => bool,\n): i32 {\n var ptr = array.dataStart;\n for (let i = array.length - 1; i >= 0; --i) {\n if (fn(load(ptr + (i << alignof())), i, array)) return i;\n }\n return -1;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction INCLUDES(\n array: TArray,\n searchElement: T,\n fromIndex: i32,\n): bool {\n if (isFloat()) {\n let index: isize = fromIndex;\n let len: isize = array.length;\n if (len == 0 || index >= len) return false;\n if (index < 0) index = max(len + index, 0);\n let dataStart = array.dataStart;\n while (index < len) {\n let elem = load(dataStart + (index << alignof()));\n // @ts-ignore\n if (elem == searchElement || isNaN(elem) & isNaN(searchElement)) return true;\n ++index;\n }\n return false;\n } else {\n return INDEX_OF(array, searchElement, fromIndex) >= 0;\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction INDEX_OF(\n array: TArray,\n searchElement: T,\n fromIndex: i32,\n): i32 {\n var index: isize = fromIndex;\n var len: isize = array.length;\n if (len == 0 || index >= len) return -1;\n if (index < 0) index = max(len + index, 0);\n var dataStart = array.dataStart;\n while (index < len) {\n if (load(dataStart + (index << alignof())) == searchElement) return index;\n ++index;\n }\n return -1;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction LAST_INDEX_OF(\n array: TArray,\n searchElement: T,\n fromIndex: i32,\n): i32 {\n var index: isize = fromIndex;\n var len: isize = array.length;\n if (len == 0) return -1;\n if (index < 0) index = len + index; // no need to clamp\n else if (index >= len) index = len - 1;\n var dataStart = array.dataStart;\n while (index >= 0) {\n if (load(dataStart + (index << alignof())) == searchElement) return index;\n --index;\n }\n return -1;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction SOME(\n array: TArray,\n fn: (value: T, index: i32, array: TArray) => bool,\n): bool {\n var ptr = array.dataStart;\n for (let i = 0, k = array.length; i < k; i++) {\n if (fn(load(ptr + (i << alignof())), i, array)) return true;\n }\n return false;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction EVERY(\n array: TArray,\n fn: (value: T, index: i32, array: TArray) => bool,\n): bool {\n var ptr = array.dataStart;\n for (let i = 0, k = array.length; i < k; i++) {\n if (fn(load(ptr + (i << alignof())), i, array)) continue;\n return false;\n }\n return true;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction FOREACH(\n array: TArray,\n fn: (value: T, index: i32, array: TArray) => void,\n): void {\n var ptr = array.dataStart;\n for (let i = 0, k = array.length; i < k; i++) {\n fn(load(ptr + (i << alignof())), i, array);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction WRAP(\n buffer: ArrayBuffer,\n byteOffset: i32 = 0,\n len: i32 = -1\n): TArray {\n var byteLength: i32;\n var bufferByteLength = buffer.byteLength;\n const mask: u32 = sizeof() - 1;\n if (i32(byteOffset > bufferByteLength) | (byteOffset & mask)) {\n throw new RangeError(E_INDEXOUTOFRANGE);\n }\n if (len < 0) {\n if (len == -1) {\n if (bufferByteLength & mask) {\n throw new RangeError(E_INVALIDLENGTH);\n }\n byteLength = bufferByteLength - byteOffset;\n } else {\n throw new RangeError(E_INVALIDLENGTH);\n }\n } else {\n byteLength = len << alignof();\n if (byteOffset + byteLength > bufferByteLength) {\n throw new RangeError(E_INVALIDLENGTH);\n }\n }\n var out = changetype(__new(offsetof(), idof()));\n store(changetype(out), changetype(buffer), offsetof(\"buffer\"));\n __link(changetype(out), changetype(buffer), false);\n store(changetype(out), byteLength, offsetof(\"byteLength\"));\n store(changetype(out), changetype(buffer) + byteOffset, offsetof(\"dataStart\"));\n return out;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction SET(\n target: TArray,\n source: UArray,\n offset: i32 = 0\n): void {\n // need to assert at compile time that U is not a reference or a function\n if (isReference()) {\n ERROR(E_NOTIMPLEMENTED);\n }\n\n // Uncaught RangeError: offset is out of bounds\n if (offset < 0) throw new RangeError(E_INDEXOUTOFRANGE);\n if (source.length + offset > target.length) throw new RangeError(E_INDEXOUTOFRANGE);\n\n // if the types align and match, use memory.copy() instead of manual loop\n if (isInteger() == isInteger() && alignof() == alignof() &&\n !(target instanceof Uint8ClampedArray && isSigned())) {\n memory.copy(\n target.dataStart + (offset << alignof()),\n source.dataStart,\n source.byteLength\n );\n } else {\n let targetDataStart = target.dataStart + (offset << alignof());\n let sourceDataStart = source.dataStart;\n let count = source.length;\n for (let i = 0; i < count; i++) {\n // if TArray is Uint8ClampedArray, then values must be clamped\n if (target instanceof Uint8ClampedArray) {\n if (isFloat()) {\n let value = load(sourceDataStart + (i << alignof()));\n store(\n targetDataStart + (i << alignof()),\n isFinite(value) ? max(0, min(255, value)) : 0\n );\n } else {\n let value = load(sourceDataStart + (i << alignof()));\n if (!isSigned()) {\n store(\n targetDataStart + (i << alignof()),\n // @ts-ignore: cast to T is valid for numeric types here\n min(255, value)\n );\n } else if (sizeof() <= 4) {\n store(\n targetDataStart + (i << alignof()),\n // @ts-ignore: cast to T is valid for numeric types here\n ~(value >> 31) & (((255 - value) >> 31) | value)\n );\n } else {\n store(\n targetDataStart + (i << alignof()),\n // @ts-ignore: cast to T is valid for numeric types here\n ~(value >> 63) & (((255 - value) >> 63) | value)\n );\n }\n }\n // if U is a float, then casting float to int must include a finite check\n } else if (isFloat() && !isFloat()) {\n let value = load(sourceDataStart + (i << alignof()));\n // @ts-ignore: cast to T is valid for numeric types here\n store(targetDataStart + (i << alignof()), isFinite(value) ? value : 0);\n } else if (isFloat() && !isFloat()) {\n // @ts-ignore: In this case the conversion is required\n store(targetDataStart + (i << alignof()), load(sourceDataStart + (i << alignof())));\n } else {\n store(targetDataStart + (i << alignof()), load(sourceDataStart + (i << alignof())));\n }\n }\n }\n}\n", - "uri": "import { encode, decode, URI_UNSAFE, URL_UNSAFE } from \"./util/uri\";\n\nexport function encodeURI(str: string): string {\n return changetype(encode(changetype(str), str.length, URI_UNSAFE));\n}\n\nexport function decodeURI(str: string): string {\n return changetype(decode(changetype(str), str.length, false));\n}\n\nexport function encodeURIComponent(str: string): string {\n return changetype(encode(changetype(str), str.length, URL_UNSAFE));\n}\n\nexport function decodeURIComponent(str: string): string {\n return changetype(decode(changetype(str), str.length, true));\n}\n", - "util/bytes": "export function REVERSE(ptr: usize, len: usize): void {\n if (len > 1) {\n let\n i: usize = 0,\n tail: usize,\n hlen: usize = len >> 1;\n\n if (ASC_SHRINK_LEVEL < 1) {\n if (sizeof() == 1) {\n // TODO: Decide later: Does we need this fast path cases?\n //\n // if (len == 4) {\n // store(ptr, bswap(load(ptr)));\n // return;\n // }\n // if (len == 8) {\n // store(ptr, bswap(load(ptr)));\n // return;\n // }\n tail = len - 8;\n while (i + 7 < hlen) {\n let front = ptr + i;\n let back = ptr + tail - i;\n let temp = bswap(load(front));\n store(front, bswap(load(back)));\n store(back, temp);\n i += 8;\n }\n }\n\n if (sizeof() == 2) {\n tail = len - 2;\n while (i + 1 < hlen) {\n let front = ptr + (i << 1);\n let back = ptr + (tail - i << 1);\n let temp = rotr(load(back), 16);\n store(back, rotr(load(front), 16));\n store(front, temp);\n i += 2;\n }\n }\n }\n\n tail = len - 1;\n while (i < hlen) {\n let front = ptr + (i << alignof());\n let back = ptr + (tail - i << alignof());\n let temp = load(front);\n store(front, load(back));\n store(back, temp);\n i++;\n }\n }\n}\n", - "util/casemap": "// Total tables size: ~5 kb (usually compressed to ~4 kb)\n// See: https://git.musl-libc.org/cgit/musl/tree/src/ctype/casemap.h\n\n// @ts-ignore: decorator\n@lazy @inline const TAB = memory.data([\n 7, 8, 9, 10, 11, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 13, 6, 6, 14, 6, 6, 6, 6, 6, 6, 6, 6, 15, 16, 17, 18,\n 6, 19, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 20, 21, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 22, 23, 6, 6, 6, 24, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 25,\n 6, 6, 6, 6, 26, 6, 6, 6, 6, 6, 6, 6, 27, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 28, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 29, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 30, 6, 6, 6, 6, 6, 6,\n 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,\n 43, 43, 43, 43, 43, 43, 43, 43, 1, 0, 84, 86, 86, 86, 86, 86,\n 86, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 43, 43, 43, 43, 43, 43,\n 43, 7, 43, 43, 91, 86, 86, 86, 86, 86, 86, 86, 74, 86, 86, 5,\n 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80,\n 36, 80, 121, 49, 80, 49, 80, 49, 56, 80, 49, 80, 49, 80, 49, 80,\n 49, 80, 49, 80, 49, 80, 49, 80, 78, 49, 2, 78, 13, 13, 78, 3,\n 78, 0, 36, 110, 0, 78, 49, 38, 110, 81, 78, 36, 80, 78, 57, 20,\n 129, 27, 29, 29, 83, 49, 80, 49, 80, 13, 49, 80, 49, 80, 49, 80,\n 27, 83, 36, 80, 49, 2, 92, 123, 92, 123, 92, 123, 92, 123, 92, 123,\n 20, 121, 92, 123, 92, 123, 92, 45, 43, 73, 3, 72, 3, 120, 92, 123,\n 20, 0, 150, 10, 1, 43, 40, 6, 6, 0, 42, 6, 42, 42, 43, 7,\n 187, 181, 43, 30, 0, 43, 7, 43, 43, 43, 1, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 1, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 205, 70, 205, 43, 0, 37, 43, 7, 1, 6, 1, 85, 86, 86, 86,\n 86, 86, 85, 86, 86, 2, 36, 129, 129, 129, 129, 129, 21, 129, 129, 129,\n 0, 0, 43, 0, 178, 209, 178, 209, 178, 209, 178, 209, 0, 0, 205, 204,\n 1, 0, 215, 215, 215, 215, 215, 131, 129, 129, 129, 129, 129, 129, 129, 129,\n 129, 129, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 28, 0, 0, 0,\n 0, 0, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 2, 0, 0,\n 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80,\n 49, 80, 78, 49, 80, 49, 80, 78, 49, 80, 49, 80, 49, 80, 49, 80,\n 49, 80, 49, 80, 49, 80, 49, 2, 135, 166, 135, 166, 135, 166, 135, 166,\n 135, 166, 135, 166, 135, 166, 135, 166, 42, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 0, 0, 0, 84, 86, 86, 86, 86, 86, 86, 86,\n 86, 86, 86, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 84, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,\n 12, 0, 12, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 7, 42, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 86, 86, 108, 129, 21, 0, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 7, 108, 3, 65, 43, 43, 86, 86, 86, 86, 86, 86,\n 86, 86, 86, 86, 86, 86, 86, 86, 44, 86, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 1,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 12, 108, 0, 0, 0, 0, 0, 6,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37,\n 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37,\n 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37,\n 6, 37, 6, 37, 6, 37, 6, 37, 86, 122, 158, 38, 6, 37, 6, 37,\n 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37,\n 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 1, 43, 43, 79, 86,\n 86, 44, 43, 127, 86, 86, 57, 43, 43, 85, 86, 86, 43, 43, 79, 86,\n 86, 44, 43, 127, 86, 86, 129, 55, 117, 91, 123, 92, 43, 43, 79, 86,\n 86, 2, 172, 4, 0, 0, 57, 43, 43, 85, 86, 86, 43, 43, 79, 86,\n 86, 44, 43, 43, 86, 86, 50, 19, 129, 87, 0, 111, 129, 126, 201, 215,\n 126, 45, 129, 129, 14, 126, 57, 127, 111, 87, 0, 129, 129, 126, 21, 0,\n 126, 3, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 7, 43,\n 36, 43, 151, 43, 43, 43, 43, 43, 43, 43, 43, 43, 42, 43, 43, 43,\n 43, 43, 86, 86, 86, 86, 86, 128, 129, 129, 129, 129, 57, 187, 42, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 1, 129, 129, 129, 129, 129, 129, 129, 129,\n 129, 129, 129, 129, 129, 129, 129, 201, 172, 172, 172, 172, 172, 172, 172, 172,\n 172, 172, 172, 172, 172, 172, 172, 208, 13, 0, 78, 49, 2, 180, 193, 193,\n 215, 215, 36, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80,\n 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80,\n 49, 80, 49, 80, 215, 215, 83, 193, 71, 212, 215, 215, 215, 5, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 7, 1, 0, 1, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 49, 80, 49, 80, 49, 80,\n 49, 80, 49, 80, 49, 80, 49, 80, 13, 0, 0, 0, 0, 0, 36, 80,\n 49, 80, 49, 80, 49, 80, 49, 80, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 121, 92, 123, 92, 123, 79, 123, 92, 123, 92, 123,\n 92, 123, 92, 123, 92, 123, 92, 123, 92, 123, 92, 123, 92, 123, 92, 45,\n 43, 43, 121, 20, 92, 123, 92, 45, 121, 42, 92, 39, 92, 123, 92, 123,\n 92, 123, 164, 0, 10, 180, 92, 123, 92, 123, 79, 3, 120, 56, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 79, 45, 43, 43, 1,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 43, 43, 43, 43, 43, 43, 43, 43, 7, 0, 72, 86, 86, 86, 86,\n 86, 86, 86, 86, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 85, 86, 86, 86, 86, 86, 86,\n 86, 86, 86, 86, 86, 86, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 36, 43, 43, 43, 43, 43, 43, 43, 43, 43,\n 43, 43, 7, 0, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 43, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 7, 0, 0,\n 0, 0, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,\n 86, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 43, 43,\n 43, 43, 43, 43, 43, 43, 43, 43, 86, 86, 86, 86, 86, 86, 86, 86,\n 86, 86, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 86, 86,\n 86, 86, 86, 86, 86, 86, 86, 86, 14, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 85,\n 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 14, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const RULES = memory.data([\n 0x0, 0x2001, -0x2000, 0x1dbf00, 0x2e700, 0x7900,\n 0x2402, 0x101, -0x100, 0x0, 0x201, -0x200,\n -0xc6ff, -0xe800, -0x78ff, -0x12c00, 0xc300, 0xd201,\n 0xce01, 0xcd01, 0x4f01, 0xca01, 0xcb01, 0xcf01,\n 0x6100, 0xd301, 0xd101, 0xa300, 0xd501, 0x8200,\n 0xd601, 0xda01, 0xd901, 0xdb01, 0x3800, 0x3,\n -0x4f00, -0x60ff, -0x37ff, 0x242802, 0x0, 0x101,\n -0x100, -0xcd00, -0xda00, -0x81ff, 0x2a2b01, -0xa2ff,\n 0x2a2801, 0x2a3f00, -0xc2ff, 0x4501, 0x4701, 0x2a1f00,\n 0x2a1c00, 0x2a1e00, -0xd200, -0xce00, -0xca00, -0xcb00,\n 0xa54f00, 0xa54b00, -0xcf00, 0xa52800, 0xa54400, -0xd100,\n -0xd300, 0x29f700, 0xa54100, 0x29fd00, -0xd500, -0xd600,\n 0x29e700, 0xa54300, 0xa52a00, -0x4500, -0xd900, -0x4700,\n -0xdb00, 0xa51500, 0xa51200, 0x4c2402, 0x0, 0x2001,\n -0x2000, 0x101, -0x100, 0x5400, 0x7401, 0x2601,\n 0x2501, 0x4001, 0x3f01, -0x2600, -0x2500, -0x1f00,\n -0x4000, -0x3f00, 0x801, -0x3e00, -0x3900, -0x2f00,\n -0x3600, -0x800, -0x5600, -0x5000, 0x700, -0x7400,\n -0x3bff, -0x6000, -0x6ff, 0x701a02, 0x101, -0x100,\n 0x2001, -0x2000, 0x5001, 0xf01, -0xf00, 0x0,\n 0x3001, -0x3000, 0x101, -0x100, 0x0, 0xbc000,\n 0x1c6001, 0x0, 0x97d001, 0x801, -0x800, 0x8a0502,\n 0x0, -0xbbfff, -0x186200, 0x89c200, -0x182500, -0x186e00,\n -0x186d00, -0x186400, -0x186300, -0x185c00, 0x0, 0x8a3800,\n 0x8a0400, 0xee600, 0x101, -0x100, 0x0, -0x3b00,\n -0x1dbeff, 0x8f1d02, 0x800, -0x7ff, 0x0, 0x5600,\n -0x55ff, 0x4a00, 0x6400, 0x8000, 0x7000, 0x7e00,\n 0x900, -0x49ff, -0x8ff, -0x1c2500, -0x63ff, -0x6fff,\n -0x7fff, -0x7dff, 0xac0502, 0x0, 0x1001, -0x1000,\n 0x1c01, 0x101, -0x1d5cff, -0x20beff, -0x2045ff, -0x1c00,\n 0xb10b02, 0x101, -0x100, 0x3001, -0x3000, 0x0,\n -0x29f6ff, -0xee5ff, -0x29e6ff, -0x2a2b00, -0x2a2800, -0x2a1bff,\n -0x29fcff, -0x2a1eff, -0x2a1dff, -0x2a3eff, 0x0, -0x1c6000,\n 0x0, 0x101, -0x100, 0xbc0c02, 0x0, 0x101,\n -0x100, -0xa543ff, 0x3a001, -0x8a03ff, -0xa527ff, 0x3000,\n -0xa54eff, -0xa54aff, -0xa540ff, -0xa511ff, -0xa529ff, -0xa514ff,\n -0x2fff, -0xa542ff, -0x8a37ff, 0x0, -0x97d000, -0x3a000,\n 0x0, 0x2001, -0x2000, 0x0, 0x2801, -0x2800,\n 0x0, 0x4001, -0x4000, 0x0, 0x2001, -0x2000,\n 0x0, 0x2001, -0x2000, 0x0, 0x2201, -0x2200\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const RULE_BASES = memory.data([\n 0, 6, 39, 81, 111, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 124, 0, 0, 127, 0, 0, 0, 0, 0, 0, 0, 0, 131, 142, 146, 151,\n 0, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 196, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 198, 201, 0, 0, 0, 219, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 222,\n 0, 0, 0, 0, 225, 0, 0, 0, 0, 0, 0, 0, 228, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 231, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 237, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const EXCEPTIONS = memory.data([\n 48, 12, 49, 13, 120, 14, 127, 15,\n 128, 16, 129, 17, 134, 18, 137, 19,\n 138, 19, 142, 20, 143, 21, 144, 22,\n 147, 19, 148, 23, 149, 24, 150, 25,\n 151, 26, 154, 27, 156, 25, 157, 28,\n 158, 29, 159, 30, 166, 31, 169, 31,\n 174, 31, 177, 32, 178, 32, 183, 33,\n 191, 34, 197, 35, 200, 35, 203, 35,\n 221, 36, 242, 35, 246, 37, 247, 38,\n 32, 45, 58, 46, 61, 47, 62, 48,\n 63, 49, 64, 49, 67, 50, 68, 51,\n 69, 52, 80, 53, 81, 54, 82, 55,\n 83, 56, 84, 57, 89, 58, 91, 59,\n 92, 60, 97, 61, 99, 62, 101, 63,\n 102, 64, 104, 65, 105, 66, 106, 64,\n 107, 67, 108, 68, 111, 66, 113, 69,\n 114, 70, 117, 71, 125, 72, 130, 73,\n 135, 74, 137, 75, 138, 76, 139, 76,\n 140, 77, 146, 78, 157, 79, 158, 80,\n 69, 87, 123, 29, 124, 29, 125, 29,\n 127, 88, 134, 89, 136, 90, 137, 90,\n 138, 90, 140, 91, 142, 92, 143, 92,\n 172, 93, 173, 94, 174, 94, 175, 94,\n 194, 95, 204, 96, 205, 97, 206, 97,\n 207, 98, 208, 99, 209, 100, 213, 101,\n 214, 102, 215, 103, 240, 104, 241, 105,\n 242, 106, 243, 107, 244, 108, 245, 109,\n 249, 110, 253, 45, 254, 45, 255, 45,\n 80, 105, 81, 105, 82, 105, 83, 105,\n 84, 105, 85, 105, 86, 105, 87, 105,\n 88, 105, 89, 105, 90, 105, 91, 105,\n 92, 105, 93, 105, 94, 105, 95, 105,\n 130, 0, 131, 0, 132, 0, 133, 0,\n 134, 0, 135, 0, 136, 0, 137, 0,\n 192, 117, 207, 118, 128, 137, 129, 138,\n 130, 139, 133, 140, 134, 141, 112, 157,\n 113, 157, 118, 158, 119, 158, 120, 159,\n 121, 159, 122, 160, 123, 160, 124, 161,\n 125, 161, 179, 162, 186, 163, 187, 163,\n 188, 164, 190, 165, 195, 162, 204, 164,\n 218, 166, 219, 166, 229, 106, 234, 167,\n 235, 167, 236, 110, 243, 162, 248, 168,\n 249, 168, 250, 169, 251, 169, 252, 164,\n 38, 176, 42, 177, 43, 178, 78, 179,\n 132, 8, 98, 186, 99, 187, 100, 188,\n 101, 189, 102, 190, 109, 191, 110, 192,\n 111, 193, 112, 194, 126, 195, 127, 195,\n 125, 207, 141, 208, 148, 209, 171, 210,\n 172, 211, 173, 212, 176, 213, 177, 214,\n 178, 215, 196, 216, 197, 217, 198, 218\n]);\n\n/* Special Case Mappings\n * See: https://unicode.org/Public/UNIDATA/SpecialCasing.txt\n */\n\n/*\n@lazy @inline\nconst SPECIALS_LOWER: StaticArray = [\n 0x0130, 0x0069, 0x0307, 0x0000,\n];\n*/\n\n// @ts-ignore: decorator\n@lazy @inlne\nexport const SPECIALS_UPPER: StaticArray = [\n // String#toUpperCase needs .length\n 0x00DF, 0x0053, 0x0053, 0x0000,\n 0x0149, 0x02BC, 0x004E, 0x0000,\n 0x01F0, 0x004A, 0x030C, 0x0000,\n 0x0390, 0x0399, 0x0308, 0x0301,\n 0x03B0, 0x03A5, 0x0308, 0x0301,\n 0x0587, 0x0535, 0x0552, 0x0000,\n 0x1E96, 0x0048, 0x0331, 0x0000,\n 0x1E97, 0x0054, 0x0308, 0x0000,\n 0x1E98, 0x0057, 0x030A, 0x0000,\n 0x1E99, 0x0059, 0x030A, 0x0000,\n 0x1E9A, 0x0041, 0x02BE, 0x0000,\n 0x1F50, 0x03A5, 0x0313, 0x0000,\n 0x1F52, 0x03A5, 0x0313, 0x0300,\n 0x1F54, 0x03A5, 0x0313, 0x0301,\n 0x1F56, 0x03A5, 0x0313, 0x0342,\n 0x1F80, 0x1F08, 0x0399, 0x0000,\n 0x1F81, 0x1F09, 0x0399, 0x0000,\n 0x1F82, 0x1F0A, 0x0399, 0x0000,\n 0x1F83, 0x1F0B, 0x0399, 0x0000,\n 0x1F84, 0x1F0C, 0x0399, 0x0000,\n 0x1F85, 0x1F0D, 0x0399, 0x0000,\n 0x1F86, 0x1F0E, 0x0399, 0x0000,\n 0x1F87, 0x1F0F, 0x0399, 0x0000,\n 0x1F88, 0x1F08, 0x0399, 0x0000,\n 0x1F89, 0x1F09, 0x0399, 0x0000,\n 0x1F8A, 0x1F0A, 0x0399, 0x0000,\n 0x1F8B, 0x1F0B, 0x0399, 0x0000,\n 0x1F8C, 0x1F0C, 0x0399, 0x0000,\n 0x1F8D, 0x1F0D, 0x0399, 0x0000,\n 0x1F8E, 0x1F0E, 0x0399, 0x0000,\n 0x1F8F, 0x1F0F, 0x0399, 0x0000,\n 0x1F90, 0x1F28, 0x0399, 0x0000,\n 0x1F91, 0x1F29, 0x0399, 0x0000,\n 0x1F92, 0x1F2A, 0x0399, 0x0000,\n 0x1F93, 0x1F2B, 0x0399, 0x0000,\n 0x1F94, 0x1F2C, 0x0399, 0x0000,\n 0x1F95, 0x1F2D, 0x0399, 0x0000,\n 0x1F96, 0x1F2E, 0x0399, 0x0000,\n 0x1F97, 0x1F2F, 0x0399, 0x0000,\n 0x1F98, 0x1F28, 0x0399, 0x0000,\n 0x1F99, 0x1F29, 0x0399, 0x0000,\n 0x1F9A, 0x1F2A, 0x0399, 0x0000,\n 0x1F9B, 0x1F2B, 0x0399, 0x0000,\n 0x1F9C, 0x1F2C, 0x0399, 0x0000,\n 0x1F9D, 0x1F2D, 0x0399, 0x0000,\n 0x1F9E, 0x1F2E, 0x0399, 0x0000,\n 0x1F9F, 0x1F2F, 0x0399, 0x0000,\n 0x1FA0, 0x1F68, 0x0399, 0x0000,\n 0x1FA1, 0x1F69, 0x0399, 0x0000,\n 0x1FA2, 0x1F6A, 0x0399, 0x0000,\n 0x1FA3, 0x1F6B, 0x0399, 0x0000,\n 0x1FA4, 0x1F6C, 0x0399, 0x0000,\n 0x1FA5, 0x1F6D, 0x0399, 0x0000,\n 0x1FA6, 0x1F6E, 0x0399, 0x0000,\n 0x1FA7, 0x1F6F, 0x0399, 0x0000,\n 0x1FA8, 0x1F68, 0x0399, 0x0000,\n 0x1FA9, 0x1F69, 0x0399, 0x0000,\n 0x1FAA, 0x1F6A, 0x0399, 0x0000,\n 0x1FAB, 0x1F6B, 0x0399, 0x0000,\n 0x1FAC, 0x1F6C, 0x0399, 0x0000,\n 0x1FAD, 0x1F6D, 0x0399, 0x0000,\n 0x1FAE, 0x1F6E, 0x0399, 0x0000,\n 0x1FAF, 0x1F6F, 0x0399, 0x0000,\n 0x1FB2, 0x1FBA, 0x0399, 0x0000,\n 0x1FB3, 0x0391, 0x0399, 0x0000,\n 0x1FB4, 0x0386, 0x0399, 0x0000,\n 0x1FB6, 0x0391, 0x0342, 0x0000,\n 0x1FB7, 0x0391, 0x0342, 0x0399,\n 0x1FBC, 0x0391, 0x0399, 0x0000,\n 0x1FC2, 0x1FCA, 0x0399, 0x0000,\n 0x1FC3, 0x0397, 0x0399, 0x0000,\n 0x1FC4, 0x0389, 0x0399, 0x0000,\n 0x1FC6, 0x0397, 0x0342, 0x0000,\n 0x1FC7, 0x0397, 0x0342, 0x0399,\n 0x1FCC, 0x0397, 0x0399, 0x0000,\n 0x1FD2, 0x0399, 0x0308, 0x0300,\n 0x1FD3, 0x0399, 0x0308, 0x0301,\n 0x1FD6, 0x0399, 0x0342, 0x0000,\n 0x1FD7, 0x0399, 0x0308, 0x0342,\n 0x1FE2, 0x03A5, 0x0308, 0x0300,\n 0x1FE3, 0x03A5, 0x0308, 0x0301,\n 0x1FE4, 0x03A1, 0x0313, 0x0000,\n 0x1FE6, 0x03A5, 0x0342, 0x0000,\n 0x1FE7, 0x03A5, 0x0308, 0x0342,\n 0x1FF2, 0x1FFA, 0x0399, 0x0000,\n 0x1FF3, 0x03A9, 0x0399, 0x0000,\n 0x1FF4, 0x038F, 0x0399, 0x0000,\n 0x1FF6, 0x03A9, 0x0342, 0x0000,\n 0x1FF7, 0x03A9, 0x0342, 0x0399,\n 0x1FFC, 0x03A9, 0x0399, 0x0000,\n 0xFB00, 0x0046, 0x0046, 0x0000,\n 0xFB01, 0x0046, 0x0049, 0x0000,\n 0xFB02, 0x0046, 0x004C, 0x0000,\n 0xFB03, 0x0046, 0x0046, 0x0049,\n 0xFB04, 0x0046, 0x0046, 0x004C,\n 0xFB05, 0x0053, 0x0054, 0x0000,\n 0xFB06, 0x0053, 0x0054, 0x0000,\n 0xFB13, 0x0544, 0x0546, 0x0000,\n 0xFB14, 0x0544, 0x0535, 0x0000,\n 0xFB15, 0x0544, 0x053B, 0x0000,\n 0xFB16, 0x054E, 0x0546, 0x0000,\n 0xFB17, 0x0544, 0x053D, 0x0000\n];\n\n// @ts-ignore: decorator\n@lazy @inline const MT = memory.data([\n 2048, 342, 57\n]);\n\n// Special binary search routine for Special Casing Tables\n// @ts-ignore: decorator\n@inline\nexport function bsearch(key: u32, ptr: usize, max: i32): i32 {\n var min = 0;\n while (min <= max) {\n let mid = (min + max) >>> 3 << 2;\n let cmp = load(ptr + (mid << alignof())) - key;\n if (cmp == 0) return mid; // found\n else if (cmp >>> 31) min = mid + 4; // < 0\n else max = mid - 4; // > 0\n }\n return -1; // not found\n}\n\n// See: https://git.musl-libc.org/cgit/musl/tree/src/ctype/towctrans.c\nexport function casemap(c: u32, dir: i32): i32 {\n // if (c >= 0x20000) return c;\n var c0 = c as i32;\n var b = c >> 8;\n c &= 255;\n\n var x = c / 3;\n var y = c % 3;\n\n /* lookup entry in two-level base-6 table */\n // v = tab[(tab[b] as i32) * 86 + x] as u32;\n var v = load(TAB + load(TAB + b) * 86 + x);\n // v = (v * mt[y] >> 11) % 6;\n v = (v * load(MT + (y << alignof())) >> 11) % 6;\n /* use the bit vector out of the tables as an index into\n * a block-specific set of rules and decode the rule into\n * a type and a case-mapping delta. */\n // r = rules[(ruleBases[b] as u32) + v];\n var r = load(RULES + ((load(RULE_BASES + b) + v) << alignof()));\n var rt: u32 = r & 255;\n var rd: i32 = r >> 8;\n /* rules 0/1 are simple lower/upper case with a delta.\n * apply according to desired mapping direction. */\n if (rt < 2) return c0 + (rd & -(rt ^ dir));\n /* binary search. endpoints of the binary search for\n * this block are stored in the rule delta field. */\n var xn: u32 = rd & 0xff;\n var xb: u32 = rd >>> 8;\n while (xn) {\n let h = xn >> 1;\n // let t = exceptions[(xb + h) * 2 + 0] as u32;\n let t = load(EXCEPTIONS + (xb + h) * 2, 0);\n if (t == c) {\n // r = rules[exceptions[(xb + h) * 2 + 1]];\n r = load(RULES + (load(EXCEPTIONS + (xb + h) * 2, 1) << alignof()));\n rt = r & 255;\n rd = r >> 8;\n if (rt < 2) return c0 + (rd & -(rt ^ dir));\n /* Hard-coded for the four exceptional titlecase */\n return c0 + 1 - (dir << 1); // (dir ? -1 : 1);\n } else if (t > c) {\n xn = h;\n } else {\n xb += h;\n xn -= h;\n }\n }\n return c0;\n}\n", - "util/error": "// Common error messages for use across the standard library. Keeping error messages compact\n// and reusing them where possible ensures minimal static data in binaries.\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_INDEXOUTOFRANGE: string = \"Index out of range\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_VALUEOUTOFRANGE: string = \"Value out of range\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_INVALIDLENGTH: string = \"Invalid length\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_ILLEGALGENTYPE: string = \"Illegal generic type\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_EMPTYARRAY: string = \"Array is empty\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_HOLEYARRAY: string = \"Element type must be nullable if array is holey\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_NOTIMPLEMENTED: string = \"Not implemented\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_KEYNOTFOUND: string = \"Key does not exist\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_ALLOCATION_TOO_LARGE: string = \"Allocation too large\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_ALREADY_PINNED: string = \"Object already pinned\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_NOT_PINNED: string = \"Object is not pinned\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_URI_MALFORMED: string = \"URI malformed\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_INVALIDDATE: string = \"Invalid Date\";\n\n// @ts-ignore: decorator\n@lazy @inline\nexport const E_UNPAIRED_SURROGATE: string = \"Unpaired surrogate\";\n", - "util/hash": "export function HASH(key: T): u32 {\n if (isString()) {\n return hashStr(changetype(key));\n } else if (isReference()) {\n if (sizeof() == 4) return hash32(changetype(key));\n if (sizeof() == 8) return hash64(changetype(key));\n } else if (isFloat()) {\n if (sizeof() == 4) return hash32(reinterpret(f32(key)));\n if (sizeof() == 8) return hash64(reinterpret(f64(key)));\n } else {\n if (sizeof() <= 4) return hash32(u32(key), sizeof());\n if (sizeof() == 8) return hash64(u64(key));\n }\n return unreachable();\n}\n\n// XXHash 32-bit as a starting point, see: https://cyan4973.github.io/xxHash\n\n// primes\n// @ts-ignore: decorator\n@inline const XXH32_P1: u32 = 2654435761;\n// @ts-ignore: decorator\n@inline const XXH32_P2: u32 = 2246822519;\n// @ts-ignore: decorator\n@inline const XXH32_P3: u32 = 3266489917;\n// @ts-ignore: decorator\n@inline const XXH32_P4: u32 = 668265263;\n// @ts-ignore: decorator\n@inline const XXH32_P5: u32 = 374761393;\n// @ts-ignore: decorator\n@inline const XXH32_SEED: u32 = 0;\n\n// @ts-ignore: decorator\n@inline\nfunction hash32(key: u32, len: u32 = 4): u32 {\n var h: u32 = XXH32_SEED + XXH32_P5 + len;\n h += key * XXH32_P3;\n h = rotl(h, 17) * XXH32_P4;\n h ^= h >> 15;\n h *= XXH32_P2;\n h ^= h >> 13;\n h *= XXH32_P3;\n h ^= h >> 16;\n return h;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction hash64(key: u64): u32 {\n var h: u32 = XXH32_SEED + XXH32_P5 + 8;\n h += key * XXH32_P3;\n h = rotl(h, 17) * XXH32_P4;\n h += (key >> 32) * XXH32_P3;\n h = rotl(h, 17) * XXH32_P4;\n h ^= h >> 15;\n h *= XXH32_P2;\n h ^= h >> 13;\n h *= XXH32_P3;\n h ^= h >> 16;\n return h;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction mix(h: u32, key: u32): u32 {\n return rotl(h + key * XXH32_P2, 13) * XXH32_P1;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction hashStr(key: string): u32 {\n if (key === null) return XXH32_SEED;\n\n var h: u32 = key.length << 1;\n var len: usize = h;\n var pos = changetype(key);\n\n if (len >= 16) {\n let s1 = XXH32_SEED + XXH32_P1 + XXH32_P2;\n let s2 = XXH32_SEED + XXH32_P2;\n let s3 = XXH32_SEED;\n let s4 = XXH32_SEED - XXH32_P1;\n\n let end = len + pos - 16;\n while (pos <= end) {\n s1 = mix(s1, load(pos ));\n s2 = mix(s2, load(pos, 4));\n s3 = mix(s3, load(pos, 8));\n s4 = mix(s4, load(pos, 12));\n pos += 16;\n }\n h += rotl(s1, 1) + rotl(s2, 7) + rotl(s3, 12) + rotl(s4, 18);\n } else {\n h += XXH32_SEED + XXH32_P5;\n }\n\n var end = changetype(key) + len - 4;\n while (pos <= end) {\n h += load(pos) * XXH32_P3;\n h = rotl(h, 17) * XXH32_P4;\n pos += 4;\n }\n\n end = changetype(key) + len;\n while (pos < end) {\n h += load(pos) * XXH32_P5;\n h = rotl(h, 11) * XXH32_P1;\n pos++;\n }\n\n h ^= h >> 15;\n h *= XXH32_P2;\n h ^= h >> 13;\n h *= XXH32_P3;\n h ^= h >> 16;\n return h;\n}\n", - "util/math": "//\n// Lookup data for exp2f\n//\n\n// @ts-ignore: decorator\n@inline const EXP2F_TABLE_BITS = 5;\n\n// @ts-ignore: decorator\n@lazy @inline const EXP2F_DATA_TAB = memory.data([\n // exp2f_data_tab[i] = uint(2^(i/N)) - (i << 52-BITS)\n // used for computing 2^(k/N) for an int |k| < 150 N as\n // double(tab[k%N] + (k << 52-BITS))\n 0x3FF0000000000000, 0x3FEFD9B0D3158574, 0x3FEFB5586CF9890F, 0x3FEF9301D0125B51,\n 0x3FEF72B83C7D517B, 0x3FEF54873168B9AA, 0x3FEF387A6E756238, 0x3FEF1E9DF51FDEE1,\n 0x3FEF06FE0A31B715, 0x3FEEF1A7373AA9CB, 0x3FEEDEA64C123422, 0x3FEECE086061892D,\n 0x3FEEBFDAD5362A27, 0x3FEEB42B569D4F82, 0x3FEEAB07DD485429, 0x3FEEA47EB03A5585,\n 0x3FEEA09E667F3BCD, 0x3FEE9F75E8EC5F74, 0x3FEEA11473EB0187, 0x3FEEA589994CCE13,\n 0x3FEEACE5422AA0DB, 0x3FEEB737B0CDC5E5, 0x3FEEC49182A3F090, 0x3FEED503B23E255D,\n 0x3FEEE89F995AD3AD, 0x3FEEFF76F2FB5E47, 0x3FEF199BDD85529C, 0x3FEF3720DCEF9069,\n 0x3FEF5818DCFBA487, 0x3FEF7C97337B9B5F, 0x3FEFA4AFA2A490DA, 0x3FEFD0765B6E4540\n]);\n\n// ULP error: 0.502 (nearest rounding.)\n// Relative error: 1.69 * 2^-34 in [-1/64, 1/64] (before rounding.)\n// Wrong count: 168353 (all nearest rounding wrong results with fma.)\n// @ts-ignore: decorator\n@inline\nexport function exp2f_lut(x: f32): f32 {\n const\n N = 1 << EXP2F_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000) / N, // 0x1.8p+52\n Ox127f = reinterpret(0x7F000000);\n\n const\n C0 = reinterpret(0x3FAC6AF84B912394), // 0x1.c6af84b912394p-5\n C1 = reinterpret(0x3FCEBFCE50FAC4F3), // 0x1.ebfce50fac4f3p-3\n C2 = reinterpret(0x3FE62E42FF0C52D6); // 0x1.62e42ff0c52d6p-1\n\n var xd = x;\n var ix = reinterpret(x);\n var ux = ix >> 20 & 0x7FF;\n if (ux >= 0x430) {\n // |x| >= 128 or x is nan.\n if (ix == 0xFF800000) return 0; // x == -Inf -> 0\n if (ux >= 0x7F8) return x + x; // x == Inf/NaN -> Inf/NaN\n if (x > 0) return x * Ox127f; // x > 0 -> HugeVal (Owerflow)\n if (x <= -150) return 0; // x <= -150 -> 0 (Underflow)\n }\n\n // x = k/N + r with r in [-1/(2N), 1/(2N)] and int k.\n var kd = xd + shift;\n var ki = reinterpret(kd);\n var r = xd - (kd - shift);\n var t: u64, y: f64, s: f64;\n\n // exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1)\n t = load(EXP2F_DATA_TAB + ((ki & N_MASK) << alignof()));\n t += ki << (52 - EXP2F_TABLE_BITS);\n s = reinterpret(t);\n y = C2 * r + 1;\n y += (C0 * r + C1) * (r * r);\n y *= s;\n\n return y;\n}\n\n// ULP error: 0.502 (nearest rounding.)\n// Relative error: 1.69 * 2^-34 in [-ln2/64, ln2/64] (before rounding.)\n// Wrong count: 170635 (all nearest rounding wrong results with fma.)\n// @ts-ignore: decorator\n@inline\nexport function expf_lut(x: f32): f32 {\n const\n N = 1 << EXP2F_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000), // 0x1.8p+52\n InvLn2N = reinterpret(0x3FF71547652B82FE) * N, // 0x1.71547652b82fep+0\n Ox1p127f = reinterpret(0x7F000000);\n\n const\n C0 = reinterpret(0x3FAC6AF84B912394) / N / N / N, // 0x1.c6af84b912394p-5\n C1 = reinterpret(0x3FCEBFCE50FAC4F3) / N / N, // 0x1.ebfce50fac4f3p-3\n C2 = reinterpret(0x3FE62E42FF0C52D6) / N; // 0x1.62e42ff0c52d6p-1\n\n var xd = x;\n var ix = reinterpret(x);\n var ux = ix >> 20 & 0x7FF;\n if (ux >= 0x42B) {\n // |x| >= 88 or x is nan.\n if (ix == 0xFF800000) return 0; // x == -Inf -> 0\n if (ux >= 0x7F8) return x + x; // x == Inf/NaN -> Inf/NaN\n if (x > reinterpret(0x42B17217)) return x * Ox1p127f; // x > log(0x1p128) ~= 88.72 -> HugeVal (Owerflow)\n if (x < reinterpret(0xC2CFF1B4)) return 0; // x < log(0x1p-150) ~= -103.97 -> 0 (Underflow)\n }\n\n // x*N/Ln2 = k + r with r in [-1/2, 1/2] and int k.\n var z = InvLn2N * xd;\n\n // Round and convert z to int, the result is in [-150*N, 128*N] and\n // ideally ties-to-even rule is used, otherwise the magnitude of r\n // can be bigger which gives larger approximation error.\n var kd = (z + shift);\n var ki = reinterpret(kd);\n var r = z - (kd - shift);\n var s: f64, y: f64, t: u64;\n\n // exp(x) = 2^(k/N) * 2^(r/N) ~= s * (C0*r^3 + C1*r^2 + C2*r + 1)\n t = load(EXP2F_DATA_TAB + ((ki & N_MASK) << alignof()));\n t += ki << (52 - EXP2F_TABLE_BITS);\n s = reinterpret(t);\n z = C0 * r + C1;\n y = C2 * r + 1;\n y += z * (r * r);\n y *= s;\n\n return y;\n}\n\n//\n// Lookup data for log2f\n//\n\n// @ts-ignore: decorator\n@inline const LOG2F_TABLE_BITS = 4;\n\n// @ts-ignore: decorator\n@lazy @inline const LOG2F_DATA_TAB = memory.data([\n reinterpret(0x3FF661EC79F8F3BE), reinterpret(0xBFDEFEC65B963019), // 0x1.661ec79f8f3bep+0, -0x1.efec65b963019p-2,\n reinterpret(0x3FF571ED4AAF883D), reinterpret(0xBFDB0B6832D4FCA4), // 0x1.571ed4aaf883dp+0, -0x1.b0b6832d4fca4p-2,\n reinterpret(0x3FF49539F0F010B0), reinterpret(0xBFD7418B0A1FB77B), // 0x1.49539f0f010bp+0 , -0x1.7418b0a1fb77bp-2,\n reinterpret(0x3FF3C995B0B80385), reinterpret(0xBFD39DE91A6DCF7B), // 0x1.3c995b0b80385p+0, -0x1.39de91a6dcf7bp-2,\n reinterpret(0x3FF30D190C8864A5), reinterpret(0xBFD01D9BF3F2B631), // 0x1.30d190c8864a5p+0, -0x1.01d9bf3f2b631p-2,\n reinterpret(0x3FF25E227B0B8EA0), reinterpret(0xBFC97C1D1B3B7AF0), // 0x1.25e227b0b8eap+0 , -0x1.97c1d1b3b7afp-3 ,\n reinterpret(0x3FF1BB4A4A1A343F), reinterpret(0xBFC2F9E393AF3C9F), // 0x1.1bb4a4a1a343fp+0, -0x1.2f9e393af3c9fp-3,\n reinterpret(0x3FF12358F08AE5BA), reinterpret(0xBFB960CBBF788D5C), // 0x1.12358f08ae5bap+0, -0x1.960cbbf788d5cp-4,\n reinterpret(0x3FF0953F419900A7), reinterpret(0xBFAA6F9DB6475FCE), // 0x1.0953f419900a7p+0, -0x1.a6f9db6475fcep-5,\n reinterpret(0x3FF0000000000000), 0, // 0x1p+0, 0x0,\n reinterpret(0x3FEE608CFD9A47AC), reinterpret(0x3FB338CA9F24F53D), // 0x1.e608cfd9a47acp-1, 0x1.338ca9f24f53dp-4,\n reinterpret(0x3FECA4B31F026AA0), reinterpret(0x3FC476A9543891BA), // 0x1.ca4b31f026aap-1 , 0x1.476a9543891bap-3,\n reinterpret(0x3FEB2036576AFCE6), reinterpret(0x3FCE840B4AC4E4D2), // 0x1.b2036576afce6p-1, 0x1.e840b4ac4e4d2p-3,\n reinterpret(0x3FE9C2D163A1AA2D), reinterpret(0x3FD40645F0C6651C), // 0x1.9c2d163a1aa2dp-1, 0x1.40645f0c6651cp-2,\n reinterpret(0x3FE886E6037841ED), reinterpret(0x3FD88E9C2C1B9FF8), // 0x1.886e6037841edp-1, 0x1.88e9c2c1b9ff8p-2,\n reinterpret(0x3FE767DCF5534862), reinterpret(0x3FDCE0A44EB17BCC) // 0x1.767dcf5534862p-1, 0x1.ce0a44eb17bccp-2\n]);\n\n// ULP error: 0.752 (nearest rounding.)\n// Relative error: 1.9 * 2^-26 (before rounding.)\n// @ts-ignore: decorator\n@inline\nexport function log2f_lut(x: f32): f32 {\n const\n N_MASK = (1 << LOG2F_TABLE_BITS) - 1,\n Ox1p23f = reinterpret(0x4B000000); // 0x1p23f\n\n const\n A0 = reinterpret(0xBFD712B6F70A7E4D), // -0x1.712b6f70a7e4dp-2\n A1 = reinterpret(0x3FDECABF496832E0), // 0x1.ecabf496832ep-2\n A2 = reinterpret(0xBFE715479FFAE3DE), // -0x1.715479ffae3dep-1\n A3 = reinterpret(0x3FF715475F35C8B8); // 0x1.715475f35c8b8p0\n\n var ux = reinterpret(x);\n // Fix sign of zero with downward rounding when x==1.\n // if (WANT_ROUNDING && predict_false(ix == 0x3f800000)) return 0;\n if (ux - 0x00800000 >= 0x7F800000 - 0x00800000) {\n // x < 0x1p-126 or inf or nan.\n if (ux * 2 == 0) return -Infinity;\n if (ux == 0x7F800000) return x; // log2(inf) == inf.\n if ((ux >> 31) || ux * 2 >= 0xFF000000) return (x - x) / (x - x);\n // x is subnormal, normalize it.\n ux = reinterpret(x * Ox1p23f);\n ux -= 23 << 23;\n }\n // x = 2^k z; where z is in range [OFF,2*OFF] and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n var tmp = ux - 0x3F330000;\n var i = (tmp >> (23 - LOG2F_TABLE_BITS)) & N_MASK;\n var top = tmp & 0xFF800000;\n var iz = ux - top;\n var k = tmp >> 23;\n\n var invc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 0 << alignof());\n var logc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 1 << alignof());\n var z = reinterpret(iz);\n\n // log2(x) = log1p(z/c-1)/ln2 + log2(c) + k\n var r = z * invc - 1;\n var y0 = logc + k;\n\n // Pipelined polynomial evaluation to approximate log1p(r)/ln2.\n var y = A1 * r + A2;\n var p = A3 * r + y0;\n var r2 = r * r;\n y += A0 * r2;\n y = y * r2 + p;\n\n return y;\n}\n\n//\n// Lookup data for logf. See: https://git.musl-libc.org/cgit/musl/tree/src/math/logf.c\n//\n\n// @ts-ignore: decorator\n@inline const LOGF_TABLE_BITS = 4;\n\n// @ts-ignore: decorator\n@lazy @inline const LOGF_DATA_TAB = memory.data([\n reinterpret(0x3FF661EC79F8F3BE), reinterpret(0xBFD57BF7808CAADE), // 0x1.661ec79f8f3bep+0, -0x1.57bf7808caadep-2,\n reinterpret(0x3FF571ED4AAF883D), reinterpret(0xBFD2BEF0A7C06DDB), // 0x1.571ed4aaf883dp+0, -0x1.2bef0a7c06ddbp-2,\n reinterpret(0x3FF49539F0F010B0), reinterpret(0xBFD01EAE7F513A67), // 0x1.49539f0f010bp+0 , -0x1.01eae7f513a67p-2,\n reinterpret(0x3FF3C995B0B80385), reinterpret(0xBFCB31D8A68224E9), // 0x1.3c995b0b80385p+0, -0x1.b31d8a68224e9p-3,\n reinterpret(0x3FF30D190C8864A5), reinterpret(0xBFC6574F0AC07758), // 0x1.30d190c8864a5p+0, -0x1.6574f0ac07758p-3,\n reinterpret(0x3FF25E227B0B8EA0), reinterpret(0xBFC1AA2BC79C8100), // 0x1.25e227b0b8eap+0 , -0x1.1aa2bc79c81p-3 ,\n reinterpret(0x3FF1BB4A4A1A343F), reinterpret(0xBFBA4E76CE8C0E5E), // 0x1.1bb4a4a1a343fp+0, -0x1.a4e76ce8c0e5ep-4,\n reinterpret(0x3FF12358F08AE5BA), reinterpret(0xBFB1973C5A611CCC), // 0x1.12358f08ae5bap+0, -0x1.1973c5a611cccp-4,\n reinterpret(0x3FF0953F419900A7), reinterpret(0xBFA252F438E10C1E), // 0x1.0953f419900a7p+0, -0x1.252f438e10c1ep-5,\n reinterpret(0x3FF0000000000000), 0, // 0x1p+0, 0,\n reinterpret(0x3FEE608CFD9A47AC), reinterpret(0x3FAAA5AA5DF25984), // 0x1.e608cfd9a47acp-1, 0x1.aa5aa5df25984p-5,\n reinterpret(0x3FECA4B31F026AA0), reinterpret(0x3FBC5E53AA362EB4), // 0x1.ca4b31f026aap-1 , 0x1.c5e53aa362eb4p-4,\n reinterpret(0x3FEB2036576AFCE6), reinterpret(0x3FC526E57720DB08), // 0x1.b2036576afce6p-1, 0x1.526e57720db08p-3,\n reinterpret(0x3FE9C2D163A1AA2D), reinterpret(0x3FCBC2860D224770), // 0x1.9c2d163a1aa2dp-1, 0x1.bc2860d22477p-3 ,\n reinterpret(0x3FE886E6037841ED), reinterpret(0x3FD1058BC8A07EE1), // 0x1.886e6037841edp-1, 0x1.1058bc8a07ee1p-2,\n reinterpret(0x3FE767DCF5534862), reinterpret(0x3FD4043057B6EE09) // 0x1.767dcf5534862p-1, 0x1.4043057b6ee09p-2\n]);\n\n// ULP error: 0.818 (nearest rounding.)\n// Relative error: 1.957 * 2^-26 (before rounding.)\n// @ts-ignore: decorator\n@inline\nexport function logf_lut(x: f32): f32 {\n const\n N_MASK = (1 << LOGF_TABLE_BITS) - 1,\n Ox1p23f = reinterpret(0x4B000000); // 0x1p23f\n\n const\n Ln2 = reinterpret(0x3FE62E42FEFA39EF), // 0x1.62e42fefa39efp-1;\n A0 = reinterpret(0xBFD00EA348B88334), // -0x1.00ea348b88334p-2\n A1 = reinterpret(0x3FD5575B0BE00B6A), // 0x1.5575b0be00b6ap-2\n A2 = reinterpret(0xBFDFFFFEF20A4123); // -0x1.ffffef20a4123p-2\n\n var ux = reinterpret(x);\n // Fix sign of zero with downward rounding when x==1.\n // if (WANT_ROUNDING && ux == 0x3f800000) return 0;\n if (ux - 0x00800000 >= 0x7F800000 - 0x00800000) {\n // x < 0x1p-126 or inf or nan.\n if ((ux << 1) == 0) return -Infinity;\n if (ux == 0x7F800000) return x; // log(inf) == inf.\n if ((ux >> 31) || (ux << 1) >= 0xFF000000) return (x - x) / (x - x);\n // x is subnormal, normalize it.\n ux = reinterpret(x * Ox1p23f);\n ux -= 23 << 23;\n }\n // x = 2^k z; where z is in range [OFF,2*OFF] and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n var tmp = ux - 0x3F330000;\n var i = (tmp >> (23 - LOGF_TABLE_BITS)) & N_MASK;\n var k = tmp >> 23;\n var iz = ux - (tmp & 0x1FF << 23);\n\n var invc = load(LOGF_DATA_TAB + (i << (1 + alignof())), 0 << alignof());\n var logc = load(LOGF_DATA_TAB + (i << (1 + alignof())), 1 << alignof());\n\n var z = reinterpret(iz);\n\n // log(x) = log1p(z/c-1) + log(c) + k*Ln2\n var r = z * invc - 1;\n var y0 = logc + k * Ln2;\n\n // Pipelined polynomial evaluation to approximate log1p(r).\n var r2 = r * r;\n var y = A1 * r + A2;\n y += A0 * r2;\n y = y * r2 + (y0 + r);\n\n return y;\n}\n\n//\n// Lookup data for powf. See: https://git.musl-libc.org/cgit/musl/tree/src/math/powf.c\n//\n\n// @ts-ignore: decorator\n@inline\nfunction zeroinfnanf(ux: u32): bool {\n return (ux << 1) - 1 >= (0x7f800000 << 1) - 1;\n}\n\n// Returns 0 if not int, 1 if odd int, 2 if even int. The argument is\n// the bit representation of a non-zero finite floating-point value.\n// @ts-ignore: decorator\n@inline\nfunction checkintf(iy: u32): i32 {\n var e = iy >> 23 & 0xFF;\n if (e < 0x7F ) return 0;\n if (e > 0x7F + 23) return 2;\n e = 1 << (0x7F + 23 - e);\n if (iy & (e - 1)) return 0;\n if (iy & e ) return 1;\n return 2;\n}\n\n// Subnormal input is normalized so ix has negative biased exponent.\n// Output is multiplied by N (POWF_SCALE) if TOINT_INTRINICS is set.\n// @ts-ignore: decorator\n@inline\nfunction log2f_inline(ux: u32): f64 {\n const N_MASK = (1 << LOG2F_TABLE_BITS) - 1;\n\n const\n A0 = reinterpret(0x3FD27616C9496E0B), // 0x1.27616c9496e0bp-2\n A1 = reinterpret(0xBFD71969A075C67A), // -0x1.71969a075c67ap-2\n A2 = reinterpret(0x3FDEC70A6CA7BADD), // 0x1.ec70a6ca7baddp-2\n A3 = reinterpret(0xBFE7154748BEF6C8), // -0x1.7154748bef6c8p-1\n A4 = reinterpret(0x3FF71547652AB82B); // 0x1.71547652ab82bp+0\n\n // x = 2^k z; where z is in range [OFF,2*OFF] and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n var tmp = ux - 0x3F330000;\n var i = ((tmp >> (23 - LOG2F_TABLE_BITS)) & N_MASK);\n var top = tmp & 0xFF800000;\n var uz = ux - top;\n var k = (top >> 23);\n\n var invc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 0 << alignof());\n var logc = load(LOG2F_DATA_TAB + (i << (1 + alignof())), 1 << alignof());\n var z = reinterpret(uz);\n\n // log2(x) = log1p(z/c-1)/ln2 + log2(c) + k\n var r = z * invc - 1;\n var y0 = logc + k;\n\n // Pipelined polynomial evaluation to approximate log1p(r)/ln2.\n var y = A0 * r + A1;\n var p = A2 * r + A3;\n var q = A4 * r + y0;\n\n r *= r;\n q += p * r;\n y = y * (r * r) + q;\n\n return y;\n}\n\n// The output of log2 and thus the input of exp2 is either scaled by N\n// (in case of fast toint intrinsics) or not. The unscaled xd must be\n// in [-1021,1023], sign_bias sets the sign of the result.\n// @ts-ignore: decorator\n@inline\nfunction exp2f_inline(xd: f64, signBias: u32): f32 {\n const\n N = 1 << EXP2F_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000) / N; // 0x1.8p+52\n\n const\n C0 = reinterpret(0x3FAC6AF84B912394), // 0x1.c6af84b912394p-5\n C1 = reinterpret(0x3FCEBFCE50FAC4F3), // 0x1.ebfce50fac4f3p-3\n C2 = reinterpret(0x3FE62E42FF0C52D6); // 0x1.62e42ff0c52d6p-1\n\n // x = k/N + r with r in [-1/(2N), 1/(2N)]\n var kd = (xd + shift);\n var ki = reinterpret(kd);\n var r = xd - (kd - shift);\n var t: u64, z: f64, y: f64, s: f64;\n\n // exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1)\n t = load(EXP2F_DATA_TAB + ((ki & N_MASK) << alignof()));\n t += (ki + signBias) << (52 - EXP2F_TABLE_BITS);\n s = reinterpret(t);\n z = C0 * r + C1;\n y = C2 * r + 1;\n y += z * (r * r);\n y *= s;\n return y;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction xflowf(sign: u32, y: f32): f32 {\n return select(-y, y, sign) * y;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction oflowf(sign: u32): f32 {\n return xflowf(sign, reinterpret(0x70000000)); // 0x1p97f\n}\n\n// @ts-ignore: decorator\n@inline\nfunction uflowf(sign: u32): f32 {\n return xflowf(sign, reinterpret(0x10000000)); // 0x1p-95f\n}\n\n// @ts-ignore: decorator\n@inline\nexport function powf_lut(x: f32, y: f32): f32 {\n const\n Ox1p23f = reinterpret(0x4B000000), // 0x1p23f\n UPPER_LIMIT = reinterpret(0x405FFFFFFFD1D571), // 0x1.fffffffd1d571p+6\n LOWER_LIMIT = -150.0,\n SIGN_BIAS = 1 << (EXP2F_TABLE_BITS + 11);\n\n var signBias: u32 = 0;\n var ix = reinterpret(x);\n var iy = reinterpret(y);\n var ny = 0;\n\n if (i32(ix - 0x00800000 >= 0x7f800000 - 0x00800000) | (ny = i32(zeroinfnanf(iy)))) {\n // Either (x < 0x1p-126 or inf or nan) or (y is 0 or inf or nan).\n if (ny) {\n if ((iy << 1) == 0) return 1.0;\n if (ix == 0x3F800000) return NaN; // original: 1.0\n if ((ix << 1) > (0x7F800000 << 1) || (iy << 1) > (0x7F800000 << 1)) return x + y;\n if ((ix << 1) == (0x3F800000 << 1)) return NaN; // original: 1.0\n if (((ix << 1) < (0x3F800000 << 1)) == !(iy >> 31)) return 0; // |x| < 1 && y==inf or |x| > 1 && y==-inf.\n return y * y;\n }\n if (zeroinfnanf(ix)) {\n let x2 = x * x;\n if ((ix >> 31) && checkintf(iy) == 1) x2 = -x2;\n return iy >> 31 ? 1 / x2 : x2;\n }\n // x and y are non-zero finite.\n if (ix >> 31) {\n // Finite x < 0.\n let yint = checkintf(iy);\n if (yint == 0) return (x - x) / (x - x);\n if (yint == 1) signBias = SIGN_BIAS;\n ix &= 0x7FFFFFFF;\n }\n if (ix < 0x00800000) {\n // Normalize subnormal x so exponent becomes negative.\n ix = reinterpret(x * Ox1p23f);\n ix &= 0x7FFFFFFF;\n ix -= 23 << 23;\n }\n }\n var logx = log2f_inline(ix);\n var ylogx = y * logx; // cannot overflow, y is single prec.\n if ((reinterpret(ylogx) >> 47 & 0xFFFF) >= 0x80BF) { // reinterpret(126.0) >> 47\n // |y * log(x)| >= 126\n if (ylogx > UPPER_LIMIT) return oflowf(signBias); // overflow\n if (ylogx <= LOWER_LIMIT) return uflowf(signBias); // underflow\n }\n return exp2f_inline(ylogx, signBias);\n}\n\n//\n// Lookup data for exp. See: https://git.musl-libc.org/cgit/musl/tree/src/math/exp.c\n//\n\n// @ts-ignore: decorator\n@inline const EXP_TABLE_BITS = 7;\n\n// @ts-ignore: decorator\n@lazy @inline const EXP_DATA_TAB = memory.data([\n 0x0000000000000000, 0x3FF0000000000000,\n 0x3C9B3B4F1A88BF6E, 0x3FEFF63DA9FB3335,\n 0xBC7160139CD8DC5D, 0x3FEFEC9A3E778061,\n 0xBC905E7A108766D1, 0x3FEFE315E86E7F85,\n 0x3C8CD2523567F613, 0x3FEFD9B0D3158574,\n 0xBC8BCE8023F98EFA, 0x3FEFD06B29DDF6DE,\n 0x3C60F74E61E6C861, 0x3FEFC74518759BC8,\n 0x3C90A3E45B33D399, 0x3FEFBE3ECAC6F383,\n 0x3C979AA65D837B6D, 0x3FEFB5586CF9890F,\n 0x3C8EB51A92FDEFFC, 0x3FEFAC922B7247F7,\n 0x3C3EBE3D702F9CD1, 0x3FEFA3EC32D3D1A2,\n 0xBC6A033489906E0B, 0x3FEF9B66AFFED31B,\n 0xBC9556522A2FBD0E, 0x3FEF9301D0125B51,\n 0xBC5080EF8C4EEA55, 0x3FEF8ABDC06C31CC,\n 0xBC91C923B9D5F416, 0x3FEF829AAEA92DE0,\n 0x3C80D3E3E95C55AF, 0x3FEF7A98C8A58E51,\n 0xBC801B15EAA59348, 0x3FEF72B83C7D517B,\n 0xBC8F1FF055DE323D, 0x3FEF6AF9388C8DEA,\n 0x3C8B898C3F1353BF, 0x3FEF635BEB6FCB75,\n 0xBC96D99C7611EB26, 0x3FEF5BE084045CD4,\n 0x3C9AECF73E3A2F60, 0x3FEF54873168B9AA,\n 0xBC8FE782CB86389D, 0x3FEF4D5022FCD91D,\n 0x3C8A6F4144A6C38D, 0x3FEF463B88628CD6,\n 0x3C807A05B0E4047D, 0x3FEF3F49917DDC96,\n 0x3C968EFDE3A8A894, 0x3FEF387A6E756238,\n 0x3C875E18F274487D, 0x3FEF31CE4FB2A63F,\n 0x3C80472B981FE7F2, 0x3FEF2B4565E27CDD,\n 0xBC96B87B3F71085E, 0x3FEF24DFE1F56381,\n 0x3C82F7E16D09AB31, 0x3FEF1E9DF51FDEE1,\n 0xBC3D219B1A6FBFFA, 0x3FEF187FD0DAD990,\n 0x3C8B3782720C0AB4, 0x3FEF1285A6E4030B,\n 0x3C6E149289CECB8F, 0x3FEF0CAFA93E2F56,\n 0x3C834D754DB0ABB6, 0x3FEF06FE0A31B715,\n 0x3C864201E2AC744C, 0x3FEF0170FC4CD831,\n 0x3C8FDD395DD3F84A, 0x3FEEFC08B26416FF,\n 0xBC86A3803B8E5B04, 0x3FEEF6C55F929FF1,\n 0xBC924AEDCC4B5068, 0x3FEEF1A7373AA9CB,\n 0xBC9907F81B512D8E, 0x3FEEECAE6D05D866,\n 0xBC71D1E83E9436D2, 0x3FEEE7DB34E59FF7,\n 0xBC991919B3CE1B15, 0x3FEEE32DC313A8E5,\n 0x3C859F48A72A4C6D, 0x3FEEDEA64C123422,\n 0xBC9312607A28698A, 0x3FEEDA4504AC801C,\n 0xBC58A78F4817895B, 0x3FEED60A21F72E2A,\n 0xBC7C2C9B67499A1B, 0x3FEED1F5D950A897,\n 0x3C4363ED60C2AC11, 0x3FEECE086061892D,\n 0x3C9666093B0664EF, 0x3FEECA41ED1D0057,\n 0x3C6ECCE1DAA10379, 0x3FEEC6A2B5C13CD0,\n 0x3C93FF8E3F0F1230, 0x3FEEC32AF0D7D3DE,\n 0x3C7690CEBB7AAFB0, 0x3FEEBFDAD5362A27,\n 0x3C931DBDEB54E077, 0x3FEEBCB299FDDD0D,\n 0xBC8F94340071A38E, 0x3FEEB9B2769D2CA7,\n 0xBC87DECCDC93A349, 0x3FEEB6DAA2CF6642,\n 0xBC78DEC6BD0F385F, 0x3FEEB42B569D4F82,\n 0xBC861246EC7B5CF6, 0x3FEEB1A4CA5D920F,\n 0x3C93350518FDD78E, 0x3FEEAF4736B527DA,\n 0x3C7B98B72F8A9B05, 0x3FEEAD12D497C7FD,\n 0x3C9063E1E21C5409, 0x3FEEAB07DD485429,\n 0x3C34C7855019C6EA, 0x3FEEA9268A5946B7,\n 0x3C9432E62B64C035, 0x3FEEA76F15AD2148,\n 0xBC8CE44A6199769F, 0x3FEEA5E1B976DC09,\n 0xBC8C33C53BEF4DA8, 0x3FEEA47EB03A5585,\n 0xBC845378892BE9AE, 0x3FEEA34634CCC320,\n 0xBC93CEDD78565858, 0x3FEEA23882552225,\n 0x3C5710AA807E1964, 0x3FEEA155D44CA973,\n 0xBC93B3EFBF5E2228, 0x3FEEA09E667F3BCD,\n 0xBC6A12AD8734B982, 0x3FEEA012750BDABF,\n 0xBC6367EFB86DA9EE, 0x3FEE9FB23C651A2F,\n 0xBC80DC3D54E08851, 0x3FEE9F7DF9519484,\n 0xBC781F647E5A3ECF, 0x3FEE9F75E8EC5F74,\n 0xBC86EE4AC08B7DB0, 0x3FEE9F9A48A58174,\n 0xBC8619321E55E68A, 0x3FEE9FEB564267C9,\n 0x3C909CCB5E09D4D3, 0x3FEEA0694FDE5D3F,\n 0xBC7B32DCB94DA51D, 0x3FEEA11473EB0187,\n 0x3C94ECFD5467C06B, 0x3FEEA1ED0130C132,\n 0x3C65EBE1ABD66C55, 0x3FEEA2F336CF4E62,\n 0xBC88A1C52FB3CF42, 0x3FEEA427543E1A12,\n 0xBC9369B6F13B3734, 0x3FEEA589994CCE13,\n 0xBC805E843A19FF1E, 0x3FEEA71A4623C7AD,\n 0xBC94D450D872576E, 0x3FEEA8D99B4492ED,\n 0x3C90AD675B0E8A00, 0x3FEEAAC7D98A6699,\n 0x3C8DB72FC1F0EAB4, 0x3FEEACE5422AA0DB,\n 0xBC65B6609CC5E7FF, 0x3FEEAF3216B5448C,\n 0x3C7BF68359F35F44, 0x3FEEB1AE99157736,\n 0xBC93091FA71E3D83, 0x3FEEB45B0B91FFC6,\n 0xBC5DA9B88B6C1E29, 0x3FEEB737B0CDC5E5,\n 0xBC6C23F97C90B959, 0x3FEEBA44CBC8520F,\n 0xBC92434322F4F9AA, 0x3FEEBD829FDE4E50,\n 0xBC85CA6CD7668E4B, 0x3FEEC0F170CA07BA,\n 0x3C71AFFC2B91CE27, 0x3FEEC49182A3F090,\n 0x3C6DD235E10A73BB, 0x3FEEC86319E32323,\n 0xBC87C50422622263, 0x3FEECC667B5DE565,\n 0x3C8B1C86E3E231D5, 0x3FEED09BEC4A2D33,\n 0xBC91BBD1D3BCBB15, 0x3FEED503B23E255D,\n 0x3C90CC319CEE31D2, 0x3FEED99E1330B358,\n 0x3C8469846E735AB3, 0x3FEEDE6B5579FDBF,\n 0xBC82DFCD978E9DB4, 0x3FEEE36BBFD3F37A,\n 0x3C8C1A7792CB3387, 0x3FEEE89F995AD3AD,\n 0xBC907B8F4AD1D9FA, 0x3FEEEE07298DB666,\n 0xBC55C3D956DCAEBA, 0x3FEEF3A2B84F15FB,\n 0xBC90A40E3DA6F640, 0x3FEEF9728DE5593A,\n 0xBC68D6F438AD9334, 0x3FEEFF76F2FB5E47,\n 0xBC91EEE26B588A35, 0x3FEF05B030A1064A,\n 0x3C74FFD70A5FDDCD, 0x3FEF0C1E904BC1D2,\n 0xBC91BDFBFA9298AC, 0x3FEF12C25BD71E09,\n 0x3C736EAE30AF0CB3, 0x3FEF199BDD85529C,\n 0x3C8EE3325C9FFD94, 0x3FEF20AB5FFFD07A,\n 0x3C84E08FD10959AC, 0x3FEF27F12E57D14B,\n 0x3C63CDAF384E1A67, 0x3FEF2F6D9406E7B5,\n 0x3C676B2C6C921968, 0x3FEF3720DCEF9069,\n 0xBC808A1883CCB5D2, 0x3FEF3F0B555DC3FA,\n 0xBC8FAD5D3FFFFA6F, 0x3FEF472D4A07897C,\n 0xBC900DAE3875A949, 0x3FEF4F87080D89F2,\n 0x3C74A385A63D07A7, 0x3FEF5818DCFBA487,\n 0xBC82919E2040220F, 0x3FEF60E316C98398,\n 0x3C8E5A50D5C192AC, 0x3FEF69E603DB3285,\n 0x3C843A59AC016B4B, 0x3FEF7321F301B460,\n 0xBC82D52107B43E1F, 0x3FEF7C97337B9B5F,\n 0xBC892AB93B470DC9, 0x3FEF864614F5A129,\n 0x3C74B604603A88D3, 0x3FEF902EE78B3FF6,\n 0x3C83C5EC519D7271, 0x3FEF9A51FBC74C83,\n 0xBC8FF7128FD391F0, 0x3FEFA4AFA2A490DA,\n 0xBC8DAE98E223747D, 0x3FEFAF482D8E67F1,\n 0x3C8EC3BC41AA2008, 0x3FEFBA1BEE615A27,\n 0x3C842B94C3A9EB32, 0x3FEFC52B376BBA97,\n 0x3C8A64A931D185EE, 0x3FEFD0765B6E4540,\n 0xBC8E37BAE43BE3ED, 0x3FEFDBFDAD9CBE14,\n 0x3C77893B4D91CD9D, 0x3FEFE7C1819E90D8,\n 0x3C5305C14160CC89, 0x3FEFF3C22B8F71F1\n]);\n\n// Handle cases that may overflow or underflow when computing the result that\n// is scale*(1+TMP) without intermediate rounding. The bit representation of\n// scale is in SBITS, however it has a computed exponent that may have\n// overflown into the sign bit so that needs to be adjusted before using it as\n// a double. (int32_t)KI is the k used in the argument reduction and exponent\n// adjustment of scale, positive k here means the result may overflow and\n// negative k means the result may underflow.\n// @ts-ignore: decorator\n@inline\nfunction specialcase(tmp: f64, sbits: u64, ki: u64): f64 {\n const\n Ox1p_1022 = reinterpret(0x0010000000000000), // 0x1p-1022\n Ox1p1009 = reinterpret(0x7F00000000000000); // 0x1p1009\n\n var scale: f64;\n if (!(ki & 0x80000000)) {\n // k > 0, the exponent of scale might have overflowed by <= 460.\n sbits -= u64(1009) << 52;\n scale = reinterpret(sbits);\n return Ox1p1009 * (scale + scale * tmp); // 0x1p1009\n }\n // k < 0, need special care in the subnormal range.\n sbits += u64(1022) << 52;\n // Note: sbits is signed scale.\n scale = reinterpret(sbits);\n var y = scale + scale * tmp;\n if (abs(y) < 1.0) {\n // Round y to the right precision before scaling it into the subnormal\n // range to avoid double rounding that can cause 0.5+E/2 ulp error where\n // E is the worst-case ulp error outside the subnormal range. So this\n // is only useful if the goal is better than 1 ulp worst-case error.\n let one = copysign(1.0, y);\n let lo = scale - y + scale * tmp;\n let hi = one + y;\n lo = one - hi + y + lo;\n y = (hi + lo) - one;\n // Fix the sign of 0.\n if (y == 0.0) y = reinterpret(sbits & 0x8000000000000000);\n }\n return y * Ox1p_1022;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function exp_lut(x: f64): f64 {\n const\n N = 1 << EXP_TABLE_BITS,\n N_MASK = N - 1;\n\n const\n InvLn2N = reinterpret(0x3FF71547652B82FE) * N, // 0x1.71547652b82fep0\n NegLn2hiN = reinterpret(0xBF762E42FEFA0000), // -0x1.62e42fefa0000p-8\n NegLn2loN = reinterpret(0xBD0CF79ABC9E3B3A), // -0x1.cf79abc9e3b3ap-47\n shift = reinterpret(0x4338000000000000); // 0x1.8p52;\n\n const\n C2 = reinterpret(0x3FDFFFFFFFFFFDBD), // __exp_data.poly[0] (0x1.ffffffffffdbdp-2)\n C3 = reinterpret(0x3FC555555555543C), // __exp_data.poly[1] (0x1.555555555543cp-3)\n C4 = reinterpret(0x3FA55555CF172B91), // __exp_data.poly[2] (0x1.55555cf172b91p-5)\n C5 = reinterpret(0x3F81111167A4D017); // __exp_data.poly[3] (0x1.1111167a4d017p-7)\n\n var ux = reinterpret(x);\n var abstop = (ux >> 52 & 0x7FF);\n if (abstop - 0x3C9 >= 0x03F) {\n if (abstop - 0x3C9 >= 0x80000000) return 1;\n if (abstop >= 0x409) {\n if (ux == 0xFFF0000000000000) return 0;\n if (abstop >= 0x7FF) return 1.0 + x;\n return select(0, Infinity, ux >> 63);\n }\n // Large x is special cased below.\n abstop = 0;\n }\n\n // exp(x) = 2^(k/N) * exp(r), with exp(r) in [2^(-1/2N),2^(1/2N)]\n // x = ln2/N*k + r, with int k and r in [-ln2/2N, ln2/2N]\n var z = InvLn2N * x;\n // #if TOINT_INTRINSICS\n // \tkd = roundtoint(z);\n // \tki = converttoint(z);\n // #elif EXP_USE_TOINT_NARROW\n // \t// z - kd is in [-0.5-2^-16, 0.5] in all rounding modes.\n // var kd = z + shift;\n // var ki = reinterpret(kd) >> 16;\n // var kd = ki;\n // #else\n // z - kd is in [-1, 1] in non-nearest rounding modes.\n var kd = z + shift;\n var ki = reinterpret(kd);\n kd -= shift;\n // #endif\n var r = x + kd * NegLn2hiN + kd * NegLn2loN;\n // 2^(k/N) ~= scale * (1 + tail).\n var idx = ((ki & N_MASK) << 1);\n var top = ki << (52 - EXP_TABLE_BITS);\n\n var tail = reinterpret(load(EXP_DATA_TAB + (idx << alignof()))); // T[idx]\n // This is only a valid scale when -1023*N < k < 1024*N\n var sbits = load(EXP_DATA_TAB + (idx << alignof()), 1 << alignof()) + top; // T[idx + 1]\n // exp(x) = 2^(k/N) * exp(r) ~= scale + scale * (tail + exp(r) - 1).\n // Evaluation is optimized assuming superscalar pipelined execution.\n var r2 = r * r;\n // Without fma the worst case error is 0.25/N ulp larger.\n // Worst case error is less than 0.5+1.11/N+(abs poly error * 2^53) ulp.\n var tmp = tail + r + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5);\n if (abstop == 0) return specialcase(tmp, sbits, ki);\n var scale = reinterpret(sbits);\n // Note: tmp == 0 or |tmp| > 2^-200 and scale > 2^-739, so there\n // is no spurious underflow here even without fma.\n return scale + scale * tmp;\n}\n\n//\n// Lookup data for exp2. See: https://git.musl-libc.org/cgit/musl/tree/src/math/exp2.c\n//\n\n// Handle cases that may overflow or underflow when computing the result that\n// is scale*(1+TMP) without intermediate rounding. The bit representation of\n// scale is in SBITS, however it has a computed exponent that may have\n// overflown into the sign bit so that needs to be adjusted before using it as\n// a double. (int32_t)KI is the k used in the argument reduction and exponent\n// adjustment of scale, positive k here means the result may overflow and\n// negative k means the result may underflow.\n// @ts-ignore: decorator\n@inline\nfunction specialcase2(tmp: f64, sbits: u64, ki: u64): f64 {\n const Ox1p_1022 = reinterpret(0x10000000000000); // 0x1p-1022\n var scale: f64;\n if ((ki & 0x80000000) == 0) {\n // k > 0, the exponent of scale might have overflowed by 1\n sbits -= u64(1) << 52;\n scale = reinterpret(sbits);\n return 2 * (scale * tmp + scale);\n }\n // k < 0, need special care in the subnormal range\n sbits += u64(1022) << 52;\n scale = reinterpret(sbits);\n var y = scale * tmp + scale;\n if (y < 1.0) {\n // Round y to the right precision before scaling it into the subnormal\n // range to avoid double rounding that can cause 0.5+E/2 ulp error where\n // E is the worst-case ulp error outside the subnormal range. So this\n // is only useful if the goal is better than 1 ulp worst-case error.\n let hi: f64, lo: f64;\n lo = scale - y + scale * tmp;\n hi = 1.0 + y;\n lo = 1.0 - hi + y + lo;\n y = (hi + lo) - 1.0;\n }\n return y * Ox1p_1022;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function exp2_lut(x: f64): f64 {\n const\n N = 1 << EXP_TABLE_BITS,\n N_MASK = N - 1,\n shift = reinterpret(0x4338000000000000) / N; // 0x1.8p52\n\n const\n C1 = reinterpret(0x3FE62E42FEFA39EF), // 0x1.62e42fefa39efp-1\n C2 = reinterpret(0x3FCEBFBDFF82C424), // 0x1.ebfbdff82c424p-3\n C3 = reinterpret(0x3FAC6B08D70CF4B5), // 0x1.c6b08d70cf4b5p-5\n C4 = reinterpret(0x3F83B2ABD24650CC), // 0x1.3b2abd24650ccp-7\n C5 = reinterpret(0x3F55D7E09B4E3A84); // 0x1.5d7e09b4e3a84p-10\n\n var ux = reinterpret(x);\n var abstop = (ux >> 52 & 0x7ff);\n if (abstop - 0x3C9 >= 0x03F) {\n if (abstop - 0x3C9 >= 0x80000000) return 1.0;\n if (abstop >= 0x409) {\n if (ux == 0xFFF0000000000000) return 0;\n if (abstop >= 0x7FF) return 1.0 + x;\n if (!(ux >> 63)) return Infinity;\n else if (ux >= 0xC090CC0000000000) return 0;\n }\n if ((ux << 1) > 0x811A000000000000) abstop = 0; // Large x is special cased below.\n }\n\n // exp2(x) = 2^(k/N) * 2^r, with 2^r in [2^(-1/2N),2^(1/2N)].\n // x = k/N + r, with int k and r in [-1/2N, 1/2N]\n var kd = x + shift;\n var ki = reinterpret(kd);\n kd -= shift; // k/N for int k\n var r = x - kd;\n // 2^(k/N) ~= scale * (1 + tail)\n var idx = ((ki & N_MASK) << 1);\n var top = ki << (52 - EXP_TABLE_BITS);\n\n var tail = reinterpret(load(EXP_DATA_TAB + (idx << alignof()), 0 << alignof())); // T[idx])\n // This is only a valid scale when -1023*N < k < 1024*N\n var sbits = load(EXP_DATA_TAB + (idx << alignof()), 1 << alignof()) + top; // T[idx + 1]\n // exp2(x) = 2^(k/N) * 2^r ~= scale + scale * (tail + 2^r - 1).\n // Evaluation is optimized assuming superscalar pipelined execution\n var r2 = r * r;\n // Without fma the worst case error is 0.5/N ulp larger.\n // Worst case error is less than 0.5+0.86/N+(abs poly error * 2^53) ulp.\n var tmp = tail + r * C1 + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5);\n if (abstop == 0) return specialcase2(tmp, sbits, ki);\n var scale = reinterpret(sbits);\n // Note: tmp == 0 or |tmp| > 2^-65 and scale > 2^-928, so there\n // is no spurious underflow here even without fma.\n return scale * tmp + scale;\n}\n\n//\n// Lookup data for log2. See: https://git.musl-libc.org/cgit/musl/tree/src/math/log2.c\n//\n\n// @ts-ignore: decorator\n@inline const LOG2_TABLE_BITS = 6;\n\n/* Algorithm:\n\n x = 2^k z\n log2(x) = k + log2(c) + log2(z/c)\n log2(z/c) = poly(z/c - 1)\n\nwhere z is in [1.6p-1; 1.6p0] which is split into N subintervals and z falls\ninto the ith one, then table entries are computed as\n\n tab[i].invc = 1/c\n tab[i].logc = (double)log2(c)\n tab2[i].chi = (double)c\n tab2[i].clo = (double)(c - (double)c)\n\nwhere c is near the center of the subinterval and is chosen by trying +-2^29\nfloating point invc candidates around 1/center and selecting one for which\n\n 1) the rounding error in 0x1.8p10 + logc is 0,\n 2) the rounding error in z - chi - clo is < 0x1p-64 and\n 3) the rounding error in (double)log2(c) is minimized (< 0x1p-68).\n\nNote: 1) ensures that k + logc can be computed without rounding error, 2)\nensures that z/c - 1 can be computed as (z - chi - clo)*invc with close to a\nsingle rounding error when there is no fast fma for z*invc - 1, 3) ensures\nthat logc + poly(z/c - 1) has small error, however near x == 1 when\n|log2(x)| < 0x1p-4, this is not enough so that is special cased. */\n\n// @ts-ignore: decorator\n@lazy @inline const LOG2_DATA_TAB1 = memory.data([\n // invc , logc\n reinterpret(0x3FF724286BB1ACF8), reinterpret(0xBFE1095FEECDB000),\n reinterpret(0x3FF6E1F766D2CCA1), reinterpret(0xBFE08494BD76D000),\n reinterpret(0x3FF6A13D0E30D48A), reinterpret(0xBFE00143AEE8F800),\n reinterpret(0x3FF661EC32D06C85), reinterpret(0xBFDEFEC5360B4000),\n reinterpret(0x3FF623FA951198F8), reinterpret(0xBFDDFDD91AB7E000),\n reinterpret(0x3FF5E75BA4CF026C), reinterpret(0xBFDCFFAE0CC79000),\n reinterpret(0x3FF5AC055A214FB8), reinterpret(0xBFDC043811FDA000),\n reinterpret(0x3FF571ED0F166E1E), reinterpret(0xBFDB0B67323AE000),\n reinterpret(0x3FF53909590BF835), reinterpret(0xBFDA152F5A2DB000),\n reinterpret(0x3FF5014FED61ADDD), reinterpret(0xBFD9217F5AF86000),\n reinterpret(0x3FF4CAB88E487BD0), reinterpret(0xBFD8304DB0719000),\n reinterpret(0x3FF49539B4334FEE), reinterpret(0xBFD74189F9A9E000),\n reinterpret(0x3FF460CBDFAFD569), reinterpret(0xBFD6552BB5199000),\n reinterpret(0x3FF42D664EE4B953), reinterpret(0xBFD56B23A29B1000),\n reinterpret(0x3FF3FB01111DD8A6), reinterpret(0xBFD483650F5FA000),\n reinterpret(0x3FF3C995B70C5836), reinterpret(0xBFD39DE937F6A000),\n reinterpret(0x3FF3991C4AB6FD4A), reinterpret(0xBFD2BAA1538D6000),\n reinterpret(0x3FF3698E0CE099B5), reinterpret(0xBFD1D98340CA4000),\n reinterpret(0x3FF33AE48213E7B2), reinterpret(0xBFD0FA853A40E000),\n reinterpret(0x3FF30D191985BDB1), reinterpret(0xBFD01D9C32E73000),\n reinterpret(0x3FF2E025CAB271D7), reinterpret(0xBFCE857DA2FA6000),\n reinterpret(0x3FF2B404CF13CD82), reinterpret(0xBFCCD3C8633D8000),\n reinterpret(0x3FF288B02C7CCB50), reinterpret(0xBFCB26034C14A000),\n reinterpret(0x3FF25E2263944DE5), reinterpret(0xBFC97C1C2F4FE000),\n reinterpret(0x3FF234563D8615B1), reinterpret(0xBFC7D6023F800000),\n reinterpret(0x3FF20B46E33EAF38), reinterpret(0xBFC633A71A05E000),\n reinterpret(0x3FF1E2EEFDCDA3DD), reinterpret(0xBFC494F5E9570000),\n reinterpret(0x3FF1BB4A580B3930), reinterpret(0xBFC2F9E424E0A000),\n reinterpret(0x3FF19453847F2200), reinterpret(0xBFC162595AFDC000),\n reinterpret(0x3FF16E06C0D5D73C), reinterpret(0xBFBF9C9A75BD8000),\n reinterpret(0x3FF1485F47B7E4C2), reinterpret(0xBFBC7B575BF9C000),\n reinterpret(0x3FF12358AD0085D1), reinterpret(0xBFB960C60FF48000),\n reinterpret(0x3FF0FEF00F532227), reinterpret(0xBFB64CE247B60000),\n reinterpret(0x3FF0DB2077D03A8F), reinterpret(0xBFB33F78B2014000),\n reinterpret(0x3FF0B7E6D65980D9), reinterpret(0xBFB0387D1A42C000),\n reinterpret(0x3FF0953EFE7B408D), reinterpret(0xBFAA6F9208B50000),\n reinterpret(0x3FF07325CAC53B83), reinterpret(0xBFA47A954F770000),\n reinterpret(0x3FF05197E40D1B5C), reinterpret(0xBF9D23A8C50C0000),\n reinterpret(0x3FF03091C1208EA2), reinterpret(0xBF916A2629780000),\n reinterpret(0x3FF0101025B37E21), reinterpret(0xBF7720F8D8E80000),\n reinterpret(0x3FEFC07EF9CAA76B), reinterpret(0x3F86FE53B1500000),\n reinterpret(0x3FEF4465D3F6F184), reinterpret(0x3FA11CCCE10F8000),\n reinterpret(0x3FEECC079F84107F), reinterpret(0x3FAC4DFC8C8B8000),\n reinterpret(0x3FEE573A99975AE8), reinterpret(0x3FB3AA321E574000),\n reinterpret(0x3FEDE5D6F0BD3DE6), reinterpret(0x3FB918A0D08B8000),\n reinterpret(0x3FED77B681FF38B3), reinterpret(0x3FBE72E9DA044000),\n reinterpret(0x3FED0CB5724DE943), reinterpret(0x3FC1DCD2507F6000),\n reinterpret(0x3FECA4B2DC0E7563), reinterpret(0x3FC476AB03DEA000),\n reinterpret(0x3FEC3F8EE8D6CB51), reinterpret(0x3FC7074377E22000),\n reinterpret(0x3FEBDD2B4F020C4C), reinterpret(0x3FC98EDE8BA94000),\n reinterpret(0x3FEB7D6C006015CA), reinterpret(0x3FCC0DB86AD2E000),\n reinterpret(0x3FEB20366E2E338F), reinterpret(0x3FCE840AAFCEE000),\n reinterpret(0x3FEAC57026295039), reinterpret(0x3FD0790AB4678000),\n reinterpret(0x3FEA6D01BC2731DD), reinterpret(0x3FD1AC056801C000),\n reinterpret(0x3FEA16D3BC3FF18B), reinterpret(0x3FD2DB11D4FEE000),\n reinterpret(0x3FE9C2D14967FEAD), reinterpret(0x3FD406464EC58000),\n reinterpret(0x3FE970E4F47C9902), reinterpret(0x3FD52DBE093AF000),\n reinterpret(0x3FE920FB3982BCF2), reinterpret(0x3FD651902050D000),\n reinterpret(0x3FE8D30187F759F1), reinterpret(0x3FD771D2CDEAF000),\n reinterpret(0x3FE886E5EBB9F66D), reinterpret(0x3FD88E9C857D9000),\n reinterpret(0x3FE83C97B658B994), reinterpret(0x3FD9A80155E16000),\n reinterpret(0x3FE7F405FFC61022), reinterpret(0x3FDABE186ED3D000),\n reinterpret(0x3FE7AD22181415CA), reinterpret(0x3FDBD0F2AEA0E000),\n reinterpret(0x3FE767DCF99EFF8C), reinterpret(0x3FDCE0A43DBF4000)\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const LOG2_DATA_TAB2 = memory.data([\n // chi , clo\n reinterpret(0x3FE6200012B90A8E), reinterpret(0x3C8904AB0644B605),\n reinterpret(0x3FE66000045734A6), reinterpret(0x3C61FF9BEA62F7A9),\n reinterpret(0x3FE69FFFC325F2C5), reinterpret(0x3C827ECFCB3C90BA),\n reinterpret(0x3FE6E00038B95A04), reinterpret(0x3C88FF8856739326),\n reinterpret(0x3FE71FFFE09994E3), reinterpret(0x3C8AFD40275F82B1),\n reinterpret(0x3FE7600015590E10), reinterpret(0xBC72FD75B4238341),\n reinterpret(0x3FE7A00012655BD5), reinterpret(0x3C7808E67C242B76),\n reinterpret(0x3FE7E0003259E9A6), reinterpret(0xBC6208E426F622B7),\n reinterpret(0x3FE81FFFEDB4B2D2), reinterpret(0xBC8402461EA5C92F),\n reinterpret(0x3FE860002DFAFCC3), reinterpret(0x3C6DF7F4A2F29A1F),\n reinterpret(0x3FE89FFFF78C6B50), reinterpret(0xBC8E0453094995FD),\n reinterpret(0x3FE8E00039671566), reinterpret(0xBC8A04F3BEC77B45),\n reinterpret(0x3FE91FFFE2BF1745), reinterpret(0xBC77FA34400E203C),\n reinterpret(0x3FE95FFFCC5C9FD1), reinterpret(0xBC76FF8005A0695D),\n reinterpret(0x3FE9A0003BBA4767), reinterpret(0x3C70F8C4C4EC7E03),\n reinterpret(0x3FE9DFFFE7B92DA5), reinterpret(0x3C8E7FD9478C4602),\n reinterpret(0x3FEA1FFFD72EFDAF), reinterpret(0xBC6A0C554DCDAE7E),\n reinterpret(0x3FEA5FFFDE04FF95), reinterpret(0x3C867DA98CE9B26B),\n reinterpret(0x3FEA9FFFCA5E8D2B), reinterpret(0xBC8284C9B54C13DE),\n reinterpret(0x3FEADFFFDDAD03EA), reinterpret(0x3C5812C8EA602E3C),\n reinterpret(0x3FEB1FFFF10D3D4D), reinterpret(0xBC8EFADDAD27789C),\n reinterpret(0x3FEB5FFFCE21165A), reinterpret(0x3C53CB1719C61237),\n reinterpret(0x3FEB9FFFD950E674), reinterpret(0x3C73F7D94194CE00),\n reinterpret(0x3FEBE000139CA8AF), reinterpret(0x3C750AC4215D9BC0),\n reinterpret(0x3FEC20005B46DF99), reinterpret(0x3C6BEEA653E9C1C9),\n reinterpret(0x3FEC600040B9F7AE), reinterpret(0xBC7C079F274A70D6),\n reinterpret(0x3FECA0006255FD8A), reinterpret(0xBC7A0B4076E84C1F),\n reinterpret(0x3FECDFFFD94C095D), reinterpret(0x3C88F933F99AB5D7),\n reinterpret(0x3FED1FFFF975D6CF), reinterpret(0xBC582C08665FE1BE),\n reinterpret(0x3FED5FFFA2561C93), reinterpret(0xBC7B04289BD295F3),\n reinterpret(0x3FED9FFF9D228B0C), reinterpret(0x3C870251340FA236),\n reinterpret(0x3FEDE00065BC7E16), reinterpret(0xBC75011E16A4D80C),\n reinterpret(0x3FEE200002F64791), reinterpret(0x3C89802F09EF62E0),\n reinterpret(0x3FEE600057D7A6D8), reinterpret(0xBC7E0B75580CF7FA),\n reinterpret(0x3FEEA00027EDC00C), reinterpret(0xBC8C848309459811),\n reinterpret(0x3FEEE0006CF5CB7C), reinterpret(0xBC8F8027951576F4),\n reinterpret(0x3FEF2000782B7DCC), reinterpret(0xBC8F81D97274538F),\n reinterpret(0x3FEF6000260C450A), reinterpret(0xBC4071002727FFDC),\n reinterpret(0x3FEF9FFFE88CD533), reinterpret(0xBC581BDCE1FDA8B0),\n reinterpret(0x3FEFDFFFD50F8689), reinterpret(0x3C87F91ACB918E6E),\n reinterpret(0x3FF0200004292367), reinterpret(0x3C9B7FF365324681),\n reinterpret(0x3FF05FFFE3E3D668), reinterpret(0x3C86FA08DDAE957B),\n reinterpret(0x3FF0A0000A85A757), reinterpret(0xBC57E2DE80D3FB91),\n reinterpret(0x3FF0E0001A5F3FCC), reinterpret(0xBC91823305C5F014),\n reinterpret(0x3FF11FFFF8AFBAF5), reinterpret(0xBC8BFABB6680BAC2),\n reinterpret(0x3FF15FFFE54D91AD), reinterpret(0xBC9D7F121737E7EF),\n reinterpret(0x3FF1A00011AC36E1), reinterpret(0x3C9C000A0516F5FF),\n reinterpret(0x3FF1E00019C84248), reinterpret(0xBC9082FBE4DA5DA0),\n reinterpret(0x3FF220000FFE5E6E), reinterpret(0xBC88FDD04C9CFB43),\n reinterpret(0x3FF26000269FD891), reinterpret(0x3C8CFE2A7994D182),\n reinterpret(0x3FF2A00029A6E6DA), reinterpret(0xBC700273715E8BC5),\n reinterpret(0x3FF2DFFFE0293E39), reinterpret(0x3C9B7C39DAB2A6F9),\n reinterpret(0x3FF31FFFF7DCF082), reinterpret(0x3C7DF1336EDC5254),\n reinterpret(0x3FF35FFFF05A8B60), reinterpret(0xBC9E03564CCD31EB),\n reinterpret(0x3FF3A0002E0EAECC), reinterpret(0x3C75F0E74BD3A477),\n reinterpret(0x3FF3E000043BB236), reinterpret(0x3C9C7DCB149D8833),\n reinterpret(0x3FF4200002D187FF), reinterpret(0x3C7E08AFCF2D3D28),\n reinterpret(0x3FF460000D387CB1), reinterpret(0x3C820837856599A6),\n reinterpret(0x3FF4A00004569F89), reinterpret(0xBC89FA5C904FBCD2),\n reinterpret(0x3FF4E000043543F3), reinterpret(0xBC781125ED175329),\n reinterpret(0x3FF51FFFCC027F0F), reinterpret(0x3C9883D8847754DC),\n reinterpret(0x3FF55FFFFD87B36F), reinterpret(0xBC8709E731D02807),\n reinterpret(0x3FF59FFFF21DF7BA), reinterpret(0x3C87F79F68727B02),\n reinterpret(0x3FF5DFFFEBFC3481), reinterpret(0xBC9180902E30E93E)\n]);\n\n// @ts-ignore: decorator\n@inline\nexport function log2_lut(x: f64): f64 {\n const N_MASK = (1 << LOG2_TABLE_BITS) - 1;\n\n const\n LO: u64 = 0x3FEEA4AF00000000, // reinterpret(1.0 - 0x1.5b51p-5)\n HI: u64 = 0x3FF0B55900000000; // reinterpret(1.0 + 0x1.6ab2p-5)\n\n const\n InvLn2hi = reinterpret(0x3FF7154765200000), // 0x1.7154765200000p+0\n InvLn2lo = reinterpret(0x3DE705FC2EEFA200), // 0x1.705fc2eefa200p-33\n Ox1p52 = reinterpret(0x4330000000000000); // 0x1p52\n\n const\n B0 = reinterpret(0xBFE71547652B82FE), // -0x1.71547652b82fep-1\n B1 = reinterpret(0x3FDEC709DC3A03F7), // 0x1.ec709dc3a03f7p-2\n B2 = reinterpret(0xBFD71547652B7C3F), // -0x1.71547652b7c3fp-2\n B3 = reinterpret(0x3FD2776C50F05BE4), // 0x1.2776c50f05be4p-2\n B4 = reinterpret(0xBFCEC709DD768FE5), // -0x1.ec709dd768fe5p-3\n B5 = reinterpret(0x3FCA61761EC4E736), // 0x1.a61761ec4e736p-3\n B6 = reinterpret(0xBFC7153FBC64A79B), // -0x1.7153fbc64a79bp-3\n B7 = reinterpret(0x3FC484D154F01B4A), // 0x1.484d154f01b4ap-3\n B8 = reinterpret(0xBFC289E4A72C383C), // -0x1.289e4a72c383cp-3\n B9 = reinterpret(0x3FC0B32F285AEE66); // 0x1.0b32f285aee66p-3\n\n const\n A0 = reinterpret(0xBFE71547652B8339), // -0x1.71547652b8339p-1\n A1 = reinterpret(0x3FDEC709DC3A04BE), // 0x1.ec709dc3a04bep-2\n A2 = reinterpret(0xBFD7154764702FFB), // -0x1.7154764702ffbp-2\n A3 = reinterpret(0x3FD2776C50034C48), // 0x1.2776c50034c48p-2\n A4 = reinterpret(0xBFCEC7B328EA92BC), // -0x1.ec7b328ea92bcp-3\n A5 = reinterpret(0x3FCA6225E117F92E); // 0x1.a6225e117f92ep-3\n\n var ix = reinterpret(x);\n if (ix - LO < HI - LO) {\n let r = x - 1.0;\n // #if __FP_FAST_FMA\n // hi = r * InvLn2hi;\n // lo = r * InvLn2lo + __builtin_fma(r, InvLn2hi, -hi);\n // #else\n let rhi = reinterpret(reinterpret(r) & 0xFFFFFFFF00000000);\n let rlo = r - rhi;\n let hi = rhi * InvLn2hi;\n let lo = rlo * InvLn2hi + r * InvLn2lo;\n // #endif\n let r2 = r * r; // rounding error: 0x1p-62\n let r4 = r2 * r2;\n // Worst-case error is less than 0.54 ULP (0.55 ULP without fma)\n let p = r2 * (B0 + r * B1);\n let y = hi + p;\n lo += hi - y + p;\n lo += r4 * (B2 + r * B3 + r2 * (B4 + r * B5) +\n r4 * (B6 + r * B7 + r2 * (B8 + r * B9)));\n return y + lo;\n }\n var top = (ix >> 48);\n if (top - 0x0010 >= 0x7ff0 - 0x0010) {\n // x < 0x1p-1022 or inf or nan.\n if ((ix << 1) == 0) return -1.0 / (x * x);\n if (ix == 0x7FF0000000000000) return x; // log(inf) == inf\n if ((top & 0x8000) || (top & 0x7FF0) == 0x7FF0) return (x - x) / (x - x);\n // x is subnormal, normalize it.\n ix = reinterpret(x * Ox1p52);\n ix -= u64(52) << 52;\n }\n\n // x = 2^k z; where z is in range [OFF,2*OFF) and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n var tmp = ix - 0x3FE6000000000000;\n var i = ((tmp >> (52 - LOG2_TABLE_BITS)) & N_MASK);\n var k = tmp >> 52;\n var iz = ix - (tmp & 0xFFF0000000000000);\n\n var invc = load(LOG2_DATA_TAB1 + (i << (1 + alignof())), 0 << alignof()); // T[i].invc;\n var logc = load(LOG2_DATA_TAB1 + (i << (1 + alignof())), 1 << alignof()); // T[i].logc;\n var z = reinterpret(iz);\n var kd = k;\n\n // log2(x) = log2(z/c) + log2(c) + k.\n // r ~= z/c - 1, |r| < 1/(2*N).\n // #if __FP_FAST_FMA\n // \t// rounding error: 0x1p-55/N.\n // \tr = __builtin_fma(z, invc, -1.0);\n // \tt1 = r * InvLn2hi;\n // \tt2 = r * InvLn2lo + __builtin_fma(r, InvLn2hi, -t1);\n // #else\n // rounding error: 0x1p-55/N + 0x1p-65.\n var chi = load(LOG2_DATA_TAB2 + (i << (1 + alignof())), 0 << alignof()); // T[i].chi;\n var clo = load(LOG2_DATA_TAB2 + (i << (1 + alignof())), 1 << alignof()); // T[i].clo;\n\n var r = (z - chi - clo) * invc;\n var rhi = reinterpret(reinterpret(r) & 0xFFFFFFFF00000000);\n var rlo = r - rhi;\n var t1 = rhi * InvLn2hi;\n var t2 = rlo * InvLn2hi + r * InvLn2lo;\n // #endif\n\n // hi + lo = r/ln2 + log2(c) + k\n var t3 = kd + logc;\n var hi = t3 + t1;\n var lo = t3 - hi + t1 + t2;\n\n // log2(r+1) = r/ln2 + r^2*poly(r)\n // Evaluation is optimized assuming superscalar pipelined execution\n var r2 = r * r; // rounding error: 0x1p-54/N^2\n // Worst-case error if |y| > 0x1p-4: 0.547 ULP (0.550 ULP without fma).\n // ~ 0.5 + 2/N/ln2 + abs-poly-error*0x1p56 ULP (+ 0.003 ULP without fma).\n var p = A0 + r * A1 + r2 * (A2 + r * A3) + (r2 * r2) * (A4 + r * A5);\n return lo + r2 * p + hi;\n}\n\n//\n// Lookup data for log. See: https://git.musl-libc.org/cgit/musl/tree/src/math/log.c\n//\n\n// @ts-ignore: decorator\n@inline const LOG_TABLE_BITS = 7;\n\n/* Algorithm:\n\n x = 2^k z\n log(x) = k ln2 + log(c) + log(z/c)\n log(z/c) = poly(z/c - 1)\n\nwhere z is in [1.6p-1; 1.6p0] which is split into N subintervals and z falls\ninto the ith one, then table entries are computed as\n\n tab[i].invc = 1/c\n tab[i].logc = (double)log(c)\n tab2[i].chi = (double)c\n tab2[i].clo = (double)(c - (double)c)\n\nwhere c is near the center of the subinterval and is chosen by trying +-2^29\nfloating point invc candidates around 1/center and selecting one for which\n\n 1) the rounding error in 0x1.8p9 + logc is 0,\n 2) the rounding error in z - chi - clo is < 0x1p-66 and\n 3) the rounding error in (double)log(c) is minimized (< 0x1p-66).\n\nNote: 1) ensures that k*ln2hi + logc can be computed without rounding error,\n2) ensures that z/c - 1 can be computed as (z - chi - clo)*invc with close to\na single rounding error when there is no fast fma for z*invc - 1, 3) ensures\nthat logc + poly(z/c - 1) has small error, however near x == 1 when\n|log(x)| < 0x1p-4, this is not enough so that is special cased.*/\n\n// @ts-ignore: decorator\n@lazy @inline const LOG_DATA_TAB1 = memory.data([\n // invc , logc\n reinterpret(0x3FF734F0C3E0DE9F), reinterpret(0xBFD7CC7F79E69000),\n reinterpret(0x3FF713786A2CE91F), reinterpret(0xBFD76FEEC20D0000),\n reinterpret(0x3FF6F26008FAB5A0), reinterpret(0xBFD713E31351E000),\n reinterpret(0x3FF6D1A61F138C7D), reinterpret(0xBFD6B85B38287800),\n reinterpret(0x3FF6B1490BC5B4D1), reinterpret(0xBFD65D5590807800),\n reinterpret(0x3FF69147332F0CBA), reinterpret(0xBFD602D076180000),\n reinterpret(0x3FF6719F18224223), reinterpret(0xBFD5A8CA86909000),\n reinterpret(0x3FF6524F99A51ED9), reinterpret(0xBFD54F4356035000),\n reinterpret(0x3FF63356AA8F24C4), reinterpret(0xBFD4F637C36B4000),\n reinterpret(0x3FF614B36B9DDC14), reinterpret(0xBFD49DA7FDA85000),\n reinterpret(0x3FF5F66452C65C4C), reinterpret(0xBFD445923989A800),\n reinterpret(0x3FF5D867B5912C4F), reinterpret(0xBFD3EDF439B0B800),\n reinterpret(0x3FF5BABCCB5B90DE), reinterpret(0xBFD396CE448F7000),\n reinterpret(0x3FF59D61F2D91A78), reinterpret(0xBFD3401E17BDA000),\n reinterpret(0x3FF5805612465687), reinterpret(0xBFD2E9E2EF468000),\n reinterpret(0x3FF56397CEE76BD3), reinterpret(0xBFD2941B3830E000),\n reinterpret(0x3FF54725E2A77F93), reinterpret(0xBFD23EC58CDA8800),\n reinterpret(0x3FF52AFF42064583), reinterpret(0xBFD1E9E129279000),\n reinterpret(0x3FF50F22DBB2BDDF), reinterpret(0xBFD1956D2B48F800),\n reinterpret(0x3FF4F38F4734DED7), reinterpret(0xBFD141679AB9F800),\n reinterpret(0x3FF4D843CFDE2840), reinterpret(0xBFD0EDD094EF9800),\n reinterpret(0x3FF4BD3EC078A3C8), reinterpret(0xBFD09AA518DB1000),\n reinterpret(0x3FF4A27FC3E0258A), reinterpret(0xBFD047E65263B800),\n reinterpret(0x3FF4880524D48434), reinterpret(0xBFCFEB224586F000),\n reinterpret(0x3FF46DCE1B192D0B), reinterpret(0xBFCF474A7517B000),\n reinterpret(0x3FF453D9D3391854), reinterpret(0xBFCEA4443D103000),\n reinterpret(0x3FF43A2744B4845A), reinterpret(0xBFCE020D44E9B000),\n reinterpret(0x3FF420B54115F8FB), reinterpret(0xBFCD60A22977F000),\n reinterpret(0x3FF40782DA3EF4B1), reinterpret(0xBFCCC00104959000),\n reinterpret(0x3FF3EE8F5D57FE8F), reinterpret(0xBFCC202956891000),\n reinterpret(0x3FF3D5D9A00B4CE9), reinterpret(0xBFCB81178D811000),\n reinterpret(0x3FF3BD60C010C12B), reinterpret(0xBFCAE2C9CCD3D000),\n reinterpret(0x3FF3A5242B75DAB8), reinterpret(0xBFCA45402E129000),\n reinterpret(0x3FF38D22CD9FD002), reinterpret(0xBFC9A877681DF000),\n reinterpret(0x3FF3755BC5847A1C), reinterpret(0xBFC90C6D69483000),\n reinterpret(0x3FF35DCE49AD36E2), reinterpret(0xBFC87120A645C000),\n reinterpret(0x3FF34679984DD440), reinterpret(0xBFC7D68FB4143000),\n reinterpret(0x3FF32F5CCEFFCB24), reinterpret(0xBFC73CB83C627000),\n reinterpret(0x3FF3187775A10D49), reinterpret(0xBFC6A39A9B376000),\n reinterpret(0x3FF301C8373E3990), reinterpret(0xBFC60B3154B7A000),\n reinterpret(0x3FF2EB4EBB95F841), reinterpret(0xBFC5737D76243000),\n reinterpret(0x3FF2D50A0219A9D1), reinterpret(0xBFC4DC7B8FC23000),\n reinterpret(0x3FF2BEF9A8B7FD2A), reinterpret(0xBFC4462C51D20000),\n reinterpret(0x3FF2A91C7A0C1BAB), reinterpret(0xBFC3B08ABC830000),\n reinterpret(0x3FF293726014B530), reinterpret(0xBFC31B996B490000),\n reinterpret(0x3FF27DFA5757A1F5), reinterpret(0xBFC2875490A44000),\n reinterpret(0x3FF268B39B1D3BBF), reinterpret(0xBFC1F3B9F879A000),\n reinterpret(0x3FF2539D838FF5BD), reinterpret(0xBFC160C8252CA000),\n reinterpret(0x3FF23EB7AAC9083B), reinterpret(0xBFC0CE7F57F72000),\n reinterpret(0x3FF22A012BA940B6), reinterpret(0xBFC03CDC49FEA000),\n reinterpret(0x3FF2157996CC4132), reinterpret(0xBFBF57BDBC4B8000),\n reinterpret(0x3FF201201DD2FC9B), reinterpret(0xBFBE370896404000),\n reinterpret(0x3FF1ECF4494D480B), reinterpret(0xBFBD17983EF94000),\n reinterpret(0x3FF1D8F5528F6569), reinterpret(0xBFBBF9674ED8A000),\n reinterpret(0x3FF1C52311577E7C), reinterpret(0xBFBADC79202F6000),\n reinterpret(0x3FF1B17C74CB26E9), reinterpret(0xBFB9C0C3E7288000),\n reinterpret(0x3FF19E010C2C1AB6), reinterpret(0xBFB8A646B372C000),\n reinterpret(0x3FF18AB07BB670BD), reinterpret(0xBFB78D01B3AC0000),\n reinterpret(0x3FF1778A25EFBCB6), reinterpret(0xBFB674F145380000),\n reinterpret(0x3FF1648D354C31DA), reinterpret(0xBFB55E0E6D878000),\n reinterpret(0x3FF151B990275FDD), reinterpret(0xBFB4485CDEA1E000),\n reinterpret(0x3FF13F0EA432D24C), reinterpret(0xBFB333D94D6AA000),\n reinterpret(0x3FF12C8B7210F9DA), reinterpret(0xBFB22079F8C56000),\n reinterpret(0x3FF11A3028ECB531), reinterpret(0xBFB10E4698622000),\n reinterpret(0x3FF107FBDA8434AF), reinterpret(0xBFAFFA6C6AD20000),\n reinterpret(0x3FF0F5EE0F4E6BB3), reinterpret(0xBFADDA8D4A774000),\n reinterpret(0x3FF0E4065D2A9FCE), reinterpret(0xBFABBCECE4850000),\n reinterpret(0x3FF0D244632CA521), reinterpret(0xBFA9A1894012C000),\n reinterpret(0x3FF0C0A77CE2981A), reinterpret(0xBFA788583302C000),\n reinterpret(0x3FF0AF2F83C636D1), reinterpret(0xBFA5715E67D68000),\n reinterpret(0x3FF09DDB98A01339), reinterpret(0xBFA35C8A49658000),\n reinterpret(0x3FF08CABAF52E7DF), reinterpret(0xBFA149E364154000),\n reinterpret(0x3FF07B9F2F4E28FB), reinterpret(0xBF9E72C082EB8000),\n reinterpret(0x3FF06AB58C358F19), reinterpret(0xBF9A55F152528000),\n reinterpret(0x3FF059EEA5ECF92C), reinterpret(0xBF963D62CF818000),\n reinterpret(0x3FF04949CDD12C90), reinterpret(0xBF9228FB8CAA0000),\n reinterpret(0x3FF038C6C6F0ADA9), reinterpret(0xBF8C317B20F90000),\n reinterpret(0x3FF02865137932A9), reinterpret(0xBF8419355DAA0000),\n reinterpret(0x3FF0182427EA7348), reinterpret(0xBF781203C2EC0000),\n reinterpret(0x3FF008040614B195), reinterpret(0xBF60040979240000),\n reinterpret(0x3FEFE01FF726FA1A), reinterpret(0x3F6FEFF384900000),\n reinterpret(0x3FEFA11CC261EA74), reinterpret(0x3F87DC41353D0000),\n reinterpret(0x3FEF6310B081992E), reinterpret(0x3F93CEA3C4C28000),\n reinterpret(0x3FEF25F63CEEADCD), reinterpret(0x3F9B9FC114890000),\n reinterpret(0x3FEEE9C8039113E7), reinterpret(0x3FA1B0D8CE110000),\n reinterpret(0x3FEEAE8078CBB1AB), reinterpret(0x3FA58A5BD001C000),\n reinterpret(0x3FEE741AA29D0C9B), reinterpret(0x3FA95C8340D88000),\n reinterpret(0x3FEE3A91830A99B5), reinterpret(0x3FAD276AEF578000),\n reinterpret(0x3FEE01E009609A56), reinterpret(0x3FB07598E598C000),\n reinterpret(0x3FEDCA01E577BB98), reinterpret(0x3FB253F5E30D2000),\n reinterpret(0x3FED92F20B7C9103), reinterpret(0x3FB42EDD8B380000),\n reinterpret(0x3FED5CAC66FB5CCE), reinterpret(0x3FB606598757C000),\n reinterpret(0x3FED272CAA5EDE9D), reinterpret(0x3FB7DA76356A0000),\n reinterpret(0x3FECF26E3E6B2CCD), reinterpret(0x3FB9AB434E1C6000),\n reinterpret(0x3FECBE6DA2A77902), reinterpret(0x3FBB78C7BB0D6000),\n reinterpret(0x3FEC8B266D37086D), reinterpret(0x3FBD431332E72000),\n reinterpret(0x3FEC5894BD5D5804), reinterpret(0x3FBF0A3171DE6000),\n reinterpret(0x3FEC26B533BB9F8C), reinterpret(0x3FC067152B914000),\n reinterpret(0x3FEBF583EEECE73F), reinterpret(0x3FC147858292B000),\n reinterpret(0x3FEBC4FD75DB96C1), reinterpret(0x3FC2266ECDCA3000),\n reinterpret(0x3FEB951E0C864A28), reinterpret(0x3FC303D7A6C55000),\n reinterpret(0x3FEB65E2C5EF3E2C), reinterpret(0x3FC3DFC33C331000),\n reinterpret(0x3FEB374867C9888B), reinterpret(0x3FC4BA366B7A8000),\n reinterpret(0x3FEB094B211D304A), reinterpret(0x3FC5933928D1F000),\n reinterpret(0x3FEADBE885F2EF7E), reinterpret(0x3FC66ACD2418F000),\n reinterpret(0x3FEAAF1D31603DA2), reinterpret(0x3FC740F8EC669000),\n reinterpret(0x3FEA82E63FD358A7), reinterpret(0x3FC815C0F51AF000),\n reinterpret(0x3FEA5740EF09738B), reinterpret(0x3FC8E92954F68000),\n reinterpret(0x3FEA2C2A90AB4B27), reinterpret(0x3FC9BB3602F84000),\n reinterpret(0x3FEA01A01393F2D1), reinterpret(0x3FCA8BED1C2C0000),\n reinterpret(0x3FE9D79F24DB3C1B), reinterpret(0x3FCB5B515C01D000),\n reinterpret(0x3FE9AE2505C7B190), reinterpret(0x3FCC2967CCBCC000),\n reinterpret(0x3FE9852EF297CE2F), reinterpret(0x3FCCF635D5486000),\n reinterpret(0x3FE95CBAEEA44B75), reinterpret(0x3FCDC1BD3446C000),\n reinterpret(0x3FE934C69DE74838), reinterpret(0x3FCE8C01B8CFE000),\n reinterpret(0x3FE90D4F2F6752E6), reinterpret(0x3FCF5509C0179000),\n reinterpret(0x3FE8E6528EFFD79D), reinterpret(0x3FD00E6C121FB800),\n reinterpret(0x3FE8BFCE9FCC007C), reinterpret(0x3FD071B80E93D000),\n reinterpret(0x3FE899C0DABEC30E), reinterpret(0x3FD0D46B9E867000),\n reinterpret(0x3FE87427AA2317FB), reinterpret(0x3FD13687334BD000),\n reinterpret(0x3FE84F00ACB39A08), reinterpret(0x3FD1980D67234800),\n reinterpret(0x3FE82A49E8653E55), reinterpret(0x3FD1F8FFE0CC8000),\n reinterpret(0x3FE8060195F40260), reinterpret(0x3FD2595FD7636800),\n reinterpret(0x3FE7E22563E0A329), reinterpret(0x3FD2B9300914A800),\n reinterpret(0x3FE7BEB377DCB5AD), reinterpret(0x3FD3187210436000),\n reinterpret(0x3FE79BAA679725C2), reinterpret(0x3FD377266DEC1800),\n reinterpret(0x3FE77907F2170657), reinterpret(0x3FD3D54FFBAF3000),\n reinterpret(0x3FE756CADBD6130C), reinterpret(0x3FD432EEE32FE000)\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const LOG_DATA_TAB2 = memory.data([\n // chi , clo\n reinterpret(0x3FE61000014FB66B), reinterpret(0x3C7E026C91425B3C),\n reinterpret(0x3FE63000034DB495), reinterpret(0x3C8DBFEA48005D41),\n reinterpret(0x3FE650000D94D478), reinterpret(0x3C8E7FA786D6A5B7),\n reinterpret(0x3FE67000074E6FAD), reinterpret(0x3C61FCEA6B54254C),\n reinterpret(0x3FE68FFFFEDF0FAE), reinterpret(0xBC7C7E274C590EFD),\n reinterpret(0x3FE6B0000763C5BC), reinterpret(0xBC8AC16848DCDA01),\n reinterpret(0x3FE6D0001E5CC1F6), reinterpret(0x3C833F1C9D499311),\n reinterpret(0x3FE6EFFFEB05F63E), reinterpret(0xBC7E80041AE22D53),\n reinterpret(0x3FE710000E869780), reinterpret(0x3C7BFF6671097952),\n reinterpret(0x3FE72FFFFC67E912), reinterpret(0x3C8C00E226BD8724),\n reinterpret(0x3FE74FFFDF81116A), reinterpret(0xBC6E02916EF101D2),\n reinterpret(0x3FE770000F679C90), reinterpret(0xBC67FC71CD549C74),\n reinterpret(0x3FE78FFFFA7EC835), reinterpret(0x3C81BEC19EF50483),\n reinterpret(0x3FE7AFFFFE20C2E6), reinterpret(0xBC707E1729CC6465),\n reinterpret(0x3FE7CFFFED3FC900), reinterpret(0xBC808072087B8B1C),\n reinterpret(0x3FE7EFFFE9261A76), reinterpret(0x3C8DC0286D9DF9AE),\n reinterpret(0x3FE81000049CA3E8), reinterpret(0x3C897FD251E54C33),\n reinterpret(0x3FE8300017932C8F), reinterpret(0xBC8AFEE9B630F381),\n reinterpret(0x3FE850000633739C), reinterpret(0x3C89BFBF6B6535BC),\n reinterpret(0x3FE87000204289C6), reinterpret(0xBC8BBF65F3117B75),\n reinterpret(0x3FE88FFFEBF57904), reinterpret(0xBC89006EA23DCB57),\n reinterpret(0x3FE8B00022BC04DF), reinterpret(0xBC7D00DF38E04B0A),\n reinterpret(0x3FE8CFFFE50C1B8A), reinterpret(0xBC88007146FF9F05),\n reinterpret(0x3FE8EFFFFC918E43), reinterpret(0x3C83817BD07A7038),\n reinterpret(0x3FE910001EFA5FC7), reinterpret(0x3C893E9176DFB403),\n reinterpret(0x3FE9300013467BB9), reinterpret(0x3C7F804E4B980276),\n reinterpret(0x3FE94FFFE6EE076F), reinterpret(0xBC8F7EF0D9FF622E),\n reinterpret(0x3FE96FFFDE3C12D1), reinterpret(0xBC7082AA962638BA),\n reinterpret(0x3FE98FFFF4458A0D), reinterpret(0xBC87801B9164A8EF),\n reinterpret(0x3FE9AFFFDD982E3E), reinterpret(0xBC8740E08A5A9337),\n reinterpret(0x3FE9CFFFED49FB66), reinterpret(0x3C3FCE08C19BE000),\n reinterpret(0x3FE9F00020F19C51), reinterpret(0xBC8A3FAA27885B0A),\n reinterpret(0x3FEA10001145B006), reinterpret(0x3C74FF489958DA56),\n reinterpret(0x3FEA300007BBF6FA), reinterpret(0x3C8CBEAB8A2B6D18),\n reinterpret(0x3FEA500010971D79), reinterpret(0x3C88FECADD787930),\n reinterpret(0x3FEA70001DF52E48), reinterpret(0xBC8F41763DD8ABDB),\n reinterpret(0x3FEA90001C593352), reinterpret(0xBC8EBF0284C27612),\n reinterpret(0x3FEAB0002A4F3E4B), reinterpret(0xBC69FD043CFF3F5F),\n reinterpret(0x3FEACFFFD7AE1ED1), reinterpret(0xBC823EE7129070B4),\n reinterpret(0x3FEAEFFFEE510478), reinterpret(0x3C6A063EE00EDEA3),\n reinterpret(0x3FEB0FFFDB650D5B), reinterpret(0x3C5A06C8381F0AB9),\n reinterpret(0x3FEB2FFFFEAACA57), reinterpret(0xBC79011E74233C1D),\n reinterpret(0x3FEB4FFFD995BADC), reinterpret(0xBC79FF1068862A9F),\n reinterpret(0x3FEB7000249E659C), reinterpret(0x3C8AFF45D0864F3E),\n reinterpret(0x3FEB8FFFF9871640), reinterpret(0x3C7CFE7796C2C3F9),\n reinterpret(0x3FEBAFFFD204CB4F), reinterpret(0xBC63FF27EEF22BC4),\n reinterpret(0x3FEBCFFFD2415C45), reinterpret(0xBC6CFFB7EE3BEA21),\n reinterpret(0x3FEBEFFFF86309DF), reinterpret(0xBC814103972E0B5C),\n reinterpret(0x3FEC0FFFE1B57653), reinterpret(0x3C8BC16494B76A19),\n reinterpret(0x3FEC2FFFF1FA57E3), reinterpret(0xBC64FEEF8D30C6ED),\n reinterpret(0x3FEC4FFFDCBFE424), reinterpret(0xBC843F68BCEC4775),\n reinterpret(0x3FEC6FFFED54B9F7), reinterpret(0x3C847EA3F053E0EC),\n reinterpret(0x3FEC8FFFEB998FD5), reinterpret(0x3C7383068DF992F1),\n reinterpret(0x3FECB0002125219A), reinterpret(0xBC68FD8E64180E04),\n reinterpret(0x3FECCFFFDD94469C), reinterpret(0x3C8E7EBE1CC7EA72),\n reinterpret(0x3FECEFFFEAFDC476), reinterpret(0x3C8EBE39AD9F88FE),\n reinterpret(0x3FED1000169AF82B), reinterpret(0x3C757D91A8B95A71),\n reinterpret(0x3FED30000D0FF71D), reinterpret(0x3C89C1906970C7DA),\n reinterpret(0x3FED4FFFEA790FC4), reinterpret(0xBC580E37C558FE0C),\n reinterpret(0x3FED70002EDC87E5), reinterpret(0xBC7F80D64DC10F44),\n reinterpret(0x3FED900021DC82AA), reinterpret(0xBC747C8F94FD5C5C),\n reinterpret(0x3FEDAFFFD86B0283), reinterpret(0x3C8C7F1DC521617E),\n reinterpret(0x3FEDD000296C4739), reinterpret(0x3C88019EB2FFB153),\n reinterpret(0x3FEDEFFFE54490F5), reinterpret(0x3C6E00D2C652CC89),\n reinterpret(0x3FEE0FFFCDABF694), reinterpret(0xBC7F8340202D69D2),\n reinterpret(0x3FEE2FFFDB52C8DD), reinterpret(0x3C7B00C1CA1B0864),\n reinterpret(0x3FEE4FFFF24216EF), reinterpret(0x3C72FFA8B094AB51),\n reinterpret(0x3FEE6FFFE88A5E11), reinterpret(0xBC57F673B1EFBE59),\n reinterpret(0x3FEE9000119EFF0D), reinterpret(0xBC84808D5E0BC801),\n reinterpret(0x3FEEAFFFDFA51744), reinterpret(0x3C780006D54320B5),\n reinterpret(0x3FEED0001A127FA1), reinterpret(0xBC5002F860565C92),\n reinterpret(0x3FEEF00007BABCC4), reinterpret(0xBC8540445D35E611),\n reinterpret(0x3FEF0FFFF57A8D02), reinterpret(0xBC4FFB3139EF9105),\n reinterpret(0x3FEF30001EE58AC7), reinterpret(0x3C8A81ACF2731155),\n reinterpret(0x3FEF4FFFF5823494), reinterpret(0x3C8A3F41D4D7C743),\n reinterpret(0x3FEF6FFFFCA94C6B), reinterpret(0xBC6202F41C987875),\n reinterpret(0x3FEF8FFFE1F9C441), reinterpret(0x3C777DD1F477E74B),\n reinterpret(0x3FEFAFFFD2E0E37E), reinterpret(0xBC6F01199A7CA331),\n reinterpret(0x3FEFD0001C77E49E), reinterpret(0x3C7181EE4BCEACB1),\n reinterpret(0x3FEFEFFFF7E0C331), reinterpret(0xBC6E05370170875A),\n reinterpret(0x3FF00FFFF465606E), reinterpret(0xBC8A7EAD491C0ADA),\n reinterpret(0x3FF02FFFF3867A58), reinterpret(0xBC977F69C3FCB2E0),\n reinterpret(0x3FF04FFFFDFC0D17), reinterpret(0x3C97BFFE34CB945B),\n reinterpret(0x3FF0700003CD4D82), reinterpret(0x3C820083C0E456CB),\n reinterpret(0x3FF08FFFF9F2CBE8), reinterpret(0xBC6DFFDFBE37751A),\n reinterpret(0x3FF0B000010CDA65), reinterpret(0xBC913F7FAEE626EB),\n reinterpret(0x3FF0D00001A4D338), reinterpret(0x3C807DFA79489FF7),\n reinterpret(0x3FF0EFFFFADAFDFD), reinterpret(0xBC77040570D66BC0),\n reinterpret(0x3FF110000BBAFD96), reinterpret(0x3C8E80D4846D0B62),\n reinterpret(0x3FF12FFFFAE5F45D), reinterpret(0x3C9DBFFA64FD36EF),\n reinterpret(0x3FF150000DD59AD9), reinterpret(0x3C9A0077701250AE),\n reinterpret(0x3FF170000F21559A), reinterpret(0x3C8DFDF9E2E3DEEE),\n reinterpret(0x3FF18FFFFC275426), reinterpret(0x3C910030DC3B7273),\n reinterpret(0x3FF1B000123D3C59), reinterpret(0x3C997F7980030188),\n reinterpret(0x3FF1CFFFF8299EB7), reinterpret(0xBC65F932AB9F8C67),\n reinterpret(0x3FF1EFFFF48AD400), reinterpret(0x3C937FBF9DA75BEB),\n reinterpret(0x3FF210000C8B86A4), reinterpret(0x3C9F806B91FD5B22),\n reinterpret(0x3FF2300003854303), reinterpret(0x3C93FFC2EB9FBF33),\n reinterpret(0x3FF24FFFFFBCF684), reinterpret(0x3C7601E77E2E2E72),\n reinterpret(0x3FF26FFFF52921D9), reinterpret(0x3C7FFCBB767F0C61),\n reinterpret(0x3FF2900014933A3C), reinterpret(0xBC7202CA3C02412B),\n reinterpret(0x3FF2B00014556313), reinterpret(0xBC92808233F21F02),\n reinterpret(0x3FF2CFFFEBFE523B), reinterpret(0xBC88FF7E384FDCF2),\n reinterpret(0x3FF2F0000BB8AD96), reinterpret(0xBC85FF51503041C5),\n reinterpret(0x3FF30FFFFB7AE2AF), reinterpret(0xBC810071885E289D),\n reinterpret(0x3FF32FFFFEAC5F7F), reinterpret(0xBC91FF5D3FB7B715),\n reinterpret(0x3FF350000CA66756), reinterpret(0x3C957F82228B82BD),\n reinterpret(0x3FF3700011FBF721), reinterpret(0x3C8000BAC40DD5CC),\n reinterpret(0x3FF38FFFF9592FB9), reinterpret(0xBC943F9D2DB2A751),\n reinterpret(0x3FF3B00004DDD242), reinterpret(0x3C857F6B707638E1),\n reinterpret(0x3FF3CFFFF5B2C957), reinterpret(0x3C7A023A10BF1231),\n reinterpret(0x3FF3EFFFEAB0B418), reinterpret(0x3C987F6D66B152B0),\n reinterpret(0x3FF410001532AFF4), reinterpret(0x3C67F8375F198524),\n reinterpret(0x3FF4300017478B29), reinterpret(0x3C8301E672DC5143),\n reinterpret(0x3FF44FFFE795B463), reinterpret(0x3C89FF69B8B2895A),\n reinterpret(0x3FF46FFFE80475E0), reinterpret(0xBC95C0B19BC2F254),\n reinterpret(0x3FF48FFFEF6FC1E7), reinterpret(0x3C9B4009F23A2A72),\n reinterpret(0x3FF4AFFFE5BEA704), reinterpret(0xBC94FFB7BF0D7D45),\n reinterpret(0x3FF4D000171027DE), reinterpret(0xBC99C06471DC6A3D),\n reinterpret(0x3FF4F0000FF03EE2), reinterpret(0x3C977F890B85531C),\n reinterpret(0x3FF5100012DC4BD1), reinterpret(0x3C6004657166A436),\n reinterpret(0x3FF530001605277A), reinterpret(0xBC96BFCECE233209),\n reinterpret(0x3FF54FFFECDB704C), reinterpret(0xBC8902720505A1D7),\n reinterpret(0x3FF56FFFEF5F54A9), reinterpret(0x3C9BBFE60EC96412),\n reinterpret(0x3FF5900017E61012), reinterpret(0x3C887EC581AFEF90),\n reinterpret(0x3FF5B00003C93E92), reinterpret(0xBC9F41080ABF0CC0),\n reinterpret(0x3FF5D0001D4919BC), reinterpret(0xBC98812AFB254729),\n reinterpret(0x3FF5EFFFE7B87A89), reinterpret(0xBC947EB780ED6904)\n]);\n\n// @ts-ignore: decorator\n@inline\nexport function log_lut(x: f64): f64 {\n const N_MASK = (1 << LOG_TABLE_BITS) - 1;\n\n const\n B0 = reinterpret(0xBFE0000000000000), // -0x1p-1\n B1 = reinterpret(0x3FD5555555555577), // 0x1.5555555555577p-2\n B2 = reinterpret(0xBFCFFFFFFFFFFDCB), // -0x1.ffffffffffdcbp-3\n B3 = reinterpret(0x3FC999999995DD0C), // 0x1.999999995dd0cp-3\n B4 = reinterpret(0xBFC55555556745A7), // -0x1.55555556745a7p-3\n B5 = reinterpret(0x3FC24924A344DE30), // 0x1.24924a344de3p-3\n B6 = reinterpret(0xBFBFFFFFA4423D65), // -0x1.fffffa4423d65p-4\n B7 = reinterpret(0x3FBC7184282AD6CA), // 0x1.c7184282ad6cap-4\n B8 = reinterpret(0xBFB999EB43B068FF), // -0x1.999eb43b068ffp-4\n B9 = reinterpret(0x3FB78182F7AFD085), // 0x1.78182f7afd085p-4\n B10 = reinterpret(0xBFB5521375D145CD); // -0x1.5521375d145cdp-4\n\n const\n A0 = reinterpret(0xBFE0000000000001), // -0x1.0000000000001p-1\n A1 = reinterpret(0x3FD555555551305B), // 0x1.555555551305bp-2\n A2 = reinterpret(0xBFCFFFFFFFEB4590), // -0x1.fffffffeb459p-3\n A3 = reinterpret(0x3FC999B324F10111), // 0x1.999b324f10111p-3\n A4 = reinterpret(0xBFC55575E506C89F); // -0x1.55575e506c89fp-3\n\n const\n LO: u64 = 0x3FEE000000000000,\n HI: u64 = 0x3FF1090000000000;\n\n const\n Ln2hi = reinterpret(0x3FE62E42FEFA3800), // 0x1.62e42fefa3800p-1\n Ln2lo = reinterpret(0x3D2EF35793C76730), // 0x1.ef35793c76730p-45\n Ox1p27 = reinterpret(0x41A0000000000000), // 0x1p27\n Ox1p52 = reinterpret(0x4330000000000000); // 0x1p52\n\n var ix = reinterpret(x);\n if (ix - LO < HI - LO) {\n let r = x - 1.0;\n let r2 = r * r;\n let r3 = r2 * r;\n let y =\n r3 * (B1 + r * B2 + r2 * B3 +\n r3 * (B4 + r * B5 + r2 * B6 +\n r3 * (B7 + r * B8 + r2 * B9 + r3 * B10)));\n // Worst-case error is around 0.507 ULP\n let w = r * Ox1p27;\n let rhi = r + w - w;\n let rlo = r - rhi;\n w = rhi * rhi * B0; // B[0] == -0.5\n let hi = r + w;\n let lo = r - hi + w;\n lo += B0 * rlo * (rhi + r);\n return y + lo + hi;\n }\n var top = u32(ix >> 48);\n if (top - 0x0010 >= 0x7FF0 - 0x0010) {\n // x < 0x1p-1022 or inf or nan\n if ((ix << 1) == 0) return -1.0 / (x * x);\n if (ix == reinterpret(Infinity)) return x; // log(inf) == inf\n if ((top & 0x8000) || (top & 0x7FF0) == 0x7FF0) return (x - x) / (x - x);\n // x is subnormal, normalize it\n ix = reinterpret(x * Ox1p52);\n ix -= u64(52) << 52;\n }\n\n // x = 2^k z; where z is in range [OFF,2*OFF) and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n var tmp = ix - 0x3FE6000000000000;\n var i = ((tmp >> (52 - LOG_TABLE_BITS)) & N_MASK);\n var k = tmp >> 52;\n var iz = ix - (tmp & (u64(0xFFF) << 52));\n\n var invc = load(LOG_DATA_TAB1 + (i << (1 + alignof())), 0 << alignof()); // T[i].invc;\n var logc = load(LOG_DATA_TAB1 + (i << (1 + alignof())), 1 << alignof()); // T[i].logc;\n var z = reinterpret(iz);\n\n // log(x) = log1p(z/c-1) + log(c) + k*Ln2.\n // r ~= z/c - 1, |r| < 1/(2*N)\n // #if __FP_FAST_FMA\n // \t// rounding error: 0x1p-55/N\n // \tr = __builtin_fma(z, invc, -1.0);\n // #else\n // rounding error: 0x1p-55/N + 0x1p-66\n const chi = load(LOG_DATA_TAB2 + (i << (1 + alignof())), 0 << alignof()); // T2[i].chi\n const clo = load(LOG_DATA_TAB2 + (i << (1 + alignof())), 1 << alignof()); // T2[i].clo\n var r = (z - chi - clo) * invc;\n // #endif\n var kd = k;\n\n // hi + lo = r + log(c) + k*Ln2\n var w = kd * Ln2hi + logc;\n var hi = w + r;\n var lo = w - hi + r + kd * Ln2lo;\n\n // log(x) = lo + (log1p(r) - r) + hi\n var r2 = r * r; // rounding error: 0x1p-54/N^2\n // Worst case error if |y| > 0x1p-5:\n // 0.5 + 4.13/N + abs-poly-error*2^57 ULP (+ 0.002 ULP without fma)\n // Worst case error if |y| > 0x1p-4:\n // 0.5 + 2.06/N + abs-poly-error*2^56 ULP (+ 0.001 ULP without fma).\n return lo + r2 * A0 + r * r2 * (A1 + r * A2 + r2 * (A3 + r * A4)) + hi;\n}\n\n//\n// Lookup data for pow. See: https://git.musl-libc.org/cgit/musl/tree/src/math/pow.c\n//\n\n// @ts-ignore: decorator\n@inline const POW_LOG_TABLE_BITS = 7;\n\n/* Algorithm:\n\n x = 2^k z\n log(x) = k ln2 + log(c) + log(z/c)\n log(z/c) = poly(z/c - 1)\n\nwhere z is in [0x1.69555p-1; 0x1.69555p0] which is split into N subintervals\nand z falls into the ith one, then table entries are computed as\n\n tab[i].invc = 1/c\n tab[i].logc = round(0x1p43*log(c))/0x1p43\n tab[i].logctail = (double)(log(c) - logc)\n\nwhere c is chosen near the center of the subinterval such that 1/c has only a\nfew precision bits so z/c - 1 is exactly representible as double:\n\n 1/c = center < 1 ? round(N/center)/N : round(2*N/center)/N/2\n\nNote: |z/c - 1| < 1/N for the chosen c, |log(c) - logc - logctail| < 0x1p-97,\nthe last few bits of logc are rounded away so k*ln2hi + logc has no rounding\nerror and the interval for z is selected such that near x == 1, where log(x)\nis tiny, large cancellation error is avoided in logc + poly(z/c - 1). */\n\n// @ts-ignore: decorator\n@lazy @inline const POW_LOG_DATA_TAB = memory.data([\n // invc ,pad, logc , logctail\n reinterpret(0x3FF6A00000000000), 0, reinterpret(0xBFD62C82F2B9C800), reinterpret(0x3CFAB42428375680),\n reinterpret(0x3FF6800000000000), 0, reinterpret(0xBFD5D1BDBF580800), reinterpret(0xBD1CA508D8E0F720),\n reinterpret(0x3FF6600000000000), 0, reinterpret(0xBFD5767717455800), reinterpret(0xBD2362A4D5B6506D),\n reinterpret(0x3FF6400000000000), 0, reinterpret(0xBFD51AAD872DF800), reinterpret(0xBCE684E49EB067D5),\n reinterpret(0x3FF6200000000000), 0, reinterpret(0xBFD4BE5F95777800), reinterpret(0xBD041B6993293EE0),\n reinterpret(0x3FF6000000000000), 0, reinterpret(0xBFD4618BC21C6000), reinterpret(0x3D13D82F484C84CC),\n reinterpret(0x3FF5E00000000000), 0, reinterpret(0xBFD404308686A800), reinterpret(0x3CDC42F3ED820B3A),\n reinterpret(0x3FF5C00000000000), 0, reinterpret(0xBFD3A64C55694800), reinterpret(0x3D20B1C686519460),\n reinterpret(0x3FF5A00000000000), 0, reinterpret(0xBFD347DD9A988000), reinterpret(0x3D25594DD4C58092),\n reinterpret(0x3FF5800000000000), 0, reinterpret(0xBFD2E8E2BAE12000), reinterpret(0x3D267B1E99B72BD8),\n reinterpret(0x3FF5600000000000), 0, reinterpret(0xBFD2895A13DE8800), reinterpret(0x3D15CA14B6CFB03F),\n reinterpret(0x3FF5600000000000), 0, reinterpret(0xBFD2895A13DE8800), reinterpret(0x3D15CA14B6CFB03F),\n reinterpret(0x3FF5400000000000), 0, reinterpret(0xBFD22941FBCF7800), reinterpret(0xBD165A242853DA76),\n reinterpret(0x3FF5200000000000), 0, reinterpret(0xBFD1C898C1699800), reinterpret(0xBD1FAFBC68E75404),\n reinterpret(0x3FF5000000000000), 0, reinterpret(0xBFD1675CABABA800), reinterpret(0x3D1F1FC63382A8F0),\n reinterpret(0x3FF4E00000000000), 0, reinterpret(0xBFD1058BF9AE4800), reinterpret(0xBD26A8C4FD055A66),\n reinterpret(0x3FF4C00000000000), 0, reinterpret(0xBFD0A324E2739000), reinterpret(0xBD0C6BEE7EF4030E),\n reinterpret(0x3FF4A00000000000), 0, reinterpret(0xBFD0402594B4D000), reinterpret(0xBCF036B89EF42D7F),\n reinterpret(0x3FF4A00000000000), 0, reinterpret(0xBFD0402594B4D000), reinterpret(0xBCF036B89EF42D7F),\n reinterpret(0x3FF4800000000000), 0, reinterpret(0xBFCFB9186D5E4000), reinterpret(0x3D0D572AAB993C87),\n reinterpret(0x3FF4600000000000), 0, reinterpret(0xBFCEF0ADCBDC6000), reinterpret(0x3D2B26B79C86AF24),\n reinterpret(0x3FF4400000000000), 0, reinterpret(0xBFCE27076E2AF000), reinterpret(0xBD172F4F543FFF10),\n reinterpret(0x3FF4200000000000), 0, reinterpret(0xBFCD5C216B4FC000), reinterpret(0x3D21BA91BBCA681B),\n reinterpret(0x3FF4000000000000), 0, reinterpret(0xBFCC8FF7C79AA000), reinterpret(0x3D27794F689F8434),\n reinterpret(0x3FF4000000000000), 0, reinterpret(0xBFCC8FF7C79AA000), reinterpret(0x3D27794F689F8434),\n reinterpret(0x3FF3E00000000000), 0, reinterpret(0xBFCBC286742D9000), reinterpret(0x3D194EB0318BB78F),\n reinterpret(0x3FF3C00000000000), 0, reinterpret(0xBFCAF3C94E80C000), reinterpret(0x3CBA4E633FCD9066),\n reinterpret(0x3FF3A00000000000), 0, reinterpret(0xBFCA23BC1FE2B000), reinterpret(0xBD258C64DC46C1EA),\n reinterpret(0x3FF3A00000000000), 0, reinterpret(0xBFCA23BC1FE2B000), reinterpret(0xBD258C64DC46C1EA),\n reinterpret(0x3FF3800000000000), 0, reinterpret(0xBFC9525A9CF45000), reinterpret(0xBD2AD1D904C1D4E3),\n reinterpret(0x3FF3600000000000), 0, reinterpret(0xBFC87FA06520D000), reinterpret(0x3D2BBDBF7FDBFA09),\n reinterpret(0x3FF3400000000000), 0, reinterpret(0xBFC7AB890210E000), reinterpret(0x3D2BDB9072534A58),\n reinterpret(0x3FF3400000000000), 0, reinterpret(0xBFC7AB890210E000), reinterpret(0x3D2BDB9072534A58),\n reinterpret(0x3FF3200000000000), 0, reinterpret(0xBFC6D60FE719D000), reinterpret(0xBD10E46AA3B2E266),\n reinterpret(0x3FF3000000000000), 0, reinterpret(0xBFC5FF3070A79000), reinterpret(0xBD1E9E439F105039),\n reinterpret(0x3FF3000000000000), 0, reinterpret(0xBFC5FF3070A79000), reinterpret(0xBD1E9E439F105039),\n reinterpret(0x3FF2E00000000000), 0, reinterpret(0xBFC526E5E3A1B000), reinterpret(0xBD20DE8B90075B8F),\n reinterpret(0x3FF2C00000000000), 0, reinterpret(0xBFC44D2B6CCB8000), reinterpret(0x3D170CC16135783C),\n reinterpret(0x3FF2C00000000000), 0, reinterpret(0xBFC44D2B6CCB8000), reinterpret(0x3D170CC16135783C),\n reinterpret(0x3FF2A00000000000), 0, reinterpret(0xBFC371FC201E9000), reinterpret(0x3CF178864D27543A),\n reinterpret(0x3FF2800000000000), 0, reinterpret(0xBFC29552F81FF000), reinterpret(0xBD248D301771C408),\n reinterpret(0x3FF2600000000000), 0, reinterpret(0xBFC1B72AD52F6000), reinterpret(0xBD2E80A41811A396),\n reinterpret(0x3FF2600000000000), 0, reinterpret(0xBFC1B72AD52F6000), reinterpret(0xBD2E80A41811A396),\n reinterpret(0x3FF2400000000000), 0, reinterpret(0xBFC0D77E7CD09000), reinterpret(0x3D0A699688E85BF4),\n reinterpret(0x3FF2400000000000), 0, reinterpret(0xBFC0D77E7CD09000), reinterpret(0x3D0A699688E85BF4),\n reinterpret(0x3FF2200000000000), 0, reinterpret(0xBFBFEC9131DBE000), reinterpret(0xBD2575545CA333F2),\n reinterpret(0x3FF2000000000000), 0, reinterpret(0xBFBE27076E2B0000), reinterpret(0x3D2A342C2AF0003C),\n reinterpret(0x3FF2000000000000), 0, reinterpret(0xBFBE27076E2B0000), reinterpret(0x3D2A342C2AF0003C),\n reinterpret(0x3FF1E00000000000), 0, reinterpret(0xBFBC5E548F5BC000), reinterpret(0xBD1D0C57585FBE06),\n reinterpret(0x3FF1C00000000000), 0, reinterpret(0xBFBA926D3A4AE000), reinterpret(0x3D253935E85BAAC8),\n reinterpret(0x3FF1C00000000000), 0, reinterpret(0xBFBA926D3A4AE000), reinterpret(0x3D253935E85BAAC8),\n reinterpret(0x3FF1A00000000000), 0, reinterpret(0xBFB8C345D631A000), reinterpret(0x3D137C294D2F5668),\n reinterpret(0x3FF1A00000000000), 0, reinterpret(0xBFB8C345D631A000), reinterpret(0x3D137C294D2F5668),\n reinterpret(0x3FF1800000000000), 0, reinterpret(0xBFB6F0D28AE56000), reinterpret(0xBD269737C93373DA),\n reinterpret(0x3FF1600000000000), 0, reinterpret(0xBFB51B073F062000), reinterpret(0x3D1F025B61C65E57),\n reinterpret(0x3FF1600000000000), 0, reinterpret(0xBFB51B073F062000), reinterpret(0x3D1F025B61C65E57),\n reinterpret(0x3FF1400000000000), 0, reinterpret(0xBFB341D7961BE000), reinterpret(0x3D2C5EDACCF913DF),\n reinterpret(0x3FF1400000000000), 0, reinterpret(0xBFB341D7961BE000), reinterpret(0x3D2C5EDACCF913DF),\n reinterpret(0x3FF1200000000000), 0, reinterpret(0xBFB16536EEA38000), reinterpret(0x3D147C5E768FA309),\n reinterpret(0x3FF1000000000000), 0, reinterpret(0xBFAF0A30C0118000), reinterpret(0x3D2D599E83368E91),\n reinterpret(0x3FF1000000000000), 0, reinterpret(0xBFAF0A30C0118000), reinterpret(0x3D2D599E83368E91),\n reinterpret(0x3FF0E00000000000), 0, reinterpret(0xBFAB42DD71198000), reinterpret(0x3D1C827AE5D6704C),\n reinterpret(0x3FF0E00000000000), 0, reinterpret(0xBFAB42DD71198000), reinterpret(0x3D1C827AE5D6704C),\n reinterpret(0x3FF0C00000000000), 0, reinterpret(0xBFA77458F632C000), reinterpret(0xBD2CFC4634F2A1EE),\n reinterpret(0x3FF0C00000000000), 0, reinterpret(0xBFA77458F632C000), reinterpret(0xBD2CFC4634F2A1EE),\n reinterpret(0x3FF0A00000000000), 0, reinterpret(0xBFA39E87B9FEC000), reinterpret(0x3CF502B7F526FEAA),\n reinterpret(0x3FF0A00000000000), 0, reinterpret(0xBFA39E87B9FEC000), reinterpret(0x3CF502B7F526FEAA),\n reinterpret(0x3FF0800000000000), 0, reinterpret(0xBF9F829B0E780000), reinterpret(0xBD2980267C7E09E4),\n reinterpret(0x3FF0800000000000), 0, reinterpret(0xBF9F829B0E780000), reinterpret(0xBD2980267C7E09E4),\n reinterpret(0x3FF0600000000000), 0, reinterpret(0xBF97B91B07D58000), reinterpret(0xBD288D5493FAA639),\n reinterpret(0x3FF0400000000000), 0, reinterpret(0xBF8FC0A8B0FC0000), reinterpret(0xBCDF1E7CF6D3A69C),\n reinterpret(0x3FF0400000000000), 0, reinterpret(0xBF8FC0A8B0FC0000), reinterpret(0xBCDF1E7CF6D3A69C),\n reinterpret(0x3FF0200000000000), 0, reinterpret(0xBF7FE02A6B100000), reinterpret(0xBD19E23F0DDA40E4),\n reinterpret(0x3FF0200000000000), 0, reinterpret(0xBF7FE02A6B100000), reinterpret(0xBD19E23F0DDA40E4),\n reinterpret(0x3FF0000000000000), 0, 0, 0,\n reinterpret(0x3FF0000000000000), 0, 0, 0,\n reinterpret(0x3FEFC00000000000), 0, reinterpret(0x3F80101575890000), reinterpret(0xBD10C76B999D2BE8),\n reinterpret(0x3FEF800000000000), 0, reinterpret(0x3F90205658938000), reinterpret(0xBD23DC5B06E2F7D2),\n reinterpret(0x3FEF400000000000), 0, reinterpret(0x3F98492528C90000), reinterpret(0xBD2AA0BA325A0C34),\n reinterpret(0x3FEF000000000000), 0, reinterpret(0x3FA0415D89E74000), reinterpret(0x3D0111C05CF1D753),\n reinterpret(0x3FEEC00000000000), 0, reinterpret(0x3FA466AED42E0000), reinterpret(0xBD2C167375BDFD28),\n reinterpret(0x3FEE800000000000), 0, reinterpret(0x3FA894AA149FC000), reinterpret(0xBD197995D05A267D),\n reinterpret(0x3FEE400000000000), 0, reinterpret(0x3FACCB73CDDDC000), reinterpret(0xBD1A68F247D82807),\n reinterpret(0x3FEE200000000000), 0, reinterpret(0x3FAEEA31C006C000), reinterpret(0xBD0E113E4FC93B7B),\n reinterpret(0x3FEDE00000000000), 0, reinterpret(0x3FB1973BD1466000), reinterpret(0xBD25325D560D9E9B),\n reinterpret(0x3FEDA00000000000), 0, reinterpret(0x3FB3BDF5A7D1E000), reinterpret(0x3D2CC85EA5DB4ED7),\n reinterpret(0x3FED600000000000), 0, reinterpret(0x3FB5E95A4D97A000), reinterpret(0xBD2C69063C5D1D1E),\n reinterpret(0x3FED400000000000), 0, reinterpret(0x3FB700D30AEAC000), reinterpret(0x3CEC1E8DA99DED32),\n reinterpret(0x3FED000000000000), 0, reinterpret(0x3FB9335E5D594000), reinterpret(0x3D23115C3ABD47DA),\n reinterpret(0x3FECC00000000000), 0, reinterpret(0x3FBB6AC88DAD6000), reinterpret(0xBD1390802BF768E5),\n reinterpret(0x3FECA00000000000), 0, reinterpret(0x3FBC885801BC4000), reinterpret(0x3D2646D1C65AACD3),\n reinterpret(0x3FEC600000000000), 0, reinterpret(0x3FBEC739830A2000), reinterpret(0xBD2DC068AFE645E0),\n reinterpret(0x3FEC400000000000), 0, reinterpret(0x3FBFE89139DBE000), reinterpret(0xBD2534D64FA10AFD),\n reinterpret(0x3FEC000000000000), 0, reinterpret(0x3FC1178E8227E000), reinterpret(0x3D21EF78CE2D07F2),\n reinterpret(0x3FEBE00000000000), 0, reinterpret(0x3FC1AA2B7E23F000), reinterpret(0x3D2CA78E44389934),\n reinterpret(0x3FEBA00000000000), 0, reinterpret(0x3FC2D1610C868000), reinterpret(0x3D039D6CCB81B4A1),\n reinterpret(0x3FEB800000000000), 0, reinterpret(0x3FC365FCB0159000), reinterpret(0x3CC62FA8234B7289),\n reinterpret(0x3FEB400000000000), 0, reinterpret(0x3FC4913D8333B000), reinterpret(0x3D25837954FDB678),\n reinterpret(0x3FEB200000000000), 0, reinterpret(0x3FC527E5E4A1B000), reinterpret(0x3D2633E8E5697DC7),\n reinterpret(0x3FEAE00000000000), 0, reinterpret(0x3FC6574EBE8C1000), reinterpret(0x3D19CF8B2C3C2E78),\n reinterpret(0x3FEAC00000000000), 0, reinterpret(0x3FC6F0128B757000), reinterpret(0xBD25118DE59C21E1),\n reinterpret(0x3FEAA00000000000), 0, reinterpret(0x3FC7898D85445000), reinterpret(0xBD1C661070914305),\n reinterpret(0x3FEA600000000000), 0, reinterpret(0x3FC8BEAFEB390000), reinterpret(0xBD073D54AAE92CD1),\n reinterpret(0x3FEA400000000000), 0, reinterpret(0x3FC95A5ADCF70000), reinterpret(0x3D07F22858A0FF6F),\n reinterpret(0x3FEA000000000000), 0, reinterpret(0x3FCA93ED3C8AE000), reinterpret(0xBD28724350562169),\n reinterpret(0x3FE9E00000000000), 0, reinterpret(0x3FCB31D8575BD000), reinterpret(0xBD0C358D4EACE1AA),\n reinterpret(0x3FE9C00000000000), 0, reinterpret(0x3FCBD087383BE000), reinterpret(0xBD2D4BC4595412B6),\n reinterpret(0x3FE9A00000000000), 0, reinterpret(0x3FCC6FFBC6F01000), reinterpret(0xBCF1EC72C5962BD2),\n reinterpret(0x3FE9600000000000), 0, reinterpret(0x3FCDB13DB0D49000), reinterpret(0xBD2AFF2AF715B035),\n reinterpret(0x3FE9400000000000), 0, reinterpret(0x3FCE530EFFE71000), reinterpret(0x3CC212276041F430),\n reinterpret(0x3FE9200000000000), 0, reinterpret(0x3FCEF5ADE4DD0000), reinterpret(0xBCCA211565BB8E11),\n reinterpret(0x3FE9000000000000), 0, reinterpret(0x3FCF991C6CB3B000), reinterpret(0x3D1BCBECCA0CDF30),\n reinterpret(0x3FE8C00000000000), 0, reinterpret(0x3FD07138604D5800), reinterpret(0x3CF89CDB16ED4E91),\n reinterpret(0x3FE8A00000000000), 0, reinterpret(0x3FD0C42D67616000), reinterpret(0x3D27188B163CEAE9),\n reinterpret(0x3FE8800000000000), 0, reinterpret(0x3FD1178E8227E800), reinterpret(0xBD2C210E63A5F01C),\n reinterpret(0x3FE8600000000000), 0, reinterpret(0x3FD16B5CCBACF800), reinterpret(0x3D2B9ACDF7A51681),\n reinterpret(0x3FE8400000000000), 0, reinterpret(0x3FD1BF99635A6800), reinterpret(0x3D2CA6ED5147BDB7),\n reinterpret(0x3FE8200000000000), 0, reinterpret(0x3FD214456D0EB800), reinterpret(0x3D0A87DEBA46BAEA),\n reinterpret(0x3FE7E00000000000), 0, reinterpret(0x3FD2BEF07CDC9000), reinterpret(0x3D2A9CFA4A5004F4),\n reinterpret(0x3FE7C00000000000), 0, reinterpret(0x3FD314F1E1D36000), reinterpret(0xBD28E27AD3213CB8),\n reinterpret(0x3FE7A00000000000), 0, reinterpret(0x3FD36B6776BE1000), reinterpret(0x3D116ECDB0F177C8),\n reinterpret(0x3FE7800000000000), 0, reinterpret(0x3FD3C25277333000), reinterpret(0x3D183B54B606BD5C),\n reinterpret(0x3FE7600000000000), 0, reinterpret(0x3FD419B423D5E800), reinterpret(0x3D08E436EC90E09D),\n reinterpret(0x3FE7400000000000), 0, reinterpret(0x3FD4718DC271C800), reinterpret(0xBD2F27CE0967D675),\n reinterpret(0x3FE7200000000000), 0, reinterpret(0x3FD4C9E09E173000), reinterpret(0xBD2E20891B0AD8A4),\n reinterpret(0x3FE7000000000000), 0, reinterpret(0x3FD522AE0738A000), reinterpret(0x3D2EBE708164C759),\n reinterpret(0x3FE6E00000000000), 0, reinterpret(0x3FD57BF753C8D000), reinterpret(0x3D1FADEDEE5D40EF),\n reinterpret(0x3FE6C00000000000), 0, reinterpret(0x3FD5D5BDDF596000), reinterpret(0xBD0A0B2A08A465DC)\n]);\n\n// Returns 0 if not int, 1 if odd int, 2 if even int. The argument is\n// the bit representation of a non-zero finite floating-point value.\n// @ts-ignore: decorator\n@inline\nfunction checkint(iy: u64): i32 {\n var e = iy >> 52 & 0x7FF;\n if (e < 0x3FF ) return 0;\n if (e > 0x3FF + 52) return 2;\n e = u64(1) << (0x3FF + 52 - e);\n if (iy & (e - 1)) return 0;\n if (iy & e ) return 1;\n return 2;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction xflow(sign: u32, y: f64): f64 {\n return select(-y, y, sign) * y;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction uflow(sign: u32): f64 {\n return xflow(sign, reinterpret(0x1000000000000000)); // 0x1p-767\n}\n\n// @ts-ignore: decorator\n@inline\nfunction oflow(sign: u32): f64 {\n return xflow(sign, reinterpret(0x7000000000000000)); // 0x1p769\n}\n\n// Returns 1 if input is the bit representation of 0, infinity or nan.\n// @ts-ignore: decorator\n@inline\nfunction zeroinfnan(u: u64): bool {\n return (u << 1) - 1 >= 0xFFE0000000000000 - 1;\n}\n\n// @ts-ignore: decorator\n@lazy var log_tail: f64 = 0;\n\n// Compute y+TAIL = log(x) where the rounded result is y and TAIL has about\n// additional 15 bits precision. IX is the bit representation of x, but\n// normalized in the subnormal range using the sign bit for the exponent.\n// @ts-ignore: decorator\n@inline\nfunction log_inline(ix: u64): f64 {\n const N = 1 << POW_LOG_TABLE_BITS;\n const N_MASK = N - 1;\n\n const\n Ln2hi = reinterpret(0x3FE62E42FEFA3800),\n Ln2lo = reinterpret(0x3D2EF35793C76730);\n\n const\n A0 = reinterpret(0xBFE0000000000000),\n A1 = reinterpret(0xBFE5555555555560),\n A2 = reinterpret(0x3FE0000000000006),\n A3 = reinterpret(0x3FE999999959554E),\n A4 = reinterpret(0xBFE555555529A47A),\n A5 = reinterpret(0xBFF2495B9B4845E9),\n A6 = reinterpret(0x3FF0002B8B263FC3);\n\n // x = 2^k z; where z is in range [OFF,2*OFF) and exact.\n // The range is split into N subintervals.\n // The ith subinterval contains z and c is near its center.\n var tmp = ix - 0x3fE6955500000000;\n var i = ((tmp >> (52 - POW_LOG_TABLE_BITS)) & N_MASK);\n var k = tmp >> 52;\n var iz = ix - (tmp & u64(0xFFF) << 52);\n var z = reinterpret(iz);\n var kd = k;\n\n // log(x) = k*Ln2 + log(c) + log1p(z/c-1).\n var invc = load(POW_LOG_DATA_TAB + (i << (2 + alignof())), 0 << alignof()); // tab[i].invc\n var logc = load(POW_LOG_DATA_TAB + (i << (2 + alignof())), 2 << alignof()); // tab[i].logc\n var logctail = load(POW_LOG_DATA_TAB + (i << (2 + alignof())), 3 << alignof()); // tab[i].logctail\n\n // Note: 1/c is j/N or j/N/2 where j is an integer in [N,2N) and\n // |z/c - 1| < 1/N, so r = z/c - 1 is exactly representible.\n // Split z such that rhi, rlo and rhi*rhi are exact and |rlo| <= |r|.\n var zhi = reinterpret((iz + u64(0x80000000)) & 0xFFFFFFFF00000000);\n var zlo = z - zhi;\n var rhi = zhi * invc - 1.0;\n var rlo = zlo * invc;\n var r = rhi + rlo;\n\n // k * Ln2 + log(c) + r.\n var t1 = kd * Ln2hi + logc;\n var t2 = t1 + r;\n var lo1 = kd * Ln2lo + logctail;\n var lo2 = t1 - t2 + r;\n\n // Evaluation is optimized assuming superscalar pipelined execution.\n var ar = A0 * r; // A[0] = -0.5\n var ar2 = r * ar;\n var ar3 = r * ar2;\n // k * Ln2 + log(c) + r + A[0] * r * r.\n var arhi = A0 * rhi;\n var arhi2 = rhi * arhi;\n var hi = t2 + arhi2;\n var lo3 = rlo * (ar + arhi);\n var lo4 = t2 - hi + arhi2;\n\n // p = log1p(r) - r - A[0] * r * r.\n var p = ar3 * (A1 + r * A2 + ar2 * (A3 + r * A4 + ar2 * (A5 + r * A6)));\n var lo = lo1 + lo2 + lo3 + lo4 + p;\n var y = hi + lo;\n log_tail = hi - y + lo;\n\n return y;\n}\n\n// @ts-ignore: decorator\n@inline const SIGN_BIAS = 0x800 << EXP_TABLE_BITS;\n\n// Computes sign*exp(x+xtail) where |xtail| < 2^-8/N and |xtail| <= |x|.\n// The sign_bias argument is SIGN_BIAS or 0 and sets the sign to -1 or 1.\n// @ts-ignore: decorator\n@inline\nfunction exp_inline(x: f64, xtail: f64, sign_bias: u32): f64 {\n const N = 1 << EXP_TABLE_BITS;\n const N_MASK = N - 1;\n\n const\n InvLn2N = reinterpret(0x3FF71547652B82FE) * N, // 0x1.71547652b82fep0\n NegLn2hiN = reinterpret(0xBF762E42FEFA0000), // -0x1.62e42fefa0000p-8\n NegLn2loN = reinterpret(0xBD0CF79ABC9E3B3A), // -0x1.cf79abc9e3b3ap-47\n shift = reinterpret(0x4338000000000000); // 0x1.8p52\n\n const\n C2 = reinterpret(0x3FDFFFFFFFFFFDBD), // __exp_data.poly[0] (0x1.ffffffffffdbdp-2)\n C3 = reinterpret(0x3FC555555555543C), // __exp_data.poly[1] (0x1.555555555543cp-3)\n C4 = reinterpret(0x3FA55555CF172B91), // __exp_data.poly[2] (0x1.55555cf172b91p-5)\n C5 = reinterpret(0x3F81111167A4D017); // __exp_data.poly[3] (0x1.1111167a4d017p-7)\n\n var abstop: u32;\n var ki: u64, top: u64, sbits: u64;\n var idx: usize;\n // double_t for better performance on targets with FLT_EVAL_METHOD==2.\n var kd: f64, z: f64, r: f64, r2: f64, scale: f64, tail: f64, tmp: f64;\n\n var ux = reinterpret(x);\n abstop = (ux >> 52) & 0x7FF;\n if (abstop - 0x3C9 >= 0x03F) {\n if (abstop - 0x3C9 >= 0x80000000) {\n // Avoid spurious underflow for tiny x.\n // Note: 0 is common input.\n return select(-1.0, 1.0, sign_bias);\n }\n if (abstop >= 0x409) { // top12(1024.0)\n // Note: inf and nan are already handled.\n return ux >> 63 ? uflow(sign_bias) : oflow(sign_bias);\n }\n // Large x is special cased below.\n abstop = 0;\n }\n\n // exp(x) = 2^(k/N) * exp(r), with exp(r) in [2^(-1/2N),2^(1/2N)].\n // x = ln2/N*k + r, with int k and r in [-ln2/2N, ln2/2N].\n z = InvLn2N * x;\n\n // #if TOINT_INTRINSICS\n // kd = roundtoint(z);\n // ki = converttoint(z);\n // #elif EXP_USE_TOINT_NARROW\n // // z - kd is in [-0.5-2^-16, 0.5] in all rounding modes.\n // kd = eval_as_double(z + shift);\n // ki = asuint64(kd) >> 16;\n // kd = (double_t)(int32_t)ki;\n // #else\n // z - kd is in [-1, 1] in non-nearest rounding modes\n kd = z + shift;\n ki = reinterpret(kd);\n kd -= shift;\n // #endif\n r = x + kd * NegLn2hiN + kd * NegLn2loN;\n // The code assumes 2^-200 < |xtail| < 2^-8/N\n r += xtail;\n // 2^(k/N) ~= scale * (1 + tail)\n idx = ((ki & N_MASK) << 1);\n top = (ki + sign_bias) << (52 - EXP_TABLE_BITS);\n\n tail = reinterpret(load(EXP_DATA_TAB + (idx << alignof())));\n // This is only a valid scale when -1023*N < k < 1024*N\n sbits = load(EXP_DATA_TAB + (idx << alignof()), 1 << alignof()) + top;\n // exp(x) = 2^(k/N) * exp(r) ~= scale + scale * (tail + exp(r) - 1).\n // Evaluation is optimized assuming superscalar pipelined execution.\n r2 = r * r;\n // Without fma the worst case error is 0.25/N ulp larger.\n // Worst case error is less than 0.5+1.11/N+(abs poly error * 2^53) ulp\n tmp = tail + r + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5);\n if (abstop == 0) return specialcase(tmp, sbits, ki);\n scale = reinterpret(sbits);\n // Note: tmp == 0 or |tmp| > 2^-200 and scale > 2^-739, so there\n // is no spurious underflow here even without fma.\n return scale + scale * tmp;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function pow_lut(x: f64, y: f64): f64 {\n const Ox1p52 = reinterpret(0x4330000000000000); // 0x1p52\n\n var sign_bias: u32 = 0;\n var ix = reinterpret(x);\n var iy = reinterpret(y);\n var topx = ix >> 52;\n var topy = iy >> 52;\n\n if (topx - 0x001 >= 0x7FF - 0x001 || (topy & 0x7FF) - 0x3BE >= 0x43e - 0x3BE) {\n // Note: if |y| > 1075 * ln2 * 2^53 ~= 0x1.749p62 then pow(x,y) = inf/0\n // and if |y| < 2^-54 / 1075 ~= 0x1.e7b6p-65 then pow(x,y) = +-1.\n // Special cases: (x < 0x1p-126 or inf or nan) or\n // (|y| < 0x1p-65 or |y| >= 0x1p63 or nan).\n if (zeroinfnan(iy)) {\n if ((iy << 1) == 0) return 1.0;\n if (ix == 0x3FF0000000000000) return NaN; // original: 1.0\n if ((ix << 1) > 0xFFE0000000000000 || (iy << 1) > 0xFFE0000000000000) return x + y;\n if ((ix << 1) == 0x7FE0000000000000) return NaN; // original: 1.0\n if (((ix << 1) < 0x7FE0000000000000) == !(iy >> 63)) return 0; // |x|<1 && y==inf or |x|>1 && y==-inf.\n return y * y;\n }\n if (zeroinfnan(ix)) {\n let x2 = x * x;\n if (i32(ix >> 63) && checkint(iy) == 1) x2 = -x2;\n return iy >> 63 ? 1 / x2 : x2;\n }\n // Here x and y are non-zero finite\n if (ix >> 63) {\n // Finite x < 0\n let yint = checkint(iy);\n if (yint == 0) return (x - x) / (x - x);\n if (yint == 1) sign_bias = SIGN_BIAS;\n ix &= 0x7FFFFFFFFFFFFFFF;\n topx &= 0x7FF;\n }\n if ((topy & 0x7FF) - 0x3BE >= 0x43E - 0x3BE) {\n // Note: sign_bias == 0 here because y is not odd.\n if (ix == 0x3FF0000000000000) return 1;\n if ((topy & 0x7FF) < 0x3BE) return 1; // |y| < 2^-65, x^y ~= 1 + y*log(x).\n return (ix > 0x3FF0000000000000) == (topy < 0x800) ? Infinity : 0;\n }\n if (topx == 0) {\n // Normalize subnormal x so exponent becomes negative.\n ix = reinterpret(x * Ox1p52);\n ix &= 0x7FFFFFFFFFFFFFFF;\n ix -= u64(52) << 52;\n }\n }\n\n var hi = log_inline(ix);\n var lo = log_tail;\n var ehi: f64, elo: f64;\n // #if __FP_FAST_FMA\n // ehi = y * hi;\n // elo = y * lo + __builtin_fma(y, hi, -ehi);\n // #else\n var yhi = reinterpret(iy & 0xFFFFFFFFF8000000);\n var ylo = y - yhi;\n var lhi = reinterpret(reinterpret(hi) & 0xFFFFFFFFF8000000);\n var llo = hi - lhi + lo;\n ehi = yhi * lhi;\n elo = ylo * lhi + y * llo; // |elo| < |ehi| * 2^-25.\n // #endif\n return exp_inline(ehi, elo, sign_bias);\n}\n", - "util/memory": "export function memcpy(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memcpy.c\n var w: u32, x: u32;\n\n // copy 1 byte each until src is aligned to 4 bytes\n while (n && (src & 3)) {\n store(dest++, load(src++));\n n--;\n }\n\n // if dst is aligned to 4 bytes as well, copy 4 bytes each\n if ((dest & 3) == 0) {\n while (n >= 16) {\n store(dest , load(src ));\n store(dest + 4, load(src + 4));\n store(dest + 8, load(src + 8));\n store(dest + 12, load(src + 12));\n src += 16; dest += 16; n -= 16;\n }\n if (n & 8) {\n store(dest , load(src ));\n store(dest + 4, load(src + 4));\n dest += 8; src += 8;\n }\n if (n & 4) {\n store(dest, load(src));\n dest += 4; src += 4;\n }\n if (n & 2) { // drop to 2 bytes each\n store(dest, load(src));\n dest += 2; src += 2;\n }\n if (n & 1) { // drop to 1 byte\n store(dest++, load(src++));\n }\n return;\n }\n\n // if dst is not aligned to 4 bytes, use alternating shifts to copy 4 bytes each\n // doing shifts if faster when copying enough bytes (here: 32 or more)\n if (n >= 32) {\n switch (dest & 3) {\n // known to be != 0\n case 1: {\n w = load(src);\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n n -= 3;\n while (n >= 17) {\n x = load(src + 1);\n store(dest, w >> 24 | x << 8);\n w = load(src + 5);\n store(dest + 4, x >> 24 | w << 8);\n x = load(src + 9);\n store(dest + 8, w >> 24 | x << 8);\n w = load(src + 13);\n store(dest + 12, x >> 24 | w << 8);\n src += 16; dest += 16; n -= 16;\n }\n break;\n }\n case 2: {\n w = load(src);\n store(dest++, load(src++));\n store(dest++, load(src++));\n n -= 2;\n while (n >= 18) {\n x = load(src + 2);\n store(dest, w >> 16 | x << 16);\n w = load(src + 6);\n store(dest + 4, x >> 16 | w << 16);\n x = load(src + 10);\n store(dest + 8, w >> 16 | x << 16);\n w = load(src + 14);\n store(dest + 12, x >> 16 | w << 16);\n src += 16; dest += 16; n -= 16;\n }\n break;\n }\n case 3: {\n w = load(src);\n store(dest++, load(src++));\n n -= 1;\n while (n >= 19) {\n x = load(src + 3);\n store(dest, w >> 8 | x << 24);\n w = load(src + 7);\n store(dest + 4, x >> 8 | w << 24);\n x = load(src + 11);\n store(dest + 8, w >> 8 | x << 24);\n w = load(src + 15);\n store(dest + 12, x >> 8 | w << 24);\n src += 16; dest += 16; n -= 16;\n }\n break;\n }\n }\n }\n\n // copy remaining bytes one by one\n if (n & 16) {\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n }\n if (n & 8) {\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n }\n if (n & 4) {\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n store(dest++, load(src++));\n }\n if (n & 2) {\n store(dest++, load(src++));\n store(dest++, load(src++));\n }\n if (n & 1) {\n store(dest++, load(src++));\n }\n}\n\n// @ts-ignore: decorator\n@inline\nexport function memmove(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memmove.c\n if (dest === src) return;\n if (ASC_SHRINK_LEVEL < 1) {\n if (src - dest - n <= -(n << 1)) {\n memcpy(dest, src, n);\n return;\n }\n }\n if (dest < src) {\n if (ASC_SHRINK_LEVEL < 2) {\n if ((src & 7) == (dest & 7)) {\n while (dest & 7) {\n if (!n) return;\n --n;\n store(dest++, load(src++));\n }\n while (n >= 8) {\n store(dest, load(src));\n n -= 8;\n dest += 8;\n src += 8;\n }\n }\n }\n while (n) {\n store(dest++, load(src++));\n --n;\n }\n } else {\n if (ASC_SHRINK_LEVEL < 2) {\n if ((src & 7) == (dest & 7)) {\n while ((dest + n) & 7) {\n if (!n) return;\n store(dest + --n, load(src + n));\n }\n while (n >= 8) {\n n -= 8;\n store(dest + n, load(src + n));\n }\n }\n }\n while (n) {\n store(dest + --n, load(src + n));\n }\n }\n}\n\n// @ts-ignore: decorator\n@inline\nexport function memset(dest: usize, c: u8, n: usize): void { // see: musl/src/string/memset\n if (ASC_SHRINK_LEVEL > 1) {\n while (n) {\n store(dest++, c);\n --n;\n }\n } else {\n // fill head and tail with minimal branching\n if (!n) return;\n let dend = dest + n;\n store(dest, c);\n store(dend - 1, c);\n if (n <= 2) return;\n store(dest, c, 1);\n store(dest, c, 2);\n store(dend - 2, c);\n store(dend - 3, c);\n if (n <= 6) return;\n store(dest, c, 3);\n store(dend - 4, c);\n if (n <= 8) return;\n\n // advance pointer to align it at 4-byte boundary\n let k: usize = -dest & 3;\n dest += k;\n n -= k;\n n &= -4;\n\n let c32: u32 = -1 / 255 * c;\n\n // fill head/tail up to 28 bytes each in preparation\n dend = dest + n;\n store(dest, c32);\n store(dend - 4, c32);\n if (n <= 8) return;\n store(dest, c32, 4);\n store(dest, c32, 8);\n store(dend - 12, c32);\n store(dend - 8, c32);\n if (n <= 24) return;\n store(dest, c32, 12);\n store(dest, c32, 16);\n store(dest, c32, 20);\n store(dest, c32, 24);\n store(dend - 28, c32);\n store(dend - 24, c32);\n store(dend - 20, c32);\n store(dend - 16, c32);\n\n // align to a multiple of 8\n k = 24 + (dest & 4);\n dest += k;\n n -= k;\n\n // copy 32 bytes each\n let c64: u64 = c32 | (c32 << 32);\n while (n >= 32) {\n store(dest, c64);\n store(dest, c64, 8);\n store(dest, c64, 16);\n store(dest, c64, 24);\n n -= 32;\n dest += 32;\n }\n }\n}\n\n// @ts-ignore: decorator\n@inline\nexport function memcmp(vl: usize, vr: usize, n: usize): i32 {\n if (vl == vr) return 0;\n if (ASC_SHRINK_LEVEL < 2) {\n if ((vl & 7) == (vr & 7)) {\n while (vl & 7) {\n if (!n) return 0;\n let a = load(vl);\n let b = load(vr);\n if (a != b) return a - b;\n n--; vl++; vr++;\n }\n while (n >= 8) {\n if (load(vl) != load(vr)) break;\n vl += 8;\n vr += 8;\n n -= 8;\n }\n }\n }\n while (n--) {\n let a = load(vl);\n let b = load(vr);\n if (a != b) return a - b;\n vl++; vr++;\n }\n return 0;\n}\n", - "util/number": "/// \n\nimport { idof } from \"../builtins\";\nimport { CharCode } from \"./string\";\n\n// @ts-ignore: decorator\n@inline\nexport const MAX_DOUBLE_LENGTH = 28;\n\n// @ts-ignore: decorator\n@lazy @inline const POWERS10 = memory.data([\n 1,\n 10,\n 100,\n 1000,\n 10000,\n 100000,\n 1000000,\n 10000000,\n 100000000,\n 1000000000\n]);\n\n/*\n Lookup table for pairwise char codes in range [0-99]\n\n \"00\", \"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\",\n \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\",\n \"20\", \"21\", \"22\", \"23\", \"24\", \"25\", \"26\", \"27\", \"28\", \"29\",\n \"30\", \"31\", \"32\", \"33\", \"34\", \"35\", \"36\", \"37\", \"38\", \"39\",\n \"40\", \"41\", \"42\", \"43\", \"44\", \"45\", \"46\", \"47\", \"48\", \"49\",\n \"50\", \"51\", \"52\", \"53\", \"54\", \"55\", \"56\", \"57\", \"58\", \"59\",\n \"60\", \"61\", \"62\", \"63\", \"64\", \"65\", \"66\", \"67\", \"68\", \"69\",\n \"70\", \"71\", \"72\", \"73\", \"74\", \"75\", \"76\", \"77\", \"78\", \"79\",\n \"80\", \"81\", \"82\", \"83\", \"84\", \"85\", \"86\", \"87\", \"88\", \"89\",\n \"90\", \"91\", \"92\", \"93\", \"94\", \"95\", \"96\", \"97\", \"98\", \"99\"\n*/\n// @ts-ignore: decorator\n@lazy @inline const DIGITS = memory.data([\n 0x00300030, 0x00310030, 0x00320030, 0x00330030, 0x00340030,\n 0x00350030, 0x00360030, 0x00370030, 0x00380030, 0x00390030,\n 0x00300031, 0x00310031, 0x00320031, 0x00330031, 0x00340031,\n 0x00350031, 0x00360031, 0x00370031, 0x00380031, 0x00390031,\n 0x00300032, 0x00310032, 0x00320032, 0x00330032, 0x00340032,\n 0x00350032, 0x00360032, 0x00370032, 0x00380032, 0x00390032,\n 0x00300033, 0x00310033, 0x00320033, 0x00330033, 0x00340033,\n 0x00350033, 0x00360033, 0x00370033, 0x00380033, 0x00390033,\n 0x00300034, 0x00310034, 0x00320034, 0x00330034, 0x00340034,\n 0x00350034, 0x00360034, 0x00370034, 0x00380034, 0x00390034,\n 0x00300035, 0x00310035, 0x00320035, 0x00330035, 0x00340035,\n 0x00350035, 0x00360035, 0x00370035, 0x00380035, 0x00390035,\n 0x00300036, 0x00310036, 0x00320036, 0x00330036, 0x00340036,\n 0x00350036, 0x00360036, 0x00370036, 0x00380036, 0x00390036,\n 0x00300037, 0x00310037, 0x00320037, 0x00330037, 0x00340037,\n 0x00350037, 0x00360037, 0x00370037, 0x00380037, 0x00390037,\n 0x00300038, 0x00310038, 0x00320038, 0x00330038, 0x00340038,\n 0x00350038, 0x00360038, 0x00370038, 0x00380038, 0x00390038,\n 0x00300039, 0x00310039, 0x00320039, 0x00330039, 0x00340039,\n 0x00350039, 0x00360039, 0x00370039, 0x00380039, 0x00390039\n]);\n\n// Lookup table for pairwise char codes in range [0x00-0xFF]\n// @ts-ignore: decorator\n@lazy @inline const HEX_DIGITS =\n\"000102030405060708090a0b0c0d0e0f\\\n101112131415161718191a1b1c1d1e1f\\\n202122232425262728292a2b2c2d2e2f\\\n303132333435363738393a3b3c3d3e3f\\\n404142434445464748494a4b4c4d4e4f\\\n505152535455565758595a5b5c5d5e5f\\\n606162636465666768696a6b6c6d6e6f\\\n707172737475767778797a7b7c7d7e7f\\\n808182838485868788898a8b8c8d8e8f\\\n909192939495969798999a9b9c9d9e9f\\\na0a1a2a3a4a5a6a7a8a9aaabacadaeaf\\\nb0b1b2b3b4b5b6b7b8b9babbbcbdbebf\\\nc0c1c2c3c4c5c6c7c8c9cacbcccdcecf\\\nd0d1d2d3d4d5d6d7d8d9dadbdcdddedf\\\ne0e1e2e3e4e5e6e7e8e9eaebecedeeef\\\nf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff\";\n\n// @ts-ignore: decorator\n@lazy @inline const ANY_DIGITS = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\n// @ts-ignore: decorator\n@lazy @inline const EXP_POWERS = memory.data([/* eslint-disable indent */\n -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980,\n -954, -927, -901, -874, -847, -821, -794, -768, -741, -715,\n -688, -661, -635, -608, -582, -555, -529, -502, -475, -449,\n -422, -396, -369, -343, -316, -289, -263, -236, -210, -183,\n -157, -130, -103, -77, -50, -24, 3, 30, 56, 83,\n 109, 136, 162, 189, 216, 242, 269, 295, 322, 348,\n 375, 402, 428, 455, 481, 508, 534, 561, 588, 614,\n 641, 667, 694, 720, 747, 774, 800, 827, 853, 880,\n 907, 933, 960, 986, 1013, 1039, 1066\n/* eslint-enable indent */]);\n\n// 1e-348, 1e-340, ..., 1e340\n// @ts-ignore: decorator\n@lazy @inline const FRC_POWERS = memory.data([\n 0xFA8FD5A0081C0288, 0xBAAEE17FA23EBF76, 0x8B16FB203055AC76, 0xCF42894A5DCE35EA,\n 0x9A6BB0AA55653B2D, 0xE61ACF033D1A45DF, 0xAB70FE17C79AC6CA, 0xFF77B1FCBEBCDC4F,\n 0xBE5691EF416BD60C, 0x8DD01FAD907FFC3C, 0xD3515C2831559A83, 0x9D71AC8FADA6C9B5,\n 0xEA9C227723EE8BCB, 0xAECC49914078536D, 0x823C12795DB6CE57, 0xC21094364DFB5637,\n 0x9096EA6F3848984F, 0xD77485CB25823AC7, 0xA086CFCD97BF97F4, 0xEF340A98172AACE5,\n 0xB23867FB2A35B28E, 0x84C8D4DFD2C63F3B, 0xC5DD44271AD3CDBA, 0x936B9FCEBB25C996,\n 0xDBAC6C247D62A584, 0xA3AB66580D5FDAF6, 0xF3E2F893DEC3F126, 0xB5B5ADA8AAFF80B8,\n 0x87625F056C7C4A8B, 0xC9BCFF6034C13053, 0x964E858C91BA2655, 0xDFF9772470297EBD,\n 0xA6DFBD9FB8E5B88F, 0xF8A95FCF88747D94, 0xB94470938FA89BCF, 0x8A08F0F8BF0F156B,\n 0xCDB02555653131B6, 0x993FE2C6D07B7FAC, 0xE45C10C42A2B3B06, 0xAA242499697392D3,\n 0xFD87B5F28300CA0E, 0xBCE5086492111AEB, 0x8CBCCC096F5088CC, 0xD1B71758E219652C,\n 0x9C40000000000000, 0xE8D4A51000000000, 0xAD78EBC5AC620000, 0x813F3978F8940984,\n 0xC097CE7BC90715B3, 0x8F7E32CE7BEA5C70, 0xD5D238A4ABE98068, 0x9F4F2726179A2245,\n 0xED63A231D4C4FB27, 0xB0DE65388CC8ADA8, 0x83C7088E1AAB65DB, 0xC45D1DF942711D9A,\n 0x924D692CA61BE758, 0xDA01EE641A708DEA, 0xA26DA3999AEF774A, 0xF209787BB47D6B85,\n 0xB454E4A179DD1877, 0x865B86925B9BC5C2, 0xC83553C5C8965D3D, 0x952AB45CFA97A0B3,\n 0xDE469FBD99A05FE3, 0xA59BC234DB398C25, 0xF6C69A72A3989F5C, 0xB7DCBF5354E9BECE,\n 0x88FCF317F22241E2, 0xCC20CE9BD35C78A5, 0x98165AF37B2153DF, 0xE2A0B5DC971F303A,\n 0xA8D9D1535CE3B396, 0xFB9B7CD9A4A7443C, 0xBB764C4CA7A44410, 0x8BAB8EEFB6409C1A,\n 0xD01FEF10A657842C, 0x9B10A4E5E9913129, 0xE7109BFBA19C0C9D, 0xAC2820D9623BF429,\n 0x80444B5E7AA7CF85, 0xBF21E44003ACDD2D, 0x8E679C2F5E44FF8F, 0xD433179D9C8CB841,\n 0x9E19DB92B4E31BA9, 0xEB96BF6EBADF77D9, 0xAF87023B9BF0EE6B\n]);\n\n// @ts-ignore: decorator\n@inline\nexport function isPowerOf2(value: T): bool {\n return popcnt(value) == 1;\n}\n\n// Count number of decimals for u32 values\n// In our case input value always non-zero so we can simplify some parts\nexport function decimalCount32(value: u32): u32 {\n if (value < 100000) {\n if (value < 100) {\n return 1 + u32(value >= 10);\n } else {\n return 3 + u32(value >= 10000) + u32(value >= 1000);\n }\n } else {\n if (value < 10000000) {\n return 6 + u32(value >= 1000000);\n } else {\n return 8 + u32(value >= 1000000000) + u32(value >= 100000000);\n }\n }\n}\n\n// Count number of decimals for u64 values\n// In our case input value always greater than 2^32-1 so we can skip some parts\nexport function decimalCount64High(value: u64): u32 {\n if (value < 1000000000000000) {\n if (value < 1000000000000) {\n return 10 + u32(value >= 100000000000) + u32(value >= 10000000000);\n } else {\n return 13 + u32(value >= 100000000000000) + u32(value >= 10000000000000);\n }\n } else {\n if (value < 100000000000000000) {\n return 16 + u32(value >= 10000000000000000);\n } else {\n return 18 + u32(value >= 10000000000000000000) + u32(value >= 1000000000000000000);\n }\n }\n}\n\nfunction ulog_base(num: u64, base: i32): u32 {\n if (isPowerOf2(base)) {\n return (63 - clz(num)) / (31 - clz(base)) + 1;\n }\n var b64 = u64(base), b = b64, e: u32 = 1;\n while (num >= b) {\n num /= b;\n b *= b;\n e <<= 1;\n }\n while (num >= 1) {\n num /= b64;\n e++;\n }\n return e - 1;\n}\n\nfunction utoa32_dec_lut(buffer: usize, num: u32, offset: usize): void {\n while (num >= 10000) {\n // in most VMs i32/u32 div and modulo by constant can be shared and simplificate\n let t = num / 10000;\n let r = num % 10000;\n num = t;\n\n let d1 = r / 100;\n let d2 = r % 100;\n\n let digits1 = load(DIGITS + (d1 << alignof()));\n let digits2 = load(DIGITS + (d2 << alignof()));\n\n offset -= 4;\n store(buffer + (offset << 1), digits1 | (digits2 << 32));\n }\n\n if (num >= 100) {\n let t = num / 100;\n let d1 = num % 100;\n num = t;\n offset -= 2;\n let digits = load(DIGITS + (d1 << alignof()));\n store(buffer + (offset << 1), digits);\n }\n\n if (num >= 10) {\n offset -= 2;\n let digits = load(DIGITS + (num << alignof()));\n store(buffer + (offset << 1), digits);\n } else {\n offset -= 1;\n let digit = CharCode._0 + num;\n store(buffer + (offset << 1), digit);\n }\n}\n\nfunction utoa64_dec_lut(buffer: usize, num: u64, offset: usize): void {\n while (num >= 100000000) {\n let t = num / 100000000;\n let r = (num - t * 100000000);\n num = t;\n\n let b = r / 10000;\n let c = r % 10000;\n\n let b1 = b / 100;\n let b2 = b % 100;\n let c1 = c / 100;\n let c2 = c % 100;\n\n let digits1 = load(DIGITS + (c1 << alignof()));\n let digits2 = load(DIGITS + (c2 << alignof()));\n\n offset -= 4;\n store(buffer + (offset << 1), digits1 | (digits2 << 32));\n\n digits1 = load(DIGITS + (b1 << alignof()));\n digits2 = load(DIGITS + (b2 << alignof()));\n\n offset -= 4;\n store(buffer + (offset << 1), digits1 | (digits2 << 32));\n }\n\n utoa32_dec_lut(buffer, num, offset);\n}\n\nfunction utoa_hex_lut(buffer: usize, num: u64, offset: usize): void {\n const lut = changetype(HEX_DIGITS);\n while (offset >= 2) {\n offset -= 2;\n store(\n buffer + (offset << 1),\n load(lut + ((num & 0xFF) << alignof()))\n );\n num >>= 8;\n }\n if (offset & 1) {\n store(buffer, load(lut + (num << 6)));\n }\n}\n\nfunction utoa_dec_simple(buffer: usize, num: T, offset: usize): void {\n do {\n let t = num / 10;\n let r = (num % 10);\n num = changetype(t);\n offset--;\n store(buffer + (offset << 1), CharCode._0 + r);\n } while (num);\n}\n\nfunction utoa_hex_simple(buffer: usize, num: T, offset: usize): void {\n do {\n let d = num & 0x0F | CharCode._0;\n d += select(0x27, 0, d > CharCode._9);\n offset--;\n store(buffer + (offset << 1), d);\n // @ts-ignore: type\n num >>= 4;\n } while (num);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function utoa32_dec_core(buffer: usize, num: u32, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_dec_simple(buffer, num, offset);\n } else {\n utoa32_dec_lut(buffer, num, offset);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction utoa32_hex_core(buffer: usize, num: u32, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_hex_simple(buffer, num, offset);\n } else {\n utoa_hex_lut(buffer, num, offset);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction utoa64_dec_core(buffer: usize, num: u64, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_dec_simple(buffer, num, offset);\n } else {\n utoa64_dec_lut(buffer, num, offset);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction utoa64_hex_core(buffer: usize, num: u64, offset: usize): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n utoa_hex_simple(buffer, num, offset);\n } else {\n utoa_hex_lut(buffer, num, offset);\n }\n}\n\nfunction utoa64_any_core(buffer: usize, num: u64, offset: usize, radix: i32): void {\n const lut = changetype(ANY_DIGITS);\n var base = u64(radix);\n if ((radix & (radix - 1)) == 0) { // for radix which pow of two\n let shift = u64(ctz(radix) & 7);\n let mask = base - 1;\n do {\n offset--;\n store(buffer + (offset << 1), load(lut + (usize(num & mask) << 1)));\n num >>= shift;\n } while (num);\n } else {\n do {\n offset--;\n let q = num / base;\n store(buffer + (offset << 1), load(lut + (usize(num - q * base) << 1)));\n num = q;\n } while (num);\n }\n}\n\nexport function utoa32(value: u32, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n var out: String;\n\n if (radix == 10) {\n let decimals = decimalCount32(value);\n out = changetype(__new(decimals << 1, idof()));\n utoa32_dec_core(changetype(out), value, decimals);\n } else if (radix == 16) {\n let decimals = (31 - clz(value) >> 2) + 1;\n out = changetype(__new(decimals << 1, idof()));\n utoa32_hex_core(changetype(out), value, decimals);\n } else {\n let decimals = ulog_base(value, radix);\n out = changetype(__new(decimals << 1, idof()));\n utoa64_any_core(changetype(out), value, decimals, radix);\n }\n return out;\n}\n\nexport function itoa32(value: i32, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n\n var sign = value >>> 31;\n if (sign) value = -value;\n var out: String;\n\n if (radix == 10) {\n let decimals = decimalCount32(value) + sign;\n out = changetype(__new(decimals << 1, idof()));\n utoa32_dec_core(changetype(out), value, decimals);\n } else if (radix == 16) {\n let decimals = (31 - clz(value) >> 2) + 1 + sign;\n out = changetype(__new(decimals << 1, idof()));\n utoa32_hex_core(changetype(out), value, decimals);\n } else {\n let val32 = u32(value);\n let decimals = ulog_base(val32, radix) + sign;\n out = changetype(__new(decimals << 1, idof()));\n utoa64_any_core(changetype(out), val32, decimals, radix);\n }\n if (sign) store(changetype(out), CharCode.MINUS);\n return out;\n}\n\nexport function utoa64(value: u64, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n var out: String;\n\n if (radix == 10) {\n if (value <= u32.MAX_VALUE) {\n let val32 = value;\n let decimals = decimalCount32(val32);\n out = changetype(__new(decimals << 1, idof()));\n utoa32_dec_core(changetype(out), val32, decimals);\n } else {\n let decimals = decimalCount64High(value);\n out = changetype(__new(decimals << 1, idof()));\n utoa64_dec_core(changetype(out), value, decimals);\n }\n } else if (radix == 16) {\n let decimals = (63 - u32(clz(value)) >> 2) + 1;\n out = changetype(__new(decimals << 1, idof()));\n utoa64_hex_core(changetype(out), value, decimals);\n } else {\n let decimals = ulog_base(value, radix);\n out = changetype(__new(decimals << 1, idof()));\n utoa64_any_core(changetype(out), value, decimals, radix);\n }\n return out;\n}\n\nexport function itoa64(value: i64, radix: i32): String {\n if (radix < 2 || radix > 36) {\n throw new RangeError(\"toString() radix argument must be between 2 and 36\");\n }\n if (!value) return \"0\";\n\n var sign = u32(value >>> 63);\n if (sign) value = -value;\n var out: String;\n\n if (radix == 10) {\n if (value <= u32.MAX_VALUE) {\n let val32 = value;\n let decimals = decimalCount32(val32) + sign;\n out = changetype(__new(decimals << 1, idof()));\n utoa32_dec_core(changetype(out), val32, decimals);\n } else {\n let decimals = decimalCount64High(value) + sign;\n out = changetype(__new(decimals << 1, idof()));\n utoa64_dec_core(changetype(out), value, decimals);\n }\n } else if (radix == 16) {\n let decimals = (63 - u32(clz(value)) >> 2) + 1 + sign;\n out = changetype(__new(decimals << 1, idof()));\n utoa64_hex_core(changetype(out), value, decimals);\n } else {\n let decimals = ulog_base(value, radix) + sign;\n out = changetype(__new(decimals << 1, idof()));\n utoa64_any_core(changetype(out), value, decimals, radix);\n }\n if (sign) store(changetype(out), CharCode.MINUS);\n return out;\n}\n\n// @ts-ignore: decorator\n@lazy var _K: i32 = 0;\n\n// // @ts-ignore: decorator\n// @lazy\n// var _frc: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy var _exp: i32 = 0;\n\n// @ts-ignore: decorator\n@lazy var _frc_minus: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy var _frc_plus: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy var _frc_pow: u64 = 0;\n\n// @ts-ignore: decorator\n@lazy var _exp_pow: i32 = 0;\n\n// @ts-ignore: decorator\n@inline\nfunction umul64f(u: u64, v: u64): u64 {\n var u0 = u & 0xFFFFFFFF;\n var v0 = v & 0xFFFFFFFF;\n\n var u1 = u >> 32;\n var v1 = v >> 32;\n\n var l = u0 * v0;\n var t = u1 * v0 + (l >> 32);\n var w = u0 * v1 + (t & 0xFFFFFFFF);\n\n w += 0x7FFFFFFF; // rounding\n\n t >>= 32;\n w >>= 32;\n\n return u1 * v1 + t + w;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction umul64e(e1: i32, e2: i32): i32 {\n return e1 + e2 + 64; // where 64 is significand size\n}\n\n// @ts-ignore: decorator\n@inline\nfunction normalizedBoundaries(f: u64, e: i32): void {\n var frc = (f << 1) + 1;\n var exp = e - 1;\n var off = clz(frc);\n frc <<= off;\n exp -= off;\n\n var m = 1 + i32(f == 0x0010000000000000);\n\n _frc_plus = frc;\n _frc_minus = ((f << m) - 1) << e - m - exp;\n _exp = exp;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction grisuRound(buffer: usize, len: i32, delta: u64, rest: u64, ten_kappa: u64, wp_w: u64): void {\n var lastp = buffer + ((len - 1) << 1);\n var digit = load(lastp);\n while (\n rest < wp_w &&\n delta - rest >= ten_kappa && (\n rest + ten_kappa < wp_w ||\n wp_w - rest > rest + ten_kappa - wp_w\n )\n ) {\n --digit;\n rest += ten_kappa;\n }\n store(lastp, digit);\n}\n\n// @ts-ignore: decorator\n@inline\nfunction getCachedPower(minExp: i32): void {\n const c = reinterpret(0x3FD34413509F79FE); // 1 / lg(10) = 0.30102999566398114\n var dk = (-61 - minExp) * c + 347;\t // dk must be positive, so can do ceiling in positive\n var k = dk;\n k += i32(k != dk); // conversion with ceil\n\n var index = (k >> 3) + 1;\n _K = 348 - (index << 3);\t// decimal exponent no need lookup table\n _frc_pow = load(FRC_POWERS + (index << alignof()));\n _exp_pow = load(EXP_POWERS + (index << alignof()));\n}\n\n// @ts-ignore: decorator\n@inline\nfunction grisu2(value: f64, buffer: usize, sign: i32): i32 {\n\n // frexp routine\n var uv = reinterpret(value);\n var exp = i32((uv & 0x7FF0000000000000) >>> 52);\n var sid = uv & 0x000FFFFFFFFFFFFF;\n var frc = (u64(exp != 0) << 52) + sid;\n exp = select(exp, 1, exp) - (0x3FF + 52);\n\n normalizedBoundaries(frc, exp);\n getCachedPower(_exp);\n\n // normalize\n var off = clz(frc);\n frc <<= off;\n exp -= off;\n\n var frc_pow = _frc_pow;\n var exp_pow = _exp_pow;\n\n var w_frc = umul64f(frc, frc_pow);\n var w_exp = umul64e(exp, exp_pow);\n\n var wp_frc = umul64f(_frc_plus, frc_pow) - 1;\n var wp_exp = umul64e(_exp, exp_pow);\n\n var wm_frc = umul64f(_frc_minus, frc_pow) + 1;\n var delta = wp_frc - wm_frc;\n\n return genDigits(buffer, w_frc, w_exp, wp_frc, wp_exp, delta, sign);\n}\n\nfunction genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i32, delta: u64, sign: i32): i32 {\n var one_exp = -mp_exp;\n var one_frc = (1) << one_exp;\n var mask = one_frc - 1;\n\n var wp_w_frc = mp_frc - w_frc;\n\n var p1 = u32(mp_frc >> one_exp);\n var p2 = mp_frc & mask;\n\n var kappa = decimalCount32(p1);\n var len = sign;\n\n while (kappa > 0) {\n let d: u32;\n switch (kappa) {\n case 10: { d = p1 / 1000000000; p1 %= 1000000000; break; }\n case 9: { d = p1 / 100000000; p1 %= 100000000; break; }\n case 8: { d = p1 / 10000000; p1 %= 10000000; break; }\n case 7: { d = p1 / 1000000; p1 %= 1000000; break; }\n case 6: { d = p1 / 100000; p1 %= 100000; break; }\n case 5: { d = p1 / 10000; p1 %= 10000; break; }\n case 4: { d = p1 / 1000; p1 %= 1000; break; }\n case 3: { d = p1 / 100; p1 %= 100; break; }\n case 2: { d = p1 / 10; p1 %= 10; break; }\n case 1: { d = p1; p1 = 0; break; }\n default: { d = 0; break; }\n }\n\n if (d | len) store(buffer + (len++ << 1), CharCode._0 + d);\n\n --kappa;\n let tmp = ((p1) << one_exp) + p2;\n if (tmp <= delta) {\n _K += kappa;\n grisuRound(buffer, len, delta, tmp, load(POWERS10 + (kappa << alignof())) << one_exp, wp_w_frc);\n return len;\n }\n }\n\n while (true) {\n p2 *= 10;\n delta *= 10;\n\n let d = p2 >> one_exp;\n if (d | len) store(buffer + (len++ << 1), CharCode._0 + d);\n\n p2 &= mask;\n --kappa;\n if (p2 < delta) {\n _K += kappa;\n wp_w_frc *= load(POWERS10 + (-kappa << alignof()));\n grisuRound(buffer, len, delta, p2, one_frc, wp_w_frc);\n return len;\n }\n }\n}\n\n// @ts-ignore: decorator\n@inline\nfunction genExponent(buffer: usize, k: i32): i32 {\n var sign = k < 0;\n if (sign) k = -k;\n var decimals = decimalCount32(k) + 1;\n utoa32_dec_core(buffer, k, decimals);\n store(buffer, select(CharCode.MINUS, CharCode.PLUS, sign));\n return decimals;\n}\n\nfunction prettify(buffer: usize, length: i32, k: i32): i32 {\n if (!k) {\n store(buffer + (length << 1), CharCode.DOT | (CharCode._0 << 16));\n return length + 2;\n }\n\n var kk = length + k;\n if (length <= kk && kk <= 21) {\n // 1234e7 -> 12340000000\n for (let i = length; i < kk; ++i) {\n store(buffer + (i << 1), CharCode._0);\n }\n store(buffer + (kk << 1), CharCode.DOT | (CharCode._0 << 16));\n return kk + 2;\n } else if (kk > 0 && kk <= 21) {\n // 1234e-2 -> 12.34\n let ptr = buffer + (kk << 1);\n memory.copy(\n ptr + 2,\n ptr,\n -k << 1\n );\n store(buffer + (kk << 1), CharCode.DOT);\n return length + 1;\n } else if (-6 < kk && kk <= 0) {\n // 1234e-6 -> 0.001234\n let offset = 2 - kk;\n memory.copy(\n buffer + (offset << 1),\n buffer,\n length << 1\n );\n store(buffer, CharCode._0 | (CharCode.DOT << 16));\n for (let i = 2; i < offset; ++i) {\n store(buffer + (i << 1), CharCode._0);\n }\n return length + offset;\n } else if (length == 1) {\n // 1e30\n store(buffer, CharCode.e, 2);\n length = genExponent(buffer + 4, kk - 1);\n return length + 2;\n } else {\n let len = length << 1;\n memory.copy(\n buffer + 4,\n buffer + 2,\n len - 2\n );\n store(buffer, CharCode.DOT, 2);\n store(buffer + len, CharCode.e, 2);\n length += genExponent(buffer + len + 4, kk - 1);\n return length + 2;\n }\n}\n\nfunction dtoa_core(buffer: usize, value: f64): i32 {\n var sign = i32(value < 0);\n if (sign) {\n value = -value;\n store(buffer, CharCode.MINUS);\n }\n // assert(value > 0 && value <= 1.7976931348623157e308);\n var len = grisu2(value, buffer, sign);\n len = prettify(buffer + (sign << 1), len - sign, _K);\n return len + sign;\n}\n\n// @ts-ignore: decorator\n@lazy @inline const dtoa_buf = memory.data(MAX_DOUBLE_LENGTH << 1);\n\nexport function dtoa(value: f64): String {\n if (value == 0) return \"0.0\";\n if (!isFinite(value)) {\n if (isNaN(value)) return \"NaN\";\n return select(\"-Infinity\", \"Infinity\", value < 0);\n }\n var size = dtoa_core(dtoa_buf, value) << 1;\n var result = changetype(__new(size, idof()));\n memory.copy(changetype(result), dtoa_buf, size);\n return result;\n}\n\nexport function itoa_buffered(buffer: usize, value: T): u32 {\n var sign: u32 = 0;\n if (isSigned()) {\n sign = u32(value < 0);\n if (sign) {\n value = changetype(-value);\n store(buffer, CharCode.MINUS);\n }\n }\n if (ASC_SHRINK_LEVEL <= 1) {\n if (isSigned()) {\n if (sizeof() <= 4) {\n if (value < 10) {\n store(buffer + (sign << 1), value | CharCode._0);\n return 1 + sign;\n }\n } else {\n if (value < 10) {\n store(buffer + (sign << 1), value | CharCode._0);\n return 1 + sign;\n }\n }\n } else {\n if (value < 10) {\n store(buffer, value | CharCode._0);\n return 1;\n }\n }\n }\n var decimals = sign;\n if (sizeof() <= 4) {\n decimals += decimalCount32(value);\n utoa32_dec_core(buffer, value, decimals);\n } else {\n if (value <= u32.MAX_VALUE) {\n let val32 = value;\n decimals += decimalCount32(val32);\n utoa32_dec_core(buffer, val32, decimals);\n } else {\n decimals += decimalCount64High(value);\n utoa64_dec_core(buffer, value, decimals);\n }\n }\n return decimals;\n}\n\nexport function dtoa_buffered(buffer: usize, value: f64): u32 {\n if (value == 0) {\n store(buffer, CharCode._0);\n store(buffer, CharCode.DOT, 2);\n store(buffer, CharCode._0, 4);\n return 3;\n }\n if (!isFinite(value)) {\n if (isNaN(value)) {\n store(buffer, CharCode.N);\n store(buffer, CharCode.a, 2);\n store(buffer, CharCode.N, 4);\n return 3;\n } else {\n let sign = value < 0;\n if (sign) {\n store(buffer, CharCode.MINUS); // -\n buffer += 2;\n }\n store(buffer, 0x690066006E0049, 0); // ifnI\n store(buffer, 0x7900740069006E, 8); // ytin\n return 8 + u32(sign);\n }\n }\n return dtoa_core(buffer, value);\n}\n", - "util/sort": "import { compareImpl } from \"./string\";\n\ntype Comparator = (a: T, b: T) => i32;\n\n// @ts-ignore: decorator\n@lazy @inline const EMPTY = u32.MAX_VALUE;\n// @ts-ignore: decorator\n@inline const INSERTION_SORT_THRESHOLD = 48;\n// @ts-ignore: decorator\n@inline const MIN_RUN_LENGTH = 32;\n\n// @ts-ignore: decorator\n@inline\nfunction log2u(n: u32): u32 {\n return 31 - clz(n);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function COMPARATOR(): Comparator {\n if (isInteger()) {\n if (isSigned() && sizeof() <= 4) {\n return (a, b) => i32(a) - i32(b);\n } else {\n return (a, b) => i32(a > b) - i32(a < b);\n }\n } else if (isFloat()) {\n if (sizeof() == 4) {\n return (a, b) => {\n var ia = reinterpret(f32(a));\n var ib = reinterpret(f32(b));\n ia ^= ia >> 31 >>> 1;\n ib ^= ib >> 31 >>> 1;\n return i32(ia > ib) - i32(ia < ib);\n };\n } else {\n return (a, b) => {\n var ia = reinterpret(f64(a));\n var ib = reinterpret(f64(b));\n ia ^= ia >> 63 >>> 1;\n ib ^= ib >> 63 >>> 1;\n return i32(ia > ib) - i32(ia < ib);\n };\n }\n } else if (isString()) {\n return (a, b) => {\n if (a === b || a === null || b === null) return 0;\n var alen = changetype(a).length;\n var blen = changetype(b).length;\n if (!(alen | blen)) return 0;\n if (!alen) return -1;\n if (!blen) return 1;\n let res = compareImpl(\n changetype(a), 0,\n changetype(b), 0,\n min(alen, blen)\n );\n return res ? res : alen - blen;\n };\n } else {\n return (a, b) => i32(a > b) - i32(a < b);\n }\n}\n\n// Power Sort implementation (stable) from paper \"Nearly-Optimal Mergesorts\"\n// https://arxiv.org/pdf/1805.04154.pdf\n// This method usually outperform TimSort.\n// TODO: refactor c >>> 31 to c < 0 when binaryen will support this opt\nexport function SORT(\n ptr: usize,\n len: i32,\n comparator: Comparator\n): void {\n if (len <= INSERTION_SORT_THRESHOLD) {\n if (len <= 1) return;\n if (ASC_SHRINK_LEVEL < 1) {\n switch (len) {\n case 3: {\n let a = load(ptr, 0);\n let b = load(ptr, 1 << alignof());\n let c = comparator(a, b) > 0;\n store(ptr, select(b, a, c), 0);\n a = select(a, b, c);\n b = load(ptr, 2 << alignof());\n c = comparator(a, b) > 0;\n store(ptr, select(b, a, c), 1 << alignof());\n store(ptr, select(a, b, c), 2 << alignof());\n }\n case 2: {\n let a = load(ptr, 0);\n let b = load(ptr, 1 << alignof());\n let c = comparator(a, b) > 0;\n store(ptr, select(b, a, c), 0);\n store(ptr, select(a, b, c), 1 << alignof());\n return;\n }\n }\n }\n insertionSort(ptr, 0, len - 1, 0, comparator);\n return;\n }\n\n var lgPlus2 = log2u(len) + 2;\n var lgPlus2Size = lgPlus2 << alignof();\n var leftRunStartBuf = __alloc(lgPlus2Size << 1);\n var leftRunEndBuf = leftRunStartBuf + lgPlus2Size;\n\n for (let i: u32 = 0; i < lgPlus2; ++i) {\n store(leftRunStartBuf + (i << alignof()), EMPTY);\n }\n\n var buffer = __alloc(len << alignof());\n\n var hi = len - 1;\n var endA = extendRunRight(ptr, 0, hi, comparator);\n var lenA = endA + 1;\n\n if (lenA < MIN_RUN_LENGTH) {\n endA = min(hi, MIN_RUN_LENGTH - 1);\n insertionSort(ptr, 0, endA, lenA, comparator);\n }\n\n var top: u32 = 0, startA = 0;\n while (endA < hi) {\n let startB = endA + 1;\n let endB = extendRunRight(ptr, startB, hi, comparator);\n let lenB = endB - startB + 1;\n\n if (lenB < MIN_RUN_LENGTH) {\n endB = min(hi, startB + MIN_RUN_LENGTH - 1);\n insertionSort(ptr, startB, endB, lenB, comparator);\n }\n\n let k = nodePower(0, hi, startA, startB, endB);\n\n for (let i = top; i > k; --i) {\n let start = load(leftRunStartBuf + (i << alignof()));\n if (start != EMPTY) {\n mergeRuns(\n ptr,\n start,\n load(leftRunEndBuf + (i << alignof())) + 1,\n endA,\n buffer,\n comparator\n );\n startA = start;\n store(leftRunStartBuf + (i << alignof()), EMPTY);\n }\n }\n\n store(leftRunStartBuf + (k << alignof()), startA);\n store(leftRunEndBuf + (k << alignof()), endA);\n startA = startB;\n endA = endB;\n top = k;\n }\n\n for (let i = top; i != 0; --i) {\n let start = load(leftRunStartBuf + (i << alignof()));\n if (start != EMPTY) {\n mergeRuns(\n ptr,\n start,\n load(leftRunEndBuf + (i << alignof())) + 1,\n hi,\n buffer,\n comparator\n );\n }\n }\n // dealloc aux buffers\n __free(buffer);\n __free(leftRunStartBuf);\n}\n\nfunction insertionSort(\n ptr: usize,\n left: i32,\n right: i32,\n presorted: i32,\n comparator: Comparator\n): void {\n if (ASC_SHRINK_LEVEL >= 1) {\n // slightly improved original insertion sort\n for (let i = left + presorted; i <= right; ++i) {\n let j = i - 1;\n let a = load(ptr + (i << alignof()));\n while (j >= left) {\n let b = load(ptr + (j << alignof()));\n if (comparator(a, b) < 0) {\n store(ptr + (j << alignof()), b, 1 << alignof()); --j;\n } else break;\n }\n store(ptr + (j << alignof()), a, 1 << alignof());\n }\n } else {\n // even-odd two-way insertion sort which allow increase minRunLen\n let range = right - left + 1;\n let i = left + select(range & 1, presorted - ((range - presorted) & 1), presorted == 0);\n for (; i <= right; i += 2) {\n let a = load(ptr + (i << alignof()), 0);\n let b = load(ptr + (i << alignof()), 1 << alignof());\n let min = b, max = a;\n if (comparator(a, b) <= 0) {\n min = a, max = b;\n }\n let j = i - 1;\n while (j >= left) {\n a = load(ptr + (j << alignof()));\n if (comparator(a, max) > 0) {\n store(ptr + (j << alignof()), a, 2 << alignof()); --j;\n } else break;\n }\n store(ptr + (j << alignof()), max, 2 << alignof());\n while (j >= left) {\n a = load(ptr + (j << alignof()));\n if (comparator(a, min) > 0) {\n store(ptr + (j << alignof()), a, 1 << alignof()); --j;\n } else break;\n }\n store(ptr + (j << alignof()), min, 1 << alignof());\n }\n }\n}\n\nfunction nodePower(left: u32, right: u32, startA: u32, startB: u32, endB: u32): u32 {\n var n: u64 = right - left + 1;\n var s = startB - (left << 1);\n var l = startA + s;\n var r = endB + s + 1;\n var a = (l << 30) / n;\n var b = (r << 30) / n;\n return clz((a ^ b));\n}\n\nfunction extendRunRight(\n ptr: usize,\n i: i32,\n right: i32,\n comparator: Comparator\n): i32 {\n if (i == right) return i;\n var j = i;\n if (comparator(\n load(ptr + ( j << alignof())),\n load(ptr + (++j << alignof()))\n ) > 0) {\n while (\n j < right &&\n (comparator(\n load(ptr + (j << alignof()), 1 << alignof()),\n load(ptr + (j << alignof()))\n ) >>> 31) // < 0\n ) ++j;\n // reverse\n let k = j;\n while (i < k) {\n let tmp = load(ptr + (i << alignof()));\n store(ptr + (i << alignof()), load(ptr + (k << alignof()))); ++i;\n store(ptr + (k << alignof()), tmp); --k;\n }\n } else {\n while (\n j < right &&\n comparator(\n load(ptr + (j << alignof()), 1 << alignof()),\n load(ptr + (j << alignof()))\n ) >= 0\n ) ++j;\n }\n return j;\n}\n\n// Merges arr[l..m - 1] and arr[m..r]\nfunction mergeRuns(\n ptr: usize,\n l: i32,\n m: i32,\n r: i32,\n buffer: usize,\n comparator: Comparator\n): void {\n --m;\n var i: i32, j: i32, t = r + m;\n for (i = m + 1; i > l; --i) {\n store(\n buffer + ((i - 1) << alignof()),\n load(ptr + ((i - 1) << alignof()))\n );\n }\n for (j = m; j < r; ++j) {\n store(\n buffer + ((t - j) << alignof()),\n load(ptr + (j << alignof()), 1 << alignof())\n );\n }\n for (let k = l; k <= r; ++k) {\n let a = load(buffer + (j << alignof()));\n let b = load(buffer + (i << alignof()));\n if (comparator(a, b) < 0) {\n store(ptr + (k << alignof()), a);\n --j;\n } else {\n store(ptr + (k << alignof()), b);\n ++i;\n }\n }\n}\n", - "util/string": "import { itoa32, utoa32, itoa64, utoa64, dtoa, itoa_buffered, dtoa_buffered, MAX_DOUBLE_LENGTH } from \"./number\";\nimport { ipow32 } from \"../math\";\n\n// All tables are stored as two staged lookup tables (static tries)\n// because the full range of Unicode symbols can't be efficiently\n// represented as-is in memory (see Unicode spec ch 5, p.196):\n// https://www.unicode.org/versions/Unicode12.0.0/ch05.pdf\n// Tables have been generated using these forked musl tools:\n// https://github.com/MaxGraey/musl-chartable-tools/tree/case-ignorable\n\n// Lookup table to check if a character is alphanumeric or not\n// See: https://git.musl-libc.org/cgit/musl/tree/src/ctype/alpha.h\n// size: 3904 bytes\n// @ts-ignore\n@inline @lazy const ALPHA_TABLE = memory.data([\n 18,17,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,17,34,35,36,17,37,38,39,40,\n 41,42,43,44,17,45,46,47,16,16,48,16,16,16,16,16,16,16,49,50,51,16,52,53,16,16,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,54,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,55,17,17,17,17,56,17,57,58,59,60,61,62,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,63,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,64,65,17,66,67,\n 68,69,70,71,72,73,74,17,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,\n 93,94,16,95,96,97,98,17,17,17,99,100,101,16,16,16,16,16,16,16,16,16,16,17,17,\n 17,17,102,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,103,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,17,17,104,105,16,16,106,107,17,17,17,17,17,17,17,17,17,17,17,17,17,\n 17,17,17,17,17,17,17,17,17,17,108,17,17,17,17,109,110,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 17,111,112,16,16,16,16,16,16,16,16,16,113,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,114,115,116,117,16,16,16,16,16,16,16,16,118,\n 119,120,16,16,16,16,16,121,122,16,16,16,16,123,16,16,124,16,16,16,16,16,16,16,\n 16,16,125,16,16,16,\n 16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,254,255,255,7,254,\n 255,255,7,0,0,0,0,0,4,32,4,255,255,127,255,255,255,127,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,195,255,3,0,31,80,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,223,188,64,215,255,255,\n 251,255,255,255,255,255,255,255,255,255,191,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,3,252,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,127,2,255,255,255,\n 255,255,1,0,0,0,0,255,191,182,0,255,255,255,135,7,0,0,0,255,7,255,255,255,255,\n 255,255,255,254,255,195,255,255,255,255,255,255,255,255,255,255,255,255,239,\n 31,254,225,255,\n 159,0,0,255,255,255,255,255,255,0,224,255,255,255,255,255,255,255,255,255,255,\n 255,255,3,0,255,255,255,255,255,7,48,4,255,255,255,252,255,31,0,0,255,255,255,\n 1,255,7,0,0,0,0,0,0,255,255,223,255,255,0,240,255,248,3,255,255,255,255,255,\n 255,255,255,255,239,255,223,225,255,207,255,254,255,239,159,249,255,255,253,\n 197,227,159,89,128,176,207,255,3,16,238,135,249,255,255,253,109,195,135,25,2,\n 94,192,255,63,0,238,191,251,255,255,253,237,227,191,27,1,0,207,255,0,30,238,\n 159,249,255,255,253,237,227,159,25,192,176,207,255,2,0,236,199,61,214,24,199,\n 255,195,199,29,129,0,192,255,0,0,239,223,253,255,255,253,255,227,223,29,96,7,\n 207,255,0,0,239,223,253,255,255,253,239,227,223,29,96,64,207,255,6,0,255,223,\n 253,255,255,255,255,231,223,93,240,128,207,255,0,252,238,255,127,252,255,255,\n 251,47,127,128,95,255,192,255,12,0,254,255,255,255,255,127,255,7,63,32,255,3,\n 0,0,0,0,214,247,255,255,175,255,255,59,95,32,255,243,0,0,0,\n 0,1,0,0,0,255,3,0,0,255,254,255,255,255,31,254,255,3,255,255,254,255,255,255,\n 31,0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,249,255,3,255,255,255,255,255,\n 255,255,255,255,63,255,255,255,255,191,32,255,255,255,255,255,247,255,255,255,\n 255,255,255,255,255,255,61,127,61,255,255,255,255,255,61,255,255,255,255,61,\n 127,61,255,127,255,255,255,255,255,255,255,61,255,255,255,255,255,255,255,255,\n 7,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,63,63,254,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,159,255,255,254,255,255,7,255,255,255,255,255,255,255,255,\n 255,199,255,1,255,223,15,0,255,255,15,0,255,255,15,0,255,223,13,0,255,255,255,\n 255,255,255,207,255,255,1,128,16,255,3,0,0,0,0,255,3,255,255,255,255,255,255,\n 255,255,255,255,255,1,255,255,255,255,255,7,255,255,255,255,255,255,255,255,\n 63,\n 0,255,255,255,127,255,15,255,1,192,255,255,255,255,63,31,0,255,255,255,255,\n 255,15,255,255,255,3,255,3,0,0,0,0,255,255,255,15,255,255,255,255,255,255,255,\n 127,254,255,31,0,255,3,255,3,128,0,0,128,1,0,0,0,0,0,0,0,255,255,255,255,255,\n 255,239,255,239,15,255,3,0,0,0,0,255,255,255,255,255,243,255,255,255,255,255,\n 255,191,255,3,0,255,255,255,255,255,255,127,0,255,227,255,255,255,255,255,63,\n 255,1,255,255,255,255,255,231,0,0,0,0,0,222,111,4,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,\n 128,255,31,0,255,255,63,63,255,255,255,255,63,63,255,170,255,255,255,63,255,\n 255,255,255,255,255,223,95,220,31,207,15,255,31,220,31,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,2,128,0,0,255,31,0,0,0,0,0,0,0,0,0,0,0,0,132,252,47,62,80,189,255,243,\n 224,67,0,0,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,255,255,255,255,255,255,3,0,\n 0,255,255,255,255,255,127,255,255,255,255,255,127,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,31,120,12,0,255,255,255,255,191,32,255,\n 255,255,255,255,255,255,128,0,0,255,255,127,0,127,127,127,127,127,127,127,127,\n 255,255,255,255,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,224,0,0,0,254,3,62,31,254,255,255,255,255,255,255,255,255,255,127,224,254,\n 255,255,255,255,255,255,255,255,255,255,247,224,255,255,255,255,255,254,255,\n 255,255,255,255,255,255,255,255,255,127,0,0,255,255,255,255,0,0,0,0,0,0,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,\n 31,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,\n 0,0,0,0,0,0,255,255,255,255,255,63,255,31,255,255,255,15,0,0,255,255,255,255,\n 255,127,240,143,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,\n 0,128,255,252,255,255,255,255,255,255,255,255,255,255,255,255,249,255,255,255,\n 255,255,255,252,7,0,0,0,0,224,255,191,255,255,255,255,0,0,0,255,255,255,255,\n 255,255,15,0,255,255,255,255,255,255,255,255,47,0,255,3,0,0,252,232,255,255,\n 255,255,255,7,255,255,255,255,7,0,255,255,255,31,255,255,255,255,255,255,247,\n 255,0,128,255,3,255,255,255,127,255,255,255,255,255,255,127,0,255,63,255,3,\n 255,255,127,252,255,255,255,255,255,255,255,127,5,0,0,56,255,255,60,0,126,126,\n 126,0,127,127,255,255,255,255,255,247,255,3,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,7,255,3,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,15,0,255,255,127,248,255,255,255,255,\n 255,\n 15,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,3,0,0,0,0,127,0,248,224,255,253,127,95,219,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,0,0,248,255,255,255,\n 255,255,255,255,255,255,255,255,255,63,0,0,255,255,255,255,255,255,255,255,\n 252,255,255,255,255,255,255,0,0,0,0,0,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,223,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,255,3,\n 254,255,255,7,254,255,255,7,192,255,255,255,255,255,255,255,255,255,255,127,\n 252,252,252,28,0,0,0,0,255,239,255,255,127,255,255,183,255,63,255,63,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,7,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,31,255,255,255,255,255,255,1,0,0,0,0,\n 0,255,255,255,255,0,224,255,255,255,7,255,255,255,255,255,7,255,255,255,63,\n 255,255,255,255,15,255,62,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,63,255,3,255,255,255,255,15,255,255,255,\n 255,15,255,255,255,255,255,0,255,255,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,0,255,255,63,0,255,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,63,253,255,255,255,255,191,145,255,255,63,0,255,255,\n 127,0,255,255,255,127,0,0,0,0,0,0,0,0,255,255,55,0,255,255,63,0,255,255,255,3,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,192,0,0,0,0,0,0,0,0,111,240,239,\n 254,255,255,63,0,0,0,0,0,255,255,255,31,255,255,255,31,0,0,0,0,255,254,255,\n 255,31,0,0,0,255,255,255,255,255,255,63,0,255,255,63,0,255,255,7,0,255,255,3,\n 0,0,0,0,0,0,0,0,0,0,0,0,\n 0,255,255,255,255,255,255,255,255,255,1,0,0,0,0,0,0,255,255,255,255,255,255,7,\n 0,255,255,255,255,255,255,7,0,255,255,255,255,255,0,255,3,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,\n 255,27,3,0,0,0,0,0,0,0,0,0,255,255,255,31,128,0,255,255,63,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,255,255,31,0,0,0,255,255,127,0,255,255,255,255,255,255,255,255,63,0,0,\n 0,192,255,0,0,252,255,255,255,255,255,255,1,0,0,255,255,255,1,255,3,255,255,\n 255,255,255,255,199,255,240,0,255,255,255,255,71,0,255,255,255,255,255,255,\n 255,255,30,192,255,23,0,0,0,0,255,255,251,255,255,255,159,64,0,0,0,0,0,0,0,0,\n 127,189,255,191,255,1,255,255,255,255,255,255,255,1,255,3,239,159,249,255,255,\n 253,237,227,159,25,129,224,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,255,255,255,255,255,255,255,255,187,7,255,131,3,0,0,0,255,255,255,255,255,\n 255,255,255,179,0,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,\n 255,255,255,63,127,0,0,0,63,0,0,0,0,255,255,255,255,255,255,255,127,17,0,255,\n 3,0,0,0,0,255,255,255,255,255,255,63,1,255,3,0,0,0,0,0,0,255,255,255,231,255,\n 7,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,\n 255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,3,0,128,\n 127,242,111,255,255,255,191,153,7,0,255,3,0,0,0,0,0,0,0,0,255,252,255,255,255,\n 255,255,252,26,0,0,0,255,255,255,255,255,255,231,127,0,0,255,255,255,255,255,\n 255,255,255,255,32,0,0,0,0,255,255,255,255,255,255,255,1,255,253,255,255,255,\n 255,127,127,1,0,255,3,0,0,252,255,255,255,252,255,255,254,127,0,0,0,0,0,0,0,0,\n 0,127,251,255,255,255,255,127,180,203,0,255,3,191,253,255,255,255,127,123,1,\n 255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,\n 0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,3,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,127,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,255,255,255,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,\n 0,255,255,255,255,255,255,255,1,255,255,255,127,255,3,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,63,0,0,255,255,255,255,255,255,0,0,15,0,255,3,248,255,255,224,255,\n 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,\n 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,135,\n 255,255,255,255,255,255,255,128,255,255,0,0,0,0,0,0,0,0,11,0,3,0,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,0,0,0,0,0,\n 255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,\n 127,0,0,0,0,0,0,7,0,240,0,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,15,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,7,255,31,255,1,255,67,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,223,255,255,255,255,255,255,255,255,\n 223,100,222,255,235,239,255,255,255,255,255,255,255,191,231,223,223,255,255,\n 255,123,95,252,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,63,255,255,255,253,255,255,247,255,255,255,\n 247,255,255,223,255,255,255,223,255,255,127,255,255,255,127,255,255,255,253,\n 255,255,255,253,255,255,247,207,255,255,255,255,255,255,127,255,255,249,219,7,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,31,\n 128,63,255,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,15,255,\n 3,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,31,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,143,8,\n 255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,239,255,255,255,150,254,247,10,\n 132,234,150,170,150,247,247,94,255,251,255,15,238,251,255,15,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,255,255,255,3,255,255,255,3,255,255,255,3,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,3\n]);\n\n// size: 1568 bytes (compressed to ~1380 bytes after binaryen)\n// @ts-ignore: decorator\n@lazy @inline const CASED = memory.data([\n 18,19,20,21,22,23,16,16,16,16,16,16,16,16,16,16,\n 24,16,16,25,16,16,16,16,16,16,16,16,26,27,17,28,\n 29,30,16,16,31,16,16,16,16,16,16,16,32,33,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,34,35,16,16,16,36,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,37,16,16,16,38,\n 16,16,16,16,39,16,16,16,16,16,16,16,40,16,16,16,\n 16,16,16,16,16,16,16,16,41,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,42,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,43,44,45,46,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,47,16,16,16,16,16,16,\n 16,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,0,0,0,0,254,255,255,7,254,255,255,7,0,0,0,0,0,4,32,4,\n 255,255,127,255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,247,240,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,239,255,255,255,255,1,3,0,0,0,31,0,0,0,\n 0,0,0,0,0,0,0,0,32,0,0,0,0,0,207,188,64,215,255,255,251,255,255,255,\n 255,255,255,255,255,255,191,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 3,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,\n 255,255,127,0,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,\n 191,32,255,255,255,255,255,231,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,255,255,255,255,255,255,255,255,255,255,63,63,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,1,255,255,255,255,255,231,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,0,0,0,0,255,255,63,63,255,255,255,255,63,63,255,170,255,255,255,63,\n 255,255,255,255,255,255,223,95,220,31,207,15,255,31,220,31,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,2,128,0,0,255,31,0,0,0,0,0,0,0,0,0,0,0,0,\n 132,252,47,62,80,189,31,242,224,67,0,0,255,255,255,255,24,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,192,255,255,255,255,255,255,3,0,0,255,255,255,255,255,127,255,255,\n 255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,120,12,0,\n 255,255,255,255,191,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,63,0,0,\n 255,255,255,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,255,255,255,\n 255,255,255,255,255,255,255,255,255,120,255,255,255,255,255,255,252,7,0,0,0,0,96,7,\n 0,0,0,0,0,0,255,255,255,255,255,247,255,1,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,0,0,0,0,127,0,248,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,7,\n 254,255,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,\n 255,255,15,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,7,0,255,255,255,255,255,255,7,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,223,255,255,255,255,255,\n 255,255,255,223,100,222,255,235,239,255,255,255,255,255,255,255,191,231,223,223,255,255,255,123,\n 95,252,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,\n 253,255,255,247,255,255,255,247,255,255,223,255,255,255,223,255,255,127,255,255,255,127,255,255,\n 255,253,255,255,255,253,255,255,247,15,0,0,0,0,0,0,255,255,255,255,255,255,255,255,\n 15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,255,255,255,3,255,255,255,3,255,255,255,3,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0\n]);\n\n// size: 2976 bytes (compressed to ~2050 bytes after binaryen)\n// @ts-ignore: decorator\n@lazy @inline const CASE_IGNORABLES = memory.data([\n 18,16,19,20,21,22,23,24,25,26,27,28,29,30,31,32,\n 33,16,16,34,16,16,16,35,36,37,38,39,40,41,16,42,\n 43,16,16,16,16,16,16,16,16,16,16,16,44,45,46,16,\n 47,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 48,16,16,16,49,16,50,51,52,53,54,55,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,56,16,16,57,58,\n 16,59,60,61,16,16,16,16,16,16,62,16,16,63,64,65,\n 66,67,68,69,70,71,72,73,74,75,76,16,77,78,79,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,80,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,81,82,16,16,16,83,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,84,16,16,16,\n 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,\n 16,85,86,16,16,16,16,16,16,16,87,16,16,16,16,16,\n 88,89,90,16,16,16,16,16,91,92,16,16,16,16,16,16,\n 16,16,16,93,16,16,16,16,16,16,16,16,16,16,16,16,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 0,0,0,0,128,64,0,4,0,0,0,64,1,0,0,0,0,0,0,0,0,161,144,1,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n 255,255,255,255,255,255,48,4,176,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,3,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0,0,0,\n 0,0,254,255,255,255,255,191,182,0,0,0,0,0,16,0,63,0,255,23,0,0,0,0,\n 1,248,255,255,0,0,1,0,0,0,0,0,0,0,0,0,0,0,192,191,255,61,0,0,\n 0,128,2,0,0,0,255,255,255,7,0,0,0,0,0,0,0,0,0,0,192,255,1,0,\n 0,0,0,0,0,248,63,36,0,0,192,255,255,63,0,0,0,0,0,14,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,248,255,255,255,255,255,7,0,0,0,0,0,0,20,\n 254,33,254,0,12,0,2,0,2,0,0,0,0,0,0,16,30,32,0,0,12,0,0,64,\n 6,0,0,0,0,0,0,16,134,57,2,0,0,0,35,0,6,0,0,0,0,0,0,16,\n 190,33,0,0,12,0,0,252,2,0,0,0,0,0,0,144,30,32,96,0,12,0,0,0,\n 4,0,0,0,0,0,0,0,1,32,0,0,0,0,0,0,17,0,0,0,0,0,0,192,\n 193,61,96,0,12,0,0,0,2,0,0,0,0,0,0,144,64,48,0,0,12,0,0,0,\n 3,0,0,0,0,0,0,24,30,32,0,0,12,0,0,0,2,0,0,0,0,0,0,0,\n 0,4,92,0,0,0,0,0,0,0,0,0,0,0,242,7,192,127,0,0,0,0,0,0,\n 0,0,0,0,0,0,242,31,64,63,0,0,0,0,0,0,0,0,0,3,0,0,160,2,\n 0,0,0,0,0,0,254,127,223,224,255,254,255,255,255,31,64,0,0,0,0,0,0,0,\n 0,0,0,0,0,224,253,102,0,0,0,195,1,0,30,0,100,32,0,32,0,0,0,0,\n 0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,224,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,28,0,\n 0,0,12,0,0,0,12,0,0,0,0,0,0,0,176,63,64,254,143,32,0,0,0,0,\n 0,120,0,0,0,0,0,0,8,0,0,0,0,0,0,0,96,0,0,0,0,2,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,135,1,4,14,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,9,0,0,0,0,\n 0,0,64,127,229,31,248,159,0,0,0,0,128,0,255,255,1,0,0,0,0,0,0,0,\n 15,0,0,0,0,0,208,23,4,0,0,0,0,248,15,0,3,0,0,0,60,59,0,0,\n 0,0,0,0,64,163,3,0,0,0,0,0,0,240,207,0,0,0,0,0,0,0,0,63,\n 0,0,0,0,0,0,0,0,0,0,247,255,253,33,16,3,0,0,0,0,0,240,255,255,\n 255,255,255,255,255,7,0,1,0,0,0,248,255,255,255,255,255,255,255,255,255,255,255,251,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,\n 3,224,0,224,0,224,0,96,0,248,0,3,144,124,0,0,0,0,0,0,223,255,2,128,\n 0,0,255,31,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,128,3,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,128,0,0,0,0,0,0,0,0,\n 0,0,0,0,255,255,255,255,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,60,62,8,\n 0,0,0,0,0,0,0,0,0,0,0,126,0,0,0,0,0,0,0,0,0,0,0,112,\n 0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,0,16,0,0,0,0,0,0,\n 0,0,0,0,0,128,247,191,0,0,0,240,0,0,0,0,0,0,0,0,0,0,3,0,\n 255,255,255,255,3,0,0,0,0,0,0,0,0,0,1,0,0,7,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,3,68,8,0,0,96,16,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,48,0,0,0,255,255,3,128,0,0,0,0,192,63,0,0,\n 128,255,3,0,0,0,0,0,7,0,0,0,0,0,200,51,0,128,0,0,96,0,0,0,\n 0,0,0,0,0,126,102,0,8,16,0,0,0,0,1,16,0,0,0,0,0,0,157,193,\n 2,0,0,32,0,48,88,0,0,0,0,0,0,0,0,0,0,0,0,248,0,14,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,32,33,0,0,0,0,0,64,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,255,3,0,0,0,0,0,0,0,\n 255,255,8,0,255,255,0,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,128,128,64,0,4,0,0,0,64,1,0,0,0,0,0,1,0,\n 0,0,0,192,0,0,0,0,0,0,0,0,8,0,0,14,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,7,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,110,240,0,0,0,0,0,135,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,0,0,0,\n 0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 192,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 2,0,0,0,0,0,0,255,127,0,0,0,0,0,0,128,3,0,0,0,0,0,120,38,\n 0,32,0,0,0,0,0,0,7,0,0,0,128,239,31,0,0,0,0,0,0,0,8,0,\n 3,0,0,0,0,0,192,127,0,158,0,0,0,0,0,0,0,0,0,0,0,128,211,64,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,248,7,0,0,\n 3,0,0,0,0,0,0,24,1,0,0,0,192,31,31,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,92,0,0,64,0,0,0,0,\n 0,0,0,0,0,0,248,133,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,176,1,0,0,48,0,0,0,0,\n 0,0,0,0,0,0,248,167,1,0,0,0,0,0,0,0,0,0,0,0,0,40,191,0,\n 0,0,0,0,0,0,0,0,0,0,0,224,188,15,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,255,6,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,88,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,240,12,1,0,0,0,254,7,0,0,0,0,248,121,128,0,126,14,0,0,0,0,\n 0,252,127,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,191,\n 0,0,0,0,0,0,0,0,0,0,252,255,255,252,109,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,126,180,191,0,0,0,0,0,0,0,0,0,163,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,255,1,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,31,0,0,0,0,0,0,0,127,0,15,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,128,0,0,0,0,0,0,0,128,255,255,0,0,0,0,0,0,0,0,27,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,15,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,3,248,255,\n 231,15,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 255,255,255,255,255,255,127,248,255,255,255,255,255,31,32,0,16,0,0,248,254,255,0,0,\n 0,0,0,0,0,0,0,0,127,255,255,249,219,7,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,63,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 240,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,248\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const LOWER127 = memory.data([\n 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,\n 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,\n 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,\n 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,\n 64,\n 97,98,99,100,101,102,103,104,105,106,107,108,109,\n 110,111,112,113,114,115,116,117,118,119,120,121,122,\n 91,92,93,94,95,96,\n 97,98,99,100,101,102,103,104,105,106,107,108,109,\n 110,111,112,113,114,115,116,117,118,119,120,121,122,\n 123,124,125,126,127\n]);\n\n// @ts-ignore: decorator\n@lazy @inline const UPPER127 = memory.data([\n 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,\n 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,\n 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,\n 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,\n 64,\n 65,66,67,68,69,70,71,72,73,74,75,76,77,\n 78,79,80,81,82,83,84,85,86,87,88,89,90,\n 91,92,93,94,95,96,\n 65,66,67,68,69,70,71,72,73,74,75,76,77,\n 78,79,80,81,82,83,84,85,86,87,88,89,90,\n 123,124,125,126,127\n]);\n\n// 23 * 8 = 184 bytes\n// @ts-ignore: decorator\n@lazy @inline const POWERS10 = memory.data([\n 1e00, 1e01, 1e02, 1e03, 1e04, 1e05, 1e06, 1e07, 1e08, 1e09,\n 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,\n 1e20, 1e21, 1e22\n]);\n\n// @ts-ignore: decorator\n@inline\nexport const enum CharCode {\n PERCENT = 0x25,\n PLUS = 0x2B,\n MINUS = 0x2D,\n DOT = 0x2E,\n _0 = 0x30,\n _1 = 0x31,\n _2 = 0x32,\n _3 = 0x33,\n _4 = 0x34,\n _5 = 0x35,\n _6 = 0x36,\n _7 = 0x37,\n _8 = 0x38,\n _9 = 0x39,\n A = 0x41,\n B = 0x42,\n E = 0x45,\n I = 0x49,\n N = 0x4E,\n O = 0x4F,\n X = 0x58,\n Z = 0x5A,\n a = 0x61,\n b = 0x62,\n e = 0x65,\n n = 0x6E,\n o = 0x6F,\n u = 0x75,\n x = 0x78,\n z = 0x7A\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isAscii(c: u32): bool {\n return !(c >> 7);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isLower8(c: u32): bool {\n return c - CharCode.a < 26;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isUpper8(c: u32): bool {\n return c - CharCode.A < 26;\n}\n\nexport function isSpace(c: u32): bool {\n if (c < 0x1680) { // < (1)\n // , , , , , and \n // (c == 0x20 || c == 0xA0) was optimized to (c | 0x80) == 0xA0\n return ((c | 0x80) == 0xA0) || (c - 0x09 <= 0x0D - 0x09);\n }\n if (c - 0x2000 <= 0x200A - 0x2000) return true;\n switch (c) {\n case 0x1680: // (1)\n case 0x2028: // (2)\n case 0x2029: // \n case 0x202F: // \n case 0x205F: // \n case 0x3000: // \n case 0xFEFF: return true; // \n }\n return false;\n}\n\nexport function isAlpha(c: u32): bool {\n if (isAscii(c)) return (c | 32) - CharCode.a < 26;\n if (c < 0x20000) {\n // @ts-ignore: cast\n return stagedBinaryLookup(ALPHA_TABLE, c);\n }\n return c < 0x2FFFE;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isCased(c: u32): bool {\n // @ts-ignore: cast\n return c < 0x1F18A && stagedBinaryLookup(CASED, c);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isCaseIgnorable(c: u32): bool {\n // @ts-ignore: cast\n return c < 0xE01F0 && stagedBinaryLookup(CASE_IGNORABLES, c);\n}\n\n// @ts-ignore: decorator\n@inline\nexport function isFinalSigma(buffer: usize, index: isize, len: isize): bool {\n const lookaheadLimit = 30; // max lookahead limit\n var found = false;\n var pos = index;\n var minPos = max(0, pos - lookaheadLimit);\n while (pos > minPos) {\n let c = codePointBefore(buffer, pos);\n if (!isCaseIgnorable(c)) {\n if (isCased(c)) {\n found = true;\n } else {\n return false;\n }\n }\n pos -= isize(c >= 0x10000) + 1;\n }\n if (!found) return false;\n pos = index + 1;\n var maxPos = min(pos + lookaheadLimit, len);\n while (pos < maxPos) {\n let c = load(buffer + (pos << 1));\n if (u32((c & 0xFC00) == 0xD800) & u32(pos + 1 != len)) {\n let c1 = load(buffer + (pos << 1), 2);\n if ((c1 & 0xFC00) == 0xDC00) {\n c = (c - 0xD800 << 10) + (c1 - 0xDC00) + 0x10000;\n }\n }\n if (!isCaseIgnorable(c)) {\n return !isCased(c);\n }\n pos += isize(c >= 0x10000) + 1;\n }\n return true;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction codePointBefore(buffer: usize, index: isize): i32 {\n if (index <= 0) return -1;\n var c = load(buffer + (index - 1 << 1));\n if (u32((c & 0xFC00) == 0xDC00) & u32(index - 2 >= 0)) {\n let c1 = load(buffer + (index - 2 << 1));\n if ((c1 & 0xFC00) == 0xD800) {\n return ((c1 & 0x3FF) << 10) + (c & 0x3FF) + 0x10000;\n }\n }\n return (c & 0xF800) == 0xD800 ? 0xFFFD : c;\n}\n\n// Search routine for two-staged lookup tables\nfunction stagedBinaryLookup(table: usize, c: u32): bool {\n return ((load(table + (load(table + (c >>> 8)) << 5) + ((c & 255) >> 3)) >>> (c & 7)) & 1);\n}\n\nexport function compareImpl(str1: string, index1: usize, str2: string, index2: usize, len: usize): i32 {\n var ptr1 = changetype(str1) + (index1 << 1);\n var ptr2 = changetype(str2) + (index2 << 1);\n if (ASC_SHRINK_LEVEL < 2) {\n if (len >= 4 && !((ptr1 & 7) | (ptr2 & 7))) {\n do {\n if (load(ptr1) != load(ptr2)) break;\n ptr1 += 8;\n ptr2 += 8;\n len -= 4;\n } while (len >= 4);\n }\n }\n while (len--) {\n let a = load(ptr1);\n let b = load(ptr2);\n if (a != b) return a - b;\n ptr1 += 2;\n ptr2 += 2;\n }\n return 0;\n}\n\n// @ts-ignore: decorator\n@inline\nexport function toLower8(c: u32): u32 {\n if (ASC_SHRINK_LEVEL > 0) {\n return c | u32(isUpper8(c)) << 5;\n } else {\n return load(LOWER127 + c);\n }\n}\n\n// @ts-ignore: decorator\n@inline\nexport function toUpper8(c: u32): u32 {\n if (ASC_SHRINK_LEVEL > 0) {\n return c & ~(u32(isLower8(c)) << 5);\n } else {\n return load(UPPER127 + c);\n }\n}\n\n/** Parses a string to an integer (usually), using the specified radix. */\nexport function strtol(str: string, radix: i32 = 0): T {\n var len = str.length;\n if (!len) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n\n var ptr = changetype(str) /* + HEAD -> offset */;\n var code = load(ptr);\n\n // trim white spaces\n while (isSpace(code)) {\n code = load(ptr += 2);\n --len;\n }\n // determine sign\n // @ts-ignore\n var sign: T = 1;\n if (code == CharCode.MINUS || code == CharCode.PLUS) {\n if (!--len) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n if (code == CharCode.MINUS) {\n // @ts-ignore: type\n sign = -1;\n }\n code = load(ptr += 2);\n }\n\n // See https://tc39.es/ecma262/#sec-parseint-string-radix\n if (radix) {\n if (radix < 2 || radix > 36) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n // handle case as parseInt(\"0xFF\", 16) by spec\n if (radix == 16) {\n if (\n len > 2 &&\n code == CharCode._0 &&\n (load(ptr, 2) | 32) == CharCode.x\n ) {\n ptr += 4; len -= 2;\n }\n }\n } else {\n // determine radix by literal prefix\n if (code == CharCode._0 && len > 2) {\n switch (load(ptr, 2) | 32) {\n case CharCode.b: {\n ptr += 4; len -= 2;\n radix = 2;\n break;\n }\n case CharCode.o: {\n ptr += 4; len -= 2;\n radix = 8;\n break;\n }\n case CharCode.x: {\n ptr += 4; len -= 2;\n radix = 16;\n break;\n }\n }\n }\n if (!radix) radix = 10;\n }\n\n // calculate value\n // @ts-ignore: type\n var num: T = 0;\n while (len--) {\n code = load(ptr);\n if (code - CharCode._0 < 10) {\n code -= CharCode._0;\n } else if (code - CharCode.A <= (CharCode.Z - CharCode.A)) {\n code -= CharCode.A - 10;\n } else if (code - CharCode.a <= (CharCode.z - CharCode.a)) {\n code -= CharCode.a - 10;\n }\n if (code >= radix) {\n if (!num) {\n if (isFloat()) {\n // @ts-ignore: cast\n return NaN;\n } else {\n // @ts-ignore: cast\n return 0;\n }\n }\n break;\n }\n // @ts-ignore: type\n num = num * radix + code;\n ptr += 2;\n }\n // @ts-ignore: type\n return sign * num;\n}\n\nexport function strtod(str: string): f64 {\n var len = str.length;\n if (!len) return NaN;\n\n var ptr = changetype(str);\n var code = load(ptr);\n\n var sign = 1.0;\n // skip white spaces\n while (len && isSpace(code)) {\n code = load(ptr += 2);\n --len;\n }\n if (!len) return NaN;\n\n // try parse '-' or '+'\n if (code == CharCode.MINUS) {\n if (!--len) return NaN;\n code = load(ptr += 2);\n sign = -1;\n } else if (code == CharCode.PLUS) {\n if (!--len) return NaN;\n code = load(ptr += 2);\n }\n\n // try parse Infinity\n if (len >= 8 && code == CharCode.I) {\n if (\n load(ptr, 0) == 0x690066006E0049 && // ifnI\n load(ptr, 8) == 0x7900740069006E // ytin\n ) {\n return Infinity * sign;\n }\n return NaN;\n }\n // validate next symbol\n if (code != CharCode.DOT && (code - CharCode._0) >= 10) {\n return NaN;\n }\n var savedPtr = ptr;\n // skip zeros\n while (code == CharCode._0) {\n code = load(ptr += 2);\n --len;\n }\n if (len <= 0) return 0;\n const capacity = 19; // int(64 * 0.3010)\n var pointed = false;\n var consumed = 0;\n var position = 0;\n var x: u64 = 0;\n if (code == CharCode.DOT) {\n let noDigits = !(savedPtr - ptr);\n ptr += 2; --len;\n if (!len && noDigits) return NaN;\n for (pointed = true; (code = load(ptr)) == CharCode._0; --position, ptr += 2) --len;\n if (len <= 0) return 0;\n if (!position && noDigits && code - CharCode._0 >= 10) return NaN;\n }\n for (let digit = code - CharCode._0; digit < 10 || (code == CharCode.DOT && !pointed); digit = code - CharCode._0) {\n if (digit < 10) {\n x = consumed < capacity ? 10 * x + digit : x | u64(!!digit);\n ++consumed;\n } else {\n position = consumed;\n pointed = true;\n }\n if (!--len) break;\n code = load(ptr += 2);\n }\n\n if (!pointed) position = consumed;\n return copysign(scientific(x, position - min(capacity, consumed) + parseExp(ptr, len)), sign);\n}\n\nexport function joinBooleanArray(dataStart: usize, length: i32, separator: string): string {\n var lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) return select(\"true\", \"false\", load(dataStart));\n\n var sepLen = separator.length;\n var valueLen = 5; // max possible length of element len(\"false\")\n var estLen = (valueLen + sepLen) * lastIndex + valueLen;\n var result = changetype(__new(estLen << 1, idof()));\n var offset = 0;\n var value: bool;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + i);\n valueLen = 4 + i32(!value);\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(select(\"true\", \"false\", value)),\n valueLen << 1\n );\n offset += valueLen;\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + lastIndex);\n valueLen = 4 + i32(!value);\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(select(\"true\", \"false\", value)),\n valueLen << 1\n );\n offset += valueLen;\n\n if (estLen > offset) return result.substring(0, offset);\n return result;\n}\n\nexport function joinIntegerArray(dataStart: usize, length: i32, separator: string): string {\n var lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) {\n let value = load(dataStart);\n if (isSigned()) {\n if (sizeof() <= 4) {\n // @ts-ignore: type\n return changetype(itoa32(value, 10));\n } else {\n // @ts-ignore: type\n return changetype(itoa64(value, 10));\n }\n } else {\n if (sizeof() <= 4) {\n // @ts-ignore: type\n return changetype(utoa32(value, 10));\n } else {\n // @ts-ignore: type\n return changetype(utoa64(value, 10));\n }\n }\n }\n\n var sepLen = separator.length;\n const valueLen = (sizeof() <= 4 ? 10 : 20) + i32(isSigned());\n var estLen = (valueLen + sepLen) * lastIndex + valueLen;\n var result = changetype(__new(estLen << 1, idof()));\n var offset = 0;\n var value: T;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n // @ts-ignore: type\n offset += itoa_buffered(changetype(result) + (offset << 1), value);\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + (lastIndex << alignof()));\n // @ts-ignore: type\n offset += itoa_buffered(changetype(result) + (offset << 1), value);\n if (estLen > offset) return result.substring(0, offset);\n return result;\n}\n\nexport function joinFloatArray(dataStart: usize, length: i32, separator: string): string {\n var lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) {\n return changetype(dtoa(\n // @ts-ignore: type\n load(dataStart))\n );\n }\n\n const valueLen = MAX_DOUBLE_LENGTH;\n var sepLen = separator.length;\n var estLen = (valueLen + sepLen) * lastIndex + valueLen;\n var result = changetype(__new(estLen << 1, idof()));\n var offset = 0;\n var value: T;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n // @ts-ignore: type\n offset += dtoa_buffered(changetype(result) + (offset << 1), value);\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + (lastIndex << alignof()));\n // @ts-ignore: type\n offset += dtoa_buffered(changetype(result) + (offset << 1), value);\n if (estLen > offset) return result.substring(0, offset);\n return result;\n}\n\nexport function joinStringArray(dataStart: usize, length: i32, separator: string): string {\n var lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n if (!lastIndex) {\n // @ts-ignore: type\n return load(dataStart) || \"\";\n }\n var estLen = 0;\n var value: string;\n for (let i = 0; i < length; ++i) {\n value = load(dataStart + (i << alignof()));\n // @ts-ignore: type\n if (value !== null) estLen += value.length;\n }\n var offset = 0;\n var sepLen = separator.length;\n var result = changetype(__new((estLen + sepLen * lastIndex) << 1, idof()));\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n if (value !== null) {\n let valueLen = value.length;\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(value),\n valueLen << 1\n );\n offset += valueLen;\n }\n if (sepLen) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(separator),\n sepLen << 1\n );\n offset += sepLen;\n }\n }\n value = load(dataStart + (lastIndex << alignof()));\n if (value !== null) {\n memory.copy(\n changetype(result) + (offset << 1),\n changetype(value),\n value.length << 1\n );\n }\n return result;\n}\n\nexport function joinReferenceArray(dataStart: usize, length: i32, separator: string): string {\n var lastIndex = length - 1;\n if (lastIndex < 0) return \"\";\n var value: T;\n if (!lastIndex) {\n value = load(dataStart);\n // @ts-ignore: type\n return value !== null ? value.toString() : \"\";\n }\n var result = \"\";\n var sepLen = separator.length;\n for (let i = 0; i < lastIndex; ++i) {\n value = load(dataStart + (i << alignof()));\n // @ts-ignore: type\n if (value !== null) result += value.toString();\n if (sepLen) result += separator;\n }\n value = load(dataStart + (lastIndex << alignof()));\n // @ts-ignore: type\n if (value !== null) result += value.toString();\n return result;\n}\n\n// @ts-ignore: decorator\n@inline\nfunction scientific(significand: u64, exp: i32): f64 {\n if (!significand || exp < -342) return 0;\n if (exp > 308) return Infinity;\n // Try use fast path\n // Use fast path for string-to-double conversion if possible\n // see http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion\n // Simple integer\n var significandf = significand;\n if (!exp) return significandf;\n if (exp > 22 && exp <= 22 + 15) {\n significandf *= pow10(exp - 22);\n exp = 22;\n }\n if (significand <= 9007199254740991 && abs(exp) <= 22) {\n if (exp > 0) return significandf * pow10(exp);\n return significandf / pow10(-exp);\n } else if (exp < 0) {\n return scaledown(significand, exp);\n } else {\n return scaleup(significand, exp);\n }\n}\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction scaledown(significand: u64, exp: i32): f64 {\n const denom: u64 = 6103515625; // 1e14 * 0x1p-14\n const scale = reinterpret(0x3F06849B86A12B9B); // 1e-14 * 0x1p32\n\n var shift = clz(significand);\n significand <<= shift;\n shift = exp - shift;\n\n for (; exp <= -14; exp += 14) {\n let q = significand / denom;\n let r = significand % denom;\n let s = clz(q);\n significand = (q << s) + nearest(scale * (r << (s - 18)));\n shift -= s;\n }\n var b = ipow32(5, -exp);\n var q = significand / b;\n var r = significand % b;\n var s = clz(q);\n significand = (q << s) + (reinterpret(reinterpret(r) + (s << 52)) / b);\n shift -= s;\n\n return NativeMath.scalbn(significand, shift);\n}\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction scaleup(significand: u64, exp: i32): f64 {\n const coeff: u32 = 1220703125; // 1e13 * 0x1p-13;\n var shift = ctz(significand);\n significand >>= shift;\n shift += exp;\n\n __fixmulShift = shift;\n for (; exp >= 13; exp -= 13) {\n significand = fixmul(significand, coeff);\n }\n significand = fixmul(significand, ipow32(5, exp));\n shift = __fixmulShift;\n return NativeMath.scalbn(significand, shift);\n}\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction parseExp(ptr: usize, len: i32): i32 {\n var sign = 1, magnitude = 0;\n var code = load(ptr);\n // check code is 'e' or 'E'\n if ((code | 32) != CharCode.e) return 0;\n\n if (!--len) return 0;\n code = load(ptr += 2);\n if (code == CharCode.MINUS) {\n if (!--len) return 0;\n code = load(ptr += 2);\n sign = -1;\n } else if (code == CharCode.PLUS) {\n if (!--len) return 0;\n code = load(ptr += 2);\n }\n // skip zeros\n while (code == CharCode._0) {\n if (!--len) return 0;\n code = load(ptr += 2);\n }\n for (let digit: u32 = code - CharCode._0; len && digit < 10; digit = code - CharCode._0) {\n if (magnitude >= 3200) return sign * 3200;\n magnitude = 10 * magnitude + digit;\n code = load(ptr += 2);\n --len;\n }\n return sign * magnitude;\n}\n\n// @ts-ignore: decorator\n@lazy var __fixmulShift: u64 = 0;\n\n// Adopted from metallic lib:\n// https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h\n// @ts-ignore: decorator\n@inline\nfunction fixmul(a: u64, b: u32): u64 {\n var low = (a & 0xFFFFFFFF) * b;\n var high = (a >> 32) * b + (low >> 32);\n var overflow = (high >> 32);\n var space = clz(overflow);\n var revspace: u64 = 32 - space;\n __fixmulShift += revspace;\n return (high << space | (low & 0xFFFFFFFF) >> revspace) + (low << space >> 31 & 1);\n}\n\n// @ts-ignore: decorator\n@inline\nfunction pow10(n: i32): f64 {\n // argument `n` should bounds in [0, 22] range\n return load(POWERS10 + (n << alignof()));\n}\n", - "util/uri": "import { E_URI_MALFORMED } from \"./error\";\nimport { CharCode } from \"./string\";\n\n// Truncated lookup boolean table that helps us quickly determine\n// if a char needs to be escaped for URIs (RFC 2396).\n// @ts-ignore: decorator\n@lazy export const URI_UNSAFE = memory.data([\n/* skip 32 + 1 always set to '1' head slots\n */ 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0,\n 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, /*\n skip 128 + 1 always set to '1' tail slots */\n]);\n\n// Truncated lookup boolean table that helps us quickly determine\n// if a char needs to be escaped for URLs (RFC 3986).\n// @ts-ignore: decorator\n@lazy export const URL_UNSAFE = memory.data([\n/* skip 32 + 1 always set to '1' head slots\n */ 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,\n 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0,\n 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, /*\n skip 128 + 1 always set to '1' tail slots */\n]);\n\n// Truncated lookup boolean table for determine reserved chars: ;/?:@&=+$,#\n// @ts-ignore: decorator\n@lazy export const URI_RESERVED = memory.data([\n /* skip 32 + 3 always set to '0' head slots\n */ 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1,\n 1, /* skip 191 always set to '0' tail slots */\n]);\n\nexport function encode(src: usize, len: usize, table: usize): usize {\n if (!len) return src;\n\n var i: usize = 0, offset: usize = 0, outSize = len << 1;\n var dst = __new(outSize, idof());\n\n while (i < len) {\n let org = i;\n let c: u32, c1: u32;\n // fast scan a check chars until it valid ASCII\n // and safe for copying withoud escaping.\n do {\n c = load(src + (i << 1));\n // is it valid ASII and safe?\n if (c - 33 < 94) { // 127 - 33\n if (load(table + (c - 33))) break;\n } else break;\n } while (++i < len);\n\n // if we have some safe range of sequence just copy it without encoding\n if (i > org) {\n let size = i - org << 1;\n if (offset + size > outSize) {\n outSize = offset + size;\n dst = __renew(dst, outSize);\n }\n // TODO: should we optimize for short cases like 2 byte size?\n memory.copy(\n dst + offset,\n src + (org << 1),\n size\n );\n offset += size;\n // return if we reach end on input string\n if (i >= len) break;\n }\n\n // decode UTF16 with checking for unpaired surrogates\n if (c >= 0xD800) {\n if (c >= 0xDC00 && c <= 0xDFFF) {\n throw new URIError(E_URI_MALFORMED);\n }\n if (c <= 0xDBFF) {\n if (i >= len) {\n throw new URIError(E_URI_MALFORMED);\n }\n c1 = load(src + (++i << 1));\n if (c1 < 0xDC00 || c1 > 0xDFFF) {\n throw new URIError(E_URI_MALFORMED);\n }\n c = (((c & 0x3FF) << 10) | (c1 & 0x3FF)) + 0x10000;\n }\n }\n\n let estSize = offset + (c < 0x80 ? 1 * 6 : 4 * 6);\n if (estSize > outSize) {\n // doubling estimated size but only for greater than one\n // input lenght due to we already estemated it for worst case\n outSize = len > 1 ? estSize << 1 : estSize;\n dst = __renew(dst, outSize);\n }\n\n if (c < 0x80) {\n // encode ASCII unsafe code point\n storeHex(dst, offset, c);\n offset += 6;\n } else {\n // encode UTF-8 unsafe code point\n if (c < 0x800) {\n storeHex(dst, offset, (c >> 6) | 0xC0);\n offset += 6;\n } else {\n if (c < 0x10000) {\n storeHex(dst, offset, (c >> 12) | 0xE0);\n offset += 6;\n } else {\n storeHex(dst, offset, (c >> 18) | 0xF0);\n offset += 6;\n storeHex(dst, offset, (c >> 12 & 0x3F) | 0x80);\n offset += 6;\n }\n storeHex(dst, offset, (c >> 6 & 0x3F) | 0x80);\n offset += 6;\n }\n storeHex(dst, offset, (c & 0x3F) | 0x80);\n offset += 6;\n }\n ++i;\n }\n // shink output string buffer if necessary\n if (outSize > offset) {\n dst = __renew(dst, offset);\n }\n return dst;\n}\n\nexport function decode(src: usize, len: usize, component: bool): usize {\n if (!len) return src;\n\n var i: usize = 0, offset: usize = 0, ch: u32 = 0;\n var dst = __new(len << 1, idof());\n\n while (i < len) {\n let org = i;\n while (i < len && (ch = load(src + (i << 1))) != CharCode.PERCENT) i++;\n\n if (i > org) {\n let size = i - org << 1;\n // TODO: should we optimize for short cases like 2 byte size?\n memory.copy(\n dst + offset,\n src + (org << 1),\n size\n );\n offset += size;\n if (i >= len) break;\n }\n\n // decode hex\n if (\n i + 2 >= len ||\n ch != CharCode.PERCENT ||\n (ch = loadHex(src, i + 1 << 1)) == -1\n ) throw new URIError(E_URI_MALFORMED);\n\n i += 3;\n if (ch < 0x80) {\n if (!component && isReserved(ch)) {\n ch = CharCode.PERCENT;\n i -= 2;\n }\n } else {\n // decode UTF-8 sequence\n let nb = utf8LenFromUpperByte(ch);\n // minimal surrogate: 2 => 0x80, 3 => 0x800, 4 => 0x10000, _ => -1\n let lo: u32 = 1 << (17 * nb >> 2) - 1;\n // mask: 2 => 31, 3 => 15, 4 => 7, _ => 0\n ch &= nb ? (0x80 >> nb) - 1 : 0;\n\n while (--nb != 0) {\n let c1: u32;\n // decode hex\n if (\n i + 2 >= len ||\n load(src + (i << 1)) != CharCode.PERCENT ||\n (c1 = loadHex(src, i + 1 << 1)) == -1\n ) throw new URIError(E_URI_MALFORMED);\n\n i += 3;\n if ((c1 & 0xC0) != 0x80) {\n ch = 0;\n break;\n }\n ch = (ch << 6) | (c1 & 0x3F);\n }\n\n // check if UTF8 code point properly fit into invalid UTF16 encoding\n if (ch < lo || lo == -1 || ch > 0x10FFFF || (ch >= 0xD800 && ch < 0xE000)) {\n throw new URIError(E_URI_MALFORMED);\n }\n\n // encode UTF16\n if (ch >= 0x10000) {\n ch -= 0x10000;\n let lo = ch >> 10 | 0xD800;\n let hi = (ch & 0x03FF) | 0xDC00;\n store(dst + offset, lo | (hi << 16));\n offset += 4;\n continue;\n }\n }\n store(dst + offset, ch);\n offset += 2;\n }\n\n assert(offset <= (len << 1));\n // shink output string buffer if necessary\n if ((len << 1) > offset) {\n dst = __renew(dst, offset);\n }\n return dst;\n}\n\nfunction storeHex(dst: usize, offset: usize, ch: u32): void {\n // @ts-ignore: decorator\n const HEX_CHARS = memory.data([\n 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,\n 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46\n ]);\n\n store(dst + offset, CharCode.PERCENT, 0); // %\n store(\n dst + offset,\n load(HEX_CHARS + (ch >> 4 & 0x0F)) |\n load(HEX_CHARS + (ch & 0x0F)) << 16,\n 2\n ); // XX\n}\n\nfunction loadHex(src: usize, offset: usize): u32 {\n let c0 = load(src + offset, 0);\n let c1 = load(src + offset, 2);\n return isHex(c0) && isHex(c1)\n ? fromHex(c0) << 4 | fromHex(c1)\n : -1;\n}\n\n// @ts-ignore: decorator\n@inline function fromHex(ch: u32): u32 {\n return (ch | 32) % 39 - 9;\n}\n\n// @ts-ignore: decorator\n@inline function utf8LenFromUpperByte(c0: u32): u32 {\n // same as\n // if (c0 - 0xC0 <= 0xDF - 0xC0) return 2;\n // if (c0 - 0xE0 <= 0xEF - 0xE0) return 3;\n // if (c0 - 0xF0 <= 0xF7 - 0xF0) return 4;\n // return 0;\n return c0 - 0xC0 < 56\n ? clz(~(c0 << 24))\n : 0;\n}\n\n// @ts-ignore: decorator\n@inline function isReserved(ch: u32): bool {\n return ch - 35 < 30\n ? load(URI_RESERVED + (ch - 35))\n : false;\n}\n\n// @ts-ignore: decorator\n@inline function isHex(ch: u32): bool {\n return (ch - CharCode._0 < 10) || ((ch | 32) - CharCode.a < 6);\n}\n", - "vector": "/** Vector abstraction. */\n@final @unmanaged\nexport abstract class V128 {\n}\n", - "wasi/index": "import {\n proc_exit,\n fd_write,\n iovec,\n random_get,\n tempbuf\n} from \"bindings/wasi\";\n\nimport {\n MAX_DOUBLE_LENGTH,\n decimalCount32,\n dtoa_buffered\n} from \"util/number\";\n\n// @ts-ignore: decorator\n@global @inline const ASC_WASI = true; // eslint-disable-line @typescript-eslint/no-unused-vars\n\nfunction abort( // eslint-disable-line @typescript-eslint/no-unused-vars\n message: string | null = null,\n fileName: string | null = null,\n lineNumber: u32 = 0,\n columnNumber: u32 = 0\n): void {\n // 0: iov.buf\n // 4: iov.buf_len\n // 8: len\n // 12: buf...\n const iovPtr: usize = 0;\n const lenPtr: usize = iovPtr + offsetof();\n const bufPtr: usize = lenPtr + sizeof();\n changetype(iovPtr).buf = bufPtr;\n var ptr = bufPtr;\n store(ptr, 0x203A74726F6261); ptr += 7; // 'abort: '\n if (message !== null) {\n ptr += String.UTF8.encodeUnsafe(changetype(message), message.length, ptr);\n }\n store(ptr, 0x206E6920); ptr += 4; // ' in '\n if (fileName !== null) {\n ptr += String.UTF8.encodeUnsafe(changetype(fileName), fileName.length, ptr);\n }\n store(ptr++, 0x28); // (\n var len = decimalCount32(lineNumber); ptr += len;\n do {\n let t = lineNumber / 10;\n store(--ptr, 0x30 + lineNumber % 10);\n lineNumber = t;\n } while (lineNumber); ptr += len;\n store(ptr++, 0x3A); // :\n len = decimalCount32(columnNumber); ptr += len;\n do {\n let t = columnNumber / 10;\n store(--ptr, 0x30 + columnNumber % 10);\n columnNumber = t;\n } while (columnNumber); ptr += len;\n store(ptr, 0x0A29); ptr += 2; // )\\n\n changetype(iovPtr).buf_len = ptr - bufPtr;\n fd_write(2, iovPtr, 1, lenPtr);\n proc_exit(255);\n}\n\nfunction trace( // eslint-disable-line @typescript-eslint/no-unused-vars\n message: string,\n n: i32 = 0,\n a0: f64 = 0,\n a1: f64 = 0,\n a2: f64 = 0,\n a3: f64 = 0,\n a4: f64 = 0\n): void {\n // 0: iov.buf\n // 4: iov.buf_len\n // 8: len\n // 12: buf...\n var iovPtr = __alloc(offsetof() + sizeof() + 1 + (max(String.UTF8.byteLength(message), MAX_DOUBLE_LENGTH << 1)));\n var lenPtr = iovPtr + offsetof();\n var bufPtr = lenPtr + sizeof();\n changetype(iovPtr).buf = bufPtr;\n store(bufPtr, 0x203A6563617274); // 'trace: '\n changetype(iovPtr).buf_len = 7;\n fd_write(2, iovPtr, 1, lenPtr);\n changetype(iovPtr).buf_len = String.UTF8.encodeUnsafe(changetype(message), message.length, bufPtr);\n fd_write(2, iovPtr, 1, lenPtr);\n if (n) {\n store(bufPtr++, 0x20); // space\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a0), bufPtr);\n fd_write(2, iovPtr, 1, lenPtr);\n if (n > 1) {\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a1), bufPtr);\n fd_write(2, iovPtr, 1, lenPtr);\n if (n > 2) {\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a2), bufPtr);\n fd_write(2, iovPtr, 1, lenPtr);\n if (n > 3) {\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a3), bufPtr);\n fd_write(2, iovPtr, 1, lenPtr);\n if (n > 4) {\n changetype(iovPtr).buf_len = 1 + String.UTF8.encodeUnsafe(bufPtr, dtoa_buffered(bufPtr, a4), bufPtr);\n fd_write(2, iovPtr, 1, lenPtr);\n }\n }\n }\n }\n --bufPtr;\n }\n store(bufPtr, 0x0A); // \\n\n changetype(iovPtr).buf_len = 1;\n fd_write(2, iovPtr, 1, lenPtr);\n __free(iovPtr);\n}\n\nfunction seed(): f64 { // eslint-disable-line @typescript-eslint/no-unused-vars\n var rand: u64;\n do {\n random_get(tempbuf, 8);\n rand = load(tempbuf);\n } while (!rand);\n return reinterpret(rand);\n}\n\nexport * from \"bindings/wasi\";\n" -}; diff --git a/src/diagnosticMessages.generated.ts b/src/diagnosticMessages.generated.ts deleted file mode 100644 index cd7016e15b..0000000000 --- a/src/diagnosticMessages.generated.ts +++ /dev/null @@ -1,370 +0,0 @@ -// GENERATED FILE. DO NOT EDIT. - -/** Enum of available diagnostic codes. */ -export enum DiagnosticCode { - Not_implemented_0 = 100, - Operation_is_unsafe = 101, - User_defined_0 = 102, - Feature_0_is_not_enabled = 103, - Low_memory_limit_exceeded_by_static_data_0_1 = 104, - Module_requires_at_least_0_pages_of_initial_memory = 105, - Module_requires_at_least_0_pages_of_maximum_memory = 106, - Shared_memory_requires_maximum_memory_to_be_defined = 107, - Shared_memory_requires_feature_threads_to_be_enabled = 108, - Transform_0_1 = 109, - Conversion_from_type_0_to_1_requires_an_explicit_cast = 200, - Conversion_from_type_0_to_1_will_require_an_explicit_cast_when_switching_between_32_64_bit = 201, - Type_0_cannot_be_changed_to_type_1 = 202, - Operation_0_cannot_be_applied_to_type_1 = 203, - Type_0_cannot_be_nullable = 204, - Cannot_export_a_mutable_global = 205, - Mutable_value_cannot_be_inlined = 206, - Unmanaged_classes_cannot_extend_managed_classes_and_vice_versa = 207, - Unmanaged_classes_cannot_implement_interfaces = 208, - Invalid_regular_expression_flags = 209, - Expression_is_never_null = 210, - Class_0_is_final_and_cannot_be_extended = 211, - Decorator_0_is_not_valid_here = 212, - Duplicate_decorator = 213, - Type_0_is_illegal_in_this_context = 214, - Optional_parameter_must_have_an_initializer = 215, - Class_0_cannot_declare_a_constructor_when_instantiated_from_an_object_literal = 216, - Function_0_cannot_be_inlined_into_itself = 217, - Cannot_access_method_0_without_calling_it_as_it_requires_this_to_be_set = 218, - Optional_properties_are_not_supported = 219, - Expression_must_be_a_compile_time_constant = 220, - Type_0_is_not_a_function_index_or_function_reference = 221, - _0_must_be_a_value_between_1_and_2_inclusive = 222, - _0_must_be_a_power_of_two = 223, - _0_is_not_a_valid_operator = 224, - Expression_cannot_be_represented_by_a_type = 225, - Expression_resolves_to_unusual_type_0 = 226, - Array_literal_expected = 227, - Function_0_is_virtual_and_will_not_be_inlined = 228, - Property_0_only_has_a_setter_and_is_missing_a_getter = 229, - _0_keyword_cannot_be_used_here = 230, - A_class_with_a_constructor_explicitly_returning_something_else_than_this_must_be_final = 231, - Property_0_is_always_assigned_before_being_used = 233, - Expression_refers_to_a_static_element_that_does_not_compile_to_a_value_at_runtime = 234, - Importing_the_table_disables_some_indirect_call_optimizations = 901, - Exporting_the_table_disables_some_indirect_call_optimizations = 902, - Expression_compiles_to_a_dynamic_check_at_runtime = 903, - Indexed_access_may_involve_bounds_checking = 904, - Explicitly_returning_constructor_drops_this_allocation = 905, - Unnecessary_definite_assignment = 906, - Exported_generic_function_or_class_has_no_concrete_instances = 907, - Unterminated_string_literal = 1002, - Identifier_expected = 1003, - _0_expected = 1005, - A_file_cannot_have_a_reference_to_itself = 1006, - Trailing_comma_not_allowed = 1009, - Unexpected_token = 1012, - A_rest_parameter_must_be_last_in_a_parameter_list = 1014, - Parameter_cannot_have_question_mark_and_initializer = 1015, - A_required_parameter_cannot_follow_an_optional_parameter = 1016, - Statements_are_not_allowed_in_ambient_contexts = 1036, - Initializers_are_not_allowed_in_ambient_contexts = 1039, - _0_modifier_cannot_be_used_here = 1042, - A_rest_parameter_cannot_be_optional = 1047, - A_rest_parameter_cannot_have_an_initializer = 1048, - A_set_accessor_must_have_exactly_one_parameter = 1049, - A_set_accessor_parameter_cannot_have_an_initializer = 1052, - A_get_accessor_cannot_have_parameters = 1054, - Enum_member_must_have_initializer = 1061, - Type_parameters_cannot_appear_on_a_constructor_declaration = 1092, - Type_annotation_cannot_appear_on_a_constructor_declaration = 1093, - An_accessor_cannot_have_type_parameters = 1094, - A_set_accessor_cannot_have_a_return_type_annotation = 1095, - Type_parameter_list_cannot_be_empty = 1098, - Type_argument_list_cannot_be_empty = 1099, - A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement = 1104, - A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement = 1105, - A_return_statement_can_only_be_used_within_a_function_body = 1108, - Expression_expected = 1109, - Type_expected = 1110, - A_default_clause_cannot_appear_more_than_once_in_a_switch_statement = 1113, - Duplicate_label_0 = 1114, - An_export_assignment_cannot_have_modifiers = 1120, - Octal_literals_are_not_allowed_in_strict_mode = 1121, - Digit_expected = 1124, - Hexadecimal_digit_expected = 1125, - Unexpected_end_of_text = 1126, - Invalid_character = 1127, - _case_or_default_expected = 1130, - _super_must_be_followed_by_an_argument_list_or_member_access = 1034, - A_declare_modifier_cannot_be_used_in_an_already_ambient_context = 1038, - Type_argument_expected = 1140, - String_literal_expected = 1141, - Line_break_not_permitted_here = 1142, - Declaration_expected = 1146, - _const_declarations_must_be_initialized = 1155, - Unterminated_regular_expression_literal = 1161, - Interface_declaration_cannot_have_implements_clause = 1176, - Binary_digit_expected = 1177, - Octal_digit_expected = 1178, - An_implementation_cannot_be_declared_in_ambient_contexts = 1183, - The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer = 1190, - An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive = 1198, - Unterminated_Unicode_escape_sequence = 1199, - Decorators_are_not_valid_here = 1206, - _abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration = 1242, - Method_0_cannot_have_an_implementation_because_it_is_marked_abstract = 1245, - A_definite_assignment_assertion_is_not_permitted_in_this_context = 1255, - A_class_may_only_extend_another_class = 1311, - A_parameter_property_cannot_be_declared_using_a_rest_parameter = 1317, - An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal = 1351, - Duplicate_identifier_0 = 2300, - Cannot_find_name_0 = 2304, - Module_0_has_no_exported_member_1 = 2305, - An_interface_can_only_extend_an_interface = 2312, - Generic_type_0_requires_1_type_argument_s = 2314, - Type_0_is_not_generic = 2315, - Type_0_is_not_assignable_to_type_1 = 2322, - Index_signature_is_missing_in_type_0 = 2329, - _this_cannot_be_referenced_in_current_location = 2332, - _this_cannot_be_referenced_in_constructor_arguments = 2333, - _super_can_only_be_referenced_in_a_derived_class = 2335, - _super_cannot_be_referenced_in_constructor_arguments = 2336, - Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors = 2337, - Property_0_does_not_exist_on_type_1 = 2339, - Property_0_is_private_and_only_accessible_within_class_1 = 2341, - Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures = 2349, - This_expression_is_not_constructable = 2351, - A_function_whose_declared_type_is_not_void_must_return_a_value = 2355, - The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access = 2357, - The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access = 2364, - Operator_0_cannot_be_applied_to_types_1_and_2 = 2365, - A_super_call_must_be_the_first_statement_in_the_constructor = 2376, - Constructors_for_derived_classes_must_contain_a_super_call = 2377, - Getter_and_setter_accessors_do_not_agree_in_visibility = 2379, - _get_and_set_accessor_must_have_the_same_type = 2380, - Overload_signatures_must_all_be_public_private_or_protected = 2385, - Constructor_implementation_is_missing = 2390, - Function_implementation_is_missing_or_not_immediately_following_the_declaration = 2391, - Multiple_constructor_implementations_are_not_allowed = 2392, - Duplicate_function_implementation = 2393, - This_overload_signature_is_not_compatible_with_its_implementation_signature = 2394, - Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local = 2395, - A_class_can_only_implement_an_interface = 2422, - A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged = 2434, - Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses = 2445, - Variable_0_used_before_its_declaration = 2448, - Cannot_redeclare_block_scoped_variable_0 = 2451, - The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly = 2453, - Type_0_has_no_property_1 = 2460, - The_0_operator_cannot_be_applied_to_type_1 = 2469, - In_const_enum_declarations_member_initializer_must_be_constant_expression = 2474, - Export_declaration_conflicts_with_exported_declaration_of_0 = 2484, - _0_is_referenced_directly_or_indirectly_in_its_own_base_expression = 2506, - Cannot_create_an_instance_of_an_abstract_class = 2511, - Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_2 = 2515, - Object_is_possibly_null = 2531, - Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property = 2540, - The_target_of_an_assignment_must_be_a_variable_or_a_property_access = 2541, - Index_signature_in_type_0_only_permits_reading = 2542, - Expected_0_arguments_but_got_1 = 2554, - Expected_at_least_0_arguments_but_got_1 = 2555, - Expected_0_type_arguments_but_got_1 = 2558, - Property_0_has_no_initializer_and_is_not_assigned_in_the_constructor_before_this_is_used_or_returned = 2564, - Property_0_is_used_before_being_assigned = 2565, - A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums = 2651, - Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration = 2673, - Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration = 2674, - The_this_types_of_each_signature_are_incompatible = 2685, - Namespace_0_has_no_exported_member_1 = 2694, - Required_type_parameters_may_not_follow_optional_type_parameters = 2706, - Duplicate_property_0 = 2718, - Property_0_is_missing_in_type_1_but_required_in_type_2 = 2741, - Type_0_has_no_call_signatures = 2757, - File_0_not_found = 6054, - Numeric_separators_are_not_allowed_here = 6188, - Multiple_consecutive_numeric_separators_are_not_permitted = 6189, - _super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class = 17009, - _super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class = 17011 -} - -/** Translates a diagnostic code to its respective string. */ -export function diagnosticCodeToString(code: DiagnosticCode): string { - switch (code) { - case 100: return "Not implemented: {0}"; - case 101: return "Operation is unsafe."; - case 102: return "User-defined: {0}"; - case 103: return "Feature '{0}' is not enabled."; - case 104: return "Low memory limit exceeded by static data: {0} > {1}"; - case 105: return "Module requires at least '{0}' pages of initial memory."; - case 106: return "Module requires at least '{0}' pages of maximum memory."; - case 107: return "Shared memory requires maximum memory to be defined."; - case 108: return "Shared memory requires feature 'threads' to be enabled."; - case 109: return "Transform '{0}': {1}"; - case 200: return "Conversion from type '{0}' to '{1}' requires an explicit cast."; - case 201: return "Conversion from type '{0}' to '{1}' will require an explicit cast when switching between 32/64-bit."; - case 202: return "Type '{0}' cannot be changed to type '{1}'."; - case 203: return "Operation '{0}' cannot be applied to type '{1}'."; - case 204: return "Type '{0}' cannot be nullable."; - case 205: return "Cannot export a mutable global."; - case 206: return "Mutable value cannot be inlined."; - case 207: return "Unmanaged classes cannot extend managed classes and vice-versa."; - case 208: return "Unmanaged classes cannot implement interfaces."; - case 209: return "Invalid regular expression flags."; - case 210: return "Expression is never 'null'."; - case 211: return "Class '{0}' is final and cannot be extended."; - case 212: return "Decorator '{0}' is not valid here."; - case 213: return "Duplicate decorator."; - case 214: return "Type '{0}' is illegal in this context."; - case 215: return "Optional parameter must have an initializer."; - case 216: return "Class '{0}' cannot declare a constructor when instantiated from an object literal."; - case 217: return "Function '{0}' cannot be inlined into itself."; - case 218: return "Cannot access method '{0}' without calling it as it requires 'this' to be set."; - case 219: return "Optional properties are not supported."; - case 220: return "Expression must be a compile-time constant."; - case 221: return "Type '{0}' is not a function index or function reference."; - case 222: return "'{0}' must be a value between '{1}' and '{2}' inclusive."; - case 223: return "'{0}' must be a power of two."; - case 224: return "'{0}' is not a valid operator."; - case 225: return "Expression cannot be represented by a type."; - case 226: return "Expression resolves to unusual type '{0}'."; - case 227: return "Array literal expected."; - case 228: return "Function '{0}' is virtual and will not be inlined."; - case 229: return "Property '{0}' only has a setter and is missing a getter."; - case 230: return "'{0}' keyword cannot be used here."; - case 231: return "A class with a constructor explicitly returning something else than 'this' must be '@final'."; - case 233: return "Property '{0}' is always assigned before being used."; - case 234: return "Expression refers to a static element that does not compile to a value at runtime."; - case 901: return "Importing the table disables some indirect call optimizations."; - case 902: return "Exporting the table disables some indirect call optimizations."; - case 903: return "Expression compiles to a dynamic check at runtime."; - case 904: return "Indexed access may involve bounds checking."; - case 905: return "Explicitly returning constructor drops 'this' allocation."; - case 906: return "Unnecessary definite assignment."; - case 907: return "Exported generic function or class has no concrete instances."; - case 1002: return "Unterminated string literal."; - case 1003: return "Identifier expected."; - case 1005: return "'{0}' expected."; - case 1006: return "A file cannot have a reference to itself."; - case 1009: return "Trailing comma not allowed."; - case 1012: return "Unexpected token."; - case 1014: return "A rest parameter must be last in a parameter list."; - case 1015: return "Parameter cannot have question mark and initializer."; - case 1016: return "A required parameter cannot follow an optional parameter."; - case 1036: return "Statements are not allowed in ambient contexts."; - case 1039: return "Initializers are not allowed in ambient contexts."; - case 1042: return "'{0}' modifier cannot be used here."; - case 1047: return "A rest parameter cannot be optional."; - case 1048: return "A rest parameter cannot have an initializer."; - case 1049: return "A 'set' accessor must have exactly one parameter."; - case 1052: return "A 'set' accessor parameter cannot have an initializer."; - case 1054: return "A 'get' accessor cannot have parameters."; - case 1061: return "Enum member must have initializer."; - case 1092: return "Type parameters cannot appear on a constructor declaration."; - case 1093: return "Type annotation cannot appear on a constructor declaration."; - case 1094: return "An accessor cannot have type parameters."; - case 1095: return "A 'set' accessor cannot have a return type annotation."; - case 1098: return "Type parameter list cannot be empty."; - case 1099: return "Type argument list cannot be empty."; - case 1104: return "A 'continue' statement can only be used within an enclosing iteration statement."; - case 1105: return "A 'break' statement can only be used within an enclosing iteration or switch statement."; - case 1108: return "A 'return' statement can only be used within a function body."; - case 1109: return "Expression expected."; - case 1110: return "Type expected."; - case 1113: return "A 'default' clause cannot appear more than once in a 'switch' statement."; - case 1114: return "Duplicate label '{0}'."; - case 1120: return "An export assignment cannot have modifiers."; - case 1121: return "Octal literals are not allowed in strict mode."; - case 1124: return "Digit expected."; - case 1125: return "Hexadecimal digit expected."; - case 1126: return "Unexpected end of text."; - case 1127: return "Invalid character."; - case 1130: return "'case' or 'default' expected."; - case 1034: return "'super' must be followed by an argument list or member access."; - case 1038: return "A 'declare' modifier cannot be used in an already ambient context."; - case 1140: return "Type argument expected."; - case 1141: return "String literal expected."; - case 1142: return "Line break not permitted here."; - case 1146: return "Declaration expected."; - case 1155: return "'const' declarations must be initialized."; - case 1161: return "Unterminated regular expression literal."; - case 1176: return "Interface declaration cannot have 'implements' clause."; - case 1177: return "Binary digit expected."; - case 1178: return "Octal digit expected."; - case 1183: return "An implementation cannot be declared in ambient contexts."; - case 1190: return "The variable declaration of a 'for...of' statement cannot have an initializer."; - case 1198: return "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."; - case 1199: return "Unterminated Unicode escape sequence."; - case 1206: return "Decorators are not valid here."; - case 1242: return "'abstract' modifier can only appear on a class, method, or property declaration."; - case 1245: return "Method '{0}' cannot have an implementation because it is marked abstract."; - case 1255: return "A definite assignment assertion '!' is not permitted in this context."; - case 1311: return "A class may only extend another class."; - case 1317: return "A parameter property cannot be declared using a rest parameter."; - case 1351: return "An identifier or keyword cannot immediately follow a numeric literal."; - case 2300: return "Duplicate identifier '{0}'."; - case 2304: return "Cannot find name '{0}'."; - case 2305: return "Module '{0}' has no exported member '{1}'."; - case 2312: return "An interface can only extend an interface."; - case 2314: return "Generic type '{0}' requires {1} type argument(s)."; - case 2315: return "Type '{0}' is not generic."; - case 2322: return "Type '{0}' is not assignable to type '{1}'."; - case 2329: return "Index signature is missing in type '{0}'."; - case 2332: return "'this' cannot be referenced in current location."; - case 2333: return "'this' cannot be referenced in constructor arguments."; - case 2335: return "'super' can only be referenced in a derived class."; - case 2336: return "'super' cannot be referenced in constructor arguments."; - case 2337: return "Super calls are not permitted outside constructors or in nested functions inside constructors."; - case 2339: return "Property '{0}' does not exist on type '{1}'."; - case 2341: return "Property '{0}' is private and only accessible within class '{1}'."; - case 2349: return "Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures."; - case 2351: return "This expression is not constructable."; - case 2355: return "A function whose declared type is not 'void' must return a value."; - case 2357: return "The operand of an increment or decrement operator must be a variable or a property access."; - case 2364: return "The left-hand side of an assignment expression must be a variable or a property access."; - case 2365: return "Operator '{0}' cannot be applied to types '{1}' and '{2}'."; - case 2376: return "A 'super' call must be the first statement in the constructor."; - case 2377: return "Constructors for derived classes must contain a 'super' call."; - case 2379: return "Getter and setter accessors do not agree in visibility."; - case 2380: return "'get' and 'set' accessor must have the same type."; - case 2385: return "Overload signatures must all be public, private or protected."; - case 2390: return "Constructor implementation is missing."; - case 2391: return "Function implementation is missing or not immediately following the declaration."; - case 2392: return "Multiple constructor implementations are not allowed."; - case 2393: return "Duplicate function implementation."; - case 2394: return "This overload signature is not compatible with its implementation signature."; - case 2395: return "Individual declarations in merged declaration '{0}' must be all exported or all local."; - case 2422: return "A class can only implement an interface."; - case 2434: return "A namespace declaration cannot be located prior to a class or function with which it is merged."; - case 2445: return "Property '{0}' is protected and only accessible within class '{1}' and its subclasses."; - case 2448: return "Variable '{0}' used before its declaration."; - case 2451: return "Cannot redeclare block-scoped variable '{0}'"; - case 2453: return "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly."; - case 2460: return "Type '{0}' has no property '{1}'."; - case 2469: return "The '{0}' operator cannot be applied to type '{1}'."; - case 2474: return "In 'const' enum declarations member initializer must be constant expression."; - case 2484: return "Export declaration conflicts with exported declaration of '{0}'."; - case 2506: return "'{0}' is referenced directly or indirectly in its own base expression."; - case 2511: return "Cannot create an instance of an abstract class."; - case 2515: return "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from '{2}'."; - case 2531: return "Object is possibly 'null'."; - case 2540: return "Cannot assign to '{0}' because it is a constant or a read-only property."; - case 2541: return "The target of an assignment must be a variable or a property access."; - case 2542: return "Index signature in type '{0}' only permits reading."; - case 2554: return "Expected {0} arguments, but got {1}."; - case 2555: return "Expected at least {0} arguments, but got {1}."; - case 2558: return "Expected {0} type arguments, but got {1}."; - case 2564: return "Property '{0}' has no initializer and is not assigned in the constructor before 'this' is used or returned."; - case 2565: return "Property '{0}' is used before being assigned."; - case 2651: return "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."; - case 2673: return "Constructor of class '{0}' is private and only accessible within the class declaration."; - case 2674: return "Constructor of class '{0}' is protected and only accessible within the class declaration."; - case 2685: return "The 'this' types of each signature are incompatible."; - case 2694: return "Namespace '{0}' has no exported member '{1}'."; - case 2706: return "Required type parameters may not follow optional type parameters."; - case 2718: return "Duplicate property '{0}'."; - case 2741: return "Property '{0}' is missing in type '{1}' but required in type '{2}'."; - case 2757: return "Type '{0}' has no call signatures."; - case 6054: return "File '{0}' not found."; - case 6188: return "Numeric separators are not allowed here."; - case 6189: return "Multiple consecutive numeric separators are not permitted."; - case 17009: return "'super' must be called before accessing 'this' in the constructor of a derived class."; - case 17011: return "'super' must be called before accessing a property of 'super' in the constructor of a derived class."; - default: return ""; - } -} From d048c1e1446a17fd5055c23e03101c5b2d7f7aa4 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 06:31:12 +0100 Subject: [PATCH 014/175] readit --- cli/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/README.md b/cli/README.md index 57347e56c0..7b87b0954d 100644 --- a/cli/README.md +++ b/cli/README.md @@ -1,5 +1,5 @@ -Compiler frontend for node.js -============================= +Frontend for Node.js +==================== Usage ----- From d3a12745c26f66ec2eb6cc03aa91822269364046 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 06:33:57 +0100 Subject: [PATCH 015/175] remove old binaryen tests --- tests/README.md | 1 - tests/binaryen/asmjs-math-builtins.js | 45 ---------------- tests/binaryen/asmjs.wat | 24 --------- tests/binaryen/block-pre.js | 26 --------- tests/binaryen/block-stack.js | 19 ------- tests/binaryen/break-value.js | 24 --------- tests/binaryen/const-expr.js | 29 ---------- tests/binaryen/const-expr.wat | 19 ------- tests/binaryen/const-global.js | 18 ------- tests/binaryen/const-global.wat | 8 --- tests/binaryen/const-local.js | 18 ------- tests/binaryen/constant-indirect-arg.js | 26 --------- tests/binaryen/constant-indirect.js | 22 -------- tests/binaryen/get_global-missing.js | 17 ------ tests/binaryen/get_local-missing.js | 19 ------- tests/binaryen/i64-binary-result.js | 18 ------- tests/binaryen/inline-export.js | 39 -------------- tests/binaryen/libm.html | 22 -------- tests/binaryen/multi-value.js | 15 ------ tests/binaryen/optimize-if-eqz.js | 19 ------- tests/binaryen/optimize-if-eqz.wat | 14 ----- tests/binaryen/precompute-join.wat | 20 ------- tests/binaryen/reloop.js | 71 ------------------------- tests/binaryen/return-flatten.js | 19 ------- tests/binaryen/set_global-immutable.js | 16 ------ tests/binaryen/unreachable-loop.js | 23 -------- tests/binaryen/unreachable-loop.wat | 11 ---- tests/binaryen/unreachable-spam.js | 25 --------- 28 files changed, 627 deletions(-) delete mode 100644 tests/binaryen/asmjs-math-builtins.js delete mode 100644 tests/binaryen/asmjs.wat delete mode 100644 tests/binaryen/block-pre.js delete mode 100644 tests/binaryen/block-stack.js delete mode 100644 tests/binaryen/break-value.js delete mode 100644 tests/binaryen/const-expr.js delete mode 100644 tests/binaryen/const-expr.wat delete mode 100644 tests/binaryen/const-global.js delete mode 100644 tests/binaryen/const-global.wat delete mode 100644 tests/binaryen/const-local.js delete mode 100644 tests/binaryen/constant-indirect-arg.js delete mode 100644 tests/binaryen/constant-indirect.js delete mode 100644 tests/binaryen/get_global-missing.js delete mode 100644 tests/binaryen/get_local-missing.js delete mode 100644 tests/binaryen/i64-binary-result.js delete mode 100644 tests/binaryen/inline-export.js delete mode 100644 tests/binaryen/libm.html delete mode 100644 tests/binaryen/multi-value.js delete mode 100644 tests/binaryen/optimize-if-eqz.js delete mode 100644 tests/binaryen/optimize-if-eqz.wat delete mode 100644 tests/binaryen/precompute-join.wat delete mode 100644 tests/binaryen/reloop.js delete mode 100644 tests/binaryen/return-flatten.js delete mode 100644 tests/binaryen/set_global-immutable.js delete mode 100644 tests/binaryen/unreachable-loop.js delete mode 100644 tests/binaryen/unreachable-loop.wat delete mode 100644 tests/binaryen/unreachable-spam.js diff --git a/tests/README.md b/tests/README.md index 2dc6fd42f9..d16e1d547a 100644 --- a/tests/README.md +++ b/tests/README.md @@ -122,6 +122,5 @@ Other Tests in other directories are not run automatically and do not need to be updated. * [tests/allocators](./allocators) contains the memory allocator test suite -* [tests/binaryen](./binaryen) contains various triggers for earlier Binaryen issues * [tests/tokenizer](./tokenizer.js) is a visual test for the tokenizer tokenizing itself * [tests/util-path](./util-path.js) is a sanity test for the path utility diff --git a/tests/binaryen/asmjs-math-builtins.js b/tests/binaryen/asmjs-math-builtins.js deleted file mode 100644 index d60abbe2ea..0000000000 --- a/tests/binaryen/asmjs-math-builtins.js +++ /dev/null @@ -1,45 +0,0 @@ -var binaryen = require("binaryen"); - -var mod = new binaryen.Module(); -var funcType = mod.addFunctionType("F", binaryen.f64, [ binaryen.f64 ]); - -mod.addFunction("floor", funcType, [], - mod.f64.floor( - mod.get_local(0, binaryen.f64) - ) -); -mod.addExport("floor", "floor"); - -mod.addFunction("ceil", funcType, [], - mod.f64.ceil( - mod.get_local(0, binaryen.f64) - ) -); -mod.addExport("ceil", "ceil"); - -mod.addFunction("sqrt", funcType, [], - mod.f64.sqrt( - mod.get_local(0, binaryen.f64) - ) -); -mod.addExport("sqrt", "sqrt"); - -mod.addFunction("trunc", funcType, [], - mod.f64.trunc( - mod.get_local(0, binaryen.f64) - ) -); -mod.addExport("trunc", "trunc"); - -mod.addFunction("nearest", funcType, [], - mod.f64.nearest( - mod.get_local(0, binaryen.f64) - ) -); -mod.addExport("nearest", "nearest"); - -console.log(mod.emitText()); -if (!mod.validate()) - console.log("-> does not validate"); - -console.log(mod.emitAsmjs()); diff --git a/tests/binaryen/asmjs.wat b/tests/binaryen/asmjs.wat deleted file mode 100644 index 89fdedb9c6..0000000000 --- a/tests/binaryen/asmjs.wat +++ /dev/null @@ -1,24 +0,0 @@ -(module - (type $i (func (param i32) (result i32))) - (memory $0 0) - (export "test/switch/case/eval" (func $test/switch/case/eval)) - (export "const" (func $test/switch/case/eval)) - (import "env" "switch" (func $switch (param i32 i32 i32 i32))) - (global $INT i32 (i32.const 4)) - (global $FLT i32 (f32.const -4.0)) - (global $DBL i32 (f64.const -4.0)) - (func $test/switch/case/eval (; 0 ;) (type $i) (param $0 i32) (result i32) - (if (result i32) - (i32.eq - (get_global $INT) - (i32.load - (i32.const 0) - ) - ) - (i32.ctz - (i32.const 0) - ) - (get_local $0) - ) - ) -) \ No newline at end of file diff --git a/tests/binaryen/block-pre.js b/tests/binaryen/block-pre.js deleted file mode 100644 index 90689be029..0000000000 --- a/tests/binaryen/block-pre.js +++ /dev/null @@ -1,26 +0,0 @@ -var binaryen = require("binaryen"); -var mod = binaryen.parseText(` -(module - (global $ref (mut i32) (i32.const 1)) - (func $test - (call $release - (block (result i32) - (global.get $ref) - (global.set $ref - (call $retain - (i32.const 2) (; some-expression-that-might-conflict-with-a-temp ;) - ) - ) - ) - ) - ) - (func $retain (param i32) (result i32) - (local.get 0) - ) - (func $release (param i32) - (nop) - ) -) -`); -if (!mod.validate()) console.log(":-("); -else console.log(mod.emitText()); diff --git a/tests/binaryen/block-stack.js b/tests/binaryen/block-stack.js deleted file mode 100644 index 229e14834c..0000000000 --- a/tests/binaryen/block-stack.js +++ /dev/null @@ -1,19 +0,0 @@ -var binaryen = require("binaryen"); - -// "non-final block elements returning a value must be drop()ed" -// "0 == 0: block with value must not have last element that is none, on" - -var mod = new binaryen.Module(); - -var funcType = mod.addFunctionType("i", binaryen.i32, []); -var func = mod.addFunction("test", funcType, [ binaryen.i32 ], - mod.block("", [ - mod.teeLocal(0, mod.i32.const(1)), - mod.nop() - ], binaryen.i32) -); -mod.addExport("test", func); - -console.log(mod.emitText()); -if (!mod.validate()) - console.log("-> does not validate"); diff --git a/tests/binaryen/break-value.js b/tests/binaryen/break-value.js deleted file mode 100644 index dc280ddd90..0000000000 --- a/tests/binaryen/break-value.js +++ /dev/null @@ -1,24 +0,0 @@ -var binaryen = require("binaryen"); - -var mod = new binaryen.Module(); -var ftype = mod.addFunctionType("ii", binaryen.i32, [ binaryen.i32 ]); -mod.addFunction("test", ftype, [], - mod.block("label", [ - mod.drop( // "br_if returns the value too" - mod.break("label", - // condition: $0 == 1 - mod.i32.eq( - mod.getLocal(0, binaryen.i32), - mod.i32.const(1) - ), - // value: 1 - mod.i32.const(1) - ) - ), - // push: 0 - mod.i32.const(0) - ], binaryen.i32) -); -console.log(mod.emitText()); - -mod.validate(); diff --git a/tests/binaryen/const-expr.js b/tests/binaryen/const-expr.js deleted file mode 100644 index 61b3ddcaa6..0000000000 --- a/tests/binaryen/const-expr.js +++ /dev/null @@ -1,29 +0,0 @@ -var binaryen = require("binaryen"); - -var mod = new binaryen.Module(); - -var addType = mod.addFunctionType("iii", binaryen.i32, [ binaryen.i32, binaryen.i32 ]); -mod.addFunction("add", addType, [], - mod.i32.add( - mod.get_local(0, binaryen.i32), - mod.get_local(1, binaryen.i32) - ) -); -mod.addFunctionExport("add", "add"); - -var testType = mod.addFunctionType("i", binaryen.i32, []); -mod.addFunction("test", testType, [], - mod.call("add", [ - mod.i32.const(1), - mod.i32.const(2) - ], binaryen.i32) -); -mod.addFunctionExport("test", "test"); - -binaryen.setOptimizeLevel(4); -binaryen.setShrinkLevel(0); -binaryen.setDebugInfo(false); -mod.runPasses(["precompute"]); -if (!mod.validate()) - console.log("-> does not validate"); -console.log(mod.emitText()); diff --git a/tests/binaryen/const-expr.wat b/tests/binaryen/const-expr.wat deleted file mode 100644 index 936b198e1f..0000000000 --- a/tests/binaryen/const-expr.wat +++ /dev/null @@ -1,19 +0,0 @@ -(module - (type $iii (func (param i32 i32) (result i32))) - (type $i (func (result i32))) - (export "add" (func $add)) - (export "test" (func $test)) - (func $add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) - (i32.add - (get_local $0) - (get_local $1) - ) - ) - (func $test (; 1 ;) (type $i) (result i32) - (call $add - (i32.const 1) - (i32.const 2) - ) - ) -) - diff --git a/tests/binaryen/const-global.js b/tests/binaryen/const-global.js deleted file mode 100644 index bd10d398be..0000000000 --- a/tests/binaryen/const-global.js +++ /dev/null @@ -1,18 +0,0 @@ -var binaryen = require("binaryen"); - -var mod = new binaryen.Module(); - -mod.addGlobal("testGlobal", binaryen.i32, false, mod.i32.const(2)); -var funcType = mod.addFunctionType("i", binaryen.i32, []); -mod.addFunction("test", funcType, [], - mod.get_global("testGlobal", binaryen.i32) -); -mod.addFunctionExport("test", "test"); - -binaryen.setOptimizeLevel(4); -binaryen.setShrinkLevel(0); -binaryen.setDebugInfo(false); -mod.optimize(); -if (!mod.validate()) - console.log("-> does not validate"); -console.log(mod.emitText()); diff --git a/tests/binaryen/const-global.wat b/tests/binaryen/const-global.wat deleted file mode 100644 index 5b91d25ace..0000000000 --- a/tests/binaryen/const-global.wat +++ /dev/null @@ -1,8 +0,0 @@ -(module - (type $i (func (result i32))) - (global $testGlobal i32 (i32.const 2)) - (export "test" (func $test)) - (func $test (; 0 ;) (type $i) (result i32) - (get_global $testGlobal) - ) -) \ No newline at end of file diff --git a/tests/binaryen/const-local.js b/tests/binaryen/const-local.js deleted file mode 100644 index 3592282a2b..0000000000 --- a/tests/binaryen/const-local.js +++ /dev/null @@ -1,18 +0,0 @@ -var binaryen = require("binaryen"); - -var mod = new binaryen.Module(); - -var funcType = mod.addFunctionType("i", binaryen.i32, [ binaryen.i32 ]); -mod.addFunction("test", funcType, [], mod.block("", [ - mod.setLocal(0, mod.i32.const(2)), - mod.getLocal(0, binaryen.i32) -], binaryen.i32)); -mod.addFunctionExport("test", "test"); - -binaryen.setOptimizeLevel(4); -binaryen.setShrinkLevel(0); -binaryen.setDebugInfo(false); -mod.optimize(); -if (!mod.validate()) - console.log("-> does not validate"); -console.log(mod.emitText()); diff --git a/tests/binaryen/constant-indirect-arg.js b/tests/binaryen/constant-indirect-arg.js deleted file mode 100644 index 080faed8db..0000000000 --- a/tests/binaryen/constant-indirect-arg.js +++ /dev/null @@ -1,26 +0,0 @@ -var binaryen = require("binaryen"); - -var mod = new binaryen.Module(); - -var ftype_v = mod.addFunctionType("v", binaryen.none, []); -var ftype_vi = mod.addFunctionType("vi", binaryen.none, [ binaryen.i32 ]); - -mod.addFunction("callee-2", ftype_v, [], mod.block(null, [ -])); -mod.addFunction("callee-1", ftype_vi, [], mod.block(null, [ - mod.call_indirect(mod.getLocal(0, binaryen.i32), [], "v"), -])); -mod.setFunctionTable(2, 2, [ "callee-1", "callee-2" ]); - -mod.addFunction("caller", ftype_vi, [ binaryen.i32 ], mod.block(null, [ - mod.call_indirect(mod.getLocal(0, binaryen.i32), [ mod.i32.const(1) ], "vi"), -])); -mod.addFunctionExport("caller", "main"); - -binaryen.setOptimizeLevel(4); -binaryen.setShrinkLevel(0); -binaryen.setDebugInfo(false); -mod.optimize(); -if (!mod.validate()) - console.log("-> does not validate"); -console.log(mod.emitText()); diff --git a/tests/binaryen/constant-indirect.js b/tests/binaryen/constant-indirect.js deleted file mode 100644 index 2b017703de..0000000000 --- a/tests/binaryen/constant-indirect.js +++ /dev/null @@ -1,22 +0,0 @@ -var binaryen = require("binaryen"); - -var mod = new binaryen.Module(); - -var ftype = mod.addFunctionType("v", binaryen.none, []); - -mod.addFunction("callee", ftype, [], mod.block(null, [ -])); -mod.setFunctionTable(1, 1, [ "callee" ]); - -mod.addFunction("caller", ftype, [], mod.block(null, [ - mod.call_indirect(mod.i32.const(0), [], "v"), -])); -mod.addFunctionExport("caller", "main"); - -binaryen.setOptimizeLevel(4); -binaryen.setShrinkLevel(0); -binaryen.setDebugInfo(false); -mod.optimize(); -if (!mod.validate()) - console.log("-> does not validate"); -console.log(mod.emitText()); diff --git a/tests/binaryen/get_global-missing.js b/tests/binaryen/get_global-missing.js deleted file mode 100644 index 58230c6e0c..0000000000 --- a/tests/binaryen/get_global-missing.js +++ /dev/null @@ -1,17 +0,0 @@ -var binaryen = require("binaryen"); - -var mod = new binaryen.Module(); -var funcType = mod.addFunctionType("v", binaryen.void, []); -var func = mod.addFunction("test", funcType, [], - mod.block("", [ - mod.drop( - mod.getGlobal("missing", binaryen.i32) - ) - ]) -); -mod.addFunctionExport("test", "test", func); - -console.log(mod.emitText()); -if (mod.validate()) - console.log("-> validates"); -mod.emitBinary(); // -> Assertion failed: mappedGlobals.count(name), at: binaryen/src/wasm/wasm-binary.cpp,355,getGlobalIndex at Error diff --git a/tests/binaryen/get_local-missing.js b/tests/binaryen/get_local-missing.js deleted file mode 100644 index 6abae3a4cb..0000000000 --- a/tests/binaryen/get_local-missing.js +++ /dev/null @@ -1,19 +0,0 @@ -var binaryen = require("binaryen"); - -var mod = new binaryen.Module(); -var funcType = mod.addFunctionType("v", binaryen.void, []); -var func = mod.addFunction("test", funcType, [], - mod.block("", [ - mod.drop( - mod.getLocal(0, binaryen.i32) - ) - ]) -); -mod.addFunctionExport("test", "test", func); - -console.log(mod.emitText()); -if (mod.validate()) { - console.log("-> validates"); - var binary = mod.emitBinary(); - new WebAssembly.Module(binary); // CompileError: WebAssembly.Module(): Compiling wasm function #0:test failed: invalid local index: 0 @+34 -} diff --git a/tests/binaryen/i64-binary-result.js b/tests/binaryen/i64-binary-result.js deleted file mode 100644 index 59ae862120..0000000000 --- a/tests/binaryen/i64-binary-result.js +++ /dev/null @@ -1,18 +0,0 @@ -var binaryen = require("binaryen"); - -// "non-final block elements returning a value must be drop()ed" -// "0 == 0: block with value must not have last element that is none, on" - -var mod = new binaryen.Module(); - -var funcType = mod.addFunctionType("I", binaryen.void, [ binaryen.i64 ]); -var func = mod.addFunction("test", funcType, [ binaryen.i32 ], - mod.block("", [ - mod.setLocal(1, mod.i64.eq(mod.i64.const(0, 0), mod.getLocal(0, binaryen.i64))) - ]) -); -mod.addExport("test", func); - -console.log(mod.emitText()); -if (mod.validate()) - console.log("-> ok: i64.eq returns i32"); diff --git a/tests/binaryen/inline-export.js b/tests/binaryen/inline-export.js deleted file mode 100644 index 992fd6a8e2..0000000000 --- a/tests/binaryen/inline-export.js +++ /dev/null @@ -1,39 +0,0 @@ -var binaryen = require("binaryen"); - -var mod = new binaryen.Module(); -var funcType = mod.addFunctionType("iii", binaryen.i32, [ binaryen.i32, binaryen.i32 ]); - -mod.addFunction("exported_add", funcType, [], - mod.i32.add( - mod.get_local(0, binaryen.i32), - mod.get_local(1, binaryen.i32) - ) -); -mod.addFunctionExport("exported_add", "add"); - -mod.addFunction("internal_sub", funcType, [], - mod.i32.sub( - mod.get_local(0, binaryen.i32), - mod.get_local(1, binaryen.i32) - ) -); - -mod.addFunction("test", funcType, [], - mod.i32.add( - mod.call("exported_add", [ // should become inlined but doesn't - mod.get_local(0, binaryen.i32), - mod.get_local(1, binaryen.i32) - ], binaryen.i32), - mod.call("internal_sub", [ // just like this one becomes inlined - mod.get_local(0, binaryen.i32), - mod.get_local(1, binaryen.i32) - ], binaryen.i32) - ) -); -mod.addFunctionExport("test", "test"); - -// binaryen.setOptimizeLevel(3); -// binaryen.setShrinkLevel(0); -mod.optimize(); -if (!mod.validate()) throw Error(); -console.log(mod.emitText()); diff --git a/tests/binaryen/libm.html b/tests/binaryen/libm.html deleted file mode 100644 index 54427b5be7..0000000000 --- a/tests/binaryen/libm.html +++ /dev/null @@ -1,22 +0,0 @@ - - diff --git a/tests/binaryen/multi-value.js b/tests/binaryen/multi-value.js deleted file mode 100644 index f9610b0018..0000000000 --- a/tests/binaryen/multi-value.js +++ /dev/null @@ -1,15 +0,0 @@ -var binaryen = require("binaryen"); - -var mod = new binaryen.Module(); -var ii = binaryen.createType([ binaryen.i32, binaryen.i32 ]); -mod.addFunction("test", ii, ii, [], - mod.unreachable() -); -mod.addExport("test", "test"); - -console.log(mod.emitText()); -if (!mod.validate()) - console.log("-> does not validate"); - -mod.optimize(); -console.log(mod.emitText()); diff --git a/tests/binaryen/optimize-if-eqz.js b/tests/binaryen/optimize-if-eqz.js deleted file mode 100644 index fb85fb8289..0000000000 --- a/tests/binaryen/optimize-if-eqz.js +++ /dev/null @@ -1,19 +0,0 @@ -var binaryen = require("binaryen"); - -var mod = new binaryen.Module(); -var funcType = mod.addFunctionType("i", binaryen.i32, [ binaryen.i32 ]); -mod.addFunction("test", funcType, [], - mod.if( - mod.i32.eqz(mod.getLocal(0, binaryen.i32)), - mod.i32.const(0), - mod.getLocal(0, binaryen.i32) - ) -); -mod.addExport("test", "test"); - -console.log(mod.emitText()); -if (!mod.validate()) - console.log("-> does not validate"); - -mod.optimize(); -console.log(mod.emitText()); diff --git a/tests/binaryen/optimize-if-eqz.wat b/tests/binaryen/optimize-if-eqz.wat deleted file mode 100644 index 3f04e0735b..0000000000 --- a/tests/binaryen/optimize-if-eqz.wat +++ /dev/null @@ -1,14 +0,0 @@ -(module - (type $i (func (param i32) (result i32))) - (memory $0 0) - (export "test" (func $test)) - (func $test (; 0 ;) (type $i) (param $0 i32) (result i32) - (if (result i32) - (i32.eqz - (get_local $0) - ) - (i32.const 0) - (get_local $0) - ) - ) -) \ No newline at end of file diff --git a/tests/binaryen/precompute-join.wat b/tests/binaryen/precompute-join.wat deleted file mode 100644 index 6850e1dc3b..0000000000 --- a/tests/binaryen/precompute-join.wat +++ /dev/null @@ -1,20 +0,0 @@ -(module - (type $ii (func (param i32) (result i32))) - (export "fls" (func $assembly/tlsf/fls)) - (func $assembly/tlsf/fls (; 8 ;) (type $ii) (param $0 i32) (result i32) - (return - (i32.sub - (i32.sub - (i32.shl - (i32.const 4) - (i32.const 3) - ) - (i32.clz - (get_local $0) - ) - ) - (i32.const 1) - ) - ) - ) -) diff --git a/tests/binaryen/reloop.js b/tests/binaryen/reloop.js deleted file mode 100644 index 1a4e739ad8..0000000000 --- a/tests/binaryen/reloop.js +++ /dev/null @@ -1,71 +0,0 @@ -var binaryen = require("binaryen"); -binaryen.setOptimizeLevel(3); -binaryen.setShrinkLevel(0); - -function usingBranches() { - var module = new binaryen.Module(); - var rl = new binaryen.Relooper(module); - var entry = rl.addBlock(module.nop()); - - for (let i = 0; i < 10; ++i) { - rl.addBranch(entry, - rl.addBlock( - module.return( - module.call("other", [ module.i32.const(i) ], binaryen.none, binaryen.i32) - ) - ), - module.i32.eq( - module.local.get(0, binaryen.i32), - module.i32.const(i) - ) - ); - } - rl.addBranch(entry, - rl.addBlock( - module.unreachable() - ) - ); - - module.addFunction("test", binaryen.i32, binaryen.i32, [ binaryen.i32 ], rl.renderAndDispose(entry, 1)); - module.addFunctionImport("other", "env", "other", binaryen.i32, binaryen.i32); - module.addFunctionExport("test", "test"); - - console.log("=== unoptimized ==="); - console.log(module.emitText()); - module.optimize(); - console.log("=== optimized ==="); - console.log(module.emitText()); -} -usingBranches(); - -/* function usingSwitch() { - var module = new binaryen.Module(); - var rl = new binaryen.Relooper(module); - var entry = rl.addBlockWithSwitch(module.nop(), module.local.get(0, binaryen.i32)); - - for (let i = 0; i < 10; ++i) { - rl.addBranchForSwitch(entry, - rl.addBlock( - module.return( - module.call("other", [ module.i32.const(i) ], binaryen.none, binaryen.i32) - ) - ), - [ i ] - ); - } - rl.addBranchForSwitch(entry, - rl.addBlock( - module.unreachable() - ), - [] - ); - - module.addFunction("test", binaryen.i32, binaryen.i32, [ binaryen.i32 ], rl.renderAndDispose(entry, 1)); - module.addFunctionImport("other", "env", "other", binaryen.none, binaryen.i32); - module.addFunctionExport("test", "test"); - - console.log(module.emitText()); - module.optimize(); - console.log(module.emitText()); -} -usingSwitch(); */ diff --git a/tests/binaryen/return-flatten.js b/tests/binaryen/return-flatten.js deleted file mode 100644 index b8fc3c4659..0000000000 --- a/tests/binaryen/return-flatten.js +++ /dev/null @@ -1,19 +0,0 @@ -var binaryen = require("binaryen"); - -var module = new binaryen.Module(); -module.addFunction("nothing", binaryen.none, binaryen.none, [], module.nop()); -module.addFunction("test", binaryen.none, binaryen.none, [], - module.return( - module.call("nothing", [], binaryen.none) - ) -); -module.addExport("test", "test"); - -console.log(module.emitText()); -if (!module.validate()) - console.log("-> does not validate"); - -binaryen.setOptimizeLevel(4); -module.runPasses(["flatten"]); -module.optimize(); // Fatal: IR must be flat: run --flatten beforehand -console.log(module.emitText()); diff --git a/tests/binaryen/set_global-immutable.js b/tests/binaryen/set_global-immutable.js deleted file mode 100644 index 3907ccc71c..0000000000 --- a/tests/binaryen/set_global-immutable.js +++ /dev/null @@ -1,16 +0,0 @@ -var binaryen = require("binaryen"); - -// "It is a validation error for a set_global to index an immutable global variable." - -var mod = new binaryen.Module(); -mod.addGlobal("a", binaryen.i32, false, mod.i32.const(0)); - -var funcType = mod.addFunctionType("v", binaryen.none, []); -var func = mod.addFunction("start", funcType, [], mod.block("", [ - mod.setGlobal("a", mod.i32.const(1)) -])); -mod.setStart(func); - -console.log(mod.emitText()); -if (mod.validate()) - console.log("-> validates"); diff --git a/tests/binaryen/unreachable-loop.js b/tests/binaryen/unreachable-loop.js deleted file mode 100644 index 462d790a3b..0000000000 --- a/tests/binaryen/unreachable-loop.js +++ /dev/null @@ -1,23 +0,0 @@ -var binaryen = require("binaryen"); - -var mod = new binaryen.Module(); -var funcType = mod.addFunctionType("v", binaryen.none, []); -mod.addFunction("0", funcType, [], - mod.drop( - mod.block("label$1", [ - mod.loop("label$2", - mod.unreachable() - ) - ], binaryen.i32) - ) -); -mod.addExport("0", "0"); - -console.log(mod.emitText()); -if (!mod.validate()) - console.log("-> does not validate"); - -var bin = mod.emitBinary(); -require("fs").writeFileSync(__dirname + "/unreachable-loop.wasm", bin); -var mod2 = binaryen.readBinary(bin); -console.log(mod2.emitText()); diff --git a/tests/binaryen/unreachable-loop.wat b/tests/binaryen/unreachable-loop.wat deleted file mode 100644 index 7458bb4dda..0000000000 --- a/tests/binaryen/unreachable-loop.wat +++ /dev/null @@ -1,11 +0,0 @@ -(module - (func $0 - (drop - (block $label$1 (result i32) - (loop $label$2 - (unreachable) - ) - ) - ) - ) -) \ No newline at end of file diff --git a/tests/binaryen/unreachable-spam.js b/tests/binaryen/unreachable-spam.js deleted file mode 100644 index 621892c636..0000000000 --- a/tests/binaryen/unreachable-spam.js +++ /dev/null @@ -1,25 +0,0 @@ -var binaryen = require("binaryen"); - -var mod = new binaryen.Module(); -var funcType = mod.addFunctionType("ii", binaryen.i32, [ binaryen.i32 ]); -mod.addFunction("0", funcType, [], - mod.block(null, [ - mod.loop("continue", - mod.block(null, [ - mod.if( - mod.local.get(0, binaryen.i32), - mod.return(mod.i32.const(1)), - mod.return(mod.i32.const(2)) - ), - mod.unreachable() - ]) - ), - mod.unreachable() - ], binaryen.i32) -); -mod.addExport("0", "0"); - -if (!mod.validate()) - console.log("-> does not validate"); -console.log(mod.emitText()); -console.log(mod.emitStackIR(/* true */)); // optimize-stack-ir fixes this From c6557b0653e53952e5dba006d17d779a47770bc7 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 06:35:04 +0100 Subject: [PATCH 016/175] remove rogue file --- tests/resolve-ternary.json | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 tests/resolve-ternary.json diff --git a/tests/resolve-ternary.json b/tests/resolve-ternary.json deleted file mode 100644 index 1bdd02b1be..0000000000 --- a/tests/resolve-ternary.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "asc_flags": [ - ] -} From 281ae4d9f55931a34c290d47ec19e60e6ae302d3 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 06:36:49 +0100 Subject: [PATCH 017/175] remove old path test --- tests/util-path.js | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 tests/util-path.js diff --git a/tests/util-path.js b/tests/util-path.js deleted file mode 100644 index 119953c93c..0000000000 --- a/tests/util-path.js +++ /dev/null @@ -1,10 +0,0 @@ -import path from "path"; -import assert from "assert"; -import { util } from "../index.js"; - -const { normalizePath, resolvePath } = util; - -var test = "./Y/./N/./N/../../././../Y/./."; -assert.strictEqual(normalizePath(test), path.posix.normalize(test)); - -assert.strictEqual(resolvePath("../../..", "lib/util/i64.ts"), ".."); From 592f503b9da78fb5a6fe02844befbfa48852adde Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 06:43:17 +0100 Subject: [PATCH 018/175] refactor browser test --- .github/workflows/test.yml | 6 ------ package.json | 5 +++-- tests/{browser-asc.js => browser.js} | 0 3 files changed, 3 insertions(+), 8 deletions(-) rename tests/{browser-asc.js => browser.js} (100%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b91e36b267..5858cf4f23 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,8 +40,6 @@ jobs: run: npm run check - name: Test run: npm test - - name: Test browser build - run: node tests/browser-asc test-windows: name: "Compiler (Windows, node current)" runs-on: windows-latest @@ -57,8 +55,6 @@ jobs: run: npm run build - name: Test run: npm test - - name: Test browser build - run: node tests/browser-asc test-macos: name: "Compiler (MacOS, node current)" runs-on: macos-latest @@ -74,8 +70,6 @@ jobs: run: npm run build - name: Test run: npm test - - name: Test browser build - run: node tests/browser-asc test-bootstrap: name: "Compiler (Bootstrap)" runs-on: ubuntu-latest diff --git a/package.json b/package.json index 04ab4cde3f..7aabc53c66 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "assemblyscript", - "description": "Definitely not a TypeScript to WebAssembly compiler.", + "description": "A TypeScript-like language for WebAssembly.", "keywords": [ "typescript", "webassembly", @@ -66,9 +66,10 @@ "build:lib": "node scripts/build", "build:dts": "node scripts/build-dts", "watch": "node scripts/build --watch", - "test": "npm run test:parser && npm run test:compiler && npm run test:packages && npm run test:extension && npm run test:asconfig", + "test": "npm run test:parser && npm run test:compiler && npm run test:browser && npm run test:packages && npm run test:extension && npm run test:asconfig", "test:parser": "node tests/parser", "test:compiler": "node --experimental-wasi-unstable-preview1 tests/compiler", + "test:browser": "node tests/browser", "test:packages": "cd tests/packages && npm run test", "test:extension": "cd tests/extension && npm run test", "test:asconfig": "cd tests/asconfig && npm run test", diff --git a/tests/browser-asc.js b/tests/browser.js similarity index 100% rename from tests/browser-asc.js rename to tests/browser.js From 4f932b23caee66842bdf47a9bb363f3c129770f8 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 06:45:58 +0100 Subject: [PATCH 019/175] readthat --- tests/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/README.md b/tests/README.md index d16e1d547a..17b393f098 100644 --- a/tests/README.md +++ b/tests/README.md @@ -119,8 +119,8 @@ Tests for experimental features (usually enabled via the `--enable` CLI flag) ar Other ----- -Tests in other directories are not run automatically and do not need to be updated. +Tests in other directories are not run automatically and do not need to be updated. There are also: * [tests/allocators](./allocators) contains the memory allocator test suite +* [tests/browser](./browser.js) checks typical browser usage via asc's API * [tests/tokenizer](./tokenizer.js) is a visual test for the tokenizer tokenizing itself -* [tests/util-path](./util-path.js) is a sanity test for the path utility From 4faba352de616904fd77f1c30884bd02a09afcc9 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 07:42:19 +0100 Subject: [PATCH 020/175] update options test --- tests/cli/options.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/cli/options.js b/tests/cli/options.js index 3e47ccb28a..93fb81fdcd 100644 --- a/tests/cli/options.js +++ b/tests/cli/options.js @@ -1,5 +1,5 @@ -const assert = require("assert"); -const optionsUtil = require("../../cli/util/options"); +import assert from "assert"; +import * as optionsUtil from "../../cli/util/options.js"; const config = { "enable": { @@ -33,10 +33,10 @@ assert.deepStrictEqual(merged.enable, ["c"]); assert.deepStrictEqual(merged.disable, ["a", "b"]); // Populating defaults should work after the fact -merged = optionsUtil.addDefaults(config, {}); +optionsUtil.addDefaults(config, merged = {}); assert.deepStrictEqual(merged.other, ["x"]); -merged = optionsUtil.addDefaults(config, { other: ["y"] }); +optionsUtil.addDefaults(config, merged = { other: ["y"] }); assert.deepStrictEqual(merged.other, ["y"]); // Complete usage test From 479aff4495945d848a589c77fb1240b20e8e6866 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 19:15:04 +0100 Subject: [PATCH 021/175] update dts generation --- cli/tsconfig.json | 5 ++ scripts/build-dts.js | 169 ++++++++++++++++++++++++++----------------- 2 files changed, 107 insertions(+), 67 deletions(-) create mode 100644 cli/tsconfig.json diff --git a/cli/tsconfig.json b/cli/tsconfig.json new file mode 100644 index 0000000000..a8ff30e701 --- /dev/null +++ b/cli/tsconfig.json @@ -0,0 +1,5 @@ +{ + "include": [ + "./**/*.ts" + ] +} diff --git a/scripts/build-dts.js b/scripts/build-dts.js index 5d51abf373..df6da97469 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -426,81 +426,116 @@ OutputStream.prototype.toString = function () { return this.toBuffer().toString("utf8"); }; -const stdout = new OutputStream(); -stdout.write(`declare module 'assemblyscript' { - export * from 'assemblyscript/src/index'; +function transformTypes(sourceFile) { + var numReplaced = 0; + console.log("transforming:"); + var result = ts.transform(sourceFile, [ + function (context) { + const visit = node => { + node = ts.visitEachChild(node, visit, context); + if (ts.isTypeNode(node)) { + const name = node.getText(sourceFile); + switch (name) { + // this is wrong, but works + case "bool": ++numReplaced; return ts.createIdentifier("boolean"); + default: if (!/^(?:Binaryen|Relooper)/.test(name)) break; + case "i8": case "i16": case "i32": case "isize": + case "u8": case "u16": case "u32": case "usize": + case "f32": case "f64": ++numReplaced; return ts.createIdentifier("number"); + } + } + return node; + }; + return node => ts.visitNode(node, visit); + } + ]); + console.log(" replaced " + numReplaced + " AS types with TS types"); + return result; } -`); - -generate({ - project: pathUtil.resolve(__dirname, "..", "src"), - prefix: "assemblyscript", - exclude: [ - "glue/**", - ], - verbose: true, - sendMessage: console.log, - stdout: stdout -}); -stdout.write("\n"); +function generateSrc() { + const stdout = new OutputStream(); -generate({ - project: pathUtil.resolve(__dirname, "..", "std/assembly/shared"), - prefix: "assemblyscript/std/assembly/shared", - exclude: [], - verbose: true, - sendMessage: console.log, - stdout: stdout -}); + generate({ + project: pathUtil.resolve(__dirname, "..", "src"), + prefix: "assemblyscript", + exclude: [ + "glue/**", + ], + verbose: true, + sendMessage: console.log, + stdout: stdout + }); -stdout.write("\n"); + stdout.write("\n"); -generate({ - project: pathUtil.resolve(__dirname, "..", "src/glue"), - prefix: "assemblyscript/src/glue", - exclude: [ - "js/index.ts", - "js/node.d.ts" - ], - verbose: true, - sendMessage: console.log, - stdout: stdout -}); + generate({ + project: pathUtil.resolve(__dirname, "..", "std/assembly/shared"), + prefix: "assemblyscript/std/assembly/shared", + exclude: [], + verbose: true, + sendMessage: console.log, + stdout: stdout + }); -var source = stdout.toString().replace(/\/\/\/ ]*>\r?\n/g, ""); + stdout.write("\n"); -const sourceFile = ts.createSourceFile("assemblyscript.d.ts", source, ts.ScriptTarget.ESNext, false, ts.ScriptKind.TS); + generate({ + project: pathUtil.resolve(__dirname, "..", "src/glue"), + prefix: "assemblyscript/src/glue", + exclude: [ + "js/index.ts", + "js/node.d.ts" + ], + verbose: true, + sendMessage: console.log, + stdout: stdout + }); -console.log("transforming:"); -var numReplaced = 0; -const result = ts.transform(sourceFile, [ - function (context) { - const visit = node => { - node = ts.visitEachChild(node, visit, context); - if (ts.isTypeNode(node)) { - const name = node.getText(sourceFile); - switch (name) { - // this is wrong, but works - case "bool": ++numReplaced; return ts.createIdentifier("boolean"); - default: if (!/^(?:Binaryen|Relooper)/.test(name)) break; - case "i8": case "i16": case "i32": case "isize": - case "u8": case "u16": case "u32": case "usize": - case "f32": case "f64": ++numReplaced; return ts.createIdentifier("number"); - } - } - return node; - }; - return node => ts.visitNode(node, visit); + const source = stdout.toString().replace(/\/\/\/ ]*>\r?\n/g, ""); + const sourceFile = ts.createSourceFile("assemblyscript.d.ts", source, ts.ScriptTarget.ESNext, false, ts.ScriptKind.TS); + const result = transformTypes(sourceFile); + if (!fs.existsSync(pathUtil.join(__dirname, "..", "dist"))) { + fs.mkdirSync(pathUtil.join(__dirname, "..", "dist")); } -]); -console.log(" replaced " + numReplaced + " AS types with JS types"); + fs.writeFileSync( + pathUtil.resolve(__dirname, "..", "dist", "assemblyscript.generated.d.ts"), + ts.createPrinter().printFile(result.transformed[0]) + ); + fs.writeFileSync( + pathUtil.resolve(__dirname, "..", "dist", "assemblyscript.d.ts"), + `/// \nexport * from "assemblyscript/src/index";\n` + ); +} + +function generateCli() { + const stdout = new OutputStream(); -if (!fs.existsSync(pathUtil.join(__dirname, "..", "dist"))) { - fs.mkdirSync(pathUtil.join(__dirname, "..", "dist")); + generate({ + project: pathUtil.resolve(__dirname, "..", "cli"), + prefix: "asc", + verbose: true, + sendMessage: console.log, + stdout: stdout + }); + + const source = stdout.toString() + .replace(/\/\/\/ ]*>\r?\n/g, "") + .replace(/["']asc\/\.\.\/transform["']/g, `"../transform"`); + const sourceFile = ts.createSourceFile("asc.d.ts", source, ts.ScriptTarget.ESNext, false, ts.ScriptKind.TS); + const result = transformTypes(sourceFile); + if (!fs.existsSync(pathUtil.join(__dirname, "..", "dist"))) { + fs.mkdirSync(pathUtil.join(__dirname, "..", "dist")); + } + fs.writeFileSync( + pathUtil.resolve(__dirname, "..", "dist", "asc.generated.d.ts"), + ts.createPrinter().printFile(result.transformed[0]) + ); + fs.writeFileSync( + pathUtil.resolve(__dirname, "..", "dist", "asc.d.ts"), + `/// \nexport * from "asc/index";\n` + ); } -fs.writeFileSync( - pathUtil.resolve(__dirname, "..", "dist", "assemblyscript.d.ts"), - ts.createPrinter().printFile(result.transformed[0]), - "utf8" -); + +generateSrc(); +generateCli(); From 84ccac4ae536d931efb9c52b7b8114d5a8f2efb7 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 19:41:25 +0100 Subject: [PATCH 022/175] link asc to as defs --- scripts/build-dts.js | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/scripts/build-dts.js b/scripts/build-dts.js index df6da97469..d997f7d68a 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -512,16 +512,31 @@ function generateCli() { const stdout = new OutputStream(); generate({ - project: pathUtil.resolve(__dirname, "..", "cli"), + baseDir: pathUtil.resolve(__dirname, ".."), + files: [ + "cli/index.d.ts", + "transform.d.ts" + ], + externs: [ + "./assemblyscript.generated.d.ts" + ], prefix: "asc", verbose: true, sendMessage: console.log, - stdout: stdout + stdout: stdout, + resolveModuleImport: ({ importedModuleId, currentModuleId }) => { + if (currentModuleId === "transform") { + if (importedModuleId == ".") return "assemblyscript/src/index"; + if (importedModuleId == "./cli/index") return "asc/cli/index"; + } + if (currentModuleId == "cli/index") { + if (importedModuleId == "../transform") return "asc/transform"; + } + return null; + } }); - const source = stdout.toString() - .replace(/\/\/\/ ]*>\r?\n/g, "") - .replace(/["']asc\/\.\.\/transform["']/g, `"../transform"`); + const source = stdout.toString(); const sourceFile = ts.createSourceFile("asc.d.ts", source, ts.ScriptTarget.ESNext, false, ts.ScriptKind.TS); const result = transformTypes(sourceFile); if (!fs.existsSync(pathUtil.join(__dirname, "..", "dist"))) { @@ -533,7 +548,7 @@ function generateCli() { ); fs.writeFileSync( pathUtil.resolve(__dirname, "..", "dist", "asc.d.ts"), - `/// \nexport * from "asc/index";\n` + `/// \nexport * from "asc/cli/index";\n` ); } From a3d453134333c1df7c7564f2909a34f4397e6338 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 19:55:20 +0100 Subject: [PATCH 023/175] put it all together --- asc.d.ts | 4 ++-- index.d.ts | 5 ++--- package.json | 11 +++++++---- scripts/build-dts.js | 4 ++-- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/asc.d.ts b/asc.d.ts index 1e70e90c82..8133412bb1 100644 --- a/asc.d.ts +++ b/asc.d.ts @@ -1,2 +1,2 @@ -export * from "./cli/index"; -export { default } from "./cli/index"; +export * from "./dist/asc"; +export { default } from "./dist/asc"; diff --git a/index.d.ts b/index.d.ts index 8341198e70..7e246ad3f7 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,3 +1,2 @@ -import "./src/glue/js/index"; -export * from "./src/index-js"; -export { default } from "./src/index-js"; +export * from "./dist/assemblyscript"; +export { default } from "./dist/assemblyscript"; diff --git a/package.json b/package.json index 7aabc53c66..06f447b6be 100644 --- a/package.json +++ b/package.json @@ -98,17 +98,20 @@ "lib/rtrace/umd/package.json", "lib/rtrace/README.md", "bin/", - "cli/", "dist/", + "std/", + "asc.d.ts", + "asc.js", "index.d.ts", "index.js", + "transform.d.ts", + "transform.js", + "tsconfig-base.json", "LICENSE", "NOTICE", "package.json", "package-lock.json", - "README.md", - "std/", - "tsconfig-base.json" + "README.md" ], "funding": { "type": "opencollective", diff --git a/scripts/build-dts.js b/scripts/build-dts.js index d997f7d68a..8e4c2753ba 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -504,7 +504,7 @@ function generateSrc() { ); fs.writeFileSync( pathUtil.resolve(__dirname, "..", "dist", "assemblyscript.d.ts"), - `/// \nexport * from "assemblyscript/src/index";\n` + `/// \nexport * from "assemblyscript/src/index";\nimport * as assemblyscript from "assemblyscript/src/index";\nexport default assemblyscript;\n` ); } @@ -548,7 +548,7 @@ function generateCli() { ); fs.writeFileSync( pathUtil.resolve(__dirname, "..", "dist", "asc.d.ts"), - `/// \nexport * from "asc/cli/index";\n` + `/// \nexport * from "asc/cli/index";\nimport * as asc from "asc/cli/index";\nexport default asc;\n` ); } From 78dbabde0f13e3e49847f4a6908670fa871bd69c Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 20:19:05 +0100 Subject: [PATCH 024/175] work around ambient <-> esm name clashing --- scripts/build-dts.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/build-dts.js b/scripts/build-dts.js index 8e4c2753ba..f4a8cc27ef 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -458,7 +458,7 @@ function generateSrc() { generate({ project: pathUtil.resolve(__dirname, "..", "src"), - prefix: "assemblyscript", + prefix: "types:assemblyscript", exclude: [ "glue/**", ], @@ -471,7 +471,7 @@ function generateSrc() { generate({ project: pathUtil.resolve(__dirname, "..", "std/assembly/shared"), - prefix: "assemblyscript/std/assembly/shared", + prefix: "types:assemblyscript/std/assembly/shared", exclude: [], verbose: true, sendMessage: console.log, @@ -482,7 +482,7 @@ function generateSrc() { generate({ project: pathUtil.resolve(__dirname, "..", "src/glue"), - prefix: "assemblyscript/src/glue", + prefix: "types:assemblyscript/src/glue", exclude: [ "js/index.ts", "js/node.d.ts" @@ -504,7 +504,7 @@ function generateSrc() { ); fs.writeFileSync( pathUtil.resolve(__dirname, "..", "dist", "assemblyscript.d.ts"), - `/// \nexport * from "assemblyscript/src/index";\nimport * as assemblyscript from "assemblyscript/src/index";\nexport default assemblyscript;\n` + `/// \nexport * from "types:assemblyscript/src/index";\nimport * as assemblyscript from "types:assemblyscript/src/index";\nexport default assemblyscript;\n` ); } @@ -520,17 +520,17 @@ function generateCli() { externs: [ "./assemblyscript.generated.d.ts" ], - prefix: "asc", + prefix: "types:asc", verbose: true, sendMessage: console.log, stdout: stdout, resolveModuleImport: ({ importedModuleId, currentModuleId }) => { if (currentModuleId === "transform") { - if (importedModuleId == ".") return "assemblyscript/src/index"; - if (importedModuleId == "./cli/index") return "asc/cli/index"; + if (importedModuleId == ".") return "types:assemblyscript/src/index"; + if (importedModuleId == "./cli/index") return "types:asc/cli/index"; } if (currentModuleId == "cli/index") { - if (importedModuleId == "../transform") return "asc/transform"; + if (importedModuleId == "../transform") return "types:asc/transform"; } return null; } @@ -548,7 +548,7 @@ function generateCli() { ); fs.writeFileSync( pathUtil.resolve(__dirname, "..", "dist", "asc.d.ts"), - `/// \nexport * from "asc/cli/index";\nimport * as asc from "asc/cli/index";\nexport default asc;\n` + `/// \nexport * from "types:asc/cli/index";\nimport * as asc from "types:asc/cli/index";\nexport default asc;\n` ); } From 28e7791da8a7a8e7a6f819d98e753a78f5aaa78d Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 20:23:15 +0100 Subject: [PATCH 025/175] share common types namespace --- scripts/build-dts.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/build-dts.js b/scripts/build-dts.js index f4a8cc27ef..558d5e2212 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -520,17 +520,17 @@ function generateCli() { externs: [ "./assemblyscript.generated.d.ts" ], - prefix: "types:asc", + prefix: "types:assemblyscript", verbose: true, sendMessage: console.log, stdout: stdout, resolveModuleImport: ({ importedModuleId, currentModuleId }) => { if (currentModuleId === "transform") { if (importedModuleId == ".") return "types:assemblyscript/src/index"; - if (importedModuleId == "./cli/index") return "types:asc/cli/index"; + if (importedModuleId == "./cli/index") return "types:assemblyscript/cli/index"; } if (currentModuleId == "cli/index") { - if (importedModuleId == "../transform") return "types:asc/transform"; + if (importedModuleId == "../transform") return "types:assemblyscript/transform"; } return null; } @@ -548,7 +548,7 @@ function generateCli() { ); fs.writeFileSync( pathUtil.resolve(__dirname, "..", "dist", "asc.d.ts"), - `/// \nexport * from "types:asc/cli/index";\nimport * as asc from "types:asc/cli/index";\nexport default asc;\n` + `/// \nexport * from "types:assemblyscript/cli/index";\nimport * as asc from "types:assemblyscript/cli/index";\nexport default asc;\n` ); } From 91650686f9d5cd9b37b4c5de748f42b517c2e357 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 20:28:42 +0100 Subject: [PATCH 026/175] simplify --- scripts/build-dts.js | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/scripts/build-dts.js b/scripts/build-dts.js index 558d5e2212..f8e0e88e4d 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -453,12 +453,14 @@ function transformTypes(sourceFile) { return result; } +const prefix = "types:assemblyscript"; + function generateSrc() { const stdout = new OutputStream(); generate({ project: pathUtil.resolve(__dirname, "..", "src"), - prefix: "types:assemblyscript", + prefix, exclude: [ "glue/**", ], @@ -471,7 +473,7 @@ function generateSrc() { generate({ project: pathUtil.resolve(__dirname, "..", "std/assembly/shared"), - prefix: "types:assemblyscript/std/assembly/shared", + prefix: prefix + "/std/assembly/shared", exclude: [], verbose: true, sendMessage: console.log, @@ -482,7 +484,7 @@ function generateSrc() { generate({ project: pathUtil.resolve(__dirname, "..", "src/glue"), - prefix: "types:assemblyscript/src/glue", + prefix: prefix + "/src/glue", exclude: [ "js/index.ts", "js/node.d.ts" @@ -504,7 +506,11 @@ function generateSrc() { ); fs.writeFileSync( pathUtil.resolve(__dirname, "..", "dist", "assemblyscript.d.ts"), - `/// \nexport * from "types:assemblyscript/src/index";\nimport * as assemblyscript from "types:assemblyscript/src/index";\nexport default assemblyscript;\n` + [ `/// \n`, + `export * from "${prefix}/src/index";\n`, + `import * as assemblyscript from "${prefix}/src/index";\n`, + `export default assemblyscript;\n` + ].join("") ); } @@ -520,17 +526,17 @@ function generateCli() { externs: [ "./assemblyscript.generated.d.ts" ], - prefix: "types:assemblyscript", + prefix, verbose: true, sendMessage: console.log, stdout: stdout, resolveModuleImport: ({ importedModuleId, currentModuleId }) => { if (currentModuleId === "transform") { - if (importedModuleId == ".") return "types:assemblyscript/src/index"; - if (importedModuleId == "./cli/index") return "types:assemblyscript/cli/index"; + if (importedModuleId == ".") return prefix + "/src/index"; + if (importedModuleId == "./cli/index") return prefix + "/cli/index"; } if (currentModuleId == "cli/index") { - if (importedModuleId == "../transform") return "types:assemblyscript/transform"; + if (importedModuleId == "../transform") return prefix + "/transform"; } return null; } @@ -548,7 +554,11 @@ function generateCli() { ); fs.writeFileSync( pathUtil.resolve(__dirname, "..", "dist", "asc.d.ts"), - `/// \nexport * from "types:assemblyscript/cli/index";\nimport * as asc from "types:assemblyscript/cli/index";\nexport default asc;\n` + [ `/// \n`, + `export * from "${prefix}/cli/index";\n`, + `import * as asc from "${prefix}/cli/index";\n`, + `export default asc;\n` + ].join("") ); } From 4076286dd95dee2eb4f48ca39a9d18bd9645a544 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 20:39:08 +0100 Subject: [PATCH 027/175] update transform --- scripts/build-dts.js | 1 + transform.d.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build-dts.js b/scripts/build-dts.js index f8e0e88e4d..39574a4c3d 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -533,6 +533,7 @@ function generateCli() { resolveModuleImport: ({ importedModuleId, currentModuleId }) => { if (currentModuleId === "transform") { if (importedModuleId == ".") return prefix + "/src/index"; + if (importedModuleId == "./asc") return prefix + "/cli/index"; if (importedModuleId == "./cli/index") return prefix + "/cli/index"; } if (currentModuleId == "cli/index") { diff --git a/transform.d.ts b/transform.d.ts index 9ae95fbad0..7ea60dfb92 100644 --- a/transform.d.ts +++ b/transform.d.ts @@ -4,7 +4,7 @@ */ import { Program, Parser, Module } from "."; -import { OutputStream } from "./cli/index"; +import { OutputStream } from "./asc"; export abstract class Transform { From 3f9223dffc5fd14e7643b49612407b27933fa6b6 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 20:40:22 +0100 Subject: [PATCH 028/175] remove unnecessary line --- scripts/build-dts.js | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/build-dts.js b/scripts/build-dts.js index 39574a4c3d..81e1071b4c 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -534,7 +534,6 @@ function generateCli() { if (currentModuleId === "transform") { if (importedModuleId == ".") return prefix + "/src/index"; if (importedModuleId == "./asc") return prefix + "/cli/index"; - if (importedModuleId == "./cli/index") return prefix + "/cli/index"; } if (currentModuleId == "cli/index") { if (importedModuleId == "../transform") return prefix + "/transform"; From 1b51772a348ec2176605d54449c687432c322b8a Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 22:43:20 +0100 Subject: [PATCH 029/175] fix --- cli/index.d.ts | 40 +++++++++++++++++++++++++++++++++++++++- scripts/build-dts.js | 9 ++------- transform.d.ts | 44 +------------------------------------------- 3 files changed, 42 insertions(+), 51 deletions(-) diff --git a/cli/index.d.ts b/cli/index.d.ts index e353a59e5a..5feaa86f14 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -5,7 +5,6 @@ import { OptionDescription } from "./util/options"; export { OptionDescription }; -import { Transform } from "../transform"; /** AssemblyScript version. */ export const version: string; @@ -241,3 +240,42 @@ export function createMemoryStream(fn?: (chunk: Uint8Array | string) => void): M /** Compatible TypeScript compiler options for syntax highlighting etc. */ export const tscOptions: Record; + +import { Program, Parser, Module } from ".."; + +/** Compiler transform base class. */ +export abstract class Transform { + + /** Program reference. */ + readonly program: Program; + + /** Base directory. */ + readonly baseDir: string; + + /** Output stream used by the compiler. */ + readonly stdout: OutputStream; + + /** Error stream used by the compiler. */ + readonly stderr: OutputStream; + + /** Logs a message to console. */ + readonly log: typeof console.log; + + /** Writes a file to disk. */ + writeFile(filename: string, contents: string | Uint8Array, baseDir: string): boolean; + + /** Reads a file from disk. */ + readFile(filename: string, baseDir: string): string | null; + + /** Lists all files in a directory. */ + listFiles(dirname: string, baseDir: string): string[] | null; + + /** Called when parsing is complete, before a program is instantiated from the AST. */ + afterParse?(parser: Parser): void; + + /** Called after the program is instantiated. */ + afterInitialize?(program: Program): void; + + /** Called when compilation is complete, before the module is being validated. */ + afterCompile?(module: Module): void; +} diff --git a/scripts/build-dts.js b/scripts/build-dts.js index 81e1071b4c..f5bb3fefb1 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -520,8 +520,7 @@ function generateCli() { generate({ baseDir: pathUtil.resolve(__dirname, ".."), files: [ - "cli/index.d.ts", - "transform.d.ts" + "cli/index.d.ts" ], externs: [ "./assemblyscript.generated.d.ts" @@ -531,12 +530,8 @@ function generateCli() { sendMessage: console.log, stdout: stdout, resolveModuleImport: ({ importedModuleId, currentModuleId }) => { - if (currentModuleId === "transform") { - if (importedModuleId == ".") return prefix + "/src/index"; - if (importedModuleId == "./asc") return prefix + "/cli/index"; - } if (currentModuleId == "cli/index") { - if (importedModuleId == "../transform") return prefix + "/transform"; + if (importedModuleId == "..") return prefix + "/src/index"; } return null; } diff --git a/transform.d.ts b/transform.d.ts index 7ea60dfb92..49b657ce6d 100644 --- a/transform.d.ts +++ b/transform.d.ts @@ -1,43 +1 @@ -/** - * @fileoverview Compiler transform interface definitions. - * @license Apache-2.0 - */ - -import { Program, Parser, Module } from "."; -import { OutputStream } from "./asc"; - -export abstract class Transform { - - /** Program reference. */ - readonly program: Program; - - /** Base directory. */ - readonly baseDir: string; - - /** Output stream used by the compiler. */ - readonly stdout: OutputStream; - - /** Error stream used by the compiler. */ - readonly stderr: OutputStream; - - /** Logs a message to console. */ - readonly log: typeof console.log; - - /** Writes a file to disk. */ - writeFile(filename: string, contents: string | Uint8Array, baseDir: string): boolean; - - /** Reads a file from disk. */ - readFile(filename: string, baseDir: string): string | null; - - /** Lists all files in a directory. */ - listFiles(dirname: string, baseDir: string): string[] | null; - - /** Called when parsing is complete, before a program is instantiated from the AST. */ - afterParse?(parser: Parser): void; - - /** Called after the program is instantiated. */ - afterInitialize?(program: Program): void; - - /** Called when compilation is complete, before the module is being validated. */ - afterCompile?(module: Module): void; -} +export { Transform } from "./dist/asc"; From 35a1e1286cd6d8e6ddd450ed297e6764fde7c3d2 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 27 Nov 2021 22:55:32 +0100 Subject: [PATCH 030/175] fix --- bin/asc.js | 6 +----- package.json | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/asc.js b/bin/asc.js index 7f035affdf..19ca467e95 100644 --- a/bin/asc.js +++ b/bin/asc.js @@ -17,12 +17,8 @@ function tryApplyNodeArguments() { return false; } -var asc; - if (!tryApplyNodeArguments()) { sourceMapSupport.install(); - asc = await import("../dist/asc.js"); + const asc = await import("../dist/asc.js"); process.exitCode = asc.main(process.argv.slice(2)); } - -export default asc; diff --git a/package.json b/package.json index 06f447b6be..9e54cc58a2 100644 --- a/package.json +++ b/package.json @@ -100,6 +100,8 @@ "bin/", "dist/", "std/", + "cli/util/colors.js", + "cli/util/options.js", "asc.d.ts", "asc.js", "index.d.ts", From 02dc4a13d276e375107933180acdda74019b3b9a Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 28 Nov 2021 05:33:29 +0100 Subject: [PATCH 031/175] restructure --- cli/index.d.ts | 2 +- cli/index.js | 12 ++++----- cli/tsconfig.json | 1 + package-lock.json | 26 ------------------- package.json | 5 +--- scripts/build-dts.js | 2 +- tests/compiler.js | 10 ++++---- tests/parser.js | 6 ++--- util/README.md | 16 ++++++++++++ {cli/util => util}/browser/fs.js | 0 {cli/util => util}/browser/module.js | 0 {cli/util => util}/browser/path.js | 0 {cli/util => util}/browser/process.js | 0 {cli/util => util}/colors.d.ts | 0 {cli/util => util}/colors.js | 0 util/cpu.d.ts | 2 ++ util/cpu.js | 37 +++++++++++++++++++++++++++ util/diff.d.ts | 1 + {tests/util => util}/diff.js | 17 ++++++------ {cli/util => util}/fetch.d.ts | 0 {cli/util => util}/fetch.js | 0 {cli/util => util}/find.d.ts | 0 {cli/util => util}/find.js | 0 {cli/util => util}/mkdirp.d.ts | 0 {cli/util => util}/mkdirp.js | 0 {cli/util => util}/node.d.ts | 0 {cli/util => util}/node.js | 0 {cli/util => util}/options.d.ts | 0 {cli/util => util}/options.js | 0 util/tsconfig.json | 6 +++++ {cli/util => util}/utf8.d.ts | 0 {cli/util => util}/utf8.js | 0 32 files changed, 88 insertions(+), 55 deletions(-) create mode 100644 util/README.md rename {cli/util => util}/browser/fs.js (100%) rename {cli/util => util}/browser/module.js (100%) rename {cli/util => util}/browser/path.js (100%) rename {cli/util => util}/browser/process.js (100%) rename {cli/util => util}/colors.d.ts (100%) rename {cli/util => util}/colors.js (100%) create mode 100644 util/cpu.d.ts create mode 100644 util/cpu.js create mode 100644 util/diff.d.ts rename {tests/util => util}/diff.js (67%) rename {cli/util => util}/fetch.d.ts (100%) rename {cli/util => util}/fetch.js (100%) rename {cli/util => util}/find.d.ts (100%) rename {cli/util => util}/find.js (100%) rename {cli/util => util}/mkdirp.d.ts (100%) rename {cli/util => util}/mkdirp.js (100%) rename {cli/util => util}/node.d.ts (100%) rename {cli/util => util}/node.js (100%) rename {cli/util => util}/options.d.ts (100%) rename {cli/util => util}/options.js (100%) create mode 100644 util/tsconfig.json rename {cli/util => util}/utf8.d.ts (100%) rename {cli/util => util}/utf8.js (100%) diff --git a/cli/index.d.ts b/cli/index.d.ts index 5feaa86f14..0236a30304 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -3,7 +3,7 @@ * @license Apache-2.0 */ -import { OptionDescription } from "./util/options"; +import { OptionDescription } from "../util/options"; export { OptionDescription }; /** AssemblyScript version. */ diff --git a/cli/index.js b/cli/index.js index a69abca838..1ddac59062 100644 --- a/cli/index.js +++ b/cli/index.js @@ -27,12 +27,12 @@ * in the build step. See dist/asc.js for the bundle. */ -import { fs, module, path, process } from "./util/node.js"; -import mkdirp from "./util/mkdirp.js"; -import fetch from "./util/fetch.js"; -import * as utf8 from "./util/utf8.js"; -import * as colorsUtil from "./util/colors.js"; -import * as optionsUtil from "./util/options.js"; +import { fs, module, path, process } from "../util/node.js"; +import mkdirp from "../util/mkdirp.js"; +import fetch from "../util/fetch.js"; +import * as utf8 from "../util/utf8.js"; +import * as colorsUtil from "../util/colors.js"; +import * as optionsUtil from "../util/options.js"; import * as generated from "./index.generated.js"; import binaryen from "binaryen"; diff --git a/cli/tsconfig.json b/cli/tsconfig.json index a8ff30e701..bcb1b8a11d 100644 --- a/cli/tsconfig.json +++ b/cli/tsconfig.json @@ -1,4 +1,5 @@ { + "extends": "../tsconfig-base.json", "include": [ "./**/*.ts" ] diff --git a/package-lock.json b/package-lock.json index 7e5562cd11..2dd50c492f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,8 +24,6 @@ "esbuild": "^0.13.14", "eslint": "^8.2.0", "glob": "^7.2.0", - "mkdirp": "^1.0.4", - "physical-cpu-count": "^2.0.0", "typescript": "~4.5.2" }, "funding": { @@ -1096,17 +1094,6 @@ "node": "*" } }, - "node_modules/mkdirp": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/ms": { "version": "2.1.2", "dev": true, @@ -1177,11 +1164,6 @@ "node": ">=8" } }, - "node_modules/physical-cpu-count": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/picomatch": { "version": "2.3.0", "dev": true, @@ -2197,10 +2179,6 @@ "brace-expansion": "^1.1.7" } }, - "mkdirp": { - "version": "1.0.4", - "dev": true - }, "ms": { "version": "2.1.2", "dev": true @@ -2249,10 +2227,6 @@ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, - "physical-cpu-count": { - "version": "2.0.0", - "dev": true - }, "picomatch": { "version": "2.3.0", "dev": true diff --git a/package.json b/package.json index 9e54cc58a2..3f0d2cd329 100644 --- a/package.json +++ b/package.json @@ -33,8 +33,6 @@ "esbuild": "^0.13.14", "eslint": "^8.2.0", "glob": "^7.2.0", - "mkdirp": "^1.0.4", - "physical-cpu-count": "^2.0.0", "typescript": "~4.5.2" }, "type": "module", @@ -100,8 +98,7 @@ "bin/", "dist/", "std/", - "cli/util/colors.js", - "cli/util/options.js", + "util/", "asc.d.ts", "asc.js", "index.d.ts", diff --git a/scripts/build-dts.js b/scripts/build-dts.js index f5bb3fefb1..d07f46a273 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -1,12 +1,12 @@ import fs from "fs"; import glob from "glob"; -import mkdirp from "mkdirp"; import os from "os"; import pathUtil from "path"; import ts from "typescript"; import stream from "stream"; import util from "util"; import { fileURLToPath } from 'url'; +import mkdirp from "../util/mkdirp"; const __dirname = pathUtil.dirname(fileURLToPath(import.meta.url)); diff --git a/tests/compiler.js b/tests/compiler.js index 9532cac200..74cc09640c 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -7,10 +7,10 @@ import { createRequire } from "module"; import { fileURLToPath } from "url"; import { WASI } from "wasi"; import glob from "glob"; -import coreCount from "physical-cpu-count"; -import * as colorsUtil from "../cli/util/colors.js"; -import * as optionsUtil from "../cli/util/options.js"; -import diff from "./util/diff.js"; +import * as colorsUtil from "../util/colors.js"; +import * as optionsUtil from "../util/options.js"; +import { coreCount, threadCount } from "../util/cpu.js"; +import diff from "../util/diff.js"; import { Rtrace } from "../lib/rtrace/index.js"; const dirname = path.dirname(fileURLToPath(import.meta.url)); @@ -519,7 +519,7 @@ if (args.parallel && coreCount > 1) { const current = []; const outputs = []; let numWorkers = Math.min(coreCount - 1, tests.length); - console.log("Spawning " + numWorkers + " workers ..."); + console.log(`Spawning ${numWorkers} workers (assuming ${coreCount} cores, ${threadCount} threads)...`); cluster.settings.silent = true; let index = 0; for (let i = 0; i < numWorkers; ++i) { diff --git a/tests/parser.js b/tests/parser.js index eb580a5f7e..ab03efc494 100644 --- a/tests/parser.js +++ b/tests/parser.js @@ -3,9 +3,9 @@ import path from "path"; import os from "os"; import { fileURLToPath } from "url"; import glob from "glob"; -import diff from "./util/diff.js"; -import * as colorsUtil from "../cli/util/colors.js"; -import * as optionsUtil from "../cli/util/options.js"; +import diff from "../util/diff.js"; +import * as colorsUtil from "../util/colors.js"; +import * as optionsUtil from "../util/options.js"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); diff --git a/util/README.md b/util/README.md new file mode 100644 index 0000000000..5b02163963 --- /dev/null +++ b/util/README.md @@ -0,0 +1,16 @@ +Utility +======= + +Various utility functions shared accross the codebase. + +| Utility | Description +|---------|------------------------------------------- +| colors | Provides support for terminal colors +| cpu | Obtains information about the CPU +| diff | Computes the difference between two texts +| fetch | Simple Node.js polyfill for the Fetch API +| find | Provides support for finding files etc. +| mkdirp | Creates non-existent directory trees +| node | Minimal polyfills for Node.js builtins +| options | Support for command line options parsing +| utf8 | Utility for UTF-8 text processing diff --git a/cli/util/browser/fs.js b/util/browser/fs.js similarity index 100% rename from cli/util/browser/fs.js rename to util/browser/fs.js diff --git a/cli/util/browser/module.js b/util/browser/module.js similarity index 100% rename from cli/util/browser/module.js rename to util/browser/module.js diff --git a/cli/util/browser/path.js b/util/browser/path.js similarity index 100% rename from cli/util/browser/path.js rename to util/browser/path.js diff --git a/cli/util/browser/process.js b/util/browser/process.js similarity index 100% rename from cli/util/browser/process.js rename to util/browser/process.js diff --git a/cli/util/colors.d.ts b/util/colors.d.ts similarity index 100% rename from cli/util/colors.d.ts rename to util/colors.d.ts diff --git a/cli/util/colors.js b/util/colors.js similarity index 100% rename from cli/util/colors.js rename to util/colors.js diff --git a/util/cpu.d.ts b/util/cpu.d.ts new file mode 100644 index 0000000000..541acd4c72 --- /dev/null +++ b/util/cpu.d.ts @@ -0,0 +1,2 @@ +export const threadCount: number; +export const coreCount: number; diff --git a/util/cpu.js b/util/cpu.js new file mode 100644 index 0000000000..889334b4f1 --- /dev/null +++ b/util/cpu.js @@ -0,0 +1,37 @@ +// https://www.npmjs.com/package/physical-cpu-count + +import os from "os"; +import childProcess from "child_process"; + +const cpus = os.cpus(); + +function exec(command) { + return childProcess.execSync(command, {encoding: 'utf8'}); +} + +var coreCount; + +const platform = os.platform(); +if (platform === "linux") { + const output = exec("lscpu -p | egrep -v \"^#\" | sort -u -t, -k 2,4 | wc -l"); + coreCount = parseInt(output.trim(), 10); +} else if (platform === "darwin") { + const output = exec("sysctl -n hw.physicalcpu_max"); + coreCount = parseInt(output.trim(), 10); +} else if (platform === "windows") { + const output = exec("WMIC CPU Get NumberOfCores"); + coreCount = output.split(os.EOL) + .map(line => parseInt(line)) + .filter(value => !isNaN(value)) + .reduce((sum, number) => sum + number, 0); +} else { + const cores = cpus.filter(function (cpu, index) { + const hasHyperthreading = cpu.model.includes("Intel"); + const isOdd = index % 2 === 1; + return !hasHyperthreading || isOdd; + }); + coreCount = cores.length; +} + +export const threadCount = cpus.length; +export { coreCount }; diff --git a/util/diff.d.ts b/util/diff.d.ts new file mode 100644 index 0000000000..84122ed03a --- /dev/null +++ b/util/diff.d.ts @@ -0,0 +1 @@ +export function diff(filename: string, expected: string, actual: string): string; diff --git a/tests/util/diff.js b/util/diff.js similarity index 67% rename from tests/util/diff.js rename to util/diff.js index 4a4be69cef..7fb3ab923f 100644 --- a/tests/util/diff.js +++ b/util/diff.js @@ -1,23 +1,22 @@ import * as Diff from "diff"; -import * as colors from "../../cli/util/colors.js"; +import * as colors from "./colors.js"; export default function diff(filename, expected, actual) { var diff = Diff.structuredPatch(filename, filename, expected, actual, "expected", "actual", { context: 5 }); - if (!diff.hunks.length) - return null; + if (!diff.hunks.length) return null; - var ret = []; - ret.push('--- ' + diff.oldHeader); - ret.push('+++ ' + diff.newHeader); + var out = []; + out.push('--- ' + diff.oldHeader); + out.push('+++ ' + diff.newHeader); for (var i = 0; i < diff.hunks.length; i++) { var hunk = diff.hunks[i]; - ret.push( + out.push( '@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@' ); - ret.push.apply(ret, hunk.lines.map(line => + out.push.apply(out, hunk.lines.map(line => line.charAt(0) === "+" ? colors.stdout.green(line) : line.charAt(0) === "-" @@ -26,5 +25,5 @@ export default function diff(filename, expected, actual) { )); } - return ret.join('\n') + '\n'; + return out.join('\n') + '\n'; } diff --git a/cli/util/fetch.d.ts b/util/fetch.d.ts similarity index 100% rename from cli/util/fetch.d.ts rename to util/fetch.d.ts diff --git a/cli/util/fetch.js b/util/fetch.js similarity index 100% rename from cli/util/fetch.js rename to util/fetch.js diff --git a/cli/util/find.d.ts b/util/find.d.ts similarity index 100% rename from cli/util/find.d.ts rename to util/find.d.ts diff --git a/cli/util/find.js b/util/find.js similarity index 100% rename from cli/util/find.js rename to util/find.js diff --git a/cli/util/mkdirp.d.ts b/util/mkdirp.d.ts similarity index 100% rename from cli/util/mkdirp.d.ts rename to util/mkdirp.d.ts diff --git a/cli/util/mkdirp.js b/util/mkdirp.js similarity index 100% rename from cli/util/mkdirp.js rename to util/mkdirp.js diff --git a/cli/util/node.d.ts b/util/node.d.ts similarity index 100% rename from cli/util/node.d.ts rename to util/node.d.ts diff --git a/cli/util/node.js b/util/node.js similarity index 100% rename from cli/util/node.js rename to util/node.js diff --git a/cli/util/options.d.ts b/util/options.d.ts similarity index 100% rename from cli/util/options.d.ts rename to util/options.d.ts diff --git a/cli/util/options.js b/util/options.js similarity index 100% rename from cli/util/options.js rename to util/options.js diff --git a/util/tsconfig.json b/util/tsconfig.json new file mode 100644 index 0000000000..bcb1b8a11d --- /dev/null +++ b/util/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig-base.json", + "include": [ + "./**/*.ts" + ] +} diff --git a/cli/util/utf8.d.ts b/util/utf8.d.ts similarity index 100% rename from cli/util/utf8.d.ts rename to util/utf8.d.ts diff --git a/cli/util/utf8.js b/util/utf8.js similarity index 100% rename from cli/util/utf8.js rename to util/utf8.js From a4d1958071bda92845ec44a9fbaf94b41a261e75 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 28 Nov 2021 05:35:49 +0100 Subject: [PATCH 032/175] fix --- scripts/build-dts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-dts.js b/scripts/build-dts.js index d07f46a273..688fe2b8fa 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -6,7 +6,7 @@ import ts from "typescript"; import stream from "stream"; import util from "util"; import { fileURLToPath } from 'url'; -import mkdirp from "../util/mkdirp"; +import mkdirp from "../util/mkdirp.js"; const __dirname = pathUtil.dirname(fileURLToPath(import.meta.url)); From 4bb18140dac64497b28b29c40e5d7423cf7d439d Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 28 Nov 2021 06:05:47 +0100 Subject: [PATCH 033/175] fix --- bin/asinit.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/asinit.js b/bin/asinit.js index fa90e24a93..84802ca44d 100644 --- a/bin/asinit.js +++ b/bin/asinit.js @@ -4,8 +4,8 @@ import fs from "fs"; import path from "path"; import { createRequire } from "module"; import { fileURLToPath } from "url"; -import colors from "../cli/util/colors.js"; -import options from "../cli/util/options.js"; +import { stdout as colors } from "../util/colors.js"; +import * as optionsUtil from "../util/options.js"; const dirname = path.dirname(fileURLToPath(import.meta.url)); const require = createRequire(import.meta.url); @@ -67,7 +67,7 @@ const asinitOptions = { } }; -const cliOptions = options.parse(process.argv.slice(2), asinitOptions); +const cliOptions = optionsUtil.parse(process.argv.slice(2), asinitOptions); if (cliOptions.options.help || cliOptions.arguments.length === 0) printHelp(); From cdf107f5f766583c92fa664a1269eca25aba835a Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 28 Nov 2021 06:09:33 +0100 Subject: [PATCH 034/175] readme --- util/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/util/README.md b/util/README.md index 5b02163963..099310e3bd 100644 --- a/util/README.md +++ b/util/README.md @@ -14,3 +14,12 @@ Various utility functions shared accross the codebase. | node | Minimal polyfills for Node.js builtins | options | Support for command line options parsing | utf8 | Utility for UTF-8 text processing + +It is possible to reuse the utility in your own project like so: + +```ts +import * as colorsUtil from "assemblyscript/util/colors.js"; +... +``` + +Keep in mind, however, that utility can change at any time. From ce914fc2dd6fe9186858c84dc334fafb115dfefd Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 28 Nov 2021 06:23:16 +0100 Subject: [PATCH 035/175] update dependencies --- package-lock.json | 1070 ++++++++++++++++++++++++++++++++++++--------- package.json | 2 +- 2 files changed, 862 insertions(+), 210 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2dd50c492f..eafbaff7bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", "diff": "^5.0.0", - "esbuild": "^0.13.14", + "esbuild": "^0.14.0", "eslint": "^8.2.0", "glob": "^7.2.0", "typescript": "~4.5.2" @@ -33,8 +33,9 @@ }, "node_modules/@eslint/eslintrc": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", + "integrity": "sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==", "dev": true, - "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -52,16 +53,18 @@ }, "node_modules/@eslint/eslintrc/node_modules/ignore": { "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/@humanwhocodes/config-array": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", + "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@humanwhocodes/object-schema": "^1.2.0", "debug": "^4.1.1", @@ -73,8 +76,9 @@ }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", @@ -113,13 +117,15 @@ }, "node_modules/@types/json-schema": { "version": "7.0.9", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true }, "node_modules/@types/node": { - "version": "16.11.7", - "dev": true, - "license": "MIT" + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==", + "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "5.4.0", @@ -279,9 +285,10 @@ } }, "node_modules/acorn": { - "version": "8.5.0", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", "dev": true, - "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -291,16 +298,18 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/ajv": { "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -314,24 +323,27 @@ }, "node_modules/ansi-colors": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/ansi-regex": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -344,8 +356,9 @@ }, "node_modules/argparse": { "version": "2.0.1", - "dev": true, - "license": "Python-2.0" + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/array-union": { "version": "2.1.0", @@ -358,8 +371,9 @@ }, "node_modules/balanced-match": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/binaryen": { "version": "102.0.0-nightly.20211126", @@ -372,8 +386,9 @@ }, "node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -381,8 +396,9 @@ }, "node_modules/braces": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, - "license": "MIT", "dependencies": { "fill-range": "^7.0.1" }, @@ -392,20 +408,23 @@ }, "node_modules/buffer-from": { "version": "1.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, "node_modules/callsites": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -419,8 +438,9 @@ }, "node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -430,18 +450,21 @@ }, "node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/concat-map": { "version": "0.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "node_modules/cross-spawn": { "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -452,9 +475,10 @@ } }, "node_modules/debug": { - "version": "4.3.2", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, - "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -469,13 +493,15 @@ }, "node_modules/deep-is": { "version": "0.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true }, "node_modules/diff": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -494,8 +520,9 @@ }, "node_modules/doctrine": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, - "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -505,8 +532,9 @@ }, "node_modules/enquirer": { "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, - "license": "MIT", "dependencies": { "ansi-colors": "^4.1.1" }, @@ -515,40 +543,250 @@ } }, "node_modules/esbuild": { - "version": "0.13.14", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.0.tgz", + "integrity": "sha512-UOnSKRAyZondxdLrOXnI/mesUmU/GvDTcajCvxoIaObzMeQcn0HyoGtvbfATnazlx799ZqFSyIZGLXFszkjy3A==", "dev": true, "hasInstallScript": true, - "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, "optionalDependencies": { - "esbuild-android-arm64": "0.13.14", - "esbuild-darwin-64": "0.13.14", - "esbuild-darwin-arm64": "0.13.14", - "esbuild-freebsd-64": "0.13.14", - "esbuild-freebsd-arm64": "0.13.14", - "esbuild-linux-32": "0.13.14", - "esbuild-linux-64": "0.13.14", - "esbuild-linux-arm": "0.13.14", - "esbuild-linux-arm64": "0.13.14", - "esbuild-linux-mips64le": "0.13.14", - "esbuild-linux-ppc64le": "0.13.14", - "esbuild-netbsd-64": "0.13.14", - "esbuild-openbsd-64": "0.13.14", - "esbuild-sunos-64": "0.13.14", - "esbuild-windows-32": "0.13.14", - "esbuild-windows-64": "0.13.14", - "esbuild-windows-arm64": "0.13.14" - } + "esbuild-android-arm64": "0.14.0", + "esbuild-darwin-64": "0.14.0", + "esbuild-darwin-arm64": "0.14.0", + "esbuild-freebsd-64": "0.14.0", + "esbuild-freebsd-arm64": "0.14.0", + "esbuild-linux-32": "0.14.0", + "esbuild-linux-64": "0.14.0", + "esbuild-linux-arm": "0.14.0", + "esbuild-linux-arm64": "0.14.0", + "esbuild-linux-mips64le": "0.14.0", + "esbuild-linux-ppc64le": "0.14.0", + "esbuild-netbsd-64": "0.14.0", + "esbuild-openbsd-64": "0.14.0", + "esbuild-sunos-64": "0.14.0", + "esbuild-windows-32": "0.14.0", + "esbuild-windows-64": "0.14.0", + "esbuild-windows-arm64": "0.14.0" + } + }, + "node_modules/esbuild-android-arm64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.0.tgz", + "integrity": "sha512-X7BjFiRRNfxPNg1aT5zw4xK1vbvX2IvDPcEp4bv0CEXgR39UzuOMUsQoG92aZgj8JGs8jxQAZc8k9dVJ1WL2BA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/esbuild-darwin-64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.0.tgz", + "integrity": "sha512-43vtt407jMp1kEXiaY0dEIGjOREax9F1+qMI0+F9tJyr06EHAofnbLL6cTmLgdPy/pMhltSvOJ8EddJrrOBgpQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/esbuild-darwin-arm64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.0.tgz", + "integrity": "sha512-hMbT5YiBrFL763mnwR9BqNtq9XtJgJRxYs7Ad++KUd+ZhMoVE0Rs/YLe1oor9uBGhHLqQsZuJ2dUHjCsfT/iDg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/esbuild-freebsd-64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.0.tgz", + "integrity": "sha512-mx68HRYIZo6ZiHbWk5Md+mDJoDw779yWkJQAaBnXwOkGbDeA3JmPZjp6IPfy2P+n3emK9z6g4pKiebp1tQGVoQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/esbuild-freebsd-arm64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.0.tgz", + "integrity": "sha512-iM8u+zTagh0WGn2FTTxi7DII/ycVzYyuf2Df6eP2ZX+vlx2FjaduhagRkpyhjfmEyhfJOrYSAR5R1biNPcA+VA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/esbuild-linux-32": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.0.tgz", + "integrity": "sha512-dWHotI2qlXWZyza7n85UubBj0asjpM7FTtQYDaRQKxoCJpCnSzq3aD55IJthiggZHXj2tAML9Bc5xjVLsBJR0w==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.0.tgz", + "integrity": "sha512-7buo31kp1/yKWPm9vU44FEUwkeIROrIgnCDV9KLMLSbOjGEHBZXYJ2L0p4ZnB7Z+m5YiW7F/AfJu0/1E87nOeQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-arm": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.0.tgz", + "integrity": "sha512-fgybXQwPRT4Io01+aD+yphcLOLRVGqbSdhvaDK3qBwqUvspFsq4QkI7PeeYpuQdBZWiRKLoi9v5r90l7JO/s+g==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-arm64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.0.tgz", + "integrity": "sha512-9LBtCH2RkhDBwoAYksTtXljN6hlxxoL6a3ymNfXJG9JxFUQddOfhajXZdObFn/hgGkAFwx8dXqw+FnPm0FCzSg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-mips64le": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.0.tgz", + "integrity": "sha512-Xz7soOqWeCWcLp15biPM08To+s0k1E/2q0pQZNQ+SY9S5H2vU4ujDXqKjxFc24G9CrOeUNEOXTkh+JldBGbTCA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-ppc64le": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.0.tgz", + "integrity": "sha512-fuBXTyUaZKxpmp43Nf0M1uI1OmZv/COcME9PG7NQ/EniwC680Xj5xQFhEBDVnvQQ+6xOnXdfPSojJq7gQxrORQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-netbsd-64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.0.tgz", + "integrity": "sha512-pQaECTKr/iCXtn1qjwih+cvoZzbZ+P3NwLQo4uo/IesklbPTR5eF4d85L1vPFVgff+itBMxbbB7aoRznSglN3A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ] + }, + "node_modules/esbuild-openbsd-64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.0.tgz", + "integrity": "sha512-HiaqQX9HMb9u3eYvKZ86+m/paQwASJSIjXiRTFpFusypjtU2NJqWb/LiRvhfmwC6rb7YHwCSPx+juSM7M+20bA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/esbuild-sunos-64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.0.tgz", + "integrity": "sha512-TkMQOSiSU3fHLV3M+OKUgLZt5L7TpcBcMRvtFw1cTxAnX8eT+1qkWVLiDM8ow1C3P7PW3bkGY3LW8vOs8o/jBA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ] + }, + "node_modules/esbuild-windows-32": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.0.tgz", + "integrity": "sha512-0h7E50JHgyLd7TkqSIH0VzBhngWspxPHuq/crDAMnh4s4tW8zWCMLIz2c1HVwHfZsh7d5+C4/yBaQeJTHXGvIA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] }, "node_modules/esbuild-windows-64": { - "version": "0.13.14", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.0.tgz", + "integrity": "sha512-RxnovPOoQS5Id4mbdIUm96L0GIg+ZME4FthbErw1kZZabLi9eLp1gR3vSwkZXKbK8Z76uDkSW0EN74i1XWVpiQ==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/esbuild-windows-arm64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.0.tgz", + "integrity": "sha512-66KsVlT6lGDWgDKQsAlojxgUhZkkjVeosMVRdb913OwtcOjszceg6zFD748jzp9CUgAseHCNJqFmYOyBzneSEQ==", + "cpu": [ + "arm64" + ], + "dev": true, "optional": true, "os": [ "win32" @@ -556,8 +794,9 @@ }, "node_modules/escape-string-regexp": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -566,9 +805,10 @@ } }, "node_modules/eslint": { - "version": "8.2.0", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.3.0.tgz", + "integrity": "sha512-aIay56Ph6RxOTC7xyr59Kt3ewX185SaGnAr8eWukoPLeriCrvGjvAubxuvaXOfsxhtwV5g0uBOsyhAom4qJdww==", "dev": true, - "license": "MIT", "dependencies": { "@eslint/eslintrc": "^1.0.4", "@humanwhocodes/config-array": "^0.6.0", @@ -579,10 +819,10 @@ "doctrine": "^3.0.0", "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^6.0.0", + "eslint-scope": "^7.1.0", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.0.0", - "espree": "^9.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.1.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -621,8 +861,9 @@ }, "node_modules/eslint-scope": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -633,8 +874,9 @@ }, "node_modules/eslint-utils": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, - "license": "MIT", "dependencies": { "eslint-visitor-keys": "^2.0.0" }, @@ -650,24 +892,27 @@ }, "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=10" } }, "node_modules/eslint-visitor-keys": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/eslint/node_modules/eslint-scope": { - "version": "6.0.0", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -678,28 +923,31 @@ }, "node_modules/eslint/node_modules/estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/eslint/node_modules/ignore": { "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/espree": { - "version": "9.0.0", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.1.0.tgz", + "integrity": "sha512-ZgYLvCS1wxOczBYGcQT9DDWgicXwJ4dbocr9uYN+/eresBAUuBu+O4WzB21ufQ/JqQT8gyp7hJ3z8SHii32mTQ==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.5.0", + "acorn": "^8.6.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.0.0" + "eslint-visitor-keys": "^3.1.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -707,8 +955,9 @@ }, "node_modules/esquery": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -718,16 +967,18 @@ }, "node_modules/esquery/node_modules/estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/esrecurse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -737,32 +988,36 @@ }, "node_modules/esrecurse/node_modules/estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/estraverse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/esutils": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "node_modules/fast-glob": { "version": "3.2.7", @@ -794,13 +1049,15 @@ }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true }, "node_modules/fastq": { "version": "1.13.0", @@ -813,8 +1070,9 @@ }, "node_modules/file-entry-cache": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, - "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -824,8 +1082,9 @@ }, "node_modules/fill-range": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -835,8 +1094,9 @@ }, "node_modules/flat-cache": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, - "license": "MIT", "dependencies": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -846,24 +1106,28 @@ } }, "node_modules/flatted": { - "version": "3.2.2", - "dev": true, - "license": "ISC" + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", + "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", + "dev": true }, "node_modules/fs.realpath": { "version": "1.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "node_modules/functional-red-black-tree": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true }, "node_modules/glob": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -881,8 +1145,9 @@ }, "node_modules/glob-parent": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -892,8 +1157,9 @@ }, "node_modules/globals": { "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -926,24 +1192,27 @@ }, "node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ignore": { "version": "5.1.9", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", + "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/import-fresh": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, - "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -957,16 +1226,18 @@ }, "node_modules/imurmurhash": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.19" } }, "node_modules/inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, - "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -974,21 +1245,24 @@ }, "node_modules/inherits": { "version": "2.0.4", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -998,21 +1272,24 @@ }, "node_modules/is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/isexe": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true }, "node_modules/js-yaml": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -1022,18 +1299,21 @@ }, "node_modules/json-schema-traverse": { "version": "0.4.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true }, "node_modules/levn": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, - "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -1044,17 +1324,20 @@ }, "node_modules/lodash.merge": { "version": "4.6.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true }, "node_modules/long": { - "version": "5.1.0", - "license": "Apache-2.0" + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.0.tgz", + "integrity": "sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w==" }, "node_modules/lru-cache": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -1073,8 +1356,9 @@ }, "node_modules/micromatch": { "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, - "license": "MIT", "dependencies": { "braces": "^3.0.1", "picomatch": "^2.2.3" @@ -1085,8 +1369,9 @@ }, "node_modules/minimatch": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1096,26 +1381,30 @@ }, "node_modules/ms": { "version": "2.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "node_modules/natural-compare": { "version": "1.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true }, "node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, - "license": "ISC", "dependencies": { "wrappy": "1" } }, "node_modules/optionator": { "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, - "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -1130,8 +1419,9 @@ }, "node_modules/parent-module": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, - "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -1141,16 +1431,18 @@ }, "node_modules/path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-key": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -1166,8 +1458,9 @@ }, "node_modules/picomatch": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -1177,24 +1470,27 @@ }, "node_modules/prelude-ls": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/progress": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/punycode": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -1221,8 +1517,9 @@ }, "node_modules/regexpp": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -1232,8 +1529,9 @@ }, "node_modules/resolve-from": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -1250,8 +1548,9 @@ }, "node_modules/rimraf": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, - "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -1287,8 +1586,9 @@ }, "node_modules/semver": { "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -1301,8 +1601,9 @@ }, "node_modules/shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -1312,8 +1613,9 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -1329,14 +1631,16 @@ }, "node_modules/source-map": { "version": "0.6.1", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "engines": { "node": ">=0.10.0" } }, "node_modules/source-map-support": { - "version": "0.5.20", - "license": "MIT", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -1344,8 +1648,9 @@ }, "node_modules/strip-ansi": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -1355,8 +1660,9 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -1366,8 +1672,9 @@ }, "node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -1377,13 +1684,15 @@ }, "node_modules/text-table": { "version": "0.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true }, "node_modules/to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -1393,13 +1702,15 @@ }, "node_modules/tslib": { "version": "1.14.1", - "dev": true, - "license": "0BSD" + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true }, "node_modules/tsutils": { "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, - "license": "MIT", "dependencies": { "tslib": "^1.8.1" }, @@ -1412,8 +1723,9 @@ }, "node_modules/type-check": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, - "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -1423,8 +1735,9 @@ }, "node_modules/type-fest": { "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -1437,7 +1750,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", "dev": true, - "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -1448,21 +1760,24 @@ }, "node_modules/uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/v8-compile-cache": { "version": "2.3.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true }, "node_modules/which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -1475,26 +1790,31 @@ }, "node_modules/word-wrap": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/wrappy": { "version": "1.0.2", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "node_modules/yallist": { "version": "4.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } }, "dependencies": { "@eslint/eslintrc": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", + "integrity": "sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -1510,12 +1830,16 @@ "dependencies": { "ignore": { "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true } } }, "@humanwhocodes/config-array": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", + "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.0", @@ -1525,6 +1849,8 @@ }, "@humanwhocodes/object-schema": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, "@nodelib/fs.scandir": { @@ -1555,10 +1881,14 @@ }, "@types/json-schema": { "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", "dev": true }, "@types/node": { - "version": "16.11.7", + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==", "dev": true }, "@typescript-eslint/eslint-plugin": { @@ -1645,16 +1975,22 @@ } }, "acorn": { - "version": "8.5.0", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", "dev": true }, "acorn-jsx": { "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "requires": {} }, "ajv": { "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -1665,14 +2001,20 @@ }, "ansi-colors": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "ansi-regex": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -1680,6 +2022,8 @@ }, "argparse": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, "array-union": { @@ -1690,6 +2034,8 @@ }, "balanced-match": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "binaryen": { @@ -1699,6 +2045,8 @@ }, "brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -1707,20 +2055,28 @@ }, "braces": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { "fill-range": "^7.0.1" } }, "buffer-from": { - "version": "1.1.2" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, "callsites": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -1729,6 +2085,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -1736,14 +2094,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "concat-map": { "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "cross-spawn": { "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -1752,7 +2116,9 @@ } }, "debug": { - "version": "4.3.2", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -1760,10 +2126,14 @@ }, "deep-is": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "diff": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, "dir-glob": { @@ -1777,6 +2147,8 @@ }, "doctrine": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "requires": { "esutils": "^2.0.2" @@ -1784,45 +2156,167 @@ }, "enquirer": { "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, "requires": { "ansi-colors": "^4.1.1" } }, "esbuild": { - "version": "0.13.14", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.0.tgz", + "integrity": "sha512-UOnSKRAyZondxdLrOXnI/mesUmU/GvDTcajCvxoIaObzMeQcn0HyoGtvbfATnazlx799ZqFSyIZGLXFszkjy3A==", "dev": true, "requires": { - "esbuild-android-arm64": "0.13.14", - "esbuild-darwin-64": "0.13.14", - "esbuild-darwin-arm64": "0.13.14", - "esbuild-freebsd-64": "0.13.14", - "esbuild-freebsd-arm64": "0.13.14", - "esbuild-linux-32": "0.13.14", - "esbuild-linux-64": "0.13.14", - "esbuild-linux-arm": "0.13.14", - "esbuild-linux-arm64": "0.13.14", - "esbuild-linux-mips64le": "0.13.14", - "esbuild-linux-ppc64le": "0.13.14", - "esbuild-netbsd-64": "0.13.14", - "esbuild-openbsd-64": "0.13.14", - "esbuild-sunos-64": "0.13.14", - "esbuild-windows-32": "0.13.14", - "esbuild-windows-64": "0.13.14", - "esbuild-windows-arm64": "0.13.14" - } + "esbuild-android-arm64": "0.14.0", + "esbuild-darwin-64": "0.14.0", + "esbuild-darwin-arm64": "0.14.0", + "esbuild-freebsd-64": "0.14.0", + "esbuild-freebsd-arm64": "0.14.0", + "esbuild-linux-32": "0.14.0", + "esbuild-linux-64": "0.14.0", + "esbuild-linux-arm": "0.14.0", + "esbuild-linux-arm64": "0.14.0", + "esbuild-linux-mips64le": "0.14.0", + "esbuild-linux-ppc64le": "0.14.0", + "esbuild-netbsd-64": "0.14.0", + "esbuild-openbsd-64": "0.14.0", + "esbuild-sunos-64": "0.14.0", + "esbuild-windows-32": "0.14.0", + "esbuild-windows-64": "0.14.0", + "esbuild-windows-arm64": "0.14.0" + } + }, + "esbuild-android-arm64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.0.tgz", + "integrity": "sha512-X7BjFiRRNfxPNg1aT5zw4xK1vbvX2IvDPcEp4bv0CEXgR39UzuOMUsQoG92aZgj8JGs8jxQAZc8k9dVJ1WL2BA==", + "dev": true, + "optional": true + }, + "esbuild-darwin-64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.0.tgz", + "integrity": "sha512-43vtt407jMp1kEXiaY0dEIGjOREax9F1+qMI0+F9tJyr06EHAofnbLL6cTmLgdPy/pMhltSvOJ8EddJrrOBgpQ==", + "dev": true, + "optional": true + }, + "esbuild-darwin-arm64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.0.tgz", + "integrity": "sha512-hMbT5YiBrFL763mnwR9BqNtq9XtJgJRxYs7Ad++KUd+ZhMoVE0Rs/YLe1oor9uBGhHLqQsZuJ2dUHjCsfT/iDg==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.0.tgz", + "integrity": "sha512-mx68HRYIZo6ZiHbWk5Md+mDJoDw779yWkJQAaBnXwOkGbDeA3JmPZjp6IPfy2P+n3emK9z6g4pKiebp1tQGVoQ==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-arm64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.0.tgz", + "integrity": "sha512-iM8u+zTagh0WGn2FTTxi7DII/ycVzYyuf2Df6eP2ZX+vlx2FjaduhagRkpyhjfmEyhfJOrYSAR5R1biNPcA+VA==", + "dev": true, + "optional": true + }, + "esbuild-linux-32": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.0.tgz", + "integrity": "sha512-dWHotI2qlXWZyza7n85UubBj0asjpM7FTtQYDaRQKxoCJpCnSzq3aD55IJthiggZHXj2tAML9Bc5xjVLsBJR0w==", + "dev": true, + "optional": true + }, + "esbuild-linux-64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.0.tgz", + "integrity": "sha512-7buo31kp1/yKWPm9vU44FEUwkeIROrIgnCDV9KLMLSbOjGEHBZXYJ2L0p4ZnB7Z+m5YiW7F/AfJu0/1E87nOeQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.0.tgz", + "integrity": "sha512-fgybXQwPRT4Io01+aD+yphcLOLRVGqbSdhvaDK3qBwqUvspFsq4QkI7PeeYpuQdBZWiRKLoi9v5r90l7JO/s+g==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.0.tgz", + "integrity": "sha512-9LBtCH2RkhDBwoAYksTtXljN6hlxxoL6a3ymNfXJG9JxFUQddOfhajXZdObFn/hgGkAFwx8dXqw+FnPm0FCzSg==", + "dev": true, + "optional": true + }, + "esbuild-linux-mips64le": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.0.tgz", + "integrity": "sha512-Xz7soOqWeCWcLp15biPM08To+s0k1E/2q0pQZNQ+SY9S5H2vU4ujDXqKjxFc24G9CrOeUNEOXTkh+JldBGbTCA==", + "dev": true, + "optional": true + }, + "esbuild-linux-ppc64le": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.0.tgz", + "integrity": "sha512-fuBXTyUaZKxpmp43Nf0M1uI1OmZv/COcME9PG7NQ/EniwC680Xj5xQFhEBDVnvQQ+6xOnXdfPSojJq7gQxrORQ==", + "dev": true, + "optional": true + }, + "esbuild-netbsd-64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.0.tgz", + "integrity": "sha512-pQaECTKr/iCXtn1qjwih+cvoZzbZ+P3NwLQo4uo/IesklbPTR5eF4d85L1vPFVgff+itBMxbbB7aoRznSglN3A==", + "dev": true, + "optional": true + }, + "esbuild-openbsd-64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.0.tgz", + "integrity": "sha512-HiaqQX9HMb9u3eYvKZ86+m/paQwASJSIjXiRTFpFusypjtU2NJqWb/LiRvhfmwC6rb7YHwCSPx+juSM7M+20bA==", + "dev": true, + "optional": true + }, + "esbuild-sunos-64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.0.tgz", + "integrity": "sha512-TkMQOSiSU3fHLV3M+OKUgLZt5L7TpcBcMRvtFw1cTxAnX8eT+1qkWVLiDM8ow1C3P7PW3bkGY3LW8vOs8o/jBA==", + "dev": true, + "optional": true + }, + "esbuild-windows-32": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.0.tgz", + "integrity": "sha512-0h7E50JHgyLd7TkqSIH0VzBhngWspxPHuq/crDAMnh4s4tW8zWCMLIz2c1HVwHfZsh7d5+C4/yBaQeJTHXGvIA==", + "dev": true, + "optional": true }, "esbuild-windows-64": { - "version": "0.13.14", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.0.tgz", + "integrity": "sha512-RxnovPOoQS5Id4mbdIUm96L0GIg+ZME4FthbErw1kZZabLi9eLp1gR3vSwkZXKbK8Z76uDkSW0EN74i1XWVpiQ==", + "dev": true, + "optional": true + }, + "esbuild-windows-arm64": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.0.tgz", + "integrity": "sha512-66KsVlT6lGDWgDKQsAlojxgUhZkkjVeosMVRdb913OwtcOjszceg6zFD748jzp9CUgAseHCNJqFmYOyBzneSEQ==", "dev": true, "optional": true }, "escape-string-regexp": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, "eslint": { - "version": "8.2.0", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.3.0.tgz", + "integrity": "sha512-aIay56Ph6RxOTC7xyr59Kt3ewX185SaGnAr8eWukoPLeriCrvGjvAubxuvaXOfsxhtwV5g0uBOsyhAom4qJdww==", "dev": true, "requires": { "@eslint/eslintrc": "^1.0.4", @@ -1834,10 +2328,10 @@ "doctrine": "^3.0.0", "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^6.0.0", + "eslint-scope": "^7.1.0", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.0.0", - "espree": "^9.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.1.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1866,7 +2360,9 @@ }, "dependencies": { "eslint-scope": { - "version": "6.0.0", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -1875,16 +2371,22 @@ }, "estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, "ignore": { "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true } } }, "eslint-scope": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -1893,6 +2395,8 @@ }, "eslint-utils": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "requires": { "eslint-visitor-keys": "^2.0.0" @@ -1900,25 +2404,33 @@ "dependencies": { "eslint-visitor-keys": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true } } }, "eslint-visitor-keys": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", "dev": true }, "espree": { - "version": "9.0.0", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.1.0.tgz", + "integrity": "sha512-ZgYLvCS1wxOczBYGcQT9DDWgicXwJ4dbocr9uYN+/eresBAUuBu+O4WzB21ufQ/JqQT8gyp7hJ3z8SHii32mTQ==", "dev": true, "requires": { - "acorn": "^8.5.0", + "acorn": "^8.6.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.0.0" + "eslint-visitor-keys": "^3.1.0" } }, "esquery": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -1926,12 +2438,16 @@ "dependencies": { "estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } }, "esrecurse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { "estraverse": "^5.2.0" @@ -1939,20 +2455,28 @@ "dependencies": { "estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } }, "estraverse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, "esutils": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, "fast-deep-equal": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "fast-glob": { @@ -1981,10 +2505,14 @@ }, "fast-json-stable-stringify": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, "fast-levenshtein": { "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, "fastq": { @@ -1998,6 +2526,8 @@ }, "file-entry-cache": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { "flat-cache": "^3.0.4" @@ -2005,6 +2535,8 @@ }, "fill-range": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { "to-regex-range": "^5.0.1" @@ -2012,6 +2544,8 @@ }, "flat-cache": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { "flatted": "^3.1.0", @@ -2019,19 +2553,27 @@ } }, "flatted": { - "version": "3.2.2", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", + "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", "dev": true }, "fs.realpath": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, "functional-red-black-tree": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, "glob": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -2044,6 +2586,8 @@ }, "glob-parent": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { "is-glob": "^4.0.3" @@ -2051,6 +2595,8 @@ }, "globals": { "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -2072,14 +2618,20 @@ }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "ignore": { "version": "5.1.9", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", + "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", "dev": true }, "import-fresh": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -2088,10 +2640,14 @@ }, "imurmurhash": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, "inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { "once": "^1.3.0", @@ -2100,14 +2656,20 @@ }, "inherits": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, "is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -2115,14 +2677,20 @@ }, "is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, "isexe": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, "js-yaml": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { "argparse": "^2.0.1" @@ -2130,14 +2698,20 @@ }, "json-schema-traverse": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, "levn": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { "prelude-ls": "^1.2.1", @@ -2146,13 +2720,19 @@ }, "lodash.merge": { "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "long": { - "version": "5.1.0" + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.0.tgz", + "integrity": "sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w==" }, "lru-cache": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "requires": { "yallist": "^4.0.0" @@ -2166,6 +2746,8 @@ }, "micromatch": { "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, "requires": { "braces": "^3.0.1", @@ -2174,6 +2756,8 @@ }, "minimatch": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -2181,14 +2765,20 @@ }, "ms": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "natural-compare": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, "once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" @@ -2196,6 +2786,8 @@ }, "optionator": { "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { "deep-is": "^0.1.3", @@ -2208,6 +2800,8 @@ }, "parent-module": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "requires": { "callsites": "^3.0.0" @@ -2215,10 +2809,14 @@ }, "path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "path-key": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "path-type": { @@ -2229,18 +2827,26 @@ }, "picomatch": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, "prelude-ls": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "progress": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, "punycode": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, "queue-microtask": { @@ -2251,10 +2857,14 @@ }, "regexpp": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, "resolve-from": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "reusify": { @@ -2265,6 +2875,8 @@ }, "rimraf": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -2281,6 +2893,8 @@ }, "semver": { "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -2288,6 +2902,8 @@ }, "shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { "shebang-regex": "^3.0.0" @@ -2295,6 +2911,8 @@ }, "shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "slash": { @@ -2304,10 +2922,14 @@ "dev": true }, "source-map": { - "version": "0.6.1" + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "source-map-support": { - "version": "0.5.20", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -2315,6 +2937,8 @@ }, "strip-ansi": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { "ansi-regex": "^5.0.1" @@ -2322,10 +2946,14 @@ }, "strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -2333,10 +2961,14 @@ }, "text-table": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, "to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { "is-number": "^7.0.0" @@ -2344,10 +2976,14 @@ }, "tslib": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, "tsutils": { "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, "requires": { "tslib": "^1.8.1" @@ -2355,6 +2991,8 @@ }, "type-check": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { "prelude-ls": "^1.2.1" @@ -2362,6 +3000,8 @@ }, "type-fest": { "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, "typescript": { @@ -2372,6 +3012,8 @@ }, "uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { "punycode": "^2.1.0" @@ -2379,10 +3021,14 @@ }, "v8-compile-cache": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, "which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -2390,14 +3036,20 @@ }, "word-wrap": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, "wrappy": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "yallist": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true } } diff --git a/package.json b/package.json index 3f0d2cd329..200451b06e 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", "diff": "^5.0.0", - "esbuild": "^0.13.14", + "esbuild": "^0.14.0", "eslint": "^8.2.0", "glob": "^7.2.0", "typescript": "~4.5.2" From 8c59d2bc0a347d6141e93f3ad441cfba9fa20a0f Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 28 Nov 2021 06:41:13 +0100 Subject: [PATCH 036/175] make it work in browsers --- src/glue/js/collections.js | 8 ++-- src/glue/js/float.js | 8 ++-- src/glue/js/i64.js | 76 ++++++++++++++++++------------------- tests/browser.html | 77 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 124 insertions(+), 45 deletions(-) create mode 100644 tests/browser.html diff --git a/src/glue/js/collections.js b/src/glue/js/collections.js index 63a3b9499d..aff8f5217b 100644 --- a/src/glue/js/collections.js +++ b/src/glue/js/collections.js @@ -3,14 +3,16 @@ * @license Apache-2.0 */ -global.Map_keys = function Map_keys(map) { +/* eslint-disable no-undef */ + +globalThis.Map_keys = function Map_keys(map) { return Array.from(map.keys()); }; -global.Map_values = function Map_values(map) { +globalThis.Map_values = function Map_values(map) { return Array.from(map.values()); }; -global.Set_values = function Set_values(set) { +globalThis.Set_values = function Set_values(set) { return Array.from(set.values()); }; diff --git a/src/glue/js/float.js b/src/glue/js/float.js index a028022d30..090af6cf96 100644 --- a/src/glue/js/float.js +++ b/src/glue/js/float.js @@ -9,22 +9,22 @@ const F64 = new Float64Array(1); const F32 = new Float32Array(F64.buffer); const I32 = new Int32Array(F64.buffer); -global.f32_as_i32 = function f32_as_i32(value) { +globalThis.f32_as_i32 = function f32_as_i32(value) { F32[0] = value; return I32[0]; }; -global.i32_as_f32 = function i32_as_f32(value) { +globalThis.i32_as_f32 = function i32_as_f32(value) { I32[0] = value; return F32[0]; }; -global.f64_as_i64 = function f64_as_i64(value) { +globalThis.f64_as_i64 = function f64_as_i64(value) { F64[0] = value; return i64_new(I32[0], I32[1]); }; -global.i64_as_f64 = function i64_as_f64(value) { +globalThis.i64_as_f64 = function i64_as_f64(value) { I32[0] = i64_low(value); I32[1] = i64_high(value); return F64[0]; diff --git a/src/glue/js/i64.js b/src/glue/js/i64.js index 7c64f71205..00fe314df0 100644 --- a/src/glue/js/i64.js +++ b/src/glue/js/i64.js @@ -7,39 +7,39 @@ import Long from "long"; -global.i64_zero = Long.ZERO; -global.i64_one = Long.ONE; -global.i64_neg_one = Long.fromInt(-1); +globalThis.i64_zero = Long.ZERO; +globalThis.i64_one = Long.ONE; +globalThis.i64_neg_one = Long.fromInt(-1); -global.i64_is = function i64_is(value) { +globalThis.i64_is = function i64_is(value) { return Long.isLong(value); }; -global.i64_new = function i64_new(lo, hi) { +globalThis.i64_new = function i64_new(lo, hi) { return Long.fromBits(lo, hi); }; -global.i64_low = function i64_low(value) { +globalThis.i64_low = function i64_low(value) { return value.low; }; -global.i64_high = function i64_high(value) { +globalThis.i64_high = function i64_high(value) { return value.high; }; -global.i64_add = function i64_add(left, right) { +globalThis.i64_add = function i64_add(left, right) { return left.add(right); }; -global.i64_sub = function i64_sub(left, right) { +globalThis.i64_sub = function i64_sub(left, right) { return left.sub(right); }; -global.i64_mul = function i64_mul(left, right) { +globalThis.i64_mul = function i64_mul(left, right) { return left.mul(right); }; -global.i64_pow = function i64_pow(left, right) { +globalThis.i64_pow = function i64_pow(left, right) { var rightLo = right.low; var rightHi = right.high; if (rightHi <= 0) { @@ -64,121 +64,121 @@ global.i64_pow = function i64_pow(left, right) { return result; }; -global.i64_div = function i64_div(left, right) { +globalThis.i64_div = function i64_div(left, right) { return left.div(right); }; -global.i64_div_u = function i64_div_u(left, right) { +globalThis.i64_div_u = function i64_div_u(left, right) { return left.toUnsigned().div(right.toUnsigned()).toSigned(); }; -global.i64_rem = function i64_rem(left, right) { +globalThis.i64_rem = function i64_rem(left, right) { return left.mod(right); }; -global.i64_rem_u = function i64_rem_u(left, right) { +globalThis.i64_rem_u = function i64_rem_u(left, right) { return left.toUnsigned().mod(right.toUnsigned()).toSigned(); }; -global.i64_and = function i64_and(left, right) { +globalThis.i64_and = function i64_and(left, right) { return left.and(right); }; -global.i64_or = function i64_or(left, right) { +globalThis.i64_or = function i64_or(left, right) { return left.or(right); }; -global.i64_xor = function i64_xor(left, right) { +globalThis.i64_xor = function i64_xor(left, right) { return left.xor(right); }; -global.i64_shl = function i64_shl(left, right) { +globalThis.i64_shl = function i64_shl(left, right) { return left.shl(right); }; -global.i64_shr = function i64_shr(left, right) { +globalThis.i64_shr = function i64_shr(left, right) { return left.shr(right); }; -global.i64_shr_u = function i64_shr_u(left, right) { +globalThis.i64_shr_u = function i64_shr_u(left, right) { return left.shru(right); }; -global.i64_not = function i64_not(value) { +globalThis.i64_not = function i64_not(value) { return value.not(); }; -global.i64_eq = function i64_eq(left, right) { +globalThis.i64_eq = function i64_eq(left, right) { return left.eq(right); }; -global.i64_ne = function i64_ne(left, right) { +globalThis.i64_ne = function i64_ne(left, right) { return left.ne(right); }; -global.i64_gt = function i64_gt(left, right) { +globalThis.i64_gt = function i64_gt(left, right) { return left.gt(right); }; -global.i64_align = function i64_align(value, alignment) { +globalThis.i64_align = function i64_align(value, alignment) { assert(alignment && (alignment & (alignment - 1)) == 0); var mask = Long.fromInt(alignment - 1); return value.add(mask).and(mask.not()); }; -global.i64_is_i8 = function i64_is_i8(value) { +globalThis.i64_is_i8 = function i64_is_i8(value) { return value.high === 0 && (value.low >= 0 && value.low <= i8.MAX_VALUE) || value.high === -1 && (value.low >= i8.MIN_VALUE && value.low < 0); }; -global.i64_is_i16 = function i64_is_i16(value) { +globalThis.i64_is_i16 = function i64_is_i16(value) { return value.high === 0 && (value.low >= 0 && value.low <= i16.MAX_VALUE) || value.high === -1 && (value.low >= i16.MIN_VALUE && value.low < 0); }; -global.i64_is_i32 = function i64_is_i32(value) { +globalThis.i64_is_i32 = function i64_is_i32(value) { return (value.high === 0 && value.low >= 0) || (value.high === -1 && value.low < 0); }; -global.i64_is_u8 = function i64_is_u8(value) { +globalThis.i64_is_u8 = function i64_is_u8(value) { return value.high === 0 && (value.low >>> 0) <= u8.MAX_VALUE; }; -global.i64_is_u16 = function i64_is_u16(value) { +globalThis.i64_is_u16 = function i64_is_u16(value) { return value.high === 0 && (value.low >>> 0) <= u16.MAX_VALUE; }; -global.i64_is_u32 = function i64_is_u32(value) { +globalThis.i64_is_u32 = function i64_is_u32(value) { return value.high === 0; }; -global.i64_is_bool = function i64_is_bool(value) { +globalThis.i64_is_bool = function i64_is_bool(value) { return (value.high | (value.low & ~1)) === 0; }; const minSafeF32 = Long.fromNumber(f32.MIN_SAFE_INTEGER); const maxSafeF32 = Long.fromNumber(f32.MAX_SAFE_INTEGER); -global.i64_is_f32 = function i64_is_f32(value) { +globalThis.i64_is_f32 = function i64_is_f32(value) { return value.gte(minSafeF32) && value.lte(maxSafeF32); }; const minSafeF64 = Long.fromNumber(f64.MIN_SAFE_INTEGER); const maxSafeF64 = Long.fromNumber(f64.MAX_SAFE_INTEGER); -global.i64_is_f64 = function i64_is_f64(value) { +globalThis.i64_is_f64 = function i64_is_f64(value) { return value.gte(minSafeF64) && value.lte(maxSafeF64); }; -global.i64_to_f32 = function i64_to_f32(value) { +globalThis.i64_to_f32 = function i64_to_f32(value) { return global.Math.fround(value.toNumber()); }; -global.i64_to_f64 = function i64_to_f64(value) { +globalThis.i64_to_f64 = function i64_to_f64(value) { return value.toNumber(); }; -global.i64_to_string = function i64_to_string(value, unsigned) { +globalThis.i64_to_string = function i64_to_string(value, unsigned) { return unsigned ? value.toUnsigned().toString() : value.toString(); }; diff --git a/tests/browser.html b/tests/browser.html new file mode 100644 index 0000000000..d4cbc32b84 --- /dev/null +++ b/tests/browser.html @@ -0,0 +1,77 @@ + + + From 15c5044a79bc03717e6974e92b8db4de9cbbf720 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 28 Nov 2021 06:43:06 +0100 Subject: [PATCH 037/175] remove unnecessary check --- tests/browser.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/browser.html b/tests/browser.html index d4cbc32b84..7538fa4c0f 100644 --- a/tests/browser.html +++ b/tests/browser.html @@ -11,9 +11,6 @@ + + +`); diff --git a/scripts/build.js b/scripts/build.js index eae3b6c1fa..8317487c1b 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -28,7 +28,7 @@ function time() { return new Date().toISOString(); } -function reporter(name) { +function reportPlugin(name) { return { name: "reporter", setup(build) { @@ -55,8 +55,8 @@ function bundleFile(filename) { return fs.readFileSync(filename, { encoding: "utf8" }).replace(/\r\n/g, "\n"); } -class StdlibPlugin { - name = "stdlib"; +const stdlibPlugin = { + name: "stdlib", setup(build) { build.onResolve({ filter: /\bindex\.generated\.js$/ }, args => { return { @@ -104,12 +104,12 @@ class StdlibPlugin { }; }); } -} +}; // Diagnostic messages integration -class DiagnosticsPlugin { - name = "diagnostics"; +const diagnosticsPlugin = { + name: "diagnostics", setup(build) { build.onResolve({ filter: /\bdiagnosticMessages\.generated$/ }, args => { return { @@ -161,7 +161,34 @@ class DiagnosticsPlugin { }; }); } -} +}; + +// SDK integration + +const sdkPlugin = { + name: "sdk", + setup(build) { + build.onEnd(() => { + const startTime = Date.now(); + const stdout = []; + console.log(`${time()} - ${"sdk"} - Starting new build ...`); + childProcess.spawn("node", [ "./build-sdk.js" ], { + cwd: dirname, + stdio: "pipe" + }).on("data", data => { + stdout.push(data.toString()); + }).on("error", err => { + const duration = Date.now() - startTime; + console.log(stdout.join("")); + console.log(`${time()} - ${"sdk"} - ${colors.red("ERROR")} (had errors, ${duration} ms)`); + }).on("close", code => { + if (code) return; + const duration = Date.now() - startTime; + console.log(`${time()} - ${"sdk"} - ${colors.green("SUCCESS")} (no errors, ${duration} ms)`); + }); + }); + } +}; // Build compiler and CLI @@ -184,7 +211,7 @@ esbuild.build({ js: prelude("The AssemblyScript compiler") }, watch, - plugins: [ new DiagnosticsPlugin(), reporter("src") ] + plugins: [ diagnosticsPlugin, reportPlugin("src") ] }); esbuild.build({ @@ -203,7 +230,7 @@ esbuild.build({ js: prelude("The AssemblyScript frontend") }, watch, - plugins: [ new StdlibPlugin(), reporter("cli") ] + plugins: [ stdlibPlugin, sdkPlugin, reportPlugin("cli") ] }); // Build definitions From f6a53850f2a567e7f1cc192b3082c41491fd54e9 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 28 Nov 2021 23:36:39 +0100 Subject: [PATCH 043/175] remove old sdk --- lib/sdk/README.md | 38 -------------------------------------- lib/sdk/index.js | 35 ----------------------------------- lib/sdk/tests/index.html | 20 -------------------- 3 files changed, 93 deletions(-) delete mode 100644 lib/sdk/README.md delete mode 100644 lib/sdk/index.js delete mode 100644 lib/sdk/tests/index.html diff --git a/lib/sdk/README.md b/lib/sdk/README.md deleted file mode 100644 index 1927878f8f..0000000000 --- a/lib/sdk/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Browser SDK - -An SDK to use the AssemblyScript compiler on the web. This is built to distribution files using the exact versions of the compiler and its dependencies. - -Expects [require.js](https://requirejs.org) (or compatible) on the web, primarily targeting [WebAssembly Studio](https://webassembly.studio). Note that consuming the source file in this directory directly does not solve any versioning issues - use `dist/sdk.js` instead. Do not try to bundle this. - -Exports -------- - -* **binaryen**
- The version of binaryen required by the compiler. - -* **long**
- The version of long.js required by the compiler. - -* **assemblyscript**
- The AssemblyScript compiler as a library. - -* **asc**
- AssemblyScript compiler frontend that one will interact with - ([see](https://github.com/AssemblyScript/assemblyscript/tree/main/cli)). - -Example usage -------------- - -```js -require( - ["https://cdn.jsdelivr.net/npm/assemblyscript@latest/dist/sdk"], - function(sdk) { - const { asc } = sdk; - asc.ready.then(() => { - asc.main(...); - }); - } -); -``` - -There is also the [SDK example](https://github.com/AssemblyScript/examples/tree/main/sdk) showing how to compile some actual code. diff --git a/lib/sdk/index.js b/lib/sdk/index.js deleted file mode 100644 index ad20f72bdd..0000000000 --- a/lib/sdk/index.js +++ /dev/null @@ -1,35 +0,0 @@ -const BINARYEN_VERSION = "nightly"; -const LONG_VERSION = "latest"; -const ASSEMBLYSCRIPT_VERSION = "latest"; - -// AMD/require.js (browser) -if (typeof define === "function" && define.amd) { - const paths = { - "binaryen": "https://cdn.jsdelivr.net/npm/binaryen@" + BINARYEN_VERSION + "/index", - "long": "https://cdn.jsdelivr.net/npm/long@" + LONG_VERSION + "/umd/index", - "assemblyscript": "https://cdn.jsdelivr.net/npm/assemblyscript@" + ASSEMBLYSCRIPT_VERSION + "/dist/assemblyscript", - "assemblyscript/cli/asc": "https://cdn.jsdelivr.net/npm/assemblyscript@" + ASSEMBLYSCRIPT_VERSION + "/dist/asc", - }; - require.config({ paths }); - define(Object.keys(paths), (binaryen, long, assemblyscript, asc) => ({ - BINARYEN_VERSION, - LONG_VERSION, - ASSEMBLYSCRIPT_VERSION, - binaryen, - long, - assemblyscript, - asc - })); - -// CommonJS fallback (node) -} else if (typeof module === "object" && module.exports) { - module.exports = { - BINARYEN_VERSION, - LONG_VERSION, - ASSEMBLYSCRIPT_VERSION, - binaryen: require("binaryen"), - long: require("long"), - assemblyscript: require("assemblyscript"), - asc: require("assemblyscript/cli/asc") - }; -} diff --git a/lib/sdk/tests/index.html b/lib/sdk/tests/index.html deleted file mode 100644 index 5d5eb34fc8..0000000000 --- a/lib/sdk/tests/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - From 9b5aeb78c2befc2b7a01d34581b0f113018991b2 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 28 Nov 2021 23:48:56 +0100 Subject: [PATCH 044/175] remove outdated lib/webpack --- lib/webpack/README.md | 14 ---------- lib/webpack/decode.js | 26 ------------------ lib/webpack/index.js | 57 ---------------------------------------- lib/webpack/package.json | 9 ------- 4 files changed, 106 deletions(-) delete mode 100644 lib/webpack/README.md delete mode 100644 lib/webpack/decode.js delete mode 100644 lib/webpack/index.js delete mode 100644 lib/webpack/package.json diff --git a/lib/webpack/README.md b/lib/webpack/README.md deleted file mode 100644 index 733f718636..0000000000 --- a/lib/webpack/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Webpack loader - -An experimental [webpack](https://webpack.js.org/) loader for [AssemblyScript](http://assemblyscript.org) modules. - -Usage ------ - -```js -import MyModule from "@assemblyscript/webpack!mymodule.wasm"; - -var myModule = new MyModule({ imports: { /* if any */ } }); -``` - -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 deleted file mode 100644 index 364df2089f..0000000000 --- a/lib/webpack/decode.js +++ /dev/null @@ -1,26 +0,0 @@ -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 decode(string) { - var length = string.length; - if (length) { - var n = 0, p = length; - while (--p % 4 > 1 && string.charCodeAt(p) === 61) ++n; - length = Math.ceil(length * 3) / 4 - n; - } - var buffer = new Uint8Array(length); - var j = 0, o = 0, t; - for (var i = 0, k = string.length; i < k;) { - var c = string.charCodeAt(i++); - if (c === 61 && j > 1) break; - if ((c = s64[c]) === undefined) throw Error(); - switch (j) { - case 0: t = c; j = 1; break; - case 1: buffer[o++] = t << 2 | (c & 48) >> 4; t = c; j = 2; break; - case 2: buffer[o++] = (t & 15) << 4 | (c & 60) >> 2; t = c; j = 3; break; - case 3: buffer[o++] = (t & 3) << 6 | c; j = 0; break; - } - } - if (j === 1) throw Error(); - return buffer; -}; diff --git a/lib/webpack/index.js b/lib/webpack/index.js deleted file mode 100644 index d622ce5164..0000000000 --- a/lib/webpack/index.js +++ /dev/null @@ -1,57 +0,0 @@ -const fs = require("fs"); -const path = require("path"); -const asc = require("assemblyscript/cli/asc.js"); -const base64 = require("@protobufjs/base64"); - -const MAGIC = Buffer.from([ 0x00, 0x61, 0x73, 0x6D ]); - -module.exports = loader; - -function loader(buffer) { - if (MAGIC.compare(buffer, 0, 4) !== 0) - return compile.call(this); - else - return bundle.call(this, buffer); -} - -loader.raw = true; - -function compile() { - const basePath = this.resourcePath.replace(/\.\w+$/, ""); - const args = [ - path.basename(this.resourcePath), - "--baseDir", path.dirname(this.resourcePath), - "--binaryFile", basePath + ".wasm", - "--textFile", basePath + ".wat", - "--optimize" - ]; - if (this.sourceMap) - args.push("--sourceMap"); - asc.main(args, err => { - if (err) - return this.callback(err); - fs.readFile(basePath + ".wasm", (err, binary) => { - if (err) - return this.callback(err); - if (!this.sourceMap) - return this.callback(null, bundle(binary)); - fs.readFile(basePath + ".wasm.map", (err, sourceMap) => { - if (err) - return this.callback(err); - return this.callback(null, bundle(binary), sourceMap.toString("utf8")); - }); - }); - }); -} - -function bundle(binary) { - const data = base64.encode(binary, 0, binary.wasm); - return [ - 'var data = "' + data + '", wasm;', - '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;', - '};' - ].join("\n") + "\n"; -} diff --git a/lib/webpack/package.json b/lib/webpack/package.json deleted file mode 100644 index 169206ff98..0000000000 --- a/lib/webpack/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "@assemblyscript/webpack", - "version": "0.5.0", - "description": "webpack loader for AssemblyScript modules.", - "license": "Apache-2.0", - "dependencies": { - "@protobufjs/base64": "^1.1.2" - } -} From f6e70d7fe5ea81eb2e612a85e14d47f982be2d26 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 29 Nov 2021 02:01:25 +0100 Subject: [PATCH 045/175] tidy more --- .github/workflows/publish.yml | 2 ++ package.json | 37 ++++---------------------- scripts/{build-sdk.js => build-web.js} | 2 +- scripts/build.js | 23 +++++++++------- scripts/prepublish.js | 32 ++++++++++++++++++++++ 5 files changed, 54 insertions(+), 42 deletions(-) rename scripts/{build-sdk.js => build-web.js} (96%) create mode 100644 scripts/prepublish.js diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e29f68ecae..8e3cbb4925 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -47,6 +47,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: | + node ./scripts/prepublish if [ $(node -pe "require('./package.json').version") != "0.0.0" ]; then npx aspublish fi @@ -59,3 +60,4 @@ jobs: npm publish --access public fi cd ../.. + node ./scripts/prepublish --reset diff --git a/package.json b/package.json index 6ba9655a1d..ed2ab4087f 100644 --- a/package.json +++ b/package.json @@ -36,20 +36,11 @@ "typescript": "~4.5.2" }, "type": "module", - "main": "index.js", - "types": "index.d.ts", + "main": "./index.js", + "types": "./index.d.ts", "exports": { - ".": "./index.js", - "./std/portable": "./std/portable/index.js", - "./lib/loader": { - "import": "./lib/loader/index.js", - "require": "./lib/loader/umd/index.js" - }, - "./lib/rtrace": { - "import": "./lib/rtrace/index.js", - "require": "./lib/rtrace/umd/index.js" - }, - "./*": "./*.js" + "./": "./index.js", + "./*": "./*" }, "bin": { "asc": "bin/asc.js", @@ -79,20 +70,6 @@ "bootstrap:rtraced": "node bin/asc --config src/asconfig.json --target rtraced && node bin/asc --config src/asconfig.json --target rtraced --wasm out/assemblyscript.rtraced.wasm" }, "files": [ - "lib/loader/index.d.ts", - "lib/loader/index.js", - "lib/loader/package.json", - "lib/loader/umd/index.d.ts", - "lib/loader/umd/index.js", - "lib/loader/umd/package.json", - "lib/loader/README.md", - "lib/rtrace/index.d.ts", - "lib/rtrace/index.js", - "lib/rtrace/package.json", - "lib/rtrace/umd/index.d.ts", - "lib/rtrace/umd/index.js", - "lib/rtrace/umd/package.json", - "lib/rtrace/README.md", "bin/", "dist/", "std/", @@ -104,11 +81,7 @@ "transform.d.ts", "transform.js", "tsconfig-base.json", - "LICENSE", - "NOTICE", - "package.json", - "package-lock.json", - "README.md" + "NOTICE" ], "funding": { "type": "opencollective", diff --git a/scripts/build-sdk.js b/scripts/build-web.js similarity index 96% rename from scripts/build-sdk.js rename to scripts/build-web.js index c6f2642058..c4988c7235 100644 --- a/scripts/build-sdk.js +++ b/scripts/build-web.js @@ -15,7 +15,7 @@ const mainUrl = mainVersion === "0.0.0" ? `../` : `https://cdn.jsdelivr.net/npm/ const binaryenUrl = `https://cdn.jsdelivr.net/npm/binaryen@${binaryenVersion}/index.js`; const longUrl = `https://cdn.jsdelivr.net/npm/long@${longVersion}/index.js`; -fs.writeFileSync(path.join(dirname, "..", "dist", "sdk.html"), ` +fs.writeFileSync(path.join(dirname, "..", "dist", "web.html"), ` - - diff --git a/tests/parser.js b/tests/parser.js index ab03efc494..21a2901d23 100644 --- a/tests/parser.js +++ b/tests/parser.js @@ -52,7 +52,7 @@ if (argv.length) { } } -import { Program, Options, ASTBuilder } from "../index.js"; +import { Program, Options, ASTBuilder } from "assemblyscript"; var failures = 0; diff --git a/tests/tokenizer.js b/tests/tokenizer.js index 1f47fd13e4..63fd0a46ff 100644 --- a/tests/tokenizer.js +++ b/tests/tokenizer.js @@ -1,7 +1,7 @@ import fs from "fs"; import path from "path"; import { fileURLToPath } from "url"; -import { Tokenizer, Token, Source, SourceKind } from "../index.js"; +import { Tokenizer, Token, Source, SourceKind } from "assemblyscript"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); From fa6150ba7fb0ac4ca5b6beface0458030af0fba4 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 29 Nov 2021 02:28:36 +0100 Subject: [PATCH 049/175] now? --- package.json | 18 ++++++++++++------ tests/import/index.ts | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 0b563f4904..0eaadea8dc 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ ], "version": "0.0.0", "author": "Daniel Wirtz ", - "contributors": [], "license": "Apache-2.0", "homepage": "https://assemblyscript.org", "repository": { @@ -36,12 +35,19 @@ "typescript": "~4.5.2" }, "type": "module", - "main": "./dist/assemblyscript.js", - "types": "./dist/assemblyscript.d.ts", "exports": { - ".": "./dist/assemblyscript.js", - "./asc": "./dist/asc.js", - "./transform": "./transform.js", + ".": { + "import": "./dist/assemblyscript.js", + "types": "./dist/assemblyscript.d.ts" + }, + "./asc": { + "import": "./dist/asc.js", + "types": "./dist/asc.d.ts" + }, + "./transform": { + "import": "./transform.js", + "types": "./transform.d.ts" + }, "./*": "./*" }, "bin": { diff --git a/tests/import/index.ts b/tests/import/index.ts index 7f1d09b7e1..7d18cd4279 100644 --- a/tests/import/index.ts +++ b/tests/import/index.ts @@ -1,3 +1,3 @@ -import * as as from "../../index"; +import * as as from "../../dist/assemblyscript"; var program: as.Program = as.newProgram(as.newOptions()); as.parse(program, "", "empty"); From a5610fa75df044a6bd68b3c18340aa445fc4e1b4 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 29 Nov 2021 02:35:20 +0100 Subject: [PATCH 050/175] moremore --- package.json | 4 ++-- scripts/build-dts.js | 16 ++++++++++++++++ transform.d.ts | 1 - transform.js | 7 ------- 4 files changed, 18 insertions(+), 10 deletions(-) delete mode 100644 transform.d.ts delete mode 100644 transform.js diff --git a/package.json b/package.json index 0eaadea8dc..e5e458205f 100644 --- a/package.json +++ b/package.json @@ -45,8 +45,8 @@ "types": "./dist/asc.d.ts" }, "./transform": { - "import": "./transform.js", - "types": "./transform.d.ts" + "import": "./dist/transform.js", + "types": "./dist/transform.d.ts" }, "./*": "./*" }, diff --git a/scripts/build-dts.js b/scripts/build-dts.js index 688fe2b8fa..9ed5373b3a 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -557,5 +557,21 @@ function generateCli() { ); } +function generateTransform() { + fs.writeFileSync( + pathUtil.resolve(__dirname, "..", "dist", "transform.js"), + [ + `export class Transform {}\n` + ].join("") + ); + fs.writeFileSync( + pathUtil.resolve(__dirname, "..", "dist", "transform.d.ts"), + [ + `export { Transform } from "./asc";\n` + ].join("") + ); +} + generateSrc(); generateCli(); +generateTransform(); diff --git a/transform.d.ts b/transform.d.ts deleted file mode 100644 index 49b657ce6d..0000000000 --- a/transform.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { Transform } from "./dist/asc"; diff --git a/transform.js b/transform.js deleted file mode 100644 index 93d806618c..0000000000 --- a/transform.js +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @fileoverview Compiler transform interface. - * @license Apache-2.0 - */ - -// becomes replaced with the actual base by asc -export class Transform {} From d3d3096b45b6276d7c92e965fc2520a592707134 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 29 Nov 2021 02:35:49 +0100 Subject: [PATCH 051/175] package as well --- package.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/package.json b/package.json index e5e458205f..27093a7c52 100644 --- a/package.json +++ b/package.json @@ -82,8 +82,6 @@ "dist/", "std/", "util/", - "transform.d.ts", - "transform.js", "tsconfig-base.json", "NOTICE" ], From 69cbdbc1078d97741bbc58e483d5c1f0d314d4a0 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 29 Nov 2021 02:41:35 +0100 Subject: [PATCH 052/175] dot --- .eslintignore | 1 - .eslintrc.cjs | 3 +-- .gitattributes | 1 - .gitignore | 3 +-- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.eslintignore b/.eslintignore index 1f981fe5e5..369f3beb9f 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,4 @@ dist/ -docs/ lib/binaryen.js lib/parse/index.js out/ diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 341d8286f8..d399cc2367 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -218,8 +218,7 @@ module.exports = { // eslint-disable-line no-undef { files: [ - "./index.d.ts", - "./index.release.d.ts", + "./dist/*.d.ts" ], rules: { // Our definitions are complicated, and all attempts to describe them diff --git a/.gitattributes b/.gitattributes index b817804567..4f55c2c550 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,4 @@ bin/* text eol=lf dist/* binary scripts/*.sh eol=lf -lib/binaryen.js binary tests/compiler/std/string-encoding.ts eol=lf diff --git a/.gitignore b/.gitignore index fb6f9f527b..06e91487ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ +node_modules/ npm-debug.* dist/ -docs/ -node_modules/ out/ raw/ .history From d6112aa75f6f033602ca2a99e398a22f7021881a Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 29 Nov 2021 04:07:17 +0100 Subject: [PATCH 053/175] move CODE_OF_CONDUCT to org --- CODE_OF_CONDUCT.md | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 9cd16c0d9e..0000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version] - -[homepage]: https://contributor-covenant.org -[version]: https://contributor-covenant.org/version/1/4/ From 790a1c043a239603fa83f0a0d6a9d70c267f43af Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 29 Nov 2021 05:17:12 +0100 Subject: [PATCH 054/175] more --- bin/asc.js | 2 +- scripts/build-web.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/asc.js b/bin/asc.js index 3e3ca6f3d4..19ca467e95 100644 --- a/bin/asc.js +++ b/bin/asc.js @@ -19,6 +19,6 @@ function tryApplyNodeArguments() { if (!tryApplyNodeArguments()) { sourceMapSupport.install(); - const asc = await import("assemblyscript/asc"); + const asc = await import("../dist/asc.js"); process.exitCode = asc.main(process.argv.slice(2)); } diff --git a/scripts/build-web.js b/scripts/build-web.js index c4988c7235..d028e65b6d 100644 --- a/scripts/build-web.js +++ b/scripts/build-web.js @@ -11,7 +11,7 @@ const mainVersion = pkg.version; const binaryenVersion = pkg.dependencies.binaryen.version; const longVersion = pkg.dependencies.long.version; -const mainUrl = mainVersion === "0.0.0" ? `../` : `https://cdn.jsdelivr.net/npm/assemblyscript@${mainVersion}/`; +const distUrl = mainVersion === "0.0.0" ? `../dist/` : `https://cdn.jsdelivr.net/npm/assemblyscript@${mainVersion}/dist/`; const binaryenUrl = `https://cdn.jsdelivr.net/npm/binaryen@${binaryenVersion}/index.js`; const longUrl = `https://cdn.jsdelivr.net/npm/long@${longVersion}/index.js`; @@ -21,12 +21,12 @@ fs.writeFileSync(path.join(dirname, "..", "dist", "web.html"), ` `); diff --git a/tests/allocators/index.js b/tests/allocators/index.js index 4c9d1a317e..701fd76b57 100644 --- a/tests/allocators/index.js +++ b/tests/allocators/index.js @@ -7,10 +7,10 @@ const dirname = path.dirname(fileURLToPath(import.meta.url)); const COMMON_MAX = 1 << 30; -function test(file) { +async function test(file) { console.log("Testing '" + file + "' ...\n"); - const exports = new WebAssembly.Instance(new WebAssembly.Module(fs.readFileSync(dirname + "/" + file)), { + const { instance: { exports } } = await WebAssembly.instantiate(fs.readFileSync(dirname + "/" + file), { env: { abort(msg, file, line, column) { throw Error("Assertion failed: " + (msg ? "'" + getString(msg) + "' " : "") + "at " + getString(file) + ":" + line + ":" + column); @@ -19,7 +19,7 @@ function test(file) { logi(i) { console.log(i); }, trace(...args) { console.log("trace", args); } } - }).exports; + }); function getString(ptr) { if (!ptr) return "null"; @@ -50,8 +50,8 @@ function test(file) { } if (process.argv.length > 2) { - test(process.argv[2] + "/untouched.wasm"); - test(process.argv[2] + "/optimized.wasm"); + await test(process.argv[2] + "/untouched.wasm"); + await test(process.argv[2] + "/optimized.wasm"); } else { console.error("Usage: npm test "); process.exit(1); diff --git a/tests/asconfig/complicated/package.json b/tests/asconfig/complicated/package.json index f98424bae9..c9b011f82c 100644 --- a/tests/asconfig/complicated/package.json +++ b/tests/asconfig/complicated/package.json @@ -1,6 +1,6 @@ { "private": true, "scripts": { - "test": "node ../index.js" + "test": "node --enable-source-maps ../index.js" } } diff --git a/tests/asconfig/cyclical/package.json b/tests/asconfig/cyclical/package.json index f98424bae9..c9b011f82c 100644 --- a/tests/asconfig/cyclical/package.json +++ b/tests/asconfig/cyclical/package.json @@ -1,6 +1,6 @@ { "private": true, "scripts": { - "test": "node ../index.js" + "test": "node --enable-source-maps ../index.js" } } diff --git a/tests/asconfig/entry-points/nested/package.json b/tests/asconfig/entry-points/nested/package.json index 7603e9ad4d..f55a807fa6 100644 --- a/tests/asconfig/entry-points/nested/package.json +++ b/tests/asconfig/entry-points/nested/package.json @@ -1,6 +1,6 @@ { "private": true, "scripts": { - "test": "node ../../index.js" + "test": "node --enable-source-maps ../../index.js" } } diff --git a/tests/asconfig/entry-points/node-resolution/package.json b/tests/asconfig/entry-points/node-resolution/package.json index 7603e9ad4d..f55a807fa6 100644 --- a/tests/asconfig/entry-points/node-resolution/package.json +++ b/tests/asconfig/entry-points/node-resolution/package.json @@ -1,6 +1,6 @@ { "private": true, "scripts": { - "test": "node ../../index.js" + "test": "node --enable-source-maps ../../index.js" } } diff --git a/tests/asconfig/entry-points/package.json b/tests/asconfig/entry-points/package.json index e92aaac524..0f259db56e 100644 --- a/tests/asconfig/entry-points/package.json +++ b/tests/asconfig/entry-points/package.json @@ -1,7 +1,7 @@ { "private": true, "scripts": { - "test": "node ../index.js && npm run test:nested && npm run test:node", + "test": "node --enable-source-maps ../index.js && npm run test:nested && npm run test:node", "test:nested": "cd nested && npm run test", "test:node": "cd node-resolution && npm run test" } diff --git a/tests/asconfig/extends/package.json b/tests/asconfig/extends/package.json index fdbb9ed043..a0aa5275c5 100644 --- a/tests/asconfig/extends/package.json +++ b/tests/asconfig/extends/package.json @@ -1,6 +1,6 @@ { "private": true, "scripts": { - "test": "node ../index.js --showConfig && node ../index.js" + "test": "node --enable-source-maps ../index.js --showConfig && node ../index.js" } } diff --git a/tests/asconfig/index.js b/tests/asconfig/index.js index 961ff6828f..5f6f5a3ccc 100644 --- a/tests/asconfig/index.js +++ b/tests/asconfig/index.js @@ -1,17 +1,16 @@ import path from "path"; import fs from "fs"; import { createRequire } from "module"; -import * as asc from "../../cli/index.js"; +import asc from "../../dist/asc.js"; import loader from "../../lib/loader/index.js"; const require = createRequire(import.meta.url); const args = process.argv.slice(2); -/** @type {string} */ -let stderr; /** @type {Uint8Array} */ let binary; -asc.main(["assembly/index.ts", "--outFile", "output.wasm", "--explicitStart", ...args], { + +const { error, stderr } = await asc.main(["assembly/index.ts", "--outFile", "output.wasm", "--explicitStart", ...args], { writeFile(name, contents) { if (name === "output.wasm") { binary = contents; @@ -19,64 +18,59 @@ asc.main(["assembly/index.ts", "--outFile", "output.wasm", "--explicitStart", .. throw Error("Unexpected output file: " + name); } }, - stderr: { - write(s) { - stderr = s; - } - } + stderr: asc.createMemoryStream() +}); -}, (err) => { - if (err) { - console.error(err); - console.error(stderr); - process.exit(1); - } +if (error) { + console.error(error); + console.error(stderr.toString()); + process.exit(1); +} - const jsonPath = path.join(process.cwd(), "expected.json"); - if (fs.existsSync(jsonPath) && stderr) { - const actualRes = JSON.parse(stderr); - const actual = actualRes.options; - const expected = require(jsonPath).options; - let errored = false; - for (let name of Object.getOwnPropertyNames(expected)) { - if (actual[name] !== expected[name]) { - // If object check just first level - if (typeof actual[name] === 'object' && typeof expected[name] === 'object') { - let error = false; - for (let field of Object.getOwnPropertyNames(actual[name])) { - if (actual[name][field] !== expected[name][field]) { - error = true; - break; - } - } - if (!error) { - continue; +const jsonPath = path.join(process.cwd(), "expected.json"); +const stderrString = stderr.toString(); +if (fs.existsSync(jsonPath) && stderrString) { + const actualRes = JSON.parse(stderrString); + const actual = actualRes.options; + const expected = require(jsonPath).options; + let errored = false; + for (let name of Object.getOwnPropertyNames(expected)) { + if (actual[name] !== expected[name]) { + // If object check just first level + if (typeof actual[name] === 'object' && typeof expected[name] === 'object') { + let error = false; + for (let field of Object.getOwnPropertyNames(actual[name])) { + if (actual[name][field] !== expected[name][field]) { + error = true; + break; } } - console.error(name + ": " + actual[name] + " expected " + expected[name]); - errored = true; + if (!error) { + continue; + } } + console.error(name + ": " + actual[name] + " expected " + expected[name]); + errored = true; } - if (errored) { - process.exit(1); - } - process.exit(0); } - - - if (!binary) { - console.error("No binary was generated for the asconfig test in " + process.cwd()); + if (errored) { process.exit(1); } + process.exit(0); +} - const theModule = loader.instantiateSync(binary); - try { - theModule.exports._start(); - } catch (err) { - console.error("The wasm module _start() function failed in " + process.cwd()); - console.error(err); - process.exit(1); - } - return 0; -}); +if (!binary) { + console.error("No binary was generated for the asconfig test in " + process.cwd()); + process.exit(1); +} + +const theModule = loader.instantiateSync(binary); + +try { + theModule.exports._start(); +} catch (err) { + console.error("The wasm module _start() function failed in " + process.cwd()); + console.error(err); + process.exit(1); +} diff --git a/tests/asconfig/respect-inheritence/package.json b/tests/asconfig/respect-inheritence/package.json index 6d14e2db7a..f10539c257 100644 --- a/tests/asconfig/respect-inheritence/package.json +++ b/tests/asconfig/respect-inheritence/package.json @@ -1,6 +1,6 @@ { "private": true, "scripts": { - "test": "node ../index.js --optimizeLevel 3" + "test": "node --enable-source-maps ../index.js --optimizeLevel 3" } } diff --git a/tests/asconfig/target/package.json b/tests/asconfig/target/package.json index 0d5843d61f..9ac4c7d239 100644 --- a/tests/asconfig/target/package.json +++ b/tests/asconfig/target/package.json @@ -1,6 +1,6 @@ { "private": true, "scripts": { - "test": "node ../index.js --target debug && node ../index.js --showConfig" + "test": "node --enable-source-maps ../index.js --target debug && node ../index.js --showConfig" } } diff --git a/tests/asconfig/use-consts/package.json b/tests/asconfig/use-consts/package.json index f98424bae9..c9b011f82c 100644 --- a/tests/asconfig/use-consts/package.json +++ b/tests/asconfig/use-consts/package.json @@ -1,6 +1,6 @@ { "private": true, "scripts": { - "test": "node ../index.js" + "test": "node --enable-source-maps ../index.js" } } diff --git a/tests/browser.js b/tests/browser.js index 96ee989c1e..b759635528 100644 --- a/tests/browser.js +++ b/tests/browser.js @@ -3,81 +3,71 @@ import * as asc from "../dist/asc.js"; if (typeof asc.definitionFiles.assembly !== "string") throw Error("missing bundled assembly.d.ts"); if (typeof asc.definitionFiles.portable !== "string") throw Error("missing bundled portable.d.ts"); -const stdout = asc.createMemoryStream(); -const stderr = asc.createMemoryStream(); -const files = { "module.ts": `export function test(): void {}` }; +const files = { "index.ts": `export function test(): void {}` }; console.log("# asc --version"); +{ + const { stdout, stderr } = await asc.main([ "--version" ], { + stdout: asc.createMemoryStream(), + stderr: asc.createMemoryStream() + }); -asc.main([ - "--version" -], { - stdout: stdout, - stderr: stderr -}, err => { console.log(">>> STDOUT >>>"); process.stdout.write(stdout.toString()); - stdout.reset(); console.log(">>> STDERR >>>"); process.stdout.write(stderr.toString()); - stderr.reset(); -}); +} console.log("\n# asc --help"); +{ + const { stdout, stderr } = await asc.main([ "--help" ], { + stdout: asc.createMemoryStream(), + stderr: asc.createMemoryStream() + }); -asc.main([ - "--help" -], { - stdout: stdout, - stderr: stderr -}, err => { console.log(">>> STDOUT >>>"); process.stdout.write(stdout.toString()); - stdout.reset(); console.log(">>> STDERR >>>"); process.stdout.write(stderr.toString()); - stderr.reset(); -}); +} -console.log("\n# asc module.ts --textFile"); +console.log("\n# asc index.ts --textFile"); +{ + const { error, stdout, stderr } = await asc.main([ "index.ts", "--textFile" ], { + stdout: asc.createMemoryStream(), + stderr: asc.createMemoryStream(), + readFile: (name, baseDir) => { + console.log("readFile: " + name + ", baseDir=" + baseDir); + if (Object.prototype.hasOwnProperty.call(files, name)) return files[name]; + return null; + }, + writeFile: (name, data, baseDir) => { + console.log("writeFile: " + name + ", baseDir=" + baseDir); + }, + listFiles: (dirname, baseDir) => { + console.log("listFiles: " + dirname + ", baseDir=" + baseDir); + return []; + } + }); -asc.main([ - "module.ts", - "--textFile" -], { - stdout: stdout, - stderr: stderr, - readFile: (name, baseDir) => { - console.log("readFile: " + name + ", baseDir=" + baseDir); - if (Object.prototype.hasOwnProperty.call(files, name)) return files[name]; - return null; - }, - writeFile: (name, data, baseDir) => { - console.log("writeFile: " + name + ", baseDir=" + baseDir); - }, - listFiles: (dirname, baseDir) => { - console.log("listFiles: " + dirname + ", baseDir=" + baseDir); - return []; - } -}, err => { - if (err) { + if (error) { console.log(">>> THROWN >>>"); - console.log(err); + console.log(error); } -}); - -console.log(">>> STDOUT >>>"); -process.stdout.write(stdout.toString()); -console.log(">>> STDERR >>>"); -process.stdout.write(stderr.toString()); + console.log(">>> STDOUT >>>"); + process.stdout.write(stdout.toString()); + console.log(">>> STDERR >>>"); + process.stdout.write(stderr.toString()); +} console.log("\n# asc.compileString"); - -const output = asc.compileString(`export function test(): void {}`, { optimizeLevel: 3, exportTable: true, measure: true }); -console.log(">>> .stdout >>>"); -process.stdout.write(output.stdout.toString()); -console.log(">>> .stderr >>>"); -process.stdout.write(output.stderr.toString()); -console.log(">>> .text >>>"); -process.stdout.write(output.text); -console.log(">>> .binary >>> " + output.binary.length + " bytes"); +{ + const { stdout, stderr, text, binary } = asc.compileString(`export function test(): void {}`, { optimizeLevel: 3, exportTable: true, measure: true }); + console.log(">>> .stdout >>>"); + process.stdout.write(stdout.toString()); + console.log(">>> .stderr >>>"); + process.stdout.write(stderr.toString()); + console.log(">>> .text >>>"); + process.stdout.write(text); + console.log(">>> .binary >>> " + binary.length + " bytes"); +} diff --git a/tests/compiler.js b/tests/compiler.js index 74cc09640c..22519da1c5 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -7,17 +7,15 @@ import { createRequire } from "module"; import { fileURLToPath } from "url"; import { WASI } from "wasi"; import glob from "glob"; -import * as colorsUtil from "../util/colors.js"; +import { stdout as colors } from "../util/colors.js"; import * as optionsUtil from "../util/options.js"; import { coreCount, threadCount } from "../util/cpu.js"; import diff from "../util/diff.js"; import { Rtrace } from "../lib/rtrace/index.js"; +import asc from "../dist/asc.js"; const dirname = path.dirname(fileURLToPath(import.meta.url)); const require = createRequire(import.meta.url); - -const asc = (await import("../cli/index.js")); - const startTime = Date.now(); const config = { @@ -62,10 +60,10 @@ const argv = opts.arguments; if (args.help) { console.log([ - colorsUtil.stdout.white("SYNTAX"), - " " + colorsUtil.stdout.cyan("npm run test:compiler --") + " [test1, test2 ...] [options]", + colors.white("SYNTAX"), + " " + colors.cyan("npm run test:compiler --") + " [test1, test2 ...] [options]", "", - colorsUtil.stdout.white("OPTIONS"), + colors.white("OPTIONS"), optionsUtil.help(config) ].join(os.EOL) + os.EOL); process.exit(0); @@ -73,21 +71,15 @@ if (args.help) { const features = process.env.ASC_FEATURES ? process.env.ASC_FEATURES.split(",") : []; const featuresConfig = require("./features.json"); - -var failedTests = new Set(); -var failedMessages = new Map(); -var skippedTests = new Set(); -var skippedMessages = new Map(); - const basedir = path.join(dirname, "compiler"); // Gets a list of all relevant tests function getTests() { - var tests = glob.sync("**/!(_*).ts", { cwd: basedir }).map(name => name.replace(/\.ts$/, "")); + var tests = glob.sync("**/!(_*).ts", { cwd: basedir }).map(name => name.replace(/\.ts$/, "")); if (argv.length) { // run matching tests only tests = tests.filter(filename => argv.indexOf(filename.replace(/\.ts$/, "")) >= 0); if (!tests.length) { - console.log(colorsUtil.stdout.red("FAILURE: ") + colorsUtil.stdout.white("No matching tests: " + argv.join(" ") + "\n")); + console.log(colors.red("FAILURE: ") + colors.white("No matching tests: " + argv.join(" ") + "\n")); process.exit(1); } } @@ -96,17 +88,17 @@ function getTests() { // Starts a new section within a test function section(title) { - var start = process.hrtime(); + const start = process.hrtime(); console.log("- " + title); return { title, - end: function(code) { - const times = process.hrtime(start); - const time = asc.formatTime(times[0] * 1e9 + times[1]); + end(code) { + const hrtime = process.hrtime(start); + const time = asc.formatTime(hrtime[0] * 1e9 + hrtime[1]); switch (code) { - case SUCCESS: console.log(" " + colorsUtil.stdout.green ("SUCCESS") + " (" + time + ")\n"); break; - default: console.log(" " + colorsUtil.stdout.red("FAILURE") + " (" + time + ")\n"); break; - case SKIPPED: console.log(" " + colorsUtil.stdout.yellow("SKIPPED") + " (" + time + ")\n"); break; + case SUCCESS: console.log(" " + colors.green("SUCCESS") + " (" + time + ")\n"); break; + default: console.log(" " + colors.red("FAILURE") + " (" + time + ")\n"); break; + case SKIPPED: console.log(" " + colors.yellow("SKIPPED") + " (" + time + ")\n"); break; } } }; @@ -116,28 +108,32 @@ const FAILURE = 1; const SKIPPED = 2; // Runs a single test -function runTest(basename) { - console.log(colorsUtil.stdout.white("# compiler/" + basename) + "\n"); +async function runTest(basename) { + console.log(colors.white("# compiler/" + basename) + "\n"); const configPath = path.join(basedir, basename + ".json"); - const config = fs.existsSync(configPath) - ? require(configPath) - : {}; - + const config = fs.existsSync(configPath) ? require(configPath) : {}; const stdout = asc.createMemoryStream(); const stderr = asc.createMemoryStream(chunk => process.stderr.write(chunk.toString().replace(/^(?!$)/mg, " "))); stderr.isTTY = true; - var asc_flags = []; var asc_rtrace = !!config.asc_rtrace; var v8_flags = ""; var v8_no_flags = ""; var missing_features = []; + + // Makes sure to reset the environment after + function prepareResult(code, message = null) { + if (v8_no_flags) v8.setFlagsFromString(v8_no_flags); + if (!args.createBinary) fs.unlink(path.join(basedir, basename + ".untouched.wasm"), err => { /* nop */ }); + return { code, message }; + } + if (config.features) { config.features.forEach(feature => { if (!features.includes(feature) && !features.includes("*")) { missing_features.push(feature); - return; + return; // from forEach } var featureConfig = featuresConfig[feature]; if (featureConfig.asc_flags) { @@ -156,40 +152,31 @@ function runTest(basename) { } }); if (missing_features.length) { - console.log("- " + colorsUtil.stdout.yellow("feature SKIPPED") + " (" + missing_features.join(", ") + ")\n"); - skippedTests.add(basename); - skippedMessages.set(basename, "feature not enabled"); - if (cluster.isWorker) process.send({ cmd: "skipped", message: skippedMessages.get(basename) }); - return; + console.log("- " + colors.yellow("feature SKIPPED") + " (" + missing_features.join(", ") + ")\n"); + return prepareResult(SKIPPED, "feature not enabled: " + missing_features.join(", ")); } } if (config.asc_flags) { - config.asc_flags.forEach(flag => { - Array.prototype.push.apply(asc_flags, flag.split(" ")); - }); + config.asc_flags.forEach(flag => { asc_flags.push(...flag.split(" ")); }); } - var failed = false; - // Build untouched - var cmd = [ - basename + ".ts", - "--baseDir", basedir, - "--debug", - "--textFile" // -> stdout - ]; - if (asc_flags) - Array.prototype.push.apply(cmd, asc_flags); - cmd.push("--binaryFile", basename + ".untouched.wasm"); - const compileUntouched = section("compile untouched"); - asc.main(cmd, { - stdout: stdout, - stderr: stderr - }, err => { + { + const cmd = [ + basename + ".ts", + "--baseDir", basedir, + "--debug", + "--textFile" // -> stdout + ]; + if (asc_flags) cmd.push(...asc_flags); + cmd.push("--binaryFile", basename + ".untouched.wasm"); + const compileUntouched = section("compile untouched"); + const { error } = await asc.main(cmd, { stdout, stderr }); + let expectStderr = config.stderr; - if (err) { + if (error) { stderr.write("---\n"); - stderr.write(err.stack); + stderr.write(error.stack); stderr.write("\n---\n"); if (expectStderr) { compileUntouched.end(SKIPPED); @@ -206,6 +193,7 @@ function runTest(basename) { const stderrString = stderr.toString(); if (typeof expectStderr === "string") expectStderr = [ expectStderr ]; let lastIndex = 0; + let failed = false; expectStderr.forEach((substr, i) => { var index = stderrString.indexOf(substr, lastIndex); if (index < 0) { @@ -216,161 +204,132 @@ function runTest(basename) { } }); if (failed) { - failedTests.add(basename); - failedMessages.set(basename, "stderr mismatch"); compareStderr.end(FAILURE); - } else { - compareStderr.end(SUCCESS); + return prepareResult(FAILURE, "stderr mismatch"); } - return 1; + compareStderr.end(SUCCESS); + return prepareResult(SUCCESS); } const compareFixture = section("compare fixture"); - var actual = stdout.toString().replace(/\r\n/g, "\n"); + const actual = stdout.toString().replace(/\r\n/g, "\n"); if (args.create) { fs.writeFileSync(path.join(basedir, basename + ".untouched.wat"), actual, { encoding: "utf8" }); - console.log(" " + colorsUtil.stdout.yellow("Created fixture")); + console.log(" " + colors.yellow("Created fixture")); compareFixture.end(SKIPPED); } else { - let expected = fs.readFileSync(path.join(basedir, basename + ".untouched.wat"), { encoding: "utf8" }).replace(/\r\n/g, "\n"); + const expected = fs.readFileSync(path.join(basedir, basename + ".untouched.wat"), { encoding: "utf8" }).replace(/\r\n/g, "\n"); if (args.noDiff) { if (expected != actual) { - failed = true; - failedTests.add(basename); compareFixture.end(FAILURE); - } else { - compareFixture.end(SUCCESS); + return prepareResult(FAILURE, "fixture mismatch"); } } else { let diffs = diff(basename + ".untouched.wat", expected, actual); if (diffs !== null) { console.log(diffs); - failed = true; - failedTests.add(basename); compareFixture.end(FAILURE); - } else { - compareFixture.end(SUCCESS); + return prepareResult(FAILURE, "fixture mismatch"); } } + compareFixture.end(SUCCESS); } + } + + stdout.length = 0; + stderr.length = 0; - stdout.length = 0; - stderr.length = 0; + const gluePath = path.join(basedir, basename + ".js"); + const glue = fs.existsSync(gluePath) ? require(gluePath) : {}; - // Build optimized - var cmd = [ + // Build optimized + { + const cmd = [ basename + ".ts", "--baseDir", basedir, "--binaryFile", // -> stdout "-O" ]; - if (asc_flags) - Array.prototype.push.apply(cmd, asc_flags); - if (args.create) - cmd.push("--textFile", basename + ".optimized.wat"); + if (asc_flags) cmd.push(...asc_flags); + if (args.create) cmd.push("--textFile", basename + ".optimized.wat"); const compileOptimized = section("compile optimized"); - asc.main(cmd, { - stdout: stdout, - stderr: stderr - }, err => { - if (err) { - stderr.write("---\n"); - stderr.write(err.stack); - stderr.write("\n---\n"); - failed = true; - failedMessages.set(basename, err.message); - failedTests.add(basename); - compileOptimized.end(FAILURE); - return 1; - } else { - compileOptimized.end(SUCCESS); + const { error } = await asc.main(cmd, { stdout: stdout, stderr: stderr }); + + if (error) { + stderr.write("---\n"); + stderr.write(error.stack); + stderr.write("\n---\n"); + compileOptimized.end(FAILURE); + return prepareResult(FAILURE, error.message); + } + compileOptimized.end(SUCCESS); + + const untouchedBuffer = fs.readFileSync(path.join(basedir, basename + ".untouched.wasm")); + const optimizedBuffer = stdout.toBuffer(); + const instantiateUntouched = section("instantiate untouched"); + if (config.skipInstantiate) { + instantiateUntouched.end(SKIPPED); + } else { + + if (!await testInstantiate(untouchedBuffer, glue, stderr, config.asc_wasi)) { + instantiateUntouched.end(FAILURE); + return prepareResult(FAILURE, "instantiate error (untouched)"); } - let untouchedBuffer = fs.readFileSync(path.join(basedir, basename + ".untouched.wasm")); - let optimizedBuffer = stdout.toBuffer(); - const gluePath = path.join(basedir, basename + ".js"); - var glue = {}; - if (fs.existsSync(gluePath)) glue = require(gluePath); - - const instantiateUntouched = section("instantiate untouched"); - if (!config.skipInstantiate) { - if (!testInstantiate(basename, untouchedBuffer, glue, stderr, config.asc_wasi)) { - failed = true; - failedTests.add(basename); - instantiateUntouched.end(FAILURE); - } else { - instantiateUntouched.end(SUCCESS); - const instantiateOptimized = section("instantiate optimized"); - if (!testInstantiate(basename, optimizedBuffer, glue, stderr, config.asc_wasi)) { - failed = true; - failedTests.add(basename); - instantiateOptimized.end(FAILURE); - } else { - instantiateOptimized.end(SUCCESS); - } - } - } else { - instantiateUntouched.end(SKIPPED); + instantiateUntouched.end(SUCCESS); + const instantiateOptimized = section("instantiate optimized"); + if (!await testInstantiate(optimizedBuffer, glue, stderr, config.asc_wasi)) { + instantiateOptimized.end(FAILURE); + return prepareResult(FAILURE, "instantiate error (optimized)"); } + instantiateOptimized.end(SUCCESS); + } + } - if (!asc_rtrace) return; - - stdout.length = 0; - stderr.length = 0; - - // Build rtraced - var cmd = [ - basename + ".ts", - "--baseDir", basedir, - "--binaryFile", // -> stdout - "--debug", - "--use", "ASC_RTRACE=1", - "--explicitStart", - // "--runPasses", "instrument-memory" - ]; - if (asc_flags) { - Array.prototype.push.apply(cmd, asc_flags); - } - const compileRtraced = section("compile rtraced"); - asc.main(cmd, { - stdout: stdout, - stderr: stderr - }, err => { - if (err) { - stderr.write("---\n"); - stderr.write(err.stack); - stderr.write("\n---\n"); - failed = true; - failedMessages.set(basename, err.message); - failedTests.add(basename); - compileRtraced.end(FAILURE); - return 1; - } else { - compileRtraced.end(SUCCESS); - } - let rtracedBuffer = stdout.toBuffer(); - const instantiateRtrace = section("instantiate rtrace"); - if (!testInstantiate(basename, rtracedBuffer, glue, stderr, config.asc_wasi)) { - failed = true; - failedTests.add(basename); - instantiateRtrace.end(FAILURE); - } else { - instantiateRtrace.end(SUCCESS); - } - }); - }); - if (failed) return 1; - }); - if (v8_no_flags) v8.setFlagsFromString(v8_no_flags); - if (!args.createBinary) fs.unlink(path.join(basedir, basename + ".untouched.wasm"), err => { /* nop */ }); - if (cluster.isWorker) process.send({ cmd: "done", failed: failed, message: failedMessages.get(basename) }); + stdout.length = 0; + stderr.length = 0; + + // Build rtraced + if (asc_rtrace) { + const cmd = [ + basename + ".ts", + "--baseDir", basedir, + "--binaryFile", // -> stdout + "--debug", + "--use", "ASC_RTRACE=1", + "--explicitStart", + // "--runPasses", "instrument-memory" + ]; + if (asc_flags) cmd.push(...asc_flags); + const compileRtraced = section("compile rtraced"); + const { error } = await asc.main(cmd, { stdout, stderr }); + + if (error) { + stderr.write("---\n"); + stderr.write(error.stack); + stderr.write("\n---\n"); + compileRtraced.end(FAILURE); + return prepareResult(FAILURE, error.message); + } + compileRtraced.end(SUCCESS); + + const rtracedBuffer = stdout.toBuffer(); + const instantiateRtrace = section("instantiate rtrace"); + if (!await testInstantiate(rtracedBuffer, glue, stderr, config.asc_wasi)) { + instantiateRtrace.end(FAILURE); + return prepareResult(FAILURE, "rtrace error"); + } + instantiateRtrace.end(SUCCESS); + } + + return prepareResult(SUCCESS); } // Tests if instantiation of a module succeeds -function testInstantiate(basename, binaryBuffer, glue, stderr, wasiOptions) { +async function testInstantiate(binaryBuffer, glue, stderr, wasiOptions) { var failed = false; try { - let memory = new WebAssembly.Memory({ initial: 10 }); - let exports = {}; + const memory = new WebAssembly.Memory({ initial: 10 }); + const exports = {}; function getString(ptr) { const RUNTIME_HEADER_SIZE = 16; @@ -382,26 +341,25 @@ function testInstantiate(basename, binaryBuffer, glue, stderr, wasiOptions) { return String.fromCharCode.apply(String, U16.subarray(ptr16, ptr16 + len16)); } - let rtrace = new Rtrace({ + const rtrace = new Rtrace({ onerror(err, info) { - console.log(" ERROR: " + err.stack); + console.log(` ERROR: ${err.stack}`); failed = true; - failedMessages.set(basename, err.message); }, oninfo(msg, info) { if (!args.rtraceVerbose) return; - console.log(" " + msg); + console.log(` ${msg}`); }, getMemory() { return instance.exports.memory; } }); - var imports = rtrace.install({ + const imports = rtrace.install({ env: { memory, abort: function(msg, file, line, column) { - console.log(colorsUtil.stdout.red(" abort: " + getString(msg) + " in " + getString(file) + "(" + line + ":" + column + ")")); + console.log(colors.red(" abort: " + getString(msg) + " in " + getString(file) + "(" + line + ":" + column + ")")); }, trace: function(msg, n) { console.log(" trace: " + getString(msg) + (n ? " " : "") + Array.prototype.slice.call(arguments, 2, 2 + n).join(", ")); @@ -417,16 +375,14 @@ function testInstantiate(basename, binaryBuffer, glue, stderr, wasiOptions) { Date, Reflect }); + if (glue.preInstantiate) { console.log(" [call preInstantiate]"); glue.preInstantiate(imports, exports); } - var wasi = null; - if (wasiOptions) { - wasi = new WASI(wasiOptions); - imports.wasi_snapshot_preview1 = wasi.wasiImport; - } - var instance = new WebAssembly.Instance(new WebAssembly.Module(binaryBuffer), imports); + const wasi = wasiOptions ? new WASI(wasiOptions) : null; + if (wasi) imports.wasi_snapshot_preview1 = wasi.wasiImport; + const { instance } = await WebAssembly.instantiate(binaryBuffer, imports); Object.setPrototypeOf(exports, instance.exports); if (glue.postInstantiate) { console.log(" [call postInstantiate]"); @@ -434,7 +390,7 @@ function testInstantiate(basename, binaryBuffer, glue, stderr, wasiOptions) { } if (wasi) { console.log(" [wasi start]"); - let code = wasi.start(instance); + const code = wasi.start(instance); console.log(" [wasi exit] code=" + code); } else if (exports._start) { console.log(" [call start]"); @@ -444,12 +400,10 @@ function testInstantiate(basename, binaryBuffer, glue, stderr, wasiOptions) { console.log(" [call postStart]"); glue.postStart(instance); } - let leakCount = rtrace.check(); + const leakCount = rtrace.check(); if (leakCount) { - let msg = "memory leak detected: " + leakCount + " leaking"; failed = true; - failedMessages.set(basename, msg); - console.log(" " + msg); + console.log(` memory leak detected: ${leakCount} leaking`); } if (!failed) { if (rtrace.active) { @@ -462,59 +416,54 @@ function testInstantiate(basename, binaryBuffer, glue, stderr, wasiOptions) { } return true; } - } catch (e) { + } catch (err) { stderr.write("---\n"); - stderr.write(e.stack); + stderr.write(err.stack); stderr.write("\n---\n"); - failed = true; - failedMessages.set(basename, e.message); } return false; } // Evaluates the overall test result -function evaluateResult() { +function evaluateResult(failedTests, skippedTests) { if (skippedTests.size) { - console.log(colorsUtil.stdout.yellow("WARNING: ") + colorsUtil.stdout.white(skippedTests.size + " compiler tests have been skipped:\n")); - skippedTests.forEach(name => { - var message = skippedMessages.has(name) ? colorsUtil.stdout.gray("[" + skippedMessages.get(name) + "]") : ""; - console.log(" " + name + " " + message); - }); + console.log(colors.yellow("WARNING: ") + colors.white(skippedTests.size + " compiler tests have been skipped:\n")); + for (let [name, message] of skippedTests) { + console.log(" " + name + " " + colors.gray("[" + (message || "???") + "]")); + } console.log(); } if (failedTests.size) { process.exitCode = 1; - console.log(colorsUtil.stdout.red("FAILURE: ") + colorsUtil.stdout.white(failedTests.size + " compiler tests had failures:\n")); - failedTests.forEach(name => { - var message = failedMessages.has(name) ? colorsUtil.stdout.gray("[" + failedMessages.get(name) + "]") : ""; - console.log(" " + name + " " + message); - }); + console.log(colors.red("FAILURE: ") + colors.white(failedTests.size + " compiler tests had failures:\n")); + for (let [name, message] of failedTests) { + console.log(" " + name + " " + colors.gray("[" + (message || "???") + "]")); + } console.log(); } - console.log("Time: " + (Date.now() - startTime) + " ms\n"); + console.log(`Time: ${(Date.now() - startTime)} ms\n`); if (!process.exitCode) { - console.log("[ " + colorsUtil.stdout.white("SUCCESS") + " ]"); + console.log("[ " + colors.white("SUCCESS") + " ]"); } } // Run tests in parallel if requested if (args.parallel && coreCount > 1) { if (cluster.isWorker) { - colorsUtil.stdout.enabled = true; + colors.enabled = true; process.on("message", msg => { - if (msg.cmd != "run") throw Error("invalid command: " + msg.cmd); - try { - runTest(msg.test); - } catch (e) { - process.send({ cmd: "done", failed: true, message: e.message }); - } + if (msg.cmd != "run") throw Error("invalid command: " + JSON.stringify(msg)); + runTest(msg.test).then(({ code, message }) => { + process.send({ code, message }); + }, err => { + process.send({ code: FAILURE, message: err.message }); + }); }); - process.send({ cmd: "ready" }); + process.send({ code: SUCCESS, message: null }); } else { const tests = getTests(); - // const sizes = new Map(); - // tests.forEach(name => sizes.set(name, fs.statSync(path.join(basedir, name + ".ts")).size)); - // tests.sort((a, b) => sizes.get(b) - sizes.get(a)); + const failedTests = new Map(); + const skippedTests = new Map(); const workers = []; const current = []; const outputs = []; @@ -527,19 +476,16 @@ if (args.parallel && coreCount > 1) { workers[i] = worker; current[i] = null; outputs[i] = []; - worker.process.stdout.on("data", buf => outputs[i].push(buf)); - worker.process.stderr.on("data", buf => outputs[i].push(buf)); + worker.process.stdout.on("data", buf => { outputs[i].push(buf); }); + worker.process.stderr.on("data", buf => { outputs[i].push(buf); }); worker.on("message", msg => { - if (msg.cmd == "done") { - process.stdout.write(Buffer.concat(outputs[i]).toString()); - if (msg.failed) failedTests.add(current[i]); - if (msg.message) failedMessages.set(current[i], msg.message); - } else if (msg.cmd == "skipped") { - process.stdout.write(Buffer.concat(outputs[i]).toString()); - skippedTests.add(current[i]); - if (msg.message) skippedMessages.set(current[i], msg.message); - } else if (msg.cmd != "ready") { - throw Error("invalid command: " + msg.cmd); + const { code, message } = msg; + process.stdout.write(Buffer.concat(outputs[i]).toString()); + switch (code) { + case SUCCESS: break; + case FAILURE: failedTests.set(current[i], message); break; + case SKIPPED: skippedTests.set(current[i], message); break; + default: throw Error(`invalid code: ${code}`); } if (index >= tests.length) { workers[i] = null; @@ -551,14 +497,24 @@ if (args.parallel && coreCount > 1) { worker.send({ cmd: "run", test: current[i] }); }); worker.on("disconnect", () => { - if (workers[i]) throw Error("worker#" + i + " died unexpectedly"); - if (!--numWorkers) evaluateResult(); + if (workers[i]) throw Error(`worker#${i} died unexpectedly`); + if (!--numWorkers) evaluateResult(failedTests, skippedTests); }); } } // Otherwise run tests sequentially } else { - getTests().forEach(runTest); - evaluateResult(); + let failedTests = new Map(); + let skippedTests = new Map(); + for (const test of getTests()) { + const { code, message } = await runTest(test); + switch (code) { + case SUCCESS: break; + case FAILURE: failedTests.set(test, message); break; + case SKIPPED: skippedTests.set(test, message); break; + default: new Error(`invalid code: ${code}`); + } + } + evaluateResult(failedTests, skippedTests); } diff --git a/tests/parser.js b/tests/parser.js index 21a2901d23..07fe4f9062 100644 --- a/tests/parser.js +++ b/tests/parser.js @@ -6,8 +6,9 @@ import glob from "glob"; import diff from "../util/diff.js"; import * as colorsUtil from "../util/colors.js"; import * as optionsUtil from "../util/options.js"; +import { Program, Options, ASTBuilder } from "../dist/assemblyscript.js"; -const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const dirname = path.dirname(fileURLToPath(import.meta.url)); const config = { "create": { @@ -38,7 +39,7 @@ if (args.help) { process.exit(0); } -const basedir = path.join(__dirname, "parser"); +const basedir = path.join(dirname, "parser"); // Get a list of all tests var tests = glob.sync("**/!(_*).ts", { cwd: basedir }); @@ -52,30 +53,28 @@ if (argv.length) { } } -import { Program, Options, ASTBuilder } from "assemblyscript"; - var failures = 0; -tests.forEach(filename => { - if (filename.charAt(0) == "_" || filename.endsWith(".fixture.ts")) return; +for (const filename of tests) { + if (filename.charAt(0) == "_" || filename.endsWith(".fixture.ts")) continue; console.log(colorsUtil.stdout.white("Testing parser/" + filename)); - var failed = false; - var program = new Program(new Options()); - var parser = program.parser; - var sourceText = fs.readFileSync(basedir + "/" + filename, { encoding: "utf8" }).replace(/\r?\n/g, "\n"); + let failed = false; + const program = new Program(new Options()); + const parser = program.parser; + const sourceText = fs.readFileSync(basedir + "/" + filename, { encoding: "utf8" }).replace(/\r?\n/g, "\n"); parser.parseFile(sourceText, filename, true); - var serializedSourceText = ASTBuilder.build(program.sources[0]); - var actual = serializedSourceText + parser.diagnostics.map(diagnostic => "// " + diagnostic +"\n").join(""); - var fixture = filename + ".fixture.ts"; + const serializedSourceText = ASTBuilder.build(program.sources[0]); + const actual = serializedSourceText + parser.diagnostics.map(diagnostic => "// " + diagnostic +"\n").join(""); + const fixture = filename + ".fixture.ts"; if (args.create) { fs.writeFileSync(basedir + "/" + fixture, actual, { encoding: "utf8" }); console.log("Created\n"); } else { - var expected = fs.readFileSync(basedir + "/" + fixture, { encoding: "utf8" }).replace(/\r\n/g, "\n"); - var diffs = diff("parser/" + fixture, expected, actual); + const expected = fs.readFileSync(basedir + "/" + fixture, { encoding: "utf8" }).replace(/\r\n/g, "\n"); + const diffs = diff("parser/" + fixture, expected, actual); if (diffs !== null) { failed = true; console.log(diffs); @@ -87,7 +86,7 @@ tests.forEach(filename => { console.log(); if (failed) ++failures; -}); +} if (failures) { process.exitCode = 1; diff --git a/tests/tokenizer.js b/tests/tokenizer.js index 63fd0a46ff..82c5ab4312 100644 --- a/tests/tokenizer.js +++ b/tests/tokenizer.js @@ -1,18 +1,19 @@ import fs from "fs"; import path from "path"; import { fileURLToPath } from "url"; -import { Tokenizer, Token, Source, SourceKind } from "assemblyscript"; +import { Tokenizer, Token, Source, SourceKind } from "../dist/assemblyscript.js"; -const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const dirname = path.dirname(fileURLToPath(import.meta.url)); -const file = process.argv.length > 2 ? process.argv[2] : path.join(__dirname, "..", "src", "tokenizer.ts"); +const file = process.argv.length > 2 ? process.argv[2] : path.join(dirname, "..", "src", "tokenizer.ts"); const text = fs.readFileSync(file).toString(); -const tn = new Tokenizer(new Source(SourceKind.ENTRY, "compiler.ts", text)); +const source = new Source(SourceKind.ENTRY, "compiler.ts", text); +const tn = new Tokenizer(source); do { - let token = tn.next(); - let range = tn.range(); - process.stdout.write(Token[token] + " @ " + range.line + ":" + range.column); + const token = tn.next(); + const range = tn.range(); + process.stdout.write(Token[token] + " @ " + source.lineAt(range.start) + ":" + source.columnAt()); if (token == Token.IDENTIFIER) { process.stdout.write(" > " + tn.readIdentifier()); } else if (token == Token.INTEGERLITERAL) { diff --git a/util/browser/fs.js b/util/browser/fs.js index 040127c873..efd4cd2e46 100644 --- a/util/browser/fs.js +++ b/util/browser/fs.js @@ -1,2 +1,4 @@ -const fs = {}; +const fs = { + promises: {} +}; export default fs; From 38457959d415b03868f4f1846b456c94dd3b611e Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Nov 2021 07:13:58 +0100 Subject: [PATCH 064/175] split bootstrap tests --- .github/workflows/test.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5858cf4f23..d307ae3a9e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,9 +71,12 @@ jobs: - name: Test run: npm test test-bootstrap: - name: "Compiler (Bootstrap)" + name: "Compiler (Bootstrap, ${{ matrix.target }})" runs-on: ubuntu-latest needs: check + strategy: + matrix: + target: ["untouched", "optimized"] steps: - uses: actions/checkout@v1.0.0 - uses: dcodeIO/setup-node-nvm@master @@ -83,12 +86,10 @@ jobs: run: npm ci --no-audit - name: Build run: npm run build - - name: Bootstrap the compiler - run: npm run bootstrap - - name: Run compiler tests (untouched-bootstrap) - run: npm run test:compiler -- --wasm out/assemblyscript.untouched-bootstrap.wasm - - name: Run compiler tests (optimized-bootstrap) - run: npm run test:compiler -- --wasm out/assemblyscript.optimized-bootstrap.wasm + - name: Bootstrap + run: npm run bootstrap:${{ matrix.target }} + - name: Test + run: npm run test:compiler -- --wasm out/assemblyscript.${{ matrix.target }}-bootstrap.wasm test-features: name: "Features" runs-on: ubuntu-latest From e09ec02db5d2b8b397a6863a0248cd21d9d9ca1a Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Nov 2021 07:14:05 +0100 Subject: [PATCH 065/175] sync api and readme --- cli/README.md | 16 ++++++++-------- cli/index.d.ts | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cli/README.md b/cli/README.md index 4b1f45a4c4..ae3a58a95d 100644 --- a/cli/README.md +++ b/cli/README.md @@ -18,7 +18,7 @@ The API accepts the same options as the CLI but also lets you override stdout an ```js import asc from "assemblyscript/asc"; -const result = await asc.main([ +const { error, stdout } = await asc.main([ "myModule.ts", "--binaryFile", "myModule.wasm", "--optimize", @@ -28,21 +28,21 @@ const result = await asc.main([ stdout: asc.createMemoryStream(), stderr: asc.createMemoryStream() }); -if (result.error) { - console.log("Compilation failed: " + result.error.message); +if (error) { + console.log("Compilation failed: " + error.message); } else { - console.log(result.stdout.toString()); + console.log(stdout.toString()); } ``` -The `Result` object has the following structure: +The result has the following structure: | Property | Description |----------|------------- | error | Encountered error, if any -| stdout | Reference to stdout -| stderr | Reference to stderr -| stats | Statistics object +| stdout | Standard output stream +| stderr | Standard error stream +| stats | Statistics You can also compile a single source string directly (note that this API has limited functionality): diff --git a/cli/index.d.ts b/cli/index.d.ts index 8a871a86ef..33d12ef62f 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -188,7 +188,7 @@ export interface APIOptions { /** Compiler API result. */ export interface APIResult { - /** Error, if any. */ + /** Encountered error, if any. */ error: Error | null; /** Standard output stream. */ stdout: OutputStream; From 1db68bd0af8665759fd5f93e1a3c4dbf14e39f68 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Nov 2021 07:19:57 +0100 Subject: [PATCH 066/175] split test as well? --- .github/workflows/test.yml | 39 +++++--------------------------------- 1 file changed, 5 insertions(+), 34 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d307ae3a9e..fae0516eae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,11 +21,12 @@ jobs: printf "\nOK: Distributions files have not been modified.\n"; fi test: - name: "Compiler (Linux, node ${{ matrix.node_version }})" - runs-on: ubuntu-latest + name: "Compiler (${{ matrix.os }}, node ${{ matrix.node_version }})" + runs-on: ${{ matrix.os }}-latest needs: check strategy: matrix: + os: ["ubuntu", "macos", "windows"] node_version: ["current", "lts_latest"] steps: - uses: actions/checkout@v1.0.0 @@ -40,38 +41,8 @@ jobs: run: npm run check - name: Test run: npm test - test-windows: - name: "Compiler (Windows, node current)" - runs-on: windows-latest - needs: check - steps: - - uses: actions/checkout@v1.0.0 - - uses: dcodeIO/setup-node-nvm@master - with: - node-version: current - - name: Install dependencies - run: npm ci --no-audit - - name: Build - run: npm run build - - name: Test - run: npm test - test-macos: - name: "Compiler (MacOS, node current)" - runs-on: macos-latest - needs: check - steps: - - uses: actions/checkout@v1.0.0 - - uses: dcodeIO/setup-node-nvm@master - with: - node-version: current - - name: Install dependencies - run: npm ci --no-audit - - name: Build - run: npm run build - - name: Test - run: npm test - test-bootstrap: - name: "Compiler (Bootstrap, ${{ matrix.target }})" + bootstrap: + name: "Compiler (bootstrap, ${{ matrix.target }})" runs-on: ubuntu-latest needs: check strategy: From 0a9a1a2d6c87324566a2d42ed18eafaed843f816 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Nov 2021 08:11:01 +0100 Subject: [PATCH 067/175] update compileString, accept options object in main --- cli/README.md | 2 +- cli/index.d.ts | 10 +++------- cli/index.js | 38 +++++++++++++++++++++----------------- package.json | 2 +- tests/browser.js | 2 +- tests/compiler.js | 2 +- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/cli/README.md b/cli/README.md index ae3a58a95d..7159041afc 100644 --- a/cli/README.md +++ b/cli/README.md @@ -48,7 +48,7 @@ You can also compile a single source string directly (note that this API has lim ```js import asc from "assemblyscript/asc"; -const { binary, text, stdout, stderr } = asc.compileString(`...`, { optimize: 2 }); +const { binary, text, stdout, stderr } = await asc.compileString(`...`, { optimize: 2 }); ... ``` diff --git a/cli/index.d.ts b/cli/index.d.ts index 33d12ef62f..af41426b16 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -199,19 +199,15 @@ export interface APIResult { } /** Runs the command line utility using the specified arguments array. */ -export function main(argv: string[], options?: APIOptions): Promise; +export function main(argv: string[] | CompilerOptions, options?: APIOptions): Promise; /** Convenience function that parses and compiles source strings directly. */ -export function compileString(sources: { [key: string]: string } | string, options?: CompilerOptions): { - /** Standard output. */ - stdout: OutputStream, - /** Standard error. */ - stderr: OutputStream, +export function compileString(sources: { [key: string]: string } | string, options?: CompilerOptions): Promise; /** Checks diagnostics emitted so far for errors. */ export function checkDiagnostics(emitter: Record, stderr?: OutputStream, reportDiagnostic?: DiagnosticReporter): boolean; diff --git a/cli/index.js b/cli/index.js index c2bdd73d9d..b40b689811 100644 --- a/cli/index.js +++ b/cli/index.js @@ -145,20 +145,11 @@ export const defaultOptimizeLevel = 3; /** Default Binaryen shrink level. */ export const defaultShrinkLevel = 0; -/** Convenience function that parses and compiles source strings directly. */ -export function compileString(sources, options) { - if (typeof sources === "string") sources = { [`input${defaultExtension.ext}`]: sources }; - const output = Object.create({ - stdout: createMemoryStream(), - stderr: createMemoryStream() - }); - var argv = [ - "--binaryFile", "binary", - "--textFile", "text", - ]; +/** Converts a configuration object to an arguments array. */ +export function configToArguments(options, argv = []) { Object.keys(options || {}).forEach(key => { - var val = options[key]; - var opt = generated.options[key]; + const val = options[key]; + const opt = generated.options[key]; if (opt && opt.type === "b") { if (val) argv.push(`--${key}`); } else { @@ -168,18 +159,31 @@ export function compileString(sources, options) { else argv.push(`--${key}`, String(val)); } }); - main(argv.concat(Object.keys(sources)), { - stdout: output.stdout, - stderr: output.stderr, + return argv; +} + +/** Convenience function that parses and compiles source strings directly. */ +export async function compileString(sources, config = {}) { + if (typeof sources === "string") sources = { [`input${defaultExtension.ext}`]: sources }; + var argv = [ + "--binaryFile", "binary", + "--textFile", "text", + ]; + configToArguments(config, argv); + const output = {}; + const result = await main(argv.concat(Object.keys(sources)), { + stdout: createMemoryStream(), + stderr: createMemoryStream(), readFile: name => Object.prototype.hasOwnProperty.call(sources, name) ? sources[name] : null, writeFile: (name, contents) => { output[name] = contents; }, listFiles: () => [] }); - return output; + return Object.assign(result, output); } /** Runs the command line utility using the specified arguments array. */ export async function main(argv, options) { + if (!Array.isArray(argv)) argv = configToArguments(argv); if (!options) options = {}; // Bundle semantic version diff --git a/package.json b/package.json index 04cc7f3608..7bf75f4493 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "watch": "node scripts/build --watch", "test": "npm run test:parser && npm run test:compiler && npm run test:browser && npm run test:packages && npm run test:extension && npm run test:asconfig", "test:parser": "node --enable-source-maps tests/parser", - "test:compiler": "node --enable-source-maps --experimental-wasi-unstable-preview1 --no-warnings tests/compiler", + "test:compiler": "node --enable-source-maps --experimental-wasi-unstable-preview1 --no-warnings tests/compiler --parallel", "test:browser": "node --enable-source-maps tests/browser", "test:packages": "cd tests/packages && npm run test", "test:extension": "cd tests/extension && npm run test", diff --git a/tests/browser.js b/tests/browser.js index b759635528..c1c977fabd 100644 --- a/tests/browser.js +++ b/tests/browser.js @@ -62,7 +62,7 @@ console.log("\n# asc index.ts --textFile"); console.log("\n# asc.compileString"); { - const { stdout, stderr, text, binary } = asc.compileString(`export function test(): void {}`, { optimizeLevel: 3, exportTable: true, measure: true }); + const { stdout, stderr, text, binary } = await asc.compileString(`export function test(): void {}`, { optimizeLevel: 3, exportTable: true, measure: true }); console.log(">>> .stdout >>>"); process.stdout.write(stdout.toString()); console.log(">>> .stderr >>>"); diff --git a/tests/compiler.js b/tests/compiler.js index 22519da1c5..13afd7cea0 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -448,7 +448,7 @@ function evaluateResult(failedTests, skippedTests) { } // Run tests in parallel if requested -if (args.parallel && coreCount > 1) { +if (args.parallel && coreCount > 2) { if (cluster.isWorker) { colors.enabled = true; process.on("message", msg => { From b54aefe68a89906a619f9f866f831412b2325e8a Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Nov 2021 08:50:23 +0100 Subject: [PATCH 068/175] propagate fs.promises --- cli/index.d.ts | 16 ++++---- cli/index.js | 101 ++++++++++++++++++++++++++-------------------- tests/compiler.js | 2 +- 3 files changed, 67 insertions(+), 52 deletions(-) diff --git a/cli/index.d.ts b/cli/index.d.ts index af41426b16..bec2f96004 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -175,11 +175,11 @@ export interface APIOptions { /** Standard error stream to use. */ stderr?: OutputStream; /** Reads a file from disk (or memory). */ - readFile?: (filename: string, baseDir: string) => string | null; + readFile?: (filename: string, baseDir: string) => string | null | Promise; /** Writes a file to disk (or memory). */ - writeFile?: (filename: string, contents: Uint8Array, baseDir: string) => void; + writeFile?: (filename: string, contents: Uint8Array, baseDir: string) => void | Promise; /** Lists all files within a directory. */ - listFiles?: (dirname: string, baseDir: string) => string[] | null; + listFiles?: (dirname: string, baseDir: string) => string[] | null | Promise; /** Handler for diagnostic messages. */ reportDiagnostic?: DiagnosticReporter; /** Additional transforms to apply. */ @@ -283,14 +283,14 @@ export abstract class Transform { /** Logs a message to console. */ readonly log: typeof console.log; - /** Writes a file to disk. */ - writeFile(filename: string, contents: string | Uint8Array, baseDir: string): boolean; - /** Reads a file from disk. */ - readFile(filename: string, baseDir: string): string | null; + readFile(filename: string, baseDir: string): string | null | Promise; + + /** Writes a file to disk. */ + writeFile(filename: string, contents: string | Uint8Array, baseDir: string): void | Promise; /** Lists all files in a directory. */ - listFiles(dirname: string, baseDir: string): string[] | null; + listFiles(dirname: string, baseDir: string): string[] | null | Promise; /** Called when parsing is complete, before a program is instantiated from the AST. */ afterParse?(parser: Parser): void; diff --git a/cli/index.js b/cli/index.js index b40b689811..cdaac38ee4 100644 --- a/cli/index.js +++ b/cli/index.js @@ -48,7 +48,7 @@ var __pin = ptr => ptr; var __unpin = _ => undefined; var __collect = _ => undefined; -// Use the AS->Wasm variant as an option +// Use the AS->Wasm variant as an option (experimental) const useWasm = process.argv.includes("--wasm"); if (useWasm) { let argPos = process.argv.indexOf("--wasm"); @@ -267,7 +267,7 @@ export async function main(argv, options) { let asconfigPath = optionsUtil.resolvePath(opts.config || "asconfig.json", baseDir); let asconfigFile = path.basename(asconfigPath); let asconfigDir = path.dirname(asconfigPath); - let asconfig = getAsconfig(asconfigFile, asconfigDir, readFile); + let asconfig = await readConfig(asconfigFile, asconfigDir, readFile); let asconfigHasEntries = asconfig != null && Array.isArray(asconfig.entries) && asconfig.entries.length; // Print the help message if requested or no source files are provided @@ -292,7 +292,7 @@ export async function main(argv, options) { } // I/O must be specified if not present in the environment - if (!fs.readFileSync) { + if (!fs.promises.readFile) { if (readFile === readFileNode) throw Error("'options.readFile' must be specified"); if (writeFile === writeFileNode) throw Error("'options.writeFile' must be specified"); if (listFiles === listFilesNode) throw Error("'options.listFiles' must be specified"); @@ -330,7 +330,7 @@ export async function main(argv, options) { asconfigDir = path.dirname(asconfigPath); if (seenAsconfig.has(asconfigPath)) break; seenAsconfig.add(asconfigPath); - asconfig = getAsconfig(asconfigFile, asconfigDir, readFile); + asconfig = await readConfig(asconfigFile, asconfigDir, readFile); } else { break; } @@ -540,10 +540,10 @@ export async function main(argv, options) { libFiles = [ path.basename(libDir) ]; libDir = path.dirname(libDir); } else { - libFiles = listFiles(libDir, baseDir) || []; + libFiles = await listFiles(libDir, baseDir) || []; } for (let libPath of libFiles) { - let libText = readFile(libPath, libDir); + let libText = await readFile(libPath, libDir); if (libText == null) { return prepareResult(Error(`Library file '${libPath}' not found.`)); } @@ -565,17 +565,17 @@ export async function main(argv, options) { const packageBases = new Map(); // Gets the file matching the specified source path, imported at the given dependee path - function getFile(internalPath, dependeePath) { + async function getFile(internalPath, dependeePath) { var sourceText = null; // text reported back to the compiler var sourcePath = null; // path reported back to the compiler // Try file.ext, file/index.ext, file.d.ext if (!internalPath.startsWith(libraryPrefix)) { - if ((sourceText = readFile(sourcePath = internalPath + extension.ext, baseDir)) == null) { - if ((sourceText = readFile(sourcePath = internalPath + "/index" + extension.ext, baseDir)) == null) { + if ((sourceText = await readFile(sourcePath = internalPath + extension.ext, baseDir)) == null) { + if ((sourceText = await readFile(sourcePath = internalPath + "/index" + extension.ext, baseDir)) == null) { // portable d.ext: uses the .js file next to it in JS or becomes an import in Wasm sourcePath = internalPath + extension.ext; - sourceText = readFile(internalPath + extension.ext_d, baseDir); + sourceText = await readFile(internalPath + extension.ext_d, baseDir); } } @@ -591,11 +591,11 @@ export async function main(argv, options) { sourcePath = libraryPrefix + indexName + extension.ext; } else { // custom lib dirs for (const libDir of customLibDirs) { - if ((sourceText = readFile(plainName + extension.ext, libDir)) != null) { + if ((sourceText = await readFile(plainName + extension.ext, libDir)) != null) { sourcePath = libraryPrefix + plainName + extension.ext; break; } else { - if ((sourceText = readFile(indexName + extension.ext, libDir)) != null) { + if ((sourceText = await readFile(indexName + extension.ext, libDir)) != null) { sourcePath = libraryPrefix + indexName + extension.ext; break; } @@ -630,7 +630,7 @@ export async function main(argv, options) { mainPath = packageMains.get(packageName); } else { // evaluate package.json let jsonPath = path.join(currentPath, packageName, "package.json"); - let jsonText = readFile(jsonPath, baseDir); + let jsonText = await readFile(jsonPath, baseDir); if (jsonText != null) { try { let json = JSON.parse(jsonText); @@ -643,7 +643,7 @@ export async function main(argv, options) { } const mainDir = path.join(currentPath, packageName, mainPath); const plainName = filePath; - if ((sourceText = readFile(path.join(mainDir, plainName + extension.ext), baseDir)) != null) { + if ((sourceText = await readFile(path.join(mainDir, plainName + extension.ext), baseDir)) != null) { sourcePath = `${libraryPrefix}${packageName}/${plainName}${extension.ext}`; packageBases.set(sourcePath.replace(extension.re, ""), path.join(currentPath, packageName)); if (opts.traceResolution) { @@ -652,7 +652,7 @@ export async function main(argv, options) { break; } else if (!isPackageRoot) { const indexName = `${filePath}/index`; - if ((sourceText = readFile(path.join(mainDir, indexName + extension.ext), baseDir)) !== null) { + if ((sourceText = await readFile(path.join(mainDir, indexName + extension.ext), baseDir)) !== null) { sourcePath = `${libraryPrefix}${packageName}/${indexName}${extension.ext}`; packageBases.set(sourcePath.replace(extension.re, ""), path.join(currentPath, packageName)); if (opts.traceResolution) { @@ -672,10 +672,10 @@ export async function main(argv, options) { } // Parses the backlog of imported files after including entry files - function parseBacklog() { + async function parseBacklog() { var internalPath; while ((internalPath = __getString(assemblyscript.nextFile(program)))) { - let file = getFile(internalPath, assemblyscript.getDependee(program, internalPath)); + let file = await getFile(internalPath, assemblyscript.getDependee(program, internalPath)); let begin = stats.begin(); stats.parseCount++; if (file) { @@ -705,7 +705,7 @@ export async function main(argv, options) { let runtimeText = libraryFiles[runtimePath]; if (runtimeText == null) { runtimePath = runtimeName; - runtimeText = readFile(runtimePath + extension.ext, baseDir); + runtimeText = await readFile(runtimePath + extension.ext, baseDir); if (runtimeText == null) return prepareResult(Error(`Runtime '${runtimeName}' not found.`)); } else { runtimePath = `~lib/${runtimePath}`; @@ -733,10 +733,10 @@ export async function main(argv, options) { : sourcePath; // Try entryPath.ext, then entryPath/index.ext - let sourceText = readFile(sourcePath + extension.ext, baseDir); + let sourceText = await readFile(sourcePath + extension.ext, baseDir); if (sourceText == null) { const path = `${sourcePath}/index${extension.ext}`; - sourceText = readFile(path, baseDir); + sourceText = await readFile(path, baseDir); if (sourceText != null) sourcePath = path; else sourcePath += extension.ext; } else { @@ -754,7 +754,7 @@ export async function main(argv, options) { // Parse entry files { - let code = parseBacklog(); + let code = await parseBacklog(); if (code) return code; } @@ -766,7 +766,7 @@ export async function main(argv, options) { // Parse additional files, if any { - let code = parseBacklog(); + let code = await parseBacklog(); if (code) return code; } @@ -947,6 +947,8 @@ export async function main(argv, options) { stats.optimizeTime += stats.end(begin); } + const pending = []; + // Prepare output if (!opts.noEmit) { if (opts.outFile != null) { @@ -986,7 +988,9 @@ export async function main(argv, options) { stats.emitTime += stats.end(begin); if (opts.binaryFile.length) { - writeFile(opts.binaryFile, wasm.binary, baseDir); + pending.push( + writeFile(opts.binaryFile, wasm.binary, baseDir) + ); } else { hasStdout = true; writeStdout(wasm.binary); @@ -998,16 +1002,19 @@ export async function main(argv, options) { let map = JSON.parse(wasm.sourceMap); map.sourceRoot = `./${basename}`; let contents = []; - map.sources.forEach((name, index) => { + for (let i = 0, k = map.sources.length; i < k; ++i) { + let name = map.sources[i]; let text = assemblyscript.getSource(program, __newString(name.replace(extension.re, ""))); if (text == null) return prepareResult(Error(`Source of file '${name}' not found.`)); - contents[index] = text; - }); + contents[i] = text; + } map.sourcesContent = contents; - writeFile(path.join( - path.dirname(opts.binaryFile), - path.basename(sourceMapURL) - ).replace(/^\.\//, ""), JSON.stringify(map), baseDir); + pending.push( + writeFile(path.join( + path.dirname(opts.binaryFile), + path.basename(sourceMapURL) + ).replace(/^\.\//, ""), JSON.stringify(map), baseDir) + ); } else { stderr.write(`Skipped source map (stdout already occupied)${EOL}`); } @@ -1031,7 +1038,9 @@ export async function main(argv, options) { stats.emitTime += stats.end(begin); if (opts.textFile != null && opts.textFile.length) { - writeFile(opts.textFile, out, baseDir); + pending.push( + writeFile(opts.textFile, out, baseDir) + ); } else if (!hasStdout) { hasStdout = true; writeStdout(out); @@ -1050,7 +1059,9 @@ export async function main(argv, options) { } stats.emitTime += stats.end(begin); if (opts.idlFile.length) { - writeFile(opts.idlFile, __getString(idl), baseDir); + pending.push( + writeFile(opts.idlFile, __getString(idl), baseDir) + ); } else if (!hasStdout) { hasStdout = true; writeStdout(__getString(idl)); @@ -1069,7 +1080,9 @@ export async function main(argv, options) { } stats.emitTime += stats.end(begin); if (opts.tsdFile.length) { - writeFile(opts.tsdFile, __getString(tsd), baseDir); + pending.push( + writeFile(opts.tsdFile, __getString(tsd), baseDir) + ); } else if (!hasStdout) { hasStdout = true; writeStdout(__getString(tsd)); @@ -1088,7 +1101,9 @@ export async function main(argv, options) { crash("emitJS", e); } stats.emitTime += stats.end(begin); - writeFile(opts.jsFile, js, baseDir); + pending.push( + writeFile(opts.jsFile, js, baseDir) + ); } else if (!hasStdout) { stats.emitCount++; let begin = stats.begin(); @@ -1110,12 +1125,12 @@ export async function main(argv, options) { return prepareResult(null); - function readFileNode(filename, baseDir) { + async function readFileNode(filename, baseDir) { let name = path.resolve(baseDir, filename); try { let begin = stats.begin(); stats.readCount++; - let text = fs.readFileSync(name, "utf8"); + let text = await fs.promises.readFile(name, "utf8"); stats.readTime += stats.end(begin); return text; } catch (e) { @@ -1123,14 +1138,14 @@ export async function main(argv, options) { } } - function writeFileNode(filename, contents, baseDir) { + async function writeFileNode(filename, contents, baseDir) { try { let begin = stats.begin(); stats.writeCount++; const dirPath = path.resolve(baseDir, path.dirname(filename)); const filePath = path.join(dirPath, path.basename(filename)); - if (!fs.existsSync(dirPath)) mkdirp(dirPath); - fs.writeFileSync(filePath, contents); + if (!await fs.promises.access(dirPath, fs.constants.W_OK)) mkdirp(dirPath); + await fs.promises.writeFile(filePath, contents); stats.writeTime += stats.end(begin); return true; } catch (e) { @@ -1138,12 +1153,12 @@ export async function main(argv, options) { } } - function listFilesNode(dirname, baseDir) { + async function listFilesNode(dirname, baseDir) { var files; try { let begin = stats.begin(); stats.readCount++; - files = fs.readdirSync(path.join(baseDir, dirname)) + files = (await fs.promises.readdir(path.join(baseDir, dirname))) .filter(file => extension.re_except_d.test(file)); stats.readTime += stats.end(begin); return files; @@ -1169,8 +1184,8 @@ function isObject(arg) { return toString.call(arg) === "[object Object]"; } -export function getAsconfig(file, baseDir, readFile) { - const contents = readFile(file, baseDir); +async function readConfig(file, baseDir, readFile) { + const contents = await readFile(file, baseDir); const location = path.join(baseDir, file); if (!contents) return null; diff --git a/tests/compiler.js b/tests/compiler.js index 13afd7cea0..7a1699edf6 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -468,7 +468,7 @@ if (args.parallel && coreCount > 2) { const current = []; const outputs = []; let numWorkers = Math.min(coreCount - 1, tests.length); - console.log(`Spawning ${numWorkers} workers (assuming ${coreCount} cores, ${threadCount} threads)...`); + console.log(`Spawning ${numWorkers} workers (assuming ${coreCount} cores, ${threadCount} threads)...\n`); cluster.settings.silent = true; let index = 0; for (let i = 0; i < numWorkers; ++i) { From 9877cb7849725aa36fa7205b503bf254e355b287 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Nov 2021 08:53:05 +0100 Subject: [PATCH 069/175] unify --- cli/index.js | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/cli/index.js b/cli/index.js index cdaac38ee4..80c983cdad 100644 --- a/cli/index.js +++ b/cli/index.js @@ -264,14 +264,14 @@ export async function main(argv, options) { const baseDir = path.normalize(opts.baseDir || "."); // Check if a config file is present - let asconfigPath = optionsUtil.resolvePath(opts.config || "asconfig.json", baseDir); - let asconfigFile = path.basename(asconfigPath); - let asconfigDir = path.dirname(asconfigPath); - let asconfig = await readConfig(asconfigFile, asconfigDir, readFile); - let asconfigHasEntries = asconfig != null && Array.isArray(asconfig.entries) && asconfig.entries.length; + let configPath = optionsUtil.resolvePath(opts.config || "asconfig.json", baseDir); + let configFile = path.basename(configPath); + let configDir = path.dirname(configPath); + let config = await getConfig(configFile, configDir, readFile); + let configHasEntries = config != null && Array.isArray(config.entries) && config.entries.length; // Print the help message if requested or no source files are provided - if (opts.help || (!argv.length && !asconfigHasEntries)) { + if (opts.help || (!argv.length && !configHasEntries)) { var out = opts.help ? stdout : stderr; var color = opts.help ? colorsUtil.stdout : colorsUtil.stderr; out.write([ @@ -300,37 +300,37 @@ export async function main(argv, options) { // Load additional options from asconfig.json const seenAsconfig = new Set(); - seenAsconfig.add(asconfigPath); + seenAsconfig.add(configPath); const target = opts.target || "release"; - while (asconfig) { + while (config) { // Merge target first - if (asconfig.targets) { - const targetOptions = asconfig.targets[target]; + if (config.targets) { + const targetOptions = config.targets[target]; if (targetOptions) { - opts = optionsUtil.merge(generated.options, opts, targetOptions, asconfigDir); + opts = optionsUtil.merge(generated.options, opts, targetOptions, configDir); } } // Merge general options - const generalOptions = asconfig.options; + const generalOptions = config.options; if (generalOptions) { - opts = optionsUtil.merge(generated.options, opts, generalOptions, asconfigDir); + opts = optionsUtil.merge(generated.options, opts, generalOptions, configDir); } // Append entries - if (asconfig.entries) { - for (let entry of asconfig.entries) { - argv.push(optionsUtil.resolvePath(entry, asconfigDir)); + if (config.entries) { + for (let entry of config.entries) { + argv.push(optionsUtil.resolvePath(entry, configDir)); } } // Look up extended asconfig and repeat - if (asconfig.extends) { - asconfigPath = optionsUtil.resolvePath(asconfig.extends, asconfigDir, true); - asconfigFile = path.basename(asconfigPath); - asconfigDir = path.dirname(asconfigPath); - if (seenAsconfig.has(asconfigPath)) break; - seenAsconfig.add(asconfigPath); - asconfig = await readConfig(asconfigFile, asconfigDir, readFile); + if (config.extends) { + configPath = optionsUtil.resolvePath(config.extends, configDir, true); + configFile = path.basename(configPath); + configDir = path.dirname(configPath); + if (seenAsconfig.has(configPath)) break; + seenAsconfig.add(configPath); + config = await getConfig(configFile, configDir, readFile); } else { break; } @@ -1184,7 +1184,7 @@ function isObject(arg) { return toString.call(arg) === "[object Object]"; } -async function readConfig(file, baseDir, readFile) { +async function getConfig(file, baseDir, readFile) { const contents = await readFile(file, baseDir); const location = path.join(baseDir, file); if (!contents) return null; From d46bee7a3081e17db72c1e6fceec195804841140 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Nov 2021 08:55:43 +0100 Subject: [PATCH 070/175] wait for pending operations to settle --- cli/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/index.js b/cli/index.js index 80c983cdad..e05cae4fb0 100644 --- a/cli/index.js +++ b/cli/index.js @@ -1123,6 +1123,11 @@ export async function main(argv, options) { printStats(stats, stderr); } + try { + await Promise.all(pending); + } catch (err) { + return prepareResult(err); + } return prepareResult(null); async function readFileNode(filename, baseDir) { From 8fa2845e47986ab107d5692d20b784517b1c3419 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Nov 2021 09:17:07 +0100 Subject: [PATCH 071/175] ? --- cli/index.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/cli/index.js b/cli/index.js index e05cae4fb0..d4d21e343f 100644 --- a/cli/index.js +++ b/cli/index.js @@ -1118,16 +1118,17 @@ export async function main(argv, options) { } } - module.dispose(); - if (opts.measure) { - printStats(stats, stderr); - } - try { await Promise.all(pending); } catch (err) { return prepareResult(err); } + + module.dispose(); + if (opts.measure) { + printStats(stats, stderr); + } + return prepareResult(null); async function readFileNode(filename, baseDir) { @@ -1183,10 +1184,8 @@ export async function main(argv, options) { } } -const toString = Object.prototype.toString; - function isObject(arg) { - return toString.call(arg) === "[object Object]"; + return Object.prototype.toString.call(arg) === "[object Object]"; } async function getConfig(file, baseDir, readFile) { From fca4666c2199061164ef1f27efcc71ec344b6e0d Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Nov 2021 16:12:46 +0100 Subject: [PATCH 072/175] fix --- cli/index.js | 12 +++------ scripts/build-dts.js | 3 +-- util/README.md | 1 - util/mkdirp.d.ts | 10 -------- util/mkdirp.js | 60 -------------------------------------------- 5 files changed, 5 insertions(+), 81 deletions(-) delete mode 100644 util/mkdirp.d.ts delete mode 100644 util/mkdirp.js diff --git a/cli/index.js b/cli/index.js index d4d21e343f..baeaa78073 100644 --- a/cli/index.js +++ b/cli/index.js @@ -28,7 +28,6 @@ */ import { fs, module, path, process } from "../util/node.js"; -import mkdirp from "../util/mkdirp.js"; import fetch from "../util/fetch.js"; import * as utf8 from "../util/utf8.js"; import * as colorsUtil from "../util/colors.js"; @@ -238,11 +237,14 @@ export async function main(argv, options) { ); } + var module = null; + // Prepares the result object var prepareResult = (error, result = {}) => { if (error) { stderr.write(`${colorsUtil.stderr.red("FAILURE ")}${error.stack.replace(/^ERROR: /i, "")}${EOL}`); } + if (module) module.dispose(); return Object.assign({ error, stdout, stderr, stats }, result); }; @@ -796,7 +798,6 @@ export async function main(argv, options) { } // Compile the program - var module; { let begin = stats.begin(); stats.compileCount++; @@ -824,7 +825,6 @@ export async function main(argv, options) { } var numErrors = checkDiagnostics(program, stderr, options.reportDiagnostic); if (numErrors) { - if (module) module.dispose(); const err = Error(`${numErrors} compile error(s)`); err.stack = err.message; // omit stack return prepareResult(err); @@ -838,7 +838,6 @@ export async function main(argv, options) { numErrors = checkDiagnostics(program, stderr, options.reportDiagnostic); if (numErrors) { - if (module) module.dispose(); const err = Error(`${numErrors} afterCompile error(s)`); err.stack = err.message; // omit stack return prepareResult(err); @@ -851,7 +850,6 @@ export async function main(argv, options) { let isValid = module.validate(); stats.validateTime += stats.end(begin); if (!isValid) { - module.dispose(); return prepareResult(Error("validate error")); } } @@ -866,7 +864,6 @@ export async function main(argv, options) { } stats.compileTime += stats.end(begin); } else if (opts.trapMode !== "allow") { - module.dispose(); return prepareResult(Error("Unsupported trap mode")); } @@ -1124,7 +1121,6 @@ export async function main(argv, options) { return prepareResult(err); } - module.dispose(); if (opts.measure) { printStats(stats, stderr); } @@ -1150,7 +1146,7 @@ export async function main(argv, options) { stats.writeCount++; const dirPath = path.resolve(baseDir, path.dirname(filename)); const filePath = path.join(dirPath, path.basename(filename)); - if (!await fs.promises.access(dirPath, fs.constants.W_OK)) mkdirp(dirPath); + await fs.promises.mkdir(dirPath, { recursive: true }); await fs.promises.writeFile(filePath, contents); stats.writeTime += stats.end(begin); return true; diff --git a/scripts/build-dts.js b/scripts/build-dts.js index 96381aa2b4..2baaf6f7cc 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -6,7 +6,6 @@ import ts from "typescript"; import stream from "stream"; import util from "util"; import { fileURLToPath } from 'url'; -import mkdirp from "../util/mkdirp.js"; const __dirname = pathUtil.dirname(fileURLToPath(import.meta.url)); @@ -214,7 +213,7 @@ const generate = (function() { verboseMessage('exclude:'); options.exclude.forEach(name => { verboseMessage(' ' + name); }); } - if (!options.stdout) mkdirp.sync(pathUtil.dirname(options.out)); + if (!options.stdout) fs.mkdirSync(pathUtil.dirname(options.out), { recursive: true }); /* node.js typings are missing the optional mode in createWriteStream options and therefore * in TS 1.6 the strict object literal checking is throwing, therefore a hammer to the nut */ const output = options.stdout || fs.createWriteStream(options.out, { mode: parseInt('644', 8) }); diff --git a/util/README.md b/util/README.md index 099310e3bd..defd57c1a6 100644 --- a/util/README.md +++ b/util/README.md @@ -10,7 +10,6 @@ Various utility functions shared accross the codebase. | diff | Computes the difference between two texts | fetch | Simple Node.js polyfill for the Fetch API | find | Provides support for finding files etc. -| mkdirp | Creates non-existent directory trees | node | Minimal polyfills for Node.js builtins | options | Support for command line options parsing | utf8 | Utility for UTF-8 text processing diff --git a/util/mkdirp.d.ts b/util/mkdirp.d.ts deleted file mode 100644 index 7a0658d500..0000000000 --- a/util/mkdirp.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @fileoverview Recursive mkdir definitions. - * @license Apache-2.0 - */ - -interface Options { - mode?: number; -} -declare function mkdirp(path: string, options?: Options): string | null; -export = mkdirp; diff --git a/util/mkdirp.js b/util/mkdirp.js deleted file mode 100644 index 4a981e4952..0000000000 --- a/util/mkdirp.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @fileoverview Recursive mkdir. - * @license - * Copyright 2010 James Halliday (mail@substack.net) - * - * This project is free software released under the MIT/X11 license: - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -import { fs, path, process } from "./node.js"; - -export default function mkdirp(p, opts, made) { - if (!opts || typeof opts !== "object") { - opts = { mode: opts }; - } - var mode = opts.mode; - if (mode === undefined) { - mode = 0o777 & (~process.umask()); - } - if (!made) made = null; - p = path.resolve(p); - try { - fs.mkdirSync(p, mode); - made = made || p; - } catch (err0) { - switch (err0.code) { - case "ENOENT": - made = mkdirp(path.dirname(p), opts, made); - mkdirp(p, opts, made); - break; - default: - var stat; - try { - stat = fs.statSync(p); - } catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - return made; -} From cbbd064ea9c5b76db391e8d2c3e207a2342abab9 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Nov 2021 16:28:33 +0100 Subject: [PATCH 073/175] tidy ci --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fae0516eae..8b8808bd99 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: else printf "\nOK: Distributions files have not been modified.\n"; fi - test: + compiler: name: "Compiler (${{ matrix.os }}, node ${{ matrix.node_version }})" runs-on: ${{ matrix.os }}-latest needs: check @@ -42,7 +42,7 @@ jobs: - name: Test run: npm test bootstrap: - name: "Compiler (bootstrap, ${{ matrix.target }})" + name: "Bootstrap (${{ matrix.target }})" runs-on: ubuntu-latest needs: check strategy: @@ -61,7 +61,7 @@ jobs: run: npm run bootstrap:${{ matrix.target }} - name: Test run: npm run test:compiler -- --wasm out/assemblyscript.${{ matrix.target }}-bootstrap.wasm - test-features: + features: name: "Features" runs-on: ubuntu-latest needs: check @@ -80,7 +80,7 @@ jobs: ASC_FEATURES: threads,reference-types,bigint-integration,gc run: | npm run test:compiler rt/flags features/js-bigint-integration features/reference-types features/threads std-wasi/process std-wasi/crypto - test-runtimes: + runtimes: name: "Runtimes" runs-on: ubuntu-latest needs: check @@ -105,7 +105,7 @@ jobs: npm run build cd .. npm test stub - test-loader: + loader: name: "Loader" runs-on: ubuntu-latest needs: check From 0446963d5c47d241eb8c03abd858534851852b61 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Nov 2021 18:14:38 +0100 Subject: [PATCH 074/175] things --- cli/index.js | 119 +++++++++++++++++++++++++-------------------------- package.json | 4 +- 2 files changed, 60 insertions(+), 63 deletions(-) diff --git a/cli/index.js b/cli/index.js index baeaa78073..792cc5d71d 100644 --- a/cli/index.js +++ b/cli/index.js @@ -673,26 +673,45 @@ export async function main(argv, options) { return { sourceText, sourcePath }; } - // Parses the backlog of imported files after including entry files - async function parseBacklog() { + // Gets all pending imported files from the the backlog + function getBacklog(paths = []) { var internalPath; while ((internalPath = __getString(assemblyscript.nextFile(program)))) { - let file = await getFile(internalPath, assemblyscript.getDependee(program, internalPath)); - let begin = stats.begin(); - stats.parseCount++; - if (file) { - let textPtr = __pin(__newString(file.sourceText)); - let pathPtr = __newString(file.sourcePath); - assemblyscript.parse(program, textPtr, pathPtr, false); - __unpin(textPtr); - } else { - let textPtr = __newString(null); // no need to pin - let pathPtr = __newString(internalPath + extension.ext); - assemblyscript.parse(program, textPtr, pathPtr, false); + paths.push(internalPath); + } + return paths; + } + + // Parses the backlog of imported files after including entry files + async function parseBacklog() { + var backlog; + while ((backlog = getBacklog()).length) { + let files = []; + for (let internalPath of backlog) { + files.push( + getFile(internalPath, assemblyscript.getDependee(program, internalPath)) + ); + } + files = await Promise.all(files); // parallel + for (let i = 0, k = backlog.length; i < k; ++i) { + const internalPath = backlog[i]; + const file = files[i]; + const begin = stats.begin(); + stats.parseCount++; + if (file) { + const textPtr = __pin(__newString(file.sourceText)); + const pathPtr = __newString(file.sourcePath); + assemblyscript.parse(program, textPtr, pathPtr, false); + __unpin(textPtr); + } else { + const textPtr = __newString(null); // no need to pin + const pathPtr = __newString(internalPath + extension.ext); + assemblyscript.parse(program, textPtr, pathPtr, false); + } + stats.parseTime += stats.end(begin); } - stats.parseTime += stats.end(begin); } - var numErrors = checkDiagnostics(program, stderr, options.reportDiagnostic); + const numErrors = checkDiagnostics(program, stderr, options.reportDiagnostic); if (numErrors) { const err = Error(`${numErrors} parse error(s)`); err.stack = err.message; // omit stack @@ -1121,20 +1140,15 @@ export async function main(argv, options) { return prepareResult(err); } - if (opts.measure) { - printStats(stats, stderr); - } + if (opts.measure) stderr.write(stats.toString()); return prepareResult(null); async function readFileNode(filename, baseDir) { let name = path.resolve(baseDir, filename); try { - let begin = stats.begin(); stats.readCount++; - let text = await fs.promises.readFile(name, "utf8"); - stats.readTime += stats.end(begin); - return text; + return await fs.promises.readFile(name, "utf8"); } catch (e) { return null; } @@ -1142,13 +1156,11 @@ export async function main(argv, options) { async function writeFileNode(filename, contents, baseDir) { try { - let begin = stats.begin(); stats.writeCount++; const dirPath = path.resolve(baseDir, path.dirname(filename)); const filePath = path.join(dirPath, path.basename(filename)); await fs.promises.mkdir(dirPath, { recursive: true }); await fs.promises.writeFile(filePath, contents); - stats.writeTime += stats.end(begin); return true; } catch (e) { return false; @@ -1156,27 +1168,21 @@ export async function main(argv, options) { } async function listFilesNode(dirname, baseDir) { - var files; try { - let begin = stats.begin(); stats.readCount++; - files = (await fs.promises.readdir(path.join(baseDir, dirname))) + return (await fs.promises.readdir(path.join(baseDir, dirname))) .filter(file => extension.re_except_d.test(file)); - stats.readTime += stats.end(begin); - return files; } catch (e) { return null; } } function writeStdout(contents) { - let begin = stats.begin(); if (!writeStdout.used) { writeStdout.used = true; stats.writeCount++; } stdout.write(contents); - stats.writeTime += stats.end(begin); } } @@ -1273,9 +1279,7 @@ export function checkDiagnostics(program, stderr, reportDiagnostic) { } export class Stats { - readTime = 0; readCount = 0; - writeTime = 0; writeCount = 0; parseTime = 0; parseCount = 0; @@ -1298,33 +1302,26 @@ export class Stats { const hrtime = process.hrtime(begin); return hrtime[0] * 1e9 + hrtime[1]; } -} - -function pad(str, len) { - while (str.length < len) str = ` ${str}`; - return str; -} - -/** Formats a high resolution time to a human readable string. */ -export function formatTime(time) { - return time ? `${(time / 1e6).toFixed(3)} ms` : "n/a"; -} - -/** Formats and prints out the contents of a set of stats. */ -export function printStats(stats, output) { - const format = (time, count) => `${pad(formatTime(time), 12)} n=${count}`; - (output || process.stdout).write([ - "I/O Read : " + format(stats.readTime, stats.readCount), - "I/O Write : " + format(stats.writeTime, stats.writeCount), - "Parse : " + format(stats.parseTime, stats.parseCount), - "Initialize : " + format(stats.initializeTime, stats.initializeCount), - "Compile : " + format(stats.compileTime, stats.compileCount), - "Emit : " + format(stats.emitTime, stats.emitCount), - "Validate : " + format(stats.validateTime, stats.validateCount), - "Optimize : " + format(stats.optimizeTime, stats.optimizeCount), - "Transform : " + format(stats.transformTime, stats.transformCount), - "" - ].join(EOL) + EOL); + toString() { + const formatTime = time => time ? `${(time / 1e6).toFixed(3)} ms` : "n/a"; + const keys = Object.keys(this).filter(key => key.endsWith("Time")).map(key => key.substring(0, key.length - 4)); + const times = keys.map(key => formatTime(this[`${key}Time`])); + const counts = keys.map(key => this[`${key}Count`].toString()); + const keysLen = keys.reduce((current, key) => Math.max(key.length, current), 0); + const timesLen = times.reduce((current, time) => Math.max(time.length, current), 0); + const countsLen = counts.reduce((current, count) => Math.max(count.length, current), 0); + const totalLen = keysLen + timesLen + countsLen + 6; + const out = []; + out.push(`┌─${"─".repeat(keysLen)}─┬─${"─".repeat(timesLen)}─┬─${"─".repeat(countsLen)}─┐${EOL}`); + for (let i = 0, k = keys.length; i < k; ++i) { + out.push(`│ ${keys[i].padEnd(keysLen)} │ ${times[i].padStart(timesLen)} │ ${counts[i].padStart(countsLen)} │${EOL}`); + } + out.push(`├─${"─".repeat(keysLen)}─┴─${"─".repeat(timesLen)}─┴─${"─".repeat(countsLen)}─┤${EOL}`); + const readsWrites = `${this.readCount} reads, ${this.writeCount} writes`; + out.push(`│ ${readsWrites}${" ".repeat(totalLen - readsWrites.length)} │${EOL}`); + out.push(`└─${"─".repeat(totalLen)}─┘${EOL}`); + return out.join(""); + } } var allocBuffer = typeof global !== "undefined" && global.Buffer diff --git a/package.json b/package.json index 7bf75f4493..a236bd3a14 100644 --- a/package.json +++ b/package.json @@ -64,9 +64,9 @@ "lint": "eslint --max-warnings 0 --ext js . && eslint --max-warnings 0 --ext ts .", "build": "node scripts/build", "watch": "node scripts/build --watch", - "test": "npm run test:parser && npm run test:compiler && npm run test:browser && npm run test:packages && npm run test:extension && npm run test:asconfig", + "test": "npm run test:parser && npm run test:compiler --parallel && npm run test:browser && npm run test:packages && npm run test:extension && npm run test:asconfig", "test:parser": "node --enable-source-maps tests/parser", - "test:compiler": "node --enable-source-maps --experimental-wasi-unstable-preview1 --no-warnings tests/compiler --parallel", + "test:compiler": "node --enable-source-maps --experimental-wasi-unstable-preview1 --no-warnings tests/compiler", "test:browser": "node --enable-source-maps tests/browser", "test:packages": "cd tests/packages && npm run test", "test:extension": "cd tests/extension && npm run test", From 502d1b9a3d7be91a261ba4de4f3207047255af43 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Nov 2021 18:19:21 +0100 Subject: [PATCH 075/175] fix --- cli/index.d.ts | 9 --------- tests/compiler.js | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/cli/index.d.ts b/cli/index.d.ts index bec2f96004..5c74a93d87 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -248,15 +248,6 @@ export class Stats { end(begin: number): number; } -/** Measures the execution time of the specified function. */ -export function measure(fn: () => void): number; - -/** Formats a high resolution time to a human readable string. */ -export function formatTime(time: number): string; - -/** Formats and prints out the contents of a set of stats. */ -export function printStats(stats: Stats, output: OutputStream): void; - /** Creates a memory stream that can be used in place of stdout/stderr. */ export function createMemoryStream(fn?: (chunk: Uint8Array | string) => void): MemoryStream; diff --git a/tests/compiler.js b/tests/compiler.js index 7a1699edf6..b0b7f1c8c1 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -94,7 +94,7 @@ function section(title) { title, end(code) { const hrtime = process.hrtime(start); - const time = asc.formatTime(hrtime[0] * 1e9 + hrtime[1]); + const time = `${(hrtime[0] * 1e9 + hrtime[1] / 1e6).toFixed(3)} ms`; switch (code) { case SUCCESS: console.log(" " + colors.green("SUCCESS") + " (" + time + ")\n"); break; default: console.log(" " + colors.red("FAILURE") + " (" + time + ")\n"); break; From 395f4a9a433ba47f5a204c7b7bf9bfd09d936743 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Nov 2021 23:13:47 +0100 Subject: [PATCH 076/175] drawing boxes --- cli/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cli/index.js b/cli/index.js index 792cc5d71d..8d0bc889eb 100644 --- a/cli/index.js +++ b/cli/index.js @@ -1312,14 +1312,17 @@ export class Stats { const countsLen = counts.reduce((current, count) => Math.max(count.length, current), 0); const totalLen = keysLen + timesLen + countsLen + 6; const out = []; - out.push(`┌─${"─".repeat(keysLen)}─┬─${"─".repeat(timesLen)}─┬─${"─".repeat(countsLen)}─┐${EOL}`); + out.push(`╭─${"─".repeat(totalLen)}─╮${EOL}`); + const header = `Stats`; + out.push(`│ ${header}${" ".repeat(totalLen - header.length)} │${EOL}`); + out.push(`╞═${"═".repeat(keysLen)}═╤═${"═".repeat(timesLen)}═╤═${"═".repeat(countsLen)}═╡${EOL}`); for (let i = 0, k = keys.length; i < k; ++i) { out.push(`│ ${keys[i].padEnd(keysLen)} │ ${times[i].padStart(timesLen)} │ ${counts[i].padStart(countsLen)} │${EOL}`); } out.push(`├─${"─".repeat(keysLen)}─┴─${"─".repeat(timesLen)}─┴─${"─".repeat(countsLen)}─┤${EOL}`); const readsWrites = `${this.readCount} reads, ${this.writeCount} writes`; out.push(`│ ${readsWrites}${" ".repeat(totalLen - readsWrites.length)} │${EOL}`); - out.push(`└─${"─".repeat(totalLen)}─┘${EOL}`); + out.push(`╰─${"─".repeat(totalLen)}─╯${EOL}`); return out.join(""); } } From 3d071a9b538be46276e1d2c38b37973f305f8bc0 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 1 Dec 2021 01:10:55 +0100 Subject: [PATCH 077/175] update dts --- cli/index.d.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cli/index.d.ts b/cli/index.d.ts index 5c74a93d87..3cd1810220 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -214,12 +214,8 @@ export function checkDiagnostics(emitter: Record, stderr?: Outpu /** Statistics for the current task. */ export class Stats { - /** Time taken reading files. */ - readTime: number; /** Number of files read. */ readCount: number; - /** Time taken writing files. */ - writeTime: number; /** Number of files written. */ writeCount: number; /** Time taken to parse files. */ @@ -246,6 +242,8 @@ export class Stats { begin(): number; /** Ends measuring execution time since `begin`. */ end(begin: number): number; + /** Returns a string representation. */ + toString(): string; } /** Creates a memory stream that can be used in place of stdout/stderr. */ From b96f9d31a6768ca7a1bcdd36936400c501e030ec Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 1 Dec 2021 22:41:56 +0100 Subject: [PATCH 078/175] remove dead rc tests --- tests/compiler/rc/global-init.optimized.wat | 7 - tests/compiler/rc/global-init.untouched.wat | 893 ----- tests/compiler/rc/local-init.optimized.wat | 1022 ------ tests/compiler/rc/local-init.untouched.wat | 1724 --------- .../rc/logical-and-mismatch.optimized.wat | 1065 ------ .../rc/logical-and-mismatch.untouched.wat | 1764 --------- .../rc/logical-or-mismatch.optimized.wat | 1065 ------ .../rc/logical-or-mismatch.untouched.wat | 1764 --------- tests/compiler/rc/optimize.optimized.wat | 1356 ------- tests/compiler/rc/optimize.untouched.wat | 2016 ----------- tests/compiler/rc/rereturn.optimized.wat | 1557 -------- tests/compiler/rc/rereturn.untouched.wat | 3190 ----------------- .../rc/ternary-mismatch.optimized.wat | 1054 ------ .../rc/ternary-mismatch.untouched.wat | 1748 --------- 14 files changed, 20225 deletions(-) delete mode 100644 tests/compiler/rc/global-init.optimized.wat delete mode 100644 tests/compiler/rc/global-init.untouched.wat delete mode 100644 tests/compiler/rc/local-init.optimized.wat delete mode 100644 tests/compiler/rc/local-init.untouched.wat delete mode 100644 tests/compiler/rc/logical-and-mismatch.optimized.wat delete mode 100644 tests/compiler/rc/logical-and-mismatch.untouched.wat delete mode 100644 tests/compiler/rc/logical-or-mismatch.optimized.wat delete mode 100644 tests/compiler/rc/logical-or-mismatch.untouched.wat delete mode 100644 tests/compiler/rc/optimize.optimized.wat delete mode 100644 tests/compiler/rc/optimize.untouched.wat delete mode 100644 tests/compiler/rc/rereturn.optimized.wat delete mode 100644 tests/compiler/rc/rereturn.untouched.wat delete mode 100644 tests/compiler/rc/ternary-mismatch.optimized.wat delete mode 100644 tests/compiler/rc/ternary-mismatch.untouched.wat diff --git a/tests/compiler/rc/global-init.optimized.wat b/tests/compiler/rc/global-init.optimized.wat deleted file mode 100644 index 61764a130e..0000000000 --- a/tests/compiler/rc/global-init.optimized.wat +++ /dev/null @@ -1,7 +0,0 @@ -(module - (memory $0 1) - (data (i32.const 1036) "\1c\00\00\00\01\00\00\00\00\00\00\00\01") - (data (i32.const 1068) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s") - (data (i32.const 1132) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (export "memory" (memory $0)) -) diff --git a/tests/compiler/rc/global-init.untouched.wat b/tests/compiler/rc/global-init.untouched.wat deleted file mode 100644 index eeab740011..0000000000 --- a/tests/compiler/rc/global-init.untouched.wat +++ /dev/null @@ -1,893 +0,0 @@ -(module - (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_none (func (param i32))) - (type $none_=>_none (func)) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 12) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 44) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 108) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (table $0 1 funcref) - (global $rc/global-init/a (mut i32) (i32.const 0)) - (global $rc/global-init/b (mut i32) (i32.const 0)) - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/__heap_base i32 (i32.const 172)) - (export "memory" (memory $0)) - (start $~start) - (func $rc/global-init/getRef (result i32) - i32.const 32 - ) - (func $~lib/rt/pure/increment (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - i32.eq - i32.eqz - if - i32.const 0 - i32.const 64 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 64 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/increment - end - local.get $0 - ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $start:rc/global-init - (local $0 i32) - (local $1 i32) - call $rc/global-init/getRef - global.set $rc/global-init/a - call $rc/global-init/getRef - global.set $rc/global-init/b - i32.const 0 - local.tee $0 - global.get $rc/global-init/a - local.tee $1 - i32.ne - if - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - end - local.get $0 - global.set $rc/global-init/a - i32.const 0 - local.tee $1 - global.get $rc/global-init/b - local.tee $0 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - end - local.get $1 - global.set $rc/global-init/b - ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 - i32.load - local.set $2 - i32.const 1 - drop - local.get $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 272 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $3 - i32.const 1 - drop - local.get $3 - i32.const 12 - i32.ge_u - if (result i32) - local.get $3 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 274 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $4 - local.get $3 - i32.const 4 - i32.shr_u - local.set $5 - else - i32.const 31 - local.get $3 - i32.clz - i32.sub - local.set $4 - local.get $3 - local.get $4 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $5 - local.get $4 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $4 - end - i32.const 1 - drop - local.get $4 - i32.const 23 - i32.lt_u - if (result i32) - local.get $5 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 287 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=4 - local.set $6 - local.get $1 - i32.load offset=8 - local.set $7 - local.get $6 - if - local.get $6 - local.get $7 - i32.store offset=8 - end - local.get $7 - if - local.get $7 - local.get $6 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $9 - local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - i32.eq - if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $9 - local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 - local.get $7 - i32.eqz - if - local.get $0 - local.set $9 - local.get $4 - local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 - local.get $0 - local.set $8 - local.get $4 - local.set $11 - local.get $9 - i32.const 1 - local.get $5 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $9 - local.set $10 - local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $4 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - i32.const 1 - drop - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 200 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - local.set $2 - i32.const 1 - drop - local.get $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 202 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.set $3 - local.get $3 - i32.const 4 - i32.add - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - local.get $5 - i32.const 1 - i32.and - if - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.add - local.get $5 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $3 - local.get $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $4 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 - i32.const 3 - i32.and - local.get $3 - i32.or - local.tee $2 - i32.store - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.add - local.get $6 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - end - end - local.get $2 - i32.const 2 - i32.and - if - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub - i32.load - local.set $6 - local.get $6 - i32.load - local.set $3 - i32.const 1 - drop - local.get $3 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 223 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.add - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $7 - local.get $7 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $6 - call $~lib/rt/tlsf/removeBlock - local.get $6 - local.get $3 - i32.const 3 - i32.and - local.get $7 - i32.or - local.tee $2 - i32.store - local.get $6 - local.set $1 - end - end - local.get $4 - local.get $5 - i32.const 2 - i32.or - i32.store - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $8 - i32.const 1 - drop - local.get $8 - i32.const 12 - i32.ge_u - if (result i32) - local.get $8 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 238 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - drop - local.get $1 - i32.const 4 - i32.add - local.get $8 - i32.add - local.get $4 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 239 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $8 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $9 - local.get $8 - i32.const 4 - i32.shr_u - local.set $10 - else - i32.const 31 - local.get $8 - i32.clz - i32.sub - local.set $9 - local.get $8 - local.get $9 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $10 - local.get $9 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $9 - end - i32.const 1 - drop - local.get $9 - i32.const 23 - i32.lt_u - if (result i32) - local.get $10 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 255 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $7 - local.get $9 - local.set $3 - local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $11 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $11 - i32.store offset=8 - local.get $11 - if - local.get $11 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.set $12 - local.get $9 - local.set $7 - local.get $10 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $9 - i32.shl - i32.or - i32.store - local.get $0 - local.set $13 - local.get $9 - local.set $12 - local.get $0 - local.set $3 - local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const 1 - local.get $10 - i32.shl - i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 - ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - i32.const 0 - drop - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/pure/finalize (param $0 i32) - i32.const 0 - drop - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/freeBlock - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.and - local.set $2 - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 64 - i32.const 122 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.eq - if - local.get $0 - i32.const 20 - i32.add - i32.const 1 - call $~lib/rt/__visit_members - i32.const 1 - drop - i32.const 1 - drop - local.get $1 - i32.const -2147483648 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 64 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/finalize - else - i32.const 1 - drop - local.get $2 - i32.const 0 - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 64 - i32.const 136 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - drop - local.get $0 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.const 1 - i32.sub - i32.or - i32.store offset=4 - end - ) - (func $~start - call $start:rc/global-init - ) - (func $~lib/rt/pure/__visit (param $0 i32) (param $1 i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.lt_u - if - return - end - i32.const 1 - drop - i32.const 1 - drop - local.get $1 - i32.const 1 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 64 - i32.const 69 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - ) - (func $~lib/arraybuffer/ArrayBuffer~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/string/String~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/pure/__visit - end - ) - (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) - block $invalid - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $invalid - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBuffer~visit - return - end - local.get $0 - local.get $1 - call $~lib/string/String~visit - return - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit - return - end - unreachable - ) -) diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat deleted file mode 100644 index 8b7010d3f2..0000000000 --- a/tests/compiler/rc/local-init.optimized.wat +++ /dev/null @@ -1,1022 +0,0 @@ -(module - (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 1036) "\1c\00\00\00\01\00\00\00\00\00\00\00\01") - (data (i32.const 1068) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1132) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s") - (data (i32.const 1196) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (start $~start) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.tee $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1216 - i32.const 272 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and - local.tee $2 - i32.const 1073741820 - i32.lt_u - i32.const 0 - local.get $2 - i32.const 12 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 1216 - i32.const 274 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 256 - i32.lt_u - if - local.get $2 - i32.const 4 - i32.shr_u - local.set $2 - else - local.get $2 - i32.const 31 - local.get $2 - i32.clz - i32.sub - local.tee $3 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $2 - local.get $3 - i32.const 7 - i32.sub - local.set $3 - end - local.get $2 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1216 - i32.const 287 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - local.set $4 - local.get $1 - i32.load offset=4 - local.tee $5 - if - local.get $5 - local.get $4 - i32.store offset=8 - end - local.get $4 - if - local.get $4 - local.get $5 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.get $2 - local.get $3 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - i32.eq - if - local.get $0 - local.get $2 - local.get $3 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.store offset=96 - local.get $4 - i32.eqz - if - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.tee $4 - i32.load offset=4 - i32.const -2 - local.get $2 - i32.rotl - i32.and - local.set $1 - local.get $4 - local.get $1 - i32.store offset=4 - local.get $1 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const -2 - local.get $3 - i32.rotl - i32.and - i32.store - end - end - end - ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 1216 - i32.const 200 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - local.tee $4 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1216 - i32.const 202 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $5 - i32.load - local.tee $2 - i32.const 1 - i32.and - if - local.get $4 - i32.const -4 - i32.and - i32.const 4 - i32.add - local.get $2 - i32.const -4 - i32.and - i32.add - local.tee $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $5 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $3 - local.get $4 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $5 - i32.load - local.set $2 - end - end - local.get $4 - i32.const 2 - i32.and - if - local.get $1 - i32.const 4 - i32.sub - i32.load - local.tee $3 - i32.load - local.tee $7 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1216 - i32.const 223 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $7 - i32.const -4 - i32.and - i32.const 4 - i32.add - local.get $4 - i32.const -4 - i32.and - i32.add - local.tee $8 - i32.const 1073741820 - i32.lt_u - if (result i32) - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $3 - local.get $8 - local.get $7 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $3 - else - local.get $1 - end - local.set $1 - end - local.get $5 - local.get $2 - i32.const 2 - i32.or - i32.store - local.get $4 - i32.const -4 - i32.and - local.tee $3 - i32.const 1073741820 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 12 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 1216 - i32.const 238 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 4 - i32.add - i32.add - local.get $5 - i32.ne - if - i32.const 0 - i32.const 1216 - i32.const 239 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 256 - i32.lt_u - if - local.get $3 - i32.const 4 - i32.shr_u - local.set $3 - else - local.get $3 - i32.const 31 - local.get $3 - i32.clz - i32.sub - local.tee $4 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $3 - local.get $4 - i32.const 7 - i32.sub - local.set $6 - end - local.get $3 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $6 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1216 - i32.const 255 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $4 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $4 - i32.store offset=8 - local.get $4 - if - local.get $4 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $3 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $1 - i32.store offset=96 - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $6 - i32.shl - i32.or - i32.store - local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 - local.get $0 - i32.load offset=4 - i32.const 1 - local.get $3 - i32.shl - i32.or - i32.store offset=4 - ) - (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $2 - i32.gt_u - if - i32.const 0 - i32.const 1216 - i32.const 380 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 19 - i32.add - i32.const -16 - i32.and - i32.const 4 - i32.sub - local.set $1 - local.get $2 - i32.const -16 - i32.and - local.get $0 - i32.load offset=1568 - local.tee $2 - if - local.get $1 - local.get $2 - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 1216 - i32.const 387 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i32.const 16 - i32.sub - i32.eq - if - local.get $2 - i32.load - local.set $4 - local.get $1 - i32.const 16 - i32.sub - local.set $1 - end - else - local.get $1 - local.get $0 - i32.const 1572 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 1216 - i32.const 400 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - end - local.get $1 - i32.sub - local.tee $2 - i32.const 20 - i32.lt_u - if - return - end - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - i32.const 1 - i32.or - i32.or - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $2 - i32.const 2 - i32.store - local.get $0 - local.get $2 - i32.store offset=1568 - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - i32.const -2 - i32.and - local.tee $2 - if (result i32) - local.get $0 - local.get $2 - i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - else - local.get $0 - i32.load - i32.const -2 - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $1 - i32.ctz - local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.tee $2 - i32.eqz - if - i32.const 0 - i32.const 1216 - i32.const 346 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - else - i32.const 0 - end - end - ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 4 - memory.size - local.tee $2 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - local.get $0 - i32.load offset=1568 - i32.ne - i32.shl - i32.const 65563 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.set $1 - local.get $2 - local.get $1 - local.get $1 - local.get $2 - i32.lt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - local.get $0 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 1216 - i32.const 498 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - local.get $1 - i32.load - i32.const -4 - i32.and - i32.const 28 - i32.lt_u - if - i32.const 0 - i32.const 1216 - i32.const 500 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 28 - i32.sub - local.tee $3 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 28 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $2 - local.get $3 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $2 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 - ) - (func $~lib/rt/pure/__new (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - memory.size - local.tee $1 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $1 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1264 - i32.const 0 - i32.store - i32.const 2832 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $0 - i32.const 23 - i32.lt_u - if - local.get $0 - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $1 - loop $for-loop|1 - local.get $1 - i32.const 16 - i32.lt_u - if - local.get $1 - local.get $0 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=96 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|1 - end - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - i32.const 1264 - i32.const 2836 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1264 - global.set $~lib/rt/tlsf/ROOT - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.tee $2 - i32.const 268435455 - i32.and - local.set $1 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 1152 - i32.const 122 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.eq - if - block $__inlined_func$~lib/rt/__visit_members - block $invalid - block $~lib/arraybuffer/ArrayBufferView - local.get $0 - i32.const 12 - i32.add - i32.load - br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $~lib/arraybuffer/ArrayBufferView $__inlined_func$~lib/rt/__visit_members $invalid - end - local.get $0 - i32.load offset=20 - local.tee $1 - if - local.get $1 - i32.const 1260 - i32.ge_u - if - local.get $1 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - end - br $__inlined_func$~lib/rt/__visit_members - end - unreachable - end - local.get $2 - i32.const -2147483648 - i32.and - if - i32.const 0 - i32.const 1152 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 1152 - i32.const 136 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.sub - local.get $2 - i32.const -268435456 - i32.and - i32.or - i32.store offset=4 - end - ) - (func $~start - (local $0 i32) - (local $1 i32) - (local $2 i32) - call $~lib/rt/pure/__new - local.tee $0 - i32.const 1260 - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 1152 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 1152 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - end - local.get $0 - i32.const 1260 - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) -) diff --git a/tests/compiler/rc/local-init.untouched.wat b/tests/compiler/rc/local-init.untouched.wat deleted file mode 100644 index 5d93529efb..0000000000 --- a/tests/compiler/rc/local-init.untouched.wat +++ /dev/null @@ -1,1724 +0,0 @@ -(module - (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_=>_none (func (param i32))) - (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 12) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 44) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") - (data (i32.const 108) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 172) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (table $0 1 funcref) - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/memory/__heap_base i32 (i32.const 236)) - (export "memory" (memory $0)) - (start $~start) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $rc/local-init/getRef (result i32) - i32.const 32 - ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 - i32.load - local.set $2 - i32.const 1 - drop - local.get $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 272 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $3 - i32.const 1 - drop - local.get $3 - i32.const 12 - i32.ge_u - if (result i32) - local.get $3 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 274 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $4 - local.get $3 - i32.const 4 - i32.shr_u - local.set $5 - else - i32.const 31 - local.get $3 - i32.clz - i32.sub - local.set $4 - local.get $3 - local.get $4 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $5 - local.get $4 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $4 - end - i32.const 1 - drop - local.get $4 - i32.const 23 - i32.lt_u - if (result i32) - local.get $5 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 287 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=4 - local.set $6 - local.get $1 - i32.load offset=8 - local.set $7 - local.get $6 - if - local.get $6 - local.get $7 - i32.store offset=8 - end - local.get $7 - if - local.get $7 - local.get $6 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $9 - local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - i32.eq - if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $9 - local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 - local.get $7 - i32.eqz - if - local.get $0 - local.set $9 - local.get $4 - local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 - local.get $0 - local.set $8 - local.get $4 - local.set $11 - local.get $9 - i32.const 1 - local.get $5 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $9 - local.set $10 - local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $4 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - i32.const 1 - drop - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 200 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - local.set $2 - i32.const 1 - drop - local.get $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 202 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.set $3 - local.get $3 - i32.const 4 - i32.add - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - local.get $5 - i32.const 1 - i32.and - if - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.add - local.get $5 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $3 - local.get $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $4 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 - i32.const 3 - i32.and - local.get $3 - i32.or - local.tee $2 - i32.store - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.add - local.get $6 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - end - end - local.get $2 - i32.const 2 - i32.and - if - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub - i32.load - local.set $6 - local.get $6 - i32.load - local.set $3 - i32.const 1 - drop - local.get $3 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 223 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.add - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $7 - local.get $7 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $6 - call $~lib/rt/tlsf/removeBlock - local.get $6 - local.get $3 - i32.const 3 - i32.and - local.get $7 - i32.or - local.tee $2 - i32.store - local.get $6 - local.set $1 - end - end - local.get $4 - local.get $5 - i32.const 2 - i32.or - i32.store - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $8 - i32.const 1 - drop - local.get $8 - i32.const 12 - i32.ge_u - if (result i32) - local.get $8 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 238 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - drop - local.get $1 - i32.const 4 - i32.add - local.get $8 - i32.add - local.get $4 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 239 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $8 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $9 - local.get $8 - i32.const 4 - i32.shr_u - local.set $10 - else - i32.const 31 - local.get $8 - i32.clz - i32.sub - local.set $9 - local.get $8 - local.get $9 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $10 - local.get $9 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $9 - end - i32.const 1 - drop - local.get $9 - i32.const 23 - i32.lt_u - if (result i32) - local.get $10 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 255 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $7 - local.get $9 - local.set $3 - local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $11 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $11 - i32.store offset=8 - local.get $11 - if - local.get $11 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.set $12 - local.get $9 - local.set $7 - local.get $10 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $9 - i32.shl - i32.or - i32.store - local.get $0 - local.set $13 - local.get $9 - local.set $12 - local.get $0 - local.set $3 - local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const 1 - local.get $10 - i32.shl - i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 - ) - (func $~lib/rt/tlsf/addMemory (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) - (local $9 i32) - i32.const 1 - drop - local.get $1 - local.get $2 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 380 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 4 - i32.add - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.sub - local.set $1 - local.get $2 - i32.const 15 - i32.const -1 - i32.xor - i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 - i32.const 0 - local.set $5 - local.get $4 - if - i32.const 1 - drop - local.get $1 - local.get $4 - i32.const 4 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 387 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 16 - i32.sub - local.get $4 - i32.eq - if - local.get $1 - i32.const 16 - i32.sub - local.set $1 - local.get $4 - i32.load - local.set $5 - else - nop - end - else - i32.const 1 - drop - local.get $1 - local.get $0 - i32.const 1572 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 400 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.set $6 - local.get $6 - i32.const 4 - i32.const 12 - i32.add - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - return - end - local.get $6 - i32.const 2 - i32.const 4 - i32.mul - i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 - i32.const 1 - i32.or - local.get $5 - i32.const 2 - i32.and - i32.or - i32.store - local.get $8 - i32.const 0 - i32.store offset=4 - local.get $8 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 4 - i32.add - local.get $7 - i32.add - local.set $4 - local.get $4 - i32.const 0 - i32.const 2 - i32.or - i32.store - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 - i32.store offset=1568 - local.get $0 - local.get $8 - call $~lib/rt/tlsf/insertBlock - i32.const 1 - ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - global.get $~lib/memory/__heap_base - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - local.set $0 - memory.size - local.set $1 - local.get $0 - i32.const 1572 - i32.add - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $2 - local.get $1 - i32.gt_s - if (result i32) - local.get $2 - local.get $1 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - local.get $0 - local.set $3 - local.get $3 - i32.const 0 - i32.store - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - i32.const 23 - i32.lt_u - local.set $4 - local.get $4 - if - local.get $3 - local.set $8 - local.get $5 - local.set $7 - i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 - i32.const 0 - local.set $8 - loop $for-loop|1 - local.get $8 - i32.const 16 - i32.lt_u - local.set $7 - local.get $7 - if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 - i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|1 - end - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $0 - i32.const 1572 - i32.add - local.set $12 - i32.const 0 - drop - local.get $3 - local.get $12 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - drop - local.get $3 - global.set $~lib/rt/tlsf/ROOT - ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 - i32.const 12 - i32.le_u - if (result i32) - i32.const 12 - else - local.get $0 - i32.const 4 - i32.add - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.sub - end - ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 - i32.const 1073741820 - i32.ge_u - if - i32.const 64 - i32.const 192 - i32.const 461 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/tlsf/computeSize - ) - (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $1 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $2 - local.get $1 - i32.const 4 - i32.shr_u - local.set $3 - else - local.get $1 - i32.const 536870910 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - else - local.get $1 - end - local.set $4 - i32.const 31 - local.get $4 - i32.clz - i32.sub - local.set $2 - local.get $4 - local.get $2 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $3 - local.get $2 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $2 - end - i32.const 1 - drop - local.get $2 - i32.const 23 - i32.lt_u - if (result i32) - local.get $3 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 333 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const 0 - i32.const -1 - i32.xor - local.get $3 - i32.shl - i32.and - local.set $6 - i32.const 0 - local.set $7 - local.get $6 - i32.eqz - if - local.get $0 - i32.load - i32.const 0 - i32.const -1 - i32.xor - local.get $2 - i32.const 1 - i32.add - i32.shl - i32.and - local.set $5 - local.get $5 - i32.eqz - if - i32.const 0 - local.set $7 - else - local.get $5 - i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 - i32.const 1 - drop - local.get $6 - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 346 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 - i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 - end - else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 - i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 - end - local.get $7 - ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - i32.const 0 - drop - local.get $1 - i32.const 536870910 - i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.set $1 - end - memory.size - local.set $2 - local.get $1 - i32.const 4 - local.get $2 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 - i32.ne - i32.shl - i32.add - local.set $1 - local.get $1 - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - local.set $6 - local.get $6 - memory.grow - i32.const 0 - i32.lt_s - if - local.get $4 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - memory.size - local.set $7 - local.get $0 - local.get $2 - i32.const 16 - i32.shl - local.get $7 - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - drop - ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.set $3 - i32.const 1 - drop - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.sub - local.set $4 - local.get $4 - i32.const 4 - i32.const 12 - i32.add - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $2 - i32.add - local.set $5 - local.get $5 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $5 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const 1 - i32.const -1 - i32.xor - i32.and - i32.store - local.get $1 - local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.get $1 - local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - i32.load - i32.const 2 - i32.const -1 - i32.xor - i32.and - i32.store - end - ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 - i32.eqz - if - local.get $0 - local.get $2 - call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - i32.const 1 - drop - local.get $3 - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 498 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - i32.const 1 - drop - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 500 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 - call $~lib/rt/tlsf/prepareBlock - i32.const 0 - drop - local.get $3 - ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - ) - (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741804 - i32.gt_u - if - i32.const 64 - i32.const 128 - i32.const 275 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - i32.const 16 - local.get $0 - i32.add - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $2 - i32.const 4 - i32.sub - local.set $3 - local.get $3 - i32.const 0 - i32.store offset=4 - local.get $3 - i32.const 0 - i32.store offset=8 - local.get $3 - local.get $1 - i32.store offset=12 - local.get $3 - local.get $0 - i32.store offset=16 - local.get $2 - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/increment (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - i32.eq - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/increment - end - local.get $0 - ) - (func $rc/local-init/Ref#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 3 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - ) - (func $start:rc/local-init - (local $0 i32) - i32.const 32 - local.set $0 - local.get $0 - call $~lib/rt/pure/__release - call $rc/local-init/getRef - local.set $0 - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - call $rc/local-init/Ref#constructor - local.set $0 - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - i32.const 0 - drop - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/pure/finalize (param $0 i32) - i32.const 0 - drop - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/freeBlock - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.and - local.set $2 - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 122 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.eq - if - local.get $0 - i32.const 20 - i32.add - i32.const 1 - call $~lib/rt/__visit_members - i32.const 1 - drop - i32.const 1 - drop - local.get $1 - i32.const -2147483648 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/finalize - else - i32.const 1 - drop - local.get $2 - i32.const 0 - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 136 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - drop - local.get $0 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.const 1 - i32.sub - i32.or - i32.store offset=4 - end - ) - (func $~start - call $start:rc/local-init - ) - (func $~lib/rt/pure/__visit (param $0 i32) (param $1 i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.lt_u - if - return - end - i32.const 1 - drop - i32.const 1 - drop - local.get $1 - i32.const 1 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 128 - i32.const 69 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - ) - (func $~lib/arraybuffer/ArrayBuffer~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/string/String~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/pure/__visit - end - ) - (func $rc/local-init/Ref~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) - block $invalid - block $rc/local-init/Ref - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $rc/local-init/Ref $invalid - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBuffer~visit - return - end - local.get $0 - local.get $1 - call $~lib/string/String~visit - return - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit - return - end - local.get $0 - local.get $1 - call $rc/local-init/Ref~visit - return - end - unreachable - ) -) diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat deleted file mode 100644 index e76fceb0c1..0000000000 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ /dev/null @@ -1,1065 +0,0 @@ -(module - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 1036) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1100) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s") - (data (i32.const 1164) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $rc/logical-and-mismatch/gloRef (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (start $~start) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.tee $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 272 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and - local.tee $2 - i32.const 1073741820 - i32.lt_u - i32.const 0 - local.get $2 - i32.const 12 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 274 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 256 - i32.lt_u - if - local.get $2 - i32.const 4 - i32.shr_u - local.set $2 - else - local.get $2 - i32.const 31 - local.get $2 - i32.clz - i32.sub - local.tee $3 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $2 - local.get $3 - i32.const 7 - i32.sub - local.set $3 - end - local.get $2 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 287 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - local.set $4 - local.get $1 - i32.load offset=4 - local.tee $5 - if - local.get $5 - local.get $4 - i32.store offset=8 - end - local.get $4 - if - local.get $4 - local.get $5 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.get $2 - local.get $3 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - i32.eq - if - local.get $0 - local.get $2 - local.get $3 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.store offset=96 - local.get $4 - i32.eqz - if - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.tee $4 - i32.load offset=4 - i32.const -2 - local.get $2 - i32.rotl - i32.and - local.set $1 - local.get $4 - local.get $1 - i32.store offset=4 - local.get $1 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const -2 - local.get $3 - i32.rotl - i32.and - i32.store - end - end - end - ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 200 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - local.tee $4 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 202 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $5 - i32.load - local.tee $2 - i32.const 1 - i32.and - if - local.get $4 - i32.const -4 - i32.and - i32.const 4 - i32.add - local.get $2 - i32.const -4 - i32.and - i32.add - local.tee $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $5 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $3 - local.get $4 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $5 - i32.load - local.set $2 - end - end - local.get $4 - i32.const 2 - i32.and - if - local.get $1 - i32.const 4 - i32.sub - i32.load - local.tee $3 - i32.load - local.tee $7 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 223 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $7 - i32.const -4 - i32.and - i32.const 4 - i32.add - local.get $4 - i32.const -4 - i32.and - i32.add - local.tee $8 - i32.const 1073741820 - i32.lt_u - if (result i32) - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $3 - local.get $8 - local.get $7 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $3 - else - local.get $1 - end - local.set $1 - end - local.get $5 - local.get $2 - i32.const 2 - i32.or - i32.store - local.get $4 - i32.const -4 - i32.and - local.tee $3 - i32.const 1073741820 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 12 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 238 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 4 - i32.add - i32.add - local.get $5 - i32.ne - if - i32.const 0 - i32.const 1184 - i32.const 239 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 256 - i32.lt_u - if - local.get $3 - i32.const 4 - i32.shr_u - local.set $3 - else - local.get $3 - i32.const 31 - local.get $3 - i32.clz - i32.sub - local.tee $4 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $3 - local.get $4 - i32.const 7 - i32.sub - local.set $6 - end - local.get $3 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $6 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 255 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $4 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $4 - i32.store offset=8 - local.get $4 - if - local.get $4 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $3 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $1 - i32.store offset=96 - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $6 - i32.shl - i32.or - i32.store - local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 - local.get $0 - i32.load offset=4 - i32.const 1 - local.get $3 - i32.shl - i32.or - i32.store offset=4 - ) - (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $2 - i32.gt_u - if - i32.const 0 - i32.const 1184 - i32.const 380 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 19 - i32.add - i32.const -16 - i32.and - i32.const 4 - i32.sub - local.set $1 - local.get $2 - i32.const -16 - i32.and - local.get $0 - i32.load offset=1568 - local.tee $2 - if - local.get $1 - local.get $2 - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 1184 - i32.const 387 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i32.const 16 - i32.sub - i32.eq - if - local.get $2 - i32.load - local.set $4 - local.get $1 - i32.const 16 - i32.sub - local.set $1 - end - else - local.get $1 - local.get $0 - i32.const 1572 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 1184 - i32.const 400 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - end - local.get $1 - i32.sub - local.tee $2 - i32.const 20 - i32.lt_u - if - return - end - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - i32.const 1 - i32.or - i32.or - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $2 - i32.const 2 - i32.store - local.get $0 - local.get $2 - i32.store offset=1568 - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - i32.const -2 - i32.and - local.tee $2 - if (result i32) - local.get $0 - local.get $2 - i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - else - local.get $0 - i32.load - i32.const -2 - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $1 - i32.ctz - local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.tee $2 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 346 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - else - i32.const 0 - end - end - ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 4 - memory.size - local.tee $2 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - local.get $0 - i32.load offset=1568 - i32.ne - i32.shl - i32.const 65563 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.set $1 - local.get $2 - local.get $1 - local.get $1 - local.get $2 - i32.lt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - local.get $0 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 498 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - local.get $1 - i32.load - i32.const -4 - i32.and - i32.const 28 - i32.lt_u - if - i32.const 0 - i32.const 1184 - i32.const 500 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 28 - i32.sub - local.tee $3 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 28 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $2 - local.get $3 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $2 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 - ) - (func $~lib/rt/pure/__new (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - memory.size - local.tee $1 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $1 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1232 - i32.const 0 - i32.store - i32.const 2800 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $0 - i32.const 23 - i32.lt_u - if - local.get $0 - i32.const 2 - i32.shl - i32.const 1232 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $1 - loop $for-loop|1 - local.get $1 - i32.const 16 - i32.lt_u - if - local.get $1 - local.get $0 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1232 - i32.add - i32.const 0 - i32.store offset=96 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|1 - end - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - i32.const 1232 - i32.const 2804 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1232 - global.set $~lib/rt/tlsf/ROOT - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 1228 - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 1120 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 1120 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - end - local.get $0 - ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1228 - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.tee $2 - i32.const 268435455 - i32.and - local.set $1 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 1120 - i32.const 122 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.eq - if - block $__inlined_func$~lib/rt/__visit_members - block $invalid - block $~lib/arraybuffer/ArrayBufferView - local.get $0 - i32.const 12 - i32.add - i32.load - br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $~lib/arraybuffer/ArrayBufferView $__inlined_func$~lib/rt/__visit_members $invalid - end - local.get $0 - i32.load offset=20 - local.tee $1 - if - local.get $1 - i32.const 1228 - i32.ge_u - if - local.get $1 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - end - br $__inlined_func$~lib/rt/__visit_members - end - unreachable - end - local.get $2 - i32.const -2147483648 - i32.and - if - i32.const 0 - i32.const 1120 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 1120 - i32.const 136 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.sub - local.get $2 - i32.const -268435456 - i32.and - i32.or - i32.store offset=4 - end - ) - (func $~start - (local $0 i32) - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - global.set $rc/logical-and-mismatch/gloRef - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $0 - if (result i32) - local.get $0 - call $~lib/rt/pure/__release - global.get $rc/logical-and-mismatch/gloRef - call $~lib/rt/pure/__retain - else - local.get $0 - end - call $~lib/rt/pure/__release - global.get $rc/logical-and-mismatch/gloRef - local.tee $0 - if (result i32) - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - else - local.get $0 - call $~lib/rt/pure/__retain - end - call $~lib/rt/pure/__release - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $0 - if (result i32) - local.get $0 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - else - local.get $0 - end - call $~lib/rt/pure/__release - global.get $rc/logical-and-mismatch/gloRef - call $~lib/rt/pure/__release - ) -) diff --git a/tests/compiler/rc/logical-and-mismatch.untouched.wat b/tests/compiler/rc/logical-and-mismatch.untouched.wat deleted file mode 100644 index af09857aeb..0000000000 --- a/tests/compiler/rc/logical-and-mismatch.untouched.wat +++ /dev/null @@ -1,1764 +0,0 @@ -(module - (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_=>_none (func (param i32))) - (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 12) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") - (data (i32.const 76) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 140) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (table $0 1 funcref) - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $rc/logical-and-mismatch/gloRef (mut i32) (i32.const 0)) - (global $~lib/memory/__heap_base i32 (i32.const 204)) - (export "memory" (memory $0)) - (start $~start) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 - i32.load - local.set $2 - i32.const 1 - drop - local.get $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 272 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $3 - i32.const 1 - drop - local.get $3 - i32.const 12 - i32.ge_u - if (result i32) - local.get $3 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 274 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $4 - local.get $3 - i32.const 4 - i32.shr_u - local.set $5 - else - i32.const 31 - local.get $3 - i32.clz - i32.sub - local.set $4 - local.get $3 - local.get $4 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $5 - local.get $4 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $4 - end - i32.const 1 - drop - local.get $4 - i32.const 23 - i32.lt_u - if (result i32) - local.get $5 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 287 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=4 - local.set $6 - local.get $1 - i32.load offset=8 - local.set $7 - local.get $6 - if - local.get $6 - local.get $7 - i32.store offset=8 - end - local.get $7 - if - local.get $7 - local.get $6 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $9 - local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - i32.eq - if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $9 - local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 - local.get $7 - i32.eqz - if - local.get $0 - local.set $9 - local.get $4 - local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 - local.get $0 - local.set $8 - local.get $4 - local.set $11 - local.get $9 - i32.const 1 - local.get $5 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $9 - local.set $10 - local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $4 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - i32.const 1 - drop - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 200 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - local.set $2 - i32.const 1 - drop - local.get $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 202 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.set $3 - local.get $3 - i32.const 4 - i32.add - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - local.get $5 - i32.const 1 - i32.and - if - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.add - local.get $5 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $3 - local.get $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $4 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 - i32.const 3 - i32.and - local.get $3 - i32.or - local.tee $2 - i32.store - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.add - local.get $6 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - end - end - local.get $2 - i32.const 2 - i32.and - if - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub - i32.load - local.set $6 - local.get $6 - i32.load - local.set $3 - i32.const 1 - drop - local.get $3 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 223 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.add - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $7 - local.get $7 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $6 - call $~lib/rt/tlsf/removeBlock - local.get $6 - local.get $3 - i32.const 3 - i32.and - local.get $7 - i32.or - local.tee $2 - i32.store - local.get $6 - local.set $1 - end - end - local.get $4 - local.get $5 - i32.const 2 - i32.or - i32.store - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $8 - i32.const 1 - drop - local.get $8 - i32.const 12 - i32.ge_u - if (result i32) - local.get $8 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 238 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - drop - local.get $1 - i32.const 4 - i32.add - local.get $8 - i32.add - local.get $4 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 239 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $8 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $9 - local.get $8 - i32.const 4 - i32.shr_u - local.set $10 - else - i32.const 31 - local.get $8 - i32.clz - i32.sub - local.set $9 - local.get $8 - local.get $9 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $10 - local.get $9 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $9 - end - i32.const 1 - drop - local.get $9 - i32.const 23 - i32.lt_u - if (result i32) - local.get $10 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 255 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $7 - local.get $9 - local.set $3 - local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $11 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $11 - i32.store offset=8 - local.get $11 - if - local.get $11 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.set $12 - local.get $9 - local.set $7 - local.get $10 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $9 - i32.shl - i32.or - i32.store - local.get $0 - local.set $13 - local.get $9 - local.set $12 - local.get $0 - local.set $3 - local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const 1 - local.get $10 - i32.shl - i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 - ) - (func $~lib/rt/tlsf/addMemory (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) - (local $9 i32) - i32.const 1 - drop - local.get $1 - local.get $2 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 380 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 4 - i32.add - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.sub - local.set $1 - local.get $2 - i32.const 15 - i32.const -1 - i32.xor - i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 - i32.const 0 - local.set $5 - local.get $4 - if - i32.const 1 - drop - local.get $1 - local.get $4 - i32.const 4 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 387 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 16 - i32.sub - local.get $4 - i32.eq - if - local.get $1 - i32.const 16 - i32.sub - local.set $1 - local.get $4 - i32.load - local.set $5 - else - nop - end - else - i32.const 1 - drop - local.get $1 - local.get $0 - i32.const 1572 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 400 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.set $6 - local.get $6 - i32.const 4 - i32.const 12 - i32.add - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - return - end - local.get $6 - i32.const 2 - i32.const 4 - i32.mul - i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 - i32.const 1 - i32.or - local.get $5 - i32.const 2 - i32.and - i32.or - i32.store - local.get $8 - i32.const 0 - i32.store offset=4 - local.get $8 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 4 - i32.add - local.get $7 - i32.add - local.set $4 - local.get $4 - i32.const 0 - i32.const 2 - i32.or - i32.store - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 - i32.store offset=1568 - local.get $0 - local.get $8 - call $~lib/rt/tlsf/insertBlock - i32.const 1 - ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - global.get $~lib/memory/__heap_base - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - local.set $0 - memory.size - local.set $1 - local.get $0 - i32.const 1572 - i32.add - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $2 - local.get $1 - i32.gt_s - if (result i32) - local.get $2 - local.get $1 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - local.get $0 - local.set $3 - local.get $3 - i32.const 0 - i32.store - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - i32.const 23 - i32.lt_u - local.set $4 - local.get $4 - if - local.get $3 - local.set $8 - local.get $5 - local.set $7 - i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 - i32.const 0 - local.set $8 - loop $for-loop|1 - local.get $8 - i32.const 16 - i32.lt_u - local.set $7 - local.get $7 - if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 - i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|1 - end - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $0 - i32.const 1572 - i32.add - local.set $12 - i32.const 0 - drop - local.get $3 - local.get $12 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - drop - local.get $3 - global.set $~lib/rt/tlsf/ROOT - ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 - i32.const 12 - i32.le_u - if (result i32) - i32.const 12 - else - local.get $0 - i32.const 4 - i32.add - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.sub - end - ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 - i32.const 1073741820 - i32.ge_u - if - i32.const 32 - i32.const 160 - i32.const 461 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/tlsf/computeSize - ) - (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $1 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $2 - local.get $1 - i32.const 4 - i32.shr_u - local.set $3 - else - local.get $1 - i32.const 536870910 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - else - local.get $1 - end - local.set $4 - i32.const 31 - local.get $4 - i32.clz - i32.sub - local.set $2 - local.get $4 - local.get $2 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $3 - local.get $2 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $2 - end - i32.const 1 - drop - local.get $2 - i32.const 23 - i32.lt_u - if (result i32) - local.get $3 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 333 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const 0 - i32.const -1 - i32.xor - local.get $3 - i32.shl - i32.and - local.set $6 - i32.const 0 - local.set $7 - local.get $6 - i32.eqz - if - local.get $0 - i32.load - i32.const 0 - i32.const -1 - i32.xor - local.get $2 - i32.const 1 - i32.add - i32.shl - i32.and - local.set $5 - local.get $5 - i32.eqz - if - i32.const 0 - local.set $7 - else - local.get $5 - i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 - i32.const 1 - drop - local.get $6 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 346 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 - i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 - end - else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 - i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 - end - local.get $7 - ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - i32.const 0 - drop - local.get $1 - i32.const 536870910 - i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.set $1 - end - memory.size - local.set $2 - local.get $1 - i32.const 4 - local.get $2 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 - i32.ne - i32.shl - i32.add - local.set $1 - local.get $1 - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - local.set $6 - local.get $6 - memory.grow - i32.const 0 - i32.lt_s - if - local.get $4 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - memory.size - local.set $7 - local.get $0 - local.get $2 - i32.const 16 - i32.shl - local.get $7 - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - drop - ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.set $3 - i32.const 1 - drop - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.sub - local.set $4 - local.get $4 - i32.const 4 - i32.const 12 - i32.add - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $2 - i32.add - local.set $5 - local.get $5 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $5 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const 1 - i32.const -1 - i32.xor - i32.and - i32.store - local.get $1 - local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.get $1 - local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - i32.load - i32.const 2 - i32.const -1 - i32.xor - i32.and - i32.store - end - ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 - i32.eqz - if - local.get $0 - local.get $2 - call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - i32.const 1 - drop - local.get $3 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 498 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - i32.const 1 - drop - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 500 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 - call $~lib/rt/tlsf/prepareBlock - i32.const 0 - drop - local.get $3 - ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - ) - (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741804 - i32.gt_u - if - i32.const 32 - i32.const 96 - i32.const 275 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - i32.const 16 - local.get $0 - i32.add - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $2 - i32.const 4 - i32.sub - local.set $3 - local.get $3 - i32.const 0 - i32.store offset=4 - local.get $3 - i32.const 0 - i32.store offset=8 - local.get $3 - local.get $1 - i32.store offset=12 - local.get $3 - local.get $0 - i32.store offset=16 - local.get $2 - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/increment (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - i32.eq - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/increment - end - local.get $0 - ) - (func $rc/logical-and-mismatch/Ref#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 3 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - ) - (func $rc/logical-and-mismatch/getRef (result i32) - i32.const 0 - call $rc/logical-and-mismatch/Ref#constructor - ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $start:rc/logical-and-mismatch - (local $0 i32) - i32.const 0 - call $rc/logical-and-mismatch/Ref#constructor - global.set $rc/logical-and-mismatch/gloRef - call $rc/logical-and-mismatch/getRef - local.tee $0 - if (result i32) - local.get $0 - call $~lib/rt/pure/__release - global.get $rc/logical-and-mismatch/gloRef - call $~lib/rt/pure/__retain - else - local.get $0 - end - local.set $0 - local.get $0 - call $~lib/rt/pure/__release - global.get $rc/logical-and-mismatch/gloRef - local.tee $0 - if (result i32) - call $rc/logical-and-mismatch/getRef - else - local.get $0 - call $~lib/rt/pure/__retain - end - local.set $0 - local.get $0 - call $~lib/rt/pure/__release - call $rc/logical-and-mismatch/getRef - local.tee $0 - if (result i32) - local.get $0 - call $~lib/rt/pure/__release - call $rc/logical-and-mismatch/getRef - else - local.get $0 - end - local.set $0 - local.get $0 - call $~lib/rt/pure/__release - global.get $rc/logical-and-mismatch/gloRef - local.tee $0 - if (result i32) - global.get $rc/logical-and-mismatch/gloRef - else - local.get $0 - end - call $~lib/rt/pure/__retain - local.set $0 - local.get $0 - call $~lib/rt/pure/__release - global.get $rc/logical-and-mismatch/gloRef - call $~lib/rt/pure/__release - ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - i32.const 0 - drop - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/pure/finalize (param $0 i32) - i32.const 0 - drop - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/freeBlock - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.and - local.set $2 - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 122 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.eq - if - local.get $0 - i32.const 20 - i32.add - i32.const 1 - call $~lib/rt/__visit_members - i32.const 1 - drop - i32.const 1 - drop - local.get $1 - i32.const -2147483648 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/finalize - else - i32.const 1 - drop - local.get $2 - i32.const 0 - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 136 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - drop - local.get $0 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.const 1 - i32.sub - i32.or - i32.store offset=4 - end - ) - (func $~start - call $start:rc/logical-and-mismatch - ) - (func $~lib/rt/pure/__visit (param $0 i32) (param $1 i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.lt_u - if - return - end - i32.const 1 - drop - i32.const 1 - drop - local.get $1 - i32.const 1 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 69 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - ) - (func $~lib/arraybuffer/ArrayBuffer~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/string/String~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/pure/__visit - end - ) - (func $rc/logical-and-mismatch/Ref~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) - block $invalid - block $rc/logical-and-mismatch/Ref - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $rc/logical-and-mismatch/Ref $invalid - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBuffer~visit - return - end - local.get $0 - local.get $1 - call $~lib/string/String~visit - return - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit - return - end - local.get $0 - local.get $1 - call $rc/logical-and-mismatch/Ref~visit - return - end - unreachable - ) -) diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat deleted file mode 100644 index 63848023ea..0000000000 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ /dev/null @@ -1,1065 +0,0 @@ -(module - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 1036) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1100) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s") - (data (i32.const 1164) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $rc/logical-or-mismatch/gloRef (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (start $~start) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.tee $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 272 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and - local.tee $2 - i32.const 1073741820 - i32.lt_u - i32.const 0 - local.get $2 - i32.const 12 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 274 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 256 - i32.lt_u - if - local.get $2 - i32.const 4 - i32.shr_u - local.set $2 - else - local.get $2 - i32.const 31 - local.get $2 - i32.clz - i32.sub - local.tee $3 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $2 - local.get $3 - i32.const 7 - i32.sub - local.set $3 - end - local.get $2 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 287 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - local.set $4 - local.get $1 - i32.load offset=4 - local.tee $5 - if - local.get $5 - local.get $4 - i32.store offset=8 - end - local.get $4 - if - local.get $4 - local.get $5 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.get $2 - local.get $3 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - i32.eq - if - local.get $0 - local.get $2 - local.get $3 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.store offset=96 - local.get $4 - i32.eqz - if - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.tee $4 - i32.load offset=4 - i32.const -2 - local.get $2 - i32.rotl - i32.and - local.set $1 - local.get $4 - local.get $1 - i32.store offset=4 - local.get $1 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const -2 - local.get $3 - i32.rotl - i32.and - i32.store - end - end - end - ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 200 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - local.tee $4 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 202 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $5 - i32.load - local.tee $2 - i32.const 1 - i32.and - if - local.get $4 - i32.const -4 - i32.and - i32.const 4 - i32.add - local.get $2 - i32.const -4 - i32.and - i32.add - local.tee $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $5 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $3 - local.get $4 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $5 - i32.load - local.set $2 - end - end - local.get $4 - i32.const 2 - i32.and - if - local.get $1 - i32.const 4 - i32.sub - i32.load - local.tee $3 - i32.load - local.tee $7 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 223 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $7 - i32.const -4 - i32.and - i32.const 4 - i32.add - local.get $4 - i32.const -4 - i32.and - i32.add - local.tee $8 - i32.const 1073741820 - i32.lt_u - if (result i32) - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $3 - local.get $8 - local.get $7 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $3 - else - local.get $1 - end - local.set $1 - end - local.get $5 - local.get $2 - i32.const 2 - i32.or - i32.store - local.get $4 - i32.const -4 - i32.and - local.tee $3 - i32.const 1073741820 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 12 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 238 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 4 - i32.add - i32.add - local.get $5 - i32.ne - if - i32.const 0 - i32.const 1184 - i32.const 239 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 256 - i32.lt_u - if - local.get $3 - i32.const 4 - i32.shr_u - local.set $3 - else - local.get $3 - i32.const 31 - local.get $3 - i32.clz - i32.sub - local.tee $4 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $3 - local.get $4 - i32.const 7 - i32.sub - local.set $6 - end - local.get $3 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $6 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 255 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $4 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $4 - i32.store offset=8 - local.get $4 - if - local.get $4 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $3 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $1 - i32.store offset=96 - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $6 - i32.shl - i32.or - i32.store - local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 - local.get $0 - i32.load offset=4 - i32.const 1 - local.get $3 - i32.shl - i32.or - i32.store offset=4 - ) - (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $2 - i32.gt_u - if - i32.const 0 - i32.const 1184 - i32.const 380 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 19 - i32.add - i32.const -16 - i32.and - i32.const 4 - i32.sub - local.set $1 - local.get $2 - i32.const -16 - i32.and - local.get $0 - i32.load offset=1568 - local.tee $2 - if - local.get $1 - local.get $2 - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 1184 - i32.const 387 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i32.const 16 - i32.sub - i32.eq - if - local.get $2 - i32.load - local.set $4 - local.get $1 - i32.const 16 - i32.sub - local.set $1 - end - else - local.get $1 - local.get $0 - i32.const 1572 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 1184 - i32.const 400 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - end - local.get $1 - i32.sub - local.tee $2 - i32.const 20 - i32.lt_u - if - return - end - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - i32.const 1 - i32.or - i32.or - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $2 - i32.const 2 - i32.store - local.get $0 - local.get $2 - i32.store offset=1568 - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - i32.const -2 - i32.and - local.tee $2 - if (result i32) - local.get $0 - local.get $2 - i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - else - local.get $0 - i32.load - i32.const -2 - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $1 - i32.ctz - local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.tee $2 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 346 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - else - i32.const 0 - end - end - ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 4 - memory.size - local.tee $2 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - local.get $0 - i32.load offset=1568 - i32.ne - i32.shl - i32.const 65563 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.set $1 - local.get $2 - local.get $1 - local.get $1 - local.get $2 - i32.lt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - local.get $0 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 498 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - local.get $1 - i32.load - i32.const -4 - i32.and - i32.const 28 - i32.lt_u - if - i32.const 0 - i32.const 1184 - i32.const 500 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 28 - i32.sub - local.tee $3 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 28 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $2 - local.get $3 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $2 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 - ) - (func $~lib/rt/pure/__new (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - memory.size - local.tee $1 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $1 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1232 - i32.const 0 - i32.store - i32.const 2800 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $0 - i32.const 23 - i32.lt_u - if - local.get $0 - i32.const 2 - i32.shl - i32.const 1232 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $1 - loop $for-loop|1 - local.get $1 - i32.const 16 - i32.lt_u - if - local.get $1 - local.get $0 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1232 - i32.add - i32.const 0 - i32.store offset=96 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|1 - end - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - i32.const 1232 - i32.const 2804 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1232 - global.set $~lib/rt/tlsf/ROOT - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 1228 - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 1120 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 1120 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - end - local.get $0 - ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1228 - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.tee $2 - i32.const 268435455 - i32.and - local.set $1 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 1120 - i32.const 122 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.eq - if - block $__inlined_func$~lib/rt/__visit_members - block $invalid - block $~lib/arraybuffer/ArrayBufferView - local.get $0 - i32.const 12 - i32.add - i32.load - br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $~lib/arraybuffer/ArrayBufferView $__inlined_func$~lib/rt/__visit_members $invalid - end - local.get $0 - i32.load offset=20 - local.tee $1 - if - local.get $1 - i32.const 1228 - i32.ge_u - if - local.get $1 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - end - br $__inlined_func$~lib/rt/__visit_members - end - unreachable - end - local.get $2 - i32.const -2147483648 - i32.and - if - i32.const 0 - i32.const 1120 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 1120 - i32.const 136 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.sub - local.get $2 - i32.const -268435456 - i32.and - i32.or - i32.store offset=4 - end - ) - (func $~start - (local $0 i32) - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - global.set $rc/logical-or-mismatch/gloRef - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $0 - if (result i32) - local.get $0 - else - local.get $0 - call $~lib/rt/pure/__release - global.get $rc/logical-or-mismatch/gloRef - call $~lib/rt/pure/__retain - end - call $~lib/rt/pure/__release - global.get $rc/logical-or-mismatch/gloRef - local.tee $0 - if (result i32) - local.get $0 - call $~lib/rt/pure/__retain - else - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - end - call $~lib/rt/pure/__release - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $0 - if (result i32) - local.get $0 - else - local.get $0 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - end - call $~lib/rt/pure/__release - global.get $rc/logical-or-mismatch/gloRef - call $~lib/rt/pure/__release - ) -) diff --git a/tests/compiler/rc/logical-or-mismatch.untouched.wat b/tests/compiler/rc/logical-or-mismatch.untouched.wat deleted file mode 100644 index 0c47e96b11..0000000000 --- a/tests/compiler/rc/logical-or-mismatch.untouched.wat +++ /dev/null @@ -1,1764 +0,0 @@ -(module - (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_=>_none (func (param i32))) - (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 12) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") - (data (i32.const 76) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 140) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (table $0 1 funcref) - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $rc/logical-or-mismatch/gloRef (mut i32) (i32.const 0)) - (global $~lib/memory/__heap_base i32 (i32.const 204)) - (export "memory" (memory $0)) - (start $~start) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 - i32.load - local.set $2 - i32.const 1 - drop - local.get $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 272 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $3 - i32.const 1 - drop - local.get $3 - i32.const 12 - i32.ge_u - if (result i32) - local.get $3 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 274 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $4 - local.get $3 - i32.const 4 - i32.shr_u - local.set $5 - else - i32.const 31 - local.get $3 - i32.clz - i32.sub - local.set $4 - local.get $3 - local.get $4 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $5 - local.get $4 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $4 - end - i32.const 1 - drop - local.get $4 - i32.const 23 - i32.lt_u - if (result i32) - local.get $5 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 287 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=4 - local.set $6 - local.get $1 - i32.load offset=8 - local.set $7 - local.get $6 - if - local.get $6 - local.get $7 - i32.store offset=8 - end - local.get $7 - if - local.get $7 - local.get $6 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $9 - local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - i32.eq - if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $9 - local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 - local.get $7 - i32.eqz - if - local.get $0 - local.set $9 - local.get $4 - local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 - local.get $0 - local.set $8 - local.get $4 - local.set $11 - local.get $9 - i32.const 1 - local.get $5 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $9 - local.set $10 - local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $4 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - i32.const 1 - drop - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 200 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - local.set $2 - i32.const 1 - drop - local.get $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 202 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.set $3 - local.get $3 - i32.const 4 - i32.add - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - local.get $5 - i32.const 1 - i32.and - if - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.add - local.get $5 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $3 - local.get $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $4 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 - i32.const 3 - i32.and - local.get $3 - i32.or - local.tee $2 - i32.store - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.add - local.get $6 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - end - end - local.get $2 - i32.const 2 - i32.and - if - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub - i32.load - local.set $6 - local.get $6 - i32.load - local.set $3 - i32.const 1 - drop - local.get $3 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 223 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.add - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $7 - local.get $7 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $6 - call $~lib/rt/tlsf/removeBlock - local.get $6 - local.get $3 - i32.const 3 - i32.and - local.get $7 - i32.or - local.tee $2 - i32.store - local.get $6 - local.set $1 - end - end - local.get $4 - local.get $5 - i32.const 2 - i32.or - i32.store - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $8 - i32.const 1 - drop - local.get $8 - i32.const 12 - i32.ge_u - if (result i32) - local.get $8 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 238 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - drop - local.get $1 - i32.const 4 - i32.add - local.get $8 - i32.add - local.get $4 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 239 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $8 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $9 - local.get $8 - i32.const 4 - i32.shr_u - local.set $10 - else - i32.const 31 - local.get $8 - i32.clz - i32.sub - local.set $9 - local.get $8 - local.get $9 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $10 - local.get $9 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $9 - end - i32.const 1 - drop - local.get $9 - i32.const 23 - i32.lt_u - if (result i32) - local.get $10 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 255 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $7 - local.get $9 - local.set $3 - local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $11 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $11 - i32.store offset=8 - local.get $11 - if - local.get $11 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.set $12 - local.get $9 - local.set $7 - local.get $10 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $9 - i32.shl - i32.or - i32.store - local.get $0 - local.set $13 - local.get $9 - local.set $12 - local.get $0 - local.set $3 - local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const 1 - local.get $10 - i32.shl - i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 - ) - (func $~lib/rt/tlsf/addMemory (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) - (local $9 i32) - i32.const 1 - drop - local.get $1 - local.get $2 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 380 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 4 - i32.add - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.sub - local.set $1 - local.get $2 - i32.const 15 - i32.const -1 - i32.xor - i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 - i32.const 0 - local.set $5 - local.get $4 - if - i32.const 1 - drop - local.get $1 - local.get $4 - i32.const 4 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 387 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 16 - i32.sub - local.get $4 - i32.eq - if - local.get $1 - i32.const 16 - i32.sub - local.set $1 - local.get $4 - i32.load - local.set $5 - else - nop - end - else - i32.const 1 - drop - local.get $1 - local.get $0 - i32.const 1572 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 400 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.set $6 - local.get $6 - i32.const 4 - i32.const 12 - i32.add - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - return - end - local.get $6 - i32.const 2 - i32.const 4 - i32.mul - i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 - i32.const 1 - i32.or - local.get $5 - i32.const 2 - i32.and - i32.or - i32.store - local.get $8 - i32.const 0 - i32.store offset=4 - local.get $8 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 4 - i32.add - local.get $7 - i32.add - local.set $4 - local.get $4 - i32.const 0 - i32.const 2 - i32.or - i32.store - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 - i32.store offset=1568 - local.get $0 - local.get $8 - call $~lib/rt/tlsf/insertBlock - i32.const 1 - ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - global.get $~lib/memory/__heap_base - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - local.set $0 - memory.size - local.set $1 - local.get $0 - i32.const 1572 - i32.add - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $2 - local.get $1 - i32.gt_s - if (result i32) - local.get $2 - local.get $1 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - local.get $0 - local.set $3 - local.get $3 - i32.const 0 - i32.store - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - i32.const 23 - i32.lt_u - local.set $4 - local.get $4 - if - local.get $3 - local.set $8 - local.get $5 - local.set $7 - i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 - i32.const 0 - local.set $8 - loop $for-loop|1 - local.get $8 - i32.const 16 - i32.lt_u - local.set $7 - local.get $7 - if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 - i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|1 - end - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $0 - i32.const 1572 - i32.add - local.set $12 - i32.const 0 - drop - local.get $3 - local.get $12 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - drop - local.get $3 - global.set $~lib/rt/tlsf/ROOT - ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 - i32.const 12 - i32.le_u - if (result i32) - i32.const 12 - else - local.get $0 - i32.const 4 - i32.add - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.sub - end - ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 - i32.const 1073741820 - i32.ge_u - if - i32.const 32 - i32.const 160 - i32.const 461 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/tlsf/computeSize - ) - (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $1 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $2 - local.get $1 - i32.const 4 - i32.shr_u - local.set $3 - else - local.get $1 - i32.const 536870910 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - else - local.get $1 - end - local.set $4 - i32.const 31 - local.get $4 - i32.clz - i32.sub - local.set $2 - local.get $4 - local.get $2 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $3 - local.get $2 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $2 - end - i32.const 1 - drop - local.get $2 - i32.const 23 - i32.lt_u - if (result i32) - local.get $3 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 333 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const 0 - i32.const -1 - i32.xor - local.get $3 - i32.shl - i32.and - local.set $6 - i32.const 0 - local.set $7 - local.get $6 - i32.eqz - if - local.get $0 - i32.load - i32.const 0 - i32.const -1 - i32.xor - local.get $2 - i32.const 1 - i32.add - i32.shl - i32.and - local.set $5 - local.get $5 - i32.eqz - if - i32.const 0 - local.set $7 - else - local.get $5 - i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 - i32.const 1 - drop - local.get $6 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 346 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 - i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 - end - else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 - i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 - end - local.get $7 - ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - i32.const 0 - drop - local.get $1 - i32.const 536870910 - i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.set $1 - end - memory.size - local.set $2 - local.get $1 - i32.const 4 - local.get $2 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 - i32.ne - i32.shl - i32.add - local.set $1 - local.get $1 - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - local.set $6 - local.get $6 - memory.grow - i32.const 0 - i32.lt_s - if - local.get $4 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - memory.size - local.set $7 - local.get $0 - local.get $2 - i32.const 16 - i32.shl - local.get $7 - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - drop - ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.set $3 - i32.const 1 - drop - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.sub - local.set $4 - local.get $4 - i32.const 4 - i32.const 12 - i32.add - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $2 - i32.add - local.set $5 - local.get $5 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $5 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const 1 - i32.const -1 - i32.xor - i32.and - i32.store - local.get $1 - local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.get $1 - local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - i32.load - i32.const 2 - i32.const -1 - i32.xor - i32.and - i32.store - end - ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 - i32.eqz - if - local.get $0 - local.get $2 - call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - i32.const 1 - drop - local.get $3 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 498 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - i32.const 1 - drop - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 500 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 - call $~lib/rt/tlsf/prepareBlock - i32.const 0 - drop - local.get $3 - ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - ) - (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741804 - i32.gt_u - if - i32.const 32 - i32.const 96 - i32.const 275 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - i32.const 16 - local.get $0 - i32.add - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $2 - i32.const 4 - i32.sub - local.set $3 - local.get $3 - i32.const 0 - i32.store offset=4 - local.get $3 - i32.const 0 - i32.store offset=8 - local.get $3 - local.get $1 - i32.store offset=12 - local.get $3 - local.get $0 - i32.store offset=16 - local.get $2 - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/increment (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - i32.eq - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/increment - end - local.get $0 - ) - (func $rc/logical-or-mismatch/Ref#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 3 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - ) - (func $rc/logical-or-mismatch/getRef (result i32) - i32.const 0 - call $rc/logical-or-mismatch/Ref#constructor - ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $start:rc/logical-or-mismatch - (local $0 i32) - i32.const 0 - call $rc/logical-or-mismatch/Ref#constructor - global.set $rc/logical-or-mismatch/gloRef - call $rc/logical-or-mismatch/getRef - local.tee $0 - if (result i32) - local.get $0 - else - local.get $0 - call $~lib/rt/pure/__release - global.get $rc/logical-or-mismatch/gloRef - call $~lib/rt/pure/__retain - end - local.set $0 - local.get $0 - call $~lib/rt/pure/__release - global.get $rc/logical-or-mismatch/gloRef - local.tee $0 - if (result i32) - local.get $0 - call $~lib/rt/pure/__retain - else - call $rc/logical-or-mismatch/getRef - end - local.set $0 - local.get $0 - call $~lib/rt/pure/__release - call $rc/logical-or-mismatch/getRef - local.tee $0 - if (result i32) - local.get $0 - else - local.get $0 - call $~lib/rt/pure/__release - call $rc/logical-or-mismatch/getRef - end - local.set $0 - local.get $0 - call $~lib/rt/pure/__release - global.get $rc/logical-or-mismatch/gloRef - local.tee $0 - if (result i32) - local.get $0 - else - global.get $rc/logical-or-mismatch/gloRef - end - call $~lib/rt/pure/__retain - local.set $0 - local.get $0 - call $~lib/rt/pure/__release - global.get $rc/logical-or-mismatch/gloRef - call $~lib/rt/pure/__release - ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - i32.const 0 - drop - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/pure/finalize (param $0 i32) - i32.const 0 - drop - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/freeBlock - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.and - local.set $2 - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 122 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.eq - if - local.get $0 - i32.const 20 - i32.add - i32.const 1 - call $~lib/rt/__visit_members - i32.const 1 - drop - i32.const 1 - drop - local.get $1 - i32.const -2147483648 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/finalize - else - i32.const 1 - drop - local.get $2 - i32.const 0 - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 136 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - drop - local.get $0 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.const 1 - i32.sub - i32.or - i32.store offset=4 - end - ) - (func $~start - call $start:rc/logical-or-mismatch - ) - (func $~lib/rt/pure/__visit (param $0 i32) (param $1 i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.lt_u - if - return - end - i32.const 1 - drop - i32.const 1 - drop - local.get $1 - i32.const 1 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 69 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - ) - (func $~lib/arraybuffer/ArrayBuffer~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/string/String~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/pure/__visit - end - ) - (func $rc/logical-or-mismatch/Ref~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) - block $invalid - block $rc/logical-or-mismatch/Ref - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $rc/logical-or-mismatch/Ref $invalid - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBuffer~visit - return - end - local.get $0 - local.get $1 - call $~lib/string/String~visit - return - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit - return - end - local.get $0 - local.get $1 - call $rc/logical-or-mismatch/Ref~visit - return - end - unreachable - ) -) diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat deleted file mode 100644 index 525a0872fb..0000000000 --- a/tests/compiler/rc/optimize.optimized.wat +++ /dev/null @@ -1,1356 +0,0 @@ -(module - (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $none_=>_none (func)) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 1036) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s") - (data (i32.const 1100) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1164) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 1228) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a") - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "eliminated_v" (func $rc/optimize/eliminated_v)) - (export "eliminated_vi" (func $rc/optimize/eliminated_vi)) - (export "eliminated_vii" (func $rc/optimize/eliminated_vii)) - (export "eliminated_viii" (func $rc/optimize/eliminated_viii)) - (export "eliminated_rr" (func $rc/optimize/eliminated_rr)) - (export "getRef" (func $rc/optimize/getRef)) - (export "OptimizeARC.eliminates.linearArgument" (func $rc/optimize/eliminated_vi)) - (export "OptimizeARC.eliminates.linearLocal" (func $rc/optimize/eliminated_vi)) - (export "OptimizeARC.eliminates.linearChain" (func $rc/optimize/OptimizeARC.eliminates.linearChain)) - (export "OptimizeARC.eliminates.balancedReleases" (func $rc/optimize/eliminated_vii)) - (export "OptimizeARC.eliminates.partialReleases" (func $rc/optimize/OptimizeARC.eliminates.partialReleases)) - (export "OptimizeARC.eliminates.balancedRetains" (func $rc/optimize/eliminated_viii)) - (export "OptimizeARC.eliminates.balancedInsideLoop" (func $rc/optimize/OptimizeARC.eliminates.balancedInsideLoop)) - (export "OptimizeARC.eliminates.balancedOutsideLoop" (func $rc/optimize/eliminated_vii)) - (export "OptimizeARC.eliminates.balancedInsideOutsideLoop" (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoop)) - (export "OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch" (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch)) - (export "OptimizeARC.eliminates.replace" (func $rc/optimize/OptimizeARC.eliminates.replace)) - (export "OptimizeARC.eliminates.replaceAlreadyRetained" (func $rc/optimize/eliminated_rr)) - (export "OptimizeARC.keeps.partialRetains" (func $rc/optimize/OptimizeARC.keeps.partialRetains)) - (export "OptimizeARC.keeps.reachesReturn" (func $rc/optimize/OptimizeARC.keeps.reachesReturn)) - (export "FinalizeARC.eliminates.unnecessaryAllocation" (func $rc/optimize/FinalizeARC.eliminates.unnecessaryAllocation)) - (export "FinalizeARC.eliminates.unnecessaryPair" (func $rc/optimize/eliminated_vi)) - (export "FinalizeARC.eliminates.unnecessaryStaticPair" (func $rc/optimize/eliminated_v)) - (export "FinalizeARC.eliminates.unnecessaryStaticRetain" (func $rc/optimize/eliminated_v)) - (export "FinalizeARC.eliminates.unnecessaryStaticRelease" (func $rc/optimize/eliminated_v)) - (export "FinalizeARC.keeps.dynamicRetain" (func $rc/optimize/FinalizeARC.keeps.dynamicRetain)) - (export "FinalizeARC.keeps.dynamicRelease" (func $rc/optimize/FinalizeARC.keeps.dynamicRelease)) - (func $rc/optimize/eliminated_v - nop - ) - (func $rc/optimize/eliminated_vi (param $0 i32) - nop - ) - (func $rc/optimize/eliminated_vii (param $0 i32) (param $1 i32) - nop - ) - (func $rc/optimize/eliminated_viii (param $0 i32) (param $1 i32) (param $2 i32) - nop - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 1260 - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 1056 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - end - local.get $0 - ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.tee $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 272 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and - local.tee $2 - i32.const 1073741820 - i32.lt_u - i32.const 0 - local.get $2 - i32.const 12 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 274 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 256 - i32.lt_u - if - local.get $2 - i32.const 4 - i32.shr_u - local.set $2 - else - local.get $2 - i32.const 31 - local.get $2 - i32.clz - i32.sub - local.tee $3 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $2 - local.get $3 - i32.const 7 - i32.sub - local.set $3 - end - local.get $2 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 287 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - local.set $4 - local.get $1 - i32.load offset=4 - local.tee $5 - if - local.get $5 - local.get $4 - i32.store offset=8 - end - local.get $4 - if - local.get $4 - local.get $5 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.get $2 - local.get $3 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - i32.eq - if - local.get $0 - local.get $2 - local.get $3 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.store offset=96 - local.get $4 - i32.eqz - if - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.tee $4 - i32.load offset=4 - i32.const -2 - local.get $2 - i32.rotl - i32.and - local.set $1 - local.get $4 - local.get $1 - i32.store offset=4 - local.get $1 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const -2 - local.get $3 - i32.rotl - i32.and - i32.store - end - end - end - ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 200 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - local.tee $4 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 202 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $5 - i32.load - local.tee $2 - i32.const 1 - i32.and - if - local.get $4 - i32.const -4 - i32.and - i32.const 4 - i32.add - local.get $2 - i32.const -4 - i32.and - i32.add - local.tee $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $5 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $3 - local.get $4 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $5 - i32.load - local.set $2 - end - end - local.get $4 - i32.const 2 - i32.and - if - local.get $1 - i32.const 4 - i32.sub - i32.load - local.tee $3 - i32.load - local.tee $7 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 223 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $7 - i32.const -4 - i32.and - i32.const 4 - i32.add - local.get $4 - i32.const -4 - i32.and - i32.add - local.tee $8 - i32.const 1073741820 - i32.lt_u - if (result i32) - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $3 - local.get $8 - local.get $7 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $3 - else - local.get $1 - end - local.set $1 - end - local.get $5 - local.get $2 - i32.const 2 - i32.or - i32.store - local.get $4 - i32.const -4 - i32.and - local.tee $3 - i32.const 1073741820 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 12 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 238 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 4 - i32.add - i32.add - local.get $5 - i32.ne - if - i32.const 0 - i32.const 1184 - i32.const 239 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 256 - i32.lt_u - if - local.get $3 - i32.const 4 - i32.shr_u - local.set $3 - else - local.get $3 - i32.const 31 - local.get $3 - i32.clz - i32.sub - local.tee $4 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $3 - local.get $4 - i32.const 7 - i32.sub - local.set $6 - end - local.get $3 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $6 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 255 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $4 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $4 - i32.store offset=8 - local.get $4 - if - local.get $4 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $3 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $1 - i32.store offset=96 - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $6 - i32.shl - i32.or - i32.store - local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 - local.get $0 - i32.load offset=4 - i32.const 1 - local.get $3 - i32.shl - i32.or - i32.store offset=4 - ) - (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $2 - i32.gt_u - if - i32.const 0 - i32.const 1184 - i32.const 380 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 19 - i32.add - i32.const -16 - i32.and - i32.const 4 - i32.sub - local.set $1 - local.get $2 - i32.const -16 - i32.and - local.get $0 - i32.load offset=1568 - local.tee $2 - if - local.get $1 - local.get $2 - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 1184 - i32.const 387 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i32.const 16 - i32.sub - i32.eq - if - local.get $2 - i32.load - local.set $4 - local.get $1 - i32.const 16 - i32.sub - local.set $1 - end - else - local.get $1 - local.get $0 - i32.const 1572 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 1184 - i32.const 400 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - end - local.get $1 - i32.sub - local.tee $2 - i32.const 20 - i32.lt_u - if - return - end - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - i32.const 1 - i32.or - i32.or - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $2 - i32.const 2 - i32.store - local.get $0 - local.get $2 - i32.store offset=1568 - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - i32.const 256 - i32.lt_u - if - local.get $1 - i32.const 4 - i32.shr_u - local.set $1 - else - i32.const 31 - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.get $1 - local.get $1 - i32.const 536870910 - i32.lt_u - select - local.tee $1 - i32.clz - i32.sub - local.set $2 - local.get $1 - local.get $2 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $1 - local.get $2 - i32.const 7 - i32.sub - local.set $2 - end - local.get $1 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $2 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 333 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const -1 - local.get $1 - i32.shl - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $1 - i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - else - local.get $0 - i32.load - i32.const -1 - local.get $2 - i32.const 1 - i32.add - i32.shl - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $1 - i32.ctz - local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.tee $2 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 346 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - else - i32.const 0 - end - end - ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.const 1073741820 - i32.ge_u - if - i32.const 1120 - i32.const 1184 - i32.const 461 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 12 - local.get $1 - i32.const 19 - i32.add - i32.const -16 - i32.and - i32.const 4 - i32.sub - local.get $1 - i32.const 12 - i32.le_u - select - local.tee $2 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 4 - memory.size - local.tee $1 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - local.get $0 - i32.load offset=1568 - i32.ne - i32.shl - local.get $2 - i32.const 1 - i32.const 27 - local.get $2 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $2 - local.get $2 - i32.const 536870910 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.set $3 - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $3 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 498 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.gt_u - if - i32.const 0 - i32.const 1184 - i32.const 500 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1184 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $2 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $2 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 - ) - (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741804 - i32.gt_u - if - i32.const 1120 - i32.const 1056 - i32.const 275 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - memory.size - local.tee $3 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $3 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1264 - i32.const 0 - i32.store - i32.const 2832 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $2 - i32.const 23 - i32.lt_u - if - local.get $2 - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $3 - loop $for-loop|1 - local.get $3 - i32.const 16 - i32.lt_u - if - local.get $3 - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=96 - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1264 - i32.const 2836 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1264 - global.set $~lib/rt/tlsf/ROOT - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $3 - i32.const 4 - i32.sub - local.tee $2 - i32.const 0 - i32.store offset=4 - local.get $2 - i32.const 0 - i32.store offset=8 - local.get $2 - local.get $1 - i32.store offset=12 - local.get $2 - local.get $0 - i32.store offset=16 - local.get $3 - i32.const 16 - i32.add - ) - (func $rc/optimize/getRef (result i32) - i32.const 0 - i32.const 3 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1260 - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $rc/optimize/eliminated_rr (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - call $~lib/rt/pure/__retain - i32.const 0 - i32.const 3 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $1 - call $~lib/rt/pure/__release - local.get $1 - ) - (func $rc/optimize/OptimizeARC.eliminates.linearChain (param $0 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.tee $0 - call $~lib/rt/pure/__retain - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $rc/optimize/OptimizeARC.eliminates.partialReleases (param $0 i32) (param $1 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - if - local.get $0 - call $~lib/rt/pure/__release - end - ) - (func $rc/optimize/OptimizeARC.eliminates.balancedInsideLoop (param $0 i32) (param $1 i32) - loop $while-continue|0 - local.get $1 - if - local.get $0 - call $~lib/rt/pure/__retain - local.tee $0 - call $~lib/rt/pure/__release - br $while-continue|0 - end - end - ) - (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoop (param $0 i32) (param $1 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - loop $while-continue|0 - local.get $1 - if - local.get $0 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - br $while-continue|0 - end - end - local.get $0 - call $~lib/rt/pure/__release - ) - (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - loop $while-continue|0 - local.get $1 - if - local.get $2 - if - local.get $0 - call $~lib/rt/pure/__release - return - end - local.get $0 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - br $while-continue|0 - end - end - local.get $0 - call $~lib/rt/pure/__release - ) - (func $rc/optimize/OptimizeARC.eliminates.replace (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.tee $0 - local.get $1 - call $~lib/rt/pure/__retain - local.tee $2 - local.tee $1 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - end - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - ) - (func $rc/optimize/OptimizeARC.keeps.partialRetains (param $0 i32) (param $1 i32) - local.get $1 - if (result i32) - local.get $0 - call $~lib/rt/pure/__retain - else - local.get $0 - end - call $~lib/rt/pure/__release - ) - (func $rc/optimize/OptimizeARC.keeps.reachesReturn (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - if - local.get $0 - return - end - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - ) - (func $rc/optimize/FinalizeARC.eliminates.unnecessaryAllocation - i32.const 1 - i32.const 0 - call $~lib/rt/pure/__new - drop - ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (param $0 i32) - local.get $0 - call $~lib/rt/pure/__retain - drop - ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (param $0 i32) - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.tee $2 - i32.const 268435455 - i32.and - local.set $1 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 1056 - i32.const 122 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.eq - if - block $__inlined_func$~lib/rt/__visit_members - block $invalid - block $~lib/arraybuffer/ArrayBufferView - local.get $0 - i32.const 12 - i32.add - i32.load - br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $~lib/arraybuffer/ArrayBufferView $__inlined_func$~lib/rt/__visit_members $invalid - end - local.get $0 - i32.load offset=20 - local.tee $1 - if - local.get $1 - i32.const 1260 - i32.ge_u - if - local.get $1 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - end - br $__inlined_func$~lib/rt/__visit_members - end - unreachable - end - local.get $2 - i32.const -2147483648 - i32.and - if - i32.const 0 - i32.const 1056 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 1056 - i32.const 136 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.sub - local.get $2 - i32.const -268435456 - i32.and - i32.or - i32.store offset=4 - end - ) -) diff --git a/tests/compiler/rc/optimize.untouched.wat b/tests/compiler/rc/optimize.untouched.wat deleted file mode 100644 index c54f11e3ce..0000000000 --- a/tests/compiler/rc/optimize.untouched.wat +++ /dev/null @@ -1,2016 +0,0 @@ -(module - (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 12) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 76) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") - (data (i32.const 140) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 204) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a\00\00\00\00\00\00\00\00\00\00\00") - (table $0 1 funcref) - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/memory/__heap_base i32 (i32.const 236)) - (export "memory" (memory $0)) - (export "eliminated_v" (func $rc/optimize/eliminated_v)) - (export "eliminated_vi" (func $rc/optimize/eliminated_vi)) - (export "eliminated_vii" (func $rc/optimize/eliminated_vii)) - (export "eliminated_viii" (func $rc/optimize/eliminated_viii)) - (export "eliminated_rr" (func $rc/optimize/eliminated_rr)) - (export "getRef" (func $rc/optimize/getRef)) - (export "OptimizeARC.eliminates.linearArgument" (func $rc/optimize/OptimizeARC.eliminates.linearArgument)) - (export "OptimizeARC.eliminates.linearLocal" (func $rc/optimize/OptimizeARC.eliminates.linearLocal)) - (export "OptimizeARC.eliminates.linearChain" (func $rc/optimize/OptimizeARC.eliminates.linearChain)) - (export "OptimizeARC.eliminates.balancedReleases" (func $rc/optimize/OptimizeARC.eliminates.balancedReleases)) - (export "OptimizeARC.eliminates.partialReleases" (func $rc/optimize/OptimizeARC.eliminates.partialReleases)) - (export "OptimizeARC.eliminates.balancedRetains" (func $rc/optimize/OptimizeARC.eliminates.balancedRetains)) - (export "OptimizeARC.eliminates.balancedInsideLoop" (func $rc/optimize/OptimizeARC.eliminates.balancedInsideLoop)) - (export "OptimizeARC.eliminates.balancedOutsideLoop" (func $rc/optimize/OptimizeARC.eliminates.balancedOutsideLoop)) - (export "OptimizeARC.eliminates.balancedInsideOutsideLoop" (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoop)) - (export "OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch" (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch)) - (export "OptimizeARC.eliminates.replace" (func $rc/optimize/OptimizeARC.eliminates.replace)) - (export "OptimizeARC.eliminates.replaceAlreadyRetained" (func $rc/optimize/OptimizeARC.eliminates.replaceAlreadyRetained)) - (export "OptimizeARC.keeps.partialRetains" (func $rc/optimize/OptimizeARC.keeps.partialRetains)) - (export "OptimizeARC.keeps.reachesReturn" (func $rc/optimize/OptimizeARC.keeps.reachesReturn)) - (export "FinalizeARC.eliminates.unnecessaryAllocation" (func $rc/optimize/FinalizeARC.eliminates.unnecessaryAllocation)) - (export "FinalizeARC.eliminates.unnecessaryPair" (func $rc/optimize/FinalizeARC.eliminates.unnecessaryPair)) - (export "FinalizeARC.eliminates.unnecessaryStaticPair" (func $rc/optimize/FinalizeARC.eliminates.unnecessaryStaticPair)) - (export "FinalizeARC.eliminates.unnecessaryStaticRetain" (func $rc/optimize/FinalizeARC.eliminates.unnecessaryStaticRetain)) - (export "FinalizeARC.eliminates.unnecessaryStaticRelease" (func $rc/optimize/FinalizeARC.eliminates.unnecessaryStaticRelease)) - (export "FinalizeARC.keeps.dynamicRetain" (func $rc/optimize/FinalizeARC.keeps.dynamicRetain)) - (export "FinalizeARC.keeps.dynamicRelease" (func $rc/optimize/FinalizeARC.keeps.dynamicRelease)) - (func $rc/optimize/eliminated_v - nop - ) - (func $rc/optimize/eliminated_vi (param $0 i32) - nop - ) - (func $rc/optimize/eliminated_vii (param $0 i32) (param $1 i32) - nop - ) - (func $rc/optimize/eliminated_viii (param $0 i32) (param $1 i32) (param $2 i32) - nop - ) - (func $~lib/rt/pure/increment (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - i32.eq - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/increment - end - local.get $0 - ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 - i32.load - local.set $2 - i32.const 1 - drop - local.get $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 272 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $3 - i32.const 1 - drop - local.get $3 - i32.const 12 - i32.ge_u - if (result i32) - local.get $3 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 274 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $4 - local.get $3 - i32.const 4 - i32.shr_u - local.set $5 - else - i32.const 31 - local.get $3 - i32.clz - i32.sub - local.set $4 - local.get $3 - local.get $4 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $5 - local.get $4 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $4 - end - i32.const 1 - drop - local.get $4 - i32.const 23 - i32.lt_u - if (result i32) - local.get $5 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 287 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=4 - local.set $6 - local.get $1 - i32.load offset=8 - local.set $7 - local.get $6 - if - local.get $6 - local.get $7 - i32.store offset=8 - end - local.get $7 - if - local.get $7 - local.get $6 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $9 - local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - i32.eq - if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $9 - local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 - local.get $7 - i32.eqz - if - local.get $0 - local.set $9 - local.get $4 - local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 - local.get $0 - local.set $8 - local.get $4 - local.set $11 - local.get $9 - i32.const 1 - local.get $5 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $9 - local.set $10 - local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $4 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - i32.const 1 - drop - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 200 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - local.set $2 - i32.const 1 - drop - local.get $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 202 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.set $3 - local.get $3 - i32.const 4 - i32.add - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - local.get $5 - i32.const 1 - i32.and - if - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.add - local.get $5 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $3 - local.get $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $4 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 - i32.const 3 - i32.and - local.get $3 - i32.or - local.tee $2 - i32.store - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.add - local.get $6 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - end - end - local.get $2 - i32.const 2 - i32.and - if - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub - i32.load - local.set $6 - local.get $6 - i32.load - local.set $3 - i32.const 1 - drop - local.get $3 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 223 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.add - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $7 - local.get $7 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $6 - call $~lib/rt/tlsf/removeBlock - local.get $6 - local.get $3 - i32.const 3 - i32.and - local.get $7 - i32.or - local.tee $2 - i32.store - local.get $6 - local.set $1 - end - end - local.get $4 - local.get $5 - i32.const 2 - i32.or - i32.store - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $8 - i32.const 1 - drop - local.get $8 - i32.const 12 - i32.ge_u - if (result i32) - local.get $8 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 238 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - drop - local.get $1 - i32.const 4 - i32.add - local.get $8 - i32.add - local.get $4 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 239 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $8 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $9 - local.get $8 - i32.const 4 - i32.shr_u - local.set $10 - else - i32.const 31 - local.get $8 - i32.clz - i32.sub - local.set $9 - local.get $8 - local.get $9 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $10 - local.get $9 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $9 - end - i32.const 1 - drop - local.get $9 - i32.const 23 - i32.lt_u - if (result i32) - local.get $10 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 255 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $7 - local.get $9 - local.set $3 - local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $11 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $11 - i32.store offset=8 - local.get $11 - if - local.get $11 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.set $12 - local.get $9 - local.set $7 - local.get $10 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $9 - i32.shl - i32.or - i32.store - local.get $0 - local.set $13 - local.get $9 - local.set $12 - local.get $0 - local.set $3 - local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const 1 - local.get $10 - i32.shl - i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 - ) - (func $~lib/rt/tlsf/addMemory (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) - (local $9 i32) - i32.const 1 - drop - local.get $1 - local.get $2 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 380 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 4 - i32.add - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.sub - local.set $1 - local.get $2 - i32.const 15 - i32.const -1 - i32.xor - i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 - i32.const 0 - local.set $5 - local.get $4 - if - i32.const 1 - drop - local.get $1 - local.get $4 - i32.const 4 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 387 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 16 - i32.sub - local.get $4 - i32.eq - if - local.get $1 - i32.const 16 - i32.sub - local.set $1 - local.get $4 - i32.load - local.set $5 - else - nop - end - else - i32.const 1 - drop - local.get $1 - local.get $0 - i32.const 1572 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 400 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.set $6 - local.get $6 - i32.const 4 - i32.const 12 - i32.add - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - return - end - local.get $6 - i32.const 2 - i32.const 4 - i32.mul - i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 - i32.const 1 - i32.or - local.get $5 - i32.const 2 - i32.and - i32.or - i32.store - local.get $8 - i32.const 0 - i32.store offset=4 - local.get $8 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 4 - i32.add - local.get $7 - i32.add - local.set $4 - local.get $4 - i32.const 0 - i32.const 2 - i32.or - i32.store - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 - i32.store offset=1568 - local.get $0 - local.get $8 - call $~lib/rt/tlsf/insertBlock - i32.const 1 - ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - global.get $~lib/memory/__heap_base - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - local.set $0 - memory.size - local.set $1 - local.get $0 - i32.const 1572 - i32.add - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $2 - local.get $1 - i32.gt_s - if (result i32) - local.get $2 - local.get $1 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - local.get $0 - local.set $3 - local.get $3 - i32.const 0 - i32.store - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - i32.const 23 - i32.lt_u - local.set $4 - local.get $4 - if - local.get $3 - local.set $8 - local.get $5 - local.set $7 - i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 - i32.const 0 - local.set $8 - loop $for-loop|1 - local.get $8 - i32.const 16 - i32.lt_u - local.set $7 - local.get $7 - if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 - i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|1 - end - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $0 - i32.const 1572 - i32.add - local.set $12 - i32.const 0 - drop - local.get $3 - local.get $12 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - drop - local.get $3 - global.set $~lib/rt/tlsf/ROOT - ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 - i32.const 12 - i32.le_u - if (result i32) - i32.const 12 - else - local.get $0 - i32.const 4 - i32.add - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.sub - end - ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 - i32.const 1073741820 - i32.ge_u - if - i32.const 96 - i32.const 160 - i32.const 461 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/tlsf/computeSize - ) - (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $1 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $2 - local.get $1 - i32.const 4 - i32.shr_u - local.set $3 - else - local.get $1 - i32.const 536870910 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - else - local.get $1 - end - local.set $4 - i32.const 31 - local.get $4 - i32.clz - i32.sub - local.set $2 - local.get $4 - local.get $2 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $3 - local.get $2 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $2 - end - i32.const 1 - drop - local.get $2 - i32.const 23 - i32.lt_u - if (result i32) - local.get $3 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 333 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const 0 - i32.const -1 - i32.xor - local.get $3 - i32.shl - i32.and - local.set $6 - i32.const 0 - local.set $7 - local.get $6 - i32.eqz - if - local.get $0 - i32.load - i32.const 0 - i32.const -1 - i32.xor - local.get $2 - i32.const 1 - i32.add - i32.shl - i32.and - local.set $5 - local.get $5 - i32.eqz - if - i32.const 0 - local.set $7 - else - local.get $5 - i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 - i32.const 1 - drop - local.get $6 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 346 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 - i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 - end - else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 - i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 - end - local.get $7 - ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - i32.const 0 - drop - local.get $1 - i32.const 536870910 - i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.set $1 - end - memory.size - local.set $2 - local.get $1 - i32.const 4 - local.get $2 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 - i32.ne - i32.shl - i32.add - local.set $1 - local.get $1 - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - local.set $6 - local.get $6 - memory.grow - i32.const 0 - i32.lt_s - if - local.get $4 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - memory.size - local.set $7 - local.get $0 - local.get $2 - i32.const 16 - i32.shl - local.get $7 - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - drop - ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.set $3 - i32.const 1 - drop - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.sub - local.set $4 - local.get $4 - i32.const 4 - i32.const 12 - i32.add - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $2 - i32.add - local.set $5 - local.get $5 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $5 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const 1 - i32.const -1 - i32.xor - i32.and - i32.store - local.get $1 - local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.get $1 - local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - i32.load - i32.const 2 - i32.const -1 - i32.xor - i32.and - i32.store - end - ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 - i32.eqz - if - local.get $0 - local.get $2 - call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - i32.const 1 - drop - local.get $3 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 498 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - i32.const 1 - drop - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 500 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 - call $~lib/rt/tlsf/prepareBlock - i32.const 0 - drop - local.get $3 - ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - ) - (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741804 - i32.gt_u - if - i32.const 96 - i32.const 32 - i32.const 275 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - i32.const 16 - local.get $0 - i32.add - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $2 - i32.const 4 - i32.sub - local.set $3 - local.get $3 - i32.const 0 - i32.store offset=4 - local.get $3 - i32.const 0 - i32.store offset=8 - local.get $3 - local.get $1 - i32.store offset=12 - local.get $3 - local.get $0 - i32.store offset=16 - local.get $2 - i32.const 16 - i32.add - ) - (func $rc/optimize/Ref#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 3 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - ) - (func $rc/optimize/getRef (result i32) - i32.const 0 - call $rc/optimize/Ref#constructor - ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $rc/optimize/eliminated_rr (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - call $rc/optimize/getRef - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - ) - (func $rc/optimize/OptimizeARC.eliminates.linearArgument (param $0 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $0 - call $~lib/rt/pure/__release - ) - (func $rc/optimize/OptimizeARC.eliminates.linearLocal (param $0 i32) - (local $1 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - local.get $1 - call $~lib/rt/pure/__release - ) - (func $rc/optimize/OptimizeARC.eliminates.linearChain (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - local.get $2 - call $~lib/rt/pure/__retain - local.set $3 - local.get $3 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - ) - (func $rc/optimize/OptimizeARC.eliminates.balancedReleases (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - local.get $1 - if - local.get $2 - call $~lib/rt/pure/__release - else - local.get $2 - call $~lib/rt/pure/__release - end - ) - (func $rc/optimize/OptimizeARC.eliminates.partialReleases (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - local.get $1 - if - local.get $2 - call $~lib/rt/pure/__release - end - ) - (func $rc/optimize/OptimizeARC.eliminates.balancedRetains (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 - if - local.get $2 - if - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - else - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - end - else - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - end - local.get $3 - call $~lib/rt/pure/__release - ) - (func $rc/optimize/OptimizeARC.eliminates.balancedInsideLoop (param $0 i32) (param $1 i32) - (local $2 i32) - loop $while-continue|0 - local.get $1 - local.set $2 - local.get $2 - if - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $0 - call $~lib/rt/pure/__release - br $while-continue|0 - end - end - ) - (func $rc/optimize/OptimizeARC.eliminates.balancedOutsideLoop (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - loop $while-continue|0 - local.get $1 - local.set $2 - local.get $2 - if - br $while-continue|0 - end - end - local.get $0 - call $~lib/rt/pure/__release - ) - (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoop (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - loop $while-continue|0 - local.get $1 - local.set $2 - local.get $2 - if - local.get $0 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - br $while-continue|0 - end - end - local.get $0 - call $~lib/rt/pure/__release - ) - (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - loop $while-continue|0 - local.get $1 - local.set $3 - local.get $3 - if - local.get $2 - if - local.get $0 - call $~lib/rt/pure/__release - return - end - local.get $0 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - br $while-continue|0 - end - end - local.get $0 - call $~lib/rt/pure/__release - ) - (func $rc/optimize/OptimizeARC.eliminates.replace (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $1 - local.tee $2 - local.get $0 - local.tee $3 - i32.ne - if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $2 - local.set $0 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - ) - (func $rc/optimize/OptimizeARC.eliminates.replaceAlreadyRetained (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - call $rc/optimize/getRef - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - local.set $0 - local.get $0 - ) - (func $rc/optimize/OptimizeARC.keeps.partialRetains (param $0 i32) (param $1 i32) - local.get $1 - if - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - call $~lib/rt/pure/__release - ) - (func $rc/optimize/OptimizeARC.keeps.reachesReturn (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - if - local.get $0 - return - end - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - ) - (func $rc/optimize/FinalizeARC.eliminates.unnecessaryAllocation - i32.const 1 - i32.const 0 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - call $~lib/rt/pure/__release - ) - (func $rc/optimize/FinalizeARC.eliminates.unnecessaryPair (param $0 i32) - local.get $0 - call $~lib/rt/pure/__retain - call $~lib/rt/pure/__release - ) - (func $rc/optimize/FinalizeARC.eliminates.unnecessaryStaticPair - i32.const 224 - call $~lib/rt/pure/__retain - call $~lib/rt/pure/__release - ) - (func $rc/optimize/FinalizeARC.eliminates.unnecessaryStaticRetain - i32.const 224 - call $~lib/rt/pure/__retain - drop - ) - (func $rc/optimize/FinalizeARC.eliminates.unnecessaryStaticRelease - i32.const 224 - call $~lib/rt/pure/__release - ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (param $0 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (param $0 i32) - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - i32.const 0 - drop - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/pure/finalize (param $0 i32) - i32.const 0 - drop - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/freeBlock - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.and - local.set $2 - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 122 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.eq - if - local.get $0 - i32.const 20 - i32.add - i32.const 1 - call $~lib/rt/__visit_members - i32.const 1 - drop - i32.const 1 - drop - local.get $1 - i32.const -2147483648 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/finalize - else - i32.const 1 - drop - local.get $2 - i32.const 0 - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 136 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - drop - local.get $0 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.const 1 - i32.sub - i32.or - i32.store offset=4 - end - ) - (func $~lib/rt/pure/__visit (param $0 i32) (param $1 i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.lt_u - if - return - end - i32.const 1 - drop - i32.const 1 - drop - local.get $1 - i32.const 1 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 69 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - ) - (func $~lib/arraybuffer/ArrayBuffer~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/string/String~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/pure/__visit - end - ) - (func $rc/optimize/Ref~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) - block $invalid - block $rc/optimize/Ref - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $rc/optimize/Ref $invalid - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBuffer~visit - return - end - local.get $0 - local.get $1 - call $~lib/string/String~visit - return - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit - return - end - local.get $0 - local.get $1 - call $rc/optimize/Ref~visit - return - end - unreachable - ) -) diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat deleted file mode 100644 index ff02b7c603..0000000000 --- a/tests/compiler/rc/rereturn.optimized.wat +++ /dev/null @@ -1,1557 +0,0 @@ -(module - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 1036) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1100) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s") - (data (i32.const 1164) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 1232) "\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 ") - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/rt/__rtti_base i32 (i32.const 1232)) - (export "memory" (memory $0)) - (export "__new" (func $~lib/rt/pure/__new)) - (export "__renew" (func $~lib/rt/pure/__renew)) - (export "__retain" (func $~lib/rt/pure/__retain)) - (export "__release" (func $~lib/rt/pure/__release)) - (export "__rtti_base" (global $~lib/rt/__rtti_base)) - (start $~start) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.tee $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 272 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and - local.tee $2 - i32.const 1073741820 - i32.lt_u - i32.const 0 - local.get $2 - i32.const 12 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 274 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 256 - i32.lt_u - if - local.get $2 - i32.const 4 - i32.shr_u - local.set $2 - else - local.get $2 - i32.const 31 - local.get $2 - i32.clz - i32.sub - local.tee $3 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $2 - local.get $3 - i32.const 7 - i32.sub - local.set $3 - end - local.get $2 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 287 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - local.set $4 - local.get $1 - i32.load offset=4 - local.tee $5 - if - local.get $5 - local.get $4 - i32.store offset=8 - end - local.get $4 - if - local.get $4 - local.get $5 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.get $2 - local.get $3 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - i32.eq - if - local.get $0 - local.get $2 - local.get $3 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.store offset=96 - local.get $4 - i32.eqz - if - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.tee $4 - i32.load offset=4 - i32.const -2 - local.get $2 - i32.rotl - i32.and - local.set $1 - local.get $4 - local.get $1 - i32.store offset=4 - local.get $1 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const -2 - local.get $3 - i32.rotl - i32.and - i32.store - end - end - end - ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 200 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - local.tee $4 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 202 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $5 - i32.load - local.tee $2 - i32.const 1 - i32.and - if - local.get $4 - i32.const -4 - i32.and - i32.const 4 - i32.add - local.get $2 - i32.const -4 - i32.and - i32.add - local.tee $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $5 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $3 - local.get $4 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $5 - i32.load - local.set $2 - end - end - local.get $4 - i32.const 2 - i32.and - if - local.get $1 - i32.const 4 - i32.sub - i32.load - local.tee $3 - i32.load - local.tee $7 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 223 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $7 - i32.const -4 - i32.and - i32.const 4 - i32.add - local.get $4 - i32.const -4 - i32.and - i32.add - local.tee $8 - i32.const 1073741820 - i32.lt_u - if (result i32) - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $3 - local.get $8 - local.get $7 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $3 - else - local.get $1 - end - local.set $1 - end - local.get $5 - local.get $2 - i32.const 2 - i32.or - i32.store - local.get $4 - i32.const -4 - i32.and - local.tee $3 - i32.const 1073741820 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 12 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 238 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 4 - i32.add - i32.add - local.get $5 - i32.ne - if - i32.const 0 - i32.const 1184 - i32.const 239 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 256 - i32.lt_u - if - local.get $3 - i32.const 4 - i32.shr_u - local.set $3 - else - local.get $3 - i32.const 31 - local.get $3 - i32.clz - i32.sub - local.tee $4 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $3 - local.get $4 - i32.const 7 - i32.sub - local.set $6 - end - local.get $3 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $6 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 255 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $4 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $4 - i32.store offset=8 - local.get $4 - if - local.get $4 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $3 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $1 - i32.store offset=96 - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $6 - i32.shl - i32.or - i32.store - local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 - local.get $0 - i32.load offset=4 - i32.const 1 - local.get $3 - i32.shl - i32.or - i32.store offset=4 - ) - (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $2 - i32.gt_u - if - i32.const 0 - i32.const 1184 - i32.const 380 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 19 - i32.add - i32.const -16 - i32.and - i32.const 4 - i32.sub - local.set $1 - local.get $2 - i32.const -16 - i32.and - local.get $0 - i32.load offset=1568 - local.tee $2 - if - local.get $1 - local.get $2 - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 1184 - i32.const 387 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i32.const 16 - i32.sub - i32.eq - if - local.get $2 - i32.load - local.set $4 - local.get $1 - i32.const 16 - i32.sub - local.set $1 - end - else - local.get $1 - local.get $0 - i32.const 1572 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 1184 - i32.const 400 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - end - local.get $1 - i32.sub - local.tee $2 - i32.const 20 - i32.lt_u - if - return - end - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - i32.const 1 - i32.or - i32.or - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $2 - i32.const 2 - i32.store - local.get $0 - local.get $2 - i32.store offset=1568 - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1280 - i32.const 0 - i32.store - i32.const 2848 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1280 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1280 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1280 - i32.const 2852 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1280 - global.set $~lib/rt/tlsf/ROOT - ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 - i32.const 1073741820 - i32.ge_u - if - i32.const 1056 - i32.const 1184 - i32.const 461 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - local.get $0 - i32.const 19 - i32.add - i32.const -16 - i32.and - i32.const 4 - i32.sub - local.get $0 - i32.const 12 - i32.le_u - select - ) - (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - i32.const 256 - i32.lt_u - if - local.get $1 - i32.const 4 - i32.shr_u - local.set $1 - else - i32.const 31 - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.get $1 - local.get $1 - i32.const 536870910 - i32.lt_u - select - local.tee $1 - i32.clz - i32.sub - local.set $2 - local.get $1 - local.get $2 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $1 - local.get $2 - i32.const 7 - i32.sub - local.set $2 - end - local.get $1 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $2 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 333 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const -1 - local.get $1 - i32.shl - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $1 - i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - else - local.get $0 - i32.load - i32.const -1 - local.get $2 - i32.const 1 - i32.add - i32.shl - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $1 - i32.ctz - local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.tee $2 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 346 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - else - i32.const 0 - end - end - ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1184 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - local.get $1 - call $~lib/rt/tlsf/prepareSize - local.tee $2 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 4 - memory.size - local.tee $1 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - local.get $0 - i32.load offset=1568 - i32.ne - i32.shl - local.get $2 - i32.const 1 - i32.const 27 - local.get $2 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $2 - local.get $2 - i32.const 536870910 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.set $3 - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $3 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 498 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.gt_u - if - i32.const 0 - i32.const 1184 - i32.const 500 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $1 - local.get $2 - call $~lib/rt/tlsf/prepareBlock - local.get $1 - ) - (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741804 - i32.gt_u - if - i32.const 1056 - i32.const 1120 - i32.const 275 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.add - local.set $2 - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $2 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $3 - i32.const 4 - i32.sub - local.tee $2 - i32.const 0 - i32.store offset=4 - local.get $2 - i32.const 0 - i32.store offset=8 - local.get $2 - local.get $1 - i32.store offset=12 - local.get $2 - local.get $0 - i32.store offset=16 - local.get $3 - i32.const 16 - i32.add - ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 4 - i32.sub - local.set $1 - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - if (result i32) - local.get $1 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 563 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/tlsf/moveBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $2 - call $~lib/rt/tlsf/allocateBlock - local.tee $2 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - call $~lib/memory/memory.copy - local.get $1 - i32.const 1268 - i32.ge_u - if - local.get $0 - local.get $1 - call $~lib/rt/tlsf/freeBlock - end - local.get $2 - ) - (func $~lib/rt/pure/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.const 1073741804 - i32.gt_u - if - i32.const 1056 - i32.const 1120 - i32.const 288 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.set $0 - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - local.get $1 - i32.const 16 - i32.add - local.set $2 - local.get $0 - i32.const 1268 - i32.lt_u - if - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.get $2 - call $~lib/rt/tlsf/moveBlock - local.set $0 - else - block $__inlined_func$~lib/rt/tlsf/reallocateBlock - global.get $~lib/rt/tlsf/ROOT - local.set $3 - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.set $0 - block $folding-inner0 - local.get $2 - call $~lib/rt/tlsf/prepareSize - local.tee $5 - local.get $0 - i32.load - local.tee $6 - i32.const -4 - i32.and - local.tee $4 - i32.le_u - br_if $folding-inner0 - local.get $0 - i32.const 4 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $7 - i32.load - local.tee $8 - i32.const 1 - i32.and - if - local.get $5 - local.get $4 - i32.const 4 - i32.add - local.get $8 - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.le_u - if - local.get $3 - local.get $7 - call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $4 - local.get $6 - i32.const 3 - i32.and - i32.or - i32.store - br $folding-inner0 - end - end - local.get $3 - local.get $0 - local.get $2 - call $~lib/rt/tlsf/moveBlock - local.set $0 - br $__inlined_func$~lib/rt/tlsf/reallocateBlock - end - local.get $3 - local.get $0 - local.get $5 - call $~lib/rt/tlsf/prepareBlock - end - end - local.get $0 - i32.const 4 - i32.add - local.tee $0 - i32.const 4 - i32.sub - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 1268 - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 1120 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 1120 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - end - local.get $0 - ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1268 - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.tee $2 - i32.const 268435455 - i32.and - local.set $1 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 1120 - i32.const 122 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.eq - if - block $__inlined_func$~lib/rt/__visit_members - block $invalid - block $~lib/arraybuffer/ArrayBufferView - local.get $0 - i32.const 12 - i32.add - i32.load - br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $~lib/arraybuffer/ArrayBufferView $__inlined_func$~lib/rt/__visit_members $invalid - end - local.get $0 - i32.load offset=20 - local.tee $1 - if - local.get $1 - i32.const 1268 - i32.ge_u - if - local.get $1 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - end - br $__inlined_func$~lib/rt/__visit_members - end - unreachable - end - local.get $2 - i32.const -2147483648 - i32.and - if - i32.const 0 - i32.const 1120 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/freeBlock - else - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 1120 - i32.const 136 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.sub - local.get $2 - i32.const -268435456 - i32.and - i32.or - i32.store offset=4 - end - ) - (func $~start - i32.const 0 - i32.const 3 - call $~lib/rt/pure/__new - drop - ) -) diff --git a/tests/compiler/rc/rereturn.untouched.wat b/tests/compiler/rc/rereturn.untouched.wat deleted file mode 100644 index dc5291e315..0000000000 --- a/tests/compiler/rc/rereturn.untouched.wat +++ /dev/null @@ -1,3190 +0,0 @@ -(module - (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_none (func (param i32))) - (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 12) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") - (data (i32.const 76) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 140) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 208) "\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00") - (table $0 1 funcref) - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/rt/__rtti_base i32 (i32.const 208)) - (global $~lib/memory/__heap_base i32 (i32.const 244)) - (export "memory" (memory $0)) - (export "__new" (func $~lib/rt/pure/__new)) - (export "__renew" (func $~lib/rt/pure/__renew)) - (export "__retain" (func $~lib/rt/pure/__retain)) - (export "__release" (func $~lib/rt/pure/__release)) - (export "__rtti_base" (global $~lib/rt/__rtti_base)) - (start $~start) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 - i32.load - local.set $2 - i32.const 1 - drop - local.get $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 272 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $3 - i32.const 1 - drop - local.get $3 - i32.const 12 - i32.ge_u - if (result i32) - local.get $3 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 274 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $4 - local.get $3 - i32.const 4 - i32.shr_u - local.set $5 - else - i32.const 31 - local.get $3 - i32.clz - i32.sub - local.set $4 - local.get $3 - local.get $4 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $5 - local.get $4 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $4 - end - i32.const 1 - drop - local.get $4 - i32.const 23 - i32.lt_u - if (result i32) - local.get $5 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 287 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=4 - local.set $6 - local.get $1 - i32.load offset=8 - local.set $7 - local.get $6 - if - local.get $6 - local.get $7 - i32.store offset=8 - end - local.get $7 - if - local.get $7 - local.get $6 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $9 - local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - i32.eq - if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $9 - local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 - local.get $7 - i32.eqz - if - local.get $0 - local.set $9 - local.get $4 - local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 - local.get $0 - local.set $8 - local.get $4 - local.set $11 - local.get $9 - i32.const 1 - local.get $5 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $9 - local.set $10 - local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $4 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - i32.const 1 - drop - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 200 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - local.set $2 - i32.const 1 - drop - local.get $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 202 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.set $3 - local.get $3 - i32.const 4 - i32.add - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - local.get $5 - i32.const 1 - i32.and - if - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.add - local.get $5 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $3 - local.get $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $4 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 - i32.const 3 - i32.and - local.get $3 - i32.or - local.tee $2 - i32.store - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.add - local.get $6 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - end - end - local.get $2 - i32.const 2 - i32.and - if - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub - i32.load - local.set $6 - local.get $6 - i32.load - local.set $3 - i32.const 1 - drop - local.get $3 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 223 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.add - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $7 - local.get $7 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $6 - call $~lib/rt/tlsf/removeBlock - local.get $6 - local.get $3 - i32.const 3 - i32.and - local.get $7 - i32.or - local.tee $2 - i32.store - local.get $6 - local.set $1 - end - end - local.get $4 - local.get $5 - i32.const 2 - i32.or - i32.store - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $8 - i32.const 1 - drop - local.get $8 - i32.const 12 - i32.ge_u - if (result i32) - local.get $8 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 238 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - drop - local.get $1 - i32.const 4 - i32.add - local.get $8 - i32.add - local.get $4 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 239 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $8 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $9 - local.get $8 - i32.const 4 - i32.shr_u - local.set $10 - else - i32.const 31 - local.get $8 - i32.clz - i32.sub - local.set $9 - local.get $8 - local.get $9 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $10 - local.get $9 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $9 - end - i32.const 1 - drop - local.get $9 - i32.const 23 - i32.lt_u - if (result i32) - local.get $10 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 255 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $7 - local.get $9 - local.set $3 - local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $11 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $11 - i32.store offset=8 - local.get $11 - if - local.get $11 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.set $12 - local.get $9 - local.set $7 - local.get $10 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $9 - i32.shl - i32.or - i32.store - local.get $0 - local.set $13 - local.get $9 - local.set $12 - local.get $0 - local.set $3 - local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const 1 - local.get $10 - i32.shl - i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 - ) - (func $~lib/rt/tlsf/addMemory (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) - (local $9 i32) - i32.const 1 - drop - local.get $1 - local.get $2 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 380 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 4 - i32.add - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.sub - local.set $1 - local.get $2 - i32.const 15 - i32.const -1 - i32.xor - i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 - i32.const 0 - local.set $5 - local.get $4 - if - i32.const 1 - drop - local.get $1 - local.get $4 - i32.const 4 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 387 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 16 - i32.sub - local.get $4 - i32.eq - if - local.get $1 - i32.const 16 - i32.sub - local.set $1 - local.get $4 - i32.load - local.set $5 - else - nop - end - else - i32.const 1 - drop - local.get $1 - local.get $0 - i32.const 1572 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 400 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.set $6 - local.get $6 - i32.const 4 - i32.const 12 - i32.add - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - return - end - local.get $6 - i32.const 2 - i32.const 4 - i32.mul - i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 - i32.const 1 - i32.or - local.get $5 - i32.const 2 - i32.and - i32.or - i32.store - local.get $8 - i32.const 0 - i32.store offset=4 - local.get $8 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 4 - i32.add - local.get $7 - i32.add - local.set $4 - local.get $4 - i32.const 0 - i32.const 2 - i32.or - i32.store - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 - i32.store offset=1568 - local.get $0 - local.get $8 - call $~lib/rt/tlsf/insertBlock - i32.const 1 - ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - global.get $~lib/memory/__heap_base - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - local.set $0 - memory.size - local.set $1 - local.get $0 - i32.const 1572 - i32.add - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $2 - local.get $1 - i32.gt_s - if (result i32) - local.get $2 - local.get $1 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - local.get $0 - local.set $3 - local.get $3 - i32.const 0 - i32.store - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - i32.const 23 - i32.lt_u - local.set $4 - local.get $4 - if - local.get $3 - local.set $8 - local.get $5 - local.set $7 - i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 - i32.const 0 - local.set $8 - loop $for-loop|1 - local.get $8 - i32.const 16 - i32.lt_u - local.set $7 - local.get $7 - if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 - i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|1 - end - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $0 - i32.const 1572 - i32.add - local.set $12 - i32.const 0 - drop - local.get $3 - local.get $12 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - drop - local.get $3 - global.set $~lib/rt/tlsf/ROOT - ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 - i32.const 12 - i32.le_u - if (result i32) - i32.const 12 - else - local.get $0 - i32.const 4 - i32.add - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.sub - end - ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 - i32.const 1073741820 - i32.ge_u - if - i32.const 32 - i32.const 160 - i32.const 461 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/tlsf/computeSize - ) - (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $1 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $2 - local.get $1 - i32.const 4 - i32.shr_u - local.set $3 - else - local.get $1 - i32.const 536870910 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - else - local.get $1 - end - local.set $4 - i32.const 31 - local.get $4 - i32.clz - i32.sub - local.set $2 - local.get $4 - local.get $2 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $3 - local.get $2 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $2 - end - i32.const 1 - drop - local.get $2 - i32.const 23 - i32.lt_u - if (result i32) - local.get $3 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 333 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const 0 - i32.const -1 - i32.xor - local.get $3 - i32.shl - i32.and - local.set $6 - i32.const 0 - local.set $7 - local.get $6 - i32.eqz - if - local.get $0 - i32.load - i32.const 0 - i32.const -1 - i32.xor - local.get $2 - i32.const 1 - i32.add - i32.shl - i32.and - local.set $5 - local.get $5 - i32.eqz - if - i32.const 0 - local.set $7 - else - local.get $5 - i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 - i32.const 1 - drop - local.get $6 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 346 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 - i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 - end - else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 - i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 - end - local.get $7 - ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - i32.const 0 - drop - local.get $1 - i32.const 536870910 - i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.set $1 - end - memory.size - local.set $2 - local.get $1 - i32.const 4 - local.get $2 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 - i32.ne - i32.shl - i32.add - local.set $1 - local.get $1 - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - local.set $6 - local.get $6 - memory.grow - i32.const 0 - i32.lt_s - if - local.get $4 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - memory.size - local.set $7 - local.get $0 - local.get $2 - i32.const 16 - i32.shl - local.get $7 - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - drop - ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.set $3 - i32.const 1 - drop - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.sub - local.set $4 - local.get $4 - i32.const 4 - i32.const 12 - i32.add - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $2 - i32.add - local.set $5 - local.get $5 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $5 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const 1 - i32.const -1 - i32.xor - i32.and - i32.store - local.get $1 - local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.get $1 - local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - i32.load - i32.const 2 - i32.const -1 - i32.xor - i32.and - i32.store - end - ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 - i32.eqz - if - local.get $0 - local.get $2 - call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - i32.const 1 - drop - local.get $3 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 498 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - i32.const 1 - drop - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 500 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 - call $~lib/rt/tlsf/prepareBlock - i32.const 0 - drop - local.get $3 - ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - ) - (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741804 - i32.gt_u - if - i32.const 32 - i32.const 96 - i32.const 275 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - i32.const 16 - local.get $0 - i32.add - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $2 - i32.const 4 - i32.sub - local.set $3 - local.get $3 - i32.const 0 - i32.store offset=4 - local.get $3 - i32.const 0 - i32.store offset=8 - local.get $3 - local.get $1 - i32.store offset=12 - local.get $3 - local.get $0 - i32.store offset=16 - local.get $2 - i32.const 16 - i32.add - ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 4 - i32.sub - local.set $1 - local.get $0 - i32.const 0 - i32.ne - if (result i32) - local.get $0 - i32.const 15 - i32.and - i32.eqz - else - i32.const 0 - end - if (result i32) - local.get $1 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 563 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - i32.const 0 - drop - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/tlsf/moveBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $2 - call $~lib/rt/tlsf/allocateBlock - local.set $3 - local.get $3 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - call $~lib/memory/memory.copy - local.get $1 - global.get $~lib/memory/__heap_base - i32.ge_u - if - i32.const 0 - drop - local.get $0 - local.get $1 - call $~lib/rt/tlsf/freeBlock - end - local.get $3 - ) - (func $~lib/rt/tlsf/reallocateBlock (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) - local.get $2 - call $~lib/rt/tlsf/prepareSize - local.set $3 - local.get $1 - i32.load - local.set $4 - local.get $4 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $5 - local.get $3 - local.get $5 - i32.le_u - if - local.get $0 - local.get $1 - local.get $3 - call $~lib/rt/tlsf/prepareBlock - i32.const 0 - drop - local.get $1 - return - end - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.add - local.get $6 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $7 - local.get $7 - i32.load - local.set $8 - local.get $8 - i32.const 1 - i32.and - if - local.get $5 - i32.const 4 - i32.add - local.get $8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $6 - local.get $6 - local.get $3 - i32.ge_u - if - local.get $0 - local.get $7 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $4 - i32.const 3 - i32.and - local.get $6 - i32.or - i32.store - local.get $0 - local.get $1 - local.get $3 - call $~lib/rt/tlsf/prepareBlock - i32.const 0 - drop - local.get $1 - return - end - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/rt/tlsf/moveBlock - ) - (func $~lib/rt/tlsf/__realloc (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - local.get $0 - global.get $~lib/memory/__heap_base - i32.lt_u - if (result i32) - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.get $1 - call $~lib/rt/tlsf/moveBlock - else - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.get $1 - call $~lib/rt/tlsf/reallocateBlock - end - i32.const 4 - i32.add - ) - (func $~lib/rt/pure/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - i32.const 1073741804 - i32.gt_u - if - i32.const 32 - i32.const 96 - i32.const 288 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - i32.const 16 - local.get $1 - i32.add - call $~lib/rt/tlsf/__realloc - local.set $2 - local.get $2 - i32.const 4 - i32.sub - local.get $1 - i32.store offset=16 - local.get $2 - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/increment (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - i32.eq - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/increment - end - local.get $0 - ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $rc/rereturn/Ref#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 3 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - ) - (func $rc/rereturn/getRef (result i32) - i32.const 0 - call $rc/rereturn/Ref#constructor - ) - (func $rc/rereturn/rereturnRef (result i32) - call $rc/rereturn/getRef - ) - (func $start:rc/rereturn - call $rc/rereturn/rereturnRef - call $~lib/rt/pure/__release - ) - (func $~lib/rt/pure/finalize (param $0 i32) - i32.const 0 - drop - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/freeBlock - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.and - local.set $2 - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 122 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.eq - if - local.get $0 - i32.const 20 - i32.add - i32.const 1 - call $~lib/rt/__visit_members - i32.const 1 - drop - i32.const 1 - drop - local.get $1 - i32.const -2147483648 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/finalize - else - i32.const 1 - drop - local.get $2 - i32.const 0 - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 136 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - drop - local.get $0 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.const 1 - i32.sub - i32.or - i32.store offset=4 - end - ) - (func $~start - call $start:rc/rereturn - ) - (func $~lib/rt/pure/__visit (param $0 i32) (param $1 i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.lt_u - if - return - end - i32.const 1 - drop - i32.const 1 - drop - local.get $1 - i32.const 1 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 69 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - ) - (func $~lib/arraybuffer/ArrayBuffer~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/string/String~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/pure/__visit - end - ) - (func $rc/rereturn/Ref~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) - block $invalid - block $rc/rereturn/Ref - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $rc/rereturn/Ref $invalid - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBuffer~visit - return - end - local.get $0 - local.get $1 - call $~lib/string/String~visit - return - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit - return - end - local.get $0 - local.get $1 - call $rc/rereturn/Ref~visit - return - end - unreachable - ) -) diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat deleted file mode 100644 index 6d18a55c52..0000000000 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ /dev/null @@ -1,1054 +0,0 @@ -(module - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 1036) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1100) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s") - (data (i32.const 1164) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $rc/ternary-mismatch/gloRef (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "test1" (func $rc/ternary-mismatch/test1)) - (export "test2" (func $rc/ternary-mismatch/test2)) - (start $~start) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.tee $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 272 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and - local.tee $2 - i32.const 1073741820 - i32.lt_u - i32.const 0 - local.get $2 - i32.const 12 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 274 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 256 - i32.lt_u - if - local.get $2 - i32.const 4 - i32.shr_u - local.set $2 - else - local.get $2 - i32.const 31 - local.get $2 - i32.clz - i32.sub - local.tee $3 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $2 - local.get $3 - i32.const 7 - i32.sub - local.set $3 - end - local.get $2 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 287 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - local.set $4 - local.get $1 - i32.load offset=4 - local.tee $5 - if - local.get $5 - local.get $4 - i32.store offset=8 - end - local.get $4 - if - local.get $4 - local.get $5 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.get $2 - local.get $3 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - i32.eq - if - local.get $0 - local.get $2 - local.get $3 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.store offset=96 - local.get $4 - i32.eqz - if - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.tee $4 - i32.load offset=4 - i32.const -2 - local.get $2 - i32.rotl - i32.and - local.set $1 - local.get $4 - local.get $1 - i32.store offset=4 - local.get $1 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const -2 - local.get $3 - i32.rotl - i32.and - i32.store - end - end - end - ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 200 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - local.tee $4 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 202 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $5 - i32.load - local.tee $2 - i32.const 1 - i32.and - if - local.get $4 - i32.const -4 - i32.and - i32.const 4 - i32.add - local.get $2 - i32.const -4 - i32.and - i32.add - local.tee $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $5 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $3 - local.get $4 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $5 - i32.load - local.set $2 - end - end - local.get $4 - i32.const 2 - i32.and - if - local.get $1 - i32.const 4 - i32.sub - i32.load - local.tee $3 - i32.load - local.tee $7 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 223 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $7 - i32.const -4 - i32.and - i32.const 4 - i32.add - local.get $4 - i32.const -4 - i32.and - i32.add - local.tee $8 - i32.const 1073741820 - i32.lt_u - if (result i32) - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $3 - local.get $8 - local.get $7 - i32.const 3 - i32.and - i32.or - local.tee $4 - i32.store - local.get $3 - else - local.get $1 - end - local.set $1 - end - local.get $5 - local.get $2 - i32.const 2 - i32.or - i32.store - local.get $4 - i32.const -4 - i32.and - local.tee $3 - i32.const 1073741820 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 12 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 238 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 4 - i32.add - i32.add - local.get $5 - i32.ne - if - i32.const 0 - i32.const 1184 - i32.const 239 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 256 - i32.lt_u - if - local.get $3 - i32.const 4 - i32.shr_u - local.set $3 - else - local.get $3 - i32.const 31 - local.get $3 - i32.clz - i32.sub - local.tee $4 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $3 - local.get $4 - i32.const 7 - i32.sub - local.set $6 - end - local.get $3 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $6 - i32.const 23 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 255 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $4 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $4 - i32.store offset=8 - local.get $4 - if - local.get $4 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $3 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $1 - i32.store offset=96 - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $6 - i32.shl - i32.or - i32.store - local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 - local.get $0 - i32.load offset=4 - i32.const 1 - local.get $3 - i32.shl - i32.or - i32.store offset=4 - ) - (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $2 - i32.gt_u - if - i32.const 0 - i32.const 1184 - i32.const 380 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 19 - i32.add - i32.const -16 - i32.and - i32.const 4 - i32.sub - local.set $1 - local.get $2 - i32.const -16 - i32.and - local.get $0 - i32.load offset=1568 - local.tee $2 - if - local.get $1 - local.get $2 - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 1184 - i32.const 387 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i32.const 16 - i32.sub - i32.eq - if - local.get $2 - i32.load - local.set $4 - local.get $1 - i32.const 16 - i32.sub - local.set $1 - end - else - local.get $1 - local.get $0 - i32.const 1572 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 1184 - i32.const 400 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - end - local.get $1 - i32.sub - local.tee $2 - i32.const 20 - i32.lt_u - if - return - end - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - i32.const 1 - i32.or - i32.or - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $2 - i32.const 2 - i32.store - local.get $0 - local.get $2 - i32.store offset=1568 - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - i32.const -2 - i32.and - local.tee $2 - if (result i32) - local.get $0 - local.get $2 - i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - else - local.get $0 - i32.load - i32.const -2 - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $1 - i32.ctz - local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.tee $2 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 346 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - else - i32.const 0 - end - end - ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 4 - memory.size - local.tee $2 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - local.get $0 - i32.load offset=1568 - i32.ne - i32.shl - i32.const 65563 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.set $1 - local.get $2 - local.get $1 - local.get $1 - local.get $2 - i32.lt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - local.get $0 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 498 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - local.get $1 - i32.load - i32.const -4 - i32.and - i32.const 28 - i32.lt_u - if - i32.const 0 - i32.const 1184 - i32.const 500 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 28 - i32.sub - local.tee $3 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 28 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $2 - local.get $3 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $2 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 - ) - (func $~lib/rt/pure/__new (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - memory.size - local.tee $1 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $1 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1232 - i32.const 0 - i32.store - i32.const 2800 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $0 - i32.const 23 - i32.lt_u - if - local.get $0 - i32.const 2 - i32.shl - i32.const 1232 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $1 - loop $for-loop|1 - local.get $1 - i32.const 16 - i32.lt_u - if - local.get $1 - local.get $0 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1232 - i32.add - i32.const 0 - i32.store offset=96 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|1 - end - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - i32.const 1232 - i32.const 2804 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1232 - global.set $~lib/rt/tlsf/ROOT - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 1228 - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 1120 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 1120 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - end - local.get $0 - ) - (func $rc/ternary-mismatch/test1 (param $0 i32) (result i32) - local.get $0 - if (result i32) - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - else - global.get $rc/ternary-mismatch/gloRef - call $~lib/rt/pure/__retain - end - ) - (func $rc/ternary-mismatch/test2 (param $0 i32) (result i32) - local.get $0 - if (result i32) - global.get $rc/ternary-mismatch/gloRef - call $~lib/rt/pure/__retain - else - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - end - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.tee $2 - i32.const 268435455 - i32.and - local.set $1 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 1120 - i32.const 122 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.eq - if - block $__inlined_func$~lib/rt/__visit_members - block $invalid - block $~lib/arraybuffer/ArrayBufferView - local.get $0 - i32.const 12 - i32.add - i32.load - br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $~lib/arraybuffer/ArrayBufferView $__inlined_func$~lib/rt/__visit_members $invalid - end - local.get $0 - i32.load offset=20 - local.tee $1 - if - local.get $1 - i32.const 1228 - i32.ge_u - if - local.get $1 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - end - br $__inlined_func$~lib/rt/__visit_members - end - unreachable - end - local.get $2 - i32.const -2147483648 - i32.and - if - i32.const 0 - i32.const 1120 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 1120 - i32.const 136 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.sub - local.get $2 - i32.const -268435456 - i32.and - i32.or - i32.store offset=4 - end - ) - (func $~start - (local $0 i32) - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - global.set $rc/ternary-mismatch/gloRef - call $~lib/rt/pure/__new - drop - call $~lib/rt/pure/__new - drop - global.get $rc/ternary-mismatch/gloRef - local.tee $0 - i32.const 1228 - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) -) diff --git a/tests/compiler/rc/ternary-mismatch.untouched.wat b/tests/compiler/rc/ternary-mismatch.untouched.wat deleted file mode 100644 index 34f974c273..0000000000 --- a/tests/compiler/rc/ternary-mismatch.untouched.wat +++ /dev/null @@ -1,1748 +0,0 @@ -(module - (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_=>_none (func (param i32))) - (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 12) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") - (data (i32.const 76) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 140) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (table $0 1 funcref) - (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $rc/ternary-mismatch/gloRef (mut i32) (i32.const 0)) - (global $~lib/memory/__heap_base i32 (i32.const 204)) - (export "memory" (memory $0)) - (export "test1" (func $rc/ternary-mismatch/test1)) - (export "test2" (func $rc/ternary-mismatch/test2)) - (start $~start) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 - i32.load - local.set $2 - i32.const 1 - drop - local.get $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 272 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $3 - i32.const 1 - drop - local.get $3 - i32.const 12 - i32.ge_u - if (result i32) - local.get $3 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 274 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $4 - local.get $3 - i32.const 4 - i32.shr_u - local.set $5 - else - i32.const 31 - local.get $3 - i32.clz - i32.sub - local.set $4 - local.get $3 - local.get $4 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $5 - local.get $4 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $4 - end - i32.const 1 - drop - local.get $4 - i32.const 23 - i32.lt_u - if (result i32) - local.get $5 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 287 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=4 - local.set $6 - local.get $1 - i32.load offset=8 - local.set $7 - local.get $6 - if - local.get $6 - local.get $7 - i32.store offset=8 - end - local.get $7 - if - local.get $7 - local.get $6 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $9 - local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - i32.eq - if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $9 - local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 - local.get $7 - i32.eqz - if - local.get $0 - local.set $9 - local.get $4 - local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 - local.get $0 - local.set $8 - local.get $4 - local.set $11 - local.get $9 - i32.const 1 - local.get $5 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $9 - local.set $10 - local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $4 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - i32.const 1 - drop - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 200 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - local.set $2 - i32.const 1 - drop - local.get $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 202 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.set $3 - local.get $3 - i32.const 4 - i32.add - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - local.get $5 - i32.const 1 - i32.and - if - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.add - local.get $5 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $3 - local.get $3 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $4 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 - i32.const 3 - i32.and - local.get $3 - i32.or - local.tee $2 - i32.store - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.add - local.get $6 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 - end - end - local.get $2 - i32.const 2 - i32.and - if - local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub - i32.load - local.set $6 - local.get $6 - i32.load - local.set $3 - i32.const 1 - drop - local.get $3 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 223 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.add - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $7 - local.get $7 - i32.const 1073741820 - i32.lt_u - if - local.get $0 - local.get $6 - call $~lib/rt/tlsf/removeBlock - local.get $6 - local.get $3 - i32.const 3 - i32.and - local.get $7 - i32.or - local.tee $2 - i32.store - local.get $6 - local.set $1 - end - end - local.get $4 - local.get $5 - i32.const 2 - i32.or - i32.store - local.get $2 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $8 - i32.const 1 - drop - local.get $8 - i32.const 12 - i32.ge_u - if (result i32) - local.get $8 - i32.const 1073741820 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 238 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - drop - local.get $1 - i32.const 4 - i32.add - local.get $8 - i32.add - local.get $4 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 239 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $8 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $9 - local.get $8 - i32.const 4 - i32.shr_u - local.set $10 - else - i32.const 31 - local.get $8 - i32.clz - i32.sub - local.set $9 - local.get $8 - local.get $9 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $10 - local.get $9 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $9 - end - i32.const 1 - drop - local.get $9 - i32.const 23 - i32.lt_u - if (result i32) - local.get $10 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 255 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $7 - local.get $9 - local.set $3 - local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $11 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $11 - i32.store offset=8 - local.get $11 - if - local.get $11 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.set $12 - local.get $9 - local.set $7 - local.get $10 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $9 - i32.shl - i32.or - i32.store - local.get $0 - local.set $13 - local.get $9 - local.set $12 - local.get $0 - local.set $3 - local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const 1 - local.get $10 - i32.shl - i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 - ) - (func $~lib/rt/tlsf/addMemory (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) - (local $9 i32) - i32.const 1 - drop - local.get $1 - local.get $2 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 380 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 4 - i32.add - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.sub - local.set $1 - local.get $2 - i32.const 15 - i32.const -1 - i32.xor - i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 - i32.const 0 - local.set $5 - local.get $4 - if - i32.const 1 - drop - local.get $1 - local.get $4 - i32.const 4 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 387 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 16 - i32.sub - local.get $4 - i32.eq - if - local.get $1 - i32.const 16 - i32.sub - local.set $1 - local.get $4 - i32.load - local.set $5 - else - nop - end - else - i32.const 1 - drop - local.get $1 - local.get $0 - i32.const 1572 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 400 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.set $6 - local.get $6 - i32.const 4 - i32.const 12 - i32.add - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - return - end - local.get $6 - i32.const 2 - i32.const 4 - i32.mul - i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 - i32.const 1 - i32.or - local.get $5 - i32.const 2 - i32.and - i32.or - i32.store - local.get $8 - i32.const 0 - i32.store offset=4 - local.get $8 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 4 - i32.add - local.get $7 - i32.add - local.set $4 - local.get $4 - i32.const 0 - i32.const 2 - i32.or - i32.store - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 - i32.store offset=1568 - local.get $0 - local.get $8 - call $~lib/rt/tlsf/insertBlock - i32.const 1 - ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - global.get $~lib/memory/__heap_base - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - local.set $0 - memory.size - local.set $1 - local.get $0 - i32.const 1572 - i32.add - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $2 - local.get $1 - i32.gt_s - if (result i32) - local.get $2 - local.get $1 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - local.get $0 - local.set $3 - local.get $3 - i32.const 0 - i32.store - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - i32.const 23 - i32.lt_u - local.set $4 - local.get $4 - if - local.get $3 - local.set $8 - local.get $5 - local.set $7 - i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 - i32.const 0 - local.set $8 - loop $for-loop|1 - local.get $8 - i32.const 16 - i32.lt_u - local.set $7 - local.get $7 - if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 - i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|1 - end - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $0 - i32.const 1572 - i32.add - local.set $12 - i32.const 0 - drop - local.get $3 - local.get $12 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - drop - local.get $3 - global.set $~lib/rt/tlsf/ROOT - ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 - i32.const 12 - i32.le_u - if (result i32) - i32.const 12 - else - local.get $0 - i32.const 4 - i32.add - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - i32.const 4 - i32.sub - end - ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 - i32.const 1073741820 - i32.ge_u - if - i32.const 32 - i32.const 160 - i32.const 461 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/tlsf/computeSize - ) - (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $1 - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $2 - local.get $1 - i32.const 4 - i32.shr_u - local.set $3 - else - local.get $1 - i32.const 536870910 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - else - local.get $1 - end - local.set $4 - i32.const 31 - local.get $4 - i32.clz - i32.sub - local.set $2 - local.get $4 - local.get $2 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $3 - local.get $2 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $2 - end - i32.const 1 - drop - local.get $2 - i32.const 23 - i32.lt_u - if (result i32) - local.get $3 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 333 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - i32.const 0 - i32.const -1 - i32.xor - local.get $3 - i32.shl - i32.and - local.set $6 - i32.const 0 - local.set $7 - local.get $6 - i32.eqz - if - local.get $0 - i32.load - i32.const 0 - i32.const -1 - i32.xor - local.get $2 - i32.const 1 - i32.add - i32.shl - i32.and - local.set $5 - local.get $5 - i32.eqz - if - i32.const 0 - local.set $7 - else - local.get $5 - i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 - i32.const 1 - drop - local.get $6 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 346 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 - i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 - end - else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 - i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 - end - local.get $7 - ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - i32.const 0 - drop - local.get $1 - i32.const 536870910 - i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.set $1 - end - memory.size - local.set $2 - local.get $1 - i32.const 4 - local.get $2 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 - i32.ne - i32.shl - i32.add - local.set $1 - local.get $1 - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - local.set $6 - local.get $6 - memory.grow - i32.const 0 - i32.lt_s - if - local.get $4 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - memory.size - local.set $7 - local.get $0 - local.get $2 - i32.const 16 - i32.shl - local.get $7 - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - drop - ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.set $3 - i32.const 1 - drop - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.sub - local.set $4 - local.get $4 - i32.const 4 - i32.const 12 - i32.add - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $2 - i32.add - local.set $5 - local.get $5 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $5 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const 1 - i32.const -1 - i32.xor - i32.and - i32.store - local.get $1 - local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.get $1 - local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - i32.load - i32.const 2 - i32.const -1 - i32.xor - i32.and - i32.store - end - ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 - i32.eqz - if - local.get $0 - local.get $2 - call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - i32.const 1 - drop - local.get $3 - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 498 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - i32.const 1 - drop - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 500 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 - call $~lib/rt/tlsf/prepareBlock - i32.const 0 - drop - local.get $3 - ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - ) - (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741804 - i32.gt_u - if - i32.const 32 - i32.const 96 - i32.const 275 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - i32.const 16 - local.get $0 - i32.add - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $2 - i32.const 4 - i32.sub - local.set $3 - local.get $3 - i32.const 0 - i32.store offset=4 - local.get $3 - i32.const 0 - i32.store offset=8 - local.get $3 - local.get $1 - i32.store offset=12 - local.get $3 - local.get $0 - i32.store offset=16 - local.get $2 - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/increment (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - i32.eq - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/increment - end - local.get $0 - ) - (func $rc/ternary-mismatch/Ref#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 3 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - ) - (func $rc/ternary-mismatch/getRef (result i32) - i32.const 0 - call $rc/ternary-mismatch/Ref#constructor - ) - (func $rc/ternary-mismatch/test1 (param $0 i32) (result i32) - local.get $0 - if (result i32) - call $rc/ternary-mismatch/getRef - else - global.get $rc/ternary-mismatch/gloRef - call $~lib/rt/pure/__retain - end - ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $rc/ternary-mismatch/test2 (param $0 i32) (result i32) - local.get $0 - if (result i32) - global.get $rc/ternary-mismatch/gloRef - call $~lib/rt/pure/__retain - else - call $rc/ternary-mismatch/getRef - end - ) - (func $start:rc/ternary-mismatch - i32.const 0 - call $rc/ternary-mismatch/Ref#constructor - global.set $rc/ternary-mismatch/gloRef - i32.const 1 - call $rc/ternary-mismatch/test1 - call $~lib/rt/pure/__release - i32.const 0 - call $rc/ternary-mismatch/test1 - call $~lib/rt/pure/__release - i32.const 1 - call $rc/ternary-mismatch/test2 - call $~lib/rt/pure/__release - i32.const 0 - call $rc/ternary-mismatch/test2 - call $~lib/rt/pure/__release - global.get $rc/ternary-mismatch/gloRef - call $~lib/rt/pure/__release - ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - i32.const 0 - drop - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/pure/finalize (param $0 i32) - i32.const 0 - drop - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/freeBlock - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.and - local.set $2 - i32.const 0 - drop - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 122 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.eq - if - local.get $0 - i32.const 20 - i32.add - i32.const 1 - call $~lib/rt/__visit_members - i32.const 1 - drop - i32.const 1 - drop - local.get $1 - i32.const -2147483648 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/finalize - else - i32.const 1 - drop - local.get $2 - i32.const 0 - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 136 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - drop - local.get $0 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.const 1 - i32.sub - i32.or - i32.store offset=4 - end - ) - (func $~start - call $start:rc/ternary-mismatch - ) - (func $~lib/rt/pure/__visit (param $0 i32) (param $1 i32) - local.get $0 - global.get $~lib/memory/__heap_base - i32.lt_u - if - return - end - i32.const 1 - drop - i32.const 1 - drop - local.get $1 - i32.const 1 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 69 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - ) - (func $~lib/arraybuffer/ArrayBuffer~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/string/String~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/pure/__visit - end - ) - (func $rc/ternary-mismatch/Ref~visit (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) - block $invalid - block $rc/ternary-mismatch/Ref - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $rc/ternary-mismatch/Ref $invalid - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBuffer~visit - return - end - local.get $0 - local.get $1 - call $~lib/string/String~visit - return - end - local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~visit - return - end - local.get $0 - local.get $1 - call $rc/ternary-mismatch/Ref~visit - return - end - unreachable - ) -) From d039865779b1f1d066c045941d0a015b5d9b5351 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 2 Dec 2021 03:45:40 +0100 Subject: [PATCH 079/175] refactor --- .eslintrc.cjs | 4 +- bin/asinit.js | 84 ++++++++++++++-------------- cli/index.js | 99 +++++++++++++++++---------------- scripts/build.js | 14 ++--- src/glue/js/collections.js | 2 - tests/compiler.js | 38 ++++++------- tests/parser.js | 20 +++---- util/README.md | 21 ++++--- util/browser/process.js | 14 +---- util/colors.d.ts | 38 ------------- util/cpu.d.ts | 7 +++ util/cpu.js | 5 ++ util/diff.d.ts | 1 - util/diff.js | 29 ---------- util/find.d.ts | 2 +- util/node.d.ts | 9 +++ util/node.js | 8 +-- util/options.d.ts | 9 ++- util/options.js | 7 ++- util/terminal.d.ts | 52 +++++++++++++++++ util/{colors.js => terminal.js} | 6 +- util/text.d.ts | 26 +++++++++ util/{utf8.js => text.js} | 68 +++++++++++++--------- util/tsconfig.json | 3 + util/utf8.d.ts | 29 ---------- util/{fetch.d.ts => web.d.ts} | 8 ++- util/{fetch.js => web.js} | 9 ++- 27 files changed, 316 insertions(+), 296 deletions(-) delete mode 100644 util/colors.d.ts delete mode 100644 util/diff.d.ts delete mode 100644 util/diff.js create mode 100644 util/terminal.d.ts rename util/{colors.js => terminal.js} (89%) create mode 100644 util/text.d.ts rename util/{utf8.js => text.js} (61%) delete mode 100644 util/utf8.d.ts rename util/{fetch.d.ts => web.d.ts} (51%) rename util/{fetch.js => web.js} (88%) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index d399cc2367..dce09ed1ec 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -15,9 +15,9 @@ module.exports = { // eslint-disable-line no-undef ecmaFeatures: {} }, globals: { + "globalThis": "readonly", "BigInt64Array": "readonly", - "BigUint64Array": "readonly", - "__non_webpack_require__": "readonly" + "BigUint64Array": "readonly" }, // === General rules ========================================================= diff --git a/bin/asinit.js b/bin/asinit.js index 84802ca44d..fdbdc1a7ca 100644 --- a/bin/asinit.js +++ b/bin/asinit.js @@ -4,7 +4,7 @@ import fs from "fs"; import path from "path"; import { createRequire } from "module"; import { fileURLToPath } from "url"; -import { stdout as colors } from "../util/colors.js"; +import { stdoutColors } from "../util/terminal.js"; import * as optionsUtil from "../util/options.js"; const dirname = path.dirname(fileURLToPath(import.meta.url)); @@ -79,7 +79,7 @@ function printHelp() { "Sets up a new AssemblyScript project or updates an existing one.", "For example, to create a new project in the current directory:", "", - " " + colors.cyan("asinit") + " .", + " " + stdoutColors.cyan("asinit") + " .", ].join("\n")); process.exit(0); } @@ -132,11 +132,11 @@ const formatPath = filePath => "./" + path.relative(projectDir, filePath).replac console.log([ "Version: " + version, "", - colors.white([ + stdoutColors.white([ "This command will make sure that the following files exist in the project", "directory '" + projectDir + "':" ].join("\n")), - ...paths.map(([filePath, description]) => "\n " + colors.cyan(formatPath(filePath)) + "\n " + description), + ...paths.map(([filePath, description]) => "\n " + stdoutColors.cyan(formatPath(filePath)) + "\n " + description), "", "The command will try to update existing files to match the correct settings", "for this instance of the compiler in '" + compilerDir + "'.", @@ -169,40 +169,40 @@ function createProject(answer) { } console.log([ - colors.green("Done!"), + stdoutColors.green("Done!"), "", "Don't forget to install dependencies before you start:", "", - colors.white(" " + commands[pm].install), + stdoutColors.white(" " + commands[pm].install), "", - "To edit the entry file, open '" + colors.cyan("assembly/index.ts") + "' in your editor of choice.", + "To edit the entry file, open '" + stdoutColors.cyan("assembly/index.ts") + "' in your editor of choice.", "Create as many additional files as necessary and use them as imports.", "", "To build the entry file to WebAssembly when you are ready, run:", "", - colors.white(" " + commands[pm].run + " asbuild"), + stdoutColors.white(" " + commands[pm].run + " asbuild"), "", "Running the command above creates the following binaries incl. their respective", "text format representations and source maps:", "", - colors.cyan(" ./build/untouched.wasm"), - colors.cyan(" ./build/untouched.wasm.map"), - colors.cyan(" ./build/untouched.wat"), + stdoutColors.cyan(" ./build/untouched.wasm"), + stdoutColors.cyan(" ./build/untouched.wasm.map"), + stdoutColors.cyan(" ./build/untouched.wat"), "", " ^ The untouched WebAssembly module as generated by the compiler.", " This one matches your sources exactly, without any optimizations.", "", - colors.cyan(" ./build/optimized.wasm"), - colors.cyan(" ./build/optimized.wasm.map"), - colors.cyan(" ./build/optimized.wat"), + stdoutColors.cyan(" ./build/optimized.wasm"), + stdoutColors.cyan(" ./build/optimized.wasm.map"), + stdoutColors.cyan(" ./build/optimized.wat"), "", " ^ The optimized WebAssembly module using default optimization settings.", - " You can change the optimization settings in '" + colors.cyan("package.json")+ "'.", + " You can change the optimization settings in '" + stdoutColors.cyan("package.json")+ "'.", "", ...(useNode ? [ "To run the tests, do:", "", - colors.white(" " + commands[pm].test), + stdoutColors.white(" " + commands[pm].test), "" ] : []), "The AssemblyScript documentation covers all the details:", @@ -220,7 +220,7 @@ if (cliOptions.options.yes) { input: process.stdin, output: process.stdout }); - rl.question(colors.white("Do you want to proceed?") + " [Y/n] ", result => { + rl.question(stdoutColors.white("Do you want to proceed?") + " [Y/n] ", result => { rl.close(); createProject(result); }); @@ -230,9 +230,9 @@ function ensureProjectDirectory() { console.log("- Making sure that the project directory exists..."); if (!fs.existsSync(projectDir)) { fs.mkdirSync(projectDir); - console.log(colors.green(" Created: ") + projectDir); + console.log(stdoutColors.green(" Created: ") + projectDir); } else { - console.log(colors.yellow(" Exists: ") + projectDir); + console.log(stdoutColors.yellow(" Exists: ") + projectDir); } console.log(); } @@ -241,9 +241,9 @@ function ensureAssemblyDirectory() { console.log("- Making sure that the 'assembly' directory exists..."); if (!fs.existsSync(assemblyDir)) { fs.mkdirSync(assemblyDir); - console.log(colors.green(" Created: ") + assemblyDir); + console.log(stdoutColors.green(" Created: ") + assemblyDir); } else { - console.log(colors.yellow(" Exists: ") + assemblyDir); + console.log(stdoutColors.yellow(" Exists: ") + assemblyDir); } console.log(); } @@ -258,13 +258,13 @@ function ensureTsconfigJson() { "./**/*.ts" ] }, null, 2)); - console.log(colors.green(" Created: ") + tsconfigFile); + console.log(stdoutColors.green(" Created: ") + tsconfigFile); } else { let tsconfig = JSON.parse(fs.readFileSync(tsconfigFile, "utf8")); tsconfig["extends"] = base; fs.writeFileSync(tsconfigFile, JSON.stringify(tsconfig, null, 2)); - console.log(colors.green(" Updated: ") + tsconfigFile); + console.log(stdoutColors.green(" Updated: ") + tsconfigFile); } console.log(); } @@ -294,9 +294,9 @@ function ensureAsconfigJson() { }, options: {} }, null, 2)); - console.log(colors.green(" Created: ") + asconfigFile); + console.log(stdoutColors.green(" Created: ") + asconfigFile); } else { - console.log(colors.yellow(" Exists: ") + asconfigFile); + console.log(stdoutColors.yellow(" Exists: ") + asconfigFile); } console.log(); } @@ -311,9 +311,9 @@ function ensureEntryFile() { " return a + b;", "}" ].join("\n") + "\n"); - console.log(colors.green(" Created: ") + entryFile); + console.log(stdoutColors.green(" Created: ") + entryFile); } else { - console.log(colors.yellow(" Exists: ") + entryFile); + console.log(stdoutColors.yellow(" Exists: ") + entryFile); } console.log(); } @@ -322,9 +322,9 @@ function ensureBuildDirectory() { console.log("- Making sure that the 'build' directory exists..."); if (!fs.existsSync(buildDir)) { fs.mkdirSync(buildDir); - console.log(colors.green(" Created: ") + buildDir); + console.log(stdoutColors.green(" Created: ") + buildDir); } else { - console.log(colors.yellow(" Exists: ") + buildDir); + console.log(stdoutColors.yellow(" Exists: ") + buildDir); } console.log(); } @@ -337,9 +337,9 @@ function ensureGitignore() { "*.wasm.map", "*.asm.js" ].join("\n") + "\n"); - console.log(colors.green(" Created: ") + gitignoreFile); + console.log(stdoutColors.green(" Created: ") + gitignoreFile); } else { - console.log(colors.yellow(" Exists: ") + gitignoreFile); + console.log(stdoutColors.yellow(" Exists: ") + gitignoreFile); } console.log(); } @@ -367,7 +367,7 @@ function ensurePackageJson() { "assemblyscript": "^" + version } }, null, 2)); - console.log(colors.green(" Created: ") + packageFile); + console.log(stdoutColors.green(" Created: ") + packageFile); } else { let pkg = JSON.parse(fs.readFileSync(packageFile)); let scripts = pkg.scripts || {}; @@ -398,9 +398,9 @@ function ensurePackageJson() { } if (updated) { fs.writeFileSync(packageFile, JSON.stringify(pkg, null, 2)); - console.log(colors.green(" Updated: ") + packageFile); + console.log(stdoutColors.green(" Updated: ") + packageFile); } else { - console.log(colors.yellow(" Exists: ") + packageFile); + console.log(stdoutColors.yellow(" Exists: ") + packageFile); } } console.log(); @@ -421,9 +421,9 @@ function ensureIndexJs() { "const wasmModule = loader.instantiateSync(fs.readFileSync(__dirname + \"/build/optimized.wasm\"), imports);", "module.exports = wasmModule.exports;" ].join("\n") + "\n"); - console.log(colors.green(" Created: ") + indexFile); + console.log(stdoutColors.green(" Created: ") + indexFile); } else { - console.log(colors.yellow(" Exists: ") + indexFile); + console.log(stdoutColors.yellow(" Exists: ") + indexFile); } console.log(); } @@ -432,9 +432,9 @@ function ensureTestsDirectory() { console.log("- Making sure that the 'tests' directory exists..."); if (!fs.existsSync(testsDir)) { fs.mkdirSync(testsDir); - console.log(colors.green(" Created: ") + testsDir); + console.log(stdoutColors.green(" Created: ") + testsDir); } else { - console.log(colors.yellow(" Exists: ") + testsDir); + console.log(stdoutColors.yellow(" Exists: ") + testsDir); } console.log(); } @@ -448,9 +448,9 @@ function ensureTestsIndexJs() { "assert.strictEqual(myModule.add(1, 2), 3);", "console.log(\"ok\");" ].join("\n") + "\n"); - console.log(colors.green(" Created: ") + testsIndexFile); + console.log(stdoutColors.green(" Created: ") + testsIndexFile); } else { - console.log(colors.yellow(" Exists: ") + testsIndexFile); + console.log(stdoutColors.yellow(" Exists: ") + testsIndexFile); } console.log(); } @@ -479,9 +479,9 @@ function ensureIndexHtml() { " ", "", ].join("\n") + "\n"); - console.log(colors.green(" Created: ") + indexHtml); + console.log(stdoutColors.green(" Created: ") + indexHtml); } else { - console.log(colors.yellow(" Exists: ") + indexHtml); + console.log(stdoutColors.yellow(" Exists: ") + indexHtml); } console.log(); } diff --git a/cli/index.js b/cli/index.js index 8d0bc889eb..778117bf7f 100644 --- a/cli/index.js +++ b/cli/index.js @@ -28,9 +28,9 @@ */ import { fs, module, path, process } from "../util/node.js"; -import fetch from "../util/fetch.js"; -import * as utf8 from "../util/utf8.js"; -import * as colorsUtil from "../util/colors.js"; +import { fetch } from "../util/web.js"; +import { Colors} from "../util/terminal.js"; +import { utf8 } from "../util/text.js"; import * as optionsUtil from "../util/options.js"; import * as generated from "./index.generated.js"; @@ -211,12 +211,11 @@ export async function main(argv, options) { let opts = optionsResult.options; argv = optionsResult.arguments; + const stdoutColors = new Colors(stdout); + const stderrColors = new Colors(stderr); if (opts.noColors) { - colorsUtil.stdout.enabled = - colorsUtil.stderr.enabled = false; - } else { - colorsUtil.stdout.stream = stdout; - colorsUtil.stderr.stream = stderr; + stdoutColors.enabled = false; + stderrColors.enabled = false; } // Check for unknown options @@ -224,7 +223,7 @@ export async function main(argv, options) { if (unknownOpts.length) { unknownOpts.forEach(arg => { stderr.write( - `${colorsUtil.stderr.yellow("WARNING ")}Unknown option '${arg}'%{EOL}` + `${stderrColors.yellow("WARNING ")}Unknown option '${arg}'%{EOL}` ); }); } @@ -233,7 +232,7 @@ export async function main(argv, options) { const trailingArgv = optionsResult.trailing; if (trailingArgv.length) { stderr.write( - `${colorsUtil.stderr.yellow("WARNING ")}Unsupported trailing arguments: ${trailingArgv.join(" ")}${EOL}` + `${stderrColors.yellow("WARNING ")}Unsupported trailing arguments: ${trailingArgv.join(" ")}${EOL}` ); } @@ -242,7 +241,7 @@ export async function main(argv, options) { // Prepares the result object var prepareResult = (error, result = {}) => { if (error) { - stderr.write(`${colorsUtil.stderr.red("FAILURE ")}${error.stack.replace(/^ERROR: /i, "")}${EOL}`); + stderr.write(`${stderrColors.red("FAILURE ")}${error.stack.replace(/^ERROR: /i, "")}${EOL}`); } if (module) module.dispose(); return Object.assign({ error, stdout, stderr, stats }, result); @@ -275,18 +274,18 @@ export async function main(argv, options) { // Print the help message if requested or no source files are provided if (opts.help || (!argv.length && !configHasEntries)) { var out = opts.help ? stdout : stderr; - var color = opts.help ? colorsUtil.stdout : colorsUtil.stderr; + var colors = opts.help ? stdoutColors : stderrColors; out.write([ - color.white("SYNTAX"), - " " + color.cyan("asc") + " [entryFile ...] [options]", + colors.white("SYNTAX"), + " " + colors.cyan("asc") + " [entryFile ...] [options]", "", - color.white("EXAMPLES"), - " " + color.cyan("asc") + " hello" + extension.ext, - " " + color.cyan("asc") + " hello" + extension.ext + " -b hello.wasm -t hello.wat", - " " + color.cyan("asc") + " hello1" + extension.ext + " hello2" + extension.ext + " -b -O > hello.wasm", - " " + color.cyan("asc") + " --config asconfig.json --target release", + colors.white("EXAMPLES"), + " " + colors.cyan("asc") + " hello" + extension.ext, + " " + colors.cyan("asc") + " hello" + extension.ext + " -b hello.wasm -t hello.wat", + " " + colors.cyan("asc") + " hello1" + extension.ext + " hello2" + extension.ext + " -b -O > hello.wasm", + " " + colors.cyan("asc") + " --config asconfig.json --target release", "", - color.white("OPTIONS"), + colors.white("OPTIONS"), ].concat( optionsUtil.help(generated.options, 24, EOL) ).join(EOL) + EOL); @@ -1144,6 +1143,7 @@ export async function main(argv, options) { return prepareResult(null); + // Default implementation to read files on node async function readFileNode(filename, baseDir) { let name = path.resolve(baseDir, filename); try { @@ -1154,6 +1154,7 @@ export async function main(argv, options) { } } + // Default implementation to write files on node async function writeFileNode(filename, contents, baseDir) { try { stats.writeCount++; @@ -1167,6 +1168,7 @@ export async function main(argv, options) { } } + // Default implementation to list files on node async function listFilesNode(dirname, baseDir) { try { stats.readCount++; @@ -1177,6 +1179,7 @@ export async function main(argv, options) { } } + // Writes to stdout function writeStdout(contents) { if (!writeStdout.used) { writeStdout.used = true; @@ -1184,6 +1187,34 @@ export async function main(argv, options) { } stdout.write(contents); } + + // Crash handler + function crash(stage, e) { + const BAR = stdoutColors.red("▌ "); + console.error([ + EOL, + BAR, "Whoops, the AssemblyScript compiler has crashed during ", stage, " :-(", EOL, + BAR, EOL, + (typeof e.stack === "string" + ? [ + BAR, "Here is the stack trace hinting at the problem, perhaps it's useful?", EOL, + BAR, EOL, + e.stack.replace(/^/mg, BAR), EOL + ] + : [ + BAR, "There is no stack trace. Perhaps a Binaryen exception above / in console?", EOL, + BAR, EOL, + BAR, "> " + e.stack, EOL + ] + ).join(""), + BAR, EOL, + BAR, "If you see where the error is, feel free to send us a pull request. If not,", EOL, + BAR, "please let us know: https://github.com/AssemblyScript/assemblyscript/issues", EOL, + BAR, EOL, + BAR, "Thank you!", EOL + ].join("")); + process.exit(1); + } } function isObject(arg) { @@ -1381,32 +1412,4 @@ export const tscOptions = { allowJs: false }; -// Gracefully handle crashes -function crash(stage, e) { - const BAR = colorsUtil.stdout.red("▌ "); - console.error([ - EOL, - BAR, "Whoops, the AssemblyScript compiler has crashed during ", stage, " :-(", EOL, - BAR, EOL, - (typeof e.stack === "string" - ? [ - BAR, "Here is the stack trace hinting at the problem, perhaps it's useful?", EOL, - BAR, EOL, - e.stack.replace(/^/mg, BAR), EOL - ] - : [ - BAR, "There is no stack trace. Perhaps a Binaryen exception above / in console?", EOL, - BAR, EOL, - BAR, "> " + e.stack, EOL - ] - ).join(""), - BAR, EOL, - BAR, "If you see where the error is, feel free to send us a pull request. If not,", EOL, - BAR, "please let us know: https://github.com/AssemblyScript/assemblyscript/issues", EOL, - BAR, EOL, - BAR, "Thank you!", EOL - ].join("")); - process.exit(1); -} - export * as default from "./index.js"; diff --git a/scripts/build.js b/scripts/build.js index 2c1beaf78b..bb552d1ab8 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -5,7 +5,7 @@ import childProcess from "child_process"; import esbuild from "esbuild"; import glob from "glob"; import { createRequire } from "module"; -import { stdout as colors } from "../util/colors.js"; +import { stdoutColors } from "../util/terminal.js"; const require = createRequire(import.meta.url); const dirname = path.dirname(fileURLToPath(import.meta.url)); @@ -40,9 +40,9 @@ function reportPlugin(name) { build.onEnd(({ errors, warnings }) => { const duration = Date.now() - startTime; if (errors.length) { - console.log(`${time()} - ${name} - ${colors.red("ERROR")} (${errors.length} errors, ${warnings.length} warnings, ${duration} ms)`); + console.log(`${time()} - ${name} - ${stdoutColors.red("ERROR")} (${errors.length} errors, ${warnings.length} warnings, ${duration} ms)`); } else { - console.log(`${time()} - ${name} - ${colors.green("SUCCESS")} (${warnings.length} warnings, ${duration} ms)`); + console.log(`${time()} - ${name} - ${stdoutColors.green("SUCCESS")} (${warnings.length} warnings, ${duration} ms)`); } }); } @@ -180,11 +180,11 @@ const webPlugin = { }).on("error", err => { const duration = Date.now() - startTime; console.log(stdout.join("")); - console.log(`${time()} - ${"web"} - ${colors.red("ERROR")} (had errors, ${duration} ms)`); + console.log(`${time()} - ${"web"} - ${stdoutColors.red("ERROR")} (had errors, ${duration} ms)`); }).on("close", code => { if (code) return; const duration = Date.now() - startTime; - console.log(`${time()} - ${"web"} - ${colors.green("SUCCESS")} (no errors, ${duration} ms)`); + console.log(`${time()} - ${"web"} - ${stdoutColors.green("SUCCESS")} (no errors, ${duration} ms)`); }); }); } @@ -251,12 +251,12 @@ function buildDefinitions() { buildingDefinitions = false; const duration = Date.now() - startTime; console.log(stdout.join("")); - console.log(`${time()} - ${"dts"} - ${colors.red("ERROR")} (had errors, ${duration} ms)`); + console.log(`${time()} - ${"dts"} - ${stdoutColors.red("ERROR")} (had errors, ${duration} ms)`); }).on("close", code => { buildingDefinitions = false; if (code) return; const duration = Date.now() - startTime; - console.log(`${time()} - ${"dts"} - ${colors.green("SUCCESS")} (no errors, ${duration} ms)`); + console.log(`${time()} - ${"dts"} - ${stdoutColors.green("SUCCESS")} (no errors, ${duration} ms)`); }); } diff --git a/src/glue/js/collections.js b/src/glue/js/collections.js index aff8f5217b..62c0a0c509 100644 --- a/src/glue/js/collections.js +++ b/src/glue/js/collections.js @@ -3,8 +3,6 @@ * @license Apache-2.0 */ -/* eslint-disable no-undef */ - globalThis.Map_keys = function Map_keys(map) { return Array.from(map.keys()); }; diff --git a/tests/compiler.js b/tests/compiler.js index b0b7f1c8c1..9f04e8980c 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -7,10 +7,10 @@ import { createRequire } from "module"; import { fileURLToPath } from "url"; import { WASI } from "wasi"; import glob from "glob"; -import { stdout as colors } from "../util/colors.js"; +import { stdoutColors } from "../util/terminal.js"; import * as optionsUtil from "../util/options.js"; import { coreCount, threadCount } from "../util/cpu.js"; -import diff from "../util/diff.js"; +import { diff } from "../util/text.js"; import { Rtrace } from "../lib/rtrace/index.js"; import asc from "../dist/asc.js"; @@ -60,10 +60,10 @@ const argv = opts.arguments; if (args.help) { console.log([ - colors.white("SYNTAX"), - " " + colors.cyan("npm run test:compiler --") + " [test1, test2 ...] [options]", + stdoutColors.white("SYNTAX"), + " " + stdoutColors.cyan("npm run test:compiler --") + " [test1, test2 ...] [options]", "", - colors.white("OPTIONS"), + stdoutColors.white("OPTIONS"), optionsUtil.help(config) ].join(os.EOL) + os.EOL); process.exit(0); @@ -79,7 +79,7 @@ function getTests() { if (argv.length) { // run matching tests only tests = tests.filter(filename => argv.indexOf(filename.replace(/\.ts$/, "")) >= 0); if (!tests.length) { - console.log(colors.red("FAILURE: ") + colors.white("No matching tests: " + argv.join(" ") + "\n")); + console.log(stdoutColors.red("FAILURE: ") + stdoutColors.white("No matching tests: " + argv.join(" ") + "\n")); process.exit(1); } } @@ -96,9 +96,9 @@ function section(title) { const hrtime = process.hrtime(start); const time = `${(hrtime[0] * 1e9 + hrtime[1] / 1e6).toFixed(3)} ms`; switch (code) { - case SUCCESS: console.log(" " + colors.green("SUCCESS") + " (" + time + ")\n"); break; - default: console.log(" " + colors.red("FAILURE") + " (" + time + ")\n"); break; - case SKIPPED: console.log(" " + colors.yellow("SKIPPED") + " (" + time + ")\n"); break; + case SUCCESS: console.log(" " + stdoutColors.green("SUCCESS") + " (" + time + ")\n"); break; + default: console.log(" " + stdoutColors.red("FAILURE") + " (" + time + ")\n"); break; + case SKIPPED: console.log(" " + stdoutColors.yellow("SKIPPED") + " (" + time + ")\n"); break; } } }; @@ -109,7 +109,7 @@ const SKIPPED = 2; // Runs a single test async function runTest(basename) { - console.log(colors.white("# compiler/" + basename) + "\n"); + console.log(stdoutColors.white("# compiler/" + basename) + "\n"); const configPath = path.join(basedir, basename + ".json"); const config = fs.existsSync(configPath) ? require(configPath) : {}; @@ -152,7 +152,7 @@ async function runTest(basename) { } }); if (missing_features.length) { - console.log("- " + colors.yellow("feature SKIPPED") + " (" + missing_features.join(", ") + ")\n"); + console.log("- " + stdoutColors.yellow("feature SKIPPED") + " (" + missing_features.join(", ") + ")\n"); return prepareResult(SKIPPED, "feature not enabled: " + missing_features.join(", ")); } } @@ -215,7 +215,7 @@ async function runTest(basename) { const actual = stdout.toString().replace(/\r\n/g, "\n"); if (args.create) { fs.writeFileSync(path.join(basedir, basename + ".untouched.wat"), actual, { encoding: "utf8" }); - console.log(" " + colors.yellow("Created fixture")); + console.log(" " + stdoutColors.yellow("Created fixture")); compareFixture.end(SKIPPED); } else { const expected = fs.readFileSync(path.join(basedir, basename + ".untouched.wat"), { encoding: "utf8" }).replace(/\r\n/g, "\n"); @@ -359,7 +359,7 @@ async function testInstantiate(binaryBuffer, glue, stderr, wasiOptions) { env: { memory, abort: function(msg, file, line, column) { - console.log(colors.red(" abort: " + getString(msg) + " in " + getString(file) + "(" + line + ":" + column + ")")); + console.log(stdoutColors.red(" abort: " + getString(msg) + " in " + getString(file) + "(" + line + ":" + column + ")")); }, trace: function(msg, n) { console.log(" trace: " + getString(msg) + (n ? " " : "") + Array.prototype.slice.call(arguments, 2, 2 + n).join(", ")); @@ -427,30 +427,30 @@ async function testInstantiate(binaryBuffer, glue, stderr, wasiOptions) { // Evaluates the overall test result function evaluateResult(failedTests, skippedTests) { if (skippedTests.size) { - console.log(colors.yellow("WARNING: ") + colors.white(skippedTests.size + " compiler tests have been skipped:\n")); + console.log(stdoutColors.yellow("WARNING: ") + stdoutColors.white(skippedTests.size + " compiler tests have been skipped:\n")); for (let [name, message] of skippedTests) { - console.log(" " + name + " " + colors.gray("[" + (message || "???") + "]")); + console.log(" " + name + " " + stdoutColors.gray("[" + (message || "???") + "]")); } console.log(); } if (failedTests.size) { process.exitCode = 1; - console.log(colors.red("FAILURE: ") + colors.white(failedTests.size + " compiler tests had failures:\n")); + console.log(stdoutColors.red("FAILURE: ") + stdoutColors.white(failedTests.size + " compiler tests had failures:\n")); for (let [name, message] of failedTests) { - console.log(" " + name + " " + colors.gray("[" + (message || "???") + "]")); + console.log(" " + name + " " + stdoutColors.gray("[" + (message || "???") + "]")); } console.log(); } console.log(`Time: ${(Date.now() - startTime)} ms\n`); if (!process.exitCode) { - console.log("[ " + colors.white("SUCCESS") + " ]"); + console.log("[ " + stdoutColors.white("SUCCESS") + " ]"); } } // Run tests in parallel if requested if (args.parallel && coreCount > 2) { if (cluster.isWorker) { - colors.enabled = true; + stdoutColors.enabled = true; process.on("message", msg => { if (msg.cmd != "run") throw Error("invalid command: " + JSON.stringify(msg)); runTest(msg.test).then(({ code, message }) => { diff --git a/tests/parser.js b/tests/parser.js index 07fe4f9062..1665fa06c1 100644 --- a/tests/parser.js +++ b/tests/parser.js @@ -3,8 +3,8 @@ import path from "path"; import os from "os"; import { fileURLToPath } from "url"; import glob from "glob"; -import diff from "../util/diff.js"; -import * as colorsUtil from "../util/colors.js"; +import { diff } from "../util/text.js"; +import { stdoutColors } from "../util/terminal.js"; import * as optionsUtil from "../util/options.js"; import { Program, Options, ASTBuilder } from "../dist/assemblyscript.js"; @@ -30,10 +30,10 @@ const argv = opts.arguments; if (args.help) { console.log([ - colorsUtil.stdout.white("SYNTAX"), - " " + colorsUtil.stdout.cyan("npm run test:parser --") + " [test1, test2 ...] [options]", + stdoutColors.white("SYNTAX"), + " " + stdoutColors.cyan("npm run test:parser --") + " [test1, test2 ...] [options]", "", - colorsUtil.stdout.white("OPTIONS"), + stdoutColors.white("OPTIONS"), optionsUtil.help(config) ].join(os.EOL) + os.EOL); process.exit(0); @@ -58,7 +58,7 @@ var failures = 0; for (const filename of tests) { if (filename.charAt(0) == "_" || filename.endsWith(".fixture.ts")) continue; - console.log(colorsUtil.stdout.white("Testing parser/" + filename)); + console.log(stdoutColors.white("Testing parser/" + filename)); let failed = false; const program = new Program(new Options()); @@ -78,9 +78,9 @@ for (const filename of tests) { if (diffs !== null) { failed = true; console.log(diffs); - console.log(colorsUtil.stdout.red("diff ERROR")); + console.log(stdoutColors.red("diff ERROR")); } else { - console.log(colorsUtil.stdout.green("diff OK")); + console.log(stdoutColors.green("diff OK")); } } @@ -90,7 +90,7 @@ for (const filename of tests) { if (failures) { process.exitCode = 1; - console.log(colorsUtil.stdout.red("ERROR: ") + failures + " parser tests failed"); + console.log(stdoutColors.red("ERROR: ") + failures + " parser tests failed"); } else { - console.log("[ " + colorsUtil.stdout.white("SUCCESS") + " ]"); + console.log("[ " + stdoutColors.white("SUCCESS") + " ]"); } diff --git a/util/README.md b/util/README.md index defd57c1a6..bcc9d83cf2 100644 --- a/util/README.md +++ b/util/README.md @@ -3,21 +3,20 @@ Utility Various utility functions shared accross the codebase. -| Utility | Description -|---------|------------------------------------------- -| colors | Provides support for terminal colors -| cpu | Obtains information about the CPU -| diff | Computes the difference between two texts -| fetch | Simple Node.js polyfill for the Fetch API -| find | Provides support for finding files etc. -| node | Minimal polyfills for Node.js builtins -| options | Support for command line options parsing -| utf8 | Utility for UTF-8 text processing +| Utility | Description +|----------|------------------------------------------- +| cpu | Obtains information about the CPU +| find | Provides support for finding files etc. +| node | Minimal polyfills for Node.js builtins +| options | Support for command line options parsing +| terminal | Provides support for terminal colors +| text | Utility for text processing +| web | Minimal polyfills for browser builtins It is possible to reuse the utility in your own project like so: ```ts -import * as colorsUtil from "assemblyscript/util/colors.js"; +import { ... } from "assemblyscript/util/terminal.js"; ... ``` diff --git a/util/browser/process.js b/util/browser/process.js index 0d59333fd4..c0bd36494f 100644 --- a/util/browser/process.js +++ b/util/browser/process.js @@ -40,20 +40,8 @@ export function exit(code = 0) { // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -/* global globalThis */ - -if (typeof globalThis === "undefined") { - globalThis = typeof global !== "undefined" ? global : window; // eslint-disable-line no-global-assign -} - var performance = globalThis.performance || {}; -var performanceNow = - performance.now || - performance.mozNow || - performance.msNow || - performance.oNow || - performance.webkitNow || - function(){ return (new Date()).getTime(); }; +var performanceNow = performance.now || function() { return new Date().getTime(); }; export function hrtime(previousTimestamp) { var clocktime = performanceNow.call(performance); diff --git a/util/colors.d.ts b/util/colors.d.ts deleted file mode 100644 index 549f26df3e..0000000000 --- a/util/colors.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * @fileoverview Terminal colors utility definitions. - * @license Apache-2.0 - */ - -export const GRAY: string; -export const RED: string; -export const GREEN: string; -export const YELLOW: string; -export const BLUE: string; -export const MAGENTA: string; -export const CYAN: string; -export const WHITE: string; -export const RESET: string; - -export class Colors { - /** Whether terminal colors are enabled. */ - enabled: boolean; - /** Colors a string in gray if {@link supported}. */ - gray(text: string): string; - /** Colors a string in red if {@link supported}. */ - red(text: string): string; - /** Colors a string in green if {@link supported}. */ - green(text: string): string; - /** Colors a string in yellow if {@link supported}. */ - yellow(text: string): string; - /** Colors a string in blue if {@link supported}. */ - blue(text: string): string; - /** Colors a string in magenta if {@link supported}. */ - magenta(text: string): string; - /** Colors a string in cyan if {@link supported}. */ - cyan(text: string): string; - /** Colors a string in white if {@link supported}. */ - white(text: string): string; -} - -export const stdout: Colors; -export const stderr: Colors; diff --git a/util/cpu.d.ts b/util/cpu.d.ts index 541acd4c72..0d77616017 100644 --- a/util/cpu.d.ts +++ b/util/cpu.d.ts @@ -1,2 +1,9 @@ +/** + * @fileoverview CPU utility definitions. + * @license Apache-2.0 + */ + +/** Number of threads. */ export const threadCount: number; +/** Number of cores. */ export const coreCount: number; diff --git a/util/cpu.js b/util/cpu.js index 889334b4f1..0f140e3d0e 100644 --- a/util/cpu.js +++ b/util/cpu.js @@ -1,3 +1,8 @@ +/** + * @fileoverview CPU utility. + * @license Apache-2.0 + */ + // https://www.npmjs.com/package/physical-cpu-count import os from "os"; diff --git a/util/diff.d.ts b/util/diff.d.ts deleted file mode 100644 index 84122ed03a..0000000000 --- a/util/diff.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function diff(filename: string, expected: string, actual: string): string; diff --git a/util/diff.js b/util/diff.js deleted file mode 100644 index 7fb3ab923f..0000000000 --- a/util/diff.js +++ /dev/null @@ -1,29 +0,0 @@ -import * as Diff from "diff"; -import * as colors from "./colors.js"; - -export default function diff(filename, expected, actual) { - var diff = Diff.structuredPatch(filename, filename, expected, actual, "expected", "actual", { context: 5 }); - if (!diff.hunks.length) return null; - - var out = []; - out.push('--- ' + diff.oldHeader); - out.push('+++ ' + diff.newHeader); - - for (var i = 0; i < diff.hunks.length; i++) { - var hunk = diff.hunks[i]; - out.push( - '@@ -' + hunk.oldStart + ',' + hunk.oldLines - + ' +' + hunk.newStart + ',' + hunk.newLines - + ' @@' - ); - out.push.apply(out, hunk.lines.map(line => - line.charAt(0) === "+" - ? colors.stdout.green(line) - : line.charAt(0) === "-" - ? line = colors.stdout.red(line) - : line - )); - } - - return out.join('\n') + '\n'; -} diff --git a/util/find.d.ts b/util/find.d.ts index 4e46155df2..5d7e219abb 100644 --- a/util/find.d.ts +++ b/util/find.d.ts @@ -3,4 +3,4 @@ * @license Apache-2.0 */ -export function findFiles(dirname: string, filter?: ((name: string) => bool) | RegExp): string[]; +export function findFiles(dirname: string, filter?: ((name: string) => boolean) | RegExp): string[]; diff --git a/util/node.d.ts b/util/node.d.ts index 1610a8fa53..1f9f5dcd65 100644 --- a/util/node.d.ts +++ b/util/node.d.ts @@ -1,7 +1,16 @@ +/** + * @fileoverview Node polyfill definitions. + * @license Apache-2.0 + */ + import fs from "fs"; import module from "module"; import path from "path"; import process from "process"; + +/** Whether the environment is Node.js. */ +export const isNode: boolean; + export { fs, module, diff --git a/util/node.js b/util/node.js index 8e45c8bb5b..76b2f7ab29 100644 --- a/util/node.js +++ b/util/node.js @@ -1,14 +1,8 @@ /** - * @fileoverview Node.js re-exports or shims depending on environment. + * @fileoverview Node.js polyfills. * @license Apache-2.0 */ -/* global globalThis */ - -if (typeof globalThis === "undefined") { - globalThis = typeof global !== "undefined" ? global : window; // eslint-disable-line no-global-assign -} - export const isNode = Object.prototype.toString.call(typeof globalThis.process !== 'undefined' ? globalThis.process : 0) === '[object process]'; var fs; diff --git a/util/options.d.ts b/util/options.d.ts index 6a727628e9..facc36d622 100644 --- a/util/options.d.ts +++ b/util/options.d.ts @@ -25,12 +25,12 @@ export interface OptionDescription { } /** Configuration object. */ -interface Config { +export interface Config { [key: string]: OptionDescription; } /** Parsing result. */ -interface Result { +export interface Result { /** Parsed options. */ options: OptionSet, /** Unknown options. */ @@ -45,7 +45,7 @@ interface Result { export function parse(argv: string[], config: Config, propagateDefaults?: boolean): Result; /** Help formatting options. */ -interface HelpOptions { +export interface HelpOptions { /** Leading indent. Defaults to 2. */ indent?: number, /** Table padding. Defaults to 24. */ @@ -60,6 +60,9 @@ export function help(config: Config, options?: HelpOptions): string; /** Merges two sets of options into one, preferring the current over the parent set. */ export function merge(config: Config, currentOptions: OptionSet, parentOptions: OptionSet, parentBaseDir: string): OptionSet; +/** Normalizes a path. */ +export function normalizePath(path: string): string; + /** Resolves a single relative path. Keeps absolute paths, otherwise prepends baseDir. */ export function resolvePath(path: string, baseDir: string, useNodeResolution?: boolean): string; diff --git a/util/options.js b/util/options.js index 7cbdb1992e..0e3e426f81 100644 --- a/util/options.js +++ b/util/options.js @@ -4,7 +4,7 @@ */ import { path, module } from "./node.js"; -import * as colorsUtil from "./colors.js"; +import { stdoutColors } from "./terminal.js"; const require = module.createRequire(import.meta.url); @@ -130,11 +130,11 @@ export function help(config, options) { var hasCategories = false; Object.keys(sbCategories).forEach(category => { hasCategories = true; - sb.push(eol + " " + colorsUtil.stdout.gray(category) + eol); + sb.push(eol + " " + stdoutColors.gray(category) + eol); sb.push(sbCategories[category].join(eol)); }); if (hasCategories) { - sb.push(eol + " " + colorsUtil.stdout.gray("Other") + eol); + sb.push(eol + " " + stdoutColors.gray("Other") + eol); } sb.push(sbOther.join(eol)); return sb.join(eol); @@ -233,6 +233,7 @@ export function merge(config, currentOptions, parentOptions, parentBaseDir) { return mergedOptions; } +/** Normalizes a path. */ export function normalizePath(p) { const parsed = path.parse(p); if (!parsed.root) { diff --git a/util/terminal.d.ts b/util/terminal.d.ts new file mode 100644 index 0000000000..2adc19bde2 --- /dev/null +++ b/util/terminal.d.ts @@ -0,0 +1,52 @@ +/** + * @fileoverview Terminal colors utility definitions. + * @license Apache-2.0 + */ + +/** Color code for gray. */ +export const GRAY: string; +/** Color code for red. */ +export const RED: string; +/** Color code for green. */ +export const GREEN: string; +/** Color code for yellow. */ +export const YELLOW: string; +/** Color code for blue. */ +export const BLUE: string; +/** Color code for magenta. */ +export const MAGENTA: string; +/** Color code for cyan. */ +export const CYAN: string; +/** Color code for white. */ +export const WHITE: string; +/** Code to reset any colors. */ +export const RESET: string; + +/** Color utility class. */ +export class Colors { + /** Constructs a new instance for the given stream. */ + constructor(stream: { isTTY: boolean }); + /** Whether terminal colors are enabled. */ + enabled: boolean; + /** Colors a string in gray if {@link enabled}. */ + gray(text: string): string; + /** Colors a string in red if {@link enabled}. */ + red(text: string): string; + /** Colors a string in green if {@link enabled}. */ + green(text: string): string; + /** Colors a string in yellow if {@link enabled}. */ + yellow(text: string): string; + /** Colors a string in blue if {@link enabled}. */ + blue(text: string): string; + /** Colors a string in magenta if {@link enabled}. */ + magenta(text: string): string; + /** Colors a string in cyan if {@link enabled}. */ + cyan(text: string): string; + /** Colors a string in white if {@link enabled}. */ + white(text: string): string; +} + +/** Color utility for stdout. */ +export const stdoutColors: Colors; +/** Color utility for stderr. */ +export const stderrColors: Colors; diff --git a/util/colors.js b/util/terminal.js similarity index 89% rename from util/colors.js rename to util/terminal.js index 13edb153d9..93ceee94ee 100644 --- a/util/colors.js +++ b/util/terminal.js @@ -1,5 +1,5 @@ /** - * @fileoverview Terminal colors utility. + * @fileoverview Terminal utility. * @license Apache-2.0 */ @@ -31,5 +31,5 @@ export class Colors { white(text) { return this.enabled ? WHITE + text + RESET : text; } } -export const stdout = new Colors(proc.stdout); -export const stderr = new Colors(proc.stderr); +export const stdoutColors = new Colors(proc.stdout); +export const stderrColors = new Colors(proc.stderr); diff --git a/util/text.d.ts b/util/text.d.ts new file mode 100644 index 0000000000..d2eec9e27c --- /dev/null +++ b/util/text.d.ts @@ -0,0 +1,26 @@ +/** + * @fileoverview Text utility definitions. + * @license Apache-2.0 + */ + +/** Calculates the UTF-8 byte length of a string. */ +export function utf8Length(string: string): number; + +/** Reads UTF-8 bytes as a string. */ +export function utf8Read(buffer: Uint8Array, start: number, end: number): string; + +/** Writes a string as UTF-8 bytes. */ +export function utf8Write(string: string, buffer: Uint8Array, offset: number): number; + +/** UTF-8 utility. */ +export const utf8: { + /** Calculates the UTF8 byte length of a string. */ + length: typeof utf8Length; + /** Reads UTF8 bytes as a string. */ + read: typeof utf8Read; + /** Writes a string as UTF8 bytes. */ + write: typeof utf8Write; +}; + +/** Computes the difference between an expected and its actual text. */ +export function diff(filename: string, expected: string, actual: string): string; diff --git a/util/utf8.js b/util/text.js similarity index 61% rename from util/utf8.js rename to util/text.js index 22d07f3502..b7accf9f5a 100644 --- a/util/utf8.js +++ b/util/text.js @@ -1,14 +1,12 @@ /** - * @fileoverview UTF-8 utility. + * @fileoverview Text utility. * @license Apache-2.0 */ -/** - * Calculates the UTF8 byte length of a string. - * @param {string} string String - * @returns {number} Byte length - */ -export function length(string) { +import * as Diff from "diff"; +import { stdoutColors } from "./terminal.js"; + +export function utf8Length(string) { var len = 0; for (var i = 0, k = string.length; i < k; ++i) { let c = string.charCodeAt(i); @@ -26,14 +24,7 @@ export function length(string) { return len; } -/** - * Reads UTF8 bytes as a string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} String read - */ -export function read(buffer, start, end) { +export function utf8Read(buffer, start, end) { var len = end - start; if (len < 1) return ""; var parts = null, @@ -54,25 +45,18 @@ export function read(buffer, start, end) { chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63; } if (i >= 8192) { - (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + (parts || (parts = [])).push(String.fromCharCode(...chunk)); i = 0; } } if (parts) { - if (i) parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + if (i) parts.push(String.fromCharCode(...chunk.slice(0, i))); return parts.join(""); } - return String.fromCharCode.apply(String, chunk.slice(0, i)); + return String.fromCharCode(...chunk.slice(0, i)); } -/** - * Writes a string as UTF8 bytes. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Bytes written - */ -export function write(string, buffer, offset) { +export function utf8Write(string, buffer, offset) { var start = offset; for (var i = 0, k = string.length; i < k; ++i) { let c1 = string.charCodeAt(i), c2; @@ -96,3 +80,35 @@ export function write(string, buffer, offset) { } return offset - start; } + +export const utf8 = { + length: utf8Length, + read: utf8Read, + write: utf8Write +}; + +export function diff(filename, expected, actual) { + const diff = Diff.structuredPatch(filename, filename, expected, actual, "expected", "actual", { context: 5 }); + if (!diff.hunks.length) return null; + + const out = [ + '--- ' + diff.oldHeader, + '+++ ' + diff.newHeader + ]; + for (const hunk of diff.hunks) { + out.push( + '@@ -' + hunk.oldStart + ',' + hunk.oldLines + + ' +' + hunk.newStart + ',' + hunk.newLines + + ' @@' + ); + out.push(...hunk.lines.map(line => + line.charAt(0) === "+" + ? stdoutColors.green(line) + : line.charAt(0) === "-" + ? line = stdoutColors.red(line) + : line + )); + } + + return out.join('\n') + '\n'; +} diff --git a/util/tsconfig.json b/util/tsconfig.json index bcb1b8a11d..36ec54edc7 100644 --- a/util/tsconfig.json +++ b/util/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "../tsconfig-base.json", + "compilerOptions": { + "esModuleInterop": true + }, "include": [ "./**/*.ts" ] diff --git a/util/utf8.d.ts b/util/utf8.d.ts deleted file mode 100644 index d419c041e3..0000000000 --- a/util/utf8.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @fileoverview UTF8 utility definitions. - * @license Apache-2.0 - */ - -/** - * Calculates the UTF8 byte length of a string. - * @param {string} string String - * @returns {number} Byte length - */ -export function length(string: string): number; - -/** - * Reads UTF8 bytes as a string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} String read - */ -export function read(buffer: Uint8Array, start: number, end: number): string; - -/** - * Writes a string as UTF8 bytes. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Bytes written - */ -export function write(string: string, buffer: Uint8Array, offset: number): number; diff --git a/util/fetch.d.ts b/util/web.d.ts similarity index 51% rename from util/fetch.d.ts rename to util/web.d.ts index 3f79f0749f..4433ca2315 100644 --- a/util/fetch.d.ts +++ b/util/web.d.ts @@ -1,4 +1,10 @@ -export default function fetch(url: string): Promise<{ +/** + * @fileoverview Web polyfill definitions. + * @license Apache-2.0 + */ + +/** Fetches a file. */ +export function fetch(url: string): Promise<{ arrayBuffer(): Promise; text(): Promise; json(): Promise; // eslint-disable-line @typescript-eslint/no-explicit-any diff --git a/util/fetch.js b/util/web.js similarity index 88% rename from util/fetch.js rename to util/web.js index 147ba38533..1cddb1c355 100644 --- a/util/fetch.js +++ b/util/web.js @@ -1,3 +1,8 @@ +/** + * @fileoverview Web polyfills. + * @license Apache-2.0 + */ + import { fs } from "./node.js"; var _fetch = typeof fetch === "function" ? fetch : @@ -23,4 +28,6 @@ var _fetch = typeof fetch === "function" ? fetch : }); }); -export default _fetch; +export { + _fetch as fetch +}; From 8b1ae121653cc49c6dbeb18f41e6c3824b725b25 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 2 Dec 2021 07:06:48 +0100 Subject: [PATCH 080/175] update binaryen and fixtures --- package-lock.json | 446 +- package.json | 2 +- tests/compiler/call-super.optimized.wat | 52 +- .../compiler/class-overloading.optimized.wat | 5 +- tests/compiler/class.optimized.wat | 88 +- tests/compiler/constructor.optimized.wat | 70 +- tests/compiler/duplicate-fields.optimized.wat | 346 +- .../empty-exportruntime.optimized.wat | 52 +- tests/compiler/exports.optimized.wat | 13 +- .../exportstar-rereexport.optimized.wat | 13 +- .../extends-baseaggregate.optimized.wat | 80 +- .../compiler/extends-recursive.optimized.wat | 13 +- .../features/reference-types.optimized.wat | 22 +- tests/compiler/features/simd.optimized.wat | 16 +- .../field-initialization.optimized.wat | 74 +- tests/compiler/field.optimized.wat | 170 +- .../function-expression.optimized.wat | 35 +- .../implicit-getter-setter.optimized.wat | 13 +- tests/compiler/infer-array.optimized.wat | 194 +- tests/compiler/infer-generic.optimized.wat | 65 +- tests/compiler/inlining.optimized.wat | 52 +- tests/compiler/issues/1095.optimized.wat | 13 +- tests/compiler/issues/1699.optimized.wat | 202 +- tests/compiler/number.optimized.wat | 60 +- tests/compiler/object-literal.optimized.wat | 2138 +- tests/compiler/reexport.optimized.wat | 13 +- tests/compiler/rereexport.optimized.wat | 13 +- tests/compiler/resolve-access.optimized.wat | 128 +- tests/compiler/resolve-binary.optimized.wat | 99 +- .../resolve-elementaccess.optimized.wat | 154 +- .../resolve-function-expression.optimized.wat | 52 +- .../resolve-propertyaccess.optimized.wat | 52 +- tests/compiler/resolve-ternary.optimized.wat | 60 +- tests/compiler/resolve-unary.optimized.wat | 52 +- .../runtime-incremental-export.optimized.wat | 52 +- tests/compiler/std-wasi/console.optimized.wat | 177 +- tests/compiler/std-wasi/crypto.optimized.wat | 99 +- tests/compiler/std-wasi/process.optimized.wat | 407 +- .../compiler/std/array-literal.optimized.wat | 76 +- tests/compiler/std/array.optimized.wat | 3022 ++- tests/compiler/std/arraybuffer.optimized.wat | 108 +- tests/compiler/std/dataview.optimized.wat | 72 +- tests/compiler/std/date.optimized.wat | 362 +- tests/compiler/std/map.optimized.wat | 16920 ++++++++-------- tests/compiler/std/math.optimized.wat | 1042 +- tests/compiler/std/mod.optimized.wat | 104 +- .../std/operator-overloading.optimized.wat | 17 +- tests/compiler/std/pointer.optimized.wat | 29 +- tests/compiler/std/set.optimized.wat | 2460 ++- tests/compiler/std/staticarray.optimized.wat | 1097 +- .../std/string-casemapping.optimized.wat | 926 +- .../std/string-encoding.optimized.wat | 52 +- tests/compiler/std/string.optimized.wat | 496 +- tests/compiler/std/symbol.optimized.wat | 251 +- tests/compiler/std/typedarray.optimized.wat | 11876 ++++++----- tests/compiler/std/uri.optimized.wat | 58 +- tests/compiler/templateliteral.optimized.wat | 162 +- tests/compiler/throw.optimized.wat | 42 +- tests/compiler/wasi/trace.optimized.wat | 190 +- 59 files changed, 22194 insertions(+), 22760 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8cfe98850d..ea0cd766f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "binaryen": "102.0.0-nightly.20211126", + "binaryen": "103.0.0", "long": "^5.1.0" }, "bin": { @@ -121,19 +121,19 @@ "dev": true }, "node_modules/@types/node": { - "version": "16.11.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", - "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==", + "version": "16.11.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.11.tgz", + "integrity": "sha512-KB0sixD67CeecHC33MYn+eYARkqTheIRNuu97y2XMjR7Wu3XibO1vaY6VBV6O/a89SPI81cEUIYT87UqUWlZNw==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.4.0.tgz", - "integrity": "sha512-9/yPSBlwzsetCsGEn9j24D8vGQgJkOTr4oMLas/w886ZtzKIs1iyoqFrwsX2fqYEeUwsdBpC21gcjRGo57u0eg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.5.0.tgz", + "integrity": "sha512-4bV6fulqbuaO9UMXU0Ia0o6z6if+kmMRW8rMRyfqXj/eGrZZRGedS4n0adeGNnjr8LKAM495hrQ7Tea52UWmQA==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "5.4.0", - "@typescript-eslint/scope-manager": "5.4.0", + "@typescript-eslint/experimental-utils": "5.5.0", + "@typescript-eslint/scope-manager": "5.5.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -159,15 +159,15 @@ } }, "node_modules/@typescript-eslint/experimental-utils": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.4.0.tgz", - "integrity": "sha512-Nz2JDIQUdmIGd6p33A+naQmwfkU5KVTLb/5lTk+tLVTDacZKoGQisj8UCxk7onJcrgjIvr8xWqkYI+DbI3TfXg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.5.0.tgz", + "integrity": "sha512-kjWeeVU+4lQ1SLYErRKV5yDXbWDPkpbzTUUlfAUifPYvpX0qZlrcCZ96/6oWxt3QxtK5WVhXz+KsnwW9cIW+3A==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.4.0", - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/typescript-estree": "5.4.0", + "@typescript-eslint/scope-manager": "5.5.0", + "@typescript-eslint/types": "5.5.0", + "@typescript-eslint/typescript-estree": "5.5.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -183,14 +183,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.4.0.tgz", - "integrity": "sha512-JoB41EmxiYpaEsRwpZEYAJ9XQURPFer8hpkIW9GiaspVLX8oqbqNM8P4EP8HOZg96yaALiLEVWllA2E8vwsIKw==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.5.0.tgz", + "integrity": "sha512-JsXBU+kgQOAgzUn2jPrLA+Rd0Y1dswOlX3hp8MuRO1hQDs6xgHtbCXEiAu7bz5hyVURxbXcA2draasMbNqrhmg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.4.0", - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/typescript-estree": "5.4.0", + "@typescript-eslint/scope-manager": "5.5.0", + "@typescript-eslint/types": "5.5.0", + "@typescript-eslint/typescript-estree": "5.5.0", "debug": "^4.3.2" }, "engines": { @@ -210,13 +210,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.4.0.tgz", - "integrity": "sha512-pRxFjYwoi8R+n+sibjgF9iUiAELU9ihPBtHzocyW8v8D8G8KeQvXTsW7+CBYIyTYsmhtNk50QPGLE3vrvhM5KA==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.5.0.tgz", + "integrity": "sha512-0/r656RmRLo7CbN4Mdd+xZyPJ/fPCKhYdU6mnZx+8msAD8nJSP8EyCFkzbd6vNVZzZvWlMYrSNekqGrCBqFQhg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/visitor-keys": "5.4.0" + "@typescript-eslint/types": "5.5.0", + "@typescript-eslint/visitor-keys": "5.5.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -227,9 +227,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.4.0.tgz", - "integrity": "sha512-GjXNpmn+n1LvnttarX+sPD6+S7giO+9LxDIGlRl4wK3a7qMWALOHYuVSZpPTfEIklYjaWuMtfKdeByx0AcaThA==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.5.0.tgz", + "integrity": "sha512-OaYTqkW3GnuHxqsxxJ6KypIKd5Uw7bFiQJZRyNi1jbMJnK3Hc/DR4KwB6KJj6PBRkJJoaNwzMNv9vtTk87JhOg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -240,13 +240,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.4.0.tgz", - "integrity": "sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.5.0.tgz", + "integrity": "sha512-pVn8btYUiYrjonhMAO0yG8lm7RApzy2L4RC7Td/mC/qFkyf6vRbGyZozoA94+w6D2Y2GRqpMoCWcwx/EUOzyoQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/visitor-keys": "5.4.0", + "@typescript-eslint/types": "5.5.0", + "@typescript-eslint/visitor-keys": "5.5.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -267,12 +267,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.4.0.tgz", - "integrity": "sha512-PVbax7MeE7tdLfW5SA0fs8NGVVr+buMPrcj+CWYWPXsZCH8qZ1THufDzbXm1xrZ2b2PA1iENJ0sRq5fuUtvsJg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.5.0.tgz", + "integrity": "sha512-4GzJ1kRtsWzHhdM40tv0ZKHNSbkDhF0Woi/TDwVJX6UICwJItvP7ZTXbjTkCdrors7ww0sYe0t+cIKDAJwZ7Kw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/types": "5.5.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -375,9 +375,9 @@ "dev": true }, "node_modules/binaryen": { - "version": "102.0.0-nightly.20211126", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-102.0.0-nightly.20211126.tgz", - "integrity": "sha512-VuUXjmae5m42itc4ZUz08LWddPIIydBoay0mPIh7aiD3O3iXMtRlPt+bbcw3JWCnxa053c8Tkigyr2mJZaSbFg==", + "version": "103.0.0", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-103.0.0.tgz", + "integrity": "sha512-dejnXckPWetpBYc021d1hnbM8tECz7cjACKhJWEQEtiqTarYMqLLzH20AthjMgblnySkcRUzEMXbeWPI7UYTQw==", "bin": { "wasm-opt": "bin/wasm-opt", "wasm2js": "bin/wasm2js" @@ -537,38 +537,38 @@ } }, "node_modules/esbuild": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.0.tgz", - "integrity": "sha512-UOnSKRAyZondxdLrOXnI/mesUmU/GvDTcajCvxoIaObzMeQcn0HyoGtvbfATnazlx799ZqFSyIZGLXFszkjy3A==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.1.tgz", + "integrity": "sha512-J/LhUwELcmz0+CJfiaKzu7Rnj9ffWFLvMx+dKvdOfg+fQmoP6q9glla26LCm9BxpnPUjXChHeubLiMlKab/PYg==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, "optionalDependencies": { - "esbuild-android-arm64": "0.14.0", - "esbuild-darwin-64": "0.14.0", - "esbuild-darwin-arm64": "0.14.0", - "esbuild-freebsd-64": "0.14.0", - "esbuild-freebsd-arm64": "0.14.0", - "esbuild-linux-32": "0.14.0", - "esbuild-linux-64": "0.14.0", - "esbuild-linux-arm": "0.14.0", - "esbuild-linux-arm64": "0.14.0", - "esbuild-linux-mips64le": "0.14.0", - "esbuild-linux-ppc64le": "0.14.0", - "esbuild-netbsd-64": "0.14.0", - "esbuild-openbsd-64": "0.14.0", - "esbuild-sunos-64": "0.14.0", - "esbuild-windows-32": "0.14.0", - "esbuild-windows-64": "0.14.0", - "esbuild-windows-arm64": "0.14.0" + "esbuild-android-arm64": "0.14.1", + "esbuild-darwin-64": "0.14.1", + "esbuild-darwin-arm64": "0.14.1", + "esbuild-freebsd-64": "0.14.1", + "esbuild-freebsd-arm64": "0.14.1", + "esbuild-linux-32": "0.14.1", + "esbuild-linux-64": "0.14.1", + "esbuild-linux-arm": "0.14.1", + "esbuild-linux-arm64": "0.14.1", + "esbuild-linux-mips64le": "0.14.1", + "esbuild-linux-ppc64le": "0.14.1", + "esbuild-netbsd-64": "0.14.1", + "esbuild-openbsd-64": "0.14.1", + "esbuild-sunos-64": "0.14.1", + "esbuild-windows-32": "0.14.1", + "esbuild-windows-64": "0.14.1", + "esbuild-windows-arm64": "0.14.1" } }, "node_modules/esbuild-android-arm64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.0.tgz", - "integrity": "sha512-X7BjFiRRNfxPNg1aT5zw4xK1vbvX2IvDPcEp4bv0CEXgR39UzuOMUsQoG92aZgj8JGs8jxQAZc8k9dVJ1WL2BA==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.1.tgz", + "integrity": "sha512-elQd3hTg93nU2GQ5PPCDAFe5+utxZX96RG8RixqIPxf8pzmyIzcpKG76L/9FabPf3LT1z+nLF1sajCU8eVRDyg==", "cpu": [ "arm64" ], @@ -579,9 +579,9 @@ ] }, "node_modules/esbuild-darwin-64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.0.tgz", - "integrity": "sha512-43vtt407jMp1kEXiaY0dEIGjOREax9F1+qMI0+F9tJyr06EHAofnbLL6cTmLgdPy/pMhltSvOJ8EddJrrOBgpQ==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.1.tgz", + "integrity": "sha512-PR3HZgbPRwsQbbOR1fJrfkt/Cs0JDyI3yzOKg2PPWk0H1AseZDBqPUY9b/0+BIjFwA5Jz/aAiq832hppsuJtNw==", "cpu": [ "x64" ], @@ -592,9 +592,9 @@ ] }, "node_modules/esbuild-darwin-arm64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.0.tgz", - "integrity": "sha512-hMbT5YiBrFL763mnwR9BqNtq9XtJgJRxYs7Ad++KUd+ZhMoVE0Rs/YLe1oor9uBGhHLqQsZuJ2dUHjCsfT/iDg==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.1.tgz", + "integrity": "sha512-/fiSSOkOEa3co6yYtwgXouz8jZrG0qnXPEKiktFf2BQE8NON3ARTw43ZegaH+xMRFNgYBJEOOZIdzI3sIFEAxw==", "cpu": [ "arm64" ], @@ -605,9 +605,9 @@ ] }, "node_modules/esbuild-freebsd-64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.0.tgz", - "integrity": "sha512-mx68HRYIZo6ZiHbWk5Md+mDJoDw779yWkJQAaBnXwOkGbDeA3JmPZjp6IPfy2P+n3emK9z6g4pKiebp1tQGVoQ==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.1.tgz", + "integrity": "sha512-ZJV+nfa8E8PdXnRc05PO3YMfgSj7Ko+kdHyGDE6OaNo1cO8ZyfacqLaWkY35shDDaeacklhD8ZR4qq5nbJKX1A==", "cpu": [ "x64" ], @@ -618,9 +618,9 @@ ] }, "node_modules/esbuild-freebsd-arm64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.0.tgz", - "integrity": "sha512-iM8u+zTagh0WGn2FTTxi7DII/ycVzYyuf2Df6eP2ZX+vlx2FjaduhagRkpyhjfmEyhfJOrYSAR5R1biNPcA+VA==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.1.tgz", + "integrity": "sha512-6N9zTD+SecJr2g9Ohl9C10WIk5FpQ+52bNamRy0sJoHwP31G5ObzKzq8jAtg1Jeggpu6P8auz3P/UL+3YioSwQ==", "cpu": [ "arm64" ], @@ -631,9 +631,9 @@ ] }, "node_modules/esbuild-linux-32": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.0.tgz", - "integrity": "sha512-dWHotI2qlXWZyza7n85UubBj0asjpM7FTtQYDaRQKxoCJpCnSzq3aD55IJthiggZHXj2tAML9Bc5xjVLsBJR0w==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.1.tgz", + "integrity": "sha512-RtPgE6e7WefbAxRjVryisKFJ0nUwR2DMjwmYW/a1a0F1+Ge6FR+RqvgiY0DrM9TtxSUU0eryDXNF4n3UfxX3mg==", "cpu": [ "ia32" ], @@ -644,9 +644,9 @@ ] }, "node_modules/esbuild-linux-64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.0.tgz", - "integrity": "sha512-7buo31kp1/yKWPm9vU44FEUwkeIROrIgnCDV9KLMLSbOjGEHBZXYJ2L0p4ZnB7Z+m5YiW7F/AfJu0/1E87nOeQ==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.1.tgz", + "integrity": "sha512-JpxM0ar6Z+2v3vfFrxP7bFb8Wzb6gcGL9MxRqAJplDfGnee8HbfPge6svaazXeX9XJceeEqwxwWGB0qyCcxo7A==", "cpu": [ "x64" ], @@ -657,9 +657,9 @@ ] }, "node_modules/esbuild-linux-arm": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.0.tgz", - "integrity": "sha512-fgybXQwPRT4Io01+aD+yphcLOLRVGqbSdhvaDK3qBwqUvspFsq4QkI7PeeYpuQdBZWiRKLoi9v5r90l7JO/s+g==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.1.tgz", + "integrity": "sha512-eBRHexCijAYWzcvQLGHxyxIlYOkYhXvcb/O7HvzJfCAVWCnTx9TxxYJ3UppBC6dDFbAq4HwKhskvmesQdKMeBg==", "cpu": [ "arm" ], @@ -670,9 +670,9 @@ ] }, "node_modules/esbuild-linux-arm64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.0.tgz", - "integrity": "sha512-9LBtCH2RkhDBwoAYksTtXljN6hlxxoL6a3ymNfXJG9JxFUQddOfhajXZdObFn/hgGkAFwx8dXqw+FnPm0FCzSg==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.1.tgz", + "integrity": "sha512-cFbeZf171bIf+PPLlQDBzagK85lCCxxVdMV1IVUA96Y3kvEgqcy2n9mha+QE1M/T+lIOPDsmLRgH1XqMFwLTSg==", "cpu": [ "arm64" ], @@ -683,9 +683,9 @@ ] }, "node_modules/esbuild-linux-mips64le": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.0.tgz", - "integrity": "sha512-Xz7soOqWeCWcLp15biPM08To+s0k1E/2q0pQZNQ+SY9S5H2vU4ujDXqKjxFc24G9CrOeUNEOXTkh+JldBGbTCA==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.1.tgz", + "integrity": "sha512-UGb+sqHkL7wOQFLH0RoFhcRAlJNqbqs6GtJd1It5jJ2juOGqAkCv8V12aGDX9oRB6a+Om7cdHcH+6AMZ+qlaww==", "cpu": [ "mips64el" ], @@ -696,9 +696,9 @@ ] }, "node_modules/esbuild-linux-ppc64le": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.0.tgz", - "integrity": "sha512-fuBXTyUaZKxpmp43Nf0M1uI1OmZv/COcME9PG7NQ/EniwC680Xj5xQFhEBDVnvQQ+6xOnXdfPSojJq7gQxrORQ==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.1.tgz", + "integrity": "sha512-LIHGkGdy9wYlmkkoVHm6feWhkoi4VBXDiEVyNjXEhlzsBcP/CaRy+B8IJulzaU1ALLiGcsCQ2MC5UbFn/iTvmA==", "cpu": [ "ppc64" ], @@ -709,9 +709,9 @@ ] }, "node_modules/esbuild-netbsd-64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.0.tgz", - "integrity": "sha512-pQaECTKr/iCXtn1qjwih+cvoZzbZ+P3NwLQo4uo/IesklbPTR5eF4d85L1vPFVgff+itBMxbbB7aoRznSglN3A==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.1.tgz", + "integrity": "sha512-TWc1QIgtPwaK5nC1GT2ASTuy/CJhNKHN4h5PJRP1186VfI+k2uvXakS7bqO/M26F6jAMy8jDeCtilacqpwsvfA==", "cpu": [ "x64" ], @@ -722,9 +722,9 @@ ] }, "node_modules/esbuild-openbsd-64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.0.tgz", - "integrity": "sha512-HiaqQX9HMb9u3eYvKZ86+m/paQwASJSIjXiRTFpFusypjtU2NJqWb/LiRvhfmwC6rb7YHwCSPx+juSM7M+20bA==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.1.tgz", + "integrity": "sha512-Z9/Zb77K+pK9s7mAsvwS56K8tCbLvNZ9UI4QVJSYqDgOmmDJOBT4owWnCqZ5cJI+2y4/F9KwCpFFTNUdPglPKA==", "cpu": [ "x64" ], @@ -735,9 +735,9 @@ ] }, "node_modules/esbuild-sunos-64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.0.tgz", - "integrity": "sha512-TkMQOSiSU3fHLV3M+OKUgLZt5L7TpcBcMRvtFw1cTxAnX8eT+1qkWVLiDM8ow1C3P7PW3bkGY3LW8vOs8o/jBA==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.1.tgz", + "integrity": "sha512-c4sF8146kNW8529wfkB6vO0ZqPgokyS2hORqKa4p/QKZdp+xrF2NPmvX5aN+Zt14oe6wVZuhYo6LGv7V4Gg04g==", "cpu": [ "x64" ], @@ -748,9 +748,9 @@ ] }, "node_modules/esbuild-windows-32": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.0.tgz", - "integrity": "sha512-0h7E50JHgyLd7TkqSIH0VzBhngWspxPHuq/crDAMnh4s4tW8zWCMLIz2c1HVwHfZsh7d5+C4/yBaQeJTHXGvIA==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.1.tgz", + "integrity": "sha512-XP8yElaJtLGGjH7D72t5IWtP0jmc1Jqm4IjQARB17l0LTJO/n+N2X64rDWePJv6qimYxa5p2vTjkZc5v+YZTSQ==", "cpu": [ "ia32" ], @@ -761,9 +761,9 @@ ] }, "node_modules/esbuild-windows-64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.0.tgz", - "integrity": "sha512-RxnovPOoQS5Id4mbdIUm96L0GIg+ZME4FthbErw1kZZabLi9eLp1gR3vSwkZXKbK8Z76uDkSW0EN74i1XWVpiQ==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.1.tgz", + "integrity": "sha512-fe+ShdyfiuGcCEdVKW//6MaM4MwikiWBWSBn8mebNAbjRqicH0injDOFVI7aUovAfrEt7+FGkf402s//hi0BVg==", "cpu": [ "x64" ], @@ -774,9 +774,9 @@ ] }, "node_modules/esbuild-windows-arm64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.0.tgz", - "integrity": "sha512-66KsVlT6lGDWgDKQsAlojxgUhZkkjVeosMVRdb913OwtcOjszceg6zFD748jzp9CUgAseHCNJqFmYOyBzneSEQ==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.1.tgz", + "integrity": "sha512-wBVakhcIzQ3NZ33DFM6TjIObXPHaXOsqzvPwefXHvwBSC/N/e/g6fBeM7N/Moj3AmxLjKaB+vePvTGdxk6RPCg==", "cpu": [ "arm64" ], @@ -1863,19 +1863,19 @@ "dev": true }, "@types/node": { - "version": "16.11.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", - "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==", + "version": "16.11.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.11.tgz", + "integrity": "sha512-KB0sixD67CeecHC33MYn+eYARkqTheIRNuu97y2XMjR7Wu3XibO1vaY6VBV6O/a89SPI81cEUIYT87UqUWlZNw==", "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.4.0.tgz", - "integrity": "sha512-9/yPSBlwzsetCsGEn9j24D8vGQgJkOTr4oMLas/w886ZtzKIs1iyoqFrwsX2fqYEeUwsdBpC21gcjRGo57u0eg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.5.0.tgz", + "integrity": "sha512-4bV6fulqbuaO9UMXU0Ia0o6z6if+kmMRW8rMRyfqXj/eGrZZRGedS4n0adeGNnjr8LKAM495hrQ7Tea52UWmQA==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "5.4.0", - "@typescript-eslint/scope-manager": "5.4.0", + "@typescript-eslint/experimental-utils": "5.5.0", + "@typescript-eslint/scope-manager": "5.5.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1885,55 +1885,55 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.4.0.tgz", - "integrity": "sha512-Nz2JDIQUdmIGd6p33A+naQmwfkU5KVTLb/5lTk+tLVTDacZKoGQisj8UCxk7onJcrgjIvr8xWqkYI+DbI3TfXg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.5.0.tgz", + "integrity": "sha512-kjWeeVU+4lQ1SLYErRKV5yDXbWDPkpbzTUUlfAUifPYvpX0qZlrcCZ96/6oWxt3QxtK5WVhXz+KsnwW9cIW+3A==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.4.0", - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/typescript-estree": "5.4.0", + "@typescript-eslint/scope-manager": "5.5.0", + "@typescript-eslint/types": "5.5.0", + "@typescript-eslint/typescript-estree": "5.5.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/parser": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.4.0.tgz", - "integrity": "sha512-JoB41EmxiYpaEsRwpZEYAJ9XQURPFer8hpkIW9GiaspVLX8oqbqNM8P4EP8HOZg96yaALiLEVWllA2E8vwsIKw==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.5.0.tgz", + "integrity": "sha512-JsXBU+kgQOAgzUn2jPrLA+Rd0Y1dswOlX3hp8MuRO1hQDs6xgHtbCXEiAu7bz5hyVURxbXcA2draasMbNqrhmg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.4.0", - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/typescript-estree": "5.4.0", + "@typescript-eslint/scope-manager": "5.5.0", + "@typescript-eslint/types": "5.5.0", + "@typescript-eslint/typescript-estree": "5.5.0", "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.4.0.tgz", - "integrity": "sha512-pRxFjYwoi8R+n+sibjgF9iUiAELU9ihPBtHzocyW8v8D8G8KeQvXTsW7+CBYIyTYsmhtNk50QPGLE3vrvhM5KA==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.5.0.tgz", + "integrity": "sha512-0/r656RmRLo7CbN4Mdd+xZyPJ/fPCKhYdU6mnZx+8msAD8nJSP8EyCFkzbd6vNVZzZvWlMYrSNekqGrCBqFQhg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/visitor-keys": "5.4.0" + "@typescript-eslint/types": "5.5.0", + "@typescript-eslint/visitor-keys": "5.5.0" } }, "@typescript-eslint/types": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.4.0.tgz", - "integrity": "sha512-GjXNpmn+n1LvnttarX+sPD6+S7giO+9LxDIGlRl4wK3a7qMWALOHYuVSZpPTfEIklYjaWuMtfKdeByx0AcaThA==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.5.0.tgz", + "integrity": "sha512-OaYTqkW3GnuHxqsxxJ6KypIKd5Uw7bFiQJZRyNi1jbMJnK3Hc/DR4KwB6KJj6PBRkJJoaNwzMNv9vtTk87JhOg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.4.0.tgz", - "integrity": "sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.5.0.tgz", + "integrity": "sha512-pVn8btYUiYrjonhMAO0yG8lm7RApzy2L4RC7Td/mC/qFkyf6vRbGyZozoA94+w6D2Y2GRqpMoCWcwx/EUOzyoQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/visitor-keys": "5.4.0", + "@typescript-eslint/types": "5.5.0", + "@typescript-eslint/visitor-keys": "5.5.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1942,12 +1942,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.4.0.tgz", - "integrity": "sha512-PVbax7MeE7tdLfW5SA0fs8NGVVr+buMPrcj+CWYWPXsZCH8qZ1THufDzbXm1xrZ2b2PA1iENJ0sRq5fuUtvsJg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.5.0.tgz", + "integrity": "sha512-4GzJ1kRtsWzHhdM40tv0ZKHNSbkDhF0Woi/TDwVJX6UICwJItvP7ZTXbjTkCdrors7ww0sYe0t+cIKDAJwZ7Kw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/types": "5.5.0", "eslint-visitor-keys": "^3.0.0" } }, @@ -2016,9 +2016,9 @@ "dev": true }, "binaryen": { - "version": "102.0.0-nightly.20211126", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-102.0.0-nightly.20211126.tgz", - "integrity": "sha512-VuUXjmae5m42itc4ZUz08LWddPIIydBoay0mPIh7aiD3O3iXMtRlPt+bbcw3JWCnxa053c8Tkigyr2mJZaSbFg==" + "version": "103.0.0", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-103.0.0.tgz", + "integrity": "sha512-dejnXckPWetpBYc021d1hnbM8tECz7cjACKhJWEQEtiqTarYMqLLzH20AthjMgblnySkcRUzEMXbeWPI7UYTQw==" }, "brace-expansion": { "version": "1.1.11", @@ -2136,146 +2136,146 @@ } }, "esbuild": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.0.tgz", - "integrity": "sha512-UOnSKRAyZondxdLrOXnI/mesUmU/GvDTcajCvxoIaObzMeQcn0HyoGtvbfATnazlx799ZqFSyIZGLXFszkjy3A==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.1.tgz", + "integrity": "sha512-J/LhUwELcmz0+CJfiaKzu7Rnj9ffWFLvMx+dKvdOfg+fQmoP6q9glla26LCm9BxpnPUjXChHeubLiMlKab/PYg==", "dev": true, "requires": { - "esbuild-android-arm64": "0.14.0", - "esbuild-darwin-64": "0.14.0", - "esbuild-darwin-arm64": "0.14.0", - "esbuild-freebsd-64": "0.14.0", - "esbuild-freebsd-arm64": "0.14.0", - "esbuild-linux-32": "0.14.0", - "esbuild-linux-64": "0.14.0", - "esbuild-linux-arm": "0.14.0", - "esbuild-linux-arm64": "0.14.0", - "esbuild-linux-mips64le": "0.14.0", - "esbuild-linux-ppc64le": "0.14.0", - "esbuild-netbsd-64": "0.14.0", - "esbuild-openbsd-64": "0.14.0", - "esbuild-sunos-64": "0.14.0", - "esbuild-windows-32": "0.14.0", - "esbuild-windows-64": "0.14.0", - "esbuild-windows-arm64": "0.14.0" + "esbuild-android-arm64": "0.14.1", + "esbuild-darwin-64": "0.14.1", + "esbuild-darwin-arm64": "0.14.1", + "esbuild-freebsd-64": "0.14.1", + "esbuild-freebsd-arm64": "0.14.1", + "esbuild-linux-32": "0.14.1", + "esbuild-linux-64": "0.14.1", + "esbuild-linux-arm": "0.14.1", + "esbuild-linux-arm64": "0.14.1", + "esbuild-linux-mips64le": "0.14.1", + "esbuild-linux-ppc64le": "0.14.1", + "esbuild-netbsd-64": "0.14.1", + "esbuild-openbsd-64": "0.14.1", + "esbuild-sunos-64": "0.14.1", + "esbuild-windows-32": "0.14.1", + "esbuild-windows-64": "0.14.1", + "esbuild-windows-arm64": "0.14.1" } }, "esbuild-android-arm64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.0.tgz", - "integrity": "sha512-X7BjFiRRNfxPNg1aT5zw4xK1vbvX2IvDPcEp4bv0CEXgR39UzuOMUsQoG92aZgj8JGs8jxQAZc8k9dVJ1WL2BA==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.1.tgz", + "integrity": "sha512-elQd3hTg93nU2GQ5PPCDAFe5+utxZX96RG8RixqIPxf8pzmyIzcpKG76L/9FabPf3LT1z+nLF1sajCU8eVRDyg==", "dev": true, "optional": true }, "esbuild-darwin-64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.0.tgz", - "integrity": "sha512-43vtt407jMp1kEXiaY0dEIGjOREax9F1+qMI0+F9tJyr06EHAofnbLL6cTmLgdPy/pMhltSvOJ8EddJrrOBgpQ==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.1.tgz", + "integrity": "sha512-PR3HZgbPRwsQbbOR1fJrfkt/Cs0JDyI3yzOKg2PPWk0H1AseZDBqPUY9b/0+BIjFwA5Jz/aAiq832hppsuJtNw==", "dev": true, "optional": true }, "esbuild-darwin-arm64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.0.tgz", - "integrity": "sha512-hMbT5YiBrFL763mnwR9BqNtq9XtJgJRxYs7Ad++KUd+ZhMoVE0Rs/YLe1oor9uBGhHLqQsZuJ2dUHjCsfT/iDg==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.1.tgz", + "integrity": "sha512-/fiSSOkOEa3co6yYtwgXouz8jZrG0qnXPEKiktFf2BQE8NON3ARTw43ZegaH+xMRFNgYBJEOOZIdzI3sIFEAxw==", "dev": true, "optional": true }, "esbuild-freebsd-64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.0.tgz", - "integrity": "sha512-mx68HRYIZo6ZiHbWk5Md+mDJoDw779yWkJQAaBnXwOkGbDeA3JmPZjp6IPfy2P+n3emK9z6g4pKiebp1tQGVoQ==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.1.tgz", + "integrity": "sha512-ZJV+nfa8E8PdXnRc05PO3YMfgSj7Ko+kdHyGDE6OaNo1cO8ZyfacqLaWkY35shDDaeacklhD8ZR4qq5nbJKX1A==", "dev": true, "optional": true }, "esbuild-freebsd-arm64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.0.tgz", - "integrity": "sha512-iM8u+zTagh0WGn2FTTxi7DII/ycVzYyuf2Df6eP2ZX+vlx2FjaduhagRkpyhjfmEyhfJOrYSAR5R1biNPcA+VA==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.1.tgz", + "integrity": "sha512-6N9zTD+SecJr2g9Ohl9C10WIk5FpQ+52bNamRy0sJoHwP31G5ObzKzq8jAtg1Jeggpu6P8auz3P/UL+3YioSwQ==", "dev": true, "optional": true }, "esbuild-linux-32": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.0.tgz", - "integrity": "sha512-dWHotI2qlXWZyza7n85UubBj0asjpM7FTtQYDaRQKxoCJpCnSzq3aD55IJthiggZHXj2tAML9Bc5xjVLsBJR0w==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.1.tgz", + "integrity": "sha512-RtPgE6e7WefbAxRjVryisKFJ0nUwR2DMjwmYW/a1a0F1+Ge6FR+RqvgiY0DrM9TtxSUU0eryDXNF4n3UfxX3mg==", "dev": true, "optional": true }, "esbuild-linux-64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.0.tgz", - "integrity": "sha512-7buo31kp1/yKWPm9vU44FEUwkeIROrIgnCDV9KLMLSbOjGEHBZXYJ2L0p4ZnB7Z+m5YiW7F/AfJu0/1E87nOeQ==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.1.tgz", + "integrity": "sha512-JpxM0ar6Z+2v3vfFrxP7bFb8Wzb6gcGL9MxRqAJplDfGnee8HbfPge6svaazXeX9XJceeEqwxwWGB0qyCcxo7A==", "dev": true, "optional": true }, "esbuild-linux-arm": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.0.tgz", - "integrity": "sha512-fgybXQwPRT4Io01+aD+yphcLOLRVGqbSdhvaDK3qBwqUvspFsq4QkI7PeeYpuQdBZWiRKLoi9v5r90l7JO/s+g==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.1.tgz", + "integrity": "sha512-eBRHexCijAYWzcvQLGHxyxIlYOkYhXvcb/O7HvzJfCAVWCnTx9TxxYJ3UppBC6dDFbAq4HwKhskvmesQdKMeBg==", "dev": true, "optional": true }, "esbuild-linux-arm64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.0.tgz", - "integrity": "sha512-9LBtCH2RkhDBwoAYksTtXljN6hlxxoL6a3ymNfXJG9JxFUQddOfhajXZdObFn/hgGkAFwx8dXqw+FnPm0FCzSg==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.1.tgz", + "integrity": "sha512-cFbeZf171bIf+PPLlQDBzagK85lCCxxVdMV1IVUA96Y3kvEgqcy2n9mha+QE1M/T+lIOPDsmLRgH1XqMFwLTSg==", "dev": true, "optional": true }, "esbuild-linux-mips64le": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.0.tgz", - "integrity": "sha512-Xz7soOqWeCWcLp15biPM08To+s0k1E/2q0pQZNQ+SY9S5H2vU4ujDXqKjxFc24G9CrOeUNEOXTkh+JldBGbTCA==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.1.tgz", + "integrity": "sha512-UGb+sqHkL7wOQFLH0RoFhcRAlJNqbqs6GtJd1It5jJ2juOGqAkCv8V12aGDX9oRB6a+Om7cdHcH+6AMZ+qlaww==", "dev": true, "optional": true }, "esbuild-linux-ppc64le": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.0.tgz", - "integrity": "sha512-fuBXTyUaZKxpmp43Nf0M1uI1OmZv/COcME9PG7NQ/EniwC680Xj5xQFhEBDVnvQQ+6xOnXdfPSojJq7gQxrORQ==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.1.tgz", + "integrity": "sha512-LIHGkGdy9wYlmkkoVHm6feWhkoi4VBXDiEVyNjXEhlzsBcP/CaRy+B8IJulzaU1ALLiGcsCQ2MC5UbFn/iTvmA==", "dev": true, "optional": true }, "esbuild-netbsd-64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.0.tgz", - "integrity": "sha512-pQaECTKr/iCXtn1qjwih+cvoZzbZ+P3NwLQo4uo/IesklbPTR5eF4d85L1vPFVgff+itBMxbbB7aoRznSglN3A==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.1.tgz", + "integrity": "sha512-TWc1QIgtPwaK5nC1GT2ASTuy/CJhNKHN4h5PJRP1186VfI+k2uvXakS7bqO/M26F6jAMy8jDeCtilacqpwsvfA==", "dev": true, "optional": true }, "esbuild-openbsd-64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.0.tgz", - "integrity": "sha512-HiaqQX9HMb9u3eYvKZ86+m/paQwASJSIjXiRTFpFusypjtU2NJqWb/LiRvhfmwC6rb7YHwCSPx+juSM7M+20bA==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.1.tgz", + "integrity": "sha512-Z9/Zb77K+pK9s7mAsvwS56K8tCbLvNZ9UI4QVJSYqDgOmmDJOBT4owWnCqZ5cJI+2y4/F9KwCpFFTNUdPglPKA==", "dev": true, "optional": true }, "esbuild-sunos-64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.0.tgz", - "integrity": "sha512-TkMQOSiSU3fHLV3M+OKUgLZt5L7TpcBcMRvtFw1cTxAnX8eT+1qkWVLiDM8ow1C3P7PW3bkGY3LW8vOs8o/jBA==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.1.tgz", + "integrity": "sha512-c4sF8146kNW8529wfkB6vO0ZqPgokyS2hORqKa4p/QKZdp+xrF2NPmvX5aN+Zt14oe6wVZuhYo6LGv7V4Gg04g==", "dev": true, "optional": true }, "esbuild-windows-32": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.0.tgz", - "integrity": "sha512-0h7E50JHgyLd7TkqSIH0VzBhngWspxPHuq/crDAMnh4s4tW8zWCMLIz2c1HVwHfZsh7d5+C4/yBaQeJTHXGvIA==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.1.tgz", + "integrity": "sha512-XP8yElaJtLGGjH7D72t5IWtP0jmc1Jqm4IjQARB17l0LTJO/n+N2X64rDWePJv6qimYxa5p2vTjkZc5v+YZTSQ==", "dev": true, "optional": true }, "esbuild-windows-64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.0.tgz", - "integrity": "sha512-RxnovPOoQS5Id4mbdIUm96L0GIg+ZME4FthbErw1kZZabLi9eLp1gR3vSwkZXKbK8Z76uDkSW0EN74i1XWVpiQ==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.1.tgz", + "integrity": "sha512-fe+ShdyfiuGcCEdVKW//6MaM4MwikiWBWSBn8mebNAbjRqicH0injDOFVI7aUovAfrEt7+FGkf402s//hi0BVg==", "dev": true, "optional": true }, "esbuild-windows-arm64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.0.tgz", - "integrity": "sha512-66KsVlT6lGDWgDKQsAlojxgUhZkkjVeosMVRdb913OwtcOjszceg6zFD748jzp9CUgAseHCNJqFmYOyBzneSEQ==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.1.tgz", + "integrity": "sha512-wBVakhcIzQ3NZ33DFM6TjIObXPHaXOsqzvPwefXHvwBSC/N/e/g6fBeM7N/Moj3AmxLjKaB+vePvTGdxk6RPCg==", "dev": true, "optional": true }, diff --git a/package.json b/package.json index a236bd3a14..59ee361dff 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "102.0.0-nightly.20211126", + "binaryen": "103.0.0", "long": "^5.1.0" }, "devDependencies": { diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index b74f1fb51e..601b004a4d 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -1129,7 +1129,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1144,7 +1144,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1157,7 +1157,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1165,7 +1165,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1176,16 +1176,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1196,16 +1196,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1213,7 +1213,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1221,8 +1221,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1239,7 +1239,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1249,13 +1249,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1268,40 +1268,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store diff --git a/tests/compiler/class-overloading.optimized.wat b/tests/compiler/class-overloading.optimized.wat index 201fd5d68b..7d862517ba 100644 --- a/tests/compiler/class-overloading.optimized.wat +++ b/tests/compiler/class-overloading.optimized.wat @@ -1552,7 +1552,6 @@ (func $start:class-overloading (local $0 i32) (local $1 i32) - (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -2684,8 +2683,7 @@ local.tee $0 i32.store global.get $~lib/memory/__stack_pointer - local.tee $2 - local.get $2 + local.tee $1 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -2709,6 +2707,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $1 local.get $0 i32.store global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 9ce8ee5e5f..309a264c2a 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -1269,7 +1269,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1284,7 +1284,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1297,7 +1297,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1305,7 +1305,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1316,16 +1316,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1336,16 +1336,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1353,7 +1353,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1361,8 +1361,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1379,7 +1379,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1389,13 +1389,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1408,40 +1408,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -1699,7 +1699,7 @@ i32.const 4 i32.const 4 call $~lib/rt/itcms/__new - local.tee $1 + local.tee $0 i32.store global.get $~lib/memory/__stack_pointer i32.const 8 @@ -1710,62 +1710,62 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $0 + local.tee $1 i64.const 0 i64.store - local.get $0 + local.get $1 i32.const 16 i32.const 5 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $1 i32.store - local.get $2 + local.get $1 i32.const 0 i32.store - local.get $2 + local.get $1 i32.const 0 i32.store offset=4 - local.get $2 + local.get $1 i32.const 0 i32.store offset=8 - local.get $2 + local.get $1 i32.const 0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 32 i32.const 0 call $~lib/rt/itcms/__new - local.tee $0 + local.tee $2 i32.store offset=4 + local.get $1 local.get $2 - local.get $0 i32.store - local.get $0 + local.get $2 if + local.get $1 local.get $2 - local.get $0 call $byn-split-outlined-A$~lib/rt/itcms/__link end + local.get $1 local.get $2 - local.get $0 i32.store offset=4 - local.get $2 + local.get $1 i32.const 32 i32.store offset=8 - local.get $2 + local.get $1 i32.const 0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 local.get $1 - local.get $2 i32.store - local.get $2 + local.get $1 if + local.get $0 local.get $1 - local.get $2 call $byn-split-outlined-A$~lib/rt/itcms/__link end global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 53f8d7513f..28cb0342a8 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -24,8 +24,6 @@ (global $constructor/none (mut i32) (i32.const 0)) (global $constructor/justFieldInit (mut i32) (i32.const 0)) (global $constructor/justFieldNoInit (mut i32) (i32.const 0)) - (global $constructor/ctorReturns (mut i32) (i32.const 0)) - (global $constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) (global $constructor/ctorConditionallyReturnsThis (mut i32) (i32.const 0)) (global $constructor/ctorFieldInitOrder (mut i32) (i32.const 0)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17988)) @@ -91,18 +89,6 @@ local.get $0 call $byn-split-outlined-A$~lib/rt/itcms/__visit end - global.get $constructor/ctorReturns - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - global.get $constructor/ctorConditionallyReturns - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end global.get $constructor/ctorConditionallyReturnsThis local.tee $0 if @@ -1206,7 +1192,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1221,7 +1207,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1234,7 +1220,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1242,7 +1228,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1253,16 +1239,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1273,16 +1259,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1290,7 +1276,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1298,8 +1284,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1316,7 +1302,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1326,13 +1312,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1345,40 +1331,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -1836,8 +1822,6 @@ global.set $~lib/memory/__stack_pointer local.get $0 global.set $constructor/justFieldNoInit - i32.const 0 - global.set $constructor/ctorReturns global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -1859,8 +1843,6 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - global.set $constructor/ctorConditionallyReturns global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub diff --git a/tests/compiler/duplicate-fields.optimized.wat b/tests/compiler/duplicate-fields.optimized.wat index fbd19917c3..7b35fa25fa 100644 --- a/tests/compiler/duplicate-fields.optimized.wat +++ b/tests/compiler/duplicate-fields.optimized.wat @@ -56,18 +56,18 @@ local.tee $0 if local.get $0 - call $~lib/rt/itcms/__visit + call $byn-split-outlined-A$~lib/rt/itcms/__visit end global.get $duplicate-fields/raz local.tee $0 if local.get $0 - call $~lib/rt/itcms/__visit + call $byn-split-outlined-A$~lib/rt/itcms/__visit end i32.const 1248 - call $~lib/rt/itcms/__visit + call $byn-split-outlined-A$~lib/rt/itcms/__visit i32.const 1056 - call $~lib/rt/itcms/__visit + call $byn-split-outlined-A$~lib/rt/itcms/__visit global.get $~lib/rt/itcms/pinSpace local.tee $1 i32.load offset=4 @@ -238,30 +238,6 @@ local.get $0 i32.store offset=8 ) - (func $~lib/rt/itcms/__visit (param $0 i32) - local.get $0 - i32.eqz - if - return - end - global.get $~lib/rt/itcms/white - local.get $0 - i32.const 20 - i32.sub - local.tee $0 - i32.load offset=4 - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/rt/itcms/Object#makeGray - global.get $~lib/rt/itcms/visitCount - i32.const 1 - i32.add - global.set $~lib/rt/itcms/visitCount - end - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -328,11 +304,10 @@ local.tee $2 i32.const 16 i32.lt_u - i32.const 0 local.get $3 i32.const 23 i32.lt_u - select + i32.and i32.eqz if i32.const 0 @@ -593,11 +568,10 @@ local.tee $2 i32.const 16 i32.lt_u - i32.const 0 local.get $5 i32.const 23 i32.lt_u - select + i32.and i32.eqz if i32.const 0 @@ -780,8 +754,8 @@ (local $1 i32) memory.size local.tee $1 - i32.const 1 - i32.lt_s + i32.const 0 + i32.le_s if (result i32) i32.const 1 local.get $1 @@ -941,7 +915,11 @@ if local.get $0 i32.load - call $~lib/rt/itcms/__visit + local.tee $2 + if + local.get $2 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end local.get $0 i32.const 4 i32.add @@ -1054,7 +1032,7 @@ local.get $0 i32.const 4 i32.add - local.tee $1 + local.tee $0 i32.const 17980 i32.ge_u if @@ -1064,20 +1042,20 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $1 + local.get $0 i32.const 4 i32.sub - local.set $0 - local.get $1 + local.set $2 + local.get $0 i32.const 15 i32.and i32.const 1 - local.get $1 + local.get $0 select if (result i32) i32.const 1 else - local.get $0 + local.get $2 i32.load i32.const 1 i32.and @@ -1090,13 +1068,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load i32.const 1 i32.or i32.store - local.get $0 + local.get $2 call $~lib/rt/tlsf/insertBlock end end @@ -1117,56 +1095,53 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u - if + if (result i32) local.get $1 i32.const 4 i32.shr_u - local.set $1 else + i32.const 31 + i32.const 1 + i32.const 27 local.get $1 - i32.const 536870910 - i32.lt_u - if - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - local.get $1 - i32.add - i32.const 1 - i32.sub - local.set $1 - end + i32.clz + i32.sub + i32.shl + local.get $1 + i32.add + i32.const 1 + i32.sub local.get $1 - i32.const 31 local.get $1 + i32.const 536870910 + i32.lt_u + select + local.tee $1 i32.clz i32.sub - local.tee $2 + local.tee $3 + i32.const 7 + i32.sub + local.set $2 + local.get $1 + local.get $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $1 - local.get $2 - i32.const 7 - i32.sub - local.set $2 end - local.get $1 + local.tee $1 i32.const 16 i32.lt_u - i32.const 0 local.get $2 i32.const 23 i32.lt_u - select + i32.and i32.eqz if i32.const 0 @@ -1312,7 +1287,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $3 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1327,21 +1302,19 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 + i32.const 12 + local.get $2 + i32.const 19 + i32.add + i32.const -16 + i32.and + i32.const 4 + i32.sub local.get $2 i32.const 12 i32.le_u - if (result i32) - i32.const 12 - else - local.get $2 - i32.const 19 - i32.add - i32.const -16 - i32.and - i32.const 4 - i32.sub - end + select local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 @@ -1349,25 +1322,8 @@ if memory.size local.tee $2 - local.get $5 - i32.const 536870910 - i32.lt_u - if (result i32) - i32.const 1 - i32.const 27 - local.get $5 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - local.get $5 - i32.add - else - local.get $5 - end i32.const 4 - local.get $3 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1376,6 +1332,21 @@ i32.sub i32.ne i32.shl + i32.const 1 + i32.const 27 + local.get $5 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + local.get $5 + i32.add + local.get $5 + local.get $5 + i32.const 536870910 + i32.lt_u + select i32.add i32.const 65535 i32.add @@ -1383,16 +1354,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1400,7 +1371,7 @@ unreachable end end - local.get $3 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1408,7 +1379,7 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory - local.get $3 + local.get $4 local.get $5 call $~lib/rt/tlsf/searchBlock local.tee $2 @@ -1436,12 +1407,12 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $4 + local.set $3 local.get $5 i32.const 4 i32.add @@ -1455,7 +1426,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const -4 i32.and local.get $5 @@ -1465,7 +1436,7 @@ i32.ge_u if local.get $2 - local.get $4 + local.get $3 i32.const 2 i32.and local.get $5 @@ -1476,19 +1447,19 @@ i32.const 4 i32.add i32.add - local.tee $4 + local.tee $3 local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $3 local.get $4 + local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $4 + local.get $3 i32.const -2 i32.and i32.store @@ -1725,61 +1696,6 @@ end local.get $2 ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) - local.get $1 - i32.eqz - if - return - end - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 1120 - i32.const 294 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/itcms/white - local.get $1 - i32.const 20 - i32.sub - local.tee $1 - i32.load offset=4 - i32.const 3 - i32.and - i32.eq - if - local.get $0 - i32.const 20 - i32.sub - i32.load offset=4 - i32.const 3 - i32.and - local.tee $0 - global.get $~lib/rt/itcms/white - i32.eqz - i32.eq - if - local.get $1 - call $~lib/rt/itcms/Object#makeGray - else - global.get $~lib/rt/itcms/state - i32.const 1 - i32.eq - i32.const 0 - local.get $0 - i32.const 3 - i32.eq - select - if - local.get $1 - call $~lib/rt/itcms/Object#makeGray - end - end - end - ) (func $~lib/rt/__visit_members (param $0 i32) (local $1 i32) block $folding-inner0 @@ -1814,7 +1730,7 @@ local.tee $1 if local.get $1 - call $~lib/rt/itcms/__visit + call $byn-split-outlined-A$~lib/rt/itcms/__visit end br $folding-inner0 end @@ -1831,7 +1747,7 @@ local.tee $0 if local.get $0 - call $~lib/rt/itcms/__visit + call $byn-split-outlined-A$~lib/rt/itcms/__visit end ) (func $~start @@ -2047,9 +1963,6 @@ local.get $0 i32.const 0 i32.store - local.get $0 - i32.const 0 - call $~lib/rt/itcms/__link global.get $~lib/memory/__stack_pointer local.tee $2 i32.const 4 @@ -2076,14 +1989,14 @@ i32.const 0 i32.store local.get $0 - i32.const 0 - call $~lib/rt/itcms/__link - local.get $0 local.get $1 i32.store - local.get $0 local.get $1 - call $~lib/rt/itcms/__link + if + local.get $0 + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -2094,9 +2007,12 @@ local.get $0 local.get $1 i32.store - local.get $0 local.get $1 - call $~lib/rt/itcms/__link + if + local.get $0 + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -2401,4 +2317,72 @@ call $~lib/builtins/abort unreachable ) + (func $byn-split-outlined-A$~lib/rt/itcms/__visit (param $0 i32) + global.get $~lib/rt/itcms/white + local.get $0 + i32.const 20 + i32.sub + local.tee $0 + i32.load offset=4 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/rt/itcms/Object#makeGray + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.add + global.set $~lib/rt/itcms/visitCount + end + ) + (func $byn-split-outlined-A$~lib/rt/itcms/__link (param $0 i32) (param $1 i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1120 + i32.const 294 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/white + local.get $1 + i32.const 20 + i32.sub + local.tee $1 + i32.load offset=4 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + i32.const 20 + i32.sub + i32.load offset=4 + i32.const 3 + i32.and + local.tee $0 + global.get $~lib/rt/itcms/white + i32.eqz + i32.eq + if + local.get $1 + call $~lib/rt/itcms/Object#makeGray + else + global.get $~lib/rt/itcms/state + i32.const 1 + i32.eq + local.get $0 + i32.const 3 + i32.eq + i32.and + if + local.get $1 + call $~lib/rt/itcms/Object#makeGray + end + end + end + ) ) diff --git a/tests/compiler/empty-exportruntime.optimized.wat b/tests/compiler/empty-exportruntime.optimized.wat index fe98d1636f..6d050a93d9 100644 --- a/tests/compiler/empty-exportruntime.optimized.wat +++ b/tests/compiler/empty-exportruntime.optimized.wat @@ -1275,7 +1275,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1290,7 +1290,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1303,7 +1303,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1311,7 +1311,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1322,16 +1322,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1342,16 +1342,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1359,7 +1359,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1367,8 +1367,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1385,7 +1385,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1395,13 +1395,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1414,40 +1414,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 5ed5161167..c548f56a50 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -1270,29 +1270,28 @@ i32.const 20 i32.add local.tee $0 - local.tee $1 i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 4 i32.add - local.tee $2 + local.tee $1 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=1 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=2 - local.get $2 + local.get $1 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 3 i32.sub i32.const 0 diff --git a/tests/compiler/exportstar-rereexport.optimized.wat b/tests/compiler/exportstar-rereexport.optimized.wat index d0902ec05e..1e0891b773 100644 --- a/tests/compiler/exportstar-rereexport.optimized.wat +++ b/tests/compiler/exportstar-rereexport.optimized.wat @@ -1459,29 +1459,28 @@ i32.const 20 i32.add local.tee $0 - local.tee $1 i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 4 i32.add - local.tee $3 + local.tee $1 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=1 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=2 - local.get $3 + local.get $1 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $3 + local.get $1 i32.const 3 i32.sub i32.const 0 diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 8f7b54a20f..09f0d2ae79 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -1275,7 +1275,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1290,7 +1290,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1303,7 +1303,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1311,7 +1311,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1322,16 +1322,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1342,16 +1342,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1359,7 +1359,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1367,8 +1367,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1385,7 +1385,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1395,13 +1395,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1414,40 +1414,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -2379,10 +2379,10 @@ (local $10 i32) i32.const 1180 i32.load - local.tee $10 + local.tee $9 i32.const 1 i32.add - local.tee $9 + local.tee $8 i32.const 1176 i32.load local.tee $1 @@ -2390,7 +2390,7 @@ i32.shr_u i32.gt_u if - local.get $9 + local.get $8 i32.const 268435455 i32.gt_u if @@ -2412,9 +2412,9 @@ i32.lt_u select local.tee $1 - local.get $9 + local.get $8 i32.const 8 - local.get $9 + local.get $8 i32.const 8 i32.gt_u select @@ -2425,7 +2425,7 @@ local.get $2 i32.gt_u select - local.tee $8 + local.tee $10 i32.const 1168 i32.load local.tee $3 @@ -2440,31 +2440,31 @@ i32.le_u if local.get $1 - local.get $8 + local.get $10 i32.store offset=16 local.get $3 local.set $6 br $__inlined_func$~lib/rt/itcms/__renew end - local.get $8 + local.get $10 local.get $1 i32.load offset=12 call $~lib/rt/itcms/__new local.tee $6 local.set $2 - local.get $8 + local.get $10 local.get $1 i32.load offset=16 local.tee $1 local.get $1 - local.get $8 + local.get $10 i32.gt_u select local.set $7 block $~lib/util/memory/memmove|inlined.0 + local.get $2 local.get $3 local.tee $1 - local.get $2 i32.eq br_if $~lib/util/memory/memmove|inlined.0 local.get $1 @@ -2666,12 +2666,12 @@ end end i32.const 1176 - local.get $8 + local.get $10 i32.store end i32.const 1172 i32.load - local.get $10 + local.get $9 i32.const 2 i32.shl i32.add @@ -2684,7 +2684,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end i32.const 1180 - local.get $9 + local.get $8 i32.store ) (func $~lib/array/Array~visit (param $0 i32) diff --git a/tests/compiler/extends-recursive.optimized.wat b/tests/compiler/extends-recursive.optimized.wat index 59bdece94e..19b1b9e2e3 100644 --- a/tests/compiler/extends-recursive.optimized.wat +++ b/tests/compiler/extends-recursive.optimized.wat @@ -1355,29 +1355,28 @@ i32.const 20 i32.add local.tee $0 - local.tee $1 i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 4 i32.add - local.tee $2 + local.tee $1 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=1 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=2 - local.get $2 + local.get $1 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 3 i32.sub i32.const 0 diff --git a/tests/compiler/features/reference-types.optimized.wat b/tests/compiler/features/reference-types.optimized.wat index 361e384253..70b16e1b82 100644 --- a/tests/compiler/features/reference-types.optimized.wat +++ b/tests/compiler/features/reference-types.optimized.wat @@ -16,7 +16,6 @@ (import "reference-types" "somethingNull" (func $features/reference-types/somethingNull (result externref))) (import "reference-types" "external" (func $features/reference-types/external (param externref) (result externref))) (global $features/reference-types/funcGlobal (mut funcref) (ref.null func)) - (global $features/reference-types/externGlobal (mut externref) (ref.null extern)) (global $features/reference-types/anyGlobal (mut anyref) (ref.null any)) (memory $0 1) (data (i32.const 1036) "L") @@ -38,6 +37,8 @@ call $features/reference-types/external ) (func $~start + (local $0 externref) + (local $1 externref) global.get $features/reference-types/someObject global.get $features/reference-types/someKey call $~lib/bindings/Reflect/has @@ -51,11 +52,13 @@ unreachable end global.get $features/reference-types/someObject + local.tee $0 call $~lib/bindings/console/log global.get $features/reference-types/someKey + local.tee $1 call $~lib/bindings/console/log - global.get $features/reference-types/someObject - global.get $features/reference-types/someKey + local.get $0 + local.get $1 call $~lib/bindings/Reflect/get call $~lib/bindings/console/log call $features/reference-types/somethingReal @@ -113,19 +116,6 @@ end ref.null func global.set $features/reference-types/funcGlobal - global.get $features/reference-types/externGlobal - ref.is_null - i32.eqz - if - i32.const 0 - i32.const 1056 - i32.const 79 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - ref.null extern - global.set $features/reference-types/externGlobal global.get $features/reference-types/anyGlobal ref.is_null i32.eqz diff --git a/tests/compiler/features/simd.optimized.wat b/tests/compiler/features/simd.optimized.wat index b6c1057cda..dbcb2db121 100644 --- a/tests/compiler/features/simd.optimized.wat +++ b/tests/compiler/features/simd.optimized.wat @@ -857,7 +857,7 @@ call $~lib/rt/tlsf/removeBlock local.get $1 i32.load - local.set $2 + local.set $4 local.get $3 i32.const 4 i32.add @@ -871,17 +871,17 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const -4 i32.and local.get $3 i32.sub - local.tee $4 + local.tee $2 i32.const 16 i32.ge_u if local.get $1 - local.get $2 + local.get $4 i32.const 2 i32.and local.get $3 @@ -892,19 +892,19 @@ i32.const 4 i32.add i32.add - local.tee $2 - local.get $4 + local.tee $3 + local.get $2 i32.const 4 i32.sub i32.const 1 i32.or i32.store local.get $0 - local.get $2 + local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $1 - local.get $2 + local.get $4 i32.const -2 i32.and i32.store diff --git a/tests/compiler/field-initialization.optimized.wat b/tests/compiler/field-initialization.optimized.wat index de4c616b77..33844a0f64 100644 --- a/tests/compiler/field-initialization.optimized.wat +++ b/tests/compiler/field-initialization.optimized.wat @@ -1282,7 +1282,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1297,7 +1297,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1310,7 +1310,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1318,7 +1318,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1329,16 +1329,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1349,16 +1349,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1366,7 +1366,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1374,8 +1374,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1392,7 +1392,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1402,13 +1402,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1421,40 +1421,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -3036,25 +3036,25 @@ end global.get $~lib/memory/__stack_pointer local.tee $0 - local.get $0 i32.const 4 i32.const 23 call $~lib/rt/itcms/__new - local.tee $0 + local.tee $1 i32.store offset=24 - local.get $0 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor local.tee $2 i32.store local.get $2 if - local.get $0 + local.get $1 local.get $2 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 + local.get $1 i32.store offset=24 - local.get $0 + local.get $1 i32.load i32.eqz if @@ -3067,28 +3067,28 @@ end global.get $~lib/memory/__stack_pointer local.tee $0 - local.get $0 i32.const 4 i32.const 24 call $~lib/rt/itcms/__new - local.tee $0 + local.tee $1 i32.store - local.get $0 + local.get $1 i32.const 0 i32.store - local.get $0 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor local.tee $2 i32.store local.get $2 if - local.get $0 + local.get $1 local.get $2 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 + local.get $1 i32.store - local.get $0 + local.get $1 i32.load i32.eqz if diff --git a/tests/compiler/field.optimized.wat b/tests/compiler/field.optimized.wat index c0fb5654d4..7b55dbd668 100644 --- a/tests/compiler/field.optimized.wat +++ b/tests/compiler/field.optimized.wat @@ -1260,7 +1260,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1275,7 +1275,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1288,7 +1288,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1296,7 +1296,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1307,16 +1307,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1327,16 +1327,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1344,7 +1344,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1352,8 +1352,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1370,7 +1370,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1380,13 +1380,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1399,40 +1399,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -2375,10 +2375,10 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $7 + local.tee $6 i32.const 0 i32.store - local.get $7 + local.get $6 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -2394,7 +2394,7 @@ i32.const 4 i32.const 3 call $~lib/rt/itcms/__new - local.tee $5 + local.tee $7 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 @@ -2405,59 +2405,59 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $8 + local.tee $5 i32.const 0 i32.store i32.const 1456 - local.set $1 + local.set $0 block $~lib/util/memory/memmove|inlined.0 i32.const 0 i32.const 0 call $~lib/rt/itcms/__new local.tee $4 - local.tee $0 + local.tee $1 i32.const 1456 i32.eq br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 + local.get $1 i32.const 1456 i32.eq if - local.get $0 + local.get $1 call $~lib/util/memory/memcpy br $~lib/util/memory/memmove|inlined.0 end - local.get $0 + local.get $1 i32.const 1456 i32.lt_u if - local.get $0 + local.get $1 i32.const 7 i32.and i32.eqz if loop $while-continue|0 - local.get $0 + local.get $1 i32.const 7 i32.and if - local.get $6 + local.get $8 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $6 + local.get $8 i32.const 1 i32.sub - local.set $6 - local.get $0 + local.set $8 + local.get $1 local.tee $2 i32.const 1 i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 local.tee $3 i32.const 1 i32.add - local.set $1 + local.set $0 local.get $2 local.get $3 i32.load8_u @@ -2466,77 +2466,77 @@ end end loop $while-continue|1 - local.get $6 + local.get $8 i32.const 8 i32.ge_u if - local.get $0 local.get $1 + local.get $0 i64.load i64.store - local.get $6 + local.get $8 i32.const 8 i32.sub - local.set $6 - local.get $0 - i32.const 8 - i32.add - local.set $0 + local.set $8 local.get $1 i32.const 8 i32.add local.set $1 + local.get $0 + i32.const 8 + i32.add + local.set $0 br $while-continue|1 end end end loop $while-continue|2 - local.get $6 + local.get $8 if - local.get $0 + local.get $1 local.tee $2 i32.const 1 i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 local.tee $3 i32.const 1 i32.add - local.set $1 + local.set $0 local.get $2 local.get $3 i32.load8_u i32.store8 - local.get $6 + local.get $8 i32.const 1 i32.sub - local.set $6 + local.set $8 br $while-continue|2 end end else - local.get $0 + local.get $1 i32.const 7 i32.and i32.eqz if loop $while-continue|3 - local.get $0 - local.get $6 + local.get $1 + local.get $8 i32.add i32.const 7 i32.and if - local.get $6 + local.get $8 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $6 + local.get $8 i32.const 1 i32.sub - local.tee $6 - local.get $0 + local.tee $8 + local.get $1 i32.add - local.get $6 + local.get $8 i32.const 1456 i32.add i32.load8_u @@ -2545,17 +2545,17 @@ end end loop $while-continue|4 - local.get $6 + local.get $8 i32.const 8 i32.ge_u if - local.get $6 + local.get $8 i32.const 8 i32.sub - local.tee $6 - local.get $0 + local.tee $8 + local.get $1 i32.add - local.get $6 + local.get $8 i32.const 1456 i32.add i64.load @@ -2565,15 +2565,15 @@ end end loop $while-continue|5 - local.get $6 + local.get $8 if - local.get $6 + local.get $8 i32.const 1 i32.sub - local.tee $6 - local.get $0 + local.tee $8 + local.get $1 i32.add - local.get $6 + local.get $8 i32.const 1456 i32.add i32.load8_u @@ -2583,7 +2583,7 @@ end end end - local.get $8 + local.get $5 local.get $4 i32.store i32.const 16 @@ -2611,12 +2611,12 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $5 + local.get $7 local.get $0 i32.store local.get $0 if - local.get $5 + local.get $7 local.get $0 call $byn-split-outlined-A$~lib/rt/itcms/__link end @@ -2624,8 +2624,8 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $6 local.get $7 - local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 @@ -2668,17 +2668,17 @@ i32.const 2 i32.shl i32.add - local.set $2 + local.set $3 loop $while-continue|0 local.get $1 - local.get $2 + local.get $3 i32.lt_u if local.get $1 i32.load - local.tee $3 + local.tee $2 if - local.get $3 + local.get $2 call $byn-split-outlined-A$~lib/rt/itcms/__visit end local.get $1 diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index d018580cd3..d0654eee7f 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -1196,7 +1196,6 @@ ) (func $function-expression/semanticallyAnonymous (local $0 i32) - (local $1 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -1214,10 +1213,9 @@ end global.get $~lib/memory/__stack_pointer local.tee $0 - local.tee $1 i32.const 0 i32.store - local.get $1 + local.get $0 i32.const 2064 i32.store local.get $0 @@ -1280,16 +1278,16 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $3 i64.const 0 i64.store - local.get $1 + local.get $3 i32.const 0 i32.store offset=8 - local.get $1 + local.get $3 i32.const 2032 i32.store - local.get $1 + local.get $3 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -1298,7 +1296,7 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $1 i32.const 0 i32.store global.get $~lib/rt/itcms/total @@ -1524,34 +1522,33 @@ i32.const 20 i32.add local.tee $0 - local.tee $2 i32.const 0 i32.store8 - local.get $2 + local.get $0 i32.const 4 i32.add - local.tee $4 + local.tee $2 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $2 + local.get $0 i32.const 0 i32.store8 offset=1 - local.get $2 + local.get $0 i32.const 0 i32.store8 offset=2 - local.get $4 + local.get $2 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $4 + local.get $2 i32.const 3 i32.sub i32.const 0 i32.store8 - local.get $3 + local.get $1 local.get $0 i32.store local.get $0 @@ -1580,7 +1577,7 @@ i32.load offset=4 i32.const 3 i32.and - local.tee $2 + local.tee $1 global.get $~lib/rt/itcms/white i32.eqz i32.eq @@ -1591,7 +1588,7 @@ global.get $~lib/rt/itcms/state i32.const 1 i32.eq - local.get $2 + local.get $1 i32.const 3 i32.eq i32.and @@ -1605,7 +1602,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $3 local.get $0 i32.store offset=4 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index c51c8286ee..95b131e5d9 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1361,29 +1361,28 @@ i32.const 20 i32.add local.tee $0 - local.tee $1 i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 4 i32.add - local.tee $2 + local.tee $1 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=1 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=2 - local.get $2 + local.get $1 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 3 i32.sub i32.const 0 diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index ec3a36d439..af3287622b 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -1296,7 +1296,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1311,7 +1311,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1324,7 +1324,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1332,7 +1332,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1343,16 +1343,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1363,16 +1363,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1380,7 +1380,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1388,8 +1388,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1406,7 +1406,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1416,13 +1416,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1435,40 +1435,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -2700,30 +2700,20 @@ (local $1 i32) (local $2 i32) (local $3 i32) - block $folding-inner1 - block $folding-inner0 + block $folding-inner2 + block $folding-inner1 block $invalid block $infer-array/Ref - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $infer-array/Ref $folding-inner1 $folding-inner1 $folding-inner0 $folding-inner1 $invalid - end - return + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $infer-array/Ref $folding-inner1 $folding-inner1 $folding-inner2 $folding-inner1 $invalid end return end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end return end return @@ -2731,6 +2721,34 @@ unreachable end local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $1 + local.get $3 + i32.lt_u + if + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $0 i32.load local.tee $0 if @@ -2740,34 +2758,6 @@ return end local.get $0 - i32.load offset=4 - local.tee $1 - local.get $0 - i32.load offset=12 - i32.const 2 - i32.shl - i32.add - local.set $2 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - local.get $1 - i32.load - local.tee $3 - if - local.get $3 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $while-continue|0 - end - end - local.get $0 i32.load local.tee $0 if @@ -2807,15 +2797,15 @@ local.get $0 local.get $1 i32.shl - local.tee $7 + local.tee $8 i32.const 0 call $~lib/rt/itcms/__new local.set $6 local.get $3 if block $~lib/util/memory/memmove|inlined.0 - local.get $7 - local.set $8 + local.get $8 + local.set $7 local.get $6 local.tee $1 local.get $3 @@ -2824,10 +2814,10 @@ local.get $3 local.get $1 i32.sub - local.get $8 + local.get $7 i32.sub i32.const 0 - local.get $8 + local.get $7 i32.const 1 i32.shl i32.sub @@ -2835,7 +2825,7 @@ if local.get $1 local.get $3 - local.get $8 + local.get $7 call $~lib/util/memory/memcpy br $~lib/util/memory/memmove|inlined.0 end @@ -2856,13 +2846,13 @@ i32.const 7 i32.and if - local.get $8 + local.get $7 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 local.get $1 local.tee $4 i32.const 1 @@ -2881,7 +2871,7 @@ end end loop $while-continue|1 - local.get $8 + local.get $7 i32.const 8 i32.ge_u if @@ -2889,10 +2879,10 @@ local.get $3 i64.load i64.store - local.get $8 + local.get $7 i32.const 8 i32.sub - local.set $8 + local.set $7 local.get $1 i32.const 8 i32.add @@ -2906,7 +2896,7 @@ end end loop $while-continue|2 - local.get $8 + local.get $7 if local.get $1 local.tee $4 @@ -2922,10 +2912,10 @@ local.get $5 i32.load8_u i32.store8 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $while-continue|2 end end @@ -2940,22 +2930,22 @@ if loop $while-continue|3 local.get $1 - local.get $8 + local.get $7 i32.add i32.const 7 i32.and if - local.get $8 + local.get $7 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.tee $8 + local.tee $7 local.get $1 i32.add local.get $3 - local.get $8 + local.get $7 i32.add i32.load8_u i32.store8 @@ -2963,18 +2953,18 @@ end end loop $while-continue|4 - local.get $8 + local.get $7 i32.const 8 i32.ge_u if - local.get $8 + local.get $7 i32.const 8 i32.sub - local.tee $8 + local.tee $7 local.get $1 i32.add local.get $3 - local.get $8 + local.get $7 i32.add i64.load i64.store @@ -2983,16 +2973,16 @@ end end loop $while-continue|5 - local.get $8 + local.get $7 if - local.get $8 + local.get $7 i32.const 1 i32.sub - local.tee $8 + local.tee $7 local.get $1 i32.add local.get $3 - local.get $8 + local.get $7 i32.add i32.load8_u i32.store8 @@ -3022,7 +3012,7 @@ local.get $6 i32.store offset=4 local.get $1 - local.get $7 + local.get $8 i32.store offset=8 local.get $1 local.get $0 diff --git a/tests/compiler/infer-generic.optimized.wat b/tests/compiler/infer-generic.optimized.wat index 4ac173f572..7c6b5480b0 100644 --- a/tests/compiler/infer-generic.optimized.wat +++ b/tests/compiler/infer-generic.optimized.wat @@ -1245,29 +1245,28 @@ i32.const 20 i32.add local.tee $0 - local.tee $1 i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 4 i32.add - local.tee $2 + local.tee $1 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=1 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=2 - local.get $2 + local.get $1 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 3 i32.sub i32.const 0 @@ -1278,47 +1277,37 @@ local.get $0 ) (func $~lib/rt/__visit_members (param $0 i32) - block $folding-inner0 - block $invalid - block $infer-generic/Ref - block $~lib/array/Array - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/array/Array $folding-inner0 $infer-generic/Ref $folding-inner0 $folding-inner0 $invalid - end - return + block $folding-inner1 + block $folding-inner0 + block $invalid + block $infer-generic/Ref + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner1 $folding-inner1 $folding-inner0 $infer-generic/Ref $folding-inner0 $folding-inner0 $invalid end return end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end return end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end return end - return + unreachable end - unreachable + local.get $0 + i32.load offset=4 + local.tee $0 + if + local.get $0 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + return end local.get $0 - i32.load offset=4 + i32.load local.tee $0 if local.get $0 diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index c7349b3c06..23018c5627 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -1141,7 +1141,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1156,7 +1156,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1169,7 +1169,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1177,7 +1177,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1188,16 +1188,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1208,16 +1208,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1225,7 +1225,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1233,8 +1233,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1251,7 +1251,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1261,13 +1261,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1280,40 +1280,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index c9e7471807..97143ca3ac 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -1355,29 +1355,28 @@ i32.const 20 i32.add local.tee $0 - local.tee $1 i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 4 i32.add - local.tee $2 + local.tee $1 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=1 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=2 - local.get $2 + local.get $1 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 3 i32.sub i32.const 0 diff --git a/tests/compiler/issues/1699.optimized.wat b/tests/compiler/issues/1699.optimized.wat index f883c01f4b..3fa24fc513 100644 --- a/tests/compiler/issues/1699.optimized.wat +++ b/tests/compiler/issues/1699.optimized.wat @@ -1271,7 +1271,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1286,7 +1286,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1299,7 +1299,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1307,7 +1307,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1318,16 +1318,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1338,16 +1338,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1355,7 +1355,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1363,8 +1363,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1381,7 +1381,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1391,13 +1391,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1410,40 +1410,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -2436,7 +2436,7 @@ local.tee $9 local.get $0 i32.load - local.tee $7 + local.tee $8 i32.const 20 i32.sub local.tee $3 @@ -2450,14 +2450,14 @@ local.get $3 local.get $9 i32.store offset=16 - local.get $7 + local.get $8 br $__inlined_func$~lib/rt/itcms/__renew end local.get $9 local.get $3 i32.load offset=12 call $~lib/rt/itcms/__new - local.set $8 + local.set $7 local.get $9 local.get $3 i32.load offset=16 @@ -2468,9 +2468,9 @@ select local.set $10 block $~lib/util/memory/memmove|inlined.0 - local.get $8 - local.tee $4 local.get $7 + local.tee $4 + local.get $8 local.tee $3 i32.eq br_if $~lib/util/memory/memmove|inlined.0 @@ -2654,10 +2654,10 @@ end end end - local.get $8 + local.get $7 end local.tee $3 - local.get $7 + local.get $8 i32.ne if local.get $0 @@ -2704,71 +2704,63 @@ (local $1 i32) (local $2 i32) (local $3 i32) - block $invalid - block $~lib/array/Array - block $issues/1699/MultiAssignmentTest - block $~lib/arraybuffer/ArrayBufferView + block $folding-inner0 + block $invalid + block $~lib/array/Array + block $issues/1699/MultiAssignmentTest block $~lib/string/String block $~lib/arraybuffer/ArrayBuffer local.get $0 i32.const 8 i32.sub i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $issues/1699/MultiAssignmentTest $~lib/array/Array $invalid + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner0 $issues/1699/MultiAssignmentTest $~lib/array/Array $invalid end return end return end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end return end - return - end - local.get $0 - i32.load offset=4 - local.tee $1 - local.get $0 - i32.load offset=12 - i32.const 2 - i32.shl - i32.add - local.set $2 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_u - if + local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 local.get $1 - i32.load - local.tee $3 + local.get $3 + i32.lt_u if - local.get $3 - call $byn-split-outlined-A$~lib/rt/itcms/__visit + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $while-continue|0 end - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $while-continue|0 end + br $folding-inner0 end + unreachable + end + local.get $0 + i32.load + local.tee $0 + if local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - return + call $byn-split-outlined-A$~lib/rt/itcms/__visit end - unreachable ) (func $~start (local $0 i32) @@ -2818,13 +2810,13 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $2 i64.const 0 i64.store - local.get $1 + local.get $2 i64.const 0 i64.store offset=8 - local.get $1 + local.get $2 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -2833,81 +2825,81 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $1 i64.const 0 i64.store - local.get $2 + local.get $1 i32.const 16 i32.const 4 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 i32.const 0 i32.store - local.get $2 + local.get $3 i32.const 0 i32.store offset=4 - local.get $2 + local.get $3 i32.const 0 i32.store offset=8 - local.get $2 + local.get $3 i32.const 0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 32 i32.const 0 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $1 i32.store offset=4 - local.get $2 local.get $3 + local.get $1 i32.store - local.get $3 + local.get $1 if - local.get $2 local.get $3 + local.get $1 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $2 local.get $3 + local.get $1 i32.store offset=4 - local.get $2 + local.get $3 i32.const 32 i32.store offset=8 - local.get $2 + local.get $3 i32.const 3 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 local.get $2 + local.get $3 i32.store call $issues/1699/MultiAssignmentTest#constructor local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=8 - local.get $2 + local.get $3 i32.const 1 local.get $1 call $~lib/array/Array#__set - local.get $2 + local.get $3 i32.const 1 call $~lib/array/Array#__get local.set $1 global.get $~lib/memory/__stack_pointer local.get $1 i32.store offset=4 - local.get $2 + local.get $3 i32.const 0 local.get $1 call $~lib/array/Array#__set loop $for-loop|0 - local.get $2 + local.get $3 i32.load offset=12 local.get $0 i32.gt_s @@ -2920,7 +2912,7 @@ i32.const 1 i32.gt_s if - local.get $2 + local.get $3 local.get $0 local.get $1 call $~lib/array/Array#__set @@ -2932,10 +2924,10 @@ br $for-loop|0 end end - local.get $2 + local.get $3 i32.const 0 call $~lib/array/Array#__get - local.get $2 + local.get $3 i32.const 1 call $~lib/array/Array#__get i32.ne @@ -2947,10 +2939,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 2 call $~lib/array/Array#__get - local.get $2 + local.get $3 i32.const 1 call $~lib/array/Array#__get i32.eq diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 35ace370a2..902b8c2561 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -1176,7 +1176,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $4 + local.set $3 local.get $0 i32.const 16 i32.add @@ -1191,7 +1191,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 12 local.get $1 i32.const 19 @@ -1204,7 +1204,7 @@ i32.const 12 i32.le_u select - local.tee $2 + local.tee $4 call $~lib/rt/tlsf/searchBlock local.tee $1 i32.eqz @@ -1212,7 +1212,7 @@ memory.size local.tee $1 i32.const 4 - local.get $4 + local.get $3 i32.load offset=1568 local.get $1 i32.const 16 @@ -1223,16 +1223,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $2 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $2 + local.get $4 i32.add - local.get $2 - local.get $2 + local.get $4 + local.get $4 i32.const 536870910 i32.lt_u select @@ -1243,16 +1243,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 + local.tee $2 local.get $1 - local.get $3 + local.get $2 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -1260,7 +1260,7 @@ unreachable end end - local.get $4 + local.get $3 local.get $1 i32.const 16 i32.shl @@ -1268,8 +1268,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $3 local.get $4 - local.get $2 call $~lib/rt/tlsf/searchBlock local.tee $1 i32.eqz @@ -1286,7 +1286,7 @@ i32.load i32.const -4 i32.and - local.get $2 + local.get $4 i32.lt_u if i32.const 0 @@ -1296,13 +1296,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 local.get $1 call $~lib/rt/tlsf/removeBlock local.get $1 i32.load - local.set $5 - local.get $2 + local.set $2 + local.get $4 i32.const 4 i32.add i32.const 15 @@ -1315,40 +1315,40 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $2 i32.const -4 i32.and - local.get $2 + local.get $4 i32.sub - local.tee $3 + local.tee $5 i32.const 16 i32.ge_u if local.get $1 - local.get $5 + local.get $2 i32.const 2 i32.and - local.get $2 + local.get $4 i32.or i32.store - local.get $2 + local.get $4 local.get $1 i32.const 4 i32.add i32.add local.tee $2 - local.get $3 + local.get $5 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $4 + local.get $3 local.get $2 call $~lib/rt/tlsf/insertBlock else local.get $1 - local.get $5 + local.get $2 i32.const -2 i32.and i32.store @@ -3366,7 +3366,6 @@ i32.const 3458 i32.const 101 i32.store16 - i32.const 3460 local.get $2 i32.const 1 i32.sub @@ -3380,6 +3379,7 @@ i32.sub local.set $0 end + i32.const 3460 local.get $0 local.get $0 i32.const 100000 @@ -3456,9 +3456,6 @@ local.tee $3 i32.const 101 i32.store16 offset=2 - local.get $3 - i32.const 4 - i32.add local.get $2 i32.const 1 i32.sub @@ -3472,6 +3469,9 @@ i32.sub local.set $1 end + local.get $3 + i32.const 4 + i32.add local.get $1 local.get $1 i32.const 100000 diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 6d37812722..c04124f17a 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -1336,7 +1336,7 @@ call $~lib/rt/tlsf/removeBlock local.get $1 i32.load - local.set $2 + local.set $4 local.get $3 i32.const 4 i32.add @@ -1350,17 +1350,17 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const -4 i32.and local.get $3 i32.sub - local.tee $4 + local.tee $2 i32.const 16 i32.ge_u if local.get $1 - local.get $2 + local.get $4 i32.const 2 i32.and local.get $3 @@ -1371,19 +1371,19 @@ i32.const 4 i32.add i32.add - local.tee $2 - local.get $4 + local.tee $3 + local.get $2 i32.const 4 i32.sub i32.const 1 i32.or i32.store local.get $0 - local.get $2 + local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $1 - local.get $2 + local.get $4 i32.const -2 i32.and i32.store @@ -2601,294 +2601,340 @@ i32.sub global.set $~lib/memory/__stack_pointer block $folding-inner1 - global.get $~lib/memory/__stack_pointer - i32.const 1772 - i32.lt_s - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=16 - i32.const 1156 - i32.const 1152 - i32.store - i32.const 1160 - i32.const 1152 - i32.store - i32.const 1152 - global.set $~lib/rt/itcms/toSpace - memory.size - i32.const 16 - i32.shl - i32.const 18156 - i32.sub - i32.const 1 - i32.shr_u - global.set $~lib/rt/itcms/threshold - i32.const 1364 - i32.const 1360 - i32.store - i32.const 1368 - i32.const 1360 - i32.store - i32.const 1360 - global.set $~lib/rt/itcms/pinSpace - i32.const 1396 - i32.const 1392 - i32.store - i32.const 1400 - i32.const 1392 - i32.store - i32.const 1392 - global.set $~lib/rt/itcms/fromSpace - local.get $0 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1772 - i32.lt_s - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - local.tee $1 - i32.const 0 - i32.store - local.get $1 - i32.const 8 - i32.const 3 - call $~lib/rt/itcms/__new - local.tee $1 - i32.store - local.get $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - local.get $1 - i32.store offset=4 - local.get $1 - i32.const 123 - i32.store - local.get $1 - i32.const 1056 - i32.store offset=4 - local.get $1 - i32.const 1056 - call $byn-split-outlined-A$~lib/rt/itcms/__link - global.get $~lib/memory/__stack_pointer - local.tee $0 - local.get $1 - i32.store - local.get $0 - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1772 - i32.lt_s - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $1 - i32.load - i32.const 123 - i32.ne - if + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 1772 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 i32.const 0 - i32.const 1504 - i32.const 9 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $0 - local.get $1 - i32.load offset=4 - local.tee $1 - i32.store - local.get $0 - i32.const 1056 - i32.store offset=4 - local.get $1 - i32.const 1056 - call $~lib/string/String.__eq - i32.eqz - if + i32.store offset=16 + i32.const 1156 + i32.const 1152 + i32.store + i32.const 1160 + i32.const 1152 + i32.store + i32.const 1152 + global.set $~lib/rt/itcms/toSpace + memory.size + i32.const 16 + i32.shl + i32.const 18156 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 1364 + i32.const 1360 + i32.store + i32.const 1368 + i32.const 1360 + i32.store + i32.const 1360 + global.set $~lib/rt/itcms/pinSpace + i32.const 1396 + i32.const 1392 + i32.store + i32.const 1400 + i32.const 1392 + i32.store + i32.const 1392 + global.set $~lib/rt/itcms/fromSpace + local.get $0 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1772 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 i32.const 0 - i32.const 1504 - i32.const 10 + i32.store + local.get $1 + i32.const 8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $6 - i32.const 0 - i32.store - local.get $6 - i32.const 0 - i32.store offset=4 - local.get $6 - i32.const 123 - i32.store - global.get $~lib/memory/__stack_pointer - local.tee $0 - i32.const 1056 - i32.store - local.get $0 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1772 - i32.lt_s - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const 0 - i32.const 5 - i32.const 1052 - i32.load - i32.const 1 - i32.shr_u - local.tee $0 - local.get $0 - i32.const 5 - i32.gt_u - select - local.tee $1 - local.get $1 - i32.const 0 - i32.gt_s - select - i32.const 1 - i32.shl - local.set $2 - block $__inlined_func$~lib/string/String#substring - i32.const 0 + call $~lib/rt/itcms/__new + local.tee $1 + i32.store local.get $1 + i32.const 0 + i32.store local.get $1 i32.const 0 - i32.lt_s - select - i32.const 1 - i32.shl - local.tee $1 - local.get $2 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + local.get $1 + i32.store offset=4 + local.get $1 + i32.const 123 + i32.store + local.get $1 + i32.const 1056 + i32.store offset=4 + local.get $1 + i32.const 1056 + call $byn-split-outlined-A$~lib/rt/itcms/__link + global.get $~lib/memory/__stack_pointer + local.tee $0 + local.get $1 + i32.store + local.get $0 + i32.const 8 i32.sub - local.tee $5 - i32.eqz + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1772 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + i32.load + i32.const 123 + i32.ne if - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 1568 - local.set $4 - br $__inlined_func$~lib/string/String#substring + i32.const 0 + i32.const 1504 + i32.const 9 + i32.const 3 + call $~lib/builtins/abort + unreachable end - i32.const 0 + global.get $~lib/memory/__stack_pointer + local.tee $0 + local.get $1 + i32.load offset=4 + local.tee $1 + i32.store local.get $0 - i32.const 1 - i32.shl + i32.const 1056 + i32.store offset=4 local.get $1 - i32.eq - local.get $2 - select + i32.const 1056 + call $~lib/string/String.__eq + i32.eqz if - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 1056 - local.set $4 - br $__inlined_func$~lib/string/String#substring + i32.const 0 + i32.const 1504 + i32.const 10 + i32.const 3 + call $~lib/builtins/abort + unreachable end global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $5 + i32.const 0 + i32.store local.get $5 - i32.const 1 - call $~lib/rt/itcms/__new - local.tee $4 + i32.const 0 + i32.store offset=4 + local.get $5 + i32.const 123 i32.store - block $~lib/util/memory/memmove|inlined.0 - local.get $4 - local.tee $0 - local.get $2 - i32.const 1056 - i32.add - local.tee $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $5 - i32.sub - i32.const 0 - local.get $5 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 1056 + i32.store + local.get $0 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1772 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + i32.const 0 + i32.const 5 + i32.const 1052 + i32.load + i32.const 1 + i32.shr_u + local.tee $0 + local.get $0 + i32.const 5 + i32.gt_u + select + local.tee $1 + local.get $1 + i32.const 0 + i32.gt_s + select + i32.const 1 + i32.shl + local.set $2 + block $__inlined_func$~lib/string/String#substring + i32.const 0 + local.get $1 + local.get $1 + i32.const 0 + i32.lt_s + select i32.const 1 i32.shl + local.tee $1 + local.get $2 i32.sub - i32.le_u + local.tee $6 + i32.eqz if - local.get $0 - local.get $1 - local.get $5 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 1568 + local.set $4 + br $__inlined_func$~lib/string/String#substring end + i32.const 0 local.get $0 + i32.const 1 + i32.shl local.get $1 - i32.lt_u + i32.eq + local.get $2 + select if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 1056 + local.set $4 + br $__inlined_func$~lib/string/String#substring + end + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.const 1 + call $~lib/rt/itcms/__new + local.tee $4 + i32.store + block $~lib/util/memory/memmove|inlined.0 + local.get $4 + local.tee $0 + local.get $2 + i32.const 1056 + i32.add + local.tee $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 local.get $1 - i32.const 7 - i32.and local.get $0 - i32.const 7 - i32.and - i32.eq + i32.sub + local.get $6 + i32.sub + i32.const 0 + local.get $6 + i32.const 1 + i32.shl + i32.sub + i32.le_u if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and + local.get $0 + local.get $1 + local.get $6 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $6 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $6 + i32.const 1 + i32.sub + local.set $6 + local.get $0 + local.tee $2 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $2 + local.get $3 + i32.load8_u + i32.store8 + br $while-continue|0 + end + end + loop $while-continue|1 + local.get $6 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $6 + i32.const 8 + i32.sub + local.set $6 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $while-continue|1 + end + end + end + loop $while-continue|2 + local.get $6 if - local.get $5 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $5 - i32.const 1 - i32.sub - local.set $5 local.get $0 local.tee $2 i32.const 1 @@ -2903,865 +2949,821 @@ local.get $3 i32.load8_u i32.store8 - br $while-continue|0 + local.get $6 + i32.const 1 + i32.sub + local.set $6 + br $while-continue|2 end end - loop $while-continue|1 - local.get $5 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $5 - i32.const 8 - i32.sub - local.set $5 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 local.get $0 - i32.const 8 + local.get $6 i32.add - local.set $0 - local.get $1 + i32.const 7 + i32.and + if + local.get $6 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $6 + i32.const 1 + i32.sub + local.tee $6 + local.get $0 + i32.add + local.get $1 + local.get $6 + i32.add + i32.load8_u + i32.store8 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $6 i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + i32.ge_u + if + local.get $6 + i32.const 8 + i32.sub + local.tee $6 + local.get $0 + i32.add + local.get $1 + local.get $6 + i32.add + i64.load + i64.store + br $while-continue|4 + end end end - end - loop $while-continue|2 - local.get $5 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $5 - i32.const 1 - i32.sub - local.set $5 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $5 - i32.add - i32.const 7 - i32.and + loop $while-continue|5 + local.get $6 if - local.get $5 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $5 + local.get $6 i32.const 1 i32.sub - local.tee $5 + local.tee $6 + local.get $0 i32.add local.get $1 - local.get $5 + local.get $6 i32.add i32.load8_u i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $5 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $5 - i32.const 8 - i32.sub - local.tee $5 - i32.add - local.get $1 - local.get $5 - i32.add - i64.load - i64.store - br $while-continue|4 + br $while-continue|5 end end end - loop $while-continue|5 - local.get $5 - if - local.get $0 - local.get $5 - i32.const 1 - i32.sub - local.tee $5 - i32.add - local.get $1 - local.get $5 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer end + local.get $5 + local.get $4 + i32.store offset=4 global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1772 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $5 + i32.load + i32.const 123 + i32.ne + if + i32.const 0 + i32.const 1504 + i32.const 27 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + local.get $5 + i32.load offset=4 + local.tee $1 + i32.store + local.get $0 + i32.const 1600 + i32.store offset=4 + local.get $1 + i32.const 1600 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1504 + i32.const 28 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $5 + call $~lib/rt/tlsf/__free + global.get $~lib/memory/__stack_pointer + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - end - local.get $6 - local.get $4 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1772 - i32.lt_s - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $6 - i32.load - i32.const 123 - i32.ne - if + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1772 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 i32.const 0 - i32.const 1504 - i32.const 27 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $0 - local.get $6 - i32.load offset=4 - local.tee $1 - i32.store - local.get $0 - i32.const 1600 - i32.store offset=4 - local.get $1 - i32.const 1600 - call $~lib/string/String.__eq - i32.eqz - if + i32.store + local.get $1 + i32.const 65 + i32.const 4 + call $~lib/rt/itcms/__new + local.tee $1 + i32.store + local.get $1 i32.const 0 - i32.const 1504 - i32.const 28 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 - call $~lib/rt/tlsf/__free - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1772 - i32.lt_s - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - local.tee $1 - i32.const 0 - i32.store - local.get $1 - i32.const 65 - i32.const 4 - call $~lib/rt/itcms/__new - local.tee $1 - i32.store - local.get $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - f32.const 0 - f32.store offset=24 - local.get $1 - f64.const 0 - f64.store offset=32 - local.get $1 - i32.const 0 - i32.store8 offset=40 - local.get $1 - i32.const 0 - i32.store8 offset=41 - local.get $1 - i32.const 0 - i32.store16 offset=42 - local.get $1 - i32.const 0 - i32.store16 offset=44 - local.get $1 - i32.const 0 - i32.store offset=48 - local.get $1 - i32.const 0 - i32.store offset=52 - local.get $1 - f64.const 0 - f64.store offset=56 - local.get $1 - i32.const 0 - i32.store8 offset=64 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - f32.const 0 - f32.store offset=24 - local.get $1 - f64.const 0 - f64.store offset=32 - local.get $1 - i32.const 0 - i32.store8 offset=40 - local.get $1 - i32.const 0 - i32.store8 offset=41 - local.get $1 - i32.const 0 - i32.store16 offset=42 - local.get $1 - i32.const 0 - i32.store16 offset=44 - local.get $1 - i32.const 0 - i32.store offset=48 - local.get $1 - i32.const 0 - i32.store offset=52 - local.get $1 - f64.const 0 - f64.store offset=56 - local.get $1 - i32.const 0 - i32.store8 offset=64 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store - local.get $1 - i32.load - if + i32.store + local.get $1 i32.const 0 - i32.const 1504 - i32.const 57 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=4 - if + i32.store offset=4 + local.get $1 + i64.const 0 + i64.store offset=8 + local.get $1 + i64.const 0 + i64.store offset=16 + local.get $1 + f32.const 0 + f32.store offset=24 + local.get $1 + f64.const 0 + f64.store offset=32 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 58 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i64.load offset=8 - i64.eqz - i32.eqz - if + i32.store8 offset=40 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 59 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i64.load offset=16 - i64.eqz - i32.eqz - if + i32.store8 offset=41 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 60 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f32.load offset=24 - f32.const 0 - f32.ne - if + i32.store16 offset=42 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 61 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f64.load offset=32 - f64.const 0 - f64.ne - if + i32.store16 offset=44 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 62 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load8_s offset=40 - if + i32.store offset=48 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 63 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load8_u offset=41 - if + i32.store offset=52 + local.get $1 + f64.const 0 + f64.store offset=56 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 64 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load16_s offset=42 - if + i32.store8 offset=64 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 65 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load16_u offset=44 - if + i32.store + local.get $1 i32.const 0 - i32.const 1504 - i32.const 66 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=48 - if + i32.store offset=4 + local.get $1 + i64.const 0 + i64.store offset=8 + local.get $1 + i64.const 0 + i64.store offset=16 + local.get $1 + f32.const 0 + f32.store offset=24 + local.get $1 + f64.const 0 + f64.store offset=32 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 67 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=52 - if + i32.store8 offset=40 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 68 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f64.load offset=56 - f64.const 0 - f64.ne - if + i32.store8 offset=41 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 69 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load8_u offset=64 - if + i32.store16 offset=42 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 70 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $0 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1772 - i32.lt_s - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - local.tee $1 - i32.const 0 - i32.store - local.get $1 - i32.const 16 - i32.const 5 - call $~lib/rt/itcms/__new - local.tee $1 - i32.store - local.get $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - f64.const 0 - f64.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - local.get $1 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store - local.get $1 - i32.const 1632 - i32.store offset=4 - local.get $1 - i32.const 1632 - call $byn-split-outlined-A$~lib/rt/itcms/__link - local.get $1 - f64.const 0 - f64.store offset=8 - global.get $~lib/memory/__stack_pointer - local.tee $0 - local.get $1 - i32.store - local.get $0 - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1772 - i32.lt_s - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $1 - i32.load - if + i32.store16 offset=44 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 82 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $0 - local.get $1 - i32.load offset=4 - local.tee $2 - i32.store - local.get $0 - i32.const 1632 - i32.store offset=4 - local.get $2 - i32.const 1632 - call $~lib/string/String.__eq - i32.eqz - if + i32.store offset=48 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 83 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f64.load offset=8 - f64.const 0 - f64.ne - if + i32.store offset=52 + local.get $1 + f64.const 0 + f64.store offset=56 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 84 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1772 - i32.lt_s - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - local.tee $1 - i32.const 0 - i32.store - local.get $1 - i32.const 40 - i32.const 6 - call $~lib/rt/itcms/__new - local.tee $1 - i32.store - local.get $1 - i32.const 1664 - i32.store - local.get $1 - i32.const 1664 - call $byn-split-outlined-A$~lib/rt/itcms/__link - local.get $1 - i32.const 1696 - i32.store offset=4 - local.get $1 - i32.const 1696 - call $byn-split-outlined-A$~lib/rt/itcms/__link - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $1 - i32.const 0 - i32.store offset=28 - local.get $1 - i32.const 0 - i32.store offset=32 - local.get $1 - i32.const -1 - i32.store offset=36 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $1 - i32.const 0 - i32.store offset=28 - local.get $1 - i32.const 0 - i32.store offset=32 - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1772 - i32.lt_s - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - local.get $1 - i32.load - local.tee $2 - i32.store - local.get $0 - i32.const 1664 - i32.store offset=4 - local.get $2 - i32.const 1664 - call $~lib/string/String.__eq - i32.eqz - if + i32.store8 offset=64 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + i32.load + if + i32.const 0 + i32.const 1504 + i32.const 57 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=4 + if + i32.const 0 + i32.const 1504 + i32.const 58 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i64.load offset=8 + i64.eqz + i32.eqz + if + i32.const 0 + i32.const 1504 + i32.const 59 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i64.load offset=16 + i64.eqz + i32.eqz + if + i32.const 0 + i32.const 1504 + i32.const 60 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f32.load offset=24 + f32.const 0 + f32.ne + if + i32.const 0 + i32.const 1504 + i32.const 61 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f64.load offset=32 + f64.const 0 + f64.ne + if + i32.const 0 + i32.const 1504 + i32.const 62 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load8_s offset=40 + if + i32.const 0 + i32.const 1504 + i32.const 63 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load8_u offset=41 + if + i32.const 0 + i32.const 1504 + i32.const 64 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load16_s offset=42 + if + i32.const 0 + i32.const 1504 + i32.const 65 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load16_u offset=44 + if + i32.const 0 + i32.const 1504 + i32.const 66 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=48 + if + i32.const 0 + i32.const 1504 + i32.const 67 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=52 + if + i32.const 0 + i32.const 1504 + i32.const 68 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f64.load offset=56 + f64.const 0 + f64.ne + if + i32.const 0 + i32.const 1504 + i32.const 69 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load8_u offset=64 + if + i32.const 0 + i32.const 1504 + i32.const 70 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1772 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 i32.const 0 - i32.const 1504 - i32.const 107 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $0 - local.get $1 - i32.load offset=4 - local.tee $2 - i32.store - local.get $0 - i32.const 1696 - i32.store offset=4 - local.get $2 - i32.const 1696 - call $~lib/string/String.__eq - i32.eqz - if + i32.store + local.get $1 + i32.const 16 + i32.const 5 + call $~lib/rt/itcms/__new + local.tee $1 + i32.store + local.get $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + f64.const 0 + f64.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + local.get $1 + i32.store offset=12 + local.get $1 + i32.const 0 + i32.store + local.get $1 + i32.const 1632 + i32.store offset=4 + local.get $1 + i32.const 1632 + call $byn-split-outlined-A$~lib/rt/itcms/__link + local.get $1 + f64.const 0 + f64.store offset=8 + global.get $~lib/memory/__stack_pointer + local.tee $0 + local.get $1 + i32.store + local.get $0 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1772 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + i32.load + if + i32.const 0 + i32.const 1504 + i32.const 82 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + local.get $1 + i32.load offset=4 + local.tee $2 + i32.store + local.get $0 + i32.const 1632 + i32.store offset=4 + local.get $2 + i32.const 1632 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1504 + i32.const 83 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f64.load offset=8 + f64.const 0 + f64.ne + if + i32.const 0 + i32.const 1504 + i32.const 84 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1772 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 40 + i32.const 6 + call $~lib/rt/itcms/__new + local.tee $1 + i32.store + local.get $1 + i32.const 1664 + i32.store + local.get $1 + i32.const 1664 + call $byn-split-outlined-A$~lib/rt/itcms/__link + local.get $1 + i32.const 1696 + i32.store offset=4 + local.get $1 + i32.const 1696 + call $byn-split-outlined-A$~lib/rt/itcms/__link + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $1 + i32.const 0 + i32.store offset=24 + local.get $1 + i32.const 0 + i32.store offset=28 + local.get $1 + i32.const 0 + i32.store offset=32 + local.get $1 + i32.const -1 + i32.store offset=36 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 108 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.load offset=8 - local.tee $0 - i32.store - local.get $0 - i32.const 0 - call $~lib/string/String.__eq - i32.eqz - if + i32.store offset=12 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.load offset=12 - local.tee $0 - i32.store - local.get $0 - i32.const 0 - call $~lib/string/String.__eq - i32.eqz - if + i32.store offset=16 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 110 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.load offset=16 - local.tee $0 - i32.store - local.get $0 - i32.const 0 - call $~lib/string/String.__eq - i32.eqz - if + i32.store offset=20 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 111 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.load offset=20 - local.tee $0 - i32.store - local.get $0 - i32.const 0 - call $~lib/string/String.__eq - i32.eqz - if + i32.store offset=24 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 112 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.load offset=24 - local.tee $0 - i32.store - local.get $0 - i32.const 0 - call $~lib/string/String.__eq - i32.eqz - if + i32.store offset=28 + local.get $1 i32.const 0 - i32.const 1504 - i32.const 113 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.load offset=28 - local.tee $0 - i32.store - local.get $0 - i32.const 0 - call $~lib/string/String.__eq - i32.eqz - if + i32.store offset=32 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1772 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i64.const 0 + i64.store + local.get $0 + local.get $1 + i32.load + local.tee $2 + i32.store + local.get $0 + i32.const 1664 + i32.store offset=4 + local.get $2 + i32.const 1664 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1504 + i32.const 107 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + local.get $1 + i32.load offset=4 + local.tee $2 + i32.store + local.get $0 + i32.const 1696 + i32.store offset=4 + local.get $2 + i32.const 1696 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1504 + i32.const 108 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.load offset=8 + local.tee $0 + i32.store + local.get $0 i32.const 0 - i32.const 1504 - i32.const 114 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=32 - if + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1504 + i32.const 109 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.load offset=12 + local.tee $0 + i32.store + local.get $0 i32.const 0 - i32.const 1504 - i32.const 115 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=36 - i32.const -1 - i32.ne - if + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1504 + i32.const 110 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.load offset=16 + local.tee $0 + i32.store + local.get $0 i32.const 0 - i32.const 1504 - i32.const 116 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 18156 - global.set $~lib/memory/__stack_pointer - global.get $~lib/rt/itcms/state - i32.const 0 - i32.gt_s - if - loop $while-continue|017 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1504 + i32.const 111 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.load offset=20 + local.tee $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1504 + i32.const 112 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.load offset=24 + local.tee $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1504 + i32.const 113 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.load offset=28 + local.tee $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1504 + i32.const 114 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=32 + if + i32.const 0 + i32.const 1504 + i32.const 115 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=36 + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1504 + i32.const 116 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 18156 + global.set $~lib/memory/__stack_pointer + global.get $~lib/rt/itcms/state + i32.const 0 + i32.gt_s + if + loop $while-continue|017 + global.get $~lib/rt/itcms/state + if + call $~lib/rt/itcms/step + drop + br $while-continue|017 + end + end + end + call $~lib/rt/itcms/step + drop + loop $while-continue|118 global.get $~lib/rt/itcms/state if call $~lib/rt/itcms/step drop - br $while-continue|017 + br $while-continue|118 end end + global.get $~lib/rt/itcms/total + i64.extend_i32_u + i64.const 200 + i64.mul + i64.const 100 + i64.div_u + i32.wrap_i64 + i32.const 1024 + i32.add + global.set $~lib/rt/itcms/threshold + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + return end - call $~lib/rt/itcms/step - drop - loop $while-continue|118 - global.get $~lib/rt/itcms/state - if - call $~lib/rt/itcms/step - drop - br $while-continue|118 - end - end - global.get $~lib/rt/itcms/total - i64.extend_i32_u - i64.const 200 - i64.mul - i64.const 100 - i64.div_u - i32.wrap_i64 - i32.const 1024 - i32.add - global.set $~lib/rt/itcms/threshold - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - return end i32.const 18176 i32.const 18224 diff --git a/tests/compiler/reexport.optimized.wat b/tests/compiler/reexport.optimized.wat index 762e26a1d3..43b85df772 100644 --- a/tests/compiler/reexport.optimized.wat +++ b/tests/compiler/reexport.optimized.wat @@ -1309,29 +1309,28 @@ i32.const 20 i32.add local.tee $0 - local.tee $1 i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 4 i32.add - local.tee $2 + local.tee $1 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=1 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=2 - local.get $2 + local.get $1 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 3 i32.sub i32.const 0 diff --git a/tests/compiler/rereexport.optimized.wat b/tests/compiler/rereexport.optimized.wat index 867048c7c1..aa5d4ec90b 100644 --- a/tests/compiler/rereexport.optimized.wat +++ b/tests/compiler/rereexport.optimized.wat @@ -1457,29 +1457,28 @@ i32.const 20 i32.add local.tee $0 - local.tee $1 i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 4 i32.add - local.tee $3 + local.tee $1 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=1 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=2 - local.get $3 + local.get $1 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $3 + local.get $1 i32.const 3 i32.sub i32.const 0 diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 87dc821e0b..873e229a57 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -1282,7 +1282,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1297,7 +1297,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1310,7 +1310,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1318,7 +1318,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1329,16 +1329,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1349,16 +1349,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1366,7 +1366,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1374,8 +1374,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1392,7 +1392,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1402,13 +1402,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1421,40 +1421,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -2737,26 +2737,16 @@ block $folding-inner0 block $invalid block $resolve-access/Container - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $folding-inner0 $folding-inner0 $resolve-access/Container $invalid - end - return + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner0 $folding-inner0 $folding-inner0 $resolve-access/Container $invalid end return end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end return end return @@ -2824,10 +2814,10 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $6 + local.tee $5 i32.const 0 i32.store - local.get $6 + local.get $5 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -2836,7 +2826,7 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $5 + local.tee $4 i32.const 0 i32.store i32.const 8 @@ -2847,7 +2837,7 @@ i32.const 8 i32.const 0 call $~lib/rt/itcms/__new - local.tee $4 + local.tee $6 local.tee $1 i32.const 1056 i32.eq @@ -3018,16 +3008,16 @@ end end end - local.get $5 local.get $4 + local.get $6 i32.store i32.const 16 i32.const 3 call $~lib/rt/itcms/__new local.tee $0 - local.get $4 + local.get $6 i32.store - local.get $4 + local.get $6 if local.get $0 i32.eqz @@ -3040,7 +3030,7 @@ unreachable end global.get $~lib/rt/itcms/white - local.get $4 + local.get $6 i32.const 20 i32.sub local.tee $1 @@ -3078,7 +3068,7 @@ end end local.get $0 - local.get $4 + local.get $6 i32.store offset=4 local.get $0 i32.const 8 @@ -3090,7 +3080,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $6 + local.get $5 local.get $0 i32.store local.get $0 @@ -3220,7 +3210,7 @@ local.get $0 i64.load i32.wrap_i64 - local.set $0 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -3233,7 +3223,7 @@ i32.const 0 i32.store block $__inlined_func$~lib/util/number/utoa32 - local.get $0 + local.get $2 i32.eqz if global.get $~lib/memory/__stack_pointer @@ -3241,66 +3231,66 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 1728 - local.set $1 + local.set $0 br $__inlined_func$~lib/util/number/utoa32 end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $2 i32.const 100000 i32.lt_u if (result i32) - local.get $0 + local.get $2 i32.const 100 i32.lt_u if (result i32) - local.get $0 + local.get $2 i32.const 10 i32.ge_u i32.const 1 i32.add else - local.get $0 + local.get $2 i32.const 10000 i32.ge_u i32.const 3 i32.add - local.get $0 + local.get $2 i32.const 1000 i32.ge_u i32.add end else - local.get $0 + local.get $2 i32.const 10000000 i32.lt_u if (result i32) - local.get $0 + local.get $2 i32.const 1000000 i32.ge_u i32.const 6 i32.add else - local.get $0 + local.get $2 i32.const 1000000000 i32.ge_u i32.const 8 i32.add - local.get $0 + local.get $2 i32.const 100000000 i32.ge_u i32.add end end - local.tee $2 + local.tee $1 i32.const 1 i32.shl i32.const 1 call $~lib/rt/itcms/__new - local.tee $1 + local.tee $0 i32.store - local.get $1 local.get $0 local.get $2 + local.get $1 call $~lib/util/number/utoa32_dec_lut global.get $~lib/memory/__stack_pointer i32.const 4 @@ -3311,7 +3301,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $0 return end i32.const 19760 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 55436c1f56..ff19f47f14 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -1471,7 +1471,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1486,7 +1486,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1499,7 +1499,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1507,7 +1507,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1518,16 +1518,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1538,16 +1538,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1555,7 +1555,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1563,8 +1563,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1581,7 +1581,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1591,13 +1591,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1610,40 +1610,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -3403,8 +3403,6 @@ (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $1 i32.eqz if @@ -3423,17 +3421,17 @@ local.get $0 local.get $1 i32.add - local.tee $3 + local.tee $2 i32.const 21 i32.le_s local.get $0 - local.get $3 + local.get $2 i32.le_s i32.and if (result i32) loop $for-loop|0 local.get $0 - local.get $3 + local.get $2 i32.lt_s if local.get $0 @@ -3450,26 +3448,26 @@ br $for-loop|0 end end - local.get $3 + local.get $2 i32.const 1 i32.shl i32.const 9760 i32.add i32.const 3145774 i32.store - local.get $3 + local.get $2 i32.const 2 i32.add else - local.get $3 + local.get $2 i32.const 21 i32.le_s - local.get $3 + local.get $2 i32.const 0 i32.gt_s i32.and if (result i32) - local.get $3 + local.get $2 i32.const 1 i32.shl i32.const 9760 @@ -3491,16 +3489,16 @@ i32.const 1 i32.add else - local.get $3 + local.get $2 i32.const 0 i32.le_s - local.get $3 + local.get $2 i32.const -6 i32.gt_s i32.and if (result i32) i32.const 2 - local.get $3 + local.get $2 i32.sub local.tee $2 i32.const 1 @@ -3547,8 +3545,7 @@ i32.const 9762 i32.const 101 i32.store16 - i32.const 9764 - local.get $3 + local.get $2 i32.const 1 i32.sub local.tee $0 @@ -3561,6 +3558,7 @@ i32.sub local.set $0 end + i32.const 9764 local.get $0 local.get $0 i32.const 100000 @@ -3634,19 +3632,20 @@ local.get $1 i32.const 9760 i32.add - local.tee $5 + local.tee $1 i32.const 101 i32.store16 offset=2 - local.get $5 + local.get $1 i32.const 4 i32.add - local.get $3 + local.tee $3 + local.get $2 i32.const 1 i32.sub local.tee $1 i32.const 0 i32.lt_s - local.tee $3 + local.tee $2 if i32.const 0 local.get $1 @@ -3654,6 +3653,7 @@ local.set $1 end local.get $1 + local.get $1 i32.const 100000 i32.lt_u if (result i32) @@ -3699,19 +3699,16 @@ i32.add end end - local.set $4 - local.get $1 - local.get $4 i32.const 1 i32.add local.tee $1 call $~lib/util/number/utoa32_dec_lut - local.get $5 + local.get $3 i32.const 45 i32.const 43 - local.get $3 + local.get $2 select - i32.store16 offset=4 + i32.store16 local.get $0 local.get $1 i32.add diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 637e4e4fb5..3e6e87b583 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1334,7 +1334,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1349,7 +1349,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1362,7 +1362,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1370,7 +1370,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1381,16 +1381,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1401,16 +1401,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1418,7 +1418,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1426,8 +1426,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1444,7 +1444,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1454,13 +1454,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1473,40 +1473,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -3195,6 +3195,7 @@ ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) local.get $2 i32.eqz if @@ -3333,68 +3334,69 @@ local.get $1 i32.const 1 i32.eq - if (result i32) + if local.get $0 i32.const 101 i32.store16 offset=2 local.get $0 i32.const 4 i32.add + local.tee $2 local.get $3 i32.const 1 i32.sub - local.tee $1 + local.tee $0 i32.const 0 i32.lt_s - local.tee $2 + local.tee $3 if i32.const 0 - local.get $1 + local.get $0 i32.sub - local.set $1 + local.set $0 end - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.const 100000 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 100 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 10 i32.ge_u i32.const 1 i32.add else - local.get $1 + local.get $0 i32.const 10000 i32.ge_u i32.const 3 i32.add - local.get $1 + local.get $0 i32.const 1000 i32.ge_u i32.add end else - local.get $1 + local.get $0 i32.const 10000000 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 1000000 i32.ge_u i32.const 6 i32.add else - local.get $1 + local.get $0 i32.const 1000000000 i32.ge_u i32.const 8 i32.add - local.get $1 + local.get $0 i32.const 100000000 i32.ge_u i32.add @@ -3404,13 +3406,12 @@ i32.add local.tee $1 call $~lib/util/number/utoa32_dec_lut - local.get $0 + local.get $2 i32.const 45 i32.const 43 - local.get $2 + local.get $3 select - i32.store16 offset=4 - local.get $1 + i32.store16 else local.get $0 i32.const 4 @@ -3431,19 +3432,20 @@ local.get $0 local.get $2 i32.add - local.tee $2 + local.tee $0 i32.const 101 i32.store16 offset=2 - local.get $2 + local.get $0 i32.const 4 i32.add + local.tee $4 local.get $3 i32.const 1 i32.sub local.tee $0 i32.const 0 i32.lt_s - local.tee $3 + local.tee $2 if i32.const 0 local.get $0 @@ -3501,16 +3503,18 @@ i32.add local.tee $0 call $~lib/util/number/utoa32_dec_lut - local.get $2 + local.get $4 i32.const 45 i32.const 43 - local.get $3 + local.get $2 select - i32.store16 offset=4 + i32.store16 local.get $0 local.get $1 i32.add + local.set $1 end + local.get $1 i32.const 2 i32.add end @@ -3655,37 +3659,36 @@ local.tee $1 i64.const 4294967295 i64.and - local.set $3 + local.set $4 local.get $1 i64.const 32 i64.shr_u - local.tee $9 + local.tee $1 global.get $~lib/util/number/_frc_pow - local.tee $10 + local.tee $9 i64.const 4294967295 i64.and - local.tee $11 - local.tee $1 + local.tee $10 i64.mul - local.get $1 - local.get $3 + local.get $4 + local.get $10 i64.mul i64.const 32 i64.shr_u i64.add - local.set $4 + local.set $11 global.get $~lib/util/number/_frc_plus - local.tee $1 + local.tee $3 i64.const 4294967295 i64.and local.set $12 - local.get $1 + local.get $3 i64.const 32 i64.shr_u - local.tee $1 - local.get $11 + local.tee $3 + local.get $10 i64.mul - local.get $11 + local.get $10 local.get $12 i64.mul i64.const 32 @@ -3701,35 +3704,34 @@ i64.const 32 i64.shr_u local.tee $13 - local.get $11 + local.get $10 i64.mul - local.get $11 + local.get $10 local.get $14 i64.mul i64.const 32 i64.shr_u i64.add - local.set $11 + local.set $10 local.get $2 i32.const 1 i32.shl i32.const 1776 i32.add + local.get $1 local.get $9 - local.get $10 i64.const 32 i64.shr_u local.tee $9 - local.tee $10 i64.mul - local.get $4 + local.get $11 i64.const 32 i64.shr_u i64.add - local.get $3 - local.get $10 - i64.mul local.get $4 + local.get $9 + i64.mul + local.get $11 i64.const 4294967295 i64.and i64.add @@ -3738,7 +3740,7 @@ i64.const 32 i64.shr_u i64.add - local.get $1 + local.get $3 local.get $9 i64.mul local.get $5 @@ -3769,14 +3771,14 @@ local.get $9 local.get $13 i64.mul - local.get $11 + local.get $10 i64.const 32 i64.shr_u i64.add local.get $9 local.get $14 i64.mul - local.get $11 + local.get $10 i64.const 4294967295 i64.and i64.add diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 2e76ebebed..7b90a6f71a 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -1169,7 +1169,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $4 + local.set $3 local.get $0 i32.const 16 i32.add @@ -1184,7 +1184,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 12 local.get $1 i32.const 19 @@ -1197,7 +1197,7 @@ i32.const 12 i32.le_u select - local.tee $2 + local.tee $4 call $~lib/rt/tlsf/searchBlock local.tee $1 i32.eqz @@ -1205,7 +1205,7 @@ memory.size local.tee $1 i32.const 4 - local.get $4 + local.get $3 i32.load offset=1568 local.get $1 i32.const 16 @@ -1216,16 +1216,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $2 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $2 + local.get $4 i32.add - local.get $2 - local.get $2 + local.get $4 + local.get $4 i32.const 536870910 i32.lt_u select @@ -1236,16 +1236,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 + local.tee $2 local.get $1 - local.get $3 + local.get $2 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -1253,7 +1253,7 @@ unreachable end end - local.get $4 + local.get $3 local.get $1 i32.const 16 i32.shl @@ -1261,8 +1261,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $3 local.get $4 - local.get $2 call $~lib/rt/tlsf/searchBlock local.tee $1 i32.eqz @@ -1279,7 +1279,7 @@ i32.load i32.const -4 i32.and - local.get $2 + local.get $4 i32.lt_u if i32.const 0 @@ -1289,13 +1289,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 local.get $1 call $~lib/rt/tlsf/removeBlock local.get $1 i32.load - local.set $5 - local.get $2 + local.set $2 + local.get $4 i32.const 4 i32.add i32.const 15 @@ -1308,40 +1308,40 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $2 i32.const -4 i32.and - local.get $2 + local.get $4 i32.sub - local.tee $3 + local.tee $5 i32.const 16 i32.ge_u if local.get $1 - local.get $5 + local.get $2 i32.const 2 i32.and - local.get $2 + local.get $4 i32.or i32.store - local.get $2 + local.get $4 local.get $1 i32.const 4 i32.add i32.add local.tee $2 - local.get $3 + local.get $5 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $4 + local.get $3 local.get $2 call $~lib/rt/tlsf/insertBlock else local.get $1 - local.get $5 + local.get $2 i32.const -2 i32.and i32.store diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index f985cf692e..34a2305399 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -1169,7 +1169,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1184,7 +1184,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1197,7 +1197,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1205,7 +1205,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1216,16 +1216,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1236,16 +1236,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1253,7 +1253,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1261,8 +1261,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1279,7 +1279,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1289,13 +1289,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1308,40 +1308,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 3f30a11824..f92f6d64b6 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1173,7 +1173,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $4 + local.set $3 local.get $0 i32.const 16 i32.add @@ -1188,7 +1188,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 12 local.get $1 i32.const 19 @@ -1201,7 +1201,7 @@ i32.const 12 i32.le_u select - local.tee $2 + local.tee $4 call $~lib/rt/tlsf/searchBlock local.tee $1 i32.eqz @@ -1209,7 +1209,7 @@ memory.size local.tee $1 i32.const 4 - local.get $4 + local.get $3 i32.load offset=1568 local.get $1 i32.const 16 @@ -1220,16 +1220,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $2 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $2 + local.get $4 i32.add - local.get $2 - local.get $2 + local.get $4 + local.get $4 i32.const 536870910 i32.lt_u select @@ -1240,16 +1240,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 + local.tee $2 local.get $1 - local.get $3 + local.get $2 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -1257,7 +1257,7 @@ unreachable end end - local.get $4 + local.get $3 local.get $1 i32.const 16 i32.shl @@ -1265,8 +1265,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $3 local.get $4 - local.get $2 call $~lib/rt/tlsf/searchBlock local.tee $1 i32.eqz @@ -1283,7 +1283,7 @@ i32.load i32.const -4 i32.and - local.get $2 + local.get $4 i32.lt_u if i32.const 0 @@ -1293,13 +1293,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 local.get $1 call $~lib/rt/tlsf/removeBlock local.get $1 i32.load - local.set $5 - local.get $2 + local.set $2 + local.get $4 i32.const 4 i32.add i32.const 15 @@ -1312,40 +1312,40 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $2 i32.const -4 i32.and - local.get $2 + local.get $4 i32.sub - local.tee $3 + local.tee $5 i32.const 16 i32.ge_u if local.get $1 - local.get $5 + local.get $2 i32.const 2 i32.and - local.get $2 + local.get $4 i32.or i32.store - local.get $2 + local.get $4 local.get $1 i32.const 4 i32.add i32.add local.tee $2 - local.get $3 + local.get $5 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $4 + local.get $3 local.get $2 call $~lib/rt/tlsf/insertBlock else local.get $1 - local.get $5 + local.get $2 i32.const -2 i32.and i32.store @@ -3248,7 +3248,6 @@ i32.const 3474 i32.const 101 i32.store16 - i32.const 3476 local.get $2 i32.const 1 i32.sub @@ -3262,6 +3261,7 @@ i32.sub local.set $0 end + i32.const 3476 local.get $0 local.get $0 i32.const 100000 @@ -3338,9 +3338,6 @@ local.tee $3 i32.const 101 i32.store16 offset=2 - local.get $3 - i32.const 4 - i32.add local.get $2 i32.const 1 i32.sub @@ -3354,6 +3351,9 @@ i32.sub local.set $1 end + local.get $3 + i32.const 4 + i32.add local.get $1 local.get $1 i32.const 100000 diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index 1de537e155..ad0ff8697a 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -1189,7 +1189,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1204,7 +1204,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1217,7 +1217,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1225,7 +1225,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1236,16 +1236,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1256,16 +1256,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1273,7 +1273,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1281,8 +1281,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1299,7 +1299,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1309,13 +1309,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1328,40 +1328,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store diff --git a/tests/compiler/rt/runtime-incremental-export.optimized.wat b/tests/compiler/rt/runtime-incremental-export.optimized.wat index fe98d1636f..6d050a93d9 100644 --- a/tests/compiler/rt/runtime-incremental-export.optimized.wat +++ b/tests/compiler/rt/runtime-incremental-export.optimized.wat @@ -1275,7 +1275,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1290,7 +1290,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1303,7 +1303,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1311,7 +1311,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1322,16 +1322,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1342,16 +1342,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1359,7 +1359,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1367,8 +1367,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1385,7 +1385,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1395,13 +1395,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1414,40 +1414,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store diff --git a/tests/compiler/std-wasi/console.optimized.wat b/tests/compiler/std-wasi/console.optimized.wat index 57aaddd0cc..c2136b3dbc 100644 --- a/tests/compiler/std-wasi/console.optimized.wat +++ b/tests/compiler/std-wasi/console.optimized.wat @@ -1842,7 +1842,7 @@ call $~lib/rt/tlsf/removeBlock local.get $1 i32.load - local.set $2 + local.set $4 local.get $3 i32.const 4 i32.add @@ -1856,17 +1856,17 @@ call $~lib/wasi/index/abort unreachable end - local.get $2 + local.get $4 i32.const -4 i32.and local.get $3 i32.sub - local.tee $4 + local.tee $2 i32.const 16 i32.ge_u if local.get $1 - local.get $2 + local.get $4 i32.const 2 i32.and local.get $3 @@ -1877,19 +1877,19 @@ i32.const 4 i32.add i32.add - local.tee $2 - local.get $4 + local.tee $3 + local.get $2 i32.const 4 i32.sub i32.const 1 i32.or i32.store local.get $0 - local.get $2 + local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $1 - local.get $2 + local.get $4 i32.const -2 i32.and i32.store @@ -1983,14 +1983,14 @@ end local.get $1 i32.load16_u offset=6 - local.tee $4 + local.tee $2 i32.const 128 i32.ge_u br_if $break|0 end local.get $1 i32.load16_u offset=4 - local.tee $2 + local.tee $4 i32.const 128 i32.ge_u br_if $break|0 @@ -2020,11 +2020,11 @@ i32.shl local.get $6 i32.or - local.get $2 + local.get $4 i32.const 16 i32.shl i32.or - local.get $4 + local.get $2 i32.const 24 i32.shl i32.or @@ -2050,28 +2050,27 @@ return end local.get $1 - local.tee $2 - local.tee $3 local.get $1 i32.const 20 i32.sub i32.load offset=16 + local.get $1 i32.add local.set $4 i32.const 0 - local.set $1 + local.set $3 loop $while-continue|0 - local.get $3 + local.get $1 local.get $4 i32.lt_u if - local.get $3 + local.get $1 i32.load16_u local.tee $6 i32.const 128 i32.lt_u if (result i32) - local.get $1 + local.get $3 i32.const 1 i32.add else @@ -2079,7 +2078,7 @@ i32.const 2048 i32.lt_u if (result i32) - local.get $1 + local.get $3 i32.const 2 i32.add else @@ -2089,40 +2088,40 @@ i32.const 55296 i32.eq local.get $4 - local.get $3 + local.get $1 i32.const 2 i32.add i32.gt_u i32.and if - local.get $3 + local.get $1 i32.load16_u offset=2 i32.const 64512 i32.and i32.const 56320 i32.eq if - local.get $1 - i32.const 4 - i32.add - local.set $1 local.get $3 i32.const 4 i32.add local.set $3 + local.get $1 + i32.const 4 + i32.add + local.set $1 br $while-continue|0 end end - local.get $1 + local.get $3 i32.const 3 i32.add end end - local.set $1 - local.get $3 + local.set $3 + local.get $1 i32.const 2 i32.add - local.set $3 + local.set $1 br $while-continue|0 end end @@ -2132,18 +2131,17 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $1 + local.get $3 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $3 + local.set $1 i32.const 3 global.set $~argumentsLength - local.get $2 local.get $5 - local.get $3 - call $~lib/string/String.UTF8.encodeUnsafe@varargs local.get $1 + call $~lib/string/String.UTF8.encodeUnsafe@varargs + local.get $3 i32.ne if i32.const 0 @@ -2154,10 +2152,10 @@ unreachable end i32.const 1136 - local.get $3 + local.get $1 i32.store i32.const 1140 - local.get $1 + local.get $3 i32.store local.get $0 i32.const 1136 @@ -2165,7 +2163,7 @@ i32.const 1144 call $~lib/bindings/wasi_snapshot_preview1/fd_write local.set $0 - local.get $3 + local.get $1 call $~lib/rt/tlsf/__free local.get $0 i32.const 65535 @@ -3133,7 +3131,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -3141,7 +3139,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $5 i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor @@ -3149,28 +3147,28 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $7 local.get $0 i32.load offset=16 i32.const 24 i32.mul i32.add - local.set $7 + local.set $4 local.get $3 local.set $2 loop $while-continue|0 - local.get $5 + local.get $4 local.get $7 i32.ne if - local.get $5 + local.get $7 i32.load offset=16 i32.const 1 i32.and i32.eqz if global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $7 i32.load local.tee $8 i32.store offset=8 @@ -3178,7 +3176,7 @@ local.get $8 i32.store local.get $2 - local.get $5 + local.get $7 i64.load offset=8 i64.store offset=8 local.get $2 @@ -3188,7 +3186,7 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $6 i32.add local.tee $8 i32.load @@ -3201,20 +3199,20 @@ i32.add local.set $2 end - local.get $5 + local.get $7 i32.const 24 i32.add - local.set $5 + local.set $7 br $while-continue|0 end end local.get $0 - local.get $4 + local.get $6 i32.store - local.get $4 + local.get $6 if local.get $0 - local.get $4 + local.get $6 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end @@ -3232,7 +3230,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $6 + local.get $5 i32.store offset=12 local.get $0 local.get $0 @@ -4122,11 +4120,11 @@ i32.shl i32.add i32.load - local.set $5 + local.set $2 loop $while-continue|0 - local.get $5 + local.get $2 if - local.get $5 + local.get $2 i32.load offset=16 local.tee $6 i32.const 1 @@ -4136,26 +4134,26 @@ else block $__inlined_func$~lib/string/String.__eq (result i32) global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $2 i32.load - local.tee $2 + local.tee $5 i32.store i32.const 1 local.get $1 - local.get $2 + local.get $5 i32.eq br_if $__inlined_func$~lib/string/String.__eq drop i32.const 0 local.get $1 i32.const 0 - local.get $2 + local.get $5 select i32.eqz br_if $__inlined_func$~lib/string/String.__eq drop i32.const 0 - local.get $2 + local.get $5 i32.const 20 i32.sub i32.load offset=16 @@ -4172,12 +4170,11 @@ br_if $__inlined_func$~lib/string/String.__eq drop block $__inlined_func$~lib/util/string/compareImpl (result i32) - local.get $1 - local.set $3 - local.get $2 + local.get $5 i32.const 7 i32.and local.get $1 + local.tee $3 i32.const 7 i32.and i32.or @@ -4188,16 +4185,16 @@ i32.and if loop $do-loop|0 - local.get $2 + local.get $5 i64.load local.get $3 i64.load i64.eq if - local.get $2 + local.get $5 i32.const 8 i32.add - local.set $2 + local.set $5 local.get $3 i32.const 8 i32.add @@ -4220,7 +4217,7 @@ local.set $0 local.get $4 if - local.get $2 + local.get $5 i32.load16_u local.tee $4 local.get $3 @@ -4233,10 +4230,10 @@ i32.sub br $__inlined_func$~lib/util/string/compareImpl end - local.get $2 + local.get $5 i32.const 2 i32.add - local.set $2 + local.set $5 local.get $3 i32.const 2 i32.add @@ -4254,13 +4251,13 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $5 + local.get $2 return end local.get $6 i32.const -2 i32.and - local.set $5 + local.set $2 br $while-continue|0 end end @@ -4322,7 +4319,7 @@ end global.get $~lib/memory/__stack_pointer global.get $~lib/console/timers - local.tee $4 + local.tee $2 i32.store call $~lib/process/process.hrtime local.set $1 @@ -4337,11 +4334,11 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - local.get $4 + local.get $2 local.get $0 local.get $0 call $~lib/util/hash/HASH<~lib/string/String> - local.tee $2 + local.tee $4 call $~lib/map/Map<~lib/string/String,u64>#find local.tee $3 if @@ -4349,16 +4346,16 @@ local.get $1 i64.store offset=8 else - local.get $4 + local.get $2 i32.load offset=16 - local.get $4 + local.get $2 i32.load offset=12 i32.eq if - local.get $4 - local.get $4 + local.get $2 + local.get $2 i32.load offset=20 - local.get $4 + local.get $2 i32.load offset=12 i32.const 3 i32.mul @@ -4366,10 +4363,10 @@ i32.div_s i32.lt_s if (result i32) - local.get $4 + local.get $2 i32.load offset=4 else - local.get $4 + local.get $2 i32.load offset=4 i32.const 1 i32.shl @@ -4379,12 +4376,12 @@ call $~lib/map/Map<~lib/string/String,u64>#rehash end global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $2 i32.load offset=8 local.tee $5 i32.store - local.get $4 - local.get $4 + local.get $2 + local.get $2 i32.load offset=16 local.tee $3 i32.const 1 @@ -4400,7 +4397,7 @@ i32.store local.get $0 if - local.get $4 + local.get $2 local.get $0 i32.const 1 call $byn-split-outlined-A$~lib/rt/itcms/__link @@ -4408,18 +4405,18 @@ local.get $3 local.get $1 i64.store offset=8 - local.get $4 - local.get $4 + local.get $2 + local.get $2 i32.load offset=20 i32.const 1 i32.add i32.store offset=20 local.get $3 - local.get $4 + local.get $2 i32.load - local.get $4 - i32.load offset=4 local.get $2 + i32.load offset=4 + local.get $4 i32.and i32.const 2 i32.shl diff --git a/tests/compiler/std-wasi/crypto.optimized.wat b/tests/compiler/std-wasi/crypto.optimized.wat index 3fc9a34046..4dc8552597 100644 --- a/tests/compiler/std-wasi/crypto.optimized.wat +++ b/tests/compiler/std-wasi/crypto.optimized.wat @@ -1961,7 +1961,7 @@ call $~lib/rt/tlsf/removeBlock local.get $1 i32.load - local.set $2 + local.set $4 local.get $3 i32.const 4 i32.add @@ -1975,17 +1975,17 @@ call $~lib/wasi/index/abort unreachable end - local.get $2 + local.get $4 i32.const -4 i32.and local.get $3 i32.sub - local.tee $4 + local.tee $2 i32.const 16 i32.ge_u if local.get $1 - local.get $2 + local.get $4 i32.const 2 i32.and local.get $3 @@ -1996,19 +1996,19 @@ i32.const 4 i32.add i32.add - local.tee $2 - local.get $4 + local.tee $3 + local.get $2 i32.const 4 i32.sub i32.const 1 i32.or i32.store local.get $0 - local.get $2 + local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $1 - local.get $2 + local.get $4 i32.const -2 i32.and i32.store @@ -4212,27 +4212,26 @@ end local.get $0 local.get $0 - local.tee $1 - local.tee $2 i32.const 20 i32.sub i32.load offset=16 + local.get $0 i32.add local.set $3 i32.const 0 - local.set $0 + local.set $2 loop $while-continue|0 - local.get $2 + local.get $0 local.get $3 i32.lt_u if - local.get $2 + local.get $0 i32.load16_u local.tee $5 i32.const 128 i32.lt_u if (result i32) - local.get $0 + local.get $2 i32.const 1 i32.add else @@ -4240,7 +4239,7 @@ i32.const 2048 i32.lt_u if (result i32) - local.get $0 + local.get $2 i32.const 2 i32.add else @@ -4250,40 +4249,40 @@ i32.const 55296 i32.eq local.get $3 - local.get $2 + local.get $0 i32.const 2 i32.add i32.gt_u i32.and if - local.get $2 + local.get $0 i32.load16_u offset=2 i32.const 64512 i32.and i32.const 56320 i32.eq if - local.get $0 - i32.const 4 - i32.add - local.set $0 local.get $2 i32.const 4 i32.add local.set $2 + local.get $0 + i32.const 4 + i32.add + local.set $0 br $while-continue|0 end end - local.get $0 + local.get $2 i32.const 3 i32.add end end - local.set $0 - local.get $2 + local.set $2 + local.get $0 i32.const 2 i32.add - local.set $2 + local.set $0 br $while-continue|0 end end @@ -4293,18 +4292,17 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $2 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $2 + local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 local.get $4 - local.get $2 - call $~lib/string/String.UTF8.encodeUnsafe@varargs local.get $0 + call $~lib/string/String.UTF8.encodeUnsafe@varargs + local.get $2 i32.ne if i32.const 0 @@ -4315,24 +4313,24 @@ unreachable end i32.const 6672 - local.get $2 + local.get $0 i32.store i32.const 6676 - local.get $0 + local.get $2 i32.store i32.const 1 i32.const 6672 i32.const 1 i32.const 6680 call $~lib/bindings/wasi_snapshot_preview1/fd_write - local.set $0 - local.get $2 - call $~lib/rt/tlsf/__free + local.set $1 local.get $0 + call $~lib/rt/tlsf/__free + local.get $1 i32.const 65535 i32.and if - local.get $0 + local.get $1 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 6720 i32.const 189 @@ -4825,7 +4823,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -4836,7 +4833,6 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $3 local.tee $4 i32.const 0 i32.store @@ -4861,9 +4857,8 @@ i32.const 0 i32.gt_s select - local.tee $4 - local.set $5 - local.get $3 + local.set $3 + local.get $4 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -4883,7 +4878,7 @@ local.tee $0 i32.store global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $5 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -4913,7 +4908,7 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $5 + local.get $3 i32.const 1073741820 i32.gt_u if @@ -4925,31 +4920,31 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $3 i32.const 0 call $~lib/rt/itcms/__new - local.tee $6 + local.tee $4 i32.store offset=4 local.get $0 - local.get $6 + local.get $4 i32.store - local.get $6 + local.get $4 if local.get $0 - local.get $6 + local.get $4 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $6 + local.get $4 i32.store offset=4 local.get $0 - local.get $5 + local.get $3 i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $5 local.get $0 i32.store global.get $~lib/memory/__stack_pointer @@ -4969,7 +4964,7 @@ local.get $1 i32.load offset=4 i32.add - local.get $4 + local.get $3 call $~lib/memory/memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 diff --git a/tests/compiler/std-wasi/process.optimized.wat b/tests/compiler/std-wasi/process.optimized.wat index 82853116b0..41e6b3d343 100644 --- a/tests/compiler/std-wasi/process.optimized.wat +++ b/tests/compiler/std-wasi/process.optimized.wat @@ -1828,7 +1828,7 @@ call $~lib/rt/tlsf/removeBlock local.get $1 i32.load - local.set $2 + local.set $4 local.get $3 i32.const 4 i32.add @@ -1842,17 +1842,17 @@ call $~lib/wasi/index/abort unreachable end - local.get $2 + local.get $4 i32.const -4 i32.and local.get $3 i32.sub - local.tee $4 + local.tee $2 i32.const 16 i32.ge_u if local.get $1 - local.get $2 + local.get $4 i32.const 2 i32.and local.get $3 @@ -1863,19 +1863,19 @@ i32.const 4 i32.add i32.add - local.tee $2 - local.get $4 + local.tee $3 + local.get $2 i32.const 4 i32.sub i32.const 1 i32.or i32.store local.get $0 - local.get $2 + local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $1 - local.get $2 + local.get $4 i32.const -2 i32.and i32.store @@ -2037,27 +2037,26 @@ end local.get $0 local.get $0 - local.tee $1 - local.tee $2 i32.const 20 i32.sub i32.load offset=16 + local.get $0 i32.add local.set $3 i32.const 0 - local.set $0 + local.set $2 loop $while-continue|0 - local.get $2 + local.get $0 local.get $3 i32.lt_u if - local.get $2 + local.get $0 i32.load16_u local.tee $5 i32.const 128 i32.lt_u if (result i32) - local.get $0 + local.get $2 i32.const 1 i32.add else @@ -2065,7 +2064,7 @@ i32.const 2048 i32.lt_u if (result i32) - local.get $0 + local.get $2 i32.const 2 i32.add else @@ -2075,40 +2074,40 @@ i32.const 55296 i32.eq local.get $3 - local.get $2 + local.get $0 i32.const 2 i32.add i32.gt_u i32.and if - local.get $2 + local.get $0 i32.load16_u offset=2 i32.const 64512 i32.and i32.const 56320 i32.eq if - local.get $0 - i32.const 4 - i32.add - local.set $0 local.get $2 i32.const 4 i32.add local.set $2 + local.get $0 + i32.const 4 + i32.add + local.set $0 br $while-continue|0 end end - local.get $0 + local.get $2 i32.const 3 i32.add end end - local.set $0 - local.get $2 + local.set $2 + local.get $0 i32.const 2 i32.add - local.set $2 + local.set $0 br $while-continue|0 end end @@ -2118,18 +2117,17 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $2 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $2 + local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 local.get $4 - local.get $2 - call $~lib/string/String.UTF8.encodeUnsafe@varargs local.get $0 + call $~lib/string/String.UTF8.encodeUnsafe@varargs + local.get $2 i32.ne if i32.const 0 @@ -2140,24 +2138,24 @@ unreachable end i32.const 1088 - local.get $2 + local.get $0 i32.store i32.const 1092 - local.get $0 + local.get $2 i32.store i32.const 1 i32.const 1088 i32.const 1 i32.const 1096 call $~lib/bindings/wasi_snapshot_preview1/fd_write - local.set $0 - local.get $2 - call $~lib/rt/tlsf/__free + local.set $1 local.get $0 + call $~lib/rt/tlsf/__free + local.get $1 i32.const 65535 i32.and if - local.get $0 + local.get $1 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 4224 i32.const 189 @@ -3839,9 +3837,6 @@ i32.const 2 i32.shl local.set $1 - local.get $0 - i32.load - local.tee $4 local.get $2 if local.get $3 @@ -3861,6 +3856,9 @@ select local.set $1 end + local.get $0 + i32.load + local.tee $4 local.get $1 call $~lib/rt/itcms/__renew local.tee $2 @@ -4399,126 +4397,118 @@ (local $1 i32) (local $2 i32) (local $3 i32) - block $invalid - block $~lib/map/Map<~lib/string/String,~lib/string/String> - block $~lib/array/Array<~lib/string/String> - block $~lib/arraybuffer/ArrayBufferView + block $folding-inner0 + block $invalid + block $~lib/map/Map<~lib/string/String,~lib/string/String> + block $~lib/array/Array<~lib/string/String> block $~lib/string/String block $~lib/arraybuffer/ArrayBuffer local.get $0 i32.const 8 i32.sub i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/array/Array<~lib/string/String> $~lib/map/Map<~lib/string/String,~lib/string/String> $invalid + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner0 $~lib/array/Array<~lib/string/String> $~lib/map/Map<~lib/string/String,~lib/string/String> $invalid end return end return end local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - return - end - local.get $0 - i32.load offset=4 - local.tee $1 - local.get $0 - i32.load offset=12 - i32.const 2 - i32.shl - i32.add - local.set $2 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_u - if + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $2 + loop $while-continue|0 local.get $1 - i32.load - local.tee $3 + local.get $2 + i32.lt_u if - local.get $3 - call $byn-split-outlined-A$~lib/rt/itcms/__visit + local.get $1 + i32.load + local.tee $3 + if + local.get $3 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $while-continue|0 end - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $while-continue|0 end + br $folding-inner0 end local.get $0 i32.load - local.tee $0 + local.tee $1 if - local.get $0 + local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__visit end - return - end - local.get $0 - i32.load - local.tee $1 - if - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=16 - i32.const 12 - i32.mul - local.get $0 - i32.load offset=8 - local.tee $1 - local.tee $0 - i32.add - local.set $2 - loop $while-continue|01 local.get $0 - local.get $2 - i32.lt_u - if + i32.load offset=16 + i32.const 12 + i32.mul + local.get $0 + i32.load offset=8 + local.tee $1 + local.tee $0 + i32.add + local.set $2 + loop $while-continue|01 local.get $0 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz + local.get $2 + i32.lt_u if local.get $0 - i32.load - local.tee $3 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz if - local.get $3 - call $byn-split-outlined-A$~lib/rt/itcms/__visit + local.get $0 + i32.load + local.tee $3 + if + local.get $3 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + local.get $0 + i32.load offset=4 + local.tee $3 + if + local.get $3 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end end local.get $0 - i32.load offset=4 - local.tee $3 - if - local.get $3 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end + i32.const 12 + i32.add + local.set $0 + br $while-continue|01 end - local.get $0 - i32.const 12 - i32.add - local.set $0 - br $while-continue|01 end - end - local.get $1 - if local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__visit + if + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + return end - return + unreachable + end + local.get $0 + i32.load + local.tee $0 + if + local.get $0 + call $byn-split-outlined-A$~lib/rt/itcms/__visit end - unreachable ) (func $~start global.get $~started @@ -4712,27 +4702,27 @@ end i32.const 1088 i32.load - local.tee $5 + local.tee $4 i32.const 2 i32.shl local.tee $0 i32.const 1092 i32.load i32.add - local.set $4 + local.set $3 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $4 + local.get $3 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $2 + local.tee $1 local.get $0 - local.get $2 + local.get $1 i32.add call $~lib/bindings/wasi_snapshot_preview1/environ_get local.tee $0 @@ -4748,7 +4738,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -4757,84 +4747,85 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $0 + local.tee $5 i32.const 0 i32.store - local.get $0 + local.get $5 i32.const 24 i32.const 4 call $~lib/rt/itcms/__new - local.tee $0 + local.tee $5 i32.store - local.get $0 + local.get $5 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.tee $6 i32.store local.get $6 if - local.get $0 + local.get $5 local.get $6 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $0 + local.get $5 i32.const 3 i32.store offset=4 - local.get $0 + local.get $5 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor local.tee $6 i32.store offset=8 local.get $6 if - local.get $0 + local.get $5 local.get $6 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $0 + local.get $5 i32.const 4 i32.store offset=12 - local.get $0 + local.get $5 i32.const 0 i32.store offset=16 - local.get $0 + local.get $5 i32.const 0 i32.store offset=20 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 local.get $0 + local.get $5 i32.store loop $for-loop|0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 i32.lt_u if global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.const 2 i32.shl - local.get $2 + local.get $1 i32.add i32.load - local.tee $1 - local.get $1 - local.get $4 + local.tee $0 + local.get $0 + local.get $3 i32.add - local.get $2 + local.get $1 i32.sub call $~lib/string/String.UTF8.decodeUnsafe local.tee $6 i32.store offset=4 - block $__inlined_func$~lib/string/String#indexOf (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5168 - i32.store offset=8 - i32.const 0 + global.get $~lib/memory/__stack_pointer + i32.const 5168 + i32.store offset=8 + i32.const 0 + local.set $0 + block $__inlined_func$~lib/string/String#indexOf i32.const 5164 i32.load i32.const 1 @@ -4842,8 +4833,8 @@ local.tee $7 i32.eqz br_if $__inlined_func$~lib/string/String#indexOf - drop i32.const -1 + local.set $0 local.get $6 i32.const 20 i32.sub @@ -4853,85 +4844,83 @@ local.tee $8 i32.eqz br_if $__inlined_func$~lib/string/String#indexOf - drop i32.const 0 - local.set $1 + local.set $0 local.get $8 local.get $7 i32.sub local.set $8 loop $for-loop|02 - local.get $1 + local.get $0 local.get $8 i32.le_s if - local.get $1 local.get $6 - local.get $1 + local.get $0 i32.const 5168 local.get $7 call $~lib/util/string/compareImpl i32.eqz br_if $__inlined_func$~lib/string/String#indexOf - drop - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|02 end end i32.const -1 + local.set $0 end - local.tee $1 + local.get $0 i32.const -1 i32.xor if local.get $6 i32.const 0 - local.get $1 + local.get $0 call $~lib/string/String#substring local.set $7 global.get $~lib/memory/__stack_pointer local.get $7 i32.store offset=8 local.get $6 - local.get $1 + local.get $0 i32.const 1 i32.add i32.const 2147483647 call $~lib/string/String#substring - local.set $1 + local.set $0 global.get $~lib/memory/__stack_pointer - local.get $1 - i32.store offset=12 local.get $0 + i32.store offset=12 + local.get $5 local.get $7 - local.get $1 + local.get $0 call $~lib/map/Map<~lib/string/String,~lib/string/String>#set else global.get $~lib/memory/__stack_pointer i32.const 5200 i32.store offset=12 - local.get $0 + local.get $5 local.get $6 i32.const 5200 call $~lib/map/Map<~lib/string/String,~lib/string/String>#set end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|0 end end - local.get $2 + local.get $1 call $~lib/rt/tlsf/__free global.get $~lib/memory/__stack_pointer i32.const 16 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 + local.get $5 return end i32.const 23808 @@ -5803,18 +5792,18 @@ i32.const 16 i32.const 3 call $~lib/rt/itcms/__new - local.tee $1 + local.tee $2 i32.store - local.get $1 + local.get $2 i32.const 0 i32.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=4 - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 i32.const 0 i32.store offset=12 local.get $0 @@ -5837,35 +5826,35 @@ select i32.const 2 i32.shl - local.tee $2 + local.tee $1 i32.const 0 call $~lib/rt/itcms/__new local.tee $3 i32.store offset=4 - local.get $1 + local.get $2 local.get $3 i32.store local.get $3 if - local.get $1 + local.get $2 local.get $3 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $1 + local.get $2 local.get $3 i32.store offset=4 - local.get $1 local.get $2 - i32.store offset=8 local.get $1 + i32.store offset=8 + local.get $2 local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $2 ) (func $~lib/string/String.UTF8.decodeUnsafe (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -6319,7 +6308,7 @@ local.get $1 local.get $1 call $~lib/util/hash/HASH<~lib/string/String> - local.tee $8 + local.tee $7 call $~lib/map/Map<~lib/string/String,~lib/string/String>#find local.tee $3 if @@ -6360,7 +6349,7 @@ i32.const 1 i32.or end - local.set $7 + local.set $8 global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -6377,14 +6366,14 @@ i32.const 0 i32.store offset=8 local.get $3 - local.get $7 + local.get $8 i32.const 1 i32.add local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $6 + local.tee $9 i32.store global.get $~lib/memory/__stack_pointer local.get $3 @@ -6392,7 +6381,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $9 + local.tee $6 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor @@ -6400,13 +6389,13 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $10 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $10 + local.set $5 local.get $4 local.set $3 loop $while-continue|0 @@ -6414,14 +6403,14 @@ local.get $10 i32.ne if - local.get $5 + local.get $10 i32.load offset=8 i32.const 1 i32.and i32.eqz if global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $10 i32.load local.tee $11 i32.store offset=8 @@ -6429,17 +6418,17 @@ local.get $11 i32.store local.get $3 - local.get $5 + local.get $10 i32.load offset=4 i32.store offset=4 local.get $3 local.get $11 call $~lib/util/hash/HASH<~lib/string/String> - local.get $7 + local.get $8 i32.and i32.const 2 i32.shl - local.get $6 + local.get $9 i32.add local.tee $11 i32.load @@ -6452,25 +6441,25 @@ i32.add local.set $3 end - local.get $5 + local.get $10 i32.const 12 i32.add - local.set $5 + local.set $10 br $while-continue|0 end end local.get $0 - local.get $6 + local.get $9 i32.store - local.get $6 + local.get $9 if local.get $0 - local.get $6 + local.get $9 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $7 + local.get $8 i32.store offset=4 local.get $0 local.get $4 @@ -6483,7 +6472,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $9 + local.get $6 i32.store offset=12 local.get $0 local.get $0 @@ -6542,7 +6531,7 @@ i32.load local.get $0 i32.load offset=4 - local.get $8 + local.get $7 i32.and i32.const 2 i32.shl diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 114260b619..9aab5d7646 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1355,7 +1355,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1370,7 +1370,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1383,7 +1383,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1391,7 +1391,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1402,16 +1402,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1422,16 +1422,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1439,7 +1439,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1447,8 +1447,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1465,7 +1465,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1475,13 +1475,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1494,40 +1494,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -1828,26 +1828,16 @@ block $std/array-literal/RefWithCtor block $~lib/array/Array block $std/array-literal/Ref - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $folding-inner0 $folding-inner0 $std/array-literal/Ref $~lib/array/Array $std/array-literal/RefWithCtor $~lib/array/Array $invalid - end - return + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner0 $folding-inner0 $folding-inner0 $std/array-literal/Ref $~lib/array/Array $std/array-literal/RefWithCtor $~lib/array/Array $invalid end return end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end return end return diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 1c02a283e3..3c5903b3fa 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2031,7 +2031,7 @@ call $~lib/rt/tlsf/removeBlock local.get $1 i32.load - local.set $2 + local.set $4 local.get $3 i32.const 4 i32.add @@ -2045,17 +2045,17 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const -4 i32.and local.get $3 i32.sub - local.tee $4 + local.tee $2 i32.const 16 i32.ge_u if local.get $1 - local.get $2 + local.get $4 i32.const 2 i32.and local.get $3 @@ -2066,19 +2066,19 @@ i32.const 4 i32.add i32.add - local.tee $2 - local.get $4 + local.tee $3 + local.get $2 i32.const 4 i32.sub i32.const 1 i32.or i32.store local.get $0 - local.get $2 + local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $1 - local.get $2 + local.get $4 i32.const -2 i32.and i32.store @@ -3510,25 +3510,25 @@ select local.get $2 i32.shl - local.set $2 + local.set $1 local.get $3 if local.get $5 i32.const 1 i32.shl - local.tee $1 + local.tee $2 i32.const 1073741820 - local.get $1 + local.get $2 i32.const 1073741820 i32.lt_u select - local.tee $1 - local.get $2 + local.tee $2 + local.get $1 local.get $1 local.get $2 - i32.gt_u + i32.lt_u select - local.set $2 + local.set $1 end block $__inlined_func$~lib/rt/itcms/__renew local.get $4 @@ -3540,52 +3540,52 @@ i32.and i32.const 16 i32.sub - local.get $2 + local.get $1 i32.ge_u if local.get $3 - local.get $2 + local.get $1 i32.store offset=16 local.get $4 - local.set $1 + local.set $2 br $__inlined_func$~lib/rt/itcms/__renew end - local.get $2 + local.get $1 local.get $3 i32.load offset=12 call $~lib/rt/itcms/__new - local.tee $1 + local.tee $2 local.get $4 - local.get $2 + local.get $1 local.get $3 i32.load offset=16 local.tee $3 - local.get $2 + local.get $1 local.get $3 i32.lt_u select call $~lib/memory/memory.copy end - local.get $1 + local.get $2 local.get $4 i32.ne if local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 - local.get $1 + local.get $2 if local.get $0 - local.get $1 + local.get $2 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end end local.get $0 - local.get $2 + local.get $1 i32.store offset=8 end ) @@ -4973,15 +4973,15 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f32) - (local $10 f32) - (local $11 f32) + (local $8 f32) + (local $9 i32) + (local $10 i32) + (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i64) + (local $13 i64) + (local $14 f32) + (local $15 f32) + (local $16 i32) local.get $1 i32.const 48 i32.le_s @@ -5006,17 +5006,17 @@ end local.get $0 f32.load - local.set $11 + local.set $14 local.get $0 f32.load offset=4 - local.set $10 + local.set $15 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $10 - local.get $11 - local.get $11 - local.get $10 + local.get $15 + local.get $14 + local.get $14 + local.get $15 local.get $2 i32.load call_indirect $0 (type $f32_f32_=>_i32) @@ -5027,46 +5027,47 @@ f32.store local.get $0 f32.load offset=8 - local.set $9 + local.set $8 i32.const 2 global.set $~argumentsLength - local.get $0 - local.get $9 - local.get $11 - local.get $10 + local.get $14 + local.get $15 local.get $1 select - local.tee $10 - local.get $10 - local.get $9 + local.tee $14 + local.get $8 local.get $2 i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.gt_s - local.tee $1 + local.set $1 + local.get $0 + local.get $8 + local.get $14 + local.get $1 select f32.store offset=4 local.get $0 - local.get $10 - local.get $9 + local.get $14 + local.get $8 local.get $1 select f32.store offset=8 end local.get $0 f32.load - local.set $10 + local.set $8 local.get $0 f32.load offset=4 - local.set $9 + local.set $14 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $9 - local.get $10 - local.get $10 - local.get $9 + local.get $14 + local.get $8 + local.get $8 + local.get $14 local.get $2 i32.load call_indirect $0 (type $f32_f32_=>_i32) @@ -5076,8 +5077,8 @@ select f32.store local.get $0 - local.get $10 - local.get $9 + local.get $8 + local.get $14 local.get $1 select f32.store offset=4 @@ -5097,43 +5098,43 @@ local.get $1 i32.clz i32.sub - local.tee $8 + local.tee $6 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $5 + local.set $9 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $5 + local.get $9 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $13 + local.tee $10 local.get $7 i32.add - local.set $14 + local.set $11 loop $for-loop|1 + local.get $5 local.get $6 - local.get $8 i32.lt_u if - local.get $6 + local.get $5 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.const -1 i32.store - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|1 end end @@ -5149,84 +5150,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $15 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $12 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $7 + local.tee $1 i32.const 1 i32.add - local.tee $1 + local.tee $5 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $12 + local.get $9 i32.const 31 - local.get $12 + local.get $9 i32.const 31 i32.lt_s select - local.tee $7 - local.get $1 + local.tee $1 + local.get $5 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $7 - local.get $12 + local.get $1 + local.get $9 i32.lt_s if local.get $0 - local.get $7 + local.get $1 i32.const 1 i32.add - local.tee $5 - local.get $12 + local.tee $6 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $6 - local.get $5 + local.tee $5 + local.get $6 i32.sub i32.const 1 i32.add - local.tee $8 + local.tee $7 i32.const 32 i32.lt_s if local.get $0 - local.get $5 - local.get $12 - local.get $5 + local.get $6 + local.get $9 + local.get $6 i32.const 31 i32.add - local.tee $1 - local.get $1 - local.get $12 + local.tee $5 + local.get $5 + local.get $9 i32.gt_s select - local.tee $6 - local.get $8 + local.tee $5 + local.get $7 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $5 + local.get $6 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $16 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -5236,30 +5237,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $16 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $1 + local.set $7 loop $for-loop|3 - local.get $1 local.get $4 - i32.lt_u + local.get $7 + i32.gt_u if local.get $4 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.load - local.tee $8 + local.tee $16 i32.const -1 i32.ne if local.get $0 - local.get $8 - local.get $14 + local.get $16 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -5268,16 +5269,16 @@ i32.load i32.const 1 i32.add - local.get $7 - local.get $15 + local.get $1 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $13 + local.get $10 i32.add i32.const -1 i32.store - local.get $8 + local.get $16 local.set $3 end local.get $4 @@ -5287,8 +5288,8 @@ br $for-loop|3 end end - local.get $13 - local.get $1 + local.get $10 + local.get $7 i32.const 2 i32.shl local.tee $4 @@ -5296,15 +5297,15 @@ local.get $3 i32.store local.get $4 - local.get $14 + local.get $11 i32.add - local.get $7 + local.get $1 i32.store - local.get $5 - local.set $3 local.get $6 - local.set $7 - local.get $1 + local.set $3 + local.get $5 + local.set $1 + local.get $7 local.set $4 br $while-continue|2 end @@ -5315,7 +5316,7 @@ local.get $4 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.load local.tee $1 @@ -5327,13 +5328,13 @@ local.get $4 i32.const 2 i32.shl - local.get $14 + local.get $11 i32.add i32.load i32.const 1 i32.add + local.get $9 local.get $12 - local.get $15 local.get $2 call $~lib/util/sort/mergeRuns end @@ -5344,9 +5345,9 @@ br $for-loop|4 end end - local.get $15 + local.get $12 call $~lib/rt/tlsf/__free - local.get $13 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f32) (param $1 f32) (result i32) @@ -5875,15 +5876,15 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f64) - (local $10 f64) - (local $11 f64) + (local $8 f64) + (local $9 i32) + (local $10 i32) + (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i64) + (local $13 i64) + (local $14 f64) + (local $15 f64) + (local $16 i32) local.get $1 i32.const 48 i32.le_s @@ -5908,17 +5909,17 @@ end local.get $0 f64.load - local.set $11 + local.set $14 local.get $0 f64.load offset=8 - local.set $10 + local.set $15 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $10 - local.get $11 - local.get $11 - local.get $10 + local.get $15 + local.get $14 + local.get $14 + local.get $15 local.get $2 i32.load call_indirect $0 (type $f64_f64_=>_i32) @@ -5929,46 +5930,47 @@ f64.store local.get $0 f64.load offset=16 - local.set $9 + local.set $8 i32.const 2 global.set $~argumentsLength - local.get $0 - local.get $9 - local.get $11 - local.get $10 + local.get $14 + local.get $15 local.get $1 select - local.tee $10 - local.get $10 - local.get $9 + local.tee $14 + local.get $8 local.get $2 i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.gt_s - local.tee $1 + local.set $1 + local.get $0 + local.get $8 + local.get $14 + local.get $1 select f64.store offset=8 local.get $0 - local.get $10 - local.get $9 + local.get $14 + local.get $8 local.get $1 select f64.store offset=16 end local.get $0 f64.load - local.set $10 + local.set $8 local.get $0 f64.load offset=8 - local.set $9 + local.set $14 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $9 - local.get $10 - local.get $10 - local.get $9 + local.get $14 + local.get $8 + local.get $8 + local.get $14 local.get $2 i32.load call_indirect $0 (type $f64_f64_=>_i32) @@ -5978,8 +5980,8 @@ select f64.store local.get $0 - local.get $10 - local.get $9 + local.get $8 + local.get $14 local.get $1 select f64.store offset=8 @@ -5999,43 +6001,43 @@ local.get $1 i32.clz i32.sub - local.tee $8 + local.tee $6 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $5 + local.set $9 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $5 + local.get $9 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $13 + local.tee $10 local.get $7 i32.add - local.set $14 + local.set $11 loop $for-loop|1 + local.get $5 local.get $6 - local.get $8 i32.lt_u if - local.get $6 + local.get $5 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.const -1 i32.store - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|1 end end @@ -6051,84 +6053,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $15 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $12 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $7 + local.tee $1 i32.const 1 i32.add - local.tee $1 + local.tee $5 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $12 + local.get $9 i32.const 31 - local.get $12 + local.get $9 i32.const 31 i32.lt_s select - local.tee $7 - local.get $1 + local.tee $1 + local.get $5 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $7 - local.get $12 + local.get $1 + local.get $9 i32.lt_s if local.get $0 - local.get $7 + local.get $1 i32.const 1 i32.add - local.tee $5 - local.get $12 + local.tee $6 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $6 - local.get $5 + local.tee $5 + local.get $6 i32.sub i32.const 1 i32.add - local.tee $8 + local.tee $7 i32.const 32 i32.lt_s if local.get $0 - local.get $5 - local.get $12 - local.get $5 + local.get $6 + local.get $9 + local.get $6 i32.const 31 i32.add - local.tee $1 - local.get $1 - local.get $12 + local.tee $5 + local.get $5 + local.get $9 i32.gt_s select - local.tee $6 - local.get $8 + local.tee $5 + local.get $7 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $5 + local.get $6 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $16 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -6138,30 +6140,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $16 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $1 + local.set $7 loop $for-loop|3 - local.get $1 local.get $4 - i32.lt_u + local.get $7 + i32.gt_u if local.get $4 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.load - local.tee $8 + local.tee $16 i32.const -1 i32.ne if local.get $0 - local.get $8 - local.get $14 + local.get $16 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -6170,16 +6172,16 @@ i32.load i32.const 1 i32.add - local.get $7 - local.get $15 + local.get $1 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $13 + local.get $10 i32.add i32.const -1 i32.store - local.get $8 + local.get $16 local.set $3 end local.get $4 @@ -6189,8 +6191,8 @@ br $for-loop|3 end end - local.get $13 - local.get $1 + local.get $10 + local.get $7 i32.const 2 i32.shl local.tee $4 @@ -6198,15 +6200,15 @@ local.get $3 i32.store local.get $4 - local.get $14 + local.get $11 i32.add - local.get $7 + local.get $1 i32.store - local.get $5 - local.set $3 local.get $6 - local.set $7 - local.get $1 + local.set $3 + local.get $5 + local.set $1 + local.get $7 local.set $4 br $while-continue|2 end @@ -6217,7 +6219,7 @@ local.get $4 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.load local.tee $1 @@ -6229,13 +6231,13 @@ local.get $4 i32.const 2 i32.shl - local.get $14 + local.get $11 i32.add i32.load i32.const 1 i32.add + local.get $9 local.get $12 - local.get $15 local.get $2 call $~lib/util/sort/mergeRuns end @@ -6246,9 +6248,9 @@ br $for-loop|4 end end - local.get $15 + local.get $12 call $~lib/rt/tlsf/__free - local.get $13 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) @@ -6734,8 +6736,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) - (local $13 i32) + (local $12 i32) + (local $13 i64) local.get $1 i32.const 48 i32.le_s @@ -6760,7 +6762,7 @@ end local.get $0 i32.load - local.set $1 + local.set $5 local.get $0 i32.load offset=4 local.set $3 @@ -6768,49 +6770,50 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $5 + local.get $5 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $4 + local.tee $1 select i32.store local.get $0 i32.load offset=8 - local.set $5 + local.set $4 i32.const 2 global.set $~argumentsLength - local.get $0 local.get $5 - local.get $1 local.get $3 - local.get $4 - select - local.tee $1 local.get $1 - local.get $5 + select + local.tee $3 + local.get $4 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $3 + local.set $1 + local.get $0 + local.get $4 + local.get $3 + local.get $1 select i32.store offset=4 local.get $0 - local.get $1 - local.get $5 local.get $3 + local.get $4 + local.get $1 select i32.store offset=8 end local.get $0 i32.load - local.set $1 + local.set $4 local.get $0 i32.load offset=4 local.set $3 @@ -6818,21 +6821,21 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $4 + local.get $4 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $2 + local.tee $1 select i32.store local.get $0 - local.get $1 + local.get $4 local.get $3 - local.get $2 + local.get $1 select i32.store offset=4 return @@ -6851,43 +6854,43 @@ local.get $1 i32.clz i32.sub - local.tee $6 + local.tee $8 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $8 + local.set $5 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $8 + local.get $5 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $9 + local.tee $10 local.get $7 i32.add - local.set $10 + local.set $11 loop $for-loop|1 - local.get $5 local.get $6 + local.get $8 i32.lt_u if - local.get $5 + local.get $6 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|1 end end @@ -6903,84 +6906,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $11 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $8 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $1 + local.tee $7 i32.const 1 i32.add - local.tee $5 + local.tee $1 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $8 + local.get $9 i32.const 31 - local.get $8 + local.get $9 i32.const 31 i32.lt_s select - local.tee $1 - local.get $5 + local.tee $7 + local.get $1 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $1 - local.get $8 + local.get $7 + local.get $9 i32.lt_s if local.get $0 - local.get $1 + local.get $7 i32.const 1 i32.add - local.tee $6 - local.get $8 + local.tee $5 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $5 - local.get $6 + local.tee $6 + local.get $5 i32.sub i32.const 1 i32.add - local.tee $7 + local.tee $8 i32.const 32 i32.lt_s if local.get $0 - local.get $6 - local.get $8 - local.get $6 + local.get $5 + local.get $9 + local.get $5 i32.const 31 i32.add - local.tee $5 - local.get $5 - local.get $8 + local.tee $1 + local.get $1 + local.get $9 i32.gt_s select - local.tee $5 - local.get $7 + local.tee $6 + local.get $8 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $6 + local.get $5 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $8 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $12 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -6990,30 +6993,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $7 + local.set $1 loop $for-loop|3 + local.get $1 local.get $4 - local.get $7 - i32.gt_u + i32.lt_u if local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load - local.tee $13 + local.tee $8 i32.const -1 i32.ne if local.get $0 - local.get $13 - local.get $10 + local.get $8 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -7022,16 +7025,16 @@ i32.load i32.const 1 i32.add - local.get $1 - local.get $11 + local.get $7 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $13 + local.get $8 local.set $3 end local.get $4 @@ -7041,8 +7044,8 @@ br $for-loop|3 end end - local.get $9 - local.get $7 + local.get $10 + local.get $1 i32.const 2 i32.shl local.tee $4 @@ -7050,15 +7053,15 @@ local.get $3 i32.store local.get $4 - local.get $10 + local.get $11 i32.add - local.get $1 + local.get $7 i32.store - local.get $6 - local.set $3 local.get $5 - local.set $1 - local.get $7 + local.set $3 + local.get $6 + local.set $7 + local.get $1 local.set $4 br $while-continue|2 end @@ -7069,7 +7072,7 @@ local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load local.tee $1 @@ -7081,13 +7084,13 @@ local.get $4 i32.const 2 i32.shl - local.get $10 + local.get $11 i32.add i32.load i32.const 1 i32.add - local.get $8 - local.get $11 + local.get $9 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns end @@ -7098,9 +7101,9 @@ br $for-loop|4 end end - local.get $11 + local.get $12 call $~lib/rt/tlsf/__free - local.get $9 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) @@ -7541,8 +7544,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) - (local $13 i32) + (local $12 i32) + (local $13 i64) local.get $1 i32.const 48 i32.le_s @@ -7567,7 +7570,7 @@ end local.get $0 i32.load - local.set $1 + local.set $5 local.get $0 i32.load offset=4 local.set $3 @@ -7575,49 +7578,50 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $5 + local.get $5 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $4 + local.tee $1 select i32.store local.get $0 i32.load offset=8 - local.set $5 + local.set $4 i32.const 2 global.set $~argumentsLength - local.get $0 local.get $5 - local.get $1 local.get $3 - local.get $4 - select - local.tee $1 local.get $1 - local.get $5 + select + local.tee $3 + local.get $4 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $3 + local.set $1 + local.get $0 + local.get $4 + local.get $3 + local.get $1 select i32.store offset=4 local.get $0 - local.get $1 - local.get $5 local.get $3 + local.get $4 + local.get $1 select i32.store offset=8 end local.get $0 i32.load - local.set $1 + local.set $4 local.get $0 i32.load offset=4 local.set $3 @@ -7625,21 +7629,21 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $4 + local.get $4 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $2 + local.tee $1 select i32.store local.get $0 - local.get $1 + local.get $4 local.get $3 - local.get $2 + local.get $1 select i32.store offset=4 return @@ -7658,43 +7662,43 @@ local.get $1 i32.clz i32.sub - local.tee $6 + local.tee $8 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $8 + local.set $5 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $8 + local.get $5 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $9 + local.tee $10 local.get $7 i32.add - local.set $10 + local.set $11 loop $for-loop|1 - local.get $5 local.get $6 + local.get $8 i32.lt_u if - local.get $5 + local.get $6 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|1 end end @@ -7710,84 +7714,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $11 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $8 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $1 + local.tee $7 i32.const 1 i32.add - local.tee $5 + local.tee $1 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $8 + local.get $9 i32.const 31 - local.get $8 + local.get $9 i32.const 31 i32.lt_s select - local.tee $1 - local.get $5 + local.tee $7 + local.get $1 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $1 - local.get $8 + local.get $7 + local.get $9 i32.lt_s if local.get $0 - local.get $1 + local.get $7 i32.const 1 i32.add - local.tee $6 - local.get $8 + local.tee $5 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $5 - local.get $6 + local.tee $6 + local.get $5 i32.sub i32.const 1 i32.add - local.tee $7 + local.tee $8 i32.const 32 i32.lt_s if local.get $0 - local.get $6 - local.get $8 - local.get $6 + local.get $5 + local.get $9 + local.get $5 i32.const 31 i32.add - local.tee $5 - local.get $5 - local.get $8 + local.tee $1 + local.get $1 + local.get $9 i32.gt_s select - local.tee $5 - local.get $7 + local.tee $6 + local.get $8 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $6 + local.get $5 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $8 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $12 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -7797,30 +7801,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $7 + local.set $1 loop $for-loop|3 + local.get $1 local.get $4 - local.get $7 - i32.gt_u + i32.lt_u if local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load - local.tee $13 + local.tee $8 i32.const -1 i32.ne if local.get $0 - local.get $13 - local.get $10 + local.get $8 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -7829,16 +7833,16 @@ i32.load i32.const 1 i32.add - local.get $1 - local.get $11 + local.get $7 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $13 + local.get $8 local.set $3 end local.get $4 @@ -7848,8 +7852,8 @@ br $for-loop|3 end end - local.get $9 - local.get $7 + local.get $10 + local.get $1 i32.const 2 i32.shl local.tee $4 @@ -7857,15 +7861,15 @@ local.get $3 i32.store local.get $4 - local.get $10 + local.get $11 i32.add - local.get $1 + local.get $7 i32.store - local.get $6 - local.set $3 local.get $5 - local.set $1 - local.get $7 + local.set $3 + local.get $6 + local.set $7 + local.get $1 local.set $4 br $while-continue|2 end @@ -7876,7 +7880,7 @@ local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load local.tee $1 @@ -7888,13 +7892,13 @@ local.get $4 i32.const 2 i32.shl - local.get $10 + local.get $11 i32.add i32.load i32.const 1 i32.add - local.get $8 - local.get $11 + local.get $9 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns end @@ -7905,9 +7909,9 @@ br $for-loop|4 end end - local.get $11 + local.get $12 call $~lib/rt/tlsf/__free - local.get $9 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) @@ -10178,6 +10182,7 @@ ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) local.get $2 i32.eqz if @@ -10316,68 +10321,69 @@ local.get $1 i32.const 1 i32.eq - if (result i32) + if local.get $0 i32.const 101 i32.store16 offset=2 local.get $0 i32.const 4 i32.add + local.tee $2 local.get $3 i32.const 1 i32.sub - local.tee $1 + local.tee $0 i32.const 0 i32.lt_s - local.tee $2 + local.tee $3 if i32.const 0 - local.get $1 + local.get $0 i32.sub - local.set $1 + local.set $0 end - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.const 100000 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 100 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 10 i32.ge_u i32.const 1 i32.add else - local.get $1 + local.get $0 i32.const 10000 i32.ge_u i32.const 3 i32.add - local.get $1 + local.get $0 i32.const 1000 i32.ge_u i32.add end else - local.get $1 + local.get $0 i32.const 10000000 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 1000000 i32.ge_u i32.const 6 i32.add else - local.get $1 + local.get $0 i32.const 1000000000 i32.ge_u i32.const 8 i32.add - local.get $1 + local.get $0 i32.const 100000000 i32.ge_u i32.add @@ -10387,13 +10393,12 @@ i32.add local.tee $1 call $~lib/util/number/utoa32_dec_lut - local.get $0 + local.get $2 i32.const 45 i32.const 43 - local.get $2 + local.get $3 select - i32.store16 offset=4 - local.get $1 + i32.store16 else local.get $0 i32.const 4 @@ -10414,19 +10419,20 @@ local.get $0 local.get $2 i32.add - local.tee $2 + local.tee $0 i32.const 101 i32.store16 offset=2 - local.get $2 + local.get $0 i32.const 4 i32.add + local.tee $4 local.get $3 i32.const 1 i32.sub local.tee $0 i32.const 0 i32.lt_s - local.tee $3 + local.tee $2 if i32.const 0 local.get $0 @@ -10484,16 +10490,18 @@ i32.add local.tee $0 call $~lib/util/number/utoa32_dec_lut - local.get $2 + local.get $4 i32.const 45 i32.const 43 - local.get $3 + local.get $2 select - i32.store16 offset=4 + i32.store16 local.get $0 local.get $1 i32.add + local.set $1 end + local.get $1 i32.const 2 i32.add end @@ -10506,16 +10514,15 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i64) + (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) + (local $10 i64) (local $11 i64) (local $12 i64) (local $13 i64) (local $14 i64) (local $15 i64) - (local $16 i64) local.get $1 f64.const 0 f64.lt @@ -10536,19 +10543,19 @@ i64.const 52 i64.shr_u i32.wrap_i64 - local.tee $8 + local.tee $7 i32.const 1 - local.get $8 + local.get $7 select i32.const 1075 i32.sub - local.tee $9 + local.tee $8 i32.const 1 i32.sub local.get $2 i64.const 4503599627370495 i64.and - local.get $8 + local.get $7 i32.const 0 i32.ne i64.extend_i32_u @@ -10563,11 +10570,11 @@ local.tee $4 i64.clz i32.wrap_i64 - local.tee $8 + local.tee $7 i32.sub - local.set $10 + local.set $9 local.get $4 - local.get $8 + local.get $7 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus @@ -10577,25 +10584,25 @@ i64.eq i32.const 1 i32.add - local.tee $8 + local.tee $7 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $9 local.get $8 + local.get $7 i32.sub - local.get $10 + local.get $9 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $10 + local.get $9 global.set $~lib/util/number/_exp i32.const 348 i32.const -61 global.get $~lib/util/number/_exp - local.tee $8 + local.tee $7 i32.sub f64.convert_i32_s f64.const 0.30102999566398114 @@ -10604,9 +10611,9 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $9 + local.tee $8 local.get $1 - local.get $9 + local.get $8 f64.convert_i32_s f64.ne i32.add @@ -10614,18 +10621,18 @@ i32.shr_s i32.const 1 i32.add - local.tee $9 + local.tee $8 i32.const 3 i32.shl - local.tee $10 + local.tee $9 i32.sub global.set $~lib/util/number/_K - local.get $10 + local.get $9 i32.const 11960 i32.add i64.load global.set $~lib/util/number/_frc_pow - local.get $9 + local.get $8 i32.const 1 i32.shl i32.const 12656 @@ -10639,38 +10646,37 @@ local.tee $2 i64.const 4294967295 i64.and - local.set $11 + local.set $5 local.get $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $4 global.get $~lib/util/number/_frc_pow - local.tee $7 + local.tee $10 i64.const 4294967295 i64.and - local.tee $12 - local.tee $2 + local.tee $11 i64.mul - local.get $2 + local.get $5 local.get $11 i64.mul i64.const 32 i64.shr_u i64.add - local.set $13 + local.set $12 global.get $~lib/util/number/_frc_plus - local.tee $4 + local.tee $2 i64.const 4294967295 i64.and - local.set $2 - local.get $4 + local.set $13 + local.get $2 i64.const 32 i64.shr_u local.tee $6 - local.get $12 + local.get $11 i64.mul - local.get $2 - local.get $12 + local.get $11 + local.get $13 i64.mul i64.const 32 i64.shr_u @@ -10680,41 +10686,34 @@ local.tee $15 i64.const 4294967295 i64.and - local.set $4 + local.set $2 local.get $15 i64.const 32 i64.shr_u local.tee $15 - local.get $12 + local.get $11 i64.mul - local.get $4 - local.get $12 + local.get $2 + local.get $11 i64.mul i64.const 32 i64.shr_u i64.add - local.set $12 - local.get $3 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $0 - local.get $5 - local.get $7 + local.set $11 + local.get $6 + local.get $10 i64.const 32 i64.shr_u - local.tee $16 - local.tee $7 + local.tee $10 i64.mul - local.get $13 + local.get $14 i64.const 32 i64.shr_u i64.add - local.get $7 - local.get $11 - i64.mul + local.get $10 local.get $13 + i64.mul + local.get $14 i64.const 4294967295 i64.and i64.add @@ -10723,17 +10722,26 @@ i64.const 32 i64.shr_u i64.add - local.get $6 - local.get $16 + i64.const 1 + i64.sub + local.set $6 + local.get $3 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $0 + local.get $4 + local.get $10 i64.mul - local.get $14 + local.get $12 i64.const 32 i64.shr_u i64.add - local.get $2 - local.get $16 + local.get $5 + local.get $10 i64.mul - local.get $14 + local.get $12 i64.const 4294967295 i64.and i64.add @@ -10742,26 +10750,24 @@ i64.const 32 i64.shr_u i64.add - i64.const 1 - i64.sub - local.tee $2 + local.get $6 global.get $~lib/util/number/_exp_pow - local.get $8 + local.get $7 i32.add i32.const -64 i32.sub - local.get $2 + local.get $6 + local.get $10 local.get $15 - local.get $16 i64.mul - local.get $12 + local.get $11 i64.const 32 i64.shr_u i64.add - local.get $4 - local.get $16 + local.get $2 + local.get $10 i64.mul - local.get $12 + local.get $11 i64.const 4294967295 i64.and i64.add @@ -13121,8 +13127,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) - (local $13 i32) + (local $12 i32) + (local $13 i64) local.get $1 i32.const 48 i32.le_s @@ -13147,7 +13153,7 @@ end local.get $0 i32.load8_u - local.set $1 + local.set $5 local.get $0 i32.load8_u offset=1 local.set $3 @@ -13155,49 +13161,50 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $5 + local.get $5 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $4 + local.tee $1 select i32.store8 local.get $0 i32.load8_u offset=2 - local.set $5 + local.set $4 i32.const 2 global.set $~argumentsLength - local.get $0 local.get $5 - local.get $1 local.get $3 - local.get $4 - select - local.tee $1 local.get $1 - local.get $5 + select + local.tee $3 + local.get $4 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $3 + local.set $1 + local.get $0 + local.get $4 + local.get $3 + local.get $1 select i32.store8 offset=1 local.get $0 - local.get $1 - local.get $5 local.get $3 + local.get $4 + local.get $1 select i32.store8 offset=2 end local.get $0 i32.load8_u - local.set $1 + local.set $4 local.get $0 i32.load8_u offset=1 local.set $3 @@ -13205,21 +13212,21 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $4 + local.get $4 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $2 + local.tee $1 select i32.store8 local.get $0 - local.get $1 + local.get $4 local.get $3 - local.get $2 + local.get $1 select i32.store8 offset=1 return @@ -13238,43 +13245,43 @@ local.get $1 i32.clz i32.sub - local.tee $6 + local.tee $8 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $8 + local.set $5 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $8 + local.get $5 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $9 + local.tee $10 local.get $7 i32.add - local.set $10 + local.set $11 loop $for-loop|1 - local.get $5 local.get $6 + local.get $8 i32.lt_u if - local.get $5 + local.get $6 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|1 end end @@ -13288,84 +13295,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $11 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $8 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $1 + local.tee $7 i32.const 1 i32.add - local.tee $5 + local.tee $1 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $8 + local.get $9 i32.const 31 - local.get $8 + local.get $9 i32.const 31 i32.lt_s select - local.tee $1 - local.get $5 + local.tee $7 + local.get $1 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $1 - local.get $8 + local.get $7 + local.get $9 i32.lt_s if local.get $0 - local.get $1 + local.get $7 i32.const 1 i32.add - local.tee $6 - local.get $8 + local.tee $5 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $5 - local.get $6 + local.tee $6 + local.get $5 i32.sub i32.const 1 i32.add - local.tee $7 + local.tee $8 i32.const 32 i32.lt_s if local.get $0 - local.get $6 - local.get $8 - local.get $6 + local.get $5 + local.get $9 + local.get $5 i32.const 31 i32.add - local.tee $5 - local.get $5 - local.get $8 + local.tee $1 + local.get $1 + local.get $9 i32.gt_s select - local.tee $5 - local.get $7 + local.tee $6 + local.get $8 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $6 + local.get $5 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $8 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $12 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -13375,30 +13382,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $7 + local.set $1 loop $for-loop|3 + local.get $1 local.get $4 - local.get $7 - i32.gt_u + i32.lt_u if local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load - local.tee $13 + local.tee $8 i32.const -1 i32.ne if local.get $0 - local.get $13 - local.get $10 + local.get $8 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -13407,16 +13414,16 @@ i32.load i32.const 1 i32.add - local.get $1 - local.get $11 + local.get $7 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $13 + local.get $8 local.set $3 end local.get $4 @@ -13426,8 +13433,8 @@ br $for-loop|3 end end - local.get $9 - local.get $7 + local.get $10 + local.get $1 i32.const 2 i32.shl local.tee $4 @@ -13435,15 +13442,15 @@ local.get $3 i32.store local.get $4 - local.get $10 + local.get $11 i32.add - local.get $1 + local.get $7 i32.store - local.get $6 - local.set $3 local.get $5 - local.set $1 - local.get $7 + local.set $3 + local.get $6 + local.set $7 + local.get $1 local.set $4 br $while-continue|2 end @@ -13454,7 +13461,7 @@ local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load local.tee $1 @@ -13466,13 +13473,13 @@ local.get $4 i32.const 2 i32.shl - local.get $10 + local.get $11 i32.add i32.load i32.const 1 i32.add - local.get $8 - local.get $11 + local.get $9 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns end @@ -13483,9 +13490,9 @@ br $for-loop|4 end end - local.get $11 + local.get $12 call $~lib/rt/tlsf/__free - local.get $9 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/array/Array<~lib/string/String>#push (param $0 i32) (param $1 i32) (result i32) @@ -13579,22 +13586,19 @@ (func $~lib/rt/__visit_members (param $0 i32) block $folding-inner4 block $folding-inner3 - block $folding-inner2 - block $folding-inner1 - block $invalid - block $std/array/ArrayStr - block $std/array/Proxy - block $std/array/Dim - block $std/array/Ref - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner4 $std/array/Ref $folding-inner2 $folding-inner4 $folding-inner4 $folding-inner1 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner1 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $std/array/Dim $folding-inner1 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner1 $folding-inner3 $std/array/Proxy $folding-inner1 $folding-inner3 $folding-inner1 $folding-inner3 $folding-inner1 $folding-inner3 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner3 $folding-inner4 $folding-inner4 $std/array/ArrayStr $folding-inner3 $invalid - end - return + block $folding-inner1 + block $invalid + block $std/array/ArrayStr + block $std/array/Proxy + block $std/array/Dim + block $std/array/Ref + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner4 $folding-inner4 $std/array/Ref $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner1 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner1 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $std/array/Dim $folding-inner1 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner1 $folding-inner3 $std/array/Proxy $folding-inner1 $folding-inner3 $folding-inner1 $folding-inner3 $folding-inner1 $folding-inner3 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner3 $folding-inner4 $folding-inner4 $std/array/ArrayStr $folding-inner3 $invalid end return end @@ -13604,23 +13608,16 @@ end return end - local.get $0 - call $~lib/array/Array~visit return end - unreachable + local.get $0 + call $~lib/array/Array~visit + return end - local.get $0 - call $~lib/array/Array~visit - return + unreachable end local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end + call $~lib/array/Array~visit return end local.get $0 @@ -14237,7 +14234,6 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $3 local.tee $2 i32.const 0 i32.store @@ -14246,11 +14242,11 @@ i32.store local.get $0 i32.load offset=4 - local.set $2 + local.set $3 local.get $0 i32.load offset=12 local.set $0 - local.get $3 + local.get $2 i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer @@ -14259,17 +14255,17 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $2 i64.const 0 i64.store - local.get $3 + local.get $2 i32.const 0 i32.store offset=8 block $__inlined_func$~lib/util/string/joinReferenceArray<~lib/array/Array> local.get $0 i32.const 1 i32.sub - local.tee $3 + local.tee $4 i32.const 0 i32.lt_s if @@ -14281,11 +14277,11 @@ local.set $0 br $__inlined_func$~lib/util/string/joinReferenceArray<~lib/array/Array> end - local.get $3 + local.get $4 i32.eqz if global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $3 i32.load local.tee $0 i32.store @@ -14312,37 +14308,37 @@ i32.load i32.const 1 i32.shr_u - local.set $4 + local.set $5 loop $for-loop|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if global.get $~lib/memory/__stack_pointer local.get $1 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load - local.tee $5 + local.tee $6 i32.store - local.get $5 + local.get $6 if global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $6 call $~lib/array/Array#toString - local.set $5 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $6 i32.store offset=8 local.get $0 - local.get $5 + local.get $6 call $~lib/string/String.__concat local.tee $0 i32.store offset=4 end - local.get $4 + local.get $5 if global.get $~lib/memory/__stack_pointer local.get $0 @@ -14359,10 +14355,10 @@ end end global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $4 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load local.tee $1 @@ -14415,8 +14411,6 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i32) global.get $~lib/memory/__stack_pointer i32.const 172 i32.sub @@ -14793,22 +14787,22 @@ i32.const 1 local.get $0 i32.load offset=12 - local.tee $9 - local.get $9 + local.tee $7 + local.get $7 i32.const 1 i32.gt_s select local.set $1 i32.const 3 - local.get $9 - local.get $9 + local.get $7 + local.get $7 i32.const 3 i32.gt_s select - local.set $9 + local.set $7 loop $for-loop|0 local.get $1 - local.get $9 + local.get $7 i32.lt_s if local.get $1 @@ -14853,15 +14847,15 @@ i32.const 0 local.get $1 i32.load offset=12 - local.tee $9 - local.get $9 + local.tee $7 + local.get $7 i32.const 0 i32.gt_s select local.set $3 loop $for-loop|01 local.get $3 - local.get $9 + local.get $7 i32.lt_s if local.get $3 @@ -14905,25 +14899,25 @@ i32.const 0 local.get $1 i32.load offset=12 - local.tee $9 - local.get $9 + local.tee $7 + local.get $7 i32.const 0 i32.gt_s select local.set $0 - local.get $9 + local.get $7 i32.const 3 i32.sub - local.tee $9 + local.tee $7 i32.const 0 - local.get $9 + local.get $7 i32.const 0 i32.gt_s select - local.set $9 + local.set $7 loop $for-loop|03 local.get $0 - local.get $9 + local.get $7 i32.lt_s if local.get $0 @@ -14966,7 +14960,7 @@ local.set $0 local.get $1 i32.load offset=12 - local.tee $9 + local.tee $7 i32.const 2 i32.sub local.tee $3 @@ -14978,7 +14972,7 @@ local.set $3 loop $for-loop|05 local.get $3 - local.get $9 + local.get $7 i32.lt_s if local.get $3 @@ -15022,22 +15016,22 @@ i32.const 1 local.get $1 i32.load offset=12 - local.tee $9 - local.get $9 + local.tee $7 + local.get $7 i32.const 1 i32.gt_s select local.set $0 i32.const 0 - local.get $9 - local.get $9 + local.get $7 + local.get $7 i32.const 0 i32.gt_s select - local.set $9 + local.set $7 loop $for-loop|07 local.get $0 - local.get $9 + local.get $7 i32.lt_s if local.get $0 @@ -16583,10 +16577,10 @@ local.tee $1 i32.const 2 i32.shl - local.tee $10 + local.tee $8 call $~lib/memory/memory.copy local.get $3 - local.get $10 + local.get $8 i32.add i32.const 0 i32.store @@ -17062,14 +17056,14 @@ local.get $3 i32.const 1 i32.shr_u - local.set $9 + local.set $7 local.get $3 i32.const 1 i32.sub local.set $3 loop $while-continue|0 local.get $0 - local.get $9 + local.get $7 i32.lt_u if local.get $0 @@ -17077,10 +17071,10 @@ i32.shl local.get $1 i32.add - local.tee $10 + local.tee $8 i32.load - local.set $11 - local.get $10 + local.set $9 + local.get $8 local.get $3 local.get $0 i32.sub @@ -17088,11 +17082,11 @@ i32.shl local.get $1 i32.add - local.tee $10 + local.tee $8 i32.load i32.store - local.get $10 - local.get $11 + local.get $8 + local.get $9 i32.store local.get $0 i32.const 1 @@ -17207,33 +17201,31 @@ i32.const 6 i32.const 3744 call $~lib/rt/__newArray - local.set $3 + local.set $1 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $1 i32.store - local.get $3 + local.get $1 i32.load offset=4 - local.get $3 + local.get $1 i32.load offset=12 call $~lib/util/bytes/REVERSE - local.get $3 + local.get $1 i32.store offset=16 - i32.const 0 - local.set $1 - local.get $3 + local.get $1 i32.load offset=12 local.set $0 loop $for-loop|08 local.get $0 - local.get $1 + local.get $2 i32.gt_s if - local.get $3 local.get $1 + local.get $2 call $~lib/array/Array#__get - local.get $3 - i32.load offset=12 local.get $1 + i32.load offset=12 + local.get $2 i32.sub i32.const 1 i32.sub @@ -17246,10 +17238,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|08 end end @@ -17274,10 +17266,10 @@ local.set $0 local.get $1 i32.load offset=12 - local.set $3 + local.set $2 loop $for-loop|1 local.get $0 - local.get $3 + local.get $2 i32.lt_s if local.get $1 @@ -17322,20 +17314,22 @@ call $~lib/util/bytes/REVERSE local.get $1 i32.store offset=12 + i32.const 0 + local.set $3 local.get $1 i32.load offset=12 local.set $0 loop $for-loop|2 local.get $0 - local.get $2 + local.get $3 i32.gt_s if local.get $1 - local.get $2 + local.get $3 call $~lib/array/Array#__get local.get $1 i32.load offset=12 - local.get $2 + local.get $3 i32.sub i32.const 1 i32.sub @@ -17348,10 +17342,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|2 end end @@ -17367,24 +17361,24 @@ i32.store local.get $1 call $~lib/array/Array#reverse - local.tee $1 + local.tee $0 i32.store offset=20 i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=12 local.set $2 loop $for-loop|3 - local.get $0 + local.get $1 local.get $2 i32.lt_s if - local.get $1 local.get $0 - call $~lib/array/Array#__get local.get $1 - i32.load offset=12 + call $~lib/array/Array#__get local.get $0 + i32.load offset=12 + local.get $1 i32.sub i32.const 1 i32.sub @@ -17397,10 +17391,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|3 end end @@ -17419,21 +17413,21 @@ local.tee $0 i32.store offset=24 i32.const 0 - local.set $1 + local.set $2 local.get $0 i32.load offset=12 - local.set $2 + local.set $1 loop $for-loop|4 local.get $1 local.get $2 - i32.lt_s + i32.gt_s if local.get $0 - local.get $1 + local.get $2 call $~lib/array/Array#__get local.get $0 i32.load offset=12 - local.get $1 + local.get $2 i32.sub i32.const 1 i32.sub @@ -17446,10 +17440,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|4 end end @@ -17468,21 +17462,21 @@ local.tee $0 i32.store offset=28 i32.const 0 - local.set $2 + local.set $3 local.get $0 i32.load offset=12 local.set $1 loop $for-loop|5 local.get $1 - local.get $2 + local.get $3 i32.gt_s if local.get $0 - local.get $2 + local.get $3 call $~lib/array/Array#__get local.get $0 i32.load offset=12 - local.get $2 + local.get $3 i32.sub i32.const 1 i32.sub @@ -17495,10 +17489,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|5 end end @@ -18241,64 +18235,58 @@ i32.const 3 i32.const 4064 call $~lib/rt/__newArray - local.tee $2 + local.tee $1 i32.store offset=24 i32.const 1 global.set $~argumentsLength - local.get $2 - i32.load offset=12 - local.tee $0 - local.set $3 i32.const -1 - local.set $1 + local.set $3 block $__inlined_func$~lib/array/Array#lastIndexOf - local.get $0 + local.get $1 + i32.load offset=12 + local.tee $0 i32.eqz br_if $__inlined_func$~lib/array/Array#lastIndexOf local.get $0 - local.get $3 + local.get $0 i32.add local.get $0 i32.const 1 i32.sub - local.get $3 local.get $0 - local.get $3 - i32.le_s - select - local.get $3 i32.const 0 i32.lt_s select - local.set $1 - local.get $2 - i32.load offset=4 local.set $0 + local.get $1 + i32.load offset=4 + local.set $2 loop $while-continue|01 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 + local.get $0 + local.tee $3 i32.const 2 i32.shl - local.get $0 + local.get $2 i32.add i32.load i32.const 2 i32.eq br_if $__inlined_func$~lib/array/Array#lastIndexOf - local.get $1 + local.get $3 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|01 end end i32.const -1 - local.set $1 + local.set $3 end - local.get $1 + local.get $3 i32.const 3 i32.ne if @@ -18311,60 +18299,54 @@ end i32.const 1 global.set $~argumentsLength - local.get $2 - i32.load offset=12 - local.tee $0 - local.set $3 i32.const -1 - local.set $1 + local.set $3 block $__inlined_func$~lib/array/Array#lastIndexOf6 - local.get $0 + local.get $1 + i32.load offset=12 + local.tee $0 i32.eqz br_if $__inlined_func$~lib/array/Array#lastIndexOf6 local.get $0 - local.get $3 + local.get $0 i32.add local.get $0 i32.const 1 i32.sub - local.get $3 local.get $0 - local.get $3 - i32.le_s - select - local.get $3 i32.const 0 i32.lt_s select - local.set $1 - local.get $2 - i32.load offset=4 local.set $0 + local.get $1 + i32.load offset=4 + local.set $2 loop $while-continue|07 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 + local.get $0 + local.tee $3 i32.const 2 i32.shl - local.get $0 + local.get $2 i32.add i32.load i32.const 7 i32.eq br_if $__inlined_func$~lib/array/Array#lastIndexOf6 - local.get $1 + local.get $3 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|07 end end i32.const -1 - local.set $1 + local.set $3 end - local.get $1 + local.get $3 i32.const -1 i32.ne if @@ -18376,50 +18358,50 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $__inlined_func$~lib/array/Array#lastIndexOf8 - local.get $2 + local.get $1 i32.load offset=12 - local.tee $0 + local.tee $2 i32.eqz br_if $__inlined_func$~lib/array/Array#lastIndexOf8 - local.get $0 + local.get $2 i32.const 1 i32.sub i32.const 3 - local.get $0 + local.get $2 i32.const 3 i32.le_s select - local.set $1 - local.get $2 - i32.load offset=4 local.set $0 + local.get $1 + i32.load offset=4 + local.set $2 loop $while-continue|071 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 + local.get $0 i32.const 2 i32.shl - local.get $0 + local.get $2 i32.add i32.load i32.const 2 i32.eq br_if $__inlined_func$~lib/array/Array#lastIndexOf8 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|071 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -18431,50 +18413,50 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $__inlined_func$~lib/array/Array#lastIndexOf72 - local.get $2 + local.get $1 i32.load offset=12 - local.tee $0 + local.tee $2 i32.eqz br_if $__inlined_func$~lib/array/Array#lastIndexOf72 - local.get $0 + local.get $2 i32.const 1 i32.sub i32.const 2 - local.get $0 + local.get $2 i32.const 2 i32.le_s select - local.set $1 - local.get $2 - i32.load offset=4 local.set $0 + local.get $1 + i32.load offset=4 + local.set $2 loop $while-continue|074 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 + local.get $0 i32.const 2 i32.shl - local.get $0 + local.get $2 i32.add i32.load i32.const 2 i32.eq br_if $__inlined_func$~lib/array/Array#lastIndexOf72 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|074 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 if i32.const 0 i32.const 1552 @@ -18484,45 +18466,45 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $__inlined_func$~lib/array/Array#lastIndexOf75 - local.get $2 + local.get $1 i32.load offset=12 - local.tee $0 + local.tee $2 i32.eqz br_if $__inlined_func$~lib/array/Array#lastIndexOf75 - local.get $0 + local.get $2 i32.const 2 i32.sub - local.set $1 - local.get $2 - i32.load offset=4 local.set $0 + local.get $1 + i32.load offset=4 + local.set $2 loop $while-continue|077 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 + local.get $0 i32.const 2 i32.shl - local.get $0 + local.get $2 i32.add i32.load i32.const 2 i32.eq br_if $__inlined_func$~lib/array/Array#lastIndexOf75 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|077 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 if i32.const 0 i32.const 1552 @@ -18534,16 +18516,16 @@ i32.const -1 local.set $0 block $__inlined_func$~lib/array/Array#lastIndexOf78 - local.get $2 + local.get $1 i32.load offset=12 - local.tee $1 + local.tee $2 i32.eqz br_if $__inlined_func$~lib/array/Array#lastIndexOf78 - local.get $1 + local.get $2 i32.const 1 i32.sub local.set $0 - local.get $2 + local.get $1 i32.load offset=4 local.set $1 loop $while-continue|080 @@ -20443,11 +20425,11 @@ i32.const 0 i32.gt_s select - local.set $9 + local.set $7 local.get $2 i32.const 1 local.get $3 - local.get $9 + local.get $7 i32.sub local.tee $2 local.get $2 @@ -20465,37 +20447,37 @@ i32.const 12 i32.const 0 call $~lib/rt/__newArray - local.tee $10 + local.tee $8 i32.store - local.get $10 + local.get $8 i32.load offset=4 local.get $1 i32.load offset=4 - local.tee $11 - local.get $9 + local.tee $9 + local.get $7 i32.const 2 i32.shl i32.add - local.tee $12 + local.tee $10 local.get $2 i32.const 2 i32.shl call $~lib/memory/memory.copy local.get $3 local.get $2 - local.get $9 + local.get $7 i32.add - local.tee $9 + local.tee $7 i32.ne if - local.get $12 - local.get $9 + local.get $10 + local.get $7 i32.const 2 i32.shl - local.get $11 + local.get $9 i32.add local.get $3 - local.get $9 + local.get $7 i32.sub i32.const 2 i32.shl @@ -20510,9 +20492,9 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $10 + local.get $8 i32.store offset=4 - local.get $10 + local.get $8 i32.load offset=12 i32.const 1 i32.ne @@ -20525,7 +20507,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $10 + local.get $8 i32.const 0 call $~lib/array/Array#__get local.tee $0 @@ -21097,12 +21079,12 @@ i32.const 3 i32.const 6336 call $~lib/rt/__newArray - local.tee $2 + local.tee $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 6384 i32.store offset=8 - local.get $2 + local.get $0 i32.load offset=12 i32.const 1 i32.sub @@ -21113,7 +21095,7 @@ i32.const 0 i32.ge_s if - local.get $2 + local.get $0 i32.load offset=4 local.get $1 i32.const 2 @@ -21123,7 +21105,7 @@ i32.const 3 global.set $~argumentsLength local.get $1 - local.get $2 + local.get $0 i32.const 6384 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) @@ -21152,7 +21134,7 @@ global.get $~lib/memory/__stack_pointer i32.const 6416 i32.store offset=8 - local.get $2 + local.get $0 i32.load offset=12 i32.const 1 i32.sub @@ -21163,7 +21145,7 @@ i32.const 0 i32.ge_s if - local.get $2 + local.get $0 i32.load offset=4 local.get $1 i32.const 2 @@ -21173,7 +21155,7 @@ i32.const 3 global.set $~argumentsLength local.get $1 - local.get $2 + local.get $0 i32.const 6416 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) @@ -21204,7 +21186,7 @@ global.get $~lib/memory/__stack_pointer i32.const 6448 i32.store offset=8 - local.get $2 + local.get $0 i32.load offset=12 i32.const 1 i32.sub @@ -21215,7 +21197,7 @@ i32.const 0 i32.ge_s if - local.get $2 + local.get $0 i32.load offset=4 local.get $1 i32.const 2 @@ -21225,7 +21207,7 @@ i32.const 3 global.set $~argumentsLength local.get $1 - local.get $2 + local.get $0 i32.const 6448 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) @@ -21256,43 +21238,43 @@ global.get $~lib/memory/__stack_pointer i32.const 6480 i32.store offset=8 - local.get $2 + local.get $0 i32.load offset=12 i32.const 1 i32.sub - local.set $0 + local.set $1 block $__inlined_func$~lib/array/Array#findLastIndex128 loop $for-loop|0130 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if - local.get $2 - i32.load offset=4 local.get $0 + i32.load offset=4 + local.get $1 i32.const 2 i32.shl i32.add i32.load i32.const 3 global.set $~argumentsLength + local.get $1 local.get $0 - local.get $2 i32.const 6480 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $__inlined_func$~lib/array/Array#findLastIndex128 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $for-loop|0130 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 global.set $std/array/i global.get $std/array/i i32.const -1 @@ -22536,20 +22518,20 @@ i32.const 10 i32.const 0 call $~lib/rt/__newArray - local.tee $9 + local.tee $7 i32.store - local.get $9 + local.get $7 i32.load offset=4 - local.set $10 + local.set $8 i32.const 0 local.set $0 loop $for-loop|0197 local.get $3 local.get $2 i32.load offset=12 - local.tee $11 + local.tee $9 local.get $3 - local.get $11 + local.get $9 i32.lt_s select local.get $0 @@ -22558,18 +22540,18 @@ local.get $0 i32.const 2 i32.shl - local.tee $11 + local.tee $9 local.get $2 i32.load offset=4 i32.add i32.load - local.set $12 + local.set $10 i32.const 3 global.set $~argumentsLength - local.get $10 - local.get $11 + local.get $8 + local.get $9 i32.add - local.get $12 + local.get $10 local.get $0 local.get $2 i32.const 6992 @@ -22587,9 +22569,9 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $9 + local.get $7 i32.store offset=12 - local.get $9 + local.get $7 i32.load offset=12 i32.const 4 i32.ne @@ -22601,7 +22583,7 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $7 i32.const 0 call $~lib/array/Array#__get local.set $6 @@ -22947,48 +22929,48 @@ drop global.get $~lib/memory/__stack_pointer global.get $std/array/arr - local.tee $2 + local.tee $1 i32.store global.get $~lib/memory/__stack_pointer i32.const 7248 i32.store offset=8 i32.const 0 - local.set $1 + local.set $2 i32.const 0 local.set $0 - local.get $2 + local.get $1 i32.load offset=12 local.set $3 loop $for-loop|0206 local.get $3 - local.get $2 + local.get $1 i32.load offset=12 - local.tee $9 + local.tee $7 local.get $3 - local.get $9 + local.get $7 i32.lt_s select local.get $0 i32.gt_s if - local.get $2 + local.get $1 i32.load offset=4 local.get $0 i32.const 2 i32.shl i32.add i32.load - local.set $9 + local.set $7 i32.const 4 global.set $~argumentsLength - local.get $1 - local.get $9 - local.get $0 local.get $2 + local.get $7 + local.get $0 + local.get $1 i32.const 7248 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.add @@ -22996,7 +22978,7 @@ br $for-loop|0206 end end - local.get $1 + local.get $2 global.set $std/array/i global.get $std/array/i i32.const 6 @@ -23012,48 +22994,48 @@ global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr - local.tee $2 + local.tee $1 i32.store local.get $0 i32.const 7280 i32.store offset=8 i32.const 4 - local.set $1 + local.set $2 i32.const 0 local.set $0 - local.get $2 + local.get $1 i32.load offset=12 local.set $3 loop $for-loop|0210 local.get $3 - local.get $2 + local.get $1 i32.load offset=12 - local.tee $9 + local.tee $7 local.get $3 - local.get $9 + local.get $7 i32.lt_s select local.get $0 i32.gt_s if - local.get $2 + local.get $1 i32.load offset=4 local.get $0 i32.const 2 i32.shl i32.add i32.load - local.set $9 + local.set $7 i32.const 4 global.set $~argumentsLength - local.get $1 - local.get $9 - local.get $0 local.get $2 + local.get $7 + local.get $0 + local.get $1 i32.const 7280 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.add @@ -23061,7 +23043,7 @@ br $for-loop|0210 end end - local.get $1 + local.get $2 global.set $std/array/i global.get $std/array/i i32.const 10 @@ -23077,48 +23059,48 @@ global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr - local.tee $2 + local.tee $1 i32.store local.get $0 i32.const 7312 i32.store offset=8 i32.const 0 - local.set $1 + local.set $2 i32.const 0 local.set $0 - local.get $2 + local.get $1 i32.load offset=12 local.set $3 loop $for-loop|0214 local.get $3 - local.get $2 + local.get $1 i32.load offset=12 - local.tee $9 + local.tee $7 local.get $3 - local.get $9 + local.get $7 i32.lt_s select local.get $0 i32.gt_s if - local.get $2 + local.get $1 i32.load offset=4 local.get $0 i32.const 2 i32.shl i32.add i32.load - local.set $9 + local.set $7 i32.const 4 global.set $~argumentsLength - local.get $1 - local.get $9 - local.get $0 local.get $2 + local.get $7 + local.get $0 + local.get $1 i32.const 7312 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.add @@ -23126,7 +23108,7 @@ br $for-loop|0214 end end - local.get $1 + local.get $2 i32.eqz if i32.const 0 @@ -23139,48 +23121,48 @@ global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr - local.tee $2 + local.tee $1 i32.store local.get $0 i32.const 7344 i32.store offset=8 i32.const 0 - local.set $1 + local.set $2 i32.const 0 local.set $0 - local.get $2 + local.get $1 i32.load offset=12 local.set $3 loop $for-loop|0218 local.get $3 - local.get $2 + local.get $1 i32.load offset=12 - local.tee $9 + local.tee $7 local.get $3 - local.get $9 + local.get $7 i32.lt_s select local.get $0 i32.gt_s if - local.get $2 + local.get $1 i32.load offset=4 local.get $0 i32.const 2 i32.shl i32.add i32.load - local.set $9 + local.set $7 i32.const 4 global.set $~argumentsLength - local.get $1 - local.get $9 - local.get $0 local.get $2 + local.get $7 + local.get $0 + local.get $1 i32.const 7344 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.add @@ -23188,7 +23170,7 @@ br $for-loop|0218 end end - local.get $1 + local.get $2 if i32.const 0 i32.const 1552 @@ -23200,48 +23182,48 @@ global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr - local.tee $2 + local.tee $1 i32.store local.get $0 i32.const 7376 i32.store offset=8 i32.const 0 - local.set $1 + local.set $2 i32.const 0 local.set $0 - local.get $2 + local.get $1 i32.load offset=12 local.set $3 loop $for-loop|0222 local.get $3 - local.get $2 + local.get $1 i32.load offset=12 - local.tee $9 + local.tee $7 local.get $3 - local.get $9 + local.get $7 i32.lt_s select local.get $0 i32.gt_s if - local.get $2 + local.get $1 i32.load offset=4 local.get $0 i32.const 2 i32.shl i32.add i32.load - local.set $9 + local.set $7 i32.const 4 global.set $~argumentsLength - local.get $1 - local.get $9 - local.get $0 local.get $2 + local.get $7 + local.get $0 + local.get $1 i32.const 7376 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.add @@ -23249,7 +23231,7 @@ br $for-loop|0222 end end - local.get $1 + local.get $2 global.set $std/array/i global.get $std/array/i i32.const 6 @@ -23281,48 +23263,48 @@ global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr - local.tee $2 + local.tee $1 i32.store local.get $0 i32.const 7408 i32.store offset=8 i32.const 0 - local.set $1 + local.set $2 i32.const 0 local.set $0 - local.get $2 + local.get $1 i32.load offset=12 local.set $3 loop $for-loop|0227 local.get $3 - local.get $2 + local.get $1 i32.load offset=12 - local.tee $9 + local.tee $7 local.get $3 - local.get $9 + local.get $7 i32.lt_s select local.get $0 i32.gt_s if - local.get $2 + local.get $1 i32.load offset=4 local.get $0 i32.const 2 i32.shl i32.add i32.load - local.set $9 + local.set $7 i32.const 4 global.set $~argumentsLength - local.get $1 - local.get $9 - local.get $0 local.get $2 + local.get $7 + local.get $0 + local.get $1 i32.const 7408 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.add @@ -23330,7 +23312,7 @@ br $for-loop|0227 end end - local.get $1 + local.get $2 global.set $std/array/i global.get $std/array/i i32.const 10 @@ -23373,48 +23355,48 @@ drop global.get $~lib/memory/__stack_pointer global.get $std/array/arr - local.tee $2 + local.tee $1 i32.store global.get $~lib/memory/__stack_pointer i32.const 7440 i32.store offset=8 i32.const 0 - local.set $1 + local.set $2 i32.const 0 local.set $0 - local.get $2 + local.get $1 i32.load offset=12 local.set $3 loop $for-loop|0231 local.get $3 - local.get $2 + local.get $1 i32.load offset=12 - local.tee $9 + local.tee $7 local.get $3 - local.get $9 + local.get $7 i32.lt_s select local.get $0 i32.gt_s if - local.get $2 + local.get $1 i32.load offset=4 local.get $0 i32.const 2 i32.shl i32.add i32.load - local.set $9 + local.set $7 i32.const 4 global.set $~argumentsLength - local.get $1 - local.get $9 - local.get $0 local.get $2 + local.get $7 + local.get $0 + local.get $1 i32.const 7440 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.add @@ -23422,7 +23404,7 @@ br $for-loop|0231 end end - local.get $1 + local.get $2 global.set $std/array/i global.get $std/array/i i32.const 1 @@ -23469,14 +23451,14 @@ drop global.get $~lib/memory/__stack_pointer global.get $std/array/arr - local.tee $2 + local.tee $1 i32.store global.get $~lib/memory/__stack_pointer i32.const 7472 i32.store offset=8 i32.const 0 - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.load offset=12 i32.const 1 i32.sub @@ -23486,7 +23468,7 @@ i32.const 0 i32.ge_s if - local.get $2 + local.get $1 i32.load offset=4 local.get $0 i32.const 2 @@ -23496,14 +23478,14 @@ local.set $3 i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $2 local.get $3 local.get $0 - local.get $2 + local.get $1 i32.const 7472 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.sub @@ -23511,7 +23493,7 @@ br $for-loop|0235 end end - local.get $1 + local.get $2 global.set $std/array/i global.get $std/array/i i32.const 6 @@ -23527,14 +23509,14 @@ global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr - local.tee $2 + local.tee $1 i32.store local.get $0 i32.const 7504 i32.store offset=8 i32.const 4 - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.load offset=12 i32.const 1 i32.sub @@ -23544,7 +23526,7 @@ i32.const 0 i32.ge_s if - local.get $2 + local.get $1 i32.load offset=4 local.get $0 i32.const 2 @@ -23554,14 +23536,14 @@ local.set $3 i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $2 local.get $3 local.get $0 - local.get $2 + local.get $1 i32.const 7504 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.sub @@ -23569,7 +23551,7 @@ br $for-loop|0239 end end - local.get $1 + local.get $2 global.set $std/array/i global.get $std/array/i i32.const 10 @@ -23585,14 +23567,14 @@ global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr - local.tee $2 + local.tee $1 i32.store local.get $0 i32.const 7536 i32.store offset=8 i32.const 0 - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.load offset=12 i32.const 1 i32.sub @@ -23602,7 +23584,7 @@ i32.const 0 i32.ge_s if - local.get $2 + local.get $1 i32.load offset=4 local.get $0 i32.const 2 @@ -23612,14 +23594,14 @@ local.set $3 i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $2 local.get $3 local.get $0 - local.get $2 + local.get $1 i32.const 7536 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.sub @@ -23627,7 +23609,7 @@ br $for-loop|0243 end end - local.get $1 + local.get $2 i32.eqz if i32.const 0 @@ -23640,14 +23622,14 @@ global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr - local.tee $2 + local.tee $1 i32.store local.get $0 i32.const 7568 i32.store offset=8 i32.const 0 - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.load offset=12 i32.const 1 i32.sub @@ -23657,7 +23639,7 @@ i32.const 0 i32.ge_s if - local.get $2 + local.get $1 i32.load offset=4 local.get $0 i32.const 2 @@ -23667,14 +23649,14 @@ local.set $3 i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $2 local.get $3 local.get $0 - local.get $2 + local.get $1 i32.const 7568 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.sub @@ -23682,7 +23664,7 @@ br $for-loop|0247 end end - local.get $1 + local.get $2 if i32.const 0 i32.const 1552 @@ -23694,14 +23676,14 @@ global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr - local.tee $2 + local.tee $1 i32.store local.get $0 i32.const 7600 i32.store offset=8 i32.const 0 - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.load offset=12 i32.const 1 i32.sub @@ -23711,7 +23693,7 @@ i32.const 0 i32.ge_s if - local.get $2 + local.get $1 i32.load offset=4 local.get $0 i32.const 2 @@ -23721,14 +23703,14 @@ local.set $3 i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $2 local.get $3 local.get $0 - local.get $2 + local.get $1 i32.const 7600 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.sub @@ -23736,7 +23718,7 @@ br $for-loop|0251 end end - local.get $1 + local.get $2 global.set $std/array/i global.get $std/array/i i32.const 6 @@ -23768,14 +23750,14 @@ global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr - local.tee $2 + local.tee $1 i32.store local.get $0 i32.const 7632 i32.store offset=8 i32.const 0 - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.load offset=12 i32.const 1 i32.sub @@ -23785,7 +23767,7 @@ i32.const 0 i32.ge_s if - local.get $2 + local.get $1 i32.load offset=4 local.get $0 i32.const 2 @@ -23795,14 +23777,14 @@ local.set $3 i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $2 local.get $3 local.get $0 - local.get $2 + local.get $1 i32.const 7632 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.sub @@ -23810,7 +23792,7 @@ br $for-loop|0256 end end - local.get $1 + local.get $2 global.set $std/array/i global.get $std/array/i i32.const 10 @@ -23853,14 +23835,14 @@ drop global.get $~lib/memory/__stack_pointer global.get $std/array/arr - local.tee $2 + local.tee $1 i32.store global.get $~lib/memory/__stack_pointer i32.const 7664 i32.store offset=8 i32.const 0 - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.load offset=12 i32.const 1 i32.sub @@ -23870,7 +23852,7 @@ i32.const 0 i32.ge_s if - local.get $2 + local.get $1 i32.load offset=4 local.get $0 i32.const 2 @@ -23880,14 +23862,14 @@ local.set $3 i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $2 local.get $3 local.get $0 - local.get $2 + local.get $1 i32.const 7664 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.sub @@ -23895,7 +23877,7 @@ br $for-loop|0260 end end - local.get $1 + local.get $2 global.set $std/array/i global.get $std/array/i i32.const 6 @@ -24442,12 +24424,12 @@ i32.const 11 i32.const 8112 call $~lib/rt/__newArray - local.tee $2 + local.tee $0 i32.store offset=112 i32.const 0 global.set $~argumentsLength i32.const 0 - local.set $1 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -24468,16 +24450,16 @@ unreachable end i32.const 8208 - local.set $1 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 8208 i32.store end - local.get $2 + local.get $0 i32.load offset=4 - local.get $2 + local.get $0 i32.load offset=12 - local.get $1 + local.get $2 call $~lib/util/sort/SORT global.get $~lib/memory/__stack_pointer i32.const 4 @@ -24489,41 +24471,41 @@ i32.const 11 i32.const 8240 call $~lib/rt/__newArray - local.set $1 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $2 i32.store offset=8 i32.const 0 - local.get $2 + local.get $0 i32.load offset=12 local.tee $3 - local.get $1 + local.get $2 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 - local.get $1 + local.get $0 local.get $2 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop i32.const 0 - local.set $0 + local.set $1 loop $for-loop|029 - local.get $0 + local.get $1 local.get $3 i32.lt_s if - local.get $2 local.get $0 + local.get $1 call $~lib/array/Array#__get local.tee $4 local.get $4 f64.ne if (result i32) + local.get $2 local.get $1 - local.get $0 call $~lib/array/Array#__get local.tee $4 local.get $4 @@ -24534,20 +24516,20 @@ i32.eqz if i32.const 0 - local.get $2 local.get $0 + local.get $1 call $~lib/array/Array#__get + local.get $2 local.get $1 - local.get $0 call $~lib/array/Array#__get f64.ne br_if $__inlined_func$std/array/isArraysEqual drop end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|029 end end @@ -24573,7 +24555,7 @@ i32.const 0 global.set $~argumentsLength i32.const 0 - local.set $1 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -24594,7 +24576,7 @@ unreachable end i32.const 8384 - local.set $1 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 8384 i32.store @@ -24603,7 +24585,7 @@ i32.load offset=4 local.get $0 i32.load offset=12 - local.get $1 + local.get $2 call $~lib/util/sort/SORT global.get $~lib/memory/__stack_pointer i32.const 4 @@ -24672,7 +24654,7 @@ i32.const 3 i32.const 8592 call $~lib/rt/__newArray - local.tee $0 + local.tee $1 i32.store offset=124 global.get $~lib/memory/__stack_pointer i32.const 1 @@ -24680,7 +24662,7 @@ i32.const 3 i32.const 8624 call $~lib/rt/__newArray - local.tee $1 + local.tee $2 i32.store offset=128 global.get $~lib/memory/__stack_pointer i32.const 2 @@ -24688,7 +24670,7 @@ i32.const 3 i32.const 8656 call $~lib/rt/__newArray - local.tee $2 + local.tee $3 i32.store offset=132 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -24696,7 +24678,7 @@ i32.const 3 i32.const 8688 call $~lib/rt/__newArray - local.tee $3 + local.tee $7 i32.store offset=136 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -24704,48 +24686,48 @@ i32.const 3 i32.const 8736 call $~lib/rt/__newArray - local.tee $9 + local.tee $8 i32.store offset=140 global.get $~lib/memory/__stack_pointer i32.const 64 call $std/array/createReverseOrderedArray - local.tee $10 + local.tee $9 i32.store offset=144 global.get $~lib/memory/__stack_pointer i32.const 128 call $std/array/createReverseOrderedArray - local.tee $11 + local.tee $10 i32.store offset=148 global.get $~lib/memory/__stack_pointer i32.const 1024 call $std/array/createReverseOrderedArray - local.tee $12 + local.tee $11 i32.store offset=152 global.get $~lib/memory/__stack_pointer i32.const 10000 call $std/array/createReverseOrderedArray - local.tee $13 + local.tee $12 i32.store offset=156 global.get $~lib/memory/__stack_pointer i32.const 512 call $std/array/createRandomOrderedArray - local.tee $14 + local.tee $0 i32.store offset=160 - local.get $0 - call $std/array/assertSortedDefault local.get $1 call $std/array/assertSortedDefault + local.get $2 + call $std/array/assertSortedDefault i32.const 1 i32.const 2 i32.const 3 i32.const 8816 call $~lib/rt/__newArray - local.set $0 + local.set $1 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $1 i32.store offset=8 + local.get $2 local.get $1 - local.get $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -24757,19 +24739,19 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 call $std/array/assertSortedDefault i32.const 2 i32.const 2 i32.const 3 i32.const 8848 call $~lib/rt/__newArray - local.set $0 + local.set $1 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $1 i32.store offset=8 - local.get $2 - local.get $0 + local.get $3 + local.get $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -24781,10 +24763,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $7 call $std/array/assertSortedDefault - local.get $3 - local.get $9 + local.get $7 + local.get $8 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -24796,10 +24778,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $9 call $std/array/assertSortedDefault - local.get $10 local.get $9 + local.get $8 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -24811,10 +24793,10 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $10 call $std/array/assertSortedDefault - local.get $11 - local.get $9 + local.get $10 + local.get $8 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -24826,10 +24808,10 @@ call $~lib/builtins/abort unreachable end - local.get $12 + local.get $11 call $std/array/assertSortedDefault - local.get $12 - local.get $9 + local.get $11 + local.get $8 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -24841,10 +24823,10 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $12 call $std/array/assertSortedDefault - local.get $13 - local.get $9 + local.get $12 + local.get $8 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -24856,213 +24838,206 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $0 call $std/array/assertSortedDefault + i32.const 0 + local.set $0 global.get $~lib/memory/__stack_pointer i32.const 24 i32.sub global.set $~lib/memory/__stack_pointer - block $__inlined_func$std/array/assertStableSortedForComplexObjects - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 15652 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - global.get $std/array/inputStabArr - local.tee $2 - i32.store offset=8 - local.get $1 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 15652 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i32.const 0 - i32.store - i32.const 0 - local.get $2 - i32.load offset=12 - local.tee $3 - local.get $3 - i32.const 0 - i32.gt_s - select - local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 15652 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i64.const 0 + i64.store + local.get $1 + i64.const 0 + i64.store offset=8 + local.get $1 + i64.const 0 + i64.store offset=16 + local.get $1 + global.get $std/array/inputStabArr + local.tee $2 + i32.store offset=8 + local.get $1 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 15652 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $3 + i32.const 0 + i32.store + i32.const 0 + local.get $2 + i32.load offset=12 + local.tee $7 + local.get $7 + i32.const 0 + i32.gt_s + select + local.set $8 + local.get $3 + local.get $7 + local.get $8 + i32.sub + local.tee $3 + i32.const 0 + local.get $3 + i32.const 0 + i32.gt_s + select + local.tee $3 + i32.const 2 + i32.const 20 + i32.const 0 + call $~lib/rt/__newArray + local.tee $7 + i32.store + local.get $7 + i32.load offset=4 + local.set $9 + local.get $2 + i32.load offset=4 + local.get $8 + i32.const 2 + i32.shl + i32.add + local.set $2 + local.get $3 + i32.const 2 + i32.shl + local.set $3 + loop $while-continue|011 + local.get $0 + local.get $3 + i32.lt_u + if local.get $0 - local.get $3 local.get $9 - i32.sub - local.tee $0 - i32.const 0 + i32.add local.get $0 - i32.const 0 - i32.gt_s - select - local.tee $3 - i32.const 2 - i32.const 20 - i32.const 0 - call $~lib/rt/__newArray - local.tee $10 - i32.store - local.get $10 - i32.load offset=4 - local.set $0 local.get $2 - i32.load offset=4 - local.get $9 - i32.const 2 - i32.shl i32.add - local.set $2 - local.get $3 - i32.const 2 - i32.shl - local.set $3 - loop $while-continue|00 - local.get $3 + i32.load + local.tee $8 + i32.store + local.get $8 + if + local.get $7 local.get $8 - i32.gt_u - if - local.get $0 - local.get $8 - i32.add - local.get $2 - local.get $8 - i32.add - i32.load - local.tee $9 - i32.store - local.get $9 - if - local.get $10 - local.get $9 - i32.const 1 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $8 - i32.const 4 - i32.add - local.set $8 - br $while-continue|00 - end + i32.const 1 + call $byn-split-outlined-A$~lib/rt/itcms/__link end - global.get $~lib/memory/__stack_pointer + local.get $0 i32.const 4 i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - local.get $10 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 8880 - i32.store offset=4 - local.get $10 - i32.load offset=4 - local.get $10 - i32.load offset=12 - i32.const 8880 - call $~lib/util/sort/SORT - local.get $1 - local.get $10 - i32.store offset=12 - i32.const 1 local.set $0 - global.get $~lib/memory/__stack_pointer - global.get $std/array/inputStabArr - local.tee $1 - i32.store - local.get $1 - i32.load offset=12 - local.set $1 - loop $for-loop|02 - local.get $1 + br $while-continue|011 + end + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 8880 + i32.store offset=4 + local.get $7 + i32.load offset=4 + local.get $7 + i32.load offset=12 + i32.const 8880 + call $~lib/util/sort/SORT + local.get $1 + local.get $7 + i32.store offset=12 + i32.const 1 + local.set $3 + i32.const 0 + local.set $0 + global.get $~lib/memory/__stack_pointer + global.get $std/array/inputStabArr + local.tee $1 + i32.store + local.get $1 + i32.load offset=12 + local.set $1 + loop $for-loop|012 + local.get $0 + local.get $1 + i32.lt_s + if + block $for-break0 + global.get $~lib/memory/__stack_pointer local.get $7 - i32.gt_s + local.get $0 + call $~lib/array/Array#__get + local.tee $2 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + global.get $std/array/outputStabArr + local.tee $8 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $8 + local.get $0 + call $~lib/array/Array#__get + local.tee $8 + i32.store offset=20 + local.get $2 + i32.load + local.get $8 + i32.load + i32.ne + if (result i32) + i32.const 1 + else + local.get $2 + i32.load offset=4 + local.get $8 + i32.load offset=4 + i32.ne + end if - block $for-break0 - global.get $~lib/memory/__stack_pointer - local.get $10 - local.get $7 - call $~lib/array/Array#__get - local.tee $2 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - global.get $std/array/outputStabArr - local.tee $3 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $3 - local.get $7 - call $~lib/array/Array#__get - local.tee $3 - i32.store offset=20 - local.get $2 - i32.load - local.get $3 - i32.load - i32.ne - if (result i32) - i32.const 1 - else - local.get $2 - i32.load offset=4 - local.get $3 - i32.load offset=4 - i32.ne - end - if - i32.const 0 - local.set $0 - br $for-break0 - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|02 - end + i32.const 0 + local.set $3 + br $for-break0 end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|012 end - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 1552 - i32.const 1042 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 24 - i32.add - global.set $~lib/memory/__stack_pointer - br $__inlined_func$std/array/assertStableSortedForComplexObjects end - i32.const 32064 - i32.const 32112 - i32.const 1 - i32.const 1 + end + local.get $3 + i32.eqz + if + i32.const 0 + i32.const 1552 + i32.const 1042 + i32.const 3 call $~lib/builtins/abort unreachable end global.get $~lib/memory/__stack_pointer + i32.const 24 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer i32.const 64 call $std/array/createRandomOrderedArray local.tee $0 @@ -25106,10 +25081,10 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $0 + local.tee $1 i64.const 0 i64.store - local.get $0 + local.get $1 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -25168,13 +25143,13 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 + local.get $1 local.get $2 i32.store i32.const 0 - local.set $0 + local.set $1 loop $for-loop|0313 - local.get $0 + local.get $1 i32.const 2 i32.lt_s if @@ -25186,17 +25161,17 @@ local.get $3 i32.const 0 i32.const 1 - local.get $0 + local.get $1 i32.sub call $~lib/array/Array#__set local.get $2 - local.get $0 + local.get $1 local.get $3 call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0313 end end @@ -25213,6 +25188,8 @@ i32.const 9040 call $std/array/assertSorted<~lib/array/Array> global.get $~lib/memory/__stack_pointer + i32.const 0 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -25259,20 +25236,20 @@ i32.const 2048 i32.const 0 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $7 i32.store offset=4 local.get $2 - local.get $3 + local.get $7 i32.store - local.get $3 + local.get $7 if local.get $2 - local.get $3 + local.get $7 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $2 - local.get $3 + local.get $7 i32.store offset=4 local.get $2 i32.const 2048 @@ -25287,10 +25264,8 @@ local.get $1 local.get $2 i32.store - i32.const 0 - local.set $1 - loop $for-loop|039 - local.get $1 + loop $for-loop|0314 + local.get $3 i32.const 512 i32.lt_s if @@ -25303,18 +25278,18 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $1 i32.const 0 i32.store - local.get $3 + local.get $1 i32.const 4 i32.const 28 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $1 i32.store - local.get $3 - i32.const 511 local.get $1 + i32.const 511 + local.get $3 i32.sub i32.store global.get $~lib/memory/__stack_pointer @@ -25322,17 +25297,17 @@ i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $1 i32.store offset=4 local.get $2 - local.get $1 local.get $3 - call $~lib/array/Array<~lib/array/Array>#__set local.get $1 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $3 i32.const 1 i32.add - local.set $1 - br $for-loop|039 + local.set $3 + br $for-loop|0314 end end global.get $~lib/memory/__stack_pointer @@ -25361,12 +25336,12 @@ i32.const 31 i32.const 9312 call $~lib/rt/__newArray - local.tee $3 + local.tee $2 i32.store offset=152 i32.const 1 global.set $~argumentsLength i32.const 0 - local.set $2 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -25389,7 +25364,7 @@ unreachable end i32.const 9360 - local.set $2 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 9360 i32.store @@ -25410,7 +25385,7 @@ i32.load offset=4 local.get $0 i32.load offset=12 - local.get $2 + local.get $3 call $~lib/util/sort/SORT global.get $~lib/memory/__stack_pointer local.get $0 @@ -25456,7 +25431,7 @@ global.set $~argumentsLength local.get $8 local.get $9 - local.get $2 + local.get $3 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 @@ -25514,7 +25489,7 @@ local.get $0 i32.load offset=12 local.tee $1 - local.get $3 + local.get $2 i32.load offset=12 i32.ne if @@ -25526,7 +25501,7 @@ br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null> end local.get $0 - local.get $3 + local.get $2 i32.eq if global.get $~lib/memory/__stack_pointer @@ -25537,21 +25512,21 @@ br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null> end i32.const 0 - local.set $2 + local.set $3 loop $for-loop|045 local.get $1 - local.get $2 + local.get $3 i32.gt_s if local.get $0 - local.get $2 + local.get $3 call $~lib/array/Array#__get local.set $7 global.get $~lib/memory/__stack_pointer local.get $7 i32.store - local.get $3 local.get $2 + local.get $3 call $~lib/array/Array#__get local.set $8 global.get $~lib/memory/__stack_pointer @@ -25569,10 +25544,10 @@ i32.const 0 br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null> end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|045 end end @@ -25611,9 +25586,9 @@ local.tee $8 i32.store i32.const 0 - local.set $0 + local.set $1 loop $for-loop|049 - local.get $0 + local.get $1 i32.const 400 i32.lt_s if @@ -25630,24 +25605,22 @@ i32.const 15652 i32.lt_s br_if $folding-inner1 - local.get $0 - local.set $2 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $2 i64.const 0 i64.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 i32.const 9232 local.set $0 - local.get $1 + local.get $2 i32.const 9232 i32.store i32.const 0 - local.set $1 - loop $for-loop|023 - local.get $1 + local.set $2 + loop $for-loop|02 + local.get $2 local.get $9 i32.lt_s if @@ -25676,8 +25649,6 @@ i32.const 15652 i32.lt_s br_if $folding-inner1 - local.get $0 - local.set $3 global.get $~lib/memory/__stack_pointer i32.const 0 i32.store @@ -25694,16 +25665,16 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 9232 - local.set $0 + local.set $3 br $__inlined_func$~lib/string/String#charAt end global.get $~lib/memory/__stack_pointer i32.const 2 i32.const 1 call $~lib/rt/itcms/__new - local.tee $0 + local.tee $3 i32.store - local.get $0 + local.get $3 local.get $11 i32.const 1 i32.shl @@ -25717,19 +25688,19 @@ global.set $~lib/memory/__stack_pointer end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $3 i32.store offset=4 local.get $10 - local.get $3 local.get $0 + local.get $3 call $~lib/string/String.__concat local.tee $0 i32.store - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 - br $for-loop|023 + local.set $2 + br $for-loop|02 end end global.get $~lib/memory/__stack_pointer @@ -25740,13 +25711,13 @@ local.get $0 i32.store offset=4 local.get $8 - local.get $2 + local.get $1 local.get $0 call $~lib/array/Array<~lib/array/Array>#__set - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|049 end end @@ -27747,35 +27718,35 @@ i64.store local.get $1 i32.load offset=4 - local.set $7 + local.set $8 local.get $1 i32.load offset=12 - local.set $8 + local.set $1 i32.const 0 - local.set $2 + local.set $3 i32.const 0 local.set $0 loop $for-loop|0317 local.get $0 - local.get $8 + local.get $1 i32.lt_s if local.get $0 i32.const 2 i32.shl - local.get $7 + local.get $8 i32.add i32.load - local.tee $1 + local.tee $2 if (result i32) - local.get $1 + local.get $2 i32.load offset=12 else i32.const 0 end - local.get $2 + local.get $3 i32.add - local.set $2 + local.set $3 local.get $0 i32.const 1 i32.add @@ -27784,7 +27755,7 @@ end end global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $3 i32.const 2 i32.shl local.tee $0 @@ -27799,7 +27770,7 @@ local.tee $10 i32.store offset=4 local.get $10 - local.get $2 + local.get $3 i32.store offset=12 local.get $10 local.get $0 @@ -27818,23 +27789,23 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end i32.const 0 - local.set $1 + local.set $2 i32.const 0 local.set $0 loop $for-loop|1320 local.get $0 - local.get $8 + local.get $1 i32.lt_s if local.get $0 i32.const 2 i32.shl - local.get $7 + local.get $8 i32.add i32.load local.tee $11 if - local.get $1 + local.get $2 local.get $9 i32.add local.get $11 @@ -27845,10 +27816,10 @@ i32.shl local.tee $11 call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $11 i32.add - local.set $1 + local.set $2 end local.get $0 i32.const 1 @@ -27861,7 +27832,7 @@ local.set $0 loop $for-loop|2323 local.get $0 - local.get $2 + local.get $3 i32.lt_s if local.get $0 @@ -27896,7 +27867,7 @@ i32.const 31 i32.const 14928 call $~lib/rt/__newArray - local.tee $0 + local.tee $1 i32.store offset=148 local.get $10 i32.load offset=12 @@ -27911,22 +27882,22 @@ unreachable end i32.const 0 - local.set $1 + local.set $0 loop $for-loop|8 - local.get $0 - i32.load offset=12 local.get $1 + i32.load offset=12 + local.get $0 i32.gt_s if local.get $10 - local.get $1 + local.get $0 call $~lib/array/Array#__get local.set $2 global.get $~lib/memory/__stack_pointer local.get $2 i32.store - local.get $0 local.get $1 + local.get $0 call $~lib/array/Array#__get local.set $3 global.get $~lib/memory/__stack_pointer @@ -27944,10 +27915,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|8 end end @@ -28368,18 +28339,18 @@ i32.const 16 i32.const 3 call $~lib/rt/itcms/__new - local.tee $1 + local.tee $2 i32.store - local.get $1 + local.get $2 i32.const 0 i32.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=4 - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 i32.const 0 i32.store offset=12 local.get $0 @@ -28402,35 +28373,35 @@ select i32.const 2 i32.shl - local.tee $2 + local.tee $1 i32.const 0 call $~lib/rt/itcms/__new local.tee $3 i32.store offset=4 - local.get $1 + local.get $2 local.get $3 i32.store local.get $3 if - local.get $1 + local.get $2 local.get $3 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $1 + local.get $2 local.get $3 i32.store offset=4 - local.get $1 local.get $2 - i32.store offset=8 local.get $1 + i32.store offset=8 + local.get $2 local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $2 ) (func $std/array/Ref#constructor (param $0 i32) (result i32) (local $1 i32) @@ -28493,38 +28464,38 @@ local.get $0 local.get $1 i32.shl - local.tee $1 + local.tee $5 i32.const 0 call $~lib/rt/itcms/__new - local.set $5 + local.set $1 local.get $3 if - local.get $5 - local.get $3 local.get $1 + local.get $3 + local.get $5 call $~lib/memory/memory.copy end local.get $4 - local.get $5 + local.get $1 i32.store i32.const 16 local.get $2 call $~lib/rt/itcms/__new local.tee $2 - local.get $5 + local.get $1 i32.store - local.get $5 + local.get $1 if local.get $2 - local.get $5 + local.get $1 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $2 - local.get $5 + local.get $1 i32.store offset=4 local.get $2 - local.get $1 + local.get $5 i32.store offset=8 local.get $2 local.get $0 @@ -30128,7 +30099,7 @@ i64.store local.get $0 i32.load offset=4 - local.set $4 + local.set $2 local.get $0 i32.load offset=12 local.set $3 @@ -30142,12 +30113,12 @@ local.get $0 i32.const 2 i32.shl - local.get $4 + local.get $2 i32.add i32.load - local.tee $2 + local.tee $4 if (result i32) - local.get $2 + local.get $4 i32.load offset=12 else i32.const 0 @@ -30175,23 +30146,23 @@ i32.const 16 i32.const 3 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $4 i32.store offset=4 - local.get $2 + local.get $4 local.get $1 i32.store offset=12 - local.get $2 + local.get $4 local.get $0 i32.store offset=8 - local.get $2 + local.get $4 local.get $5 i32.store offset=4 - local.get $2 + local.get $4 local.get $5 i32.store local.get $5 if - local.get $2 + local.get $4 local.get $5 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link @@ -30208,7 +30179,7 @@ local.get $0 i32.const 2 i32.shl - local.get $4 + local.get $2 i32.add i32.load local.tee $6 @@ -30240,7 +30211,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $2 + local.get $4 ) (func $export:~lib/array/Array#get:dataStart (param $0 i32) (result i32) (local $1 i32) @@ -30321,7 +30292,7 @@ i32.store end global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $2 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -30374,26 +30345,26 @@ select i32.const 2 i32.shl - local.tee $4 + local.tee $3 i32.const 0 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $4 i32.store offset=4 local.get $0 - local.get $2 + local.get $4 i32.store - local.get $2 + local.get $4 if local.get $0 - local.get $2 + local.get $4 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $2 + local.get $4 i32.store offset=4 local.get $0 - local.get $4 + local.get $3 i32.store offset=8 local.get $0 local.get $1 @@ -30402,7 +30373,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 local.get $0 i32.store global.get $~lib/memory/__stack_pointer @@ -30513,83 +30484,7 @@ local.get $3 local.get $1 i32.store offset=4 - block $__inlined_func$~lib/array/Array#every (result i32) - local.get $0 - i32.load offset=12 - local.set $3 - loop $for-loop|0 - local.get $3 - local.get $0 - i32.load offset=12 - local.tee $4 - local.get $3 - local.get $4 - i32.lt_s - select - local.get $2 - i32.gt_s - if - local.get $0 - i32.load offset=4 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - i32.const 3 - global.set $~argumentsLength - i32.const 0 - local.get $4 - local.get $2 - local.get $0 - local.get $1 - i32.load - call_indirect $0 (type $i32_i32_i32_=>_i32) - i32.eqz - br_if $__inlined_func$~lib/array/Array#every - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - end - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $export:~lib/array/Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 15652 - i32.lt_s - if - i32.const 32064 - i32.const 32112 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $3 - local.get $0 - i32.store - local.get $3 - local.get $1 - i32.store offset=4 - block $__inlined_func$~lib/array/Array#findIndex (result i32) + block $__inlined_func$~lib/array/Array#every (result i32) local.get $0 i32.load offset=12 local.set $3 @@ -30615,14 +30510,15 @@ local.set $4 i32.const 3 global.set $~argumentsLength - local.get $2 + i32.const 0 local.get $4 local.get $2 local.get $0 local.get $1 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $__inlined_func$~lib/array/Array#findIndex + i32.eqz + br_if $__inlined_func$~lib/array/Array#every drop local.get $2 i32.const 1 @@ -30631,12 +30527,85 @@ br $for-loop|0 end end + i32.const 1 + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $export:~lib/array/Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 15652 + i32.lt_s + if + i32.const 32064 + i32.const 32112 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 + local.get $0 + i32.store + local.get $3 + local.get $1 + i32.store offset=4 + local.get $0 + i32.load offset=12 + local.set $3 + block $__inlined_func$~lib/array/Array#findIndex + loop $for-loop|0 + local.get $3 + local.get $0 + i32.load offset=12 + local.tee $4 + local.get $3 + local.get $4 + i32.lt_s + select + local.get $2 + i32.gt_s + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + i32.load + call_indirect $0 (type $i32_i32_i32_=>_i32) + br_if $__inlined_func$~lib/array/Array#findIndex + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end i32.const -1 + local.set $2 end global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $2 ) (func $export:~lib/array/Array#findLastIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -30663,12 +30632,12 @@ local.get $2 local.get $1 i32.store offset=4 - block $__inlined_func$~lib/array/Array#findLastIndex (result i32) - local.get $0 - i32.load offset=12 - i32.const 1 - i32.sub - local.set $2 + local.get $0 + i32.load offset=12 + i32.const 1 + i32.sub + local.set $2 + block $__inlined_func$~lib/array/Array#findLastIndex loop $for-loop|0 local.get $2 i32.const 0 @@ -30681,18 +30650,14 @@ i32.shl i32.add i32.load - local.set $3 i32.const 3 global.set $~argumentsLength local.get $2 - local.get $3 - local.get $2 local.get $0 local.get $1 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $__inlined_func$~lib/array/Array#findLastIndex - drop local.get $2 i32.const 1 i32.sub @@ -30701,11 +30666,13 @@ end end i32.const -1 + local.set $2 end global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $2 ) (func $export:~lib/array/Array#at (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -32013,7 +31980,6 @@ local.get $0 i32.store local.get $0 - local.tee $1 i32.load offset=4 local.set $2 local.get $0 @@ -32022,8 +31988,6 @@ i32.const 1 i32.gt_u if - i32.const 0 - local.set $0 local.get $4 i32.const 1 i32.shr_u @@ -32033,11 +31997,11 @@ i32.sub local.set $5 loop $while-continue|0 - local.get $0 + local.get $1 local.get $3 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl local.get $2 @@ -32047,7 +32011,7 @@ local.set $4 local.get $6 local.get $5 - local.get $0 + local.get $1 i32.sub i32.const 2 i32.shl @@ -32059,10 +32023,10 @@ local.get $6 local.get $4 i32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|0 end end @@ -32071,7 +32035,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $0 ) (func $export:~lib/array/Array#sort@varargs (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -32271,7 +32235,7 @@ i32.store end global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $2 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -32322,26 +32286,26 @@ i32.const 8 i32.gt_u select - local.tee $4 + local.tee $3 i32.const 0 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $4 i32.store offset=4 local.get $0 - local.get $2 + local.get $4 i32.store - local.get $2 + local.get $4 if local.get $0 - local.get $2 + local.get $4 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $2 + local.get $4 i32.store offset=4 local.get $0 - local.get $4 + local.get $3 i32.store offset=8 local.get $0 local.get $1 @@ -32350,7 +32314,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 local.get $0 i32.store global.get $~lib/memory/__stack_pointer @@ -32507,10 +32471,10 @@ local.get $3 local.get $1 i32.store offset=4 - block $__inlined_func$~lib/array/Array#findIndex (result i32) - local.get $0 - i32.load offset=12 - local.set $3 + local.get $0 + i32.load offset=12 + local.set $3 + block $__inlined_func$~lib/array/Array#findIndex loop $for-loop|0 local.get $3 local.get $0 @@ -32528,18 +32492,14 @@ i32.load offset=4 i32.add i32.load8_u - local.set $4 i32.const 3 global.set $~argumentsLength local.get $2 - local.get $4 - local.get $2 local.get $0 local.get $1 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $__inlined_func$~lib/array/Array#findIndex - drop local.get $2 i32.const 1 i32.add @@ -32548,11 +32508,13 @@ end end i32.const -1 + local.set $2 end global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $2 ) (func $export:~lib/array/Array#findLastIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -32579,12 +32541,12 @@ local.get $2 local.get $1 i32.store offset=4 - block $__inlined_func$~lib/array/Array#findLastIndex (result i32) - local.get $0 - i32.load offset=12 - i32.const 1 - i32.sub - local.set $2 + local.get $0 + i32.load offset=12 + i32.const 1 + i32.sub + local.set $2 + block $__inlined_func$~lib/array/Array#findLastIndex loop $for-loop|0 local.get $2 i32.const 0 @@ -32595,18 +32557,14 @@ i32.load offset=4 i32.add i32.load8_u - local.set $3 i32.const 3 global.set $~argumentsLength local.get $2 - local.get $3 - local.get $2 local.get $0 local.get $1 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $__inlined_func$~lib/array/Array#findLastIndex - drop local.get $2 i32.const 1 i32.sub @@ -32615,11 +32573,13 @@ end end i32.const -1 + local.set $2 end global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $2 ) (func $export:~lib/array/Array#at (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -34935,7 +34895,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -34946,13 +34905,13 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $2 local.get $0 i32.store - local.get $3 + local.get $2 local.get $1 i32.store offset=4 - local.get $3 + local.get $2 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -34965,15 +34924,15 @@ i32.store local.get $0 i32.load offset=12 - local.tee $3 + local.tee $4 local.get $1 i32.load offset=12 i32.const 0 local.get $1 select - local.tee $4 - i32.add local.tee $5 + i32.add + local.tee $2 i32.const 268435455 i32.gt_u if @@ -34985,43 +34944,43 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $2 i32.const 2 i32.const 33 i32.const 0 call $~lib/rt/__newArray - local.tee $6 + local.tee $2 i32.store - local.get $6 + local.get $2 i32.load offset=4 - local.set $5 - local.get $3 + local.set $3 + local.get $4 i32.const 2 i32.shl - local.set $7 + local.set $6 local.get $0 i32.load offset=4 - local.set $3 + local.set $7 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $7 + local.get $6 i32.lt_u if local.get $0 - local.get $5 + local.get $3 i32.add local.get $0 - local.get $3 + local.get $7 i32.add i32.load - local.tee $8 + local.tee $4 i32.store - local.get $8 + local.get $4 if - local.get $6 - local.get $8 + local.get $2 + local.get $4 i32.const 1 call $byn-split-outlined-A$~lib/rt/itcms/__link end @@ -35032,42 +34991,44 @@ br $for-loop|0 end end - local.get $5 - local.get $7 + local.get $3 + local.get $6 i32.add local.set $0 local.get $1 i32.load offset=4 - local.set $1 - local.get $4 + local.set $3 + local.get $5 i32.const 2 i32.shl - local.set $3 + local.set $4 + i32.const 0 + local.set $1 loop $for-loop|1 - local.get $2 - local.get $3 + local.get $1 + local.get $4 i32.lt_u if local.get $0 - local.get $2 + local.get $1 i32.add local.get $1 - local.get $2 + local.get $3 i32.add i32.load - local.tee $4 + local.tee $5 i32.store - local.get $4 + local.get $5 if - local.get $6 - local.get $4 + local.get $2 + local.get $5 i32.const 1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $2 + local.get $1 i32.const 4 i32.add - local.set $2 + local.set $1 br $for-loop|1 end end @@ -35079,7 +35040,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $6 + local.get $2 return end i32.const 32064 @@ -35574,23 +35535,23 @@ i32.load offset=12 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.const 1 call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 - local.tee $2 + local.tee $3 i32.const 4 i32.add - local.get $2 local.get $3 + local.get $2 i32.const 1 i32.sub i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $2 + local.get $3 local.get $1 i32.store local.get $1 @@ -35601,13 +35562,13 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $3 + local.get $2 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $export:~lib/array/Array<~lib/string/String>#slice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -35939,7 +35900,6 @@ local.get $0 i32.store local.get $0 - local.tee $1 i32.load offset=4 local.set $2 local.get $0 @@ -35960,8 +35920,6 @@ i32.const 1 i32.gt_u if - i32.const 0 - local.set $0 local.get $4 i32.const 1 i32.shr_u @@ -35971,12 +35929,12 @@ i32.sub local.set $4 loop $while-continue|0 - local.get $0 + local.get $1 local.get $5 i32.lt_u if global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $1 i32.const 2 i32.shl local.get $2 @@ -35987,7 +35945,7 @@ i32.store local.get $6 local.get $4 - local.get $0 + local.get $1 i32.sub i32.const 2 i32.shl @@ -35999,10 +35957,10 @@ local.get $6 local.get $3 i32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|0 end end @@ -36015,7 +35973,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $0 return end i32.const 32064 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 13d74b7958..9370682b21 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1272,7 +1272,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1287,7 +1287,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1300,7 +1300,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1308,7 +1308,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1319,16 +1319,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1339,16 +1339,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1356,7 +1356,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1364,8 +1364,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1382,7 +1382,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1392,13 +1392,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1411,40 +1411,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -2875,7 +2875,6 @@ end global.get $~lib/memory/__stack_pointer local.tee $0 - local.get $0 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -2884,26 +2883,27 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $0 + local.tee $1 i32.const 0 i32.store - local.get $0 + local.get $1 i32.const 12 i32.const 5 call $~lib/rt/itcms/__new - local.tee $0 + local.tee $1 i32.store global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $1 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 + local.tee $1 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer local.get $0 + local.get $1 i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -2914,7 +2914,7 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 8 @@ -2924,28 +2924,28 @@ i32.const 1632 i32.const 8 call $~lib/memory/memory.copy - local.get $1 + local.get $0 local.get $2 i32.store i32.const 16 i32.const 3 call $~lib/rt/itcms/__new - local.tee $1 + local.tee $0 local.get $2 i32.store local.get $2 if - local.get $1 + local.get $0 local.get $2 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $1 + local.get $0 local.get $2 i32.store offset=4 - local.get $1 + local.get $0 i32.const 8 i32.store offset=8 - local.get $1 + local.get $0 i32.const 2 i32.store offset=12 global.get $~lib/memory/__stack_pointer @@ -2953,7 +2953,7 @@ i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -2964,30 +2964,30 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i32.const 0 i32.store - local.get $1 + local.get $0 i32.const 12 i32.const 9 call $~lib/rt/itcms/__new - local.tee $1 + local.tee $0 i32.store global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $0 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $0 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $1 i32.load local.tee $0 i32.store offset=16 @@ -3260,25 +3260,25 @@ i32.const 1 local.get $1 i32.shl - local.tee $1 + local.tee $2 i32.const 0 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $1 i32.store offset=4 local.get $0 - local.get $2 + local.get $1 i32.store - local.get $2 + local.get $1 if local.get $0 - local.get $2 + local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $2 + local.get $1 i32.store offset=4 local.get $0 - local.get $1 + local.get $2 i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 8 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 63bf8dfbd3..118ca81cc6 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1278,7 +1278,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1293,7 +1293,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1306,7 +1306,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1314,7 +1314,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1325,16 +1325,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1345,16 +1345,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1362,7 +1362,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1370,8 +1370,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1388,7 +1388,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1398,13 +1398,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1417,40 +1417,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -2442,10 +2442,10 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $1 i64.const 0 i64.store - local.get $2 + local.get $1 i32.const 0 i32.store offset=8 memory.size @@ -2480,7 +2480,7 @@ i32.store i32.const 1456 global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $1 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -2500,7 +2500,6 @@ i32.store global.get $~lib/memory/__stack_pointer local.tee $3 - local.get $3 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -2534,19 +2533,19 @@ i32.const 8 i32.const 0 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $2 i32.store offset=4 local.get $0 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 if local.get $0 - local.get $3 + local.get $2 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $3 + local.get $2 i32.store offset=4 local.get $0 i32.const 8 @@ -2555,13 +2554,14 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $3 local.get $0 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $2 + local.get $1 local.get $0 i32.store local.get $0 diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 5dd1102445..923bcd9b13 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -1638,7 +1638,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1653,7 +1653,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1666,7 +1666,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1674,7 +1674,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1685,16 +1685,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1705,16 +1705,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1722,7 +1722,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1730,8 +1730,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1748,7 +1748,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1758,13 +1758,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1777,40 +1777,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -2299,7 +2299,6 @@ return end local.get $0 - local.get $0 i32.load local.get $1 i32.const 1 @@ -2319,6 +2318,7 @@ i32.const 400 i32.div_s local.set $1 + local.get $0 i64.const 86400000 i64.const 0 local.get $0 @@ -2388,7 +2388,6 @@ if return end - local.get $0 local.get $1 local.get $0 i32.load offset=4 @@ -2407,6 +2406,7 @@ i32.const 400 i32.div_s local.set $1 + local.get $0 i64.const 86400000 i64.const 0 local.get $0 @@ -3826,21 +3826,19 @@ (local $6 i32) (local $7 i32) local.get $0 - local.tee $2 - i32.load offset=8 - local.set $0 - local.get $2 i32.load offset=12 local.tee $5 i32.const 1 i32.add - local.tee $4 + local.tee $6 local.get $0 + i32.load offset=8 + local.tee $2 i32.const 2 i32.shr_u i32.gt_u if - local.get $4 + local.get $6 i32.const 268435455 i32.gt_u if @@ -3852,31 +3850,31 @@ unreachable end block $__inlined_func$~lib/rt/itcms/__renew - local.get $0 + local.get $2 i32.const 1 i32.shl - local.tee $0 + local.tee $2 i32.const 1073741820 - local.get $0 + local.get $2 i32.const 1073741820 i32.lt_u select - local.tee $0 - local.get $4 + local.tee $2 + local.get $6 i32.const 8 - local.get $4 + local.get $6 i32.const 8 i32.gt_u select i32.const 2 i32.shl local.tee $3 - local.get $0 + local.get $2 local.get $3 i32.gt_u select - local.tee $6 - local.get $2 + local.tee $4 + local.get $0 i32.load local.tee $3 i32.const 20 @@ -3890,51 +3888,51 @@ i32.le_u if local.get $7 - local.get $6 + local.get $4 i32.store offset=16 local.get $3 - local.set $0 + local.set $2 br $__inlined_func$~lib/rt/itcms/__renew end - local.get $6 + local.get $4 local.get $7 i32.load offset=12 call $~lib/rt/itcms/__new - local.tee $0 + local.tee $2 local.get $3 - local.get $6 + local.get $4 local.get $7 i32.load offset=16 local.tee $7 - local.get $6 + local.get $4 local.get $7 i32.lt_u select call $~lib/memory/memory.copy end - local.get $0 + local.get $2 local.get $3 i32.ne if - local.get $2 local.get $0 - i32.store local.get $2 + i32.store local.get $0 + local.get $2 i32.store offset=4 - local.get $0 + local.get $2 if - local.get $2 local.get $0 + local.get $2 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end end - local.get $2 - local.get $6 + local.get $0 + local.get $4 i32.store offset=8 end - local.get $2 + local.get $0 i32.load offset=4 local.get $5 i32.const 2 @@ -3944,13 +3942,13 @@ i32.store local.get $1 if - local.get $2 + local.get $0 local.get $1 i32.const 1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $2 - local.get $4 + local.get $0 + local.get $6 i32.store offset=12 ) (func $~lib/util/string/strtol (param $0 i32) (result i32) @@ -4237,26 +4235,16 @@ block $~lib/array/Array<~lib/string/String> block $~lib/staticarray/StaticArray<~lib/string/String> block $~lib/date/Date - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/date/Date $~lib/staticarray/StaticArray<~lib/string/String> $~lib/array/Array<~lib/string/String> $folding-inner0 $invalid - end - return + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner0 $~lib/date/Date $~lib/staticarray/StaticArray<~lib/string/String> $~lib/array/Array<~lib/string/String> $folding-inner0 $invalid end return end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end return end return @@ -4297,17 +4285,17 @@ i32.const 2 i32.shl i32.add - local.set $3 + local.set $2 loop $while-continue|01 local.get $1 - local.get $3 + local.get $2 i32.lt_u if local.get $1 i32.load - local.tee $2 + local.tee $3 if - local.get $2 + local.get $3 call $byn-split-outlined-A$~lib/rt/itcms/__visit end local.get $1 @@ -4777,74 +4765,74 @@ i32.const 28 i32.const 4 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $3 i32.const 4560 i32.const 28 call $~lib/memory/memory.copy local.get $1 - local.get $2 + local.get $3 i32.store global.get $~lib/memory/__stack_pointer i32.const 48 i32.const 4 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $2 i32.const 4992 i32.const 48 call $~lib/memory/memory.copy - local.get $3 + local.get $2 i32.store offset=4 local.get $0 i32.load - local.tee $5 + local.tee $4 local.get $0 i32.load offset=4 - local.tee $1 + local.tee $5 i32.const 3 i32.lt_s i32.sub - local.set $4 + local.set $6 i32.const 7 i32.const 0 - local.get $1 + local.get $0 + i32.load offset=8 + local.tee $1 + local.get $5 i32.const 1579 i32.add i32.load8_u - local.get $4 - local.get $4 + local.get $6 + local.get $6 i32.const 3 i32.sub - local.get $4 + local.get $6 i32.const 0 i32.ge_s - local.tee $6 + local.tee $0 select i32.const 4 i32.div_s - local.get $4 - local.get $4 + local.get $6 + local.get $6 i32.const 99 i32.sub - local.get $6 + local.get $0 select i32.const 100 i32.div_s i32.sub - local.get $4 - local.get $4 + local.get $6 + local.get $6 i32.const 399 i32.sub - local.get $6 + local.get $0 select i32.const 400 i32.div_s i32.add - local.get $4 + local.get $6 i32.add i32.add - local.get $0 - i32.load offset=8 - local.tee $4 i32.add i32.const 7 i32.rem_s @@ -4856,11 +4844,11 @@ i32.add local.set $6 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $4 i32.const 31 i32.shr_s local.tee $7 - local.get $5 + local.get $4 local.get $7 i32.add i32.xor @@ -4877,15 +4865,15 @@ call $~lib/string/String#padStart local.tee $0 i32.store offset=16 - local.get $5 + local.get $4 i32.const 0 i32.lt_s if global.get $~lib/memory/__stack_pointer - local.tee $5 + local.tee $4 i32.const 1616 i32.store offset=8 - local.get $5 + local.get $4 i32.const 1616 local.get $0 call $~lib/string/String.__concat @@ -4893,51 +4881,51 @@ i32.store offset=16 end global.get $~lib/memory/__stack_pointer - local.tee $5 + local.tee $4 local.get $6 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load - local.tee $2 + local.tee $3 i32.store offset=32 + local.get $4 local.get $5 - local.get $1 i32.const 1 i32.sub i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load - local.tee $1 + local.tee $2 i32.store offset=36 + local.get $3 local.get $2 - local.get $1 call $~lib/string/String.__concat - local.set $1 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $2 i32.store offset=24 - local.get $4 + local.get $1 call $~lib/number/I32#toString - local.set $2 + local.set $1 global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $1 i32.store offset=32 global.get $~lib/memory/__stack_pointer i32.const 1872 i32.store offset=40 - local.get $2 + local.get $1 i32.const 2 call $~lib/string/String#padStart - local.set $2 + local.set $1 global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store offset=28 local.get $1 + i32.store offset=28 local.get $2 + local.get $1 call $~lib/string/String.__concat local.set $1 global.get $~lib/memory/__stack_pointer @@ -5186,29 +5174,29 @@ i32.const 28 i32.const 4 call $~lib/rt/itcms/__new - local.tee $4 + local.tee $3 i32.const 5616 i32.const 28 call $~lib/memory/memory.copy local.get $1 - local.get $4 + local.get $3 i32.store global.get $~lib/memory/__stack_pointer i32.const 48 i32.const 4 call $~lib/rt/itcms/__new - local.tee $5 + local.tee $4 i32.const 6048 i32.const 48 call $~lib/memory/memory.copy - local.get $5 + local.get $4 i32.store offset=4 local.get $0 i32.load - local.tee $6 + local.tee $5 local.get $0 i32.load offset=4 - local.tee $3 + local.tee $6 i32.const 3 i32.lt_s i32.sub @@ -5218,7 +5206,7 @@ local.get $0 i32.load offset=8 local.tee $7 - local.get $3 + local.get $6 i32.const 1579 i32.add i32.load8_u @@ -5265,11 +5253,11 @@ i32.add local.set $8 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.const 31 i32.shr_s local.tee $9 - local.get $6 + local.get $5 local.get $9 i32.add i32.xor @@ -5286,15 +5274,15 @@ call $~lib/string/String#padStart local.tee $1 i32.store offset=16 - local.get $6 + local.get $5 i32.const 0 i32.lt_s if global.get $~lib/memory/__stack_pointer - local.tee $6 + local.tee $5 i32.const 1616 i32.store offset=8 - local.get $6 + local.get $5 i32.const 1616 local.get $1 call $~lib/string/String.__concat @@ -5305,47 +5293,47 @@ local.get $8 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add i32.load - local.tee $4 + local.tee $3 i32.store offset=80 local.get $7 call $~lib/number/I32#toString - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=88 global.get $~lib/memory/__stack_pointer i32.const 1872 i32.store offset=92 - local.get $6 + local.get $5 i32.const 2 call $~lib/string/String#padStart - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=84 - local.get $4 - local.get $6 + local.get $3 + local.get $5 call $~lib/string/String.__concat - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store offset=72 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $6 i32.const 1 i32.sub i32.const 2 i32.shl - local.get $5 + local.get $4 i32.add i32.load - local.tee $3 + local.tee $4 i32.store offset=76 - local.get $4 local.get $3 + local.get $4 call $~lib/string/String.__concat local.set $3 global.get $~lib/memory/__stack_pointer @@ -5535,13 +5523,13 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $5 + local.tee $4 i64.const 0 i64.store - local.get $5 + local.get $4 i64.const 0 i64.store offset=8 - local.get $5 + local.get $4 i64.const 0 i64.store offset=16 block $folding-inner2 @@ -5577,7 +5565,7 @@ i32.load offset=16 i32.const 1 i32.shr_u - local.set $8 + local.set $4 block $folding-inner0 local.get $1 i32.const 20 @@ -5585,9 +5573,9 @@ i32.load offset=16 i32.const 1 i32.shr_u - local.tee $5 + local.tee $8 if - local.get $8 + local.get $4 i32.eqz if global.get $~lib/memory/__stack_pointer @@ -5607,17 +5595,17 @@ return end else - local.get $8 + local.get $4 i32.eqz br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $4 i32.const 2147483647 - local.get $8 + local.get $4 i32.const 2147483647 i32.ne select - local.tee $2 + local.tee $3 call $~lib/rt/__newArray local.tee $1 i32.store @@ -5627,7 +5615,7 @@ loop $for-loop|0 local.get $2 local.get $3 - i32.gt_s + i32.lt_s if global.get $~lib/memory/__stack_pointer i32.const 2 @@ -5636,14 +5624,14 @@ local.tee $5 i32.store offset=8 local.get $5 - local.get $3 + local.get $2 i32.const 1 i32.shl local.get $0 i32.add i32.load16_u i32.store16 - local.get $3 + local.get $2 i32.const 2 i32.shl local.get $4 @@ -5657,10 +5645,10 @@ i32.const 1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|0 end end @@ -5669,7 +5657,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/rt/__newArray - local.tee $3 + local.tee $5 i32.store offset=12 loop $while-continue|1 local.get $0 @@ -5704,26 +5692,26 @@ i32.add local.get $9 call $~lib/memory/memory.copy - local.get $3 + local.get $5 local.get $7 call $~lib/array/Array<~lib/string/String>#push else global.get $~lib/memory/__stack_pointer i32.const 3456 i32.store offset=20 - local.get $3 + local.get $5 i32.const 3456 call $~lib/array/Array<~lib/string/String>#push end - local.get $4 + local.get $3 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2147483647 i32.eq br_if $folding-inner2 - local.get $5 local.get $6 + local.get $8 i32.add local.set $2 br $while-continue|1 @@ -5732,12 +5720,12 @@ local.get $2 i32.eqz if - local.get $3 + local.get $5 local.get $0 call $~lib/array/Array<~lib/string/String>#push br $folding-inner2 end - local.get $8 + local.get $4 local.get $2 i32.sub local.tee $1 @@ -5751,9 +5739,9 @@ local.tee $1 i32.const 1 call $~lib/rt/itcms/__new - local.tee $4 + local.tee $3 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.const 1 i32.shl @@ -5761,14 +5749,14 @@ i32.add local.get $1 call $~lib/memory/memory.copy + local.get $5 local.get $3 - local.get $4 call $~lib/array/Array<~lib/string/String>#push else global.get $~lib/memory/__stack_pointer i32.const 3456 i32.store offset=20 - local.get $3 + local.get $5 i32.const 3456 call $~lib/array/Array<~lib/string/String>#push end @@ -5776,7 +5764,7 @@ i32.const 24 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $5 return end i32.const 0 @@ -5794,7 +5782,7 @@ i32.const 24 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $5 ) (func $~lib/date/Date.fromString (param $0 i32) (result i32) (local $1 i32) @@ -9617,7 +9605,7 @@ local.get $0 i32.const 2 i32.shl - local.tee $2 + local.tee $1 i32.const 0 call $~lib/rt/itcms/__new local.tee $3 @@ -9625,30 +9613,30 @@ i32.const 16 i32.const 5 call $~lib/rt/itcms/__new - local.tee $1 + local.tee $2 local.get $3 i32.store local.get $3 if - local.get $1 + local.get $2 local.get $3 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $1 + local.get $2 local.get $3 i32.store offset=4 - local.get $1 local.get $2 - i32.store offset=8 local.get $1 + i32.store offset=8 + local.get $2 local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $2 ) (func $~lib/array/Array<~lib/string/String>#__get (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index ada92b44c6..87c52f91c2 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1286,7 +1286,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1301,7 +1301,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1314,7 +1314,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1322,7 +1322,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1333,16 +1333,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1353,16 +1353,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1370,7 +1370,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1378,8 +1378,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1396,7 +1396,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1406,13 +1406,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1425,40 +1425,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -1730,7 +1730,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -1738,7 +1738,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $5 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor @@ -1746,33 +1746,33 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $7 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 + local.set $4 local.get $3 local.set $2 loop $while-continue|0 - local.get $5 + local.get $4 local.get $7 i32.ne if - local.get $5 + local.get $7 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $5 + local.get $7 i32.load8_s local.tee $8 i32.store8 local.get $2 - local.get $5 + local.get $7 i32.load offset=4 i32.store offset=4 local.get $2 @@ -1809,7 +1809,7 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $6 i32.add local.tee $8 i32.load @@ -1822,20 +1822,20 @@ i32.add local.set $2 end - local.get $5 + local.get $7 i32.const 12 i32.add - local.set $5 + local.set $7 br $while-continue|0 end end local.get $0 - local.get $4 + local.get $6 i32.store - local.get $4 + local.get $6 if local.get $0 - local.get $4 + local.get $6 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 @@ -1851,7 +1851,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $6 + local.get $5 i32.store offset=12 local.get $0 local.get $0 @@ -1869,7 +1869,6 @@ local.get $0 i32.load offset=4 local.get $1 - local.tee $2 i32.extend8_s i32.const -1028477379 i32.mul @@ -1909,23 +1908,22 @@ local.get $0 if local.get $0 - local.tee $1 i32.load offset=8 - local.tee $0 + local.tee $2 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $1 + local.get $0 i32.load8_u - local.get $2 + local.get $1 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/map/Map#find - local.get $0 + local.get $2 i32.const -2 i32.and local.set $0 @@ -1933,9 +1931,9 @@ end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.eqz if i32.const 1616 @@ -1945,7 +1943,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=4 ) (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) @@ -2723,11 +2721,11 @@ block $~lib/util/memory/memmove|inlined.0 local.get $2 local.get $6 - local.tee $1 + local.tee $3 i32.eq br_if $~lib/util/memory/memmove|inlined.0 local.get $2 - local.get $1 + local.get $3 i32.sub local.get $7 i32.sub @@ -2738,26 +2736,26 @@ i32.sub i32.le_u if - local.get $1 + local.get $3 local.get $2 local.get $7 call $~lib/util/memory/memcpy br $~lib/util/memory/memmove|inlined.0 end - local.get $1 local.get $2 - i32.lt_u + local.get $3 + i32.gt_u if local.get $2 i32.const 7 i32.and - local.get $1 + local.get $3 i32.const 7 i32.and i32.eq if loop $while-continue|0 - local.get $1 + local.get $3 i32.const 7 i32.and if @@ -2768,18 +2766,18 @@ i32.const 1 i32.sub local.set $7 - local.get $1 - local.tee $3 + local.get $3 + local.tee $4 i32.const 1 i32.add - local.set $1 + local.set $3 local.get $2 - local.tee $4 + local.tee $1 i32.const 1 i32.add local.set $2 - local.get $3 local.get $4 + local.get $1 i32.load8_u i32.store8 br $while-continue|0 @@ -2790,7 +2788,7 @@ i32.const 8 i32.ge_u if - local.get $1 + local.get $3 local.get $2 i64.load i64.store @@ -2798,10 +2796,10 @@ i32.const 8 i32.sub local.set $7 - local.get $1 + local.get $3 i32.const 8 i32.add - local.set $1 + local.set $3 local.get $2 i32.const 8 i32.add @@ -2813,18 +2811,18 @@ loop $while-continue|2 local.get $7 if - local.get $1 - local.tee $3 + local.get $3 + local.tee $4 i32.const 1 i32.add - local.set $1 + local.set $3 local.get $2 - local.tee $4 + local.tee $1 i32.const 1 i32.add local.set $2 - local.get $3 local.get $4 + local.get $1 i32.load8_u i32.store8 local.get $7 @@ -2838,13 +2836,13 @@ local.get $2 i32.const 7 i32.and - local.get $1 + local.get $3 i32.const 7 i32.and i32.eq if loop $while-continue|3 - local.get $1 + local.get $3 local.get $7 i32.add i32.const 7 @@ -2857,7 +2855,7 @@ i32.const 1 i32.sub local.tee $7 - local.get $1 + local.get $3 i32.add local.get $2 local.get $7 @@ -2876,7 +2874,7 @@ i32.const 8 i32.sub local.tee $7 - local.get $1 + local.get $3 i32.add local.get $2 local.get $7 @@ -2894,7 +2892,7 @@ i32.const 1 i32.sub local.tee $7 - local.get $1 + local.get $3 i32.add local.get $2 local.get $7 @@ -3061,7 +3059,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -3069,7 +3067,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $5 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor @@ -3077,33 +3075,33 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $7 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 + local.set $4 local.get $3 local.set $2 loop $while-continue|0 - local.get $5 + local.get $4 local.get $7 i32.ne if - local.get $5 + local.get $7 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $5 + local.get $7 i32.load local.tee $8 i32.store local.get $2 - local.get $5 + local.get $7 i32.load offset=4 i32.store offset=4 local.get $2 @@ -3139,7 +3137,7 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $6 i32.add local.tee $8 i32.load @@ -3152,20 +3150,20 @@ i32.add local.set $2 end - local.get $5 + local.get $7 i32.const 12 i32.add - local.set $5 + local.set $7 br $while-continue|0 end end local.get $0 - local.get $4 + local.get $6 i32.store - local.get $4 + local.get $6 if local.get $0 - local.get $4 + local.get $6 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 @@ -3181,7 +3179,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $6 + local.get $5 i32.store offset=12 local.get $0 local.get $0 @@ -3372,1780 +3370,1765 @@ (local $14 i32) (local $15 i32) (local $16 i32) - (local $17 i32) - (local $18 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub global.set $~lib/memory/__stack_pointer block $folding-inner1 - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $3 - i64.const 0 - i64.store - local.get $3 - i64.const 0 - i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + i32.const 0 + i32.store + local.get $2 + i32.const 24 + i32.const 3 + call $~lib/rt/itcms/__new + local.tee $2 + i32.store + local.get $2 + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + i32.store + local.get $3 + if + local.get $2 local.get $3 - i32.const 0 - i32.store offset=16 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $2 + i32.const 3 + i32.store offset=4 + local.get $2 + i32.const 48 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + i32.store offset=8 + local.get $3 + if + local.get $2 local.get $3 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $2 + i32.const 4 + i32.store offset=12 + local.get $2 + i32.const 0 + i32.store offset=16 + local.get $2 + i32.const 0 + i32.store offset=20 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + local.get $2 + i32.store + loop $for-loop|1 + local.get $1 + i32.extend8_s + i32.const 100 i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $4 - i32.const 0 - i32.store - local.get $4 - i32.const 24 - i32.const 3 - call $~lib/rt/itcms/__new - local.tee $5 - i32.store - local.get $5 - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 - i32.store - local.get $4 - if - local.get $5 - local.get $4 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $5 - i32.const 3 - i32.store offset=4 - local.get $5 - i32.const 48 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 - i32.store offset=8 - local.get $4 if - local.get $5 - local.get $4 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $5 - i32.const 4 - i32.store offset=12 - local.get $5 - i32.const 0 - i32.store offset=16 - local.get $5 - i32.const 0 - i32.store offset=20 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - local.get $5 - i32.store - loop $for-loop|1 local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $1 i32.extend8_s - i32.const 100 - i32.lt_s - if - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.extend8_s - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 - i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 - i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load8_u - local.get $3 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $6 - i32.const -2 - i32.and - local.set $4 - br $while-continue|0 - end - end - i32.const 0 - local.set $4 - end - local.get $4 - if - i32.const 0 - i32.const 1568 - i32.const 6 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $2 - local.get $2 - i32.extend8_s - i32.const 10 - i32.add - call $~lib/map/Map#set - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.extend8_s - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 - i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 - i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find1 - loop $while-continue|02 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load8_u - local.get $3 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find1 - local.get $6 - i32.const -2 + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $1 + i32.const 255 i32.and - local.set $4 - br $while-continue|02 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 end - i32.const 0 - local.set $4 - end - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 8 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - local.get $2 - call $~lib/map/Map#get - local.get $2 - i32.extend8_s - i32.const 10 - i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 9 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 + i32.const 0 + local.set $0 + end + local.get $0 + if + i32.const 0 + i32.const 1568 + i32.const 6 + i32.const 5 + call $~lib/builtins/abort + unreachable end - end - local.get $5 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 11 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $2 - loop $for-loop|3 local.get $2 + local.get $1 + local.get $1 i32.extend8_s - i32.const 100 - i32.lt_s - if - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.extend8_s - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 - i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 - i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find4 - loop $while-continue|05 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load8_u - local.get $3 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find4 - local.get $6 - i32.const -2 - i32.and - local.set $4 - br $while-continue|05 - end - end - i32.const 0 - local.set $4 - end - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 15 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $2 - call $~lib/map/Map#get - local.get $2 - i32.extend8_s - i32.const 10 - i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $2 - local.get $2 - i32.extend8_s - i32.const 20 - i32.add - call $~lib/map/Map#set - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.extend8_s - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 - i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 - i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find7 - loop $while-continue|08 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load8_u - local.get $3 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find7 - local.get $6 - i32.const -2 + local.tee $0 + i32.const 10 + i32.add + call $~lib/map/Map#set + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $0 + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find1 + loop $while-continue|02 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $1 + i32.const 255 i32.and - local.set $4 - br $while-continue|08 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find1 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|02 end - i32.const 0 - local.set $4 - end - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 18 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $2 - call $~lib/map/Map#get - local.get $2 - i32.extend8_s - i32.const 20 - i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 19 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|3 + i32.const 0 + local.set $0 end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 8 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + call $~lib/map/Map#get + local.get $1 + i32.extend8_s + i32.const 10 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 9 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 end - local.get $5 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 21 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $2 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $3 + end + local.get $2 + i32.load offset=20 + i32.const 100 + i32.ne + if i32.const 0 - i32.store - local.get $5 - i32.load offset=8 - local.set $6 - local.get $5 - i32.load offset=16 - local.set $7 - local.get $3 - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 + i32.const 1568 + i32.const 11 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $1 + loop $for-loop|3 + local.get $1 + i32.extend8_s + i32.const 100 i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $4 - i64.const 0 - i64.store - local.get $4 - i32.const 16 - i32.const 4 - call $~lib/rt/itcms/__new - local.tee $4 - i32.store - local.get $4 - i32.const 0 - i32.store - local.get $4 - i32.const 0 - i32.store offset=4 - local.get $4 - i32.const 0 - i32.store offset=8 - local.get $4 - i32.const 0 - i32.store offset=12 - local.get $7 - i32.const 1073741820 - i32.gt_u if - i32.const 1456 - i32.const 1728 - i32.const 70 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.const 8 - local.get $7 - i32.const 8 - i32.gt_u - select - local.tee $8 - i32.const 0 - call $~lib/rt/itcms/__new - local.tee $9 - i32.store offset=4 - local.get $4 - local.get $9 - i32.store - local.get $9 - if - local.get $4 - local.get $9 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $4 - local.get $9 - i32.store offset=4 - local.get $4 - local.get $8 - i32.store offset=8 - local.get $4 - local.get $7 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - local.get $4 - i32.store - loop $for-loop|0 + local.get $2 + i32.load + local.get $2 + i32.load offset=4 local.get $1 - local.get $7 - i32.lt_s - if - local.get $1 - i32.const 12 - i32.mul - local.get $6 - i32.add - local.tee $3 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $4 - local.get $0 - local.get $3 - i32.load8_s - call $~lib/array/Array#__set + i32.extend8_s + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find4 + loop $while-continue|05 local.get $0 - i32.const 1 - i32.add - local.set $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find4 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|05 + end end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 + i32.const 0 + local.set $0 end - end - local.get $4 - local.get $0 - i32.const 0 - i32.const 0 - call $~lib/array/ensureCapacity - local.get $4 - local.get $0 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $2 - local.get $4 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $5 - call $~lib/map/Map#values - local.tee $13 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $1 - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.const 6 - call $~lib/rt/itcms/__new - local.tee $6 - i32.store - local.get $6 - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $1 - i32.store - local.get $1 - if - local.get $6 - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $6 - i32.const 3 - i32.store offset=4 - local.get $6 - i32.const 32 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $1 - i32.store offset=8 - local.get $1 - if - local.get $6 + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 15 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $6 - i32.const 4 - i32.store offset=12 - local.get $6 - i32.const 0 - i32.store offset=16 - local.get $6 - i32.const 0 - i32.store offset=20 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - call $~lib/map/Map#constructor - local.tee $15 - i32.store offset=16 - i32.const 0 - local.set $1 - loop $for-loop|4 - local.get $4 - i32.load offset=12 + call $~lib/map/Map#get local.get $1 - i32.gt_s + i32.extend8_s + i32.const 10 + i32.add + i32.ne if - local.get $4 - i32.load offset=12 - local.get $1 - i32.le_u - if - i32.const 1248 - i32.const 1728 - i32.const 114 - i32.const 42 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $4 - i32.load offset=4 - i32.add - i32.load8_s - local.set $7 - local.get $13 - local.get $1 - call $~lib/array/Array#__get - local.set $14 - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $7 - local.tee $0 - i32.extend8_s - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 + i32.const 0 + i32.const 1568 i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find10 - loop $while-continue|011 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load8_u - local.get $0 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find10 - local.get $3 - i32.const -2 - i32.and - local.set $2 - br $while-continue|011 - end - end - i32.const 0 - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 31 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $14 - i32.const 20 - i32.sub - local.tee $2 - i32.extend8_s - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $0 - i32.const 15 - i32.shr_u - local.get $0 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $0 - i32.const 13 - i32.shr_u - local.get $0 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $0 - i32.const 16 - i32.shr_u - local.get $0 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - block $__inlined_func$~lib/map/Map#find13 - loop $while-continue|014 - local.get $0 - if - local.get $0 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load8_u - local.get $2 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find13 - local.get $3 - i32.const -2 - i32.and - local.set $0 - br $while-continue|014 - end - end - i32.const 0 - local.set $0 - end - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 32 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $6 - local.tee $3 - i32.load - local.get $7 - i32.extend8_s - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $0 - local.get $0 - i32.const 15 - i32.shr_u - i32.xor - i32.const -2048144777 - i32.mul - local.tee $0 - local.get $0 - i32.const 13 - i32.shr_u - i32.xor - i32.const -1028477379 - i32.mul - local.tee $0 - local.get $0 - i32.const 16 - i32.shr_u - i32.xor - local.tee $12 - local.get $3 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|015 - local.get $2 - if - local.get $2 - local.tee $0 - i32.load offset=4 - local.tee $2 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load8_u - local.get $7 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $2 - i32.const -2 - i32.and - local.set $2 - br $while-continue|015 - end - end - i32.const 0 - local.set $0 - end - local.get $0 - if + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + local.get $1 + i32.extend8_s + local.tee $0 + i32.const 20 + i32.add + call $~lib/map/Map#set + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $0 + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find7 + loop $while-continue|08 local.get $0 - local.get $7 - i32.store8 offset=1 - else - local.get $3 - i32.load offset=16 - local.get $3 - i32.load offset=12 - i32.eq if - local.get $3 - local.tee $2 - i32.load offset=20 - local.get $3 - i32.load offset=12 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i32) - local.get $2 - i32.load offset=4 - else - local.get $2 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or - end - local.set $16 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - local.get $16 - i32.const 1 - i32.add - local.tee $0 - i32.const 2 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $8 - i32.store - global.get $~lib/memory/__stack_pointer local.get $0 - i32.const 3 - i32.shl - i32.const 3 - i32.div_s - local.tee $11 - i32.const 3 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $9 - i32.store offset=4 - local.get $2 i32.load offset=8 - local.tee $17 - local.get $2 - i32.load offset=16 - i32.const 3 - i32.shl - i32.add - local.set $10 - local.get $9 - local.set $0 - loop $while-continue|00 - local.get $10 - local.get $17 - i32.ne - if - local.get $17 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $17 - i32.load8_s - local.tee $18 - i32.store8 - local.get $0 - local.get $17 - i32.load8_s offset=1 - i32.store8 offset=1 - local.get $0 - local.get $18 - i32.extend8_s - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $18 - local.get $18 - i32.const 15 - i32.shr_u - i32.xor - i32.const -2048144777 - i32.mul - local.tee $18 - local.get $18 - i32.const 13 - i32.shr_u - i32.xor - i32.const -1028477379 - i32.mul - local.tee $18 - local.get $18 - i32.const 16 - i32.shr_u - i32.xor - local.get $16 - i32.and - i32.const 2 - i32.shl - local.get $8 - i32.add - local.tee $18 - i32.load - i32.store offset=4 - local.get $18 - local.get $0 - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $17 - i32.const 8 - i32.add - local.set $17 - br $while-continue|00 - end - end - local.get $2 - local.get $8 - i32.store - local.get $8 - if - local.get $3 - local.get $8 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $3 - local.get $16 - i32.store offset=4 - local.get $3 - local.get $9 - i32.store offset=8 - local.get $9 - if - local.get $3 - local.get $9 - call $byn-split-outlined-A$~lib/rt/itcms/__link + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq end + br_if $__inlined_func$~lib/map/Map#find7 local.get $3 - local.get $11 - i32.store offset=12 - local.get $3 - local.get $3 - i32.load offset=20 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer + i32.const -2 + i32.and + local.set $0 + br $while-continue|08 end - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.load offset=8 - local.tee $0 - i32.store - local.get $3 - local.get $3 - i32.load offset=16 - local.tee $2 - i32.const 1 - i32.add - i32.store offset=16 - local.get $2 - i32.const 3 - i32.shl - local.get $0 - i32.add - local.tee $0 - local.get $7 - i32.store8 - local.get $0 - local.get $7 - i32.store8 offset=1 - local.get $3 - local.get $3 - i32.load offset=20 - i32.const 1 - i32.add - i32.store offset=20 - local.get $0 - local.get $3 - i32.load - local.get $3 - i32.load offset=4 - local.get $12 - i32.and - i32.const 2 - i32.shl - i32.add - local.tee $2 - i32.load - i32.store offset=4 - local.get $2 - local.get $0 - i32.store end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $15 - local.get $14 - i32.const 20 - i32.sub - local.tee $0 - local.get $0 - call $~lib/map/Map#set - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|4 + i32.const 0 + local.set $0 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 18 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + call $~lib/map/Map#get + local.get $1 + i32.extend8_s + i32.const 20 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 19 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|3 end + end + local.get $2 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 21 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.store + local.get $2 + i32.load offset=8 + local.set $3 + local.get $2 + i32.load offset=16 + local.set $4 + local.get $0 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $5 + i64.const 0 + i64.store + local.get $5 + i32.const 16 + i32.const 4 + call $~lib/rt/itcms/__new + local.tee $12 + i32.store + local.get $12 + i32.const 0 + i32.store + local.get $12 + i32.const 0 + i32.store offset=4 + local.get $12 + i32.const 0 + i32.store offset=8 + local.get $12 + i32.const 0 + i32.store offset=12 + local.get $4 + i32.const 1073741820 + i32.gt_u + if + i32.const 1456 + i32.const 1728 + i32.const 70 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.const 8 + local.get $4 + i32.const 8 + i32.gt_u + select + local.tee $5 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $6 + i32.store offset=4 + local.get $12 + local.get $6 + i32.store + local.get $6 + if + local.get $12 local.get $6 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 36 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $15 - i32.load offset=20 - i32.const 100 - i32.ne + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $12 + local.get $6 + i32.store offset=4 + local.get $12 + local.get $5 + i32.store offset=8 + local.get $12 + local.get $4 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + local.get $12 + i32.store + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $4 + local.get $11 + i32.gt_s if - i32.const 0 - i32.const 1568 - i32.const 37 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $1 - loop $for-loop|6 - local.get $1 - i32.extend8_s - i32.const 50 - i32.lt_s + local.get $11 + i32.const 12 + i32.mul + local.get $3 + i32.add + local.tee $5 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz if + local.get $12 + local.get $0 local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.extend8_s - i32.const -1028477379 - i32.mul - i32.const 374761394 + i32.load8_s + call $~lib/array/Array#__set + local.get $0 + i32.const 1 i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find17 - loop $while-continue|018 - local.get $2 + local.set $0 + end + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|0 + end + end + local.get $12 + local.get $0 + i32.const 0 + i32.const 0 + call $~lib/array/ensureCapacity + local.get $12 + local.get $0 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + local.get $12 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + call $~lib/map/Map#values + local.tee $6 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 24 + i32.const 6 + call $~lib/rt/itcms/__new + local.tee $13 + i32.store + local.get $13 + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + i32.store + local.get $1 + if + local.get $13 + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + i32.const 3 + i32.store offset=4 + local.get $13 + i32.const 32 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + i32.store offset=8 + local.get $1 + if + local.get $13 + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + i32.const 4 + i32.store offset=12 + local.get $13 + i32.const 0 + i32.store offset=16 + local.get $13 + i32.const 0 + i32.store offset=20 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $13 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + call $~lib/map/Map#constructor + local.tee $8 + i32.store offset=16 + i32.const 0 + local.set $11 + loop $for-loop|4 + local.get $12 + i32.load offset=12 + local.get $11 + i32.gt_s + if + local.get $12 + i32.load offset=12 + local.get $11 + i32.le_u + if + i32.const 1248 + i32.const 1728 + i32.const 114 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $11 + local.get $12 + i32.load offset=4 + i32.add + i32.load8_s + local.set $14 + local.get $6 + local.get $11 + call $~lib/array/Array#__get + local.set $7 + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $14 + i32.extend8_s + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find10 + loop $while-continue|011 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $1 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $14 + i32.const 255 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find10 + local.get $1 + i32.const -2 + i32.and + local.set $0 + br $while-continue|011 + end + end + i32.const 0 + local.set $0 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 31 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $7 + i32.const 20 + i32.sub + local.tee $1 + i32.extend8_s + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find13 + loop $while-continue|014 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find13 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|014 + end + end + i32.const 0 + local.set $0 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 32 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $13 + i32.load + local.get $14 + i32.extend8_s + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + i32.const 15 + i32.shr_u + local.get $0 + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + i32.const 13 + i32.shr_u + local.get $0 + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + i32.const 16 + i32.shr_u + local.get $0 + i32.xor + local.tee $5 + local.get $13 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|015 + local.get $0 + if + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $14 + i32.const 255 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.const -2 + i32.and + local.set $0 + br $while-continue|015 + end + end + i32.const 0 + local.set $0 + end + local.get $0 + if + local.get $0 + local.get $14 + i32.store8 offset=1 + else + local.get $13 + i32.load offset=16 + local.get $13 + i32.load offset=12 + i32.eq + if + local.get $13 + i32.load offset=20 + local.get $13 + i32.load offset=12 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i32) + local.get $13 + i32.load offset=4 + else + local.get $13 + i32.load offset=4 + i32.const 1 + i32.shl + i32.const 1 + i32.or + end + local.set $15 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i64.const 0 + i64.store + local.get $0 + local.get $15 + i32.const 1 + i32.add + local.tee $0 + i32.const 2 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $9 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.const 3 + i32.shl + i32.const 3 + i32.div_s + local.tee $4 + i32.const 3 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + i32.store offset=4 + local.get $13 + i32.load offset=8 + local.tee $10 + local.get $13 + i32.load offset=16 + i32.const 3 + i32.shl + i32.add + local.set $3 + local.get $1 + local.set $0 + loop $while-continue|00 + local.get $3 + local.get $10 + i32.ne if - local.get $2 - i32.load offset=8 - local.tee $3 + local.get $10 + i32.load offset=4 i32.const 1 i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load8_u + i32.eqz + if + local.get $0 + local.get $10 + i32.load8_s + local.tee $16 + i32.store8 + local.get $0 + local.get $10 + i32.load8_s offset=1 + i32.store8 offset=1 local.get $0 - i32.const 255 + local.get $16 + i32.extend8_s + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $16 + i32.const 15 + i32.shr_u + local.get $16 + i32.xor + i32.const -2048144777 + i32.mul + local.tee $16 + i32.const 13 + i32.shr_u + local.get $16 + i32.xor + i32.const -1028477379 + i32.mul + local.tee $16 + i32.const 16 + i32.shr_u + local.get $16 + i32.xor + local.get $15 i32.and - i32.eq + i32.const 2 + i32.shl + local.get $9 + i32.add + local.tee $16 + i32.load + i32.store offset=4 + local.get $16 + local.get $0 + i32.store + local.get $0 + i32.const 8 + i32.add + local.set $0 end - br_if $__inlined_func$~lib/map/Map#find17 - local.get $3 - i32.const -2 + local.get $10 + i32.const 8 + i32.add + local.set $10 + br $while-continue|00 + end + end + local.get $13 + local.get $9 + i32.store + local.get $9 + if + local.get $13 + local.get $9 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + local.get $15 + i32.store offset=4 + local.get $13 + local.get $1 + i32.store offset=8 + local.get $1 + if + local.get $13 + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + local.get $4 + i32.store offset=12 + local.get $13 + local.get $13 + i32.load offset=20 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + end + global.get $~lib/memory/__stack_pointer + local.get $13 + i32.load offset=8 + local.tee $0 + i32.store + local.get $13 + local.get $13 + i32.load offset=16 + local.tee $1 + i32.const 1 + i32.add + i32.store offset=16 + local.get $1 + i32.const 3 + i32.shl + local.get $0 + i32.add + local.tee $0 + local.get $14 + i32.store8 + local.get $0 + local.get $14 + i32.store8 offset=1 + local.get $13 + local.get $13 + i32.load offset=20 + i32.const 1 + i32.add + i32.store offset=20 + local.get $0 + local.get $13 + i32.load + local.get $13 + i32.load offset=4 + local.get $5 + i32.and + i32.const 2 + i32.shl + i32.add + local.tee $1 + i32.load + i32.store offset=4 + local.get $1 + local.get $0 + i32.store + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $8 + local.get $7 + i32.const 20 + i32.sub + local.tee $0 + local.get $0 + call $~lib/map/Map#set + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|4 + end + end + local.get $13 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 36 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $8 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 37 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $11 + loop $for-loop|6 + local.get $11 + i32.extend8_s + i32.const 50 + i32.lt_s + if + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 + i32.extend8_s + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find17 + loop $while-continue|018 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $11 + i32.const 255 i32.and - local.set $2 - br $while-continue|018 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find17 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|018 end - i32.const 0 - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $1 - call $~lib/map/Map#get - local.get $1 - i32.extend8_s - i32.const 20 - i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 42 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - local.get $1 - call $~lib/map/Map#delete - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.extend8_s - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find20 - loop $while-continue|021 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 + i32.const 0 + local.set $1 + end + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 41 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + call $~lib/map/Map#get + local.get $11 + i32.extend8_s + i32.const 20 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 42 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + call $~lib/map/Map#delete + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 + i32.extend8_s + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find20 + loop $while-continue|021 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $11 + i32.const 255 i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load8_u - local.get $0 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find20 - local.get $3 - i32.const -2 + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find20 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|021 + end + end + i32.const 0 + local.set $1 + end + local.get $1 + if + i32.const 0 + i32.const 1568 + i32.const 44 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|6 + end + end + local.get $2 + i32.load offset=20 + i32.const 50 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 46 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $11 + loop $for-loop|8 + local.get $11 + i32.extend8_s + i32.const 50 + i32.lt_s + if + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 + i32.extend8_s + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find23 + loop $while-continue|024 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $11 + i32.const 255 i32.and - local.set $2 - br $while-continue|021 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find23 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|024 end - i32.const 0 - local.set $2 - end - local.get $2 - if - i32.const 0 - i32.const 1568 - i32.const 44 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $1 - i32.const 1 - i32.add + i32.const 0 local.set $1 - br $for-loop|6 end - end - local.get $5 - i32.load offset=20 - i32.const 50 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 46 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $1 - loop $for-loop|8 local.get $1 - i32.extend8_s - i32.const 50 - i32.lt_s if - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.extend8_s - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find23 - loop $while-continue|024 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load8_u - local.get $0 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find23 - local.get $3 - i32.const -2 - i32.and - local.set $2 - br $while-continue|024 - end - end - i32.const 0 - local.set $2 - end - local.get $2 - if - i32.const 0 - i32.const 1568 - i32.const 50 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $1 - local.get $1 - i32.extend8_s - i32.const 10 - i32.add - call $~lib/map/Map#set - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.extend8_s - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find26 - loop $while-continue|027 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load8_u - local.get $0 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find26 - local.get $3 - i32.const -2 + i32.const 0 + i32.const 1568 + i32.const 50 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + local.get $11 + i32.extend8_s + local.tee $0 + i32.const 10 + i32.add + call $~lib/map/Map#set + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $0 + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find26 + loop $while-continue|027 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $11 + i32.const 255 i32.and - local.set $2 - br $while-continue|027 + i32.eq end - end - i32.const 0 - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 52 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $1 - call $~lib/map/Map#delete - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.extend8_s - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find29 - loop $while-continue|030 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load8_u - local.get $0 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find29 - local.get $3 - i32.const -2 + br_if $__inlined_func$~lib/map/Map#find26 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|027 + end + end + i32.const 0 + local.set $1 + end + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 52 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + call $~lib/map/Map#delete + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 + i32.extend8_s + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find29 + loop $while-continue|030 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $11 + i32.const 255 i32.and - local.set $2 - br $while-continue|030 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find29 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|030 end - i32.const 0 - local.set $2 - end - local.get $2 - if - i32.const 0 - i32.const 1568 - i32.const 54 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $1 - i32.const 1 - i32.add + i32.const 0 local.set $1 - br $for-loop|8 end + local.get $1 + if + i32.const 0 + i32.const 1568 + i32.const 54 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|8 end - local.get $5 - i32.load offset=20 - i32.const 50 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 56 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $5 - call $~lib/map/Map#clear - local.get $5 - i32.load offset=20 - if - i32.const 0 - i32.const 1568 - i32.const 60 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - return end + local.get $2 + i32.load offset=20 + i32.const 50 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 56 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + call $~lib/map/Map#clear + local.get $2 + i32.load offset=20 + if + i32.const 0 + i32.const 1568 + i32.const 60 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + return end i32.const 18432 i32.const 18480 @@ -5189,7 +5172,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -5197,7 +5180,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $5 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor @@ -5205,33 +5188,33 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $7 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 + local.set $4 local.get $3 local.set $2 loop $while-continue|0 - local.get $5 + local.get $4 local.get $7 i32.ne if - local.get $5 + local.get $7 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $5 + local.get $7 i32.load8_u local.tee $8 i32.store8 local.get $2 - local.get $5 + local.get $7 i32.load offset=4 i32.store offset=4 local.get $2 @@ -5267,7 +5250,7 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $6 i32.add local.tee $8 i32.load @@ -5280,20 +5263,20 @@ i32.add local.set $2 end - local.get $5 + local.get $7 i32.const 12 i32.add - local.set $5 + local.set $7 br $while-continue|0 end end local.get $0 - local.get $4 + local.get $6 i32.store - local.get $4 + local.get $6 if local.get $0 - local.get $4 + local.get $6 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 @@ -5309,7 +5292,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $6 + local.get $5 i32.store offset=12 local.get $0 local.get $0 @@ -5327,7 +5310,6 @@ local.get $0 i32.load offset=4 local.get $1 - local.tee $2 i32.const 255 i32.and i32.const -1028477379 @@ -5368,23 +5350,22 @@ local.get $0 if local.get $0 - local.tee $1 i32.load offset=8 - local.tee $0 + local.tee $2 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $1 + local.get $0 i32.load8_u - local.get $2 + local.get $1 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/map/Map#find - local.get $0 + local.get $2 i32.const -2 i32.and local.set $0 @@ -5392,9 +5373,9 @@ end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.eqz if i32.const 1616 @@ -5404,7 +5385,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=4 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) @@ -5551,1802 +5532,1776 @@ (local $14 i32) (local $15 i32) (local $16 i32) - (local $17 i32) - (local $18 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub global.set $~lib/memory/__stack_pointer block $folding-inner1 - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $3 - i64.const 0 - i64.store - local.get $3 - i64.const 0 - i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + i32.const 0 + i32.store + local.get $2 + i32.const 24 + i32.const 8 + call $~lib/rt/itcms/__new + local.tee $2 + i32.store + local.get $2 + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + i32.store + local.get $3 + if + local.get $2 local.get $3 - i32.const 0 - i32.store offset=16 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $2 + i32.const 3 + i32.store offset=4 + local.get $2 + i32.const 48 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + i32.store offset=8 + local.get $3 + if + local.get $2 local.get $3 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $4 - i32.const 0 - i32.store - local.get $4 - i32.const 24 - i32.const 8 - call $~lib/rt/itcms/__new - local.tee $5 - i32.store - local.get $5 - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 - i32.store - local.get $4 - if - local.get $5 - local.get $4 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $5 - i32.const 3 - i32.store offset=4 - local.get $5 - i32.const 48 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 - i32.store offset=8 - local.get $4 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $2 + i32.const 4 + i32.store offset=12 + local.get $2 + i32.const 0 + i32.store offset=16 + local.get $2 + i32.const 0 + i32.store offset=20 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + local.get $2 + i32.store + loop $for-loop|1 + local.get $1 + i32.const 255 + i32.and + i32.const 100 + i32.lt_u if - local.get $5 - local.get $4 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $5 - i32.const 4 - i32.store offset=12 - local.get $5 - i32.const 0 - i32.store offset=16 - local.get $5 - i32.const 0 - i32.store offset=20 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - local.get $5 - i32.store - loop $for-loop|1 local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $1 i32.const 255 i32.and - i32.const 100 - i32.lt_u - if - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.const 255 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 - i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 - i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load8_u - local.get $3 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $6 - i32.const -2 + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $1 + i32.const 255 i32.and - local.set $4 - br $while-continue|0 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 end - i32.const 0 - local.set $4 - end - local.get $4 - if - i32.const 0 - i32.const 1568 - i32.const 6 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - local.get $2 - local.get $2 - i32.const 255 - i32.and - i32.const 10 - i32.add - call $~lib/map/Map#set - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.const 255 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 - i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 - i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find1 - loop $while-continue|02 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load8_u - local.get $3 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find1 - local.get $6 - i32.const -2 + i32.const 0 + local.set $0 + end + local.get $0 + if + i32.const 0 + i32.const 1568 + i32.const 6 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + local.get $1 + i32.const 255 + i32.and + local.tee $0 + i32.const 10 + i32.add + call $~lib/map/Map#set + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $0 + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find1 + loop $while-continue|02 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $1 + i32.const 255 i32.and - local.set $4 - br $while-continue|02 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find1 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|02 end - i32.const 0 - local.set $4 - end - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 8 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $2 - call $~lib/map/Map#get - local.get $2 - i32.const 255 - i32.and - i32.const 10 - i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 9 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 + i32.const 0 + local.set $0 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 8 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + call $~lib/map/Map#get + local.get $1 + i32.const 255 + i32.and + i32.const 10 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 9 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 end - local.get $5 - i32.load offset=20 + end + local.get $2 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 11 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $1 + loop $for-loop|3 + local.get $1 + i32.const 255 + i32.and i32.const 100 - i32.ne + i32.lt_u if - i32.const 0 - i32.const 1568 - i32.const 11 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $2 - loop $for-loop|3 local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $1 i32.const 255 i32.and - i32.const 100 - i32.lt_u - if - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.const 255 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 - i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 - i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find4 - loop $while-continue|05 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load8_u - local.get $3 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find4 - local.get $6 - i32.const -2 - i32.and - local.set $4 - br $while-continue|05 - end - end - i32.const 0 - local.set $4 - end - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 15 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $2 - call $~lib/map/Map#get - local.get $2 - i32.const 255 - i32.and - i32.const 10 - i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $2 - local.get $2 - i32.const 255 - i32.and - i32.const 20 - i32.add - call $~lib/map/Map#set - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.const 255 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find4 + loop $while-continue|05 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find4 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|05 + end + end + i32.const 0 + local.set $0 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + call $~lib/map/Map#get + local.get $1 + i32.const 255 + i32.and + i32.const 10 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find7 - loop $while-continue|08 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load8_u - local.get $3 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find7 - local.get $6 - i32.const -2 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + local.get $1 + i32.const 255 + i32.and + local.tee $0 + i32.const 20 + i32.add + call $~lib/map/Map#set + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $0 + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find7 + loop $while-continue|08 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $1 + i32.const 255 i32.and - local.set $4 - br $while-continue|08 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find7 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|08 end - i32.const 0 - local.set $4 - end - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 18 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $2 - call $~lib/map/Map#get - local.get $2 - i32.const 255 - i32.and - i32.const 20 - i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 19 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|3 + i32.const 0 + local.set $0 end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 18 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + call $~lib/map/Map#get + local.get $1 + i32.const 255 + i32.and + i32.const 20 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 19 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|3 end - local.get $5 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 21 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $2 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $3 - i32.const 0 - i32.store - local.get $5 - i32.load offset=8 - local.set $6 - local.get $5 - i32.load offset=16 - local.set $7 - local.get $3 - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $4 - i64.const 0 - i64.store - local.get $4 - i32.const 16 - i32.const 9 - call $~lib/rt/itcms/__new - local.tee $4 - i32.store - local.get $4 - i32.const 0 - i32.store - local.get $4 - i32.const 0 - i32.store offset=4 - local.get $4 - i32.const 0 - i32.store offset=8 - local.get $4 - i32.const 0 - i32.store offset=12 - local.get $7 - i32.const 1073741820 - i32.gt_u - if - i32.const 1456 - i32.const 1728 - i32.const 70 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.const 8 - local.get $7 - i32.const 8 - i32.gt_u - select - local.tee $8 + end + local.get $2 + i32.load offset=20 + i32.const 100 + i32.ne + if i32.const 0 - call $~lib/rt/itcms/__new - local.tee $9 - i32.store offset=4 + i32.const 1568 + i32.const 21 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.store + local.get $2 + i32.load offset=8 + local.set $3 + local.get $2 + i32.load offset=16 + local.set $4 + local.get $0 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $5 + i64.const 0 + i64.store + local.get $5 + i32.const 16 + i32.const 9 + call $~lib/rt/itcms/__new + local.tee $12 + i32.store + local.get $12 + i32.const 0 + i32.store + local.get $12 + i32.const 0 + i32.store offset=4 + local.get $12 + i32.const 0 + i32.store offset=8 + local.get $12 + i32.const 0 + i32.store offset=12 + local.get $4 + i32.const 1073741820 + i32.gt_u + if + i32.const 1456 + i32.const 1728 + i32.const 70 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.const 8 + local.get $4 + i32.const 8 + i32.gt_u + select + local.tee $5 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $6 + i32.store offset=4 + local.get $12 + local.get $6 + i32.store + local.get $6 + if + local.get $12 + local.get $6 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $12 + local.get $6 + i32.store offset=4 + local.get $12 + local.get $5 + i32.store offset=8 + local.get $12 + local.get $4 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + local.get $12 + i32.store + i32.const 0 + local.set $0 + loop $for-loop|0 local.get $4 - local.get $9 - i32.store - local.get $9 + local.get $11 + i32.gt_s if - local.get $4 - local.get $9 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $4 - local.get $9 - i32.store offset=4 - local.get $4 - local.get $8 - i32.store offset=8 - local.get $4 - local.get $7 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - local.get $4 - i32.store - loop $for-loop|0 - local.get $1 - local.get $7 - i32.lt_s + local.get $11 + i32.const 12 + i32.mul + local.get $3 + i32.add + local.tee $5 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz if - local.get $1 - i32.const 12 - i32.mul - local.get $6 - i32.add - local.tee $3 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $4 - local.get $0 - local.get $3 - i32.load8_u - call $~lib/array/Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - end - local.get $1 + local.get $12 + local.get $0 + local.get $5 + i32.load8_u + call $~lib/array/Array#__set + local.get $0 i32.const 1 i32.add - local.set $1 - br $for-loop|0 + local.set $0 end + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|0 end - local.get $4 - local.get $0 - i32.const 0 - i32.const 0 - call $~lib/array/ensureCapacity - local.get $4 - local.get $0 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $2 - local.get $4 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $5 - call $~lib/map/Map#values - local.tee $13 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $1 - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.const 10 - call $~lib/rt/itcms/__new - local.tee $6 - i32.store - local.get $6 - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $1 - i32.store + end + local.get $12 + local.get $0 + i32.const 0 + i32.const 0 + call $~lib/array/ensureCapacity + local.get $12 + local.get $0 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + local.get $12 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + call $~lib/map/Map#values + local.tee $6 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 24 + i32.const 10 + call $~lib/rt/itcms/__new + local.tee $13 + i32.store + local.get $13 + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + i32.store + local.get $1 + if + local.get $13 local.get $1 - if - local.get $6 - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $6 - i32.const 3 - i32.store offset=4 - local.get $6 - i32.const 32 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $1 - i32.store offset=8 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + i32.const 3 + i32.store offset=4 + local.get $13 + i32.const 32 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + i32.store offset=8 + local.get $1 + if + local.get $13 local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + i32.const 4 + i32.store offset=12 + local.get $13 + i32.const 0 + i32.store offset=16 + local.get $13 + i32.const 0 + i32.store offset=20 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $13 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + call $~lib/map/Map#constructor + local.tee $8 + i32.store offset=16 + i32.const 0 + local.set $11 + loop $for-loop|4 + local.get $12 + i32.load offset=12 + local.get $11 + i32.gt_s if - local.get $6 - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $6 - i32.const 4 - i32.store offset=12 - local.get $6 - i32.const 0 - i32.store offset=16 - local.get $6 - i32.const 0 - i32.store offset=20 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - call $~lib/map/Map#constructor - local.tee $15 - i32.store offset=16 - i32.const 0 - local.set $1 - loop $for-loop|4 - local.get $4 + local.get $12 i32.load offset=12 - local.get $1 - i32.gt_s + local.get $11 + i32.le_u if - local.get $4 - i32.load offset=12 - local.get $1 - i32.le_u - if - i32.const 1248 - i32.const 1728 - i32.const 114 - i32.const 42 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $4 - i32.load offset=4 - i32.add - i32.load8_u - local.set $7 - local.get $13 - local.get $1 - call $~lib/array/Array#__get - local.set $14 - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $7 - local.tee $0 - i32.const 255 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find10 - loop $while-continue|011 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load8_u - local.get $0 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find10 - local.get $3 - i32.const -2 - i32.and - local.set $2 - br $while-continue|011 + i32.const 1248 + i32.const 1728 + i32.const 114 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $11 + local.get $12 + i32.load offset=4 + i32.add + i32.load8_u + local.set $14 + local.get $6 + local.get $11 + call $~lib/array/Array#__get + local.set $7 + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $14 + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find10 + loop $while-continue|011 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $1 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $14 + local.get $0 + i32.load8_u + i32.eq end + br_if $__inlined_func$~lib/map/Map#find10 + local.get $1 + i32.const -2 + i32.and + local.set $0 + br $while-continue|011 end - i32.const 0 - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 31 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $14 - i32.const 20 - i32.sub - local.tee $2 - i32.const 255 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $0 - i32.const 15 - i32.shr_u - local.get $0 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $0 - i32.const 13 - i32.shr_u - local.get $0 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $0 - i32.const 16 - i32.shr_u - local.get $0 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load + i32.const 0 local.set $0 - block $__inlined_func$~lib/map/Map#find13 - loop $while-continue|014 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 31 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $7 + i32.const 20 + i32.sub + local.tee $1 + i32.const 255 + i32.and + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find13 + loop $while-continue|014 + local.get $0 + if local.get $0 - if + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else local.get $0 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load8_u - local.get $2 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find13 - local.get $3 - i32.const -2 + i32.load8_u + local.get $1 + i32.const 255 i32.and - local.set $0 - br $while-continue|014 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find13 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|014 end - i32.const 0 - local.set $0 - end - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 32 - i32.const 5 - call $~lib/builtins/abort - unreachable end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store - local.get $6 - local.tee $3 - i32.load - local.get $7 - i32.const 255 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $0 - local.get $0 - i32.const 15 - i32.shr_u - i32.xor - i32.const -2048144777 - i32.mul - local.tee $0 - local.get $0 - i32.const 13 - i32.shr_u - i32.xor - i32.const -1028477379 - i32.mul - local.tee $0 - local.get $0 - i32.const 16 - i32.shr_u - i32.xor - local.tee $12 - local.get $3 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|015 - local.get $2 - if - local.get $2 - local.tee $0 - i32.load offset=4 - local.tee $2 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load8_u - local.get $7 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $2 - i32.const -2 - i32.and - local.set $2 - br $while-continue|015 - end - end - i32.const 0 - local.set $0 - end - local.get $0 - if + local.set $0 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 32 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $13 + i32.load + local.get $14 + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + i32.const 15 + i32.shr_u + local.get $0 + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + i32.const 13 + i32.shr_u + local.get $0 + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + i32.const 16 + i32.shr_u + local.get $0 + i32.xor + local.tee $5 + local.get $13 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|015 local.get $0 - local.get $7 - i32.store8 offset=1 - else - local.get $3 - i32.load offset=16 - local.get $3 - i32.load offset=12 - i32.eq if - local.get $3 - local.tee $2 - i32.load offset=20 - local.get $3 - i32.load offset=12 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i32) - local.get $2 - i32.load offset=4 - else - local.get $2 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or - end - local.set $16 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store local.get $0 - local.get $16 + i32.load offset=4 + local.tee $1 i32.const 1 - i32.add - local.tee $0 - i32.const 2 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $8 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.const 3 - i32.shl - i32.const 3 - i32.div_s - local.tee $11 - i32.const 3 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $9 - i32.store offset=4 - local.get $2 - i32.load offset=8 - local.tee $17 - local.get $2 - i32.load offset=16 - i32.const 3 - i32.shl - i32.add - local.set $10 - local.get $9 - local.set $0 - loop $while-continue|00 - local.get $10 - local.get $17 - i32.ne - if - local.get $17 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $17 - i32.load8_u - local.tee $18 - i32.store8 - local.get $0 - local.get $17 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - local.get $18 - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $18 - local.get $18 - i32.const 15 - i32.shr_u - i32.xor - i32.const -2048144777 - i32.mul - local.tee $18 - local.get $18 - i32.const 13 - i32.shr_u - i32.xor - i32.const -1028477379 - i32.mul - local.tee $18 - local.get $18 - i32.const 16 - i32.shr_u - i32.xor - local.get $16 - i32.and - i32.const 2 - i32.shl - local.get $8 - i32.add - local.tee $18 - i32.load - i32.store offset=4 - local.get $18 - local.get $0 - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $17 - i32.const 8 - i32.add - local.set $17 - br $while-continue|00 - end - end - local.get $2 - local.get $8 - i32.store - local.get $8 - if - local.get $3 - local.get $8 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $3 - local.get $16 - i32.store offset=4 - local.get $3 - local.get $9 - i32.store offset=8 - local.get $9 - if - local.get $3 - local.get $9 - call $byn-split-outlined-A$~lib/rt/itcms/__link + i32.and + if (result i32) + i32.const 0 + else + local.get $14 + local.get $0 + i32.load8_u + i32.eq end - local.get $3 - local.get $11 - i32.store offset=12 - local.get $3 - local.get $3 - i32.load offset=20 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.const -2 + i32.and + local.set $0 + br $while-continue|015 end - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.load offset=8 - local.tee $0 - i32.store - local.get $3 - local.get $3 - i32.load offset=16 - local.tee $2 - i32.const 1 - i32.add - i32.store offset=16 - local.get $2 + end + i32.const 0 + local.set $0 + end + local.get $0 + if + local.get $0 + local.get $14 + i32.store8 offset=1 + else + local.get $13 + i32.load offset=16 + local.get $13 + i32.load offset=12 + i32.eq + if + local.get $13 + i32.load offset=20 + local.get $13 + i32.load offset=12 i32.const 3 - i32.shl - local.get $0 - i32.add + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i32) + local.get $13 + i32.load offset=4 + else + local.get $13 + i32.load offset=4 + i32.const 1 + i32.shl + i32.const 1 + i32.or + end + local.set $15 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer local.tee $0 - local.get $7 - i32.store8 + i64.const 0 + i64.store local.get $0 - local.get $7 - i32.store8 offset=1 - local.get $3 - local.get $3 - i32.load offset=20 + local.get $15 i32.const 1 i32.add - i32.store offset=20 - local.get $0 - local.get $3 - i32.load - local.get $3 - i32.load offset=4 - local.get $12 - i32.and + local.tee $0 i32.const 2 i32.shl - i32.add - local.tee $2 - i32.load - i32.store offset=4 - local.get $2 - local.get $0 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $9 i32.store - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $15 - local.get $14 - i32.const 20 - i32.sub - local.tee $0 - local.get $0 - call $~lib/map/Map#set - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|4 - end - end - local.get $6 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 36 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $15 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 37 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $1 - loop $for-loop|6 - local.get $1 - i32.const 255 - i32.and - i32.const 50 - i32.lt_u - if - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.const 255 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find17 - loop $while-continue|018 - local.get $2 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.const 3 + i32.shl + i32.const 3 + i32.div_s + local.tee $4 + i32.const 3 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + i32.store offset=4 + local.get $13 + i32.load offset=8 + local.tee $10 + local.get $13 + i32.load offset=16 + i32.const 3 + i32.shl + i32.add + local.set $3 + local.get $1 + local.set $0 + loop $while-continue|00 + local.get $3 + local.get $10 + i32.ne if - local.get $2 - i32.load offset=8 - local.tee $3 + local.get $10 + i32.load offset=4 i32.const 1 i32.and - if (result i32) - i32.const 0 - else - local.get $2 + i32.eqz + if + local.get $0 + local.get $10 i32.load8_u + local.tee $16 + i32.store8 local.get $0 - i32.const 255 + local.get $10 + i32.load8_u offset=1 + i32.store8 offset=1 + local.get $0 + local.get $16 + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $16 + i32.const 15 + i32.shr_u + local.get $16 + i32.xor + i32.const -2048144777 + i32.mul + local.tee $16 + i32.const 13 + i32.shr_u + local.get $16 + i32.xor + i32.const -1028477379 + i32.mul + local.tee $16 + i32.const 16 + i32.shr_u + local.get $16 + i32.xor + local.get $15 i32.and - i32.eq + i32.const 2 + i32.shl + local.get $9 + i32.add + local.tee $16 + i32.load + i32.store offset=4 + local.get $16 + local.get $0 + i32.store + local.get $0 + i32.const 8 + i32.add + local.set $0 end - br_if $__inlined_func$~lib/map/Map#find17 - local.get $3 - i32.const -2 - i32.and - local.set $2 - br $while-continue|018 + local.get $10 + i32.const 8 + i32.add + local.set $10 + br $while-continue|00 end end - i32.const 0 - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $13 + local.get $9 + i32.store + local.get $9 + if + local.get $13 + local.get $9 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + local.get $15 + i32.store offset=4 + local.get $13 + local.get $1 + i32.store offset=8 + local.get $1 + if + local.get $13 + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + local.get $4 + i32.store offset=12 + local.get $13 + local.get $13 + i32.load offset=20 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer end - local.get $5 - local.get $1 - call $~lib/map/Map#get - local.get $1 - i32.const 255 - i32.and - i32.const 20 + global.get $~lib/memory/__stack_pointer + local.get $13 + i32.load offset=8 + local.tee $0 + i32.store + local.get $13 + local.get $13 + i32.load offset=16 + local.tee $1 + i32.const 1 i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 42 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $1 - call $~lib/map/Map#delete - local.get $5 - i32.load - local.get $5 - i32.load offset=4 + i32.store offset=16 local.get $1 + i32.const 3 + i32.shl + local.get $0 + i32.add local.tee $0 - i32.const 255 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761394 + local.get $14 + i32.store8 + local.get $0 + local.get $14 + i32.store8 offset=1 + local.get $13 + local.get $13 + i32.load offset=20 + i32.const 1 i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor + i32.store offset=20 + local.get $0 + local.get $13 + i32.load + local.get $13 + i32.load offset=4 + local.get $5 i32.and i32.const 2 i32.shl i32.add + local.tee $1 i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find20 - loop $while-continue|021 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 + i32.store offset=4 + local.get $1 + local.get $0 + i32.store + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $8 + local.get $7 + i32.const 20 + i32.sub + local.tee $0 + local.get $0 + call $~lib/map/Map#set + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|4 + end + end + local.get $13 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 36 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $8 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 37 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $11 + loop $for-loop|6 + local.get $11 + i32.const 255 + i32.and + i32.const 50 + i32.lt_u + if + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 + i32.const 255 + i32.and + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find17 + loop $while-continue|018 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $11 + i32.const 255 i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load8_u - local.get $0 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find20 - local.get $3 - i32.const -2 + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find17 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|018 + end + end + i32.const 0 + local.set $1 + end + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 41 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + call $~lib/map/Map#get + local.get $11 + i32.const 255 + i32.and + i32.const 20 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 42 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + call $~lib/map/Map#delete + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 + i32.const 255 + i32.and + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find20 + loop $while-continue|021 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $11 + i32.const 255 i32.and - local.set $2 - br $while-continue|021 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find20 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|021 end - i32.const 0 - local.set $2 - end - local.get $2 - if - i32.const 0 - i32.const 1568 - i32.const 44 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $1 - i32.const 1 - i32.add + i32.const 0 local.set $1 - br $for-loop|6 end + local.get $1 + if + i32.const 0 + i32.const 1568 + i32.const 44 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|6 end - local.get $5 - i32.load offset=20 + end + local.get $2 + i32.load offset=20 + i32.const 50 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 46 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $11 + loop $for-loop|8 + local.get $11 + i32.const 255 + i32.and i32.const 50 - i32.ne + i32.lt_u if - i32.const 0 - i32.const 1568 - i32.const 46 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $1 - loop $for-loop|8 - local.get $1 + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 i32.const 255 i32.and - i32.const 50 - i32.lt_u - if - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.const 255 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find23 - loop $while-continue|024 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load8_u - local.get $0 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find23 - local.get $3 - i32.const -2 - i32.and - local.set $2 - br $while-continue|024 - end - end - i32.const 0 - local.set $2 - end - local.get $2 - if - i32.const 0 - i32.const 1568 - i32.const 50 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $1 - local.get $1 - i32.const 255 - i32.and - i32.const 10 - i32.add - call $~lib/map/Map#set - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.const 255 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find26 - loop $while-continue|027 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load8_u - local.get $0 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find26 - local.get $3 - i32.const -2 + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find23 + loop $while-continue|024 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $11 + i32.const 255 i32.and - local.set $2 - br $while-continue|027 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find23 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|024 end - i32.const 0 - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 52 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - local.get $1 - call $~lib/map/Map#delete - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.const 255 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761394 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find29 - loop $while-continue|030 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load8_u - local.get $0 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find29 - local.get $3 - i32.const -2 + i32.const 0 + local.set $1 + end + local.get $1 + if + i32.const 0 + i32.const 1568 + i32.const 50 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + local.get $11 + i32.const 255 + i32.and + local.tee $0 + i32.const 10 + i32.add + call $~lib/map/Map#set + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $0 + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find26 + loop $while-continue|027 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $11 + i32.const 255 i32.and - local.set $2 - br $while-continue|030 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find26 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|027 end - i32.const 0 - local.set $2 - end - local.get $2 - if - i32.const 0 - i32.const 1568 - i32.const 54 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $1 - i32.const 1 - i32.add + i32.const 0 local.set $1 - br $for-loop|8 end + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 52 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + call $~lib/map/Map#delete + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 + i32.const 255 + i32.and + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find29 + loop $while-continue|030 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $11 + i32.const 255 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find29 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|030 + end + end + i32.const 0 + local.set $1 + end + local.get $1 + if + i32.const 0 + i32.const 1568 + i32.const 54 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|8 end - local.get $5 - i32.load offset=20 - i32.const 50 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 56 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $5 - call $~lib/map/Map#clear - local.get $5 - i32.load offset=20 - if - i32.const 0 - i32.const 1568 - i32.const 60 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - return end + local.get $2 + i32.load offset=20 + i32.const 50 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 56 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + call $~lib/map/Map#clear + local.get $2 + i32.load offset=20 + if + i32.const 0 + i32.const 1568 + i32.const 60 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + return end i32.const 18432 i32.const 18480 @@ -7390,7 +7345,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -7398,7 +7353,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $5 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor @@ -7406,33 +7361,33 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $7 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 + local.set $4 local.get $3 local.set $2 loop $while-continue|0 - local.get $5 + local.get $4 local.get $7 i32.ne if - local.get $5 + local.get $7 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $5 + local.get $7 i32.load16_s local.tee $8 i32.store16 local.get $2 - local.get $5 + local.get $7 i32.load offset=4 i32.store offset=4 local.get $2 @@ -7469,7 +7424,7 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $6 i32.add local.tee $8 i32.load @@ -7482,20 +7437,20 @@ i32.add local.set $2 end - local.get $5 + local.get $7 i32.const 12 i32.add - local.set $5 + local.set $7 br $while-continue|0 end end local.get $0 - local.get $4 + local.get $6 i32.store - local.get $4 + local.get $6 if local.get $0 - local.get $4 + local.get $6 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 @@ -7511,7 +7466,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $6 + local.get $5 i32.store offset=12 local.get $0 local.get $0 @@ -7529,7 +7484,6 @@ local.get $0 i32.load offset=4 local.get $1 - local.tee $2 i32.extend16_s i32.const -1028477379 i32.mul @@ -7569,23 +7523,22 @@ local.get $0 if local.get $0 - local.tee $1 i32.load offset=8 - local.tee $0 + local.tee $2 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $1 + local.get $0 i32.load16_u - local.get $2 + local.get $1 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/map/Map#find - local.get $0 + local.get $2 i32.const -2 i32.and local.set $0 @@ -7593,9 +7546,9 @@ end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.eqz if i32.const 1616 @@ -7605,7 +7558,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=4 ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) @@ -7790,1784 +7743,1769 @@ (local $14 i32) (local $15 i32) (local $16 i32) - (local $17 i32) - (local $18 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub global.set $~lib/memory/__stack_pointer block $folding-inner1 - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $3 - i64.const 0 - i64.store - local.get $3 - i64.const 0 - i64.store offset=8 - local.get $3 - i32.const 0 - i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + i32.const 0 + i32.store + local.get $2 + i32.const 24 + i32.const 11 + call $~lib/rt/itcms/__new + local.tee $2 + i32.store + local.get $2 + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + i32.store + local.get $3 + if + local.get $2 local.get $3 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $4 - i32.const 0 - i32.store - local.get $4 - i32.const 24 - i32.const 11 - call $~lib/rt/itcms/__new - local.tee $5 - i32.store - local.get $5 - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 - i32.store - local.get $4 - if - local.get $5 - local.get $4 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $5 - i32.const 3 - i32.store offset=4 - local.get $5 - i32.const 48 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 - i32.store offset=8 - local.get $4 - if - local.get $5 - local.get $4 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $5 - i32.const 4 - i32.store offset=12 - local.get $5 - i32.const 0 - i32.store offset=16 - local.get $5 - i32.const 0 - i32.store offset=20 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $2 + i32.const 3 + i32.store offset=4 + local.get $2 + i32.const 48 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + i32.store offset=8 + local.get $3 + if + local.get $2 local.get $3 - local.get $5 - i32.store - loop $for-loop|1 - local.get $2 - i32.extend16_s - i32.const 100 - i32.lt_s - if - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.extend16_s - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 - i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 - i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load16_u - local.get $3 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $6 - i32.const -2 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $2 + i32.const 4 + i32.store offset=12 + local.get $2 + i32.const 0 + i32.store offset=16 + local.get $2 + i32.const 0 + i32.store offset=20 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + local.get $2 + i32.store + loop $for-loop|1 + local.get $1 + i32.extend16_s + i32.const 100 + i32.lt_s + if + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $1 + i32.extend16_s + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load16_u + local.get $1 + i32.const 65535 i32.and - local.set $4 - br $while-continue|0 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 end - i32.const 0 - local.set $4 - end - local.get $4 - if - i32.const 0 - i32.const 1568 - i32.const 6 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - local.get $2 - local.get $2 - i32.extend16_s - i32.const 10 - i32.add - call $~lib/map/Map#set - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.extend16_s - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 - i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 - i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find1 - loop $while-continue|02 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load16_u - local.get $3 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find1 - local.get $6 - i32.const -2 + i32.const 0 + local.set $0 + end + local.get $0 + if + i32.const 0 + i32.const 1568 + i32.const 6 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + local.get $1 + i32.extend16_s + local.tee $0 + i32.const 10 + i32.add + call $~lib/map/Map#set + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $0 + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find1 + loop $while-continue|02 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load16_u + local.get $1 + i32.const 65535 i32.and - local.set $4 - br $while-continue|02 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find1 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|02 end - i32.const 0 - local.set $4 - end - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 8 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $2 - call $~lib/map/Map#get - local.get $2 - i32.extend16_s - i32.const 10 - i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 9 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 + i32.const 0 + local.set $0 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 8 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $2 + local.get $1 + call $~lib/map/Map#get + local.get $1 + i32.extend16_s + i32.const 10 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 9 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 end - local.get $5 - i32.load offset=20 + end + local.get $2 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 11 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $1 + loop $for-loop|3 + local.get $1 + i32.extend16_s i32.const 100 - i32.ne + i32.lt_s if - i32.const 0 - i32.const 1568 - i32.const 11 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $2 - loop $for-loop|3 local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $1 i32.extend16_s - i32.const 100 - i32.lt_s - if - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.extend16_s - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 - i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 - i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find4 - loop $while-continue|05 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load16_u - local.get $3 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find4 - local.get $6 - i32.const -2 + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find4 + loop $while-continue|05 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load16_u + local.get $1 + i32.const 65535 i32.and - local.set $4 - br $while-continue|05 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find4 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|05 end - i32.const 0 - local.set $4 - end - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 15 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $2 - call $~lib/map/Map#get - local.get $2 - i32.extend16_s - i32.const 10 - i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - local.get $2 - local.get $2 - i32.extend16_s - i32.const 20 - i32.add - call $~lib/map/Map#set - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.extend16_s - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 + i32.const 0 + local.set $0 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + call $~lib/map/Map#get + local.get $1 + i32.extend16_s + i32.const 10 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find7 - loop $while-continue|08 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load16_u - local.get $3 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find7 - local.get $6 - i32.const -2 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + local.get $1 + i32.extend16_s + local.tee $0 + i32.const 20 + i32.add + call $~lib/map/Map#set + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $0 + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find7 + loop $while-continue|08 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load16_u + local.get $1 + i32.const 65535 i32.and - local.set $4 - br $while-continue|08 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find7 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|08 end - i32.const 0 - local.set $4 - end - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 18 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $2 - call $~lib/map/Map#get - local.get $2 - i32.extend16_s - i32.const 20 - i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 19 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|3 + i32.const 0 + local.set $0 end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 18 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + call $~lib/map/Map#get + local.get $1 + i32.extend16_s + i32.const 20 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 19 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|3 end - local.get $5 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 21 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $2 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $3 - i32.const 0 - i32.store - local.get $5 - i32.load offset=8 - local.set $6 - local.get $5 - i32.load offset=16 - local.set $7 - local.get $3 - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $4 - i64.const 0 - i64.store - local.get $4 - i32.const 16 - i32.const 12 - call $~lib/rt/itcms/__new - local.tee $4 - i32.store - local.get $4 - i32.const 0 - i32.store - local.get $4 - i32.const 0 - i32.store offset=4 - local.get $4 - i32.const 0 - i32.store offset=8 - local.get $4 - i32.const 0 - i32.store offset=12 - local.get $7 - i32.const 536870910 - i32.gt_u - if - i32.const 1456 - i32.const 1728 - i32.const 70 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.const 8 - local.get $7 - i32.const 8 - i32.gt_u - select - i32.const 1 - i32.shl - local.tee $8 + end + local.get $2 + i32.load offset=20 + i32.const 100 + i32.ne + if i32.const 0 - call $~lib/rt/itcms/__new - local.tee $9 - i32.store offset=4 + i32.const 1568 + i32.const 21 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.store + local.get $2 + i32.load offset=8 + local.set $3 + local.get $2 + i32.load offset=16 + local.set $4 + local.get $0 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $5 + i64.const 0 + i64.store + local.get $5 + i32.const 16 + i32.const 12 + call $~lib/rt/itcms/__new + local.tee $12 + i32.store + local.get $12 + i32.const 0 + i32.store + local.get $12 + i32.const 0 + i32.store offset=4 + local.get $12 + i32.const 0 + i32.store offset=8 + local.get $12 + i32.const 0 + i32.store offset=12 + local.get $4 + i32.const 536870910 + i32.gt_u + if + i32.const 1456 + i32.const 1728 + i32.const 70 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.const 8 + local.get $4 + i32.const 8 + i32.gt_u + select + i32.const 1 + i32.shl + local.tee $5 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $6 + i32.store offset=4 + local.get $12 + local.get $6 + i32.store + local.get $6 + if + local.get $12 + local.get $6 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $12 + local.get $6 + i32.store offset=4 + local.get $12 + local.get $5 + i32.store offset=8 + local.get $12 + local.get $4 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + local.get $12 + i32.store + i32.const 0 + local.set $0 + loop $for-loop|0 local.get $4 - local.get $9 - i32.store - local.get $9 + local.get $11 + i32.gt_s if - local.get $4 - local.get $9 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $4 - local.get $9 - i32.store offset=4 - local.get $4 - local.get $8 - i32.store offset=8 - local.get $4 - local.get $7 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - local.get $4 - i32.store - loop $for-loop|0 - local.get $1 - local.get $7 - i32.lt_s + local.get $11 + i32.const 12 + i32.mul + local.get $3 + i32.add + local.tee $5 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz if - local.get $1 - i32.const 12 - i32.mul - local.get $6 - i32.add - local.tee $3 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $4 - local.get $0 - local.get $3 - i32.load16_s - call $~lib/array/Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - end - local.get $1 + local.get $12 + local.get $0 + local.get $5 + i32.load16_s + call $~lib/array/Array#__set + local.get $0 i32.const 1 i32.add - local.set $1 - br $for-loop|0 + local.set $0 end + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|0 end - local.get $4 - local.get $0 - i32.const 1 - i32.const 0 - call $~lib/array/ensureCapacity - local.get $4 - local.get $0 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $2 - local.get $4 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $5 - call $~lib/map/Map#values - local.tee $13 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $1 - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.const 13 - call $~lib/rt/itcms/__new - local.tee $6 - i32.store - local.get $6 - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $1 - i32.store + end + local.get $12 + local.get $0 + i32.const 1 + i32.const 0 + call $~lib/array/ensureCapacity + local.get $12 + local.get $0 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + local.get $12 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + call $~lib/map/Map#values + local.tee $6 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 24 + i32.const 13 + call $~lib/rt/itcms/__new + local.tee $13 + i32.store + local.get $13 + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + i32.store + local.get $1 + if + local.get $13 local.get $1 - if - local.get $6 - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $6 - i32.const 3 - i32.store offset=4 - local.get $6 - i32.const 32 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $1 - i32.store offset=8 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + i32.const 3 + i32.store offset=4 + local.get $13 + i32.const 32 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + i32.store offset=8 + local.get $1 + if + local.get $13 local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + i32.const 4 + i32.store offset=12 + local.get $13 + i32.const 0 + i32.store offset=16 + local.get $13 + i32.const 0 + i32.store offset=20 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $13 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + call $~lib/map/Map#constructor + local.tee $8 + i32.store offset=16 + i32.const 0 + local.set $11 + loop $for-loop|4 + local.get $12 + i32.load offset=12 + local.get $11 + i32.gt_s if - local.get $6 - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $6 - i32.const 4 - i32.store offset=12 - local.get $6 - i32.const 0 - i32.store offset=16 - local.get $6 - i32.const 0 - i32.store offset=20 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - call $~lib/map/Map#constructor - local.tee $15 - i32.store offset=16 - i32.const 0 - local.set $1 - loop $for-loop|4 - local.get $4 + local.get $12 i32.load offset=12 - local.get $1 - i32.gt_s + local.get $11 + i32.le_u if - local.get $4 - i32.load offset=12 - local.get $1 - i32.le_u - if - i32.const 1248 - i32.const 1728 - i32.const 114 - i32.const 42 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.load offset=4 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.set $7 - local.get $13 - local.get $1 - call $~lib/array/Array#__get - local.set $14 - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $7 - local.tee $0 - i32.extend16_s - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find10 - loop $while-continue|011 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load16_u - local.get $0 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find10 - local.get $3 - i32.const -2 + i32.const 1248 + i32.const 1728 + i32.const 114 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $12 + i32.load offset=4 + local.get $11 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.set $14 + local.get $6 + local.get $11 + call $~lib/array/Array#__get + local.set $7 + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $14 + i32.extend16_s + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find10 + loop $while-continue|011 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $1 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load16_u + local.get $14 + i32.const 65535 i32.and - local.set $2 - br $while-continue|011 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find10 + local.get $1 + i32.const -2 + i32.and + local.set $0 + br $while-continue|011 end - i32.const 0 - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 31 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $14 - i32.const 20 - i32.sub - local.tee $2 - i32.extend16_s - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $0 - i32.const 15 - i32.shr_u - local.get $0 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $0 - i32.const 13 - i32.shr_u - local.get $0 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $0 - i32.const 16 - i32.shr_u - local.get $0 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load + i32.const 0 local.set $0 - block $__inlined_func$~lib/map/Map#find13 - loop $while-continue|014 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 31 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $7 + i32.const 20 + i32.sub + local.tee $1 + i32.extend16_s + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find13 + loop $while-continue|014 + local.get $0 + if local.get $0 - if + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else local.get $0 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load16_u - local.get $2 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find13 - local.get $3 - i32.const -2 + i32.load16_u + local.get $1 + i32.const 65535 i32.and - local.set $0 - br $while-continue|014 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find13 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|014 end - i32.const 0 - local.set $0 - end - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 32 - i32.const 5 - call $~lib/builtins/abort - unreachable end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store - local.get $6 - local.tee $3 - i32.load - local.get $7 - i32.extend16_s - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $0 - local.get $0 - i32.const 15 - i32.shr_u - i32.xor - i32.const -2048144777 - i32.mul - local.tee $0 - local.get $0 - i32.const 13 - i32.shr_u - i32.xor - i32.const -1028477379 - i32.mul - local.tee $0 - local.get $0 - i32.const 16 - i32.shr_u - i32.xor - local.tee $12 - local.get $3 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|015 - local.get $2 - if - local.get $2 - local.tee $0 - i32.load offset=4 - local.tee $2 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load16_u - local.get $7 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $2 - i32.const -2 + local.set $0 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 32 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $13 + i32.load + local.get $14 + i32.extend16_s + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + i32.const 15 + i32.shr_u + local.get $0 + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + i32.const 13 + i32.shr_u + local.get $0 + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + i32.const 16 + i32.shr_u + local.get $0 + i32.xor + local.tee $5 + local.get $13 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|015 + local.get $0 + if + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load16_u + local.get $14 + i32.const 65535 i32.and - local.set $2 - br $while-continue|015 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.const -2 + i32.and + local.set $0 + br $while-continue|015 end - i32.const 0 - local.set $0 end + i32.const 0 + local.set $0 + end + local.get $0 + if local.get $0 + local.get $14 + i32.store16 offset=2 + else + local.get $13 + i32.load offset=16 + local.get $13 + i32.load offset=12 + i32.eq if + local.get $13 + i32.load offset=20 + local.get $13 + i32.load offset=12 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i32) + local.get $13 + i32.load offset=4 + else + local.get $13 + i32.load offset=4 + i32.const 1 + i32.shl + i32.const 1 + i32.or + end + local.set $15 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i64.const 0 + i64.store local.get $0 - local.get $7 - i32.store16 offset=2 - else - local.get $3 + local.get $15 + i32.const 1 + i32.add + local.tee $0 + i32.const 2 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $9 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.const 3 + i32.shl + i32.const 3 + i32.div_s + local.tee $4 + i32.const 3 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + i32.store offset=4 + local.get $13 + i32.load offset=8 + local.tee $10 + local.get $13 i32.load offset=16 - local.get $3 - i32.load offset=12 - i32.eq - if - local.get $3 - local.tee $2 - i32.load offset=20 + i32.const 3 + i32.shl + i32.add + local.set $3 + local.get $1 + local.set $0 + loop $while-continue|00 local.get $3 - i32.load offset=12 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i32) - local.get $2 - i32.load offset=4 - else - local.get $2 + local.get $10 + i32.ne + if + local.get $10 i32.load offset=4 i32.const 1 - i32.shl - i32.const 1 - i32.or - end - local.set $16 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - local.get $16 - i32.const 1 - i32.add - local.tee $0 - i32.const 2 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $8 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.const 3 - i32.shl - i32.const 3 - i32.div_s - local.tee $11 - i32.const 3 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $9 - i32.store offset=4 - local.get $2 - i32.load offset=8 - local.tee $17 - local.get $2 - i32.load offset=16 - i32.const 3 - i32.shl - i32.add - local.set $10 - local.get $9 - local.set $0 - loop $while-continue|00 - local.get $10 - local.get $17 - i32.ne + i32.and + i32.eqz if - local.get $17 - i32.load offset=4 - i32.const 1 + local.get $0 + local.get $10 + i32.load16_s + local.tee $16 + i32.store16 + local.get $0 + local.get $10 + i32.load16_s offset=2 + i32.store16 offset=2 + local.get $0 + local.get $16 + i32.extend16_s + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $16 + i32.const 15 + i32.shr_u + local.get $16 + i32.xor + i32.const -2048144777 + i32.mul + local.tee $16 + i32.const 13 + i32.shr_u + local.get $16 + i32.xor + i32.const -1028477379 + i32.mul + local.tee $16 + i32.const 16 + i32.shr_u + local.get $16 + i32.xor + local.get $15 i32.and - i32.eqz - if - local.get $0 - local.get $17 - i32.load16_s - local.tee $18 - i32.store16 - local.get $0 - local.get $17 - i32.load16_s offset=2 - i32.store16 offset=2 - local.get $0 - local.get $18 - i32.extend16_s - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $18 - local.get $18 - i32.const 15 - i32.shr_u - i32.xor - i32.const -2048144777 - i32.mul - local.tee $18 - local.get $18 - i32.const 13 - i32.shr_u - i32.xor - i32.const -1028477379 - i32.mul - local.tee $18 - local.get $18 - i32.const 16 - i32.shr_u - i32.xor - local.get $16 - i32.and - i32.const 2 - i32.shl - local.get $8 - i32.add - local.tee $18 - i32.load - i32.store offset=4 - local.get $18 - local.get $0 - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $17 + i32.const 2 + i32.shl + local.get $9 + i32.add + local.tee $16 + i32.load + i32.store offset=4 + local.get $16 + local.get $0 + i32.store + local.get $0 i32.const 8 i32.add - local.set $17 - br $while-continue|00 + local.set $0 end - end - local.get $2 - local.get $8 - i32.store - local.get $8 - if - local.get $3 - local.get $8 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $3 - local.get $16 - i32.store offset=4 - local.get $3 - local.get $9 - i32.store offset=8 - local.get $9 - if - local.get $3 - local.get $9 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $3 - local.get $11 - i32.store offset=12 - local.get $3 - local.get $3 - i32.load offset=20 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer + local.get $10 + i32.const 8 + i32.add + local.set $10 + br $while-continue|00 + end end - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.load offset=8 - local.tee $0 + local.get $13 + local.get $9 i32.store - local.get $3 - local.get $3 - i32.load offset=16 - local.tee $2 - i32.const 1 - i32.add - i32.store offset=16 - local.get $2 - i32.const 3 - i32.shl - local.get $0 - i32.add - local.tee $0 - local.get $7 - i32.store16 - local.get $0 - local.get $7 - i32.store16 offset=2 - local.get $3 - local.get $3 + local.get $9 + if + local.get $13 + local.get $9 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + local.get $15 + i32.store offset=4 + local.get $13 + local.get $1 + i32.store offset=8 + local.get $1 + if + local.get $13 + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + local.get $4 + i32.store offset=12 + local.get $13 + local.get $13 i32.load offset=20 - i32.const 1 - i32.add - i32.store offset=20 - local.get $0 - local.get $3 - i32.load - local.get $3 - i32.load offset=4 - local.get $12 - i32.and - i32.const 2 - i32.shl + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 8 i32.add - local.tee $2 - i32.load - i32.store offset=4 - local.get $2 - local.get $0 - i32.store + global.set $~lib/memory/__stack_pointer end global.get $~lib/memory/__stack_pointer - i32.const 4 + local.get $13 + i32.load offset=8 + local.tee $0 + i32.store + local.get $13 + local.get $13 + i32.load offset=16 + local.tee $1 + i32.const 1 + i32.add + i32.store offset=16 + local.get $1 + i32.const 3 + i32.shl + local.get $0 i32.add - global.set $~lib/memory/__stack_pointer - local.get $15 - local.get $14 - i32.const 20 - i32.sub local.tee $0 + local.get $14 + i32.store16 local.get $0 - call $~lib/map/Map#set - local.get $1 + local.get $14 + i32.store16 offset=2 + local.get $13 + local.get $13 + i32.load offset=20 i32.const 1 i32.add - local.set $1 - br $for-loop|4 - end - end - local.get $6 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 36 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $15 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 37 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $1 - loop $for-loop|6 - local.get $1 - i32.extend16_s - i32.const 50 - i32.lt_s - if - local.get $5 + i32.store offset=20 + local.get $0 + local.get $13 i32.load - local.get $5 + local.get $13 i32.load offset=4 - local.get $1 - local.tee $0 - i32.extend16_s - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor + local.get $5 i32.and i32.const 2 i32.shl i32.add + local.tee $1 i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find17 - loop $while-continue|018 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load16_u - local.get $0 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find17 - local.get $3 - i32.const -2 + i32.store offset=4 + local.get $1 + local.get $0 + i32.store + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $8 + local.get $7 + i32.const 20 + i32.sub + local.tee $0 + local.get $0 + call $~lib/map/Map#set + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|4 + end + end + local.get $13 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 36 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $8 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 37 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $11 + loop $for-loop|6 + local.get $11 + i32.extend16_s + i32.const 50 + i32.lt_s + if + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 + i32.extend16_s + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find17 + loop $while-continue|018 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $11 + i32.const 65535 i32.and - local.set $2 - br $while-continue|018 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find17 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|018 end - i32.const 0 - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $1 - call $~lib/map/Map#get - local.get $1 - i32.extend16_s - i32.const 20 - i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 42 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - local.get $1 - call $~lib/map/Map#delete - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.extend16_s - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find20 - loop $while-continue|021 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load16_u - local.get $0 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find20 - local.get $3 - i32.const -2 + i32.const 0 + local.set $1 + end + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 41 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + call $~lib/map/Map#get + local.get $11 + i32.extend16_s + i32.const 20 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 42 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + call $~lib/map/Map#delete + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 + i32.extend16_s + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find20 + loop $while-continue|021 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $11 + i32.const 65535 i32.and - local.set $2 - br $while-continue|021 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find20 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|021 end - i32.const 0 - local.set $2 - end - local.get $2 - if - i32.const 0 - i32.const 1568 - i32.const 44 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $1 - i32.const 1 - i32.add + i32.const 0 local.set $1 - br $for-loop|6 end + local.get $1 + if + i32.const 0 + i32.const 1568 + i32.const 44 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|6 end - local.get $5 - i32.load offset=20 + end + local.get $2 + i32.load offset=20 + i32.const 50 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 46 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $11 + loop $for-loop|8 + local.get $11 + i32.extend16_s i32.const 50 - i32.ne + i32.lt_s if - i32.const 0 - i32.const 1568 - i32.const 46 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $1 - loop $for-loop|8 - local.get $1 - i32.extend16_s - i32.const 50 - i32.lt_s - if - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.extend16_s - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find23 - loop $while-continue|024 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load16_u - local.get $0 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find23 - local.get $3 - i32.const -2 + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 + i32.extend16_s + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find23 + loop $while-continue|024 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $11 + i32.const 65535 i32.and - local.set $2 - br $while-continue|024 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find23 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|024 end - i32.const 0 - local.set $2 - end - local.get $2 - if - i32.const 0 - i32.const 1568 - i32.const 50 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - local.get $1 - local.get $1 - i32.extend16_s - i32.const 10 - i32.add - call $~lib/map/Map#set - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.extend16_s - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find26 - loop $while-continue|027 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load16_u - local.get $0 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find26 - local.get $3 - i32.const -2 + i32.const 0 + local.set $1 + end + local.get $1 + if + i32.const 0 + i32.const 1568 + i32.const 50 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + local.get $11 + i32.extend16_s + local.tee $0 + i32.const 10 + i32.add + call $~lib/map/Map#set + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $0 + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find26 + loop $while-continue|027 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $11 + i32.const 65535 i32.and - local.set $2 - br $while-continue|027 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find26 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|027 end - i32.const 0 - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 52 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - local.get $1 - call $~lib/map/Map#delete - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.extend16_s - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find29 - loop $while-continue|030 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load16_u - local.get $0 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find29 - local.get $3 - i32.const -2 + i32.const 0 + local.set $1 + end + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 52 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + call $~lib/map/Map#delete + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 + i32.extend16_s + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find29 + loop $while-continue|030 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $11 + i32.const 65535 i32.and - local.set $2 - br $while-continue|030 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find29 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|030 end - i32.const 0 - local.set $2 - end - local.get $2 - if - i32.const 0 - i32.const 1568 - i32.const 54 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $1 - i32.const 1 - i32.add + i32.const 0 local.set $1 - br $for-loop|8 end + local.get $1 + if + i32.const 0 + i32.const 1568 + i32.const 54 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|8 end - local.get $5 - i32.load offset=20 - i32.const 50 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 56 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $5 - call $~lib/map/Map#clear - local.get $5 - i32.load offset=20 - if - i32.const 0 - i32.const 1568 - i32.const 60 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - return end + local.get $2 + i32.load offset=20 + i32.const 50 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 56 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + call $~lib/map/Map#clear + local.get $2 + i32.load offset=20 + if + i32.const 0 + i32.const 1568 + i32.const 60 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + return end i32.const 18432 i32.const 18480 @@ -9611,7 +9549,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -9619,7 +9557,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $5 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor @@ -9627,33 +9565,33 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $7 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 + local.set $4 local.get $3 local.set $2 loop $while-continue|0 - local.get $5 + local.get $4 local.get $7 i32.ne if - local.get $5 + local.get $7 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $5 + local.get $7 i32.load16_u local.tee $8 i32.store16 local.get $2 - local.get $5 + local.get $7 i32.load offset=4 i32.store offset=4 local.get $2 @@ -9689,7 +9627,7 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $6 i32.add local.tee $8 i32.load @@ -9702,20 +9640,20 @@ i32.add local.set $2 end - local.get $5 + local.get $7 i32.const 12 i32.add - local.set $5 + local.set $7 br $while-continue|0 end end local.get $0 - local.get $4 + local.get $6 i32.store - local.get $4 + local.get $6 if local.get $0 - local.get $4 + local.get $6 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 @@ -9731,7 +9669,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $6 + local.get $5 i32.store offset=12 local.get $0 local.get $0 @@ -9749,7 +9687,6 @@ local.get $0 i32.load offset=4 local.get $1 - local.tee $2 i32.const 65535 i32.and i32.const -1028477379 @@ -9790,23 +9727,22 @@ local.get $0 if local.get $0 - local.tee $1 i32.load offset=8 - local.tee $0 + local.tee $2 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $1 + local.get $0 i32.load16_u - local.get $2 + local.get $1 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/map/Map#find - local.get $0 + local.get $2 i32.const -2 i32.and local.set $0 @@ -9814,9 +9750,9 @@ end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.eqz if i32.const 1616 @@ -9826,7 +9762,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=4 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) @@ -9973,1806 +9909,1780 @@ (local $14 i32) (local $15 i32) (local $16 i32) - (local $17 i32) - (local $18 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub global.set $~lib/memory/__stack_pointer block $folding-inner1 - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $3 - i64.const 0 - i64.store - local.get $3 - i64.const 0 - i64.store offset=8 - local.get $3 - i32.const 0 - i32.store offset=16 - local.get $3 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $4 - i32.const 0 - i32.store - local.get $4 - i32.const 24 - i32.const 14 - call $~lib/rt/itcms/__new - local.tee $5 - i32.store - local.get $5 - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 - i32.store - local.get $4 - if - local.get $5 - local.get $4 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $5 - i32.const 3 - i32.store offset=4 - local.get $5 - i32.const 48 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 - i32.store offset=8 - local.get $4 - if - local.get $5 - local.get $4 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $5 - i32.const 4 - i32.store offset=12 - local.get $5 - i32.const 0 - i32.store offset=16 - local.get $5 - i32.const 0 - i32.store offset=20 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $2 + i32.const 0 + i32.store + local.get $2 + i32.const 24 + i32.const 14 + call $~lib/rt/itcms/__new + local.tee $2 + i32.store + local.get $2 + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + i32.store + local.get $3 + if + local.get $2 local.get $3 - local.get $5 - i32.store - loop $for-loop|1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $2 + i32.const 3 + i32.store offset=4 + local.get $2 + i32.const 48 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + i32.store offset=8 + local.get $3 + if + local.get $2 + local.get $3 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $2 + i32.const 4 + i32.store offset=12 + local.get $2 + i32.const 0 + i32.store offset=16 + local.get $2 + i32.const 0 + i32.store offset=20 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + local.get $2 + i32.store + loop $for-loop|1 + local.get $1 + i32.const 65535 + i32.and + i32.const 100 + i32.lt_u + if + local.get $2 + i32.load local.get $2 + i32.load offset=4 + local.get $1 i32.const 65535 i32.and - i32.const 100 - i32.lt_u - if - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.const 65535 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 - i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 - i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load16_u - local.get $3 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $6 - i32.const -2 + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load16_u + local.get $1 + i32.const 65535 i32.and - local.set $4 - br $while-continue|0 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 end - i32.const 0 - local.set $4 - end - local.get $4 - if - i32.const 0 - i32.const 1568 - i32.const 6 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - local.get $2 - local.get $2 - i32.const 65535 - i32.and - i32.const 10 - i32.add - call $~lib/map/Map#set - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.const 65535 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 - i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 - i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find1 - loop $while-continue|02 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load16_u - local.get $3 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find1 - local.get $6 - i32.const -2 + i32.const 0 + local.set $0 + end + local.get $0 + if + i32.const 0 + i32.const 1568 + i32.const 6 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + local.get $1 + i32.const 65535 + i32.and + local.tee $0 + i32.const 10 + i32.add + call $~lib/map/Map#set + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $0 + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find1 + loop $while-continue|02 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load16_u + local.get $1 + i32.const 65535 i32.and - local.set $4 - br $while-continue|02 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find1 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|02 end - i32.const 0 - local.set $4 - end - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 8 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $2 - call $~lib/map/Map#get - local.get $2 - i32.const 65535 - i32.and - i32.const 10 - i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 9 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 + i32.const 0 + local.set $0 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 8 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + call $~lib/map/Map#get + local.get $1 + i32.const 65535 + i32.and + i32.const 10 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 9 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 end - local.get $5 - i32.load offset=20 + end + local.get $2 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 11 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $1 + loop $for-loop|3 + local.get $1 + i32.const 65535 + i32.and i32.const 100 - i32.ne + i32.lt_u if - i32.const 0 - i32.const 1568 - i32.const 11 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $2 - loop $for-loop|3 local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $1 i32.const 65535 i32.and - i32.const 100 - i32.lt_u - if - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.const 65535 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 - i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 - i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find4 - loop $while-continue|05 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load16_u - local.get $3 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find4 - local.get $6 - i32.const -2 + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find4 + loop $while-continue|05 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load16_u + local.get $1 + i32.const 65535 i32.and - local.set $4 - br $while-continue|05 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find4 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|05 end - i32.const 0 - local.set $4 - end - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 15 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - local.get $2 - call $~lib/map/Map#get - local.get $2 - i32.const 65535 - i32.and - i32.const 10 - i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $2 - local.get $2 - i32.const 65535 - i32.and - i32.const 20 - i32.add - call $~lib/map/Map#set - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $2 - local.tee $3 - i32.const 65535 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $4 + i32.const 0 + local.set $0 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 i32.const 15 - i32.shr_u - local.get $4 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $4 - i32.const 13 - i32.shr_u - local.get $4 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $4 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + call $~lib/map/Map#get + local.get $1 + i32.const 65535 + i32.and + i32.const 10 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 i32.const 16 - i32.shr_u - local.get $4 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $4 - block $__inlined_func$~lib/map/Map#find7 - loop $while-continue|08 - local.get $4 - if - local.get $4 - i32.load offset=8 - local.tee $6 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $4 - i32.load16_u - local.get $3 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find7 - local.get $6 - i32.const -2 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + local.get $1 + i32.const 65535 + i32.and + local.tee $0 + i32.const 20 + i32.add + call $~lib/map/Map#set + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $0 + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find7 + loop $while-continue|08 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load16_u + local.get $1 + i32.const 65535 i32.and - local.set $4 - br $while-continue|08 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find7 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|08 end - i32.const 0 - local.set $4 - end - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 18 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $2 - call $~lib/map/Map#get - local.get $2 - i32.const 65535 - i32.and - i32.const 20 - i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 19 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|3 + i32.const 0 + local.set $0 end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 18 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + call $~lib/map/Map#get + local.get $1 + i32.const 65535 + i32.and + i32.const 20 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 19 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|3 end - local.get $5 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 21 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $2 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $3 - i32.const 0 - i32.store - local.get $5 - i32.load offset=8 - local.set $6 - local.get $5 - i32.load offset=16 - local.set $7 - local.get $3 - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $4 - i64.const 0 - i64.store - local.get $4 - i32.const 16 - i32.const 15 - call $~lib/rt/itcms/__new - local.tee $4 - i32.store - local.get $4 - i32.const 0 - i32.store - local.get $4 - i32.const 0 - i32.store offset=4 - local.get $4 - i32.const 0 - i32.store offset=8 - local.get $4 - i32.const 0 - i32.store offset=12 - local.get $7 - i32.const 536870910 - i32.gt_u - if - i32.const 1456 - i32.const 1728 - i32.const 70 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.const 8 - local.get $7 - i32.const 8 - i32.gt_u - select - i32.const 1 - i32.shl - local.tee $8 + end + local.get $2 + i32.load offset=20 + i32.const 100 + i32.ne + if i32.const 0 - call $~lib/rt/itcms/__new - local.tee $9 - i32.store offset=4 + i32.const 1568 + i32.const 21 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.store + local.get $2 + i32.load offset=8 + local.set $3 + local.get $2 + i32.load offset=16 + local.set $4 + local.get $0 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $5 + i64.const 0 + i64.store + local.get $5 + i32.const 16 + i32.const 15 + call $~lib/rt/itcms/__new + local.tee $12 + i32.store + local.get $12 + i32.const 0 + i32.store + local.get $12 + i32.const 0 + i32.store offset=4 + local.get $12 + i32.const 0 + i32.store offset=8 + local.get $12 + i32.const 0 + i32.store offset=12 + local.get $4 + i32.const 536870910 + i32.gt_u + if + i32.const 1456 + i32.const 1728 + i32.const 70 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $4 + i32.const 8 + local.get $4 + i32.const 8 + i32.gt_u + select + i32.const 1 + i32.shl + local.tee $5 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $6 + i32.store offset=4 + local.get $12 + local.get $6 + i32.store + local.get $6 + if + local.get $12 + local.get $6 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $12 + local.get $6 + i32.store offset=4 + local.get $12 + local.get $5 + i32.store offset=8 + local.get $12 + local.get $4 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + local.get $12 + i32.store + i32.const 0 + local.set $0 + loop $for-loop|0 local.get $4 - local.get $9 - i32.store - local.get $9 + local.get $11 + i32.gt_s if - local.get $4 - local.get $9 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $4 - local.get $9 - i32.store offset=4 - local.get $4 - local.get $8 - i32.store offset=8 - local.get $4 - local.get $7 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - local.get $4 - i32.store - loop $for-loop|0 - local.get $1 - local.get $7 - i32.lt_s + local.get $11 + i32.const 12 + i32.mul + local.get $3 + i32.add + local.tee $5 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz if - local.get $1 - i32.const 12 - i32.mul - local.get $6 - i32.add - local.tee $3 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $4 - local.get $0 - local.get $3 - i32.load16_u - call $~lib/array/Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - end - local.get $1 + local.get $12 + local.get $0 + local.get $5 + i32.load16_u + call $~lib/array/Array#__set + local.get $0 i32.const 1 i32.add - local.set $1 - br $for-loop|0 + local.set $0 end + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|0 end - local.get $4 - local.get $0 - i32.const 1 - i32.const 0 - call $~lib/array/ensureCapacity - local.get $4 - local.get $0 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $2 - local.get $4 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $5 - call $~lib/map/Map#values - local.tee $13 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $1 - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.const 16 - call $~lib/rt/itcms/__new - local.tee $6 - i32.store - local.get $6 - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $1 - i32.store + end + local.get $12 + local.get $0 + i32.const 1 + i32.const 0 + call $~lib/array/ensureCapacity + local.get $12 + local.get $0 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + local.get $12 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + call $~lib/map/Map#values + local.tee $6 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 24 + i32.const 16 + call $~lib/rt/itcms/__new + local.tee $13 + i32.store + local.get $13 + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + i32.store + local.get $1 + if + local.get $13 local.get $1 - if - local.get $6 - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $6 - i32.const 3 - i32.store offset=4 - local.get $6 - i32.const 32 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $1 - i32.store offset=8 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + i32.const 3 + i32.store offset=4 + local.get $13 + i32.const 32 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + i32.store offset=8 + local.get $1 + if + local.get $13 local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + i32.const 4 + i32.store offset=12 + local.get $13 + i32.const 0 + i32.store offset=16 + local.get $13 + i32.const 0 + i32.store offset=20 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $13 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + call $~lib/map/Map#constructor + local.tee $8 + i32.store offset=16 + i32.const 0 + local.set $11 + loop $for-loop|4 + local.get $12 + i32.load offset=12 + local.get $11 + i32.gt_s if - local.get $6 - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $6 - i32.const 4 - i32.store offset=12 - local.get $6 - i32.const 0 - i32.store offset=16 - local.get $6 - i32.const 0 - i32.store offset=20 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - call $~lib/map/Map#constructor - local.tee $15 - i32.store offset=16 - i32.const 0 - local.set $1 - loop $for-loop|4 - local.get $4 + local.get $12 i32.load offset=12 - local.get $1 - i32.gt_s + local.get $11 + i32.le_u if - local.get $4 - i32.load offset=12 - local.get $1 - i32.le_u - if - i32.const 1248 - i32.const 1728 - i32.const 114 - i32.const 42 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.load offset=4 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $7 - local.get $13 - local.get $1 - call $~lib/array/Array#__get - local.set $14 - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $7 - local.tee $0 - i32.const 65535 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find10 - loop $while-continue|011 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load16_u - local.get $0 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find10 - local.get $3 - i32.const -2 - i32.and - local.set $2 - br $while-continue|011 + i32.const 1248 + i32.const 1728 + i32.const 114 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $12 + i32.load offset=4 + local.get $11 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $14 + local.get $6 + local.get $11 + call $~lib/array/Array#__get + local.set $7 + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $14 + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find10 + loop $while-continue|011 + local.get $0 + if + local.get $0 + i32.load offset=8 + local.tee $1 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $14 + local.get $0 + i32.load16_u + i32.eq end + br_if $__inlined_func$~lib/map/Map#find10 + local.get $1 + i32.const -2 + i32.and + local.set $0 + br $while-continue|011 end - i32.const 0 - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 31 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $14 - i32.const 20 - i32.sub - local.tee $2 - i32.const 65535 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $0 - i32.const 15 - i32.shr_u - local.get $0 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $0 - i32.const 13 - i32.shr_u - local.get $0 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $0 - i32.const 16 - i32.shr_u - local.get $0 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load + i32.const 0 local.set $0 - block $__inlined_func$~lib/map/Map#find13 - loop $while-continue|014 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 31 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $7 + i32.const 20 + i32.sub + local.tee $1 + i32.const 65535 + i32.and + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find13 + loop $while-continue|014 + local.get $0 + if local.get $0 - if + i32.load offset=8 + local.tee $3 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else local.get $0 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load16_u - local.get $2 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find13 - local.get $3 - i32.const -2 + i32.load16_u + local.get $1 + i32.const 65535 i32.and - local.set $0 - br $while-continue|014 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find13 + local.get $3 + i32.const -2 + i32.and + local.set $0 + br $while-continue|014 end - i32.const 0 - local.set $0 - end - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 32 - i32.const 5 - call $~lib/builtins/abort - unreachable end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store - local.get $6 - local.tee $3 - i32.load - local.get $7 - i32.const 65535 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $0 - local.get $0 - i32.const 15 - i32.shr_u - i32.xor - i32.const -2048144777 - i32.mul - local.tee $0 - local.get $0 - i32.const 13 - i32.shr_u - i32.xor - i32.const -1028477379 - i32.mul - local.tee $0 - local.get $0 - i32.const 16 - i32.shr_u - i32.xor - local.tee $12 - local.get $3 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|015 - local.get $2 - if - local.get $2 - local.tee $0 - i32.load offset=4 - local.tee $2 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load16_u - local.get $7 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $2 - i32.const -2 - i32.and - local.set $2 - br $while-continue|015 - end - end - i32.const 0 - local.set $0 - end - local.get $0 - if + local.set $0 + end + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 32 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $13 + i32.load + local.get $14 + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + i32.const 15 + i32.shr_u + local.get $0 + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + i32.const 13 + i32.shr_u + local.get $0 + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + i32.const 16 + i32.shr_u + local.get $0 + i32.xor + local.tee $5 + local.get $13 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|015 local.get $0 - local.get $7 - i32.store16 offset=2 - else - local.get $3 - i32.load offset=16 - local.get $3 - i32.load offset=12 - i32.eq if - local.get $3 - local.tee $2 - i32.load offset=20 - local.get $3 - i32.load offset=12 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 1 + i32.and if (result i32) - local.get $2 - i32.load offset=4 + i32.const 0 else - local.get $2 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + local.get $14 + local.get $0 + i32.load16_u + i32.eq end - local.set $16 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2020 - i32.lt_s - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - local.get $16 - i32.const 1 - i32.add - local.tee $0 - i32.const 2 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $8 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.const 3 - i32.shl - i32.const 3 - i32.div_s - local.tee $11 - i32.const 3 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $9 - i32.store offset=4 - local.get $2 - i32.load offset=8 - local.tee $17 - local.get $2 - i32.load offset=16 - i32.const 3 - i32.shl - i32.add - local.set $10 - local.get $9 + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.const -2 + i32.and local.set $0 - loop $while-continue|00 - local.get $10 - local.get $17 - i32.ne - if - local.get $17 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $17 - i32.load16_u - local.tee $18 - i32.store16 - local.get $0 - local.get $17 - i32.load16_u offset=2 - i32.store16 offset=2 - local.get $0 - local.get $18 - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $18 - local.get $18 - i32.const 15 - i32.shr_u - i32.xor - i32.const -2048144777 - i32.mul - local.tee $18 - local.get $18 - i32.const 13 - i32.shr_u - i32.xor - i32.const -1028477379 - i32.mul - local.tee $18 - local.get $18 - i32.const 16 - i32.shr_u - i32.xor - local.get $16 - i32.and - i32.const 2 - i32.shl - local.get $8 - i32.add - local.tee $18 - i32.load - i32.store offset=4 - local.get $18 - local.get $0 - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $17 - i32.const 8 - i32.add - local.set $17 - br $while-continue|00 - end - end - local.get $2 - local.get $8 - i32.store - local.get $8 - if - local.get $3 - local.get $8 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $3 - local.get $16 - i32.store offset=4 - local.get $3 - local.get $9 - i32.store offset=8 - local.get $9 - if - local.get $3 - local.get $9 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $3 - local.get $11 - i32.store offset=12 - local.get $3 - local.get $3 - i32.load offset=20 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer + br $while-continue|015 + end + end + i32.const 0 + local.set $0 + end + local.get $0 + if + local.get $0 + local.get $14 + i32.store16 offset=2 + else + local.get $13 + i32.load offset=16 + local.get $13 + i32.load offset=12 + i32.eq + if + local.get $13 + i32.load offset=20 + local.get $13 + i32.load offset=12 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i32) + local.get $13 + i32.load offset=4 + else + local.get $13 + i32.load offset=4 + i32.const 1 + i32.shl + i32.const 1 + i32.or end + local.set $15 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2020 + i32.lt_s + br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.get $3 - i32.load offset=8 - local.tee $0 - i32.store - local.get $3 - local.get $3 - i32.load offset=16 - local.tee $2 - i32.const 1 - i32.add - i32.store offset=16 - local.get $2 - i32.const 3 - i32.shl - local.get $0 - i32.add local.tee $0 - local.get $7 - i32.store16 + i64.const 0 + i64.store local.get $0 - local.get $7 - i32.store16 offset=2 - local.get $3 - local.get $3 - i32.load offset=20 + local.get $15 i32.const 1 i32.add - i32.store offset=20 - local.get $0 - local.get $3 - i32.load - local.get $3 - i32.load offset=4 - local.get $12 - i32.and + local.tee $0 i32.const 2 i32.shl - i32.add - local.tee $2 - i32.load - i32.store offset=4 - local.get $2 - local.get $0 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $9 i32.store - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $15 - local.get $14 - i32.const 20 - i32.sub - local.tee $0 - local.get $0 - call $~lib/map/Map#set - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|4 - end - end - local.get $6 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 36 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $15 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 37 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $1 - loop $for-loop|6 - local.get $1 - i32.const 65535 - i32.and - i32.const 50 - i32.lt_u - if - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.const 65535 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find17 - loop $while-continue|018 - local.get $2 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.const 3 + i32.shl + i32.const 3 + i32.div_s + local.tee $4 + i32.const 3 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + i32.store offset=4 + local.get $13 + i32.load offset=8 + local.tee $10 + local.get $13 + i32.load offset=16 + i32.const 3 + i32.shl + i32.add + local.set $3 + local.get $1 + local.set $0 + loop $while-continue|00 + local.get $3 + local.get $10 + i32.ne if - local.get $2 - i32.load offset=8 - local.tee $3 + local.get $10 + i32.load offset=4 i32.const 1 i32.and - if (result i32) - i32.const 0 - else - local.get $2 + i32.eqz + if + local.get $0 + local.get $10 i32.load16_u + local.tee $16 + i32.store16 local.get $0 - i32.const 65535 + local.get $10 + i32.load16_u offset=2 + i32.store16 offset=2 + local.get $0 + local.get $16 + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $16 + i32.const 15 + i32.shr_u + local.get $16 + i32.xor + i32.const -2048144777 + i32.mul + local.tee $16 + i32.const 13 + i32.shr_u + local.get $16 + i32.xor + i32.const -1028477379 + i32.mul + local.tee $16 + i32.const 16 + i32.shr_u + local.get $16 + i32.xor + local.get $15 i32.and - i32.eq + i32.const 2 + i32.shl + local.get $9 + i32.add + local.tee $16 + i32.load + i32.store offset=4 + local.get $16 + local.get $0 + i32.store + local.get $0 + i32.const 8 + i32.add + local.set $0 end - br_if $__inlined_func$~lib/map/Map#find17 - local.get $3 - i32.const -2 - i32.and - local.set $2 - br $while-continue|018 + local.get $10 + i32.const 8 + i32.add + local.set $10 + br $while-continue|00 end end - i32.const 0 - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $13 + local.get $9 + i32.store + local.get $9 + if + local.get $13 + local.get $9 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + local.get $15 + i32.store offset=4 + local.get $13 + local.get $1 + i32.store offset=8 + local.get $1 + if + local.get $13 + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $13 + local.get $4 + i32.store offset=12 + local.get $13 + local.get $13 + i32.load offset=20 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer end - local.get $5 - local.get $1 - call $~lib/map/Map#get - local.get $1 - i32.const 65535 - i32.and - i32.const 20 + global.get $~lib/memory/__stack_pointer + local.get $13 + i32.load offset=8 + local.tee $0 + i32.store + local.get $13 + local.get $13 + i32.load offset=16 + local.tee $1 + i32.const 1 i32.add - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 42 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $1 - call $~lib/map/Map#delete - local.get $5 - i32.load - local.get $5 - i32.load offset=4 + i32.store offset=16 local.get $1 + i32.const 3 + i32.shl + local.get $0 + i32.add local.tee $0 - i32.const 65535 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761395 + local.get $14 + i32.store16 + local.get $0 + local.get $14 + i32.store16 offset=2 + local.get $13 + local.get $13 + i32.load offset=20 + i32.const 1 i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor + i32.store offset=20 + local.get $0 + local.get $13 + i32.load + local.get $13 + i32.load offset=4 + local.get $5 i32.and i32.const 2 i32.shl i32.add + local.tee $1 i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find20 - loop $while-continue|021 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 + i32.store offset=4 + local.get $1 + local.get $0 + i32.store + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $8 + local.get $7 + i32.const 20 + i32.sub + local.tee $0 + local.get $0 + call $~lib/map/Map#set + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|4 + end + end + local.get $13 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 36 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $8 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 37 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $11 + loop $for-loop|6 + local.get $11 + i32.const 65535 + i32.and + i32.const 50 + i32.lt_u + if + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 + i32.const 65535 + i32.and + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find17 + loop $while-continue|018 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $11 + i32.const 65535 i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load16_u - local.get $0 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find20 - local.get $3 - i32.const -2 + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find17 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|018 + end + end + i32.const 0 + local.set $1 + end + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 41 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + call $~lib/map/Map#get + local.get $11 + i32.const 65535 + i32.and + i32.const 20 + i32.add + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 42 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + call $~lib/map/Map#delete + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 + i32.const 65535 + i32.and + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find20 + loop $while-continue|021 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $11 + i32.const 65535 i32.and - local.set $2 - br $while-continue|021 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find20 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|021 end - i32.const 0 - local.set $2 - end - local.get $2 - if - i32.const 0 - i32.const 1568 - i32.const 44 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $1 - i32.const 1 - i32.add + i32.const 0 local.set $1 - br $for-loop|6 end + local.get $1 + if + i32.const 0 + i32.const 1568 + i32.const 44 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|6 end - local.get $5 - i32.load offset=20 + end + local.get $2 + i32.load offset=20 + i32.const 50 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 46 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $11 + loop $for-loop|8 + local.get $11 + i32.const 65535 + i32.and i32.const 50 - i32.ne + i32.lt_u if - i32.const 0 - i32.const 1568 - i32.const 46 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $1 - loop $for-loop|8 - local.get $1 + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 i32.const 65535 i32.and - i32.const 50 - i32.lt_u - if - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.const 65535 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find23 - loop $while-continue|024 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load16_u - local.get $0 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find23 - local.get $3 - i32.const -2 + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find23 + loop $while-continue|024 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $11 + i32.const 65535 i32.and - local.set $2 - br $while-continue|024 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find23 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|024 end - i32.const 0 - local.set $2 - end - local.get $2 - if - i32.const 0 - i32.const 1568 - i32.const 50 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - local.get $1 - local.get $1 - i32.const 65535 - i32.and - i32.const 10 - i32.add - call $~lib/map/Map#set - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.const 65535 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find26 - loop $while-continue|027 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load16_u - local.get $0 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find26 - local.get $3 - i32.const -2 + i32.const 0 + local.set $1 + end + local.get $1 + if + i32.const 0 + i32.const 1568 + i32.const 50 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + local.get $11 + i32.const 65535 + i32.and + local.tee $0 + i32.const 10 + i32.add + call $~lib/map/Map#set + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $0 + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find26 + loop $while-continue|027 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $11 + i32.const 65535 i32.and - local.set $2 - br $while-continue|027 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find26 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|027 end - i32.const 0 - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 1568 - i32.const 52 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $5 - local.get $1 - call $~lib/map/Map#delete - local.get $5 - i32.load - local.get $5 - i32.load offset=4 - local.get $1 - local.tee $0 - i32.const 65535 - i32.and - i32.const -1028477379 - i32.mul - i32.const 374761395 - i32.add - i32.const 17 - i32.rotl - i32.const 668265263 - i32.mul - local.tee $2 - i32.const 15 - i32.shr_u - local.get $2 - i32.xor - i32.const -2048144777 - i32.mul - local.tee $2 - i32.const 13 - i32.shr_u - local.get $2 - i32.xor - i32.const -1028477379 - i32.mul - local.tee $2 - i32.const 16 - i32.shr_u - local.get $2 - i32.xor - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - block $__inlined_func$~lib/map/Map#find29 - loop $while-continue|030 - local.get $2 - if - local.get $2 - i32.load offset=8 - local.tee $3 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $2 - i32.load16_u - local.get $0 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find29 - local.get $3 - i32.const -2 + i32.const 0 + local.set $1 + end + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 1568 + i32.const 52 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $11 + call $~lib/map/Map#delete + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $11 + i32.const 65535 + i32.and + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find29 + loop $while-continue|030 + local.get $1 + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $11 + i32.const 65535 i32.and - local.set $2 - br $while-continue|030 + i32.eq end + br_if $__inlined_func$~lib/map/Map#find29 + local.get $0 + i32.const -2 + i32.and + local.set $1 + br $while-continue|030 end - i32.const 0 - local.set $2 - end - local.get $2 - if - i32.const 0 - i32.const 1568 - i32.const 54 - i32.const 5 - call $~lib/builtins/abort - unreachable end - local.get $1 - i32.const 1 - i32.add + i32.const 0 local.set $1 - br $for-loop|8 end + local.get $1 + if + i32.const 0 + i32.const 1568 + i32.const 54 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $for-loop|8 end - local.get $5 - i32.load offset=20 - i32.const 50 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 56 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $5 - call $~lib/map/Map#clear - local.get $5 - i32.load offset=20 - if - i32.const 0 - i32.const 1568 - i32.const 60 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - return end + local.get $2 + i32.load offset=20 + i32.const 50 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 56 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + call $~lib/map/Map#clear + local.get $2 + i32.load offset=20 + if + i32.const 0 + i32.const 1568 + i32.const 60 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + return end i32.const 18432 i32.const 18480 @@ -11788,7 +11698,6 @@ local.get $0 i32.load offset=4 local.get $1 - local.tee $2 i32.const -1028477379 i32.mul i32.const 374761397 @@ -11827,21 +11736,20 @@ local.get $0 if local.get $0 - local.tee $1 i32.load offset=8 - local.tee $0 + local.tee $2 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $2 local.get $1 + local.get $0 i32.load i32.eq end br_if $__inlined_func$~lib/map/Map#find - local.get $0 + local.get $2 i32.const -2 i32.and local.set $0 @@ -11849,9 +11757,9 @@ end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.eqz if i32.const 1616 @@ -11861,7 +11769,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=4 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) @@ -12446,25 +12354,25 @@ i32.store local.get $2 i32.load offset=8 - local.set $5 + local.set $4 local.get $0 local.get $2 i32.load offset=16 - local.tee $6 + local.tee $5 call $~lib/array/Array#constructor - local.tee $4 + local.tee $6 i32.store i32.const 0 local.set $0 loop $for-loop|02 local.get $3 - local.get $6 + local.get $5 i32.lt_s if local.get $3 i32.const 12 i32.mul - local.get $5 + local.get $4 i32.add local.tee $7 i32.load offset=8 @@ -12472,7 +12380,7 @@ i32.and i32.eqz if - local.get $4 + local.get $6 local.get $0 local.get $7 i32.load @@ -12489,12 +12397,12 @@ br $for-loop|02 end end - local.get $4 + local.get $6 local.get $0 i32.const 2 i32.const 0 call $~lib/array/ensureCapacity - local.get $4 + local.get $6 local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer @@ -12502,42 +12410,42 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $1 - local.get $4 + local.get $6 i32.store offset=4 global.get $~lib/memory/__stack_pointer local.get $2 call $~lib/map/Map#values - local.tee $6 + local.tee $7 i32.store offset=8 global.get $~lib/memory/__stack_pointer call $~lib/map/Map#constructor - local.tee $7 + local.tee $8 i32.store offset=12 global.get $~lib/memory/__stack_pointer call $~lib/map/Map#constructor - local.tee $8 + local.tee $9 i32.store offset=16 i32.const 0 local.set $0 loop $for-loop|2 - local.get $4 + local.get $6 i32.load offset=12 local.get $0 i32.gt_s if - local.get $4 + local.get $6 local.get $0 call $~lib/array/Array#__get - local.set $3 - local.get $6 + local.set $1 + local.get $7 local.get $0 call $~lib/array/Array#__get - local.set $9 + local.set $4 local.get $2 i32.load local.get $2 i32.load offset=4 - local.get $3 + local.get $1 i32.const -1028477379 i32.mul i32.const 374761397 @@ -12546,22 +12454,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 16 i32.shr_u i32.xor @@ -12570,12 +12478,12 @@ i32.shl i32.add i32.load - local.set $1 + local.set $3 block $__inlined_func$~lib/map/Map#find10 loop $while-continue|011 - local.get $1 + local.get $3 if - local.get $1 + local.get $3 i32.load offset=8 local.tee $5 i32.const 1 @@ -12583,8 +12491,8 @@ if (result i32) i32.const 0 else - local.get $3 local.get $1 + local.get $3 i32.load i32.eq end @@ -12592,14 +12500,14 @@ local.get $5 i32.const -2 i32.and - local.set $1 + local.set $3 br $while-continue|011 end end i32.const 0 - local.set $1 + local.set $3 end - local.get $1 + local.get $3 i32.eqz if i32.const 0 @@ -12613,10 +12521,10 @@ i32.load local.get $2 i32.load offset=4 - local.get $9 + local.get $4 i32.const 20 i32.sub - local.tee $10 + local.tee $5 i32.const -1028477379 i32.mul i32.const 374761397 @@ -12625,22 +12533,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 16 i32.shr_u i32.xor @@ -12649,36 +12557,36 @@ i32.shl i32.add i32.load - local.set $1 + local.set $3 block $__inlined_func$~lib/map/Map#find13 loop $while-continue|014 - local.get $1 + local.get $3 if - local.get $1 + local.get $3 i32.load offset=8 - local.tee $5 + local.tee $10 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $10 - local.get $1 + local.get $5 + local.get $3 i32.load i32.eq end br_if $__inlined_func$~lib/map/Map#find13 - local.get $5 + local.get $10 i32.const -2 i32.and - local.set $1 + local.set $3 br $while-continue|014 end end i32.const 0 - local.set $1 + local.set $3 end - local.get $1 + local.get $3 i32.eqz if i32.const 0 @@ -12688,12 +12596,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $3 - local.get $3 - call $~lib/map/Map#set local.get $8 + local.get $1 + local.get $1 + call $~lib/map/Map#set local.get $9 + local.get $4 i32.const 20 i32.sub local.tee $1 @@ -12706,7 +12614,7 @@ br $for-loop|2 end end - local.get $7 + local.get $8 i32.load offset=20 i32.const 100 i32.ne @@ -12718,7 +12626,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $9 i32.load offset=20 i32.const 100 i32.ne @@ -13246,7 +13154,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -13254,7 +13162,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $5 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor @@ -13262,33 +13170,33 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $7 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 + local.set $4 local.get $3 local.set $2 loop $while-continue|0 - local.get $5 + local.get $4 local.get $7 i32.ne if - local.get $5 + local.get $7 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $5 + local.get $7 i32.load local.tee $8 i32.store local.get $2 - local.get $5 + local.get $7 i32.load offset=4 i32.store offset=4 local.get $2 @@ -13324,7 +13232,7 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $6 i32.add local.tee $8 i32.load @@ -13337,20 +13245,20 @@ i32.add local.set $2 end - local.get $5 + local.get $7 i32.const 12 i32.add - local.set $5 + local.set $7 br $while-continue|0 end end local.get $0 - local.get $4 + local.get $6 i32.store - local.get $4 + local.get $6 if local.get $0 - local.get $4 + local.get $6 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 @@ -13366,7 +13274,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $6 + local.get $5 i32.store offset=12 local.get $0 local.get $0 @@ -13384,7 +13292,6 @@ local.get $0 i32.load offset=4 local.get $1 - local.tee $2 i32.const -1028477379 i32.mul i32.const 374761397 @@ -13423,21 +13330,20 @@ local.get $0 if local.get $0 - local.tee $1 i32.load offset=8 - local.tee $0 + local.tee $2 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $2 local.get $1 + local.get $0 i32.load i32.eq end br_if $__inlined_func$~lib/map/Map#find - local.get $0 + local.get $2 i32.const -2 i32.and local.set $0 @@ -13445,9 +13351,9 @@ end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.eqz if i32.const 1616 @@ -13457,7 +13363,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=4 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) @@ -13610,16 +13516,16 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $0 i64.const 0 i64.store - local.get $2 + local.get $0 i64.const 0 i64.store offset=8 - local.get $2 + local.get $0 i32.const 0 i32.store offset=16 - local.get $2 + local.get $0 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -13628,66 +13534,66 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $2 i32.const 0 i32.store - local.get $3 + local.get $2 i32.const 24 i32.const 17 call $~lib/rt/itcms/__new - local.tee $12 + local.tee $2 i32.store - local.get $12 + local.get $2 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.tee $3 i32.store local.get $3 if - local.get $12 + local.get $2 local.get $3 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $12 + local.get $2 i32.const 3 i32.store offset=4 - local.get $12 + local.get $2 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor local.tee $3 i32.store offset=8 local.get $3 if - local.get $12 + local.get $2 local.get $3 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $12 + local.get $2 i32.const 4 i32.store offset=12 - local.get $12 + local.get $2 i32.const 0 i32.store offset=16 - local.get $12 + local.get $2 i32.const 0 i32.store offset=20 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 local.get $2 - local.get $12 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 100 i32.lt_u if - local.get $12 + local.get $2 i32.load - local.get $12 + local.get $2 i32.load offset=4 - local.get $0 + local.get $1 i32.const -1028477379 i32.mul i32.const 374761397 @@ -13696,22 +13602,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 16 i32.shr_u i32.xor @@ -13720,12 +13626,12 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 block $__inlined_func$~lib/map/Map#find loop $while-continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 local.tee $3 i32.const 1 @@ -13733,8 +13639,8 @@ if (result i32) i32.const 0 else + local.get $1 local.get $0 - local.get $2 i32.load i32.eq end @@ -13742,14 +13648,14 @@ local.get $3 i32.const -2 i32.and - local.set $2 + local.set $0 br $while-continue|0 end end i32.const 0 - local.set $2 + local.set $0 end - local.get $2 + local.get $0 if i32.const 0 i32.const 1568 @@ -13758,17 +13664,17 @@ call $~lib/builtins/abort unreachable end - local.get $12 - local.get $0 - local.get $0 + local.get $2 + local.get $1 + local.get $1 i32.const 10 i32.add call $~lib/map/Map#set - local.get $12 + local.get $2 i32.load - local.get $12 + local.get $2 i32.load offset=4 - local.get $0 + local.get $1 i32.const -1028477379 i32.mul i32.const 374761397 @@ -13777,22 +13683,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 16 i32.shr_u i32.xor @@ -13801,12 +13707,12 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 block $__inlined_func$~lib/map/Map#find1 loop $while-continue|02 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 local.tee $3 i32.const 1 @@ -13814,8 +13720,8 @@ if (result i32) i32.const 0 else + local.get $1 local.get $0 - local.get $2 i32.load i32.eq end @@ -13823,14 +13729,14 @@ local.get $3 i32.const -2 i32.and - local.set $2 + local.set $0 br $while-continue|02 end end i32.const 0 - local.set $2 + local.set $0 end - local.get $2 + local.get $0 i32.eqz if i32.const 0 @@ -13840,10 +13746,10 @@ call $~lib/builtins/abort unreachable end - local.get $12 - local.get $0 + local.get $2 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 10 i32.add i32.ne @@ -13855,14 +13761,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - local.get $12 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -13875,17 +13781,17 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|1 - local.get $0 + local.get $1 i32.const 100 i32.lt_u if - local.get $12 + local.get $2 i32.load - local.get $12 + local.get $2 i32.load offset=4 - local.get $0 + local.get $1 i32.const -1028477379 i32.mul i32.const 374761397 @@ -13894,22 +13800,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 16 i32.shr_u i32.xor @@ -13918,12 +13824,12 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 block $__inlined_func$~lib/map/Map#find4 loop $while-continue|05 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 local.tee $3 i32.const 1 @@ -13931,8 +13837,8 @@ if (result i32) i32.const 0 else + local.get $1 local.get $0 - local.get $2 i32.load i32.eq end @@ -13940,14 +13846,14 @@ local.get $3 i32.const -2 i32.and - local.set $2 + local.set $0 br $while-continue|05 end end i32.const 0 - local.set $2 + local.set $0 end - local.get $2 + local.get $0 i32.eqz if i32.const 0 @@ -13957,10 +13863,10 @@ call $~lib/builtins/abort unreachable end - local.get $12 - local.get $0 + local.get $2 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 10 i32.add i32.ne @@ -13972,17 +13878,17 @@ call $~lib/builtins/abort unreachable end - local.get $12 - local.get $0 - local.get $0 + local.get $2 + local.get $1 + local.get $1 i32.const 20 i32.add call $~lib/map/Map#set - local.get $12 + local.get $2 i32.load - local.get $12 + local.get $2 i32.load offset=4 - local.get $0 + local.get $1 i32.const -1028477379 i32.mul i32.const 374761397 @@ -13991,22 +13897,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 16 i32.shr_u i32.xor @@ -14015,12 +13921,12 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 block $__inlined_func$~lib/map/Map#find7 loop $while-continue|08 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 local.tee $3 i32.const 1 @@ -14028,8 +13934,8 @@ if (result i32) i32.const 0 else + local.get $1 local.get $0 - local.get $2 i32.load i32.eq end @@ -14037,14 +13943,14 @@ local.get $3 i32.const -2 i32.and - local.set $2 + local.set $0 br $while-continue|08 end end i32.const 0 - local.set $2 + local.set $0 end - local.get $2 + local.get $0 i32.eqz if i32.const 0 @@ -14054,10 +13960,10 @@ call $~lib/builtins/abort unreachable end - local.get $12 - local.get $0 + local.get $2 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 20 i32.add i32.ne @@ -14069,14 +13975,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $12 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -14089,7 +13995,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $1 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -14101,12 +14007,12 @@ local.tee $0 i32.const 0 i32.store - local.get $12 + local.get $2 i32.load offset=8 - local.set $4 - local.get $12 + local.set $3 + local.get $2 i32.load offset=16 - local.set $5 + local.set $4 local.get $0 i32.const 8 i32.sub @@ -14116,28 +14022,28 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $5 i64.const 0 i64.store - local.get $2 + local.get $5 i32.const 16 i32.const 18 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $12 i32.store - local.get $2 + local.get $12 i32.const 0 i32.store - local.get $2 + local.get $12 i32.const 0 i32.store offset=4 - local.get $2 + local.get $12 i32.const 0 i32.store offset=8 - local.get $2 + local.get $12 i32.const 0 i32.store offset=12 - local.get $5 + local.get $4 i32.const 268435455 i32.gt_u if @@ -14149,96 +14055,96 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $4 i32.const 8 - local.get $5 + local.get $4 i32.const 8 i32.gt_u select i32.const 2 i32.shl - local.tee $6 + local.tee $5 i32.const 0 call $~lib/rt/itcms/__new - local.tee $7 + local.tee $6 i32.store offset=4 - local.get $2 - local.get $7 + local.get $12 + local.get $6 i32.store - local.get $7 + local.get $6 if - local.get $2 - local.get $7 + local.get $12 + local.get $6 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $2 - local.get $7 - i32.store offset=4 - local.get $2 + local.get $12 local.get $6 - i32.store offset=8 - local.get $2 + i32.store offset=4 + local.get $12 local.get $5 + i32.store offset=8 + local.get $12 + local.get $4 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer local.get $0 - local.get $2 + local.get $12 i32.store i32.const 0 local.set $0 loop $for-loop|02 - local.get $0 - local.get $5 - i32.lt_s + local.get $4 + local.get $11 + i32.gt_s if - local.get $0 + local.get $11 i32.const 12 i32.mul - local.get $4 + local.get $3 i32.add - local.tee $6 + local.tee $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $2 - local.get $1 - local.get $6 + local.get $12 + local.get $0 + local.get $5 i32.load call $~lib/array/Array#__set - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 end - local.get $0 + local.get $11 i32.const 1 i32.add - local.set $0 + local.set $11 br $for-loop|02 end end - local.get $2 - local.get $1 + local.get $12 + local.get $0 i32.const 2 i32.const 0 call $~lib/array/ensureCapacity - local.get $2 - local.get $1 + local.get $12 + local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 - local.get $2 + local.get $1 + local.get $12 i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $12 + local.get $2 call $~lib/map/Map#values local.tee $6 i32.store offset=8 @@ -14303,21 +14209,20 @@ i32.store offset=12 global.get $~lib/memory/__stack_pointer call $~lib/map/Map#constructor - local.tee $14 + local.tee $8 i32.store offset=16 i32.const 0 - local.set $0 + local.set $11 loop $for-loop|2 - local.get $2 + local.get $12 i32.load offset=12 - local.get $0 + local.get $11 i32.gt_s if - local.get $0 - local.tee $3 - local.get $2 + local.get $12 i32.load offset=12 - i32.ge_u + local.get $11 + i32.le_u if i32.const 1248 i32.const 1728 @@ -14326,23 +14231,23 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $12 i32.load offset=4 - local.get $3 + local.get $11 i32.const 2 i32.shl i32.add i32.load - local.set $15 + local.set $14 local.get $6 - local.get $3 + local.get $11 call $~lib/array/Array#__get - local.set $5 - local.get $12 + local.set $7 + local.get $2 i32.load - local.get $12 + local.get $2 i32.load offset=4 - local.get $15 + local.get $14 i32.const -1028477379 i32.mul i32.const 374761397 @@ -14388,7 +14293,7 @@ if (result i32) i32.const 0 else - local.get $15 + local.get $14 local.get $0 i32.load i32.eq @@ -14414,11 +14319,11 @@ call $~lib/builtins/abort unreachable end - local.get $12 + local.get $2 i32.load - local.get $12 + local.get $2 i32.load offset=4 - local.get $5 + local.get $7 i32.const 20 i32.sub local.tee $1 @@ -14461,7 +14366,7 @@ if local.get $0 i32.load offset=8 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -14473,7 +14378,7 @@ i32.eq end br_if $__inlined_func$~lib/map/Map#find13 - local.get $4 + local.get $3 i32.const -2 i32.and local.set $0 @@ -14506,7 +14411,7 @@ i32.store local.get $13 i32.load - local.get $15 + local.get $14 i32.const -1028477379 i32.mul i32.const 374761397 @@ -14534,7 +14439,7 @@ i32.shr_u local.get $0 i32.xor - local.tee $7 + local.tee $5 local.get $13 i32.load offset=4 i32.and @@ -14548,21 +14453,20 @@ local.get $0 if local.get $0 - local.tee $1 i32.load offset=8 - local.tee $0 + local.tee $1 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $15 - local.get $1 + local.get $14 + local.get $0 i32.load i32.eq end br_if $__inlined_func$~lib/map/Map#find15 - local.get $0 + local.get $1 i32.const -2 i32.and local.set $0 @@ -14570,12 +14474,12 @@ end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 if - local.get $1 - local.get $15 + local.get $0 + local.get $14 i32.store offset=4 else local.get $13 @@ -14604,7 +14508,7 @@ i32.const 1 i32.or end - local.set $10 + local.set $15 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -14618,14 +14522,14 @@ i64.const 0 i64.store local.get $0 - local.get $10 + local.get $15 i32.const 1 i32.add local.tee $0 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $11 + local.tee $9 i32.store global.get $~lib/memory/__stack_pointer local.get $0 @@ -14633,7 +14537,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor @@ -14641,33 +14545,33 @@ i32.store offset=4 local.get $13 i32.load offset=8 - local.tee $4 + local.tee $10 local.get $13 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $9 + local.set $3 local.get $1 local.set $0 loop $while-continue|00 - local.get $4 - local.get $9 + local.get $3 + local.get $10 i32.ne if - local.get $4 + local.get $10 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $0 - local.get $4 + local.get $10 i32.load local.tee $16 i32.store local.get $0 - local.get $4 + local.get $10 i32.load offset=4 i32.store offset=4 local.get $0 @@ -14699,11 +14603,11 @@ i32.shr_u local.get $16 i32.xor - local.get $10 + local.get $15 i32.and i32.const 2 i32.shl - local.get $11 + local.get $9 i32.add local.tee $16 i32.load @@ -14716,24 +14620,24 @@ i32.add local.set $0 end - local.get $4 + local.get $10 i32.const 12 i32.add - local.set $4 + local.set $10 br $while-continue|00 end end local.get $13 - local.get $11 + local.get $9 i32.store - local.get $11 + local.get $9 if local.get $13 - local.get $11 + local.get $9 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $13 - local.get $10 + local.get $15 i32.store offset=4 local.get $13 local.get $1 @@ -14745,7 +14649,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $13 - local.get $8 + local.get $4 i32.store offset=12 local.get $13 local.get $13 @@ -14774,10 +14678,10 @@ local.get $0 i32.add local.tee $0 - local.get $15 + local.get $14 i32.store local.get $0 - local.get $15 + local.get $14 i32.store offset=4 local.get $13 local.get $13 @@ -14790,7 +14694,7 @@ i32.load local.get $13 i32.load offset=4 - local.get $7 + local.get $5 i32.and i32.const 2 i32.shl @@ -14806,17 +14710,17 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $14 - local.get $5 + local.get $8 + local.get $7 i32.const 20 i32.sub local.tee $0 local.get $0 call $~lib/map/Map#set - local.get $3 + local.get $11 i32.const 1 i32.add - local.set $0 + local.set $11 br $for-loop|2 end end @@ -14832,7 +14736,7 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $8 i32.load offset=20 i32.const 100 i32.ne @@ -14845,17 +14749,17 @@ unreachable end i32.const 0 - local.set $0 + local.set $11 loop $for-loop|3 - local.get $0 + local.get $11 i32.const 50 i32.lt_u if - local.get $12 + local.get $2 i32.load - local.get $12 + local.get $2 i32.load offset=4 - local.get $0 + local.get $11 i32.const -1028477379 i32.mul i32.const 374761397 @@ -14864,22 +14768,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 16 i32.shr_u i32.xor @@ -14888,36 +14792,36 @@ i32.shl i32.add i32.load - local.set $2 + local.set $1 block $__inlined_func$~lib/map/Map#find18 loop $while-continue|019 - local.get $2 + local.get $1 if - local.get $2 + local.get $1 i32.load offset=8 - local.tee $1 + local.tee $0 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $0 - local.get $2 + local.get $11 + local.get $1 i32.load i32.eq end br_if $__inlined_func$~lib/map/Map#find18 - local.get $1 + local.get $0 i32.const -2 i32.and - local.set $2 + local.set $1 br $while-continue|019 end end i32.const 0 - local.set $2 + local.set $1 end - local.get $2 + local.get $1 i32.eqz if i32.const 0 @@ -14927,10 +14831,10 @@ call $~lib/builtins/abort unreachable end - local.get $12 - local.get $0 + local.get $2 + local.get $11 call $~lib/map/Map#get - local.get $0 + local.get $11 i32.const 20 i32.add i32.ne @@ -14942,14 +14846,14 @@ call $~lib/builtins/abort unreachable end - local.get $12 - local.get $0 + local.get $2 + local.get $11 call $~lib/map/Map#delete - local.get $12 + local.get $2 i32.load - local.get $12 + local.get $2 i32.load offset=4 - local.get $0 + local.get $11 i32.const -1028477379 i32.mul i32.const 374761397 @@ -14958,22 +14862,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 16 i32.shr_u i32.xor @@ -14982,36 +14886,36 @@ i32.shl i32.add i32.load - local.set $2 + local.set $1 block $__inlined_func$~lib/map/Map#find21 loop $while-continue|022 - local.get $2 + local.get $1 if - local.get $2 + local.get $1 i32.load offset=8 - local.tee $1 + local.tee $0 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $0 - local.get $2 + local.get $11 + local.get $1 i32.load i32.eq end br_if $__inlined_func$~lib/map/Map#find21 - local.get $1 + local.get $0 i32.const -2 i32.and - local.set $2 + local.set $1 br $while-continue|022 end end i32.const 0 - local.set $2 + local.set $1 end - local.get $2 + local.get $1 if i32.const 0 i32.const 1568 @@ -15020,14 +14924,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $11 i32.const 1 i32.add - local.set $0 + local.set $11 br $for-loop|3 end end - local.get $12 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -15040,17 +14944,17 @@ unreachable end i32.const 0 - local.set $0 + local.set $11 loop $for-loop|4 - local.get $0 + local.get $11 i32.const 50 i32.lt_u if - local.get $12 + local.get $2 i32.load - local.get $12 + local.get $2 i32.load offset=4 - local.get $0 + local.get $11 i32.const -1028477379 i32.mul i32.const 374761397 @@ -15059,22 +14963,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 16 i32.shr_u i32.xor @@ -15083,36 +14987,36 @@ i32.shl i32.add i32.load - local.set $2 + local.set $1 block $__inlined_func$~lib/map/Map#find24 loop $while-continue|025 - local.get $2 + local.get $1 if - local.get $2 + local.get $1 i32.load offset=8 - local.tee $1 + local.tee $0 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $0 - local.get $2 + local.get $11 + local.get $1 i32.load i32.eq end br_if $__inlined_func$~lib/map/Map#find24 - local.get $1 + local.get $0 i32.const -2 i32.and - local.set $2 + local.set $1 br $while-continue|025 end end i32.const 0 - local.set $2 + local.set $1 end - local.get $2 + local.get $1 if i32.const 0 i32.const 1568 @@ -15121,17 +15025,17 @@ call $~lib/builtins/abort unreachable end - local.get $12 - local.get $0 - local.get $0 + local.get $2 + local.get $11 + local.get $11 i32.const 10 i32.add call $~lib/map/Map#set - local.get $12 + local.get $2 i32.load - local.get $12 + local.get $2 i32.load offset=4 - local.get $0 + local.get $11 i32.const -1028477379 i32.mul i32.const 374761397 @@ -15140,22 +15044,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 16 i32.shr_u i32.xor @@ -15164,36 +15068,36 @@ i32.shl i32.add i32.load - local.set $2 + local.set $1 block $__inlined_func$~lib/map/Map#find27 loop $while-continue|028 - local.get $2 + local.get $1 if - local.get $2 + local.get $1 i32.load offset=8 - local.tee $1 + local.tee $0 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $0 - local.get $2 + local.get $11 + local.get $1 i32.load i32.eq end br_if $__inlined_func$~lib/map/Map#find27 - local.get $1 + local.get $0 i32.const -2 i32.and - local.set $2 + local.set $1 br $while-continue|028 end end i32.const 0 - local.set $2 + local.set $1 end - local.get $2 + local.get $1 i32.eqz if i32.const 0 @@ -15203,14 +15107,14 @@ call $~lib/builtins/abort unreachable end - local.get $12 - local.get $0 + local.get $2 + local.get $11 call $~lib/map/Map#delete - local.get $12 + local.get $2 i32.load - local.get $12 + local.get $2 i32.load offset=4 - local.get $0 + local.get $11 i32.const -1028477379 i32.mul i32.const 374761397 @@ -15219,22 +15123,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 16 i32.shr_u i32.xor @@ -15243,36 +15147,36 @@ i32.shl i32.add i32.load - local.set $2 + local.set $1 block $__inlined_func$~lib/map/Map#find30 loop $while-continue|031 - local.get $2 + local.get $1 if - local.get $2 + local.get $1 i32.load offset=8 - local.tee $1 + local.tee $0 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $0 - local.get $2 + local.get $11 + local.get $1 i32.load i32.eq end br_if $__inlined_func$~lib/map/Map#find30 - local.get $1 + local.get $0 i32.const -2 i32.and - local.set $2 + local.set $1 br $while-continue|031 end end i32.const 0 - local.set $2 + local.set $1 end - local.get $2 + local.get $1 if i32.const 0 i32.const 1568 @@ -15281,14 +15185,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $11 i32.const 1 i32.add - local.set $0 + local.set $11 br $for-loop|4 end end - local.get $12 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -15300,9 +15204,9 @@ call $~lib/builtins/abort unreachable end - local.get $12 + local.get $2 call $~lib/map/Map#clear - local.get $12 + local.get $2 i32.load offset=20 if i32.const 0 @@ -15445,7 +15349,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 + local.tee $7 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -15453,7 +15357,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $5 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor @@ -15461,33 +15365,33 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $8 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $8 + local.set $4 local.get $3 local.set $2 loop $while-continue|0 - local.get $5 + local.get $4 local.get $8 i32.ne if - local.get $5 + local.get $8 i32.load offset=12 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $5 + local.get $8 i64.load local.tee $6 i64.store local.get $2 - local.get $5 + local.get $8 i32.load offset=8 i32.store offset=8 local.get $2 @@ -15535,7 +15439,7 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $7 i32.add local.tee $9 i32.load @@ -15548,20 +15452,20 @@ i32.add local.set $2 end - local.get $5 + local.get $8 i32.const 16 i32.add - local.set $5 + local.set $8 br $while-continue|0 end end local.get $0 - local.get $4 + local.get $7 i32.store - local.get $4 + local.get $7 if local.get $0 - local.get $4 + local.get $7 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 @@ -15577,7 +15481,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $7 + local.get $5 i32.store offset=12 local.get $0 local.get $0 @@ -15893,8 +15797,8 @@ (func $std/map/testNumeric (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -15903,11 +15807,11 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) + (local $12 i64) (local $13 i32) (local $14 i32) (local $15 i32) - (local $16 i64) + (local $16 i32) (local $17 i32) global.get $~lib/memory/__stack_pointer i32.const 20 @@ -15919,16 +15823,16 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $3 i64.const 0 i64.store - local.get $2 + local.get $3 i64.const 0 i64.store offset=8 - local.get $2 + local.get $3 i32.const 0 i32.store offset=16 - local.get $2 + local.get $3 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -15944,56 +15848,56 @@ i32.const 24 i32.const 20 call $~lib/rt/itcms/__new - local.tee $10 + local.tee $9 i32.store - local.get $10 + local.get $9 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.tee $4 i32.store local.get $4 if - local.get $10 + local.get $9 local.get $4 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $10 + local.get $9 i32.const 3 i32.store offset=4 - local.get $10 + local.get $9 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor local.tee $4 i32.store offset=8 local.get $4 if - local.get $10 + local.get $9 local.get $4 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $10 + local.get $9 i32.const 4 i32.store offset=12 - local.get $10 + local.get $9 i32.const 0 i32.store offset=16 - local.get $10 + local.get $9 i32.const 0 i32.store offset=20 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $2 - local.get $10 + local.get $3 + local.get $9 i32.store loop $for-loop|0 - local.get $3 + local.get $2 i64.const 100 i64.lt_s if - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -16003,15 +15907,15 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 - local.get $3 + local.get $9 + local.get $2 + local.get $2 i32.wrap_i64 i32.const 10 i32.add call $~lib/map/Map#set - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -16022,10 +15926,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#get - local.get $3 + local.get $2 i32.wrap_i64 i32.const 10 i32.add @@ -16038,14 +15942,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i64.const 1 i64.add - local.set $3 + local.set $2 br $for-loop|0 end end - local.get $10 + local.get $9 i32.load offset=20 i32.const 100 i32.ne @@ -16058,14 +15962,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $2 loop $for-loop|1 - local.get $3 + local.get $2 i64.const 100 i64.lt_s if - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -16076,10 +15980,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#get - local.get $3 + local.get $2 i32.wrap_i64 i32.const 10 i32.add @@ -16092,15 +15996,15 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 - local.get $3 + local.get $9 + local.get $2 + local.get $2 i32.wrap_i64 i32.const 20 i32.add call $~lib/map/Map#set - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -16111,10 +16015,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#get - local.get $3 + local.get $2 i32.wrap_i64 i32.const 20 i32.add @@ -16127,14 +16031,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i64.const 1 i64.add - local.set $3 + local.set $2 br $for-loop|1 end end - local.get $10 + local.get $9 i32.load offset=20 i32.const 100 i32.ne @@ -16147,7 +16051,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $3 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -16159,10 +16063,10 @@ local.tee $4 i32.const 0 i32.store - local.get $10 + local.get $9 i32.load offset=8 local.set $5 - local.get $10 + local.get $9 i32.load offset=16 local.set $6 local.get $4 @@ -16174,25 +16078,25 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $7 + local.tee $8 i64.const 0 i64.store - local.get $7 + local.get $8 i32.const 16 i32.const 21 call $~lib/rt/itcms/__new - local.tee $11 + local.tee $10 i32.store - local.get $11 + local.get $10 i32.const 0 i32.store - local.get $11 + local.get $10 i32.const 0 i32.store offset=4 - local.get $11 + local.get $10 i32.const 0 i32.store offset=8 - local.get $11 + local.get $10 i32.const 0 i32.store offset=12 local.get $6 @@ -16215,27 +16119,27 @@ select i32.const 3 i32.shl - local.tee $7 + local.tee $8 i32.const 0 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $11 i32.store offset=4 + local.get $10 local.get $11 - local.get $8 i32.store - local.get $8 + local.get $11 if + local.get $10 local.get $11 - local.get $8 call $byn-split-outlined-A$~lib/rt/itcms/__link end + local.get $10 local.get $11 - local.get $8 i32.store offset=4 - local.get $11 - local.get $7 + local.get $10 + local.get $8 i32.store offset=8 - local.get $11 + local.get $10 local.get $6 i32.store offset=12 global.get $~lib/memory/__stack_pointer @@ -16243,7 +16147,7 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $4 - local.get $11 + local.get $10 i32.store loop $for-loop|02 local.get $1 @@ -16261,7 +16165,7 @@ i32.and i32.eqz if - local.get $11 + local.get $10 local.get $0 local.get $4 i64.load @@ -16278,25 +16182,25 @@ br $for-loop|02 end end - local.get $11 + local.get $10 local.get $0 i32.const 3 i32.const 0 call $~lib/array/ensureCapacity - local.get $11 + local.get $10 local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $2 - local.get $11 + local.get $3 + local.get $10 i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $10 + local.get $9 call $~lib/map/Map#values - local.tee $12 + local.tee $4 i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer @@ -16315,65 +16219,62 @@ i32.const 24 i32.const 22 call $~lib/rt/itcms/__new - local.tee $13 + local.tee $11 i32.store - local.get $13 + local.get $11 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.tee $1 i32.store local.get $1 if - local.get $13 + local.get $11 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $13 + local.get $11 i32.const 3 i32.store offset=4 - local.get $13 + local.get $11 i32.const 96 call $~lib/arraybuffer/ArrayBuffer#constructor local.tee $1 i32.store offset=8 local.get $1 if - local.get $13 + local.get $11 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $13 + local.get $11 i32.const 4 i32.store offset=12 - local.get $13 + local.get $11 i32.const 0 i32.store offset=16 - local.get $13 + local.get $11 i32.const 0 i32.store offset=20 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $13 + local.get $11 i32.store offset=12 global.get $~lib/memory/__stack_pointer call $~lib/map/Map#constructor - local.tee $14 + local.tee $6 i32.store offset=16 - i32.const 0 - local.set $0 loop $for-loop|2 - local.get $11 + local.get $10 i32.load offset=12 - local.get $0 + local.get $7 i32.gt_s if - local.get $0 - local.tee $1 - local.get $11 + local.get $10 i32.load offset=12 - i32.ge_u + local.get $7 + i32.le_u if i32.const 1248 i32.const 1728 @@ -16382,20 +16283,20 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $10 i32.load offset=4 - local.get $1 + local.get $7 i32.const 3 i32.shl i32.add i64.load - local.set $3 - local.get $12 - local.get $1 + local.set $12 + local.get $4 + local.get $7 call $~lib/array/Array#__get - local.set $15 - local.get $10 - local.get $3 + local.set $5 + local.get $9 + local.get $12 call $~lib/map/Map#has i32.eqz if @@ -16406,8 +16307,8 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $15 + local.get $9 + local.get $5 i32.const 20 i32.sub i64.extend_i32_s @@ -16432,9 +16333,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - local.get $13 + local.get $11 i32.load - local.get $3 + local.get $12 i32.wrap_i64 i32.const -1028477379 i32.mul @@ -16444,7 +16345,7 @@ i32.rotl i32.const 668265263 i32.mul - local.get $3 + local.get $12 i64.const 32 i64.shr_u i32.wrap_i64 @@ -16474,8 +16375,8 @@ i32.const 16 i32.shr_u i32.xor - local.tee $5 - local.get $13 + local.tee $3 + local.get $11 i32.load offset=4 i32.and i32.const 2 @@ -16489,19 +16390,19 @@ if local.get $0 i32.load offset=16 - local.tee $2 + local.tee $1 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 + local.get $12 local.get $0 i64.load i64.eq end br_if $__inlined_func$~lib/map/Map#find - local.get $2 + local.get $1 i32.const -2 i32.and local.set $0 @@ -16514,18 +16415,18 @@ local.get $0 if local.get $0 - local.get $3 + local.get $12 i64.store offset=8 else - local.get $13 + local.get $11 i32.load offset=16 - local.get $13 + local.get $11 i32.load offset=12 i32.eq if - local.get $13 + local.get $11 i32.load offset=20 - local.get $13 + local.get $11 i32.load offset=12 i32.const 3 i32.mul @@ -16533,17 +16434,17 @@ i32.div_s i32.lt_s if (result i32) - local.get $13 + local.get $11 i32.load offset=4 else - local.get $13 + local.get $11 i32.load offset=4 i32.const 1 i32.shl i32.const 1 i32.or end - local.set $8 + local.set $13 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -16557,14 +16458,14 @@ i64.const 0 i64.store local.get $0 - local.get $8 + local.get $13 i32.const 1 i32.add local.tee $0 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $9 + local.tee $14 i32.store global.get $~lib/memory/__stack_pointer local.get $0 @@ -16572,45 +16473,45 @@ i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $15 i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $2 + local.tee $1 i32.store offset=4 - local.get $13 + local.get $11 i32.load offset=8 - local.tee $4 - local.get $13 + local.tee $8 + local.get $11 i32.load offset=16 i32.const 24 i32.mul i32.add - local.set $7 - local.get $2 + local.set $16 + local.get $1 local.set $0 loop $while-continue|00 - local.get $4 - local.get $7 + local.get $8 + local.get $16 i32.ne if - local.get $4 + local.get $8 i32.load offset=16 i32.const 1 i32.and i32.eqz if local.get $0 - local.get $4 + local.get $8 i64.load - local.tee $16 + local.tee $2 i64.store local.get $0 - local.get $4 + local.get $8 i64.load offset=8 i64.store offset=8 local.get $0 - local.get $16 + local.get $2 i32.wrap_i64 i32.const -1028477379 i32.mul @@ -16620,7 +16521,7 @@ i32.rotl i32.const 668265263 i32.mul - local.get $16 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 @@ -16650,11 +16551,11 @@ i32.const 16 i32.shr_u i32.xor - local.get $8 + local.get $13 i32.and i32.const 2 i32.shl - local.get $9 + local.get $14 i32.add local.tee $17 i32.load @@ -16667,39 +16568,39 @@ i32.add local.set $0 end - local.get $4 + local.get $8 i32.const 24 i32.add - local.set $4 + local.set $8 br $while-continue|00 end end - local.get $13 - local.get $9 + local.get $11 + local.get $14 i32.store - local.get $9 + local.get $14 if - local.get $13 - local.get $9 + local.get $11 + local.get $14 call $byn-split-outlined-A$~lib/rt/itcms/__link end + local.get $11 local.get $13 - local.get $8 i32.store offset=4 - local.get $13 - local.get $2 + local.get $11 + local.get $1 i32.store offset=8 - local.get $2 + local.get $1 if - local.get $13 - local.get $2 + local.get $11 + local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $13 - local.get $6 + local.get $11 + local.get $15 i32.store offset=12 - local.get $13 - local.get $13 + local.get $11 + local.get $11 i32.load offset=20 i32.store offset=16 global.get $~lib/memory/__stack_pointer @@ -16708,48 +16609,48 @@ global.set $~lib/memory/__stack_pointer end global.get $~lib/memory/__stack_pointer - local.get $13 + local.get $11 i32.load offset=8 local.tee $0 i32.store - local.get $13 - local.get $13 + local.get $11 + local.get $11 i32.load offset=16 - local.tee $2 + local.tee $1 i32.const 1 i32.add i32.store offset=16 - local.get $2 + local.get $1 i32.const 24 i32.mul local.get $0 i32.add local.tee $0 - local.get $3 + local.get $12 i64.store local.get $0 - local.get $3 + local.get $12 i64.store offset=8 - local.get $13 - local.get $13 + local.get $11 + local.get $11 i32.load offset=20 i32.const 1 i32.add i32.store offset=20 local.get $0 - local.get $13 + local.get $11 i32.load - local.get $13 + local.get $11 i32.load offset=4 - local.get $5 + local.get $3 i32.and i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $1 i32.load i32.store offset=16 - local.get $2 + local.get $1 local.get $0 i32.store end @@ -16757,21 +16658,21 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $14 - local.get $15 + local.get $6 + local.get $5 i32.const 20 i32.sub local.tee $0 local.get $0 call $~lib/map/Map#set - local.get $1 + local.get $7 i32.const 1 i32.add - local.set $0 + local.set $7 br $for-loop|2 end end - local.get $13 + local.get $11 i32.load offset=20 i32.const 100 i32.ne @@ -16783,7 +16684,7 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $6 i32.load offset=20 i32.const 100 i32.ne @@ -16796,14 +16697,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $2 loop $for-loop|3 - local.get $3 + local.get $2 i64.const 50 i64.lt_s if - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -16814,10 +16715,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#get - local.get $3 + local.get $2 i32.wrap_i64 i32.const 20 i32.add @@ -16830,11 +16731,11 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#delete - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -16844,14 +16745,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i64.const 1 i64.add - local.set $3 + local.set $2 br $for-loop|3 end end - local.get $10 + local.get $9 i32.load offset=20 i32.const 50 i32.ne @@ -16864,14 +16765,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $2 loop $for-loop|4 - local.get $3 + local.get $2 i64.const 50 i64.lt_s if - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -16881,15 +16782,15 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 - local.get $3 + local.get $9 + local.get $2 + local.get $2 i32.wrap_i64 i32.const 10 i32.add call $~lib/map/Map#set - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -16900,11 +16801,11 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#delete - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -16914,14 +16815,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i64.const 1 i64.add - local.set $3 + local.set $2 br $for-loop|4 end end - local.get $10 + local.get $9 i32.load offset=20 i32.const 50 i32.ne @@ -16933,9 +16834,9 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $9 call $~lib/map/Map#clear - local.get $10 + local.get $9 i32.load offset=20 if i32.const 0 @@ -17078,7 +16979,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 + local.tee $7 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -17086,7 +16987,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $5 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor @@ -17094,33 +16995,33 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $8 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $8 + local.set $4 local.get $3 local.set $2 loop $while-continue|0 - local.get $5 + local.get $4 local.get $8 i32.ne if - local.get $5 + local.get $8 i32.load offset=12 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $5 + local.get $8 i64.load local.tee $6 i64.store local.get $2 - local.get $5 + local.get $8 i32.load offset=8 i32.store offset=8 local.get $2 @@ -17168,7 +17069,7 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $7 i32.add local.tee $9 i32.load @@ -17181,20 +17082,20 @@ i32.add local.set $2 end - local.get $5 + local.get $8 i32.const 16 i32.add - local.set $5 + local.set $8 br $while-continue|0 end end local.get $0 - local.get $4 + local.get $7 i32.store - local.get $4 + local.get $7 if local.get $0 - local.get $4 + local.get $7 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 @@ -17210,7 +17111,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $7 + local.get $5 i32.store offset=12 local.get $0 local.get $0 @@ -17450,8 +17351,8 @@ (func $std/map/testNumeric (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -17460,11 +17361,11 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) + (local $12 i64) (local $13 i32) (local $14 i32) (local $15 i32) - (local $16 i64) + (local $16 i32) (local $17 i32) global.get $~lib/memory/__stack_pointer i32.const 20 @@ -17476,16 +17377,16 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $3 i64.const 0 i64.store - local.get $2 + local.get $3 i64.const 0 i64.store offset=8 - local.get $2 + local.get $3 i32.const 0 i32.store offset=16 - local.get $2 + local.get $3 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -17501,56 +17402,56 @@ i32.const 24 i32.const 23 call $~lib/rt/itcms/__new - local.tee $10 + local.tee $9 i32.store - local.get $10 + local.get $9 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.tee $4 i32.store local.get $4 if - local.get $10 + local.get $9 local.get $4 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $10 + local.get $9 i32.const 3 i32.store offset=4 - local.get $10 + local.get $9 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor local.tee $4 i32.store offset=8 local.get $4 if - local.get $10 + local.get $9 local.get $4 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $10 + local.get $9 i32.const 4 i32.store offset=12 - local.get $10 + local.get $9 i32.const 0 i32.store offset=16 - local.get $10 + local.get $9 i32.const 0 i32.store offset=20 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $2 - local.get $10 + local.get $3 + local.get $9 i32.store loop $for-loop|0 - local.get $3 + local.get $2 i64.const 100 i64.lt_u if - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -17560,15 +17461,15 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 - local.get $3 + local.get $9 + local.get $2 + local.get $2 i32.wrap_i64 i32.const 10 i32.add call $~lib/map/Map#set - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -17579,10 +17480,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#get - local.get $3 + local.get $2 i32.wrap_i64 i32.const 10 i32.add @@ -17595,14 +17496,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i64.const 1 i64.add - local.set $3 + local.set $2 br $for-loop|0 end end - local.get $10 + local.get $9 i32.load offset=20 i32.const 100 i32.ne @@ -17615,14 +17516,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $2 loop $for-loop|1 - local.get $3 + local.get $2 i64.const 100 i64.lt_u if - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -17633,10 +17534,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#get - local.get $3 + local.get $2 i32.wrap_i64 i32.const 10 i32.add @@ -17649,15 +17550,15 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 - local.get $3 + local.get $9 + local.get $2 + local.get $2 i32.wrap_i64 i32.const 20 i32.add call $~lib/map/Map#set - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -17668,10 +17569,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#get - local.get $3 + local.get $2 i32.wrap_i64 i32.const 20 i32.add @@ -17684,14 +17585,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i64.const 1 i64.add - local.set $3 + local.set $2 br $for-loop|1 end end - local.get $10 + local.get $9 i32.load offset=20 i32.const 100 i32.ne @@ -17704,7 +17605,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $3 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -17716,10 +17617,10 @@ local.tee $4 i32.const 0 i32.store - local.get $10 + local.get $9 i32.load offset=8 local.set $5 - local.get $10 + local.get $9 i32.load offset=16 local.set $6 local.get $4 @@ -17731,25 +17632,25 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $7 + local.tee $8 i64.const 0 i64.store - local.get $7 + local.get $8 i32.const 16 i32.const 24 call $~lib/rt/itcms/__new - local.tee $11 + local.tee $10 i32.store - local.get $11 + local.get $10 i32.const 0 i32.store - local.get $11 + local.get $10 i32.const 0 i32.store offset=4 - local.get $11 + local.get $10 i32.const 0 i32.store offset=8 - local.get $11 + local.get $10 i32.const 0 i32.store offset=12 local.get $6 @@ -17772,27 +17673,27 @@ select i32.const 3 i32.shl - local.tee $7 + local.tee $8 i32.const 0 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $11 i32.store offset=4 + local.get $10 local.get $11 - local.get $8 i32.store - local.get $8 + local.get $11 if + local.get $10 local.get $11 - local.get $8 call $byn-split-outlined-A$~lib/rt/itcms/__link end + local.get $10 local.get $11 - local.get $8 i32.store offset=4 - local.get $11 - local.get $7 + local.get $10 + local.get $8 i32.store offset=8 - local.get $11 + local.get $10 local.get $6 i32.store offset=12 global.get $~lib/memory/__stack_pointer @@ -17800,7 +17701,7 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $4 - local.get $11 + local.get $10 i32.store loop $for-loop|02 local.get $1 @@ -17818,7 +17719,7 @@ i32.and i32.eqz if - local.get $11 + local.get $10 local.get $0 local.get $4 i64.load @@ -17835,25 +17736,25 @@ br $for-loop|02 end end - local.get $11 + local.get $10 local.get $0 i32.const 3 i32.const 0 call $~lib/array/ensureCapacity - local.get $11 + local.get $10 local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $2 - local.get $11 + local.get $3 + local.get $10 i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $10 + local.get $9 call $~lib/map/Map#values - local.tee $12 + local.tee $4 i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer @@ -17872,65 +17773,62 @@ i32.const 24 i32.const 25 call $~lib/rt/itcms/__new - local.tee $13 + local.tee $11 i32.store - local.get $13 + local.get $11 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.tee $1 i32.store local.get $1 if - local.get $13 + local.get $11 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $13 + local.get $11 i32.const 3 i32.store offset=4 - local.get $13 + local.get $11 i32.const 96 call $~lib/arraybuffer/ArrayBuffer#constructor local.tee $1 i32.store offset=8 local.get $1 if - local.get $13 + local.get $11 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $13 + local.get $11 i32.const 4 i32.store offset=12 - local.get $13 + local.get $11 i32.const 0 i32.store offset=16 - local.get $13 + local.get $11 i32.const 0 i32.store offset=20 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $13 + local.get $11 i32.store offset=12 global.get $~lib/memory/__stack_pointer call $~lib/map/Map#constructor - local.tee $14 + local.tee $6 i32.store offset=16 - i32.const 0 - local.set $0 loop $for-loop|2 - local.get $11 + local.get $10 i32.load offset=12 - local.get $0 + local.get $7 i32.gt_s if - local.get $0 - local.tee $1 - local.get $11 + local.get $10 i32.load offset=12 - i32.ge_u + local.get $7 + i32.le_u if i32.const 1248 i32.const 1728 @@ -17939,20 +17837,20 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $10 i32.load offset=4 - local.get $1 + local.get $7 i32.const 3 i32.shl i32.add i64.load - local.set $3 - local.get $12 - local.get $1 + local.set $12 + local.get $4 + local.get $7 call $~lib/array/Array#__get - local.set $15 - local.get $10 - local.get $3 + local.set $5 + local.get $9 + local.get $12 call $~lib/map/Map#has i32.eqz if @@ -17963,8 +17861,8 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $15 + local.get $9 + local.get $5 i32.const 20 i32.sub i64.extend_i32_s @@ -17989,9 +17887,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - local.get $13 + local.get $11 i32.load - local.get $3 + local.get $12 i32.wrap_i64 i32.const -1028477379 i32.mul @@ -18001,7 +17899,7 @@ i32.rotl i32.const 668265263 i32.mul - local.get $3 + local.get $12 i64.const 32 i64.shr_u i32.wrap_i64 @@ -18031,8 +17929,8 @@ i32.const 16 i32.shr_u i32.xor - local.tee $5 - local.get $13 + local.tee $3 + local.get $11 i32.load offset=4 i32.and i32.const 2 @@ -18046,19 +17944,19 @@ if local.get $0 i32.load offset=16 - local.tee $2 + local.tee $1 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 + local.get $12 local.get $0 i64.load i64.eq end br_if $__inlined_func$~lib/map/Map#find - local.get $2 + local.get $1 i32.const -2 i32.and local.set $0 @@ -18071,18 +17969,18 @@ local.get $0 if local.get $0 - local.get $3 + local.get $12 i64.store offset=8 else - local.get $13 + local.get $11 i32.load offset=16 - local.get $13 + local.get $11 i32.load offset=12 i32.eq if - local.get $13 + local.get $11 i32.load offset=20 - local.get $13 + local.get $11 i32.load offset=12 i32.const 3 i32.mul @@ -18090,17 +17988,17 @@ i32.div_s i32.lt_s if (result i32) - local.get $13 + local.get $11 i32.load offset=4 else - local.get $13 + local.get $11 i32.load offset=4 i32.const 1 i32.shl i32.const 1 i32.or end - local.set $8 + local.set $13 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -18114,14 +18012,14 @@ i64.const 0 i64.store local.get $0 - local.get $8 + local.get $13 i32.const 1 i32.add local.tee $0 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $9 + local.tee $14 i32.store global.get $~lib/memory/__stack_pointer local.get $0 @@ -18129,45 +18027,45 @@ i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $15 i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $2 + local.tee $1 i32.store offset=4 - local.get $13 + local.get $11 i32.load offset=8 - local.tee $4 - local.get $13 + local.tee $8 + local.get $11 i32.load offset=16 i32.const 24 i32.mul i32.add - local.set $7 - local.get $2 + local.set $16 + local.get $1 local.set $0 loop $while-continue|00 - local.get $4 - local.get $7 + local.get $8 + local.get $16 i32.ne if - local.get $4 + local.get $8 i32.load offset=16 i32.const 1 i32.and i32.eqz if local.get $0 - local.get $4 + local.get $8 i64.load - local.tee $16 + local.tee $2 i64.store local.get $0 - local.get $4 + local.get $8 i64.load offset=8 i64.store offset=8 local.get $0 - local.get $16 + local.get $2 i32.wrap_i64 i32.const -1028477379 i32.mul @@ -18177,7 +18075,7 @@ i32.rotl i32.const 668265263 i32.mul - local.get $16 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 @@ -18207,11 +18105,11 @@ i32.const 16 i32.shr_u i32.xor - local.get $8 + local.get $13 i32.and i32.const 2 i32.shl - local.get $9 + local.get $14 i32.add local.tee $17 i32.load @@ -18224,39 +18122,39 @@ i32.add local.set $0 end - local.get $4 + local.get $8 i32.const 24 i32.add - local.set $4 + local.set $8 br $while-continue|00 end end - local.get $13 - local.get $9 + local.get $11 + local.get $14 i32.store - local.get $9 + local.get $14 if - local.get $13 - local.get $9 + local.get $11 + local.get $14 call $byn-split-outlined-A$~lib/rt/itcms/__link end + local.get $11 local.get $13 - local.get $8 i32.store offset=4 - local.get $13 - local.get $2 + local.get $11 + local.get $1 i32.store offset=8 - local.get $2 + local.get $1 if - local.get $13 - local.get $2 + local.get $11 + local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $13 - local.get $6 + local.get $11 + local.get $15 i32.store offset=12 - local.get $13 - local.get $13 + local.get $11 + local.get $11 i32.load offset=20 i32.store offset=16 global.get $~lib/memory/__stack_pointer @@ -18265,48 +18163,48 @@ global.set $~lib/memory/__stack_pointer end global.get $~lib/memory/__stack_pointer - local.get $13 + local.get $11 i32.load offset=8 local.tee $0 i32.store - local.get $13 - local.get $13 + local.get $11 + local.get $11 i32.load offset=16 - local.tee $2 + local.tee $1 i32.const 1 i32.add i32.store offset=16 - local.get $2 + local.get $1 i32.const 24 i32.mul local.get $0 i32.add local.tee $0 - local.get $3 + local.get $12 i64.store local.get $0 - local.get $3 + local.get $12 i64.store offset=8 - local.get $13 - local.get $13 + local.get $11 + local.get $11 i32.load offset=20 i32.const 1 i32.add i32.store offset=20 local.get $0 - local.get $13 + local.get $11 i32.load - local.get $13 + local.get $11 i32.load offset=4 - local.get $5 + local.get $3 i32.and i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $1 i32.load i32.store offset=16 - local.get $2 + local.get $1 local.get $0 i32.store end @@ -18314,21 +18212,21 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $14 - local.get $15 + local.get $6 + local.get $5 i32.const 20 i32.sub local.tee $0 local.get $0 call $~lib/map/Map#set - local.get $1 + local.get $7 i32.const 1 i32.add - local.set $0 + local.set $7 br $for-loop|2 end end - local.get $13 + local.get $11 i32.load offset=20 i32.const 100 i32.ne @@ -18340,7 +18238,7 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $6 i32.load offset=20 i32.const 100 i32.ne @@ -18353,14 +18251,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $2 loop $for-loop|3 - local.get $3 + local.get $2 i64.const 50 i64.lt_u if - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -18371,10 +18269,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#get - local.get $3 + local.get $2 i32.wrap_i64 i32.const 20 i32.add @@ -18387,11 +18285,11 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#delete - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -18401,14 +18299,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i64.const 1 i64.add - local.set $3 + local.set $2 br $for-loop|3 end end - local.get $10 + local.get $9 i32.load offset=20 i32.const 50 i32.ne @@ -18421,14 +18319,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $2 loop $for-loop|4 - local.get $3 + local.get $2 i64.const 50 i64.lt_u if - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -18438,15 +18336,15 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 - local.get $3 + local.get $9 + local.get $2 + local.get $2 i32.wrap_i64 i32.const 10 i32.add call $~lib/map/Map#set - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -18457,11 +18355,11 @@ call $~lib/builtins/abort unreachable end - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#delete - local.get $10 - local.get $3 + local.get $9 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -18471,14 +18369,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i64.const 1 i64.add - local.set $3 + local.set $2 br $for-loop|4 end end - local.get $10 + local.get $9 i32.load offset=20 i32.const 50 i32.ne @@ -18490,9 +18388,9 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $9 call $~lib/map/Map#clear - local.get $10 + local.get $9 i32.load offset=20 if i32.const 0 @@ -18518,11 +18416,11 @@ (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) + (local $8 i32) (local $9 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -18551,7 +18449,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 + local.tee $7 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -18567,37 +18465,37 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $8 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 + local.set $5 local.get $3 local.set $2 loop $while-continue|0 local.get $5 - local.get $7 + local.get $8 i32.ne if - local.get $5 + local.get $8 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $5 + local.get $8 f32.load - local.tee $8 + local.tee $4 f32.store local.get $2 - local.get $5 + local.get $8 i32.load offset=4 i32.store offset=4 local.get $2 - local.get $8 + local.get $4 i32.reinterpret_f32 i32.const -1028477379 i32.mul @@ -18630,7 +18528,7 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $7 i32.add local.tee $9 i32.load @@ -18643,20 +18541,20 @@ i32.add local.set $2 end - local.get $5 + local.get $8 i32.const 12 i32.add - local.set $5 + local.set $8 br $while-continue|0 end end local.get $0 - local.get $4 + local.get $7 i32.store - local.get $4 + local.get $7 if local.get $0 - local.get $4 + local.get $7 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 @@ -18891,9 +18789,9 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f32) (local $4 i32) - (local $5 f32) + (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -18916,16 +18814,16 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $0 i64.const 0 i64.store - local.get $2 + local.get $0 i64.const 0 i64.store offset=8 - local.get $2 + local.get $0 i32.const 0 i32.store offset=16 - local.get $2 + local.get $0 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -18934,66 +18832,66 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $4 i32.const 0 i32.store - local.get $3 + local.get $4 i32.const 24 i32.const 26 call $~lib/rt/itcms/__new - local.tee $4 + local.tee $10 i32.store - local.get $4 + local.get $10 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 if + local.get $10 local.get $4 - local.get $3 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $4 + local.get $10 i32.const 3 i32.store offset=4 - local.get $4 + local.get $10 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $4 i32.store offset=8 - local.get $3 + local.get $4 if + local.get $10 local.get $4 - local.get $3 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $4 + local.get $10 i32.const 4 i32.store offset=12 - local.get $4 + local.get $10 i32.const 0 i32.store offset=16 - local.get $4 + local.get $10 i32.const 0 i32.store offset=20 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $2 - local.get $4 + local.get $0 + local.get $10 i32.store loop $for-loop|0 - local.get $5 + local.get $3 f32.const 100 f32.lt if - local.get $4 + local.get $10 i32.load - local.get $4 + local.get $10 i32.load offset=4 - local.get $5 + local.get $3 i32.reinterpret_f32 i32.const -1028477379 i32.mul @@ -19003,22 +18901,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 16 i32.shr_u i32.xor @@ -19027,36 +18925,36 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 block $__inlined_func$~lib/map/Map#find loop $while-continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 - local.tee $3 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $5 - local.get $2 + local.get $3 + local.get $0 f32.load f32.eq end br_if $__inlined_func$~lib/map/Map#find - local.get $3 + local.get $4 i32.const -2 i32.and - local.set $2 + local.set $0 br $while-continue|0 end end i32.const 0 - local.set $2 + local.set $0 end - local.get $2 + local.get $0 if i32.const 0 i32.const 1568 @@ -19065,18 +18963,18 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 - local.get $5 + local.get $10 + local.get $3 + local.get $3 i32.trunc_f32_s i32.const 10 i32.add call $~lib/map/Map#set - local.get $4 + local.get $10 i32.load - local.get $4 + local.get $10 i32.load offset=4 - local.get $5 + local.get $3 i32.reinterpret_f32 i32.const -1028477379 i32.mul @@ -19086,22 +18984,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 16 i32.shr_u i32.xor @@ -19110,36 +19008,36 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 block $__inlined_func$~lib/map/Map#find1 loop $while-continue|02 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 - local.tee $3 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $5 - local.get $2 + local.get $3 + local.get $0 f32.load f32.eq end br_if $__inlined_func$~lib/map/Map#find1 - local.get $3 + local.get $4 i32.const -2 i32.and - local.set $2 + local.set $0 br $while-continue|02 end end i32.const 0 - local.set $2 + local.set $0 end - local.get $2 + local.get $0 i32.eqz if i32.const 0 @@ -19149,10 +19047,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $10 + local.get $3 call $~lib/map/Map#get - local.get $5 + local.get $3 i32.trunc_f32_s i32.const 10 i32.add @@ -19165,14 +19063,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 f32.const 1 f32.add - local.set $5 + local.set $3 br $for-loop|0 end end - local.get $4 + local.get $10 i32.load offset=20 i32.const 100 i32.ne @@ -19185,17 +19083,17 @@ unreachable end f32.const 0 - local.set $5 + local.set $3 loop $for-loop|1 - local.get $5 + local.get $3 f32.const 100 f32.lt if - local.get $4 + local.get $10 i32.load - local.get $4 + local.get $10 i32.load offset=4 - local.get $5 + local.get $3 i32.reinterpret_f32 i32.const -1028477379 i32.mul @@ -19205,22 +19103,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 16 i32.shr_u i32.xor @@ -19229,36 +19127,36 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 block $__inlined_func$~lib/map/Map#find4 loop $while-continue|05 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 - local.tee $3 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $5 - local.get $2 + local.get $3 + local.get $0 f32.load f32.eq end br_if $__inlined_func$~lib/map/Map#find4 - local.get $3 + local.get $4 i32.const -2 i32.and - local.set $2 + local.set $0 br $while-continue|05 end end i32.const 0 - local.set $2 + local.set $0 end - local.get $2 + local.get $0 i32.eqz if i32.const 0 @@ -19268,10 +19166,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $10 + local.get $3 call $~lib/map/Map#get - local.get $5 + local.get $3 i32.trunc_f32_s i32.const 10 i32.add @@ -19284,18 +19182,18 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 - local.get $5 + local.get $10 + local.get $3 + local.get $3 i32.trunc_f32_s i32.const 20 i32.add call $~lib/map/Map#set - local.get $4 + local.get $10 i32.load - local.get $4 + local.get $10 i32.load offset=4 - local.get $5 + local.get $3 i32.reinterpret_f32 i32.const -1028477379 i32.mul @@ -19305,22 +19203,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 16 i32.shr_u i32.xor @@ -19329,36 +19227,36 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 block $__inlined_func$~lib/map/Map#find7 loop $while-continue|08 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 - local.tee $3 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $5 - local.get $2 + local.get $3 + local.get $0 f32.load f32.eq end br_if $__inlined_func$~lib/map/Map#find7 - local.get $3 + local.get $4 i32.const -2 i32.and - local.set $2 + local.set $0 br $while-continue|08 end end i32.const 0 - local.set $2 + local.set $0 end - local.get $2 + local.get $0 i32.eqz if i32.const 0 @@ -19368,10 +19266,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $10 + local.get $3 call $~lib/map/Map#get - local.get $5 + local.get $3 i32.trunc_f32_s i32.const 20 i32.add @@ -19384,14 +19282,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 f32.const 1 f32.add - local.set $5 + local.set $3 br $for-loop|1 end end - local.get $4 + local.get $10 i32.load offset=20 i32.const 100 i32.ne @@ -19404,7 +19302,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $6 + local.tee $4 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -19413,16 +19311,16 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $0 i32.const 0 i32.store - local.get $4 + local.get $10 i32.load offset=8 - local.set $7 - local.get $4 + local.set $5 + local.get $10 i32.load offset=16 - local.set $8 - local.get $2 + local.set $6 + local.get $0 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -19431,28 +19329,28 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $7 i64.const 0 i64.store - local.get $3 + local.get $7 i32.const 16 i32.const 27 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $11 i32.store - local.get $3 + local.get $11 i32.const 0 i32.store - local.get $3 + local.get $11 i32.const 0 i32.store offset=4 - local.get $3 + local.get $11 i32.const 0 i32.store offset=8 - local.get $3 + local.get $11 i32.const 0 i32.store offset=12 - local.get $8 + local.get $6 i32.const 268435455 i32.gt_u if @@ -19464,74 +19362,74 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $6 i32.const 8 - local.get $8 + local.get $6 i32.const 8 i32.gt_u select i32.const 2 i32.shl - local.tee $9 + local.tee $7 i32.const 0 call $~lib/rt/itcms/__new - local.tee $10 + local.tee $8 i32.store offset=4 - local.get $3 - local.get $10 + local.get $11 + local.get $8 i32.store - local.get $10 + local.get $8 if - local.get $3 - local.get $10 + local.get $11 + local.get $8 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $3 - local.get $10 + local.get $11 + local.get $8 i32.store offset=4 - local.get $3 - local.get $9 + local.get $11 + local.get $7 i32.store offset=8 - local.get $3 - local.get $8 + local.get $11 + local.get $6 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $2 - local.get $3 + local.get $0 + local.get $11 i32.store loop $for-loop|02 - local.get $0 - local.get $8 + local.get $2 + local.get $6 i32.lt_s if - local.get $0 + local.get $2 i32.const 12 i32.mul - local.get $7 + local.get $5 i32.add - local.tee $2 + local.tee $0 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $2 + local.get $0 f32.load - local.set $5 + local.set $3 local.get $1 - local.tee $2 + local.tee $0 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $11 i32.load offset=12 - local.get $2 + local.get $0 i32.le_u if - local.get $2 + local.get $0 i32.const 0 i32.lt_s if @@ -19542,53 +19440,53 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $2 + local.get $11 + local.get $0 i32.const 1 i32.add - local.tee $9 + local.tee $7 i32.const 2 i32.const 1 call $~lib/array/ensureCapacity - local.get $3 - local.get $9 + local.get $11 + local.get $7 i32.store offset=12 end - local.get $3 + local.get $11 i32.load offset=4 - local.get $2 + local.get $0 i32.const 2 i32.shl i32.add - local.get $5 + local.get $3 f32.store end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|02 end end - local.get $3 + local.get $11 local.get $1 i32.const 2 i32.const 0 call $~lib/array/ensureCapacity - local.get $3 + local.get $11 local.get $1 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $6 - local.get $3 + local.get $4 + local.get $11 i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $10 call $~lib/map/Map#values - local.tee $8 + local.tee $6 i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer @@ -19651,21 +19549,20 @@ i32.store offset=12 global.get $~lib/memory/__stack_pointer call $~lib/map/Map#constructor - local.tee $10 + local.tee $8 i32.store offset=16 i32.const 0 local.set $1 loop $for-loop|2 - local.get $3 + local.get $11 i32.load offset=12 local.get $1 i32.gt_s if - local.get $1 - local.tee $2 - local.get $3 + local.get $11 i32.load offset=12 - i32.ge_u + local.get $1 + i32.le_u if i32.const 1248 i32.const 1728 @@ -19674,23 +19571,23 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $11 i32.load offset=4 - local.get $2 + local.get $1 i32.const 2 i32.shl i32.add f32.load - local.set $5 - local.get $8 - local.get $2 + local.set $3 + local.get $6 + local.get $1 call $~lib/array/Array#__get - local.set $9 - local.get $4 + local.set $7 + local.get $10 i32.load - local.get $4 + local.get $10 i32.load offset=4 - local.get $5 + local.get $3 i32.reinterpret_f32 i32.const -1028477379 i32.mul @@ -19724,36 +19621,36 @@ i32.shl i32.add i32.load - local.set $1 + local.set $0 block $__inlined_func$~lib/map/Map#find10 loop $while-continue|011 - local.get $1 + local.get $0 if - local.get $1 + local.get $0 i32.load offset=8 - local.tee $0 + local.tee $2 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $5 - local.get $1 + local.get $3 + local.get $0 f32.load f32.eq end br_if $__inlined_func$~lib/map/Map#find10 - local.get $0 + local.get $2 i32.const -2 i32.and - local.set $1 + local.set $0 br $while-continue|011 end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.eqz if i32.const 0 @@ -19763,11 +19660,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $10 i32.load - local.get $4 + local.get $10 i32.load offset=4 - local.get $9 + local.get $7 i32.const 20 i32.sub f32.convert_i32_s @@ -19805,36 +19702,36 @@ i32.shl i32.add i32.load - local.set $1 + local.set $0 block $__inlined_func$~lib/map/Map#find13 loop $while-continue|014 - local.get $1 + local.get $0 if - local.get $1 + local.get $0 i32.load offset=8 - local.tee $0 + local.tee $2 i32.const 1 i32.and if (result i32) i32.const 0 else local.get $13 - local.get $1 + local.get $0 f32.load f32.eq end br_if $__inlined_func$~lib/map/Map#find13 - local.get $0 + local.get $2 i32.const -2 i32.and - local.set $1 + local.set $0 br $while-continue|014 end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.eqz if i32.const 0 @@ -19857,7 +19754,7 @@ i32.store local.get $12 i32.load - local.get $5 + local.get $3 i32.reinterpret_f32 i32.const -1028477379 i32.mul @@ -19886,7 +19783,7 @@ i32.shr_u local.get $0 i32.xor - local.tee $7 + local.tee $5 local.get $12 i32.load offset=4 i32.and @@ -19894,13 +19791,12 @@ i32.shl i32.add i32.load - local.set $0 + local.set $2 block $__inlined_func$~lib/map/Map#find15 loop $while-continue|016 - local.get $0 + local.get $2 if - local.get $0 - local.tee $1 + local.get $2 i32.load offset=8 local.tee $0 i32.const 1 @@ -19908,8 +19804,8 @@ if (result i32) i32.const 0 else - local.get $5 - local.get $1 + local.get $3 + local.get $2 f32.load f32.eq end @@ -19917,17 +19813,17 @@ local.get $0 i32.const -2 i32.and - local.set $0 + local.set $2 br $while-continue|016 end end i32.const 0 - local.set $1 + local.set $2 end - local.get $1 + local.get $2 if - local.get $1 - local.get $5 + local.get $2 + local.get $3 f32.store offset=4 else local.get $12 @@ -19985,41 +19881,41 @@ i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $1 + local.tee $2 i32.store offset=4 local.get $12 i32.load offset=8 - local.tee $11 + local.tee $9 local.get $12 i32.load offset=16 i32.const 12 i32.mul i32.add local.set $16 - local.get $1 + local.get $2 local.set $0 loop $while-continue|00 - local.get $11 + local.get $9 local.get $16 i32.ne if - local.get $11 + local.get $9 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $0 - local.get $11 + local.get $9 f32.load local.tee $13 f32.store local.get $0 - local.get $11 + local.get $9 f32.load offset=4 f32.store offset=4 local.get $0 @@ -20069,10 +19965,10 @@ i32.add local.set $0 end - local.get $11 + local.get $9 i32.const 12 i32.add - local.set $11 + local.set $9 br $while-continue|00 end end @@ -20089,16 +19985,16 @@ local.get $14 i32.store offset=4 local.get $12 - local.get $1 + local.get $2 i32.store offset=8 - local.get $1 + local.get $2 if local.get $12 - local.get $1 + local.get $2 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $12 - local.get $6 + local.get $4 i32.store offset=12 local.get $12 local.get $12 @@ -20117,20 +20013,20 @@ local.get $12 local.get $12 i32.load offset=16 - local.tee $1 + local.tee $2 i32.const 1 i32.add i32.store offset=16 - local.get $1 + local.get $2 i32.const 12 i32.mul local.get $0 i32.add local.tee $0 - local.get $5 + local.get $3 f32.store local.get $0 - local.get $5 + local.get $3 f32.store offset=4 local.get $12 local.get $12 @@ -20143,15 +20039,15 @@ i32.load local.get $12 i32.load offset=4 - local.get $7 + local.get $5 i32.and i32.const 2 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store end @@ -20159,14 +20055,14 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $10 - local.get $9 + local.get $8 + local.get $7 i32.const 20 i32.sub local.tee $0 local.get $0 call $~lib/map/Map#set - local.get $2 + local.get $1 i32.const 1 i32.add local.set $1 @@ -20185,7 +20081,7 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $8 i32.load offset=20 i32.const 100 i32.ne @@ -20198,17 +20094,17 @@ unreachable end f32.const 0 - local.set $5 + local.set $3 loop $for-loop|3 - local.get $5 + local.get $3 f32.const 50 f32.lt if - local.get $4 + local.get $10 i32.load - local.get $4 + local.get $10 i32.load offset=4 - local.get $5 + local.get $3 i32.reinterpret_f32 i32.const -1028477379 i32.mul @@ -20242,36 +20138,36 @@ i32.shl i32.add i32.load - local.set $1 + local.set $0 block $__inlined_func$~lib/map/Map#find18 loop $while-continue|019 - local.get $1 + local.get $0 if - local.get $1 + local.get $0 i32.load offset=8 - local.tee $0 + local.tee $1 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $5 - local.get $1 + local.get $3 + local.get $0 f32.load f32.eq end br_if $__inlined_func$~lib/map/Map#find18 - local.get $0 + local.get $1 i32.const -2 i32.and - local.set $1 + local.set $0 br $while-continue|019 end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.eqz if i32.const 0 @@ -20281,10 +20177,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $10 + local.get $3 call $~lib/map/Map#get - local.get $5 + local.get $3 i32.trunc_f32_s i32.const 20 i32.add @@ -20297,14 +20193,14 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $10 + local.get $3 call $~lib/map/Map#delete - local.get $4 + local.get $10 i32.load - local.get $4 + local.get $10 i32.load offset=4 - local.get $5 + local.get $3 i32.reinterpret_f32 i32.const -1028477379 i32.mul @@ -20338,36 +20234,36 @@ i32.shl i32.add i32.load - local.set $1 + local.set $0 block $__inlined_func$~lib/map/Map#find21 loop $while-continue|022 - local.get $1 + local.get $0 if - local.get $1 + local.get $0 i32.load offset=8 - local.tee $0 + local.tee $1 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $5 - local.get $1 + local.get $3 + local.get $0 f32.load f32.eq end br_if $__inlined_func$~lib/map/Map#find21 - local.get $0 + local.get $1 i32.const -2 i32.and - local.set $1 + local.set $0 br $while-continue|022 end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 if i32.const 0 i32.const 1568 @@ -20376,14 +20272,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 f32.const 1 f32.add - local.set $5 + local.set $3 br $for-loop|3 end end - local.get $4 + local.get $10 i32.load offset=20 i32.const 50 i32.ne @@ -20396,17 +20292,17 @@ unreachable end f32.const 0 - local.set $5 + local.set $3 loop $for-loop|4 - local.get $5 + local.get $3 f32.const 50 f32.lt if - local.get $4 + local.get $10 i32.load - local.get $4 + local.get $10 i32.load offset=4 - local.get $5 + local.get $3 i32.reinterpret_f32 i32.const -1028477379 i32.mul @@ -20440,36 +20336,36 @@ i32.shl i32.add i32.load - local.set $1 + local.set $0 block $__inlined_func$~lib/map/Map#find24 loop $while-continue|025 - local.get $1 + local.get $0 if - local.get $1 + local.get $0 i32.load offset=8 - local.tee $0 + local.tee $1 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $5 - local.get $1 + local.get $3 + local.get $0 f32.load f32.eq end br_if $__inlined_func$~lib/map/Map#find24 - local.get $0 + local.get $1 i32.const -2 i32.and - local.set $1 + local.set $0 br $while-continue|025 end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 if i32.const 0 i32.const 1568 @@ -20478,18 +20374,18 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 - local.get $5 + local.get $10 + local.get $3 + local.get $3 i32.trunc_f32_s i32.const 10 i32.add call $~lib/map/Map#set - local.get $4 + local.get $10 i32.load - local.get $4 + local.get $10 i32.load offset=4 - local.get $5 + local.get $3 i32.reinterpret_f32 i32.const -1028477379 i32.mul @@ -20523,36 +20419,36 @@ i32.shl i32.add i32.load - local.set $1 + local.set $0 block $__inlined_func$~lib/map/Map#find27 loop $while-continue|028 - local.get $1 + local.get $0 if - local.get $1 + local.get $0 i32.load offset=8 - local.tee $0 + local.tee $1 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $5 - local.get $1 + local.get $3 + local.get $0 f32.load f32.eq end br_if $__inlined_func$~lib/map/Map#find27 - local.get $0 + local.get $1 i32.const -2 i32.and - local.set $1 + local.set $0 br $while-continue|028 end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.eqz if i32.const 0 @@ -20562,14 +20458,14 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $10 + local.get $3 call $~lib/map/Map#delete - local.get $4 + local.get $10 i32.load - local.get $4 + local.get $10 i32.load offset=4 - local.get $5 + local.get $3 i32.reinterpret_f32 i32.const -1028477379 i32.mul @@ -20603,36 +20499,36 @@ i32.shl i32.add i32.load - local.set $1 + local.set $0 block $__inlined_func$~lib/map/Map#find30 loop $while-continue|031 - local.get $1 + local.get $0 if - local.get $1 + local.get $0 i32.load offset=8 - local.tee $0 + local.tee $1 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $5 - local.get $1 + local.get $3 + local.get $0 f32.load f32.eq end br_if $__inlined_func$~lib/map/Map#find30 - local.get $0 + local.get $1 i32.const -2 i32.and - local.set $1 + local.set $0 br $while-continue|031 end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 if i32.const 0 i32.const 1568 @@ -20641,14 +20537,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 f32.const 1 f32.add - local.set $5 + local.set $3 br $for-loop|4 end end - local.get $4 + local.get $10 i32.load offset=20 i32.const 50 i32.ne @@ -20660,9 +20556,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $10 call $~lib/map/Map#clear - local.get $4 + local.get $10 i32.load offset=20 if i32.const 0 @@ -20775,12 +20671,12 @@ (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $4 i64) + (local $5 f64) (local $6 i32) (local $7 i32) - (local $8 f64) - (local $9 i64) + (local $8 i32) + (local $9 i32) (local $10 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -20809,7 +20705,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 + local.tee $8 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -20817,7 +20713,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor @@ -20825,39 +20721,39 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $9 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $7 + local.set $6 local.get $3 local.set $2 loop $while-continue|0 - local.get $5 - local.get $7 + local.get $6 + local.get $9 i32.ne if - local.get $5 + local.get $9 i32.load offset=12 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $5 + local.get $9 f64.load - local.tee $8 + local.tee $5 f64.store local.get $2 - local.get $5 + local.get $9 i32.load offset=8 i32.store offset=8 local.get $2 - local.get $8 + local.get $5 i64.reinterpret_f64 - local.tee $9 + local.tee $4 i32.wrap_i64 i32.const -1028477379 i32.mul @@ -20867,7 +20763,7 @@ i32.rotl i32.const 668265263 i32.mul - local.get $9 + local.get $4 i64.const 32 i64.shr_u i32.wrap_i64 @@ -20901,7 +20797,7 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $8 i32.add local.tee $10 i32.load @@ -20914,20 +20810,20 @@ i32.add local.set $2 end - local.get $5 + local.get $9 i32.const 16 i32.add - local.set $5 + local.set $9 br $while-continue|0 end end local.get $0 - local.get $4 + local.get $8 i32.store - local.get $4 + local.get $8 if local.get $0 - local.get $4 + local.get $8 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 @@ -20943,7 +20839,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $6 + local.get $7 i32.store offset=12 local.get $0 local.get $0 @@ -21190,21 +21086,21 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 f64) + (local $3 i32) (local $4 i32) (local $5 i64) - (local $6 i32) + (local $6 f64) (local $7 i32) (local $8 i32) (local $9 i32) (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) + (local $13 f64) (local $14 i32) (local $15 i32) (local $16 i32) - (local $17 f64) + (local $17 i32) (local $18 i32) global.get $~lib/memory/__stack_pointer i32.const 20 @@ -21216,16 +21112,16 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $1 i64.const 0 i64.store - local.get $2 + local.get $1 i64.const 0 i64.store offset=8 - local.get $2 + local.get $1 i32.const 0 i32.store offset=16 - local.get $2 + local.get $1 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -21234,63 +21130,63 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $4 + local.tee $0 i32.const 0 i32.store - local.get $4 + local.get $0 i32.const 24 i32.const 29 call $~lib/rt/itcms/__new - local.tee $11 + local.tee $18 i32.store - local.get $11 + local.get $18 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 + local.tee $0 i32.store - local.get $4 + local.get $0 if - local.get $11 - local.get $4 + local.get $18 + local.get $0 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $11 + local.get $18 i32.const 3 i32.store offset=4 - local.get $11 + local.get $18 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $4 + local.tee $0 i32.store offset=8 - local.get $4 + local.get $0 if - local.get $11 - local.get $4 + local.get $18 + local.get $0 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $11 + local.get $18 i32.const 4 i32.store offset=12 - local.get $11 + local.get $18 i32.const 0 i32.store offset=16 - local.get $11 + local.get $18 i32.const 0 i32.store offset=20 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $2 - local.get $11 + local.get $1 + local.get $18 i32.store loop $for-loop|0 - local.get $3 + local.get $6 f64.const 100 f64.lt if - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#has if i32.const 0 @@ -21300,15 +21196,15 @@ call $~lib/builtins/abort unreachable end - local.get $11 - local.get $3 - local.get $3 + local.get $18 + local.get $6 + local.get $6 i32.trunc_f64_s i32.const 10 i32.add call $~lib/map/Map#set - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#has i32.eqz if @@ -21319,10 +21215,10 @@ call $~lib/builtins/abort unreachable end - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#get - local.get $3 + local.get $6 i32.trunc_f64_s i32.const 10 i32.add @@ -21335,14 +21231,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 f64.const 1 f64.add - local.set $3 + local.set $6 br $for-loop|0 end end - local.get $11 + local.get $18 i32.load offset=20 i32.const 100 i32.ne @@ -21355,14 +21251,14 @@ unreachable end f64.const 0 - local.set $3 + local.set $6 loop $for-loop|1 - local.get $3 + local.get $6 f64.const 100 f64.lt if - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#has i32.eqz if @@ -21373,10 +21269,10 @@ call $~lib/builtins/abort unreachable end - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#get - local.get $3 + local.get $6 i32.trunc_f64_s i32.const 10 i32.add @@ -21389,15 +21285,15 @@ call $~lib/builtins/abort unreachable end - local.get $11 - local.get $3 - local.get $3 + local.get $18 + local.get $6 + local.get $6 i32.trunc_f64_s i32.const 20 i32.add call $~lib/map/Map#set - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#has i32.eqz if @@ -21408,10 +21304,10 @@ call $~lib/builtins/abort unreachable end - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#get - local.get $3 + local.get $6 i32.trunc_f64_s i32.const 20 i32.add @@ -21424,14 +21320,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 f64.const 1 f64.add - local.set $3 + local.set $6 br $for-loop|1 end end - local.get $11 + local.get $18 i32.load offset=20 i32.const 100 i32.ne @@ -21444,7 +21340,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $4 + local.tee $9 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -21453,16 +21349,16 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $8 i32.const 0 i32.store - local.get $11 + local.get $18 i32.load offset=8 - local.set $6 - local.get $11 - i32.load offset=16 local.set $7 - local.get $2 + local.get $18 + i32.load offset=16 + local.set $4 + local.get $8 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -21471,28 +21367,28 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $8 + local.tee $0 i64.const 0 i64.store - local.get $8 + local.get $0 i32.const 16 i32.const 30 call $~lib/rt/itcms/__new - local.tee $12 + local.tee $2 i32.store - local.get $12 + local.get $2 i32.const 0 i32.store - local.get $12 + local.get $2 i32.const 0 i32.store offset=4 - local.get $12 + local.get $2 i32.const 0 i32.store offset=8 - local.get $12 + local.get $2 i32.const 0 i32.store offset=12 - local.get $7 + local.get $4 i32.const 134217727 i32.gt_u if @@ -21504,74 +21400,74 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $4 i32.const 8 - local.get $7 + local.get $4 i32.const 8 i32.gt_u select i32.const 3 i32.shl - local.tee $8 + local.tee $1 i32.const 0 call $~lib/rt/itcms/__new - local.tee $9 + local.tee $0 i32.store offset=4 - local.get $12 - local.get $9 + local.get $2 + local.get $0 i32.store - local.get $9 + local.get $0 if - local.get $12 - local.get $9 + local.get $2 + local.get $0 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $12 - local.get $9 + local.get $2 + local.get $0 i32.store offset=4 - local.get $12 - local.get $8 + local.get $2 + local.get $1 i32.store offset=8 - local.get $12 - local.get $7 + local.get $2 + local.get $4 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $8 local.get $2 - local.get $12 i32.store loop $for-loop|02 - local.get $0 - local.get $7 - i32.lt_s + local.get $4 + local.get $11 + i32.gt_s if - local.get $0 + local.get $11 i32.const 4 i32.shl - local.get $6 + local.get $7 i32.add - local.tee $2 + local.tee $0 i32.load offset=12 i32.const 1 i32.and i32.eqz if - local.get $2 + local.get $0 f64.load - local.set $3 - local.get $1 - local.tee $2 + local.set $6 + local.get $3 + local.tee $0 i32.const 1 i32.add - local.set $1 - local.get $12 - i32.load offset=12 + local.set $3 local.get $2 + i32.load offset=12 + local.get $0 i32.le_u if - local.get $2 + local.get $0 i32.const 0 i32.lt_s if @@ -21582,53 +21478,53 @@ call $~lib/builtins/abort unreachable end - local.get $12 local.get $2 + local.get $0 i32.const 1 i32.add - local.tee $8 + local.tee $1 i32.const 3 i32.const 1 call $~lib/array/ensureCapacity - local.get $12 - local.get $8 + local.get $2 + local.get $1 i32.store offset=12 end - local.get $12 - i32.load offset=4 local.get $2 + i32.load offset=4 + local.get $0 i32.const 3 i32.shl i32.add - local.get $3 + local.get $6 f64.store end - local.get $0 + local.get $11 i32.const 1 i32.add - local.set $0 + local.set $11 br $for-loop|02 end end - local.get $12 - local.get $1 + local.get $2 + local.get $3 i32.const 3 i32.const 0 call $~lib/array/ensureCapacity - local.get $12 - local.get $1 + local.get $2 + local.get $3 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 - local.get $12 + local.get $9 + local.get $2 i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $11 + local.get $18 call $~lib/map/Map#values - local.tee $13 + local.tee $10 i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer @@ -21640,10 +21536,10 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i32.const 0 i32.store - local.get $1 + local.get $0 i32.const 24 i32.const 31 call $~lib/rt/itcms/__new @@ -21652,12 +21548,12 @@ local.get $14 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $1 + local.tee $0 i32.store - local.get $1 + local.get $0 if local.get $14 - local.get $1 + local.get $0 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $14 @@ -21666,12 +21562,12 @@ local.get $14 i32.const 96 call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $1 + local.tee $0 i32.store offset=8 - local.get $1 + local.get $0 if local.get $14 - local.get $1 + local.get $0 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $14 @@ -21691,21 +21587,20 @@ i32.store offset=12 global.get $~lib/memory/__stack_pointer call $~lib/map/Map#constructor - local.tee $15 + local.tee $9 i32.store offset=16 i32.const 0 - local.set $1 + local.set $3 loop $for-loop|2 - local.get $12 + local.get $2 i32.load offset=12 - local.get $1 + local.get $3 i32.gt_s if - local.get $1 - local.tee $2 - local.get $12 + local.get $2 i32.load offset=12 - i32.ge_u + local.get $3 + i32.le_u if i32.const 1248 i32.const 1728 @@ -21714,20 +21609,20 @@ call $~lib/builtins/abort unreachable end - local.get $12 - i32.load offset=4 local.get $2 + i32.load offset=4 + local.get $3 i32.const 3 i32.shl i32.add f64.load - local.set $3 - local.get $13 - local.get $2 - call $~lib/array/Array#__get - local.set $16 - local.get $11 + local.set $13 + local.get $10 local.get $3 + call $~lib/array/Array#__get + local.set $8 + local.get $18 + local.get $13 call $~lib/map/Map#has i32.eqz if @@ -21738,8 +21633,8 @@ call $~lib/builtins/abort unreachable end - local.get $11 - local.get $16 + local.get $18 + local.get $8 i32.const 20 i32.sub f64.convert_i32_s @@ -21766,7 +21661,7 @@ i32.store local.get $14 i32.load - local.get $3 + local.get $13 i64.reinterpret_f64 local.tee $5 i32.wrap_i64 @@ -21808,7 +21703,7 @@ i32.const 16 i32.shr_u i32.xor - local.tee $6 + local.tee $7 local.get $14 i32.load offset=4 i32.and @@ -21816,13 +21711,12 @@ i32.shl i32.add i32.load - local.set $0 + local.set $11 block $__inlined_func$~lib/map/Map#find loop $while-continue|0 - local.get $0 + local.get $11 if - local.get $0 - local.tee $1 + local.get $11 i32.load offset=16 local.tee $0 i32.const 1 @@ -21830,8 +21724,8 @@ if (result i32) i32.const 0 else - local.get $3 - local.get $1 + local.get $13 + local.get $11 f64.load f64.eq end @@ -21839,17 +21733,17 @@ local.get $0 i32.const -2 i32.and - local.set $0 + local.set $11 br $while-continue|0 end end i32.const 0 - local.set $1 + local.set $11 end - local.get $1 + local.get $11 if - local.get $1 - local.get $3 + local.get $11 + local.get $13 f64.store offset=8 else local.get $14 @@ -21878,7 +21772,7 @@ i32.const 1 i32.or end - local.set $9 + local.set $12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -21892,14 +21786,14 @@ i64.const 0 i64.store local.get $0 - local.get $9 + local.get $12 i32.const 1 i32.add local.tee $0 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $10 + local.tee $11 i32.store global.get $~lib/memory/__stack_pointer local.get $0 @@ -21907,7 +21801,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $16 i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor @@ -21915,37 +21809,37 @@ i32.store offset=4 local.get $14 i32.load offset=8 - local.tee $4 + local.tee $17 local.get $14 i32.load offset=16 i32.const 24 i32.mul i32.add - local.set $8 + local.set $15 local.get $1 local.set $0 loop $while-continue|00 - local.get $4 - local.get $8 + local.get $15 + local.get $17 i32.ne if - local.get $4 + local.get $17 i32.load offset=16 i32.const 1 i32.and i32.eqz if local.get $0 - local.get $4 + local.get $17 f64.load - local.tee $17 + local.tee $6 f64.store local.get $0 - local.get $4 + local.get $17 f64.load offset=8 f64.store offset=8 local.get $0 - local.get $17 + local.get $6 i64.reinterpret_f64 local.tee $5 i32.wrap_i64 @@ -21968,35 +21862,35 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $18 - local.get $18 + local.tee $4 + local.get $4 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $18 - local.get $18 + local.tee $4 + local.get $4 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $18 - local.get $18 + local.tee $4 + local.get $4 i32.const 16 i32.shr_u i32.xor - local.get $9 + local.get $12 i32.and i32.const 2 i32.shl - local.get $10 + local.get $11 i32.add - local.tee $18 + local.tee $4 i32.load i32.store offset=16 - local.get $18 + local.get $4 local.get $0 i32.store local.get $0 @@ -22004,24 +21898,24 @@ i32.add local.set $0 end - local.get $4 + local.get $17 i32.const 24 i32.add - local.set $4 + local.set $17 br $while-continue|00 end end local.get $14 - local.get $10 + local.get $11 i32.store - local.get $10 + local.get $11 if local.get $14 - local.get $10 + local.get $11 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $14 - local.get $9 + local.get $12 i32.store offset=4 local.get $14 local.get $1 @@ -22033,7 +21927,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $14 - local.get $7 + local.get $16 i32.store offset=12 local.get $14 local.get $14 @@ -22047,25 +21941,25 @@ global.get $~lib/memory/__stack_pointer local.get $14 i32.load offset=8 - local.tee $0 + local.tee $1 i32.store local.get $14 local.get $14 i32.load offset=16 - local.tee $1 + local.tee $0 i32.const 1 i32.add i32.store offset=16 - local.get $1 + local.get $0 i32.const 24 i32.mul - local.get $0 + local.get $1 i32.add - local.tee $0 - local.get $3 + local.tee $1 + local.get $13 f64.store - local.get $0 - local.get $3 + local.get $1 + local.get $13 f64.store offset=8 local.get $14 local.get $14 @@ -22073,38 +21967,38 @@ i32.const 1 i32.add i32.store offset=20 - local.get $0 + local.get $1 local.get $14 i32.load local.get $14 i32.load offset=4 - local.get $6 + local.get $7 i32.and i32.const 2 i32.shl i32.add - local.tee $1 + local.tee $0 i32.load i32.store offset=16 - local.get $1 local.get $0 + local.get $1 i32.store end global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $15 - local.get $16 + local.get $9 + local.get $8 i32.const 20 i32.sub local.tee $0 local.get $0 call $~lib/map/Map#set - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|2 end end @@ -22120,7 +22014,7 @@ call $~lib/builtins/abort unreachable end - local.get $15 + local.get $9 i32.load offset=20 i32.const 100 i32.ne @@ -22133,14 +22027,14 @@ unreachable end f64.const 0 - local.set $3 + local.set $6 loop $for-loop|3 - local.get $3 + local.get $6 f64.const 50 f64.lt if - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#has i32.eqz if @@ -22151,10 +22045,10 @@ call $~lib/builtins/abort unreachable end - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#get - local.get $3 + local.get $6 i32.trunc_f64_s i32.const 20 i32.add @@ -22167,11 +22061,11 @@ call $~lib/builtins/abort unreachable end - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#delete - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#has if i32.const 0 @@ -22181,14 +22075,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 f64.const 1 f64.add - local.set $3 + local.set $6 br $for-loop|3 end end - local.get $11 + local.get $18 i32.load offset=20 i32.const 50 i32.ne @@ -22201,14 +22095,14 @@ unreachable end f64.const 0 - local.set $3 + local.set $6 loop $for-loop|4 - local.get $3 + local.get $6 f64.const 50 f64.lt if - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#has if i32.const 0 @@ -22218,15 +22112,15 @@ call $~lib/builtins/abort unreachable end - local.get $11 - local.get $3 - local.get $3 + local.get $18 + local.get $6 + local.get $6 i32.trunc_f64_s i32.const 10 i32.add call $~lib/map/Map#set - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#has i32.eqz if @@ -22237,11 +22131,11 @@ call $~lib/builtins/abort unreachable end - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#delete - local.get $11 - local.get $3 + local.get $18 + local.get $6 call $~lib/map/Map#has if i32.const 0 @@ -22251,14 +22145,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 f64.const 1 f64.add - local.set $3 + local.set $6 br $for-loop|4 end end - local.get $11 + local.get $18 i32.load offset=20 i32.const 50 i32.ne @@ -22270,9 +22164,9 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $18 call $~lib/map/Map#clear - local.get $11 + local.get $18 i32.load offset=20 if i32.const 0 @@ -22492,7 +22386,6 @@ local.get $0 i32.load local.get $1 - local.tee $3 i32.extend8_s i32.const -1028477379 i32.mul @@ -22502,22 +22395,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 16 i32.shr_u i32.xor @@ -22529,12 +22422,12 @@ i32.shl i32.add i32.load - local.set $1 + local.set $3 block $__inlined_func$~lib/map/Map#find loop $while-continue|0 - local.get $1 + local.get $3 if - local.get $1 + local.get $3 i32.load offset=8 local.tee $5 i32.const 1 @@ -22542,9 +22435,9 @@ if (result i32) i32.const 0 else - local.get $1 - i32.load8_u local.get $3 + i32.load8_u + local.get $1 i32.const 255 i32.and i32.eq @@ -22553,16 +22446,16 @@ local.get $5 i32.const -2 i32.and - local.set $1 + local.set $3 br $while-continue|0 end end i32.const 0 - local.set $1 + local.set $3 end - local.get $1 + local.get $3 if - local.get $1 + local.get $3 local.get $2 i32.store offset=4 else @@ -22598,7 +22491,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $1 + local.tee $3 i32.store local.get $0 local.get $0 @@ -22608,14 +22501,14 @@ i32.add i32.store offset=16 local.get $5 - i32.const 12 - i32.mul - local.get $1 - i32.add - local.tee $1 + i32.const 12 + i32.mul local.get $3 - i32.store8 + i32.add + local.tee $3 local.get $1 + i32.store8 + local.get $3 local.get $2 i32.store offset=4 local.get $0 @@ -22624,7 +22517,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $1 + local.get $3 local.get $0 i32.load local.get $0 @@ -22638,7 +22531,7 @@ i32.load i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.store end global.get $~lib/memory/__stack_pointer @@ -22673,18 +22566,18 @@ i32.const 16 i32.const 5 call $~lib/rt/itcms/__new - local.tee $1 + local.tee $2 i32.store - local.get $1 + local.get $2 i32.const 0 i32.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=4 - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 i32.const 0 i32.store offset=12 local.get $0 @@ -22707,34 +22600,34 @@ select i32.const 2 i32.shl - local.tee $2 + local.tee $1 i32.const 0 call $~lib/rt/itcms/__new local.tee $3 i32.store offset=4 - local.get $1 + local.get $2 local.get $3 i32.store local.get $3 if - local.get $1 + local.get $2 local.get $3 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $1 + local.get $2 local.get $3 i32.store offset=4 - local.get $1 local.get $2 - i32.store offset=8 local.get $1 + i32.store offset=8 + local.get $2 local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $2 ) (func $~lib/map/Map#values (param $0 i32) (result i32) (local $1 i32) @@ -22913,7 +22806,6 @@ local.get $0 i32.load local.get $1 - local.tee $3 i32.const -1028477379 i32.mul i32.const 374761397 @@ -22922,22 +22814,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 16 i32.shr_u i32.xor @@ -22949,12 +22841,12 @@ i32.shl i32.add i32.load - local.set $1 + local.set $3 block $__inlined_func$~lib/map/Map#find loop $while-continue|0 - local.get $1 + local.get $3 if - local.get $1 + local.get $3 i32.load offset=8 local.tee $5 i32.const 1 @@ -22962,8 +22854,8 @@ if (result i32) i32.const 0 else - local.get $3 local.get $1 + local.get $3 i32.load i32.eq end @@ -22971,16 +22863,16 @@ local.get $5 i32.const -2 i32.and - local.set $1 + local.set $3 br $while-continue|0 end end i32.const 0 - local.set $1 + local.set $3 end - local.get $1 + local.get $3 if - local.get $1 + local.get $3 local.get $2 i32.store offset=4 else @@ -23016,7 +22908,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $1 + local.tee $3 i32.store local.get $0 local.get $0 @@ -23028,12 +22920,12 @@ local.get $5 i32.const 12 i32.mul - local.get $1 - i32.add - local.tee $1 local.get $3 - i32.store + i32.add + local.tee $3 local.get $1 + i32.store + local.get $3 local.get $2 i32.store offset=4 local.get $0 @@ -23042,7 +22934,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $1 + local.get $3 local.get $0 i32.load local.get $0 @@ -23056,7 +22948,7 @@ i32.load i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.store end global.get $~lib/memory/__stack_pointer @@ -23089,7 +22981,6 @@ local.get $0 i32.load local.get $1 - local.tee $3 i32.const 255 i32.and i32.const -1028477379 @@ -23100,22 +22991,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 16 i32.shr_u i32.xor @@ -23127,12 +23018,12 @@ i32.shl i32.add i32.load - local.set $1 + local.set $3 block $__inlined_func$~lib/map/Map#find loop $while-continue|0 - local.get $1 + local.get $3 if - local.get $1 + local.get $3 i32.load offset=8 local.tee $5 i32.const 1 @@ -23140,9 +23031,9 @@ if (result i32) i32.const 0 else - local.get $1 - i32.load8_u local.get $3 + i32.load8_u + local.get $1 i32.const 255 i32.and i32.eq @@ -23151,16 +23042,16 @@ local.get $5 i32.const -2 i32.and - local.set $1 + local.set $3 br $while-continue|0 end end i32.const 0 - local.set $1 + local.set $3 end - local.get $1 + local.get $3 if - local.get $1 + local.get $3 local.get $2 i32.store offset=4 else @@ -23196,7 +23087,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $1 + local.tee $3 i32.store local.get $0 local.get $0 @@ -23208,12 +23099,12 @@ local.get $5 i32.const 12 i32.mul - local.get $1 - i32.add - local.tee $1 local.get $3 - i32.store8 + i32.add + local.tee $3 local.get $1 + i32.store8 + local.get $3 local.get $2 i32.store offset=4 local.get $0 @@ -23222,7 +23113,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $1 + local.get $3 local.get $0 i32.load local.get $0 @@ -23236,7 +23127,7 @@ i32.load i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.store end global.get $~lib/memory/__stack_pointer @@ -23269,7 +23160,6 @@ local.get $0 i32.load local.get $1 - local.tee $3 i32.extend16_s i32.const -1028477379 i32.mul @@ -23279,22 +23169,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 16 i32.shr_u i32.xor @@ -23306,12 +23196,12 @@ i32.shl i32.add i32.load - local.set $1 + local.set $3 block $__inlined_func$~lib/map/Map#find loop $while-continue|0 - local.get $1 + local.get $3 if - local.get $1 + local.get $3 i32.load offset=8 local.tee $5 i32.const 1 @@ -23319,9 +23209,9 @@ if (result i32) i32.const 0 else - local.get $1 - i32.load16_u local.get $3 + i32.load16_u + local.get $1 i32.const 65535 i32.and i32.eq @@ -23330,16 +23220,16 @@ local.get $5 i32.const -2 i32.and - local.set $1 + local.set $3 br $while-continue|0 end end i32.const 0 - local.set $1 + local.set $3 end - local.get $1 + local.get $3 if - local.get $1 + local.get $3 local.get $2 i32.store offset=4 else @@ -23375,7 +23265,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $1 + local.tee $3 i32.store local.get $0 local.get $0 @@ -23387,12 +23277,12 @@ local.get $5 i32.const 12 i32.mul - local.get $1 - i32.add - local.tee $1 local.get $3 - i32.store16 + i32.add + local.tee $3 local.get $1 + i32.store16 + local.get $3 local.get $2 i32.store offset=4 local.get $0 @@ -23401,7 +23291,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $1 + local.get $3 local.get $0 i32.load local.get $0 @@ -23415,7 +23305,7 @@ i32.load i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.store end global.get $~lib/memory/__stack_pointer @@ -23448,7 +23338,6 @@ local.get $0 i32.load local.get $1 - local.tee $3 i32.const 65535 i32.and i32.const -1028477379 @@ -23459,22 +23348,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 16 i32.shr_u i32.xor @@ -23486,12 +23375,12 @@ i32.shl i32.add i32.load - local.set $1 + local.set $3 block $__inlined_func$~lib/map/Map#find loop $while-continue|0 - local.get $1 + local.get $3 if - local.get $1 + local.get $3 i32.load offset=8 local.tee $5 i32.const 1 @@ -23499,9 +23388,9 @@ if (result i32) i32.const 0 else - local.get $1 - i32.load16_u local.get $3 + i32.load16_u + local.get $1 i32.const 65535 i32.and i32.eq @@ -23510,16 +23399,16 @@ local.get $5 i32.const -2 i32.and - local.set $1 + local.set $3 br $while-continue|0 end end i32.const 0 - local.set $1 + local.set $3 end - local.get $1 + local.get $3 if - local.get $1 + local.get $3 local.get $2 i32.store offset=4 else @@ -23555,7 +23444,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $1 + local.tee $3 i32.store local.get $0 local.get $0 @@ -23567,12 +23456,12 @@ local.get $5 i32.const 12 i32.mul - local.get $1 - i32.add - local.tee $1 local.get $3 - i32.store16 + i32.add + local.tee $3 local.get $1 + i32.store16 + local.get $3 local.get $2 i32.store offset=4 local.get $0 @@ -23581,7 +23470,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $1 + local.get $3 local.get $0 i32.load local.get $0 @@ -23595,7 +23484,7 @@ i32.load i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.store end global.get $~lib/memory/__stack_pointer @@ -23628,7 +23517,6 @@ local.get $0 i32.load local.get $1 - local.tee $3 i32.const -1028477379 i32.mul i32.const 374761397 @@ -23637,22 +23525,22 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 15 i32.shr_u i32.xor i32.const -2048144777 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 13 i32.shr_u i32.xor i32.const -1028477379 i32.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 i32.const 16 i32.shr_u i32.xor @@ -23664,12 +23552,12 @@ i32.shl i32.add i32.load - local.set $1 + local.set $3 block $__inlined_func$~lib/map/Map#find loop $while-continue|0 - local.get $1 + local.get $3 if - local.get $1 + local.get $3 i32.load offset=8 local.tee $5 i32.const 1 @@ -23677,8 +23565,8 @@ if (result i32) i32.const 0 else - local.get $3 local.get $1 + local.get $3 i32.load i32.eq end @@ -23686,16 +23574,16 @@ local.get $5 i32.const -2 i32.and - local.set $1 + local.set $3 br $while-continue|0 end end i32.const 0 - local.set $1 + local.set $3 end - local.get $1 + local.get $3 if - local.get $1 + local.get $3 local.get $2 i32.store offset=4 else @@ -23731,7 +23619,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $1 + local.tee $3 i32.store local.get $0 local.get $0 @@ -23743,12 +23631,12 @@ local.get $5 i32.const 12 i32.mul - local.get $1 - i32.add - local.tee $1 local.get $3 - i32.store + i32.add + local.tee $3 local.get $1 + i32.store + local.get $3 local.get $2 i32.store offset=4 local.get $0 @@ -23757,7 +23645,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $1 + local.get $3 local.get $0 i32.load local.get $0 @@ -23771,7 +23659,7 @@ i32.load i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.store end global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 3df3630ede..c715a96557 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -3537,7 +3537,6 @@ i64.const 32 i64.shr_u local.tee $10 - local.tee $11 i64.mul local.get $9 i64.const 4294967295 @@ -3545,7 +3544,7 @@ i64.add local.set $2 local.get $8 - local.get $11 + local.get $10 i64.mul local.get $9 i64.const 32 @@ -3606,26 +3605,26 @@ i64.const 2 i64.shl i64.xor - local.tee $2 + local.tee $9 i64.const 64 local.get $8 i64.sub i64.shr_u i64.or - local.tee $9 + local.tee $10 i64.const 4294967295 i64.and - local.set $1 - local.get $9 + local.set $2 + local.get $10 i64.const 32 i64.shr_u - local.tee $10 + local.tee $1 i64.const 560513588 i64.mul - local.get $1 + local.get $2 i64.const 3373259426 i64.mul - local.get $1 + local.get $2 i64.const 560513588 i64.mul local.tee $11 @@ -3636,15 +3635,15 @@ i64.const 4294967295 i64.and i64.add - local.set $1 - local.get $10 + local.set $2 + local.get $1 i64.const 3373259426 i64.mul local.get $12 i64.const 32 i64.shr_u i64.add - local.get $1 + local.get $2 i64.const 32 i64.shr_u i64.add @@ -3652,16 +3651,16 @@ local.get $11 i64.const 4294967295 i64.and - local.get $1 + local.get $2 i64.const 32 i64.shl i64.add local.tee $1 - local.get $9 + local.get $10 f64.convert_i64_u f64.const 3.753184150245214e-04 f64.mul - local.get $2 + local.get $9 local.get $8 i64.shl f64.convert_i64_u @@ -3721,32 +3720,32 @@ ) (func $~lib/math/NativeMath.cos (param $0 f64) (result f64) (local $1 f64) - (local $2 i64) - (local $3 f64) + (local $2 f64) + (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) (local $6 i32) (local $7 f64) (local $8 f64) (local $9 f64) local.get $0 i64.reinterpret_f64 - local.tee $2 + local.tee $5 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $4 + local.tee $3 i32.const 31 i32.shr_u local.set $6 - local.get $4 + local.get $3 i32.const 2147483647 i32.and - local.tee $4 + local.tee $3 i32.const 1072243195 i32.le_u if - local.get $4 + local.get $3 i32.const 1044816030 i32.lt_u if @@ -3759,7 +3758,7 @@ local.tee $1 local.get $1 f64.mul - local.set $3 + local.set $2 f64.const 1 local.get $1 f64.const 0.5 @@ -3784,8 +3783,8 @@ f64.const 0.0416666666666666 f64.add f64.mul - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.mul local.get $1 local.get $1 @@ -3807,7 +3806,7 @@ f64.add return end - local.get $4 + local.get $3 i32.const 2146435072 i32.ge_u if @@ -3817,18 +3816,18 @@ return end block $~lib/math/rempio2|inlined.0 (result i32) - local.get $2 + local.get $5 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $5 + local.tee $4 i32.const 1073928572 i32.lt_u if i32.const 1 - local.set $4 + local.set $3 local.get $6 if (result f64) local.get $0 @@ -3836,8 +3835,8 @@ f64.add local.set $0 i32.const -1 - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1073291771 i32.ne if (result f64) @@ -3868,7 +3867,7 @@ f64.const 1.5707963267341256 f64.sub local.set $0 - local.get $5 + local.get $4 i32.const 1073291771 i32.ne if (result f64) @@ -3898,17 +3897,17 @@ local.get $0 global.set $~lib/math/rempio2_y0 global.set $~lib/math/rempio2_y1 - local.get $4 + local.get $3 br $~lib/math/rempio2|inlined.0 end - local.get $5 + local.get $4 i32.const 1094263291 i32.lt_u if - local.get $5 + local.get $4 i32.const 20 i32.shr_u - local.tee $4 + local.tee $3 local.get $0 local.get $0 f64.const 0.6366197723675814 @@ -3922,7 +3921,7 @@ local.get $7 f64.const 6.077100506506192e-11 f64.mul - local.tee $3 + local.tee $2 f64.sub local.tee $1 i64.reinterpret_f64 @@ -3952,10 +3951,10 @@ local.get $1 f64.sub f64.sub - local.set $3 - local.get $4 - local.get $0 + local.set $2 local.get $3 + local.get $0 + local.get $2 f64.sub local.tee $1 i64.reinterpret_f64 @@ -3985,9 +3984,9 @@ local.get $1 f64.sub f64.sub - local.set $3 + local.set $2 local.get $0 - local.get $3 + local.get $2 f64.sub else local.get $1 @@ -3999,7 +3998,7 @@ local.get $0 local.get $1 f64.sub - local.get $3 + local.get $2 f64.sub global.set $~lib/math/rempio2_y1 local.get $7 @@ -4007,20 +4006,20 @@ br $~lib/math/rempio2|inlined.0 end i32.const 0 - local.get $2 + local.get $5 call $~lib/math/pio2_large_quot - local.tee $4 + local.tee $3 i32.sub - local.get $4 + local.get $3 local.get $6 select end - local.set $4 + local.set $3 global.get $~lib/math/rempio2_y0 local.set $1 global.get $~lib/math/rempio2_y1 - local.set $3 - local.get $4 + local.set $2 + local.get $3 i32.const 1 i32.and if (result f64) @@ -4033,7 +4032,7 @@ local.set $7 local.get $1 local.get $0 - local.get $3 + local.get $2 f64.const 0.5 f64.mul local.get $7 @@ -4061,7 +4060,7 @@ f64.mul f64.sub f64.mul - local.get $3 + local.get $2 f64.sub local.get $7 f64.const -0.16666666666666632 @@ -4116,7 +4115,7 @@ f64.add f64.mul local.get $1 - local.get $3 + local.get $2 f64.mul f64.sub f64.add @@ -4125,7 +4124,7 @@ local.tee $0 f64.neg local.get $0 - local.get $4 + local.get $3 i32.const 1 i32.add i32.const 2 @@ -4133,9 +4132,9 @@ select ) (func $~lib/math/NativeMathf.cos (param $0 f32) (result f32) - (local $1 i32) + (local $1 f64) (local $2 f64) - (local $3 f64) + (local $3 i32) (local $4 i64) (local $5 i32) (local $6 f64) @@ -4144,19 +4143,19 @@ (local $9 i64) local.get $0 i32.reinterpret_f32 - local.tee $5 + local.tee $3 i32.const 31 i32.shr_u - local.set $1 + local.set $5 block $folding-inner0 - local.get $5 + local.get $3 i32.const 2147483647 i32.and - local.tee $5 + local.tee $3 i32.const 1061752794 i32.le_u if - local.get $5 + local.get $3 i32.const 964689920 i32.lt_u if @@ -4165,53 +4164,53 @@ end local.get $0 f64.promote_f32 - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 f64.mul - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 f64.mul local.set $2 br $folding-inner0 end - local.get $5 + local.get $3 i32.const 1081824209 i32.le_u if - local.get $5 + local.get $3 i32.const 1075235811 i32.gt_u if local.get $0 f64.promote_f32 - local.tee $2 + local.tee $1 f64.const 3.141592653589793 f64.add - local.get $2 + local.get $1 f64.const 3.141592653589793 f64.sub - local.get $1 + local.get $5 select - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 f64.mul - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 f64.mul - local.set $3 - local.get $2 + local.set $2 + local.get $1 f64.const -0.499999997251031 f64.mul f64.const 1 f64.add - local.get $3 + local.get $2 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $2 + local.get $1 f64.mul - local.get $2 + local.get $1 f64.const 2.439044879627741e-05 f64.mul f64.const -0.001388676377460993 @@ -4222,34 +4221,34 @@ f32.neg return else - local.get $1 + local.get $5 if (result f64) local.get $0 f64.promote_f32 f64.const 1.5707963267948966 f64.add - local.tee $3 - local.get $3 - f64.mul local.tee $2 - local.get $3 + local.get $2 + f64.mul + local.tee $1 + local.get $2 f64.mul else f64.const 1.5707963267948966 local.get $0 f64.promote_f32 f64.sub - local.tee $3 - local.get $3 - f64.mul local.tee $2 - local.get $3 + local.get $2 + f64.mul + local.tee $1 + local.get $2 f64.mul end local.set $6 - local.get $3 - local.get $6 local.get $2 + local.get $6 + local.get $1 f64.const 0.008333329385889463 f64.mul f64.const -0.16666666641626524 @@ -4257,11 +4256,11 @@ f64.mul f64.add local.get $6 - local.get $2 - local.get $2 + local.get $1 + local.get $1 f64.mul f64.mul - local.get $2 + local.get $1 f64.const 2.718311493989822e-06 f64.mul f64.const -1.9839334836096632e-04 @@ -4273,62 +4272,62 @@ end unreachable end - local.get $5 + local.get $3 i32.const 1088565717 i32.le_u if - local.get $5 + local.get $3 i32.const 1085271519 i32.gt_u if local.get $0 f64.promote_f32 - local.tee $2 + local.tee $1 f64.const 6.283185307179586 f64.add - local.get $2 + local.get $1 f64.const 6.283185307179586 f64.sub - local.get $1 + local.get $5 select - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 f64.mul - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 f64.mul local.set $2 br $folding-inner0 else - local.get $1 + local.get $5 if (result f64) local.get $0 f32.neg f64.promote_f32 f64.const 4.71238898038469 f64.sub - local.tee $3 - local.get $3 - f64.mul local.tee $2 - local.get $3 + local.get $2 + f64.mul + local.tee $1 + local.get $2 f64.mul else local.get $0 f64.promote_f32 f64.const 4.71238898038469 f64.sub - local.tee $3 - local.get $3 - f64.mul local.tee $2 - local.get $3 + local.get $2 + f64.mul + local.tee $1 + local.get $2 f64.mul end local.set $6 - local.get $3 - local.get $6 local.get $2 + local.get $6 + local.get $1 f64.const 0.008333329385889463 f64.mul f64.const -0.16666666641626524 @@ -4336,11 +4335,11 @@ f64.mul f64.add local.get $6 - local.get $2 - local.get $2 + local.get $1 + local.get $1 f64.mul f64.mul - local.get $2 + local.get $1 f64.const 2.718311493989822e-06 f64.mul f64.const -1.9839334836096632e-04 @@ -4352,7 +4351,7 @@ end unreachable end - local.get $5 + local.get $3 i32.const 2139095040 i32.ge_u if @@ -4362,32 +4361,32 @@ return end block $~lib/math/rempio2f|inlined.0 (result i32) - local.get $5 + local.get $3 i32.const 1305022427 i32.lt_u if local.get $0 f64.promote_f32 - local.tee $2 + local.tee $1 f64.const 0.6366197723675814 f64.mul f64.nearest - local.set $3 + local.set $2 + local.get $1 local.get $2 - local.get $3 f64.const 1.5707963109016418 f64.mul f64.sub - local.get $3 + local.get $2 f64.const 1.5893254773528196e-08 f64.mul f64.sub global.set $~lib/math/rempio2f_y - local.get $3 + local.get $2 i32.trunc_f64_s br $~lib/math/rempio2f|inlined.0 end - local.get $5 + local.get $3 i32.const 23 i32.shr_s i32.const 152 @@ -4406,23 +4405,23 @@ i32.add local.tee $7 i64.load offset=8 - local.set $9 + local.set $4 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $5 + local.get $3 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $4 + local.tee $9 local.get $7 i64.load local.get $8 i64.shl - local.get $9 + local.get $4 i64.const 64 local.get $8 i64.sub @@ -4433,7 +4432,7 @@ i64.const 32 i64.gt_u if (result i64) - local.get $9 + local.get $4 local.get $8 i64.const 32 i64.sub @@ -4446,13 +4445,13 @@ i64.shr_u i64.or else - local.get $9 + local.get $4 i64.const 32 local.get $8 i64.sub i64.shr_u end - local.get $4 + local.get $9 i64.mul i64.const 32 i64.shr_u @@ -4473,40 +4472,40 @@ i64.shr_u i64.add i32.wrap_i64 - local.tee $5 + local.tee $3 i32.sub + local.get $3 local.get $5 - local.get $1 select end - local.set $1 + local.set $3 global.get $~lib/math/rempio2f_y - local.set $2 - local.get $1 + local.set $1 + local.get $3 i32.const 1 i32.and if (result f32) - local.get $2 - local.get $2 - local.get $2 - f64.mul - local.tee $3 - local.get $2 + local.get $1 + local.get $1 + local.get $1 f64.mul local.tee $2 - local.get $3 + local.get $1 + f64.mul + local.tee $1 + local.get $2 f64.const 0.008333329385889463 f64.mul f64.const -0.16666666641626524 f64.add f64.mul f64.add + local.get $1 + local.get $2 local.get $2 - local.get $3 - local.get $3 f64.mul f64.mul - local.get $3 + local.get $2 f64.const 2.718311493989822e-06 f64.mul f64.const -1.9839334836096632e-04 @@ -4515,26 +4514,26 @@ f64.add f32.demote_f64 else - local.get $2 - local.get $2 + local.get $1 + local.get $1 f64.mul - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 f64.mul - local.set $3 - local.get $2 + local.set $2 + local.get $1 f64.const -0.499999997251031 f64.mul f64.const 1 f64.add - local.get $3 + local.get $2 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $2 + local.get $1 f64.mul - local.get $2 + local.get $1 f64.const 2.439044879627741e-05 f64.mul f64.const -0.001388676377460993 @@ -4546,7 +4545,7 @@ local.tee $0 f32.neg local.get $0 - local.get $1 + local.get $3 i32.const 1 i32.add i32.const 2 @@ -4554,7 +4553,7 @@ select return end - local.get $3 + local.get $1 f64.const -0.499999997251031 f64.mul f64.const 1 @@ -4564,9 +4563,9 @@ f64.mul f64.add local.get $2 - local.get $3 + local.get $1 f64.mul - local.get $3 + local.get $1 f64.const 2.439044879627741e-05 f64.mul f64.const -0.001388676377460993 @@ -6902,10 +6901,9 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i64) - (local $8 f64) + (local $7 f64) + (local $8 i64) (local $9 i64) - (local $10 i64) block $__inlined_func$~lib/math/NativeMath.mod (result f64) local.get $0 local.get $0 @@ -6921,25 +6919,25 @@ drop local.get $1 i64.reinterpret_f64 - local.tee $7 + local.tee $5 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $9 - local.get $7 + local.set $8 + local.get $5 i64.const 1 i64.shl - local.tee $5 + local.tee $4 i64.eqz local.get $0 i64.reinterpret_f64 - local.tee $4 + local.tee $6 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.tee $10 + local.tee $9 i64.const 2047 i64.eq i32.or @@ -6951,13 +6949,13 @@ local.get $0 local.get $1 f64.mul - local.tee $8 - local.get $8 + local.tee $7 + local.get $7 f64.div br $__inlined_func$~lib/math/NativeMath.mod end - local.get $5 local.get $4 + local.get $6 i64.const 1 i64.shl local.tee $3 @@ -6965,53 +6963,50 @@ if local.get $0 local.get $3 - local.get $5 + local.get $4 i64.ne f64.convert_i32_u f64.mul br $__inlined_func$~lib/math/NativeMath.mod end - local.get $4 - i64.const 63 - i64.shr_u - local.get $10 + local.get $9 i64.eqz if (result i64) - local.get $4 + local.get $6 i64.const 1 - local.get $10 - local.get $4 + local.get $9 + local.get $6 i64.const 12 i64.shl i64.clz i64.sub - local.tee $10 + local.tee $9 i64.sub i64.shl else - local.get $4 + local.get $6 i64.const 4503599627370495 i64.and i64.const 4503599627370496 i64.or end local.set $3 - local.get $9 + local.get $8 i64.eqz if (result i64) - local.get $7 + local.get $5 i64.const 1 - local.get $9 - local.get $7 + local.get $8 + local.get $5 i64.const 12 i64.shl i64.clz i64.sub - local.tee $9 + local.tee $8 i64.sub i64.shl else - local.get $7 + local.get $5 i64.const 4503599627370495 i64.and i64.const 4503599627370496 @@ -7019,8 +7014,8 @@ end local.set $4 loop $while-continue|0 + local.get $8 local.get $9 - local.get $10 i64.lt_s if local.get $3 @@ -7044,10 +7039,10 @@ i64.const 1 i64.shl local.set $3 - local.get $10 + local.get $9 i64.const 1 i64.sub - local.set $10 + local.set $9 br $while-continue|0 end end @@ -7068,7 +7063,7 @@ i64.sub local.set $3 end - local.get $10 + local.get $9 local.get $3 i64.const 11 i64.shl @@ -7076,6 +7071,9 @@ local.tee $5 i64.sub local.set $4 + local.get $6 + i64.const 63 + i64.shr_u i64.const 63 i64.shl local.get $3 @@ -9163,32 +9161,32 @@ ) (func $~lib/math/NativeMath.sin (param $0 f64) (result f64) (local $1 f64) - (local $2 i64) - (local $3 f64) + (local $2 f64) + (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) (local $6 i32) (local $7 f64) (local $8 f64) (local $9 f64) local.get $0 i64.reinterpret_f64 - local.tee $2 + local.tee $5 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $4 + local.tee $3 i32.const 31 i32.shr_u local.set $6 - local.get $4 + local.get $3 i32.const 2147483647 i32.and - local.tee $4 + local.tee $3 i32.const 1072243195 i32.le_u if - local.get $4 + local.get $3 i32.const 1045430272 i32.lt_u if @@ -9231,7 +9229,7 @@ f64.add return end - local.get $4 + local.get $3 i32.const 2146435072 i32.ge_u if @@ -9241,18 +9239,18 @@ return end block $~lib/math/rempio2|inlined.1 (result i32) - local.get $2 + local.get $5 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $5 + local.tee $4 i32.const 1073928572 i32.lt_u if i32.const 1 - local.set $4 + local.set $3 local.get $6 if (result f64) local.get $0 @@ -9260,8 +9258,8 @@ f64.add local.set $0 i32.const -1 - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1073291771 i32.ne if (result f64) @@ -9292,7 +9290,7 @@ f64.const 1.5707963267341256 f64.sub local.set $0 - local.get $5 + local.get $4 i32.const 1073291771 i32.ne if (result f64) @@ -9322,17 +9320,17 @@ local.get $0 global.set $~lib/math/rempio2_y0 global.set $~lib/math/rempio2_y1 - local.get $4 + local.get $3 br $~lib/math/rempio2|inlined.1 end - local.get $5 + local.get $4 i32.const 1094263291 i32.lt_u if - local.get $5 + local.get $4 i32.const 20 i32.shr_u - local.tee $4 + local.tee $3 local.get $0 local.get $0 f64.const 0.6366197723675814 @@ -9346,7 +9344,7 @@ local.get $7 f64.const 6.077100506506192e-11 f64.mul - local.tee $3 + local.tee $2 f64.sub local.tee $1 i64.reinterpret_f64 @@ -9376,10 +9374,10 @@ local.get $1 f64.sub f64.sub - local.set $3 - local.get $4 - local.get $0 + local.set $2 local.get $3 + local.get $0 + local.get $2 f64.sub local.tee $1 i64.reinterpret_f64 @@ -9409,9 +9407,9 @@ local.get $1 f64.sub f64.sub - local.set $3 + local.set $2 local.get $0 - local.get $3 + local.get $2 f64.sub else local.get $1 @@ -9423,7 +9421,7 @@ local.get $0 local.get $1 f64.sub - local.get $3 + local.get $2 f64.sub global.set $~lib/math/rempio2_y1 local.get $7 @@ -9431,25 +9429,25 @@ br $~lib/math/rempio2|inlined.1 end i32.const 0 - local.get $2 + local.get $5 call $~lib/math/pio2_large_quot - local.tee $4 + local.tee $3 i32.sub - local.get $4 + local.get $3 local.get $6 select end - local.set $4 - global.get $~lib/math/rempio2_y0 local.set $3 + global.get $~lib/math/rempio2_y0 + local.set $2 global.get $~lib/math/rempio2_y1 local.set $7 - local.get $4 + local.get $3 i32.const 1 i32.and if (result f64) - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.mul local.tee $0 local.get $0 @@ -9494,21 +9492,21 @@ f64.mul f64.add f64.mul - local.get $3 + local.get $2 local.get $7 f64.mul f64.sub f64.add f64.add else - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.mul local.tee $0 - local.get $3 + local.get $2 f64.mul local.set $1 - local.get $3 + local.get $2 local.get $0 local.get $7 f64.const 0.5 @@ -9549,15 +9547,15 @@ local.tee $0 f64.neg local.get $0 - local.get $4 + local.get $3 i32.const 2 i32.and select ) (func $~lib/math/NativeMathf.sin (param $0 f32) (result f32) - (local $1 i32) + (local $1 f64) (local $2 f64) - (local $3 f64) + (local $3 i32) (local $4 f64) (local $5 i64) (local $6 i32) @@ -9566,19 +9564,19 @@ (local $9 i64) local.get $0 i32.reinterpret_f32 - local.tee $6 + local.tee $3 i32.const 31 i32.shr_u - local.set $1 + local.set $6 block $folding-inner0 - local.get $6 + local.get $3 i32.const 2147483647 i32.and - local.tee $6 + local.tee $3 i32.const 1061752794 i32.le_u if - local.get $6 + local.get $3 i32.const 964689920 i32.lt_u if @@ -9590,46 +9588,46 @@ local.tee $2 local.get $2 f64.mul - local.tee $4 + local.tee $1 local.get $2 f64.mul - local.set $3 + local.set $4 br $folding-inner0 end - local.get $6 + local.get $3 i32.const 1081824209 i32.le_u if - local.get $6 + local.get $3 i32.const 1075235811 i32.le_u if - local.get $1 + local.get $6 if (result f32) local.get $0 f64.promote_f32 f64.const 1.5707963267948966 f64.add - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 f64.mul - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 f64.mul - local.set $3 - local.get $2 + local.set $2 + local.get $1 f64.const -0.499999997251031 f64.mul f64.const 1 f64.add - local.get $3 + local.get $2 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $2 + local.get $1 f64.mul - local.get $2 + local.get $1 f64.const 2.439044879627741e-05 f64.mul f64.const -0.001388676377460993 @@ -9643,26 +9641,26 @@ f64.promote_f32 f64.const 1.5707963267948966 f64.sub - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 f64.mul - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 f64.mul - local.set $3 - local.get $2 + local.set $2 + local.get $1 f64.const -0.499999997251031 f64.mul f64.const 1 f64.add - local.get $3 + local.get $2 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $2 + local.get $1 f64.mul - local.get $2 + local.get $1 f64.const 2.439044879627741e-05 f64.mul f64.const -0.001388676377460993 @@ -9675,58 +9673,58 @@ end local.get $0 f64.promote_f32 - local.tee $2 + local.tee $1 f64.const 3.141592653589793 f64.add - local.get $2 + local.get $1 f64.const 3.141592653589793 f64.sub - local.get $1 + local.get $6 select f64.neg local.tee $2 local.get $2 f64.mul - local.tee $4 + local.tee $1 local.get $2 f64.mul - local.set $3 + local.set $4 br $folding-inner0 end - local.get $6 + local.get $3 i32.const 1088565717 i32.le_u if - local.get $6 + local.get $3 i32.const 1085271519 i32.le_u if - local.get $1 + local.get $6 if (result f32) local.get $0 f64.promote_f32 f64.const 4.71238898038469 f64.add - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 f64.mul - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 f64.mul - local.set $3 - local.get $2 + local.set $2 + local.get $1 f64.const -0.499999997251031 f64.mul f64.const 1 f64.add - local.get $3 + local.get $2 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $2 + local.get $1 f64.mul - local.get $2 + local.get $1 f64.const 2.439044879627741e-05 f64.mul f64.const -0.001388676377460993 @@ -9739,26 +9737,26 @@ f64.promote_f32 f64.const 4.71238898038469 f64.sub - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 f64.mul - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 f64.mul - local.set $3 - local.get $2 + local.set $2 + local.get $1 f64.const -0.499999997251031 f64.mul f64.const 1 f64.add - local.get $3 + local.get $2 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $2 + local.get $1 f64.mul - local.get $2 + local.get $1 f64.const 2.439044879627741e-05 f64.mul f64.const -0.001388676377460993 @@ -9772,24 +9770,24 @@ end local.get $0 f64.promote_f32 - local.tee $2 + local.tee $1 f64.const 6.283185307179586 f64.add - local.get $2 + local.get $1 f64.const 6.283185307179586 f64.sub - local.get $1 + local.get $6 select local.tee $2 local.get $2 f64.mul - local.tee $4 + local.tee $1 local.get $2 f64.mul - local.set $3 + local.set $4 br $folding-inner0 end - local.get $6 + local.get $3 i32.const 2139095040 i32.ge_u if @@ -9799,32 +9797,32 @@ return end block $~lib/math/rempio2f|inlined.1 (result i32) - local.get $6 + local.get $3 i32.const 1305022427 i32.lt_u if local.get $0 f64.promote_f32 - local.tee $2 + local.tee $1 f64.const 0.6366197723675814 f64.mul f64.nearest - local.set $3 + local.set $2 + local.get $1 local.get $2 - local.get $3 f64.const 1.5707963109016418 f64.mul f64.sub - local.get $3 + local.get $2 f64.const 1.5893254773528196e-08 f64.mul f64.sub global.set $~lib/math/rempio2f_y - local.get $3 + local.get $2 i32.trunc_f64_s br $~lib/math/rempio2f|inlined.1 end - local.get $6 + local.get $3 i32.const 23 i32.shr_s i32.const 152 @@ -9843,23 +9841,23 @@ i32.add local.tee $7 i64.load offset=8 - local.set $9 + local.set $5 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $6 + local.get $3 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $5 + local.tee $9 local.get $7 i64.load local.get $8 i64.shl - local.get $9 + local.get $5 i64.const 64 local.get $8 i64.sub @@ -9870,7 +9868,7 @@ i64.const 32 i64.gt_u if (result i64) - local.get $9 + local.get $5 local.get $8 i64.const 32 i64.sub @@ -9883,13 +9881,13 @@ i64.shr_u i64.or else - local.get $9 + local.get $5 i64.const 32 local.get $8 i64.sub i64.shr_u end - local.get $5 + local.get $9 i64.mul i64.const 32 i64.shr_u @@ -9910,39 +9908,39 @@ i64.shr_u i64.add i32.wrap_i64 - local.tee $6 + local.tee $3 i32.sub + local.get $3 local.get $6 - local.get $1 select end - local.set $1 + local.set $3 global.get $~lib/math/rempio2f_y - local.set $2 - local.get $1 + local.set $1 + local.get $3 i32.const 1 i32.and if (result f32) - local.get $2 - local.get $2 + local.get $1 + local.get $1 f64.mul - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 f64.mul - local.set $3 - local.get $2 + local.set $2 + local.get $1 f64.const -0.499999997251031 f64.mul f64.const 1 f64.add - local.get $3 + local.get $2 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $2 + local.get $1 f64.mul - local.get $2 + local.get $1 f64.const 2.439044879627741e-05 f64.mul f64.const -0.001388676377460993 @@ -9951,27 +9949,27 @@ f64.add f32.demote_f64 else - local.get $2 - local.get $2 - local.get $2 - f64.mul - local.tee $3 - local.get $2 + local.get $1 + local.get $1 + local.get $1 f64.mul local.tee $2 - local.get $3 + local.get $1 + f64.mul + local.tee $1 + local.get $2 f64.const 0.008333329385889463 f64.mul f64.const -0.16666666641626524 f64.add f64.mul f64.add + local.get $1 + local.get $2 local.get $2 - local.get $3 - local.get $3 f64.mul f64.mul - local.get $3 + local.get $2 f64.const 2.718311493989822e-06 f64.mul f64.const -1.9839334836096632e-04 @@ -9983,27 +9981,27 @@ local.tee $0 f32.neg local.get $0 - local.get $1 + local.get $3 i32.const 2 i32.and select return end local.get $2 - local.get $3 local.get $4 + local.get $1 f64.const 0.008333329385889463 f64.mul f64.const -0.16666666641626524 f64.add f64.mul f64.add - local.get $3 - local.get $4 local.get $4 + local.get $1 + local.get $1 f64.mul f64.mul - local.get $4 + local.get $1 f64.const 2.718311493989822e-06 f64.mul f64.const -1.9839334836096632e-04 @@ -10014,86 +10012,81 @@ ) (func $std/math/test_sinh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (local $3 f64) - (local $4 f64) - (local $5 i32) - (local $6 i64) - (local $7 f64) - local.get $0 - local.set $3 - local.get $0 - i64.reinterpret_f64 - i64.const 9223372036854775807 - i64.and - local.tee $6 - f64.reinterpret_i64 - local.set $7 - f64.const 0.5 - local.get $0 - f64.copysign - local.set $4 - block $__inlined_func$~lib/math/NativeMath.sinh - local.get $6 + (local $4 i32) + (local $5 i64) + (local $6 f64) + block $__inlined_func$~lib/math/NativeMath.sinh (result f64) + local.get $0 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $5 + f64.reinterpret_i64 + local.set $6 + f64.const 0.5 + local.get $0 + f64.copysign + local.set $3 + local.get $5 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $5 + local.tee $4 i32.const 1082535490 i32.lt_u if - local.get $7 + local.get $6 call $~lib/math/NativeMath.expm1 - local.set $7 - local.get $5 + local.set $6 + local.get $4 i32.const 1072693248 i32.lt_u if - local.get $5 + local.get $0 + local.get $4 i32.const 1045430272 i32.lt_u br_if $__inlined_func$~lib/math/NativeMath.sinh - local.get $4 - local.get $7 - local.get $7 + drop + local.get $3 + local.get $6 + local.get $6 f64.add - local.get $7 - local.get $7 + local.get $6 + local.get $6 f64.mul - local.get $7 + local.get $6 f64.const 1 f64.add f64.div f64.sub f64.mul - local.set $3 br $__inlined_func$~lib/math/NativeMath.sinh end - local.get $4 - local.get $7 - local.get $7 - local.get $7 + local.get $3 + local.get $6 + local.get $6 + local.get $6 f64.const 1 f64.add f64.div f64.add f64.mul - local.set $3 br $__inlined_func$~lib/math/NativeMath.sinh end - local.get $7 + local.get $6 f64.const 1416.0996898839683 f64.sub call $~lib/math/NativeMath.exp - local.get $4 - local.get $4 + local.get $3 + local.get $3 f64.add f64.const 2247116418577894884661631e283 f64.mul f64.mul f64.const 2247116418577894884661631e283 f64.mul - local.set $3 end - local.get $3 local.get $1 local.get $2 call $std/math/check @@ -10623,10 +10616,10 @@ call $~lib/math/tan_kern ) (func $~lib/math/NativeMathf.tan (param $0 f32) (result f32) - (local $1 i32) + (local $1 f64) (local $2 f64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 i64) (local $6 i32) (local $7 i32) @@ -10634,20 +10627,20 @@ (local $9 i64) local.get $0 i32.reinterpret_f32 - local.tee $6 + local.tee $4 i32.const 31 i32.shr_u - local.set $1 + local.set $6 block $folding-inner1 block $folding-inner0 - local.get $6 + local.get $4 i32.const 2147483647 i32.and - local.tee $6 + local.tee $4 i32.const 1061752794 i32.le_u if - local.get $6 + local.get $4 i32.const 964689920 i32.lt_u if @@ -10659,109 +10652,109 @@ local.tee $2 local.get $2 f64.mul - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 f64.mul - local.set $4 + local.set $3 br $folding-inner0 end - local.get $6 + local.get $4 i32.const 1081824209 i32.le_u if - local.get $6 + local.get $4 i32.const 1075235811 i32.le_u if local.get $0 f64.promote_f32 - local.tee $2 + local.tee $1 f64.const 1.5707963267948966 f64.add - local.get $2 + local.get $1 f64.const 1.5707963267948966 f64.sub - local.get $1 + local.get $6 select local.tee $2 local.get $2 f64.mul - local.tee $3 - local.get $3 - f64.mul - local.set $4 + local.tee $1 + local.get $1 + f64.mul + local.set $3 br $folding-inner1 else local.get $0 f64.promote_f32 - local.tee $2 + local.tee $1 f64.const 3.141592653589793 f64.add - local.get $2 + local.get $1 f64.const 3.141592653589793 f64.sub - local.get $1 + local.get $6 select local.tee $2 local.get $2 f64.mul - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 f64.mul - local.set $4 + local.set $3 br $folding-inner0 end unreachable end - local.get $6 + local.get $4 i32.const 1088565717 i32.le_u if - local.get $6 + local.get $4 i32.const 1085271519 i32.le_u if local.get $0 f64.promote_f32 - local.tee $2 + local.tee $1 f64.const 4.71238898038469 f64.add - local.get $2 + local.get $1 f64.const 4.71238898038469 f64.sub - local.get $1 + local.get $6 select local.tee $2 local.get $2 f64.mul - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 f64.mul - local.set $4 + local.set $3 br $folding-inner1 else local.get $0 f64.promote_f32 - local.tee $2 + local.tee $1 f64.const 6.283185307179586 f64.add - local.get $2 + local.get $1 f64.const 6.283185307179586 f64.sub - local.get $1 + local.get $6 select local.tee $2 local.get $2 f64.mul - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 f64.mul - local.set $4 + local.set $3 br $folding-inner0 end unreachable end - local.get $6 + local.get $4 i32.const 2139095040 i32.ge_u if @@ -10771,32 +10764,32 @@ return end block $~lib/math/rempio2f|inlined.2 (result i32) - local.get $6 + local.get $4 i32.const 1305022427 i32.lt_u if local.get $0 f64.promote_f32 - local.tee $2 + local.tee $1 f64.const 0.6366197723675814 f64.mul f64.nearest - local.set $3 + local.set $2 + local.get $1 local.get $2 - local.get $3 f64.const 1.5707963109016418 f64.mul f64.sub - local.get $3 + local.get $2 f64.const 1.5893254773528196e-08 f64.mul f64.sub global.set $~lib/math/rempio2f_y - local.get $3 + local.get $2 i32.trunc_f64_s br $~lib/math/rempio2f|inlined.2 end - local.get $6 + local.get $4 i32.const 23 i32.shr_s i32.const 152 @@ -10815,23 +10808,23 @@ i32.add local.tee $7 i64.load offset=8 - local.set $9 + local.set $5 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $6 + local.get $4 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $5 + local.tee $9 local.get $7 i64.load local.get $8 i64.shl - local.get $9 + local.get $5 i64.const 64 local.get $8 i64.sub @@ -10842,7 +10835,7 @@ i64.const 32 i64.gt_u if (result i64) - local.get $9 + local.get $5 local.get $8 i64.const 32 i64.sub @@ -10855,13 +10848,13 @@ i64.shr_u i64.or else - local.get $9 + local.get $5 i64.const 32 local.get $8 i64.sub i64.shr_u end - local.get $5 + local.get $9 i64.mul i64.const 32 i64.shr_u @@ -10882,44 +10875,44 @@ i64.shr_u i64.add i32.wrap_i64 - local.tee $6 + local.tee $4 i32.sub + local.get $4 local.get $6 - local.get $1 select end - local.set $1 + local.set $4 global.get $~lib/math/rempio2f_y + local.tee $1 + local.get $1 + f64.mul local.tee $2 local.get $2 f64.mul - local.tee $3 - local.get $3 - f64.mul - local.set $4 + local.set $3 f64.const -1 + local.get $1 local.get $2 - local.get $3 - local.get $2 + local.get $1 f64.mul - local.tee $2 - local.get $3 + local.tee $1 + local.get $2 f64.const 0.13339200271297674 f64.mul f64.const 0.3333313950307914 f64.add f64.mul f64.add - local.get $2 - local.get $4 - f64.mul + local.get $1 local.get $3 + f64.mul + local.get $2 f64.const 0.024528318116654728 f64.mul f64.const 0.05338123784456704 f64.add - local.get $4 local.get $3 + local.get $2 f64.const 0.009465647849436732 f64.mul f64.const 0.002974357433599673 @@ -10928,10 +10921,10 @@ f64.add f64.mul f64.add - local.tee $2 + local.tee $1 f64.div - local.get $2 local.get $1 + local.get $4 i32.const 1 i32.and select @@ -10939,11 +10932,11 @@ return end local.get $2 - local.get $3 + local.get $1 local.get $2 f64.mul local.tee $2 - local.get $3 + local.get $1 f64.const 0.13339200271297674 f64.mul f64.const 0.3333313950307914 @@ -10951,15 +10944,15 @@ f64.mul f64.add local.get $2 - local.get $4 - f64.mul local.get $3 + f64.mul + local.get $1 f64.const 0.024528318116654728 f64.mul f64.const 0.05338123784456704 f64.add - local.get $4 local.get $3 + local.get $1 f64.const 0.009465647849436732 f64.mul f64.const 0.002974357433599673 @@ -10973,11 +10966,11 @@ end f64.const -1 local.get $2 - local.get $3 + local.get $1 local.get $2 f64.mul local.tee $2 - local.get $3 + local.get $1 f64.const 0.13339200271297674 f64.mul f64.const 0.3333313950307914 @@ -10985,15 +10978,15 @@ f64.mul f64.add local.get $2 - local.get $4 - f64.mul local.get $3 + f64.mul + local.get $1 f64.const 0.024528318116654728 f64.mul f64.const 0.05338123784456704 f64.add - local.get $4 local.get $3 + local.get $1 f64.const 0.009465647849436732 f64.mul f64.const 0.002974357433599673 @@ -11172,9 +11165,9 @@ (func $~lib/math/NativeMath.sincos (param $0 f64) (local $1 f64) (local $2 f64) - (local $3 i64) + (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) (local $6 i32) (local $7 f64) (local $8 f64) @@ -11182,22 +11175,22 @@ (local $10 f64) local.get $0 i64.reinterpret_f64 - local.tee $3 + local.tee $5 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $4 + local.tee $3 i32.const 31 i32.shr_u local.set $6 - local.get $4 + local.get $3 i32.const 2147483647 i32.and - local.tee $4 + local.tee $3 i32.const 1072243195 i32.le_u if - local.get $4 + local.get $3 i32.const 1044816030 i32.lt_u if @@ -11212,12 +11205,11 @@ local.get $0 f64.mul local.tee $1 - local.tee $2 local.get $0 f64.mul - local.get $2 - local.get $2 - local.get $2 + local.get $1 + local.get $1 + local.get $1 f64.const 2.7557313707070068e-06 f64.mul f64.const -1.984126982985795e-04 @@ -11225,12 +11217,13 @@ f64.mul f64.const 0.00833333333332249 f64.add - local.get $2 - local.get $2 - local.get $2 + local.get $1 + local.get $1 + local.get $1 f64.mul + local.tee $2 f64.mul - local.get $2 + local.get $1 f64.const 1.58969099521155e-10 f64.mul f64.const -2.5050760253406863e-08 @@ -11247,13 +11240,13 @@ local.get $1 f64.const 0.5 f64.mul - local.tee $2 - f64.sub local.tee $7 + f64.sub + local.tee $8 f64.const 1 - local.get $7 + local.get $8 f64.sub - local.get $2 + local.get $7 f64.sub local.get $1 local.get $1 @@ -11267,10 +11260,7 @@ f64.const 0.0416666666666666 f64.add f64.mul - local.get $1 - local.get $1 - f64.mul - local.tee $2 + local.get $2 local.get $2 f64.mul local.get $1 @@ -11294,7 +11284,7 @@ global.set $~lib/math/NativeMath.sincos_cos return end - local.get $4 + local.get $3 i32.const 2139095040 i32.ge_u if @@ -11308,18 +11298,18 @@ return end block $~lib/math/rempio2|inlined.3 (result i32) - local.get $3 + local.get $5 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $5 + local.tee $4 i32.const 1073928572 i32.lt_u if i32.const 1 - local.set $4 + local.set $3 local.get $6 if (result f64) local.get $0 @@ -11327,8 +11317,8 @@ f64.add local.set $0 i32.const -1 - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1073291771 i32.ne if (result f64) @@ -11359,7 +11349,7 @@ f64.const 1.5707963267341256 f64.sub local.set $0 - local.get $5 + local.get $4 i32.const 1073291771 i32.ne if (result f64) @@ -11389,17 +11379,17 @@ local.get $0 global.set $~lib/math/rempio2_y0 global.set $~lib/math/rempio2_y1 - local.get $4 + local.get $3 br $~lib/math/rempio2|inlined.3 end - local.get $5 + local.get $4 i32.const 1094263291 i32.lt_u if - local.get $5 + local.get $4 i32.const 20 i32.shr_u - local.tee $4 + local.tee $3 local.get $0 local.get $0 f64.const 0.6366197723675814 @@ -11444,7 +11434,7 @@ f64.sub f64.sub local.set $1 - local.get $4 + local.get $3 local.get $0 local.get $1 f64.sub @@ -11498,31 +11488,31 @@ br $~lib/math/rempio2|inlined.3 end i32.const 0 - local.get $3 + local.get $5 call $~lib/math/pio2_large_quot - local.tee $4 + local.tee $3 i32.sub - local.get $4 + local.get $3 local.get $6 select end - local.set $4 + local.set $3 global.get $~lib/math/rempio2_y0 - local.tee $8 - local.get $8 + local.tee $7 + local.get $7 f64.mul - local.tee $9 + local.tee $8 local.tee $0 - local.get $8 + local.get $7 f64.mul - local.set $2 - local.get $8 + local.set $1 + local.get $7 local.get $0 global.get $~lib/math/rempio2_y1 - local.tee $1 + local.tee $9 f64.const 0.5 f64.mul - local.get $2 + local.get $1 local.get $0 local.get $0 f64.const 2.7557313707070068e-06 @@ -11547,9 +11537,9 @@ f64.mul f64.sub f64.mul - local.get $1 + local.get $9 f64.sub - local.get $2 + local.get $1 f64.const -0.16666666666666632 f64.mul f64.sub @@ -11557,21 +11547,21 @@ local.tee $2 local.set $0 f64.const 1 - local.get $9 + local.get $8 f64.const 0.5 f64.mul - local.tee $10 + local.tee $1 f64.sub - local.tee $7 + local.tee $10 f64.const 1 - local.get $7 - f64.sub local.get $10 f64.sub - local.get $9 - local.get $9 - local.get $9 - local.get $9 + local.get $1 + f64.sub + local.get $8 + local.get $8 + local.get $8 + local.get $8 f64.const 2.480158728947673e-05 f64.mul f64.const -0.001388888888887411 @@ -11580,14 +11570,14 @@ f64.const 0.0416666666666666 f64.add f64.mul - local.get $9 - local.get $9 + local.get $8 + local.get $8 f64.mul - local.tee $7 - local.get $7 + local.tee $1 + local.get $1 f64.mul - local.get $9 - local.get $9 + local.get $8 + local.get $8 f64.const -1.1359647557788195e-11 f64.mul f64.const 2.087572321298175e-09 @@ -11598,14 +11588,14 @@ f64.mul f64.add f64.mul - local.get $8 - local.get $1 + local.get $7 + local.get $9 f64.mul f64.sub f64.add f64.add local.set $1 - local.get $4 + local.get $3 i32.const 1 i32.and if @@ -11615,7 +11605,7 @@ f64.neg local.set $1 end - local.get $4 + local.get $3 i32.const 2 i32.and if (result f64) diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index 63f17f2fce..aa4644a291 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -20,7 +20,6 @@ (local $7 i64) (local $8 i64) (local $9 i64) - (local $10 i64) block $__inlined_func$std/mod/check (result i32) block $__inlined_func$~lib/math/NativeMath.mod (result f64) local.get $0 @@ -37,25 +36,25 @@ drop local.get $1 i64.reinterpret_f64 - local.tee $8 + local.tee $6 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $9 - local.get $8 + local.set $8 + local.get $6 i64.const 1 i64.shl - local.tee $6 + local.tee $5 i64.eqz local.get $0 i64.reinterpret_f64 - local.tee $5 + local.tee $7 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.tee $10 + local.tee $9 i64.const 2047 i64.eq i32.or @@ -72,8 +71,8 @@ f64.div br $__inlined_func$~lib/math/NativeMath.mod end - local.get $6 local.get $5 + local.get $7 i64.const 1 i64.shl local.tee $3 @@ -81,53 +80,50 @@ if local.get $0 local.get $3 - local.get $6 + local.get $5 i64.ne f64.convert_i32_u f64.mul br $__inlined_func$~lib/math/NativeMath.mod end - local.get $5 - i64.const 63 - i64.shr_u - local.get $10 + local.get $9 i64.eqz if (result i64) - local.get $5 + local.get $7 i64.const 1 - local.get $10 - local.get $5 + local.get $9 + local.get $7 i64.const 12 i64.shl i64.clz i64.sub - local.tee $10 + local.tee $9 i64.sub i64.shl else - local.get $5 + local.get $7 i64.const 4503599627370495 i64.and i64.const 4503599627370496 i64.or end local.set $3 - local.get $9 + local.get $8 i64.eqz if (result i64) - local.get $8 + local.get $6 i64.const 1 - local.get $9 local.get $8 + local.get $6 i64.const 12 i64.shl i64.clz i64.sub - local.tee $9 + local.tee $8 i64.sub i64.shl else - local.get $8 + local.get $6 i64.const 4503599627370495 i64.and i64.const 4503599627370496 @@ -135,8 +131,8 @@ end local.set $5 loop $while-continue|0 + local.get $8 local.get $9 - local.get $10 i64.lt_s if local.get $3 @@ -160,10 +156,10 @@ i64.const 1 i64.shl local.set $3 - local.get $10 + local.get $9 i64.const 1 i64.sub - local.set $10 + local.set $9 br $while-continue|0 end end @@ -184,7 +180,7 @@ i64.sub local.set $3 end - local.get $10 + local.get $9 local.get $3 i64.const 11 i64.shl @@ -192,6 +188,9 @@ local.tee $6 i64.sub local.set $5 + local.get $7 + i64.const 63 + i64.shr_u i64.const 63 i64.shl local.get $3 @@ -280,7 +279,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) block $__inlined_func$std/mod/check (result i32) block $__inlined_func$~lib/math/NativeMathf.mod (result f32) local.get $0 @@ -297,28 +295,28 @@ drop local.get $1 i32.reinterpret_f32 - local.tee $7 + local.tee $5 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $8 + local.set $7 i32.const 1 local.get $1 local.get $1 f32.ne local.get $0 i32.reinterpret_f32 - local.tee $5 + local.tee $6 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $9 + local.tee $8 i32.const 255 i32.eq i32.const 1 - local.get $7 + local.get $5 i32.const 1 i32.shl local.tee $4 @@ -334,7 +332,7 @@ br $__inlined_func$~lib/math/NativeMathf.mod end local.get $4 - local.get $5 + local.get $6 i32.const 1 i32.shl local.tee $3 @@ -348,55 +346,51 @@ f32.mul br $__inlined_func$~lib/math/NativeMathf.mod end - local.get $5 - i32.const -2147483648 - i32.and - local.set $6 - local.get $9 + local.get $8 if (result i32) - local.get $5 + local.get $6 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $5 + local.get $6 i32.const 1 - local.get $9 - local.get $5 + local.get $8 + local.get $6 i32.const 9 i32.shl i32.clz i32.sub - local.tee $9 + local.tee $8 i32.sub i32.shl end local.set $3 - local.get $8 + local.get $7 if (result i32) - local.get $7 + local.get $5 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $7 + local.get $5 i32.const 1 - local.get $8 local.get $7 + local.get $5 i32.const 9 i32.shl i32.clz i32.sub - local.tee $8 + local.tee $7 i32.sub i32.shl end local.set $4 loop $while-continue|0 + local.get $7 local.get $8 - local.get $9 i32.lt_s if local.get $3 @@ -420,10 +414,10 @@ i32.const 1 i32.shl local.set $3 - local.get $9 + local.get $8 i32.const 1 i32.sub - local.set $9 + local.set $8 br $while-continue|0 end end @@ -444,7 +438,7 @@ i32.sub local.set $3 end - local.get $9 + local.get $8 local.get $3 i32.const 8 i32.shl @@ -452,6 +446,9 @@ local.tee $5 i32.sub local.set $4 + local.get $6 + i32.const -2147483648 + i32.and local.get $3 local.get $5 i32.shl @@ -471,7 +468,6 @@ i32.const 0 i32.gt_s select - local.get $6 i32.or f32.reinterpret_i32 end diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index ad5f943b49..bb99260091 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -1284,37 +1284,36 @@ i32.const 20 i32.add local.tee $0 - local.tee $1 i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 8 i32.add - local.tee $2 + local.tee $1 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=1 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=2 - local.get $2 + local.get $1 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 3 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 0 i32.store8 offset=3 - local.get $2 + local.get $1 i32.const 4 i32.sub i32.const 0 diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index a90a5ad507..99064b315b 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -8,7 +8,6 @@ (global $std/pointer/add (mut i32) (i32.const 0)) (global $std/pointer/sub (mut i32) (i32.const 0)) (global $std/pointer/nextOne (mut i32) (i32.const 0)) - (global $std/pointer/buf (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 1036) ",") (data (i32.const 1048) "\01\00\00\00\1c\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s") @@ -1123,8 +1122,6 @@ unreachable end i32.const 0 - global.set $std/pointer/buf - i32.const 0 f32.const 1.100000023841858 f32.store i32.const 4 @@ -1142,8 +1139,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/pointer/buf - f32.load offset=4 + i32.const 4 + f32.load f32.const 1.2000000476837158 f32.ne if @@ -1154,7 +1151,7 @@ call $~lib/builtins/abort unreachable end - global.get $std/pointer/buf + i32.const 0 f32.load f32.const 1.100000023841858 f32.ne @@ -1166,8 +1163,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/pointer/buf - f32.load offset=4 + i32.const 4 + f32.load f32.const 1.2000000476837158 f32.ne if @@ -1202,14 +1199,11 @@ call $~lib/builtins/abort unreachable end - global.get $std/pointer/buf - local.tee $0 i32.const 8 - i32.add f32.const 1.2999999523162842 f32.store - local.get $0 - f32.load offset=8 + i32.const 8 + f32.load f32.const 1.2999999523162842 f32.ne if @@ -1220,8 +1214,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/pointer/buf - f32.load offset=8 + i32.const 8 + f32.load f32.const 1.2999999523162842 f32.ne if @@ -1244,11 +1238,10 @@ call $~lib/builtins/abort unreachable end - global.get $std/pointer/buf - local.tee $0 + i32.const 0 f32.const 1.399999976158142 f32.store - local.get $0 + i32.const 0 f32.load f32.const 1.399999976158142 f32.ne diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index dde0f57db4..ed9d7e7711 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1279,7 +1279,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1294,7 +1294,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1307,7 +1307,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1315,7 +1315,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1326,16 +1326,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1346,16 +1346,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1363,7 +1363,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1371,8 +1371,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1389,7 +1389,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1399,13 +1399,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1418,40 +1418,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -2775,11 +2775,11 @@ block $~lib/util/memory/memmove|inlined.0 local.get $2 local.get $6 - local.tee $1 + local.tee $3 i32.eq br_if $~lib/util/memory/memmove|inlined.0 local.get $2 - local.get $1 + local.get $3 i32.sub local.get $7 i32.sub @@ -2790,26 +2790,26 @@ i32.sub i32.le_u if - local.get $1 + local.get $3 local.get $2 local.get $7 call $~lib/util/memory/memcpy br $~lib/util/memory/memmove|inlined.0 end - local.get $1 local.get $2 - i32.lt_u + local.get $3 + i32.gt_u if local.get $2 i32.const 7 i32.and - local.get $1 + local.get $3 i32.const 7 i32.and i32.eq if loop $while-continue|0 - local.get $1 + local.get $3 i32.const 7 i32.and if @@ -2820,18 +2820,18 @@ i32.const 1 i32.sub local.set $7 - local.get $1 - local.tee $3 + local.get $3 + local.tee $4 i32.const 1 i32.add - local.set $1 + local.set $3 local.get $2 - local.tee $4 + local.tee $1 i32.const 1 i32.add local.set $2 - local.get $3 local.get $4 + local.get $1 i32.load8_u i32.store8 br $while-continue|0 @@ -2842,7 +2842,7 @@ i32.const 8 i32.ge_u if - local.get $1 + local.get $3 local.get $2 i64.load i64.store @@ -2850,10 +2850,10 @@ i32.const 8 i32.sub local.set $7 - local.get $1 + local.get $3 i32.const 8 i32.add - local.set $1 + local.set $3 local.get $2 i32.const 8 i32.add @@ -2865,18 +2865,18 @@ loop $while-continue|2 local.get $7 if - local.get $1 - local.tee $3 + local.get $3 + local.tee $4 i32.const 1 i32.add - local.set $1 + local.set $3 local.get $2 - local.tee $4 + local.tee $1 i32.const 1 i32.add local.set $2 - local.get $3 local.get $4 + local.get $1 i32.load8_u i32.store8 local.get $7 @@ -2890,13 +2890,13 @@ local.get $2 i32.const 7 i32.and - local.get $1 + local.get $3 i32.const 7 i32.and i32.eq if loop $while-continue|3 - local.get $1 + local.get $3 local.get $7 i32.add i32.const 7 @@ -2909,7 +2909,7 @@ i32.const 1 i32.sub local.tee $7 - local.get $1 + local.get $3 i32.add local.get $2 local.get $7 @@ -2928,7 +2928,7 @@ i32.const 8 i32.sub local.tee $7 - local.get $1 + local.get $3 i32.add local.get $2 local.get $7 @@ -2946,7 +2946,7 @@ i32.const 1 i32.sub local.tee $7 - local.get $1 + local.get $3 i32.add local.get $2 local.get $7 @@ -3240,7 +3240,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend8_s i32.const -1028477379 i32.mul @@ -3250,62 +3249,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find loop $while-continue|0 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|0 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 if i32.const 0 i32.const 1568 @@ -3322,7 +3321,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend8_s i32.const -1028477379 i32.mul @@ -3332,62 +3330,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find1 loop $while-continue|02 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find1 - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|02 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 i32.eqz if i32.const 0 @@ -3429,7 +3427,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend8_s i32.const -1028477379 i32.mul @@ -3439,62 +3436,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find4 loop $while-continue|05 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find4 - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|05 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 i32.eqz if i32.const 0 @@ -3512,7 +3509,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend8_s i32.const -1028477379 i32.mul @@ -3522,62 +3518,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find7 loop $while-continue|08 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find7 - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|08 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 i32.eqz if i32.const 0 @@ -3607,7 +3603,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $4 + local.tee $1 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -3616,7 +3612,7 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $0 + local.tee $4 i32.const 0 i32.store local.get $2 @@ -3624,8 +3620,8 @@ local.set $5 local.get $2 i32.load offset=16 - local.set $1 - local.get $0 + local.set $6 + local.get $4 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -3634,28 +3630,28 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $6 + local.tee $0 i64.const 0 i64.store - local.get $6 + local.get $0 i32.const 16 i32.const 4 call $~lib/rt/itcms/__new - local.tee $6 + local.tee $7 i32.store - local.get $6 + local.get $7 i32.const 0 i32.store - local.get $6 + local.get $7 i32.const 0 i32.store offset=4 - local.get $6 + local.get $7 i32.const 0 i32.store offset=8 - local.get $6 + local.get $7 i32.const 0 i32.store offset=12 - local.get $1 + local.get $6 i32.const 1073741820 i32.gt_u if @@ -3667,63 +3663,63 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $6 i32.const 8 - local.get $1 + local.get $6 i32.const 8 i32.gt_u select - local.tee $7 + local.tee $8 i32.const 0 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $0 i32.store offset=4 - local.get $6 - local.get $8 + local.get $7 + local.get $0 i32.store - local.get $8 + local.get $0 if - local.get $6 - local.get $8 + local.get $7 + local.get $0 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $6 - local.get $8 + local.get $7 + local.get $0 i32.store offset=4 - local.get $6 local.get $7 + local.get $8 i32.store offset=8 + local.get $7 local.get $6 - local.get $1 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 - local.get $6 + local.get $4 + local.get $7 i32.store i32.const 0 local.set $0 loop $for-loop|0 - local.get $1 local.get $3 - i32.gt_s + local.get $6 + i32.lt_s if local.get $3 i32.const 3 i32.shl local.get $5 i32.add - local.tee $7 + local.tee $4 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $6 - local.get $0 local.get $7 + local.get $0 + local.get $4 i32.load8_s call $~lib/array/Array#__set local.get $0 @@ -3738,42 +3734,37 @@ br $for-loop|0 end end - local.get $6 + local.get $7 local.get $0 i32.const 0 i32.const 0 call $~lib/array/ensureCapacity - local.get $6 + local.get $7 local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 - local.get $6 + local.get $1 + local.get $7 i32.store offset=4 global.get $~lib/memory/__stack_pointer call $~lib/set/Set#constructor - local.tee $4 + local.tee $3 i32.store offset=8 i32.const 0 local.set $0 loop $for-loop|4 - local.get $6 + local.get $7 i32.load offset=12 local.get $0 i32.gt_s if - local.get $6 + local.get $7 local.get $0 call $~lib/array/Array#__get - local.set $3 - local.get $2 - i32.load - local.get $2 - i32.load offset=4 - local.get $3 + local.tee $4 i32.extend8_s i32.const -1028477379 i32.mul @@ -3784,23 +3775,28 @@ i32.const 668265263 i32.mul local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $1 i32.xor i32.const -2048144777 i32.mul local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $1 i32.xor i32.const -1028477379 i32.mul - local.tee $1 + local.set $1 + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $1 + local.get $1 i32.const 16 i32.shr_u - local.get $1 i32.xor i32.and i32.const 2 @@ -3822,7 +3818,7 @@ else local.get $1 i32.load8_u - local.get $3 + local.get $4 i32.const 255 i32.and i32.eq @@ -3848,8 +3844,8 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $6 + local.get $3 + local.get $7 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add @@ -3860,7 +3856,7 @@ br $for-loop|4 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $2 i32.load offset=20 @@ -3886,7 +3882,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend8_s i32.const -1028477379 i32.mul @@ -3896,62 +3891,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find13 loop $while-continue|014 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find13 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|014 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 i32.eqz if i32.const 0 @@ -3969,7 +3964,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend8_s i32.const -1028477379 i32.mul @@ -3979,62 +3973,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find16 loop $while-continue|017 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find16 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|017 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 if i32.const 0 i32.const 1568 @@ -4075,7 +4069,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend8_s i32.const -1028477379 i32.mul @@ -4085,62 +4078,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find19 loop $while-continue|020 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find19 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|020 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 if i32.const 0 i32.const 1568 @@ -4157,7 +4150,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend8_s i32.const -1028477379 i32.mul @@ -4167,62 +4159,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find22 loop $while-continue|023 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find22 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|023 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 i32.eqz if i32.const 0 @@ -4240,7 +4232,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend8_s i32.const -1028477379 i32.mul @@ -4250,62 +4241,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find25 loop $while-continue|026 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find25 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|026 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 if i32.const 0 i32.const 1568 @@ -4857,7 +4848,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 255 i32.and i32.const -1028477379 @@ -4868,62 +4858,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find loop $while-continue|0 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|0 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 if i32.const 0 i32.const 1568 @@ -4940,7 +4930,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 255 i32.and i32.const -1028477379 @@ -4951,62 +4940,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find1 loop $while-continue|02 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find1 - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|02 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 i32.eqz if i32.const 0 @@ -5049,7 +5038,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 255 i32.and i32.const -1028477379 @@ -5060,62 +5048,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find4 loop $while-continue|05 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find4 - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|05 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 i32.eqz if i32.const 0 @@ -5133,7 +5121,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 255 i32.and i32.const -1028477379 @@ -5144,62 +5131,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find7 loop $while-continue|08 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find7 - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|08 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 i32.eqz if i32.const 0 @@ -5229,7 +5216,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $4 + local.tee $1 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -5238,7 +5225,7 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $0 + local.tee $4 i32.const 0 i32.store local.get $2 @@ -5246,8 +5233,8 @@ local.set $5 local.get $2 i32.load offset=16 - local.set $1 - local.get $0 + local.set $6 + local.get $4 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -5256,28 +5243,28 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $6 + local.tee $0 i64.const 0 i64.store - local.get $6 + local.get $0 i32.const 16 i32.const 6 call $~lib/rt/itcms/__new - local.tee $6 + local.tee $7 i32.store - local.get $6 + local.get $7 i32.const 0 i32.store - local.get $6 + local.get $7 i32.const 0 i32.store offset=4 - local.get $6 + local.get $7 i32.const 0 i32.store offset=8 - local.get $6 + local.get $7 i32.const 0 i32.store offset=12 - local.get $1 + local.get $6 i32.const 1073741820 i32.gt_u if @@ -5289,63 +5276,63 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $6 i32.const 8 - local.get $1 + local.get $6 i32.const 8 i32.gt_u select - local.tee $7 + local.tee $8 i32.const 0 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $0 i32.store offset=4 - local.get $6 - local.get $8 + local.get $7 + local.get $0 i32.store - local.get $8 + local.get $0 if - local.get $6 - local.get $8 + local.get $7 + local.get $0 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $6 - local.get $8 + local.get $7 + local.get $0 i32.store offset=4 - local.get $6 local.get $7 + local.get $8 i32.store offset=8 + local.get $7 local.get $6 - local.get $1 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 - local.get $6 + local.get $4 + local.get $7 i32.store i32.const 0 local.set $0 loop $for-loop|0 - local.get $1 local.get $3 - i32.gt_s + local.get $6 + i32.lt_s if local.get $3 i32.const 3 i32.shl local.get $5 i32.add - local.tee $7 + local.tee $4 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $6 - local.get $0 local.get $7 + local.get $0 + local.get $4 i32.load8_u call $~lib/array/Array#__set local.get $0 @@ -5360,42 +5347,37 @@ br $for-loop|0 end end - local.get $6 + local.get $7 local.get $0 i32.const 0 i32.const 0 call $~lib/array/ensureCapacity - local.get $6 + local.get $7 local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 - local.get $6 + local.get $1 + local.get $7 i32.store offset=4 global.get $~lib/memory/__stack_pointer call $~lib/set/Set#constructor - local.tee $4 + local.tee $3 i32.store offset=8 i32.const 0 local.set $0 loop $for-loop|4 - local.get $6 + local.get $7 i32.load offset=12 local.get $0 i32.gt_s if - local.get $6 + local.get $7 local.get $0 call $~lib/array/Array#__get - local.set $3 - local.get $2 - i32.load - local.get $2 - i32.load offset=4 - local.get $3 + local.tee $4 i32.const 255 i32.and i32.const -1028477379 @@ -5407,23 +5389,28 @@ i32.const 668265263 i32.mul local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $1 i32.xor i32.const -2048144777 i32.mul local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $1 i32.xor i32.const -1028477379 i32.mul - local.tee $1 + local.set $1 + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $1 + local.get $1 i32.const 16 i32.shr_u - local.get $1 i32.xor i32.and i32.const 2 @@ -5445,7 +5432,7 @@ else local.get $1 i32.load8_u - local.get $3 + local.get $4 i32.const 255 i32.and i32.eq @@ -5471,8 +5458,8 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $6 + local.get $3 + local.get $7 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add @@ -5483,7 +5470,7 @@ br $for-loop|4 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $2 i32.load offset=20 @@ -5510,7 +5497,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 255 i32.and i32.const -1028477379 @@ -5521,62 +5507,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find13 loop $while-continue|014 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find13 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|014 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 i32.eqz if i32.const 0 @@ -5594,7 +5580,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 255 i32.and i32.const -1028477379 @@ -5605,62 +5590,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find16 loop $while-continue|017 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load8_u local.get $1 - i32.const 255 + i32.load8_u + local.get $0 + i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find16 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|017 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 if i32.const 0 i32.const 1568 @@ -5702,7 +5687,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 255 i32.and i32.const -1028477379 @@ -5713,62 +5697,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find19 loop $while-continue|020 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find19 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|020 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 if i32.const 0 i32.const 1568 @@ -5785,7 +5769,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 255 i32.and i32.const -1028477379 @@ -5796,62 +5779,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find22 loop $while-continue|023 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find22 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|023 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 i32.eqz if i32.const 0 @@ -5869,7 +5852,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 255 i32.and i32.const -1028477379 @@ -5880,62 +5862,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find25 loop $while-continue|026 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load8_u local.get $1 + i32.load8_u + local.get $0 i32.const 255 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find25 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|026 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 if i32.const 0 i32.const 1568 @@ -6526,7 +6508,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend16_s i32.const -1028477379 i32.mul @@ -6536,62 +6517,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find loop $while-continue|0 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|0 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 if i32.const 0 i32.const 1568 @@ -6608,7 +6589,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend16_s i32.const -1028477379 i32.mul @@ -6618,62 +6598,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find1 loop $while-continue|02 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find1 - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|02 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 i32.eqz if i32.const 0 @@ -6715,7 +6695,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend16_s i32.const -1028477379 i32.mul @@ -6725,62 +6704,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find4 loop $while-continue|05 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find4 - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|05 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 i32.eqz if i32.const 0 @@ -6798,7 +6777,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend16_s i32.const -1028477379 i32.mul @@ -6808,62 +6786,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find7 loop $while-continue|08 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find7 - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|08 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 i32.eqz if i32.const 0 @@ -6893,7 +6871,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $4 + local.tee $1 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -6902,7 +6880,7 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $0 + local.tee $4 i32.const 0 i32.store local.get $2 @@ -6910,8 +6888,8 @@ local.set $5 local.get $2 i32.load offset=16 - local.set $1 - local.get $0 + local.set $6 + local.get $4 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -6920,28 +6898,28 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $6 + local.tee $0 i64.const 0 i64.store - local.get $6 + local.get $0 i32.const 16 i32.const 8 call $~lib/rt/itcms/__new - local.tee $6 + local.tee $7 i32.store - local.get $6 + local.get $7 i32.const 0 i32.store - local.get $6 + local.get $7 i32.const 0 i32.store offset=4 - local.get $6 + local.get $7 i32.const 0 i32.store offset=8 - local.get $6 + local.get $7 i32.const 0 i32.store offset=12 - local.get $1 + local.get $6 i32.const 536870910 i32.gt_u if @@ -6953,65 +6931,65 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $6 i32.const 8 - local.get $1 + local.get $6 i32.const 8 i32.gt_u select i32.const 1 i32.shl - local.tee $7 + local.tee $8 i32.const 0 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $0 i32.store offset=4 - local.get $6 - local.get $8 + local.get $7 + local.get $0 i32.store - local.get $8 + local.get $0 if - local.get $6 - local.get $8 + local.get $7 + local.get $0 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $6 - local.get $8 + local.get $7 + local.get $0 i32.store offset=4 - local.get $6 local.get $7 + local.get $8 i32.store offset=8 + local.get $7 local.get $6 - local.get $1 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 - local.get $6 + local.get $4 + local.get $7 i32.store i32.const 0 local.set $0 loop $for-loop|0 - local.get $1 local.get $3 - i32.gt_s + local.get $6 + i32.lt_s if local.get $3 i32.const 3 i32.shl local.get $5 i32.add - local.tee $7 + local.tee $4 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $6 - local.get $0 local.get $7 + local.get $0 + local.get $4 i32.load16_s call $~lib/array/Array#__set local.get $0 @@ -7026,42 +7004,37 @@ br $for-loop|0 end end - local.get $6 + local.get $7 local.get $0 i32.const 1 i32.const 0 call $~lib/array/ensureCapacity - local.get $6 + local.get $7 local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 - local.get $6 + local.get $1 + local.get $7 i32.store offset=4 global.get $~lib/memory/__stack_pointer call $~lib/set/Set#constructor - local.tee $4 + local.tee $3 i32.store offset=8 i32.const 0 local.set $0 loop $for-loop|4 - local.get $6 + local.get $7 i32.load offset=12 local.get $0 i32.gt_s if - local.get $6 + local.get $7 local.get $0 call $~lib/array/Array#__get - local.set $3 - local.get $2 - i32.load - local.get $2 - i32.load offset=4 - local.get $3 + local.tee $4 i32.extend16_s i32.const -1028477379 i32.mul @@ -7072,23 +7045,28 @@ i32.const 668265263 i32.mul local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $1 i32.xor i32.const -2048144777 i32.mul local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $1 i32.xor i32.const -1028477379 i32.mul - local.tee $1 + local.set $1 + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $1 + local.get $1 i32.const 16 i32.shr_u - local.get $1 i32.xor i32.and i32.const 2 @@ -7110,7 +7088,7 @@ else local.get $1 i32.load16_u - local.get $3 + local.get $4 i32.const 65535 i32.and i32.eq @@ -7136,8 +7114,8 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $6 + local.get $3 + local.get $7 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add @@ -7148,7 +7126,7 @@ br $for-loop|4 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $2 i32.load offset=20 @@ -7174,7 +7152,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend16_s i32.const -1028477379 i32.mul @@ -7184,62 +7161,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find13 loop $while-continue|014 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find13 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|014 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 i32.eqz if i32.const 0 @@ -7257,7 +7234,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend16_s i32.const -1028477379 i32.mul @@ -7267,62 +7243,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find16 loop $while-continue|017 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find16 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|017 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 if i32.const 0 i32.const 1568 @@ -7363,7 +7339,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend16_s i32.const -1028477379 i32.mul @@ -7373,62 +7348,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find19 loop $while-continue|020 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find19 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|020 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 if i32.const 0 i32.const 1568 @@ -7445,7 +7420,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend16_s i32.const -1028477379 i32.mul @@ -7455,62 +7429,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find22 loop $while-continue|023 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find22 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|023 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 i32.eqz if i32.const 0 @@ -7528,7 +7502,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.extend16_s i32.const -1028477379 i32.mul @@ -7538,62 +7511,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find25 loop $while-continue|026 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find25 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|026 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 if i32.const 0 i32.const 1568 @@ -8147,7 +8120,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 65535 i32.and i32.const -1028477379 @@ -8158,62 +8130,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 - i32.const 16 + local.tee $1 + local.get $1 + i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find loop $while-continue|0 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|0 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 if i32.const 0 i32.const 1568 @@ -8230,7 +8202,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 65535 i32.and i32.const -1028477379 @@ -8241,62 +8212,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find1 loop $while-continue|02 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find1 - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|02 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 i32.eqz if i32.const 0 @@ -8339,7 +8310,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 65535 i32.and i32.const -1028477379 @@ -8350,62 +8320,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find4 loop $while-continue|05 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find4 - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|05 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 i32.eqz if i32.const 0 @@ -8423,7 +8393,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 65535 i32.and i32.const -1028477379 @@ -8434,62 +8403,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $4 i32.xor i32.const -2048144777 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $4 i32.xor i32.const -1028477379 i32.mul - local.tee $4 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $4 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $4 + local.set $1 block $__inlined_func$~lib/set/Set#find7 loop $while-continue|08 - local.get $4 + local.get $1 if - local.get $4 + local.get $1 i32.load offset=4 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $4 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find7 - local.get $5 + local.get $4 i32.const -2 i32.and - local.set $4 + local.set $1 br $while-continue|08 end end i32.const 0 - local.set $4 + local.set $1 end - local.get $4 + local.get $1 i32.eqz if i32.const 0 @@ -8519,7 +8488,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $4 + local.tee $1 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -8528,7 +8497,7 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $0 + local.tee $4 i32.const 0 i32.store local.get $2 @@ -8536,8 +8505,8 @@ local.set $5 local.get $2 i32.load offset=16 - local.set $1 - local.get $0 + local.set $6 + local.get $4 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -8546,28 +8515,28 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $6 + local.tee $0 i64.const 0 i64.store - local.get $6 + local.get $0 i32.const 16 i32.const 10 call $~lib/rt/itcms/__new - local.tee $6 + local.tee $7 i32.store - local.get $6 + local.get $7 i32.const 0 i32.store - local.get $6 + local.get $7 i32.const 0 i32.store offset=4 - local.get $6 + local.get $7 i32.const 0 i32.store offset=8 - local.get $6 + local.get $7 i32.const 0 i32.store offset=12 - local.get $1 + local.get $6 i32.const 536870910 i32.gt_u if @@ -8579,65 +8548,65 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $6 i32.const 8 - local.get $1 + local.get $6 i32.const 8 i32.gt_u select i32.const 1 i32.shl - local.tee $7 + local.tee $8 i32.const 0 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $0 i32.store offset=4 - local.get $6 - local.get $8 + local.get $7 + local.get $0 i32.store - local.get $8 + local.get $0 if - local.get $6 - local.get $8 + local.get $7 + local.get $0 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $6 - local.get $8 + local.get $7 + local.get $0 i32.store offset=4 - local.get $6 local.get $7 + local.get $8 i32.store offset=8 + local.get $7 local.get $6 - local.get $1 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $0 - local.get $6 + local.get $4 + local.get $7 i32.store i32.const 0 local.set $0 loop $for-loop|0 - local.get $1 local.get $3 - i32.gt_s + local.get $6 + i32.lt_s if local.get $3 i32.const 3 i32.shl local.get $5 i32.add - local.tee $7 + local.tee $4 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $6 - local.get $0 local.get $7 + local.get $0 + local.get $4 i32.load16_u call $~lib/array/Array#__set local.get $0 @@ -8652,42 +8621,37 @@ br $for-loop|0 end end - local.get $6 + local.get $7 local.get $0 i32.const 1 i32.const 0 call $~lib/array/ensureCapacity - local.get $6 + local.get $7 local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 - local.get $6 + local.get $1 + local.get $7 i32.store offset=4 global.get $~lib/memory/__stack_pointer call $~lib/set/Set#constructor - local.tee $4 + local.tee $3 i32.store offset=8 i32.const 0 local.set $0 loop $for-loop|4 - local.get $6 + local.get $7 i32.load offset=12 local.get $0 i32.gt_s if - local.get $6 + local.get $7 local.get $0 call $~lib/array/Array#__get - local.set $3 - local.get $2 - i32.load - local.get $2 - i32.load offset=4 - local.get $3 + local.tee $4 i32.const 65535 i32.and i32.const -1028477379 @@ -8699,23 +8663,28 @@ i32.const 668265263 i32.mul local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $1 i32.xor i32.const -2048144777 i32.mul local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $1 i32.xor i32.const -1028477379 i32.mul - local.tee $1 + local.set $1 + local.get $2 + i32.load + local.get $2 + i32.load offset=4 + local.get $1 + local.get $1 i32.const 16 i32.shr_u - local.get $1 i32.xor i32.and i32.const 2 @@ -8737,7 +8706,7 @@ else local.get $1 i32.load16_u - local.get $3 + local.get $4 i32.const 65535 i32.and i32.eq @@ -8763,8 +8732,8 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $6 + local.get $3 + local.get $7 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add @@ -8775,7 +8744,7 @@ br $for-loop|4 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $2 i32.load offset=20 @@ -8802,7 +8771,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 65535 i32.and i32.const -1028477379 @@ -8813,62 +8781,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find13 loop $while-continue|014 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find13 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|014 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 i32.eqz if i32.const 0 @@ -8886,7 +8854,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 65535 i32.and i32.const -1028477379 @@ -8897,62 +8864,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find16 loop $while-continue|017 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find16 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|017 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 if i32.const 0 i32.const 1568 @@ -8994,7 +8961,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 65535 i32.and i32.const -1028477379 @@ -9005,62 +8971,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find19 loop $while-continue|020 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find19 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|020 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 if i32.const 0 i32.const 1568 @@ -9077,7 +9043,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 65535 i32.and i32.const -1028477379 @@ -9088,62 +9053,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find22 loop $while-continue|023 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find22 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|023 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 i32.eqz if i32.const 0 @@ -9161,7 +9126,6 @@ local.get $2 i32.load offset=4 local.get $0 - local.tee $1 i32.const 65535 i32.and i32.const -1028477379 @@ -9172,62 +9136,62 @@ i32.rotl i32.const 668265263 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 15 i32.shr_u - local.get $3 i32.xor i32.const -2048144777 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 13 i32.shr_u - local.get $3 i32.xor i32.const -1028477379 i32.mul - local.tee $3 + local.tee $1 + local.get $1 i32.const 16 i32.shr_u - local.get $3 i32.xor i32.and i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $1 block $__inlined_func$~lib/set/Set#find25 loop $while-continue|026 - local.get $3 + local.get $1 if - local.get $3 + local.get $1 i32.load offset=4 - local.tee $4 + local.tee $3 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $3 - i32.load16_u local.get $1 + i32.load16_u + local.get $0 i32.const 65535 i32.and i32.eq end br_if $__inlined_func$~lib/set/Set#find25 - local.get $4 + local.get $3 i32.const -2 i32.and - local.set $3 + local.set $1 br $while-continue|026 end end i32.const 0 - local.set $3 + local.set $1 end - local.get $3 + local.get $1 if i32.const 0 i32.const 1568 @@ -12577,7 +12541,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $7 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -12585,7 +12549,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $5 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor @@ -12593,13 +12557,13 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $8 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $8 + local.set $4 local.get $3 local.set $2 loop $while-continue|0 @@ -12607,14 +12571,14 @@ local.get $8 i32.ne if - local.get $4 + local.get $8 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $4 + local.get $8 i64.load local.tee $6 i64.store @@ -12663,7 +12627,7 @@ i32.and i32.const 2 i32.shl - local.get $5 + local.get $7 i32.add local.tee $9 i32.load @@ -12676,20 +12640,20 @@ i32.add local.set $2 end - local.get $4 + local.get $8 i32.const 16 i32.add - local.set $4 + local.set $8 br $while-continue|0 end end local.get $0 - local.get $5 + local.get $7 i32.store - local.get $5 + local.get $7 if local.get $0 - local.get $5 + local.get $7 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 @@ -12705,7 +12669,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $7 + local.get $5 i32.store offset=12 local.get $0 local.get $0 @@ -13105,8 +13069,8 @@ ) (func $std/set/testNumeric (local $0 i32) - (local $1 i32) - (local $2 i64) + (local $1 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13125,23 +13089,23 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $2 i64.const 0 i64.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 call $~lib/set/Set#constructor - local.tee $1 + local.tee $2 i32.store loop $for-loop|0 - local.get $2 + local.get $1 i64.const 100 i64.lt_s if - local.get $1 local.get $2 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -13151,11 +13115,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $2 - call $~lib/set/Set#add local.get $1 + call $~lib/set/Set#add local.get $2 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -13166,14 +13130,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i64.const 1 i64.add - local.set $2 + local.set $1 br $for-loop|0 end end - local.get $1 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -13186,14 +13150,14 @@ unreachable end i64.const 50 - local.set $2 + local.set $1 loop $for-loop|1 - local.get $2 + local.get $1 i64.const 100 i64.lt_s if - local.get $1 local.get $2 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -13204,11 +13168,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $2 - call $~lib/set/Set#add local.get $1 + call $~lib/set/Set#add local.get $2 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -13219,14 +13183,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i64.const 1 i64.add - local.set $2 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -13239,7 +13203,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $6 + local.tee $5 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -13248,16 +13212,16 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $5 + local.tee $9 i32.const 0 i32.store - local.get $1 + local.get $2 i32.load offset=8 - local.set $7 - local.get $1 + local.set $6 + local.get $2 i32.load offset=16 local.set $4 - local.get $5 + local.get $9 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -13266,25 +13230,25 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $8 + local.tee $7 i64.const 0 i64.store - local.get $8 + local.get $7 i32.const 16 i32.const 16 call $~lib/rt/itcms/__new - local.tee $9 + local.tee $10 i32.store - local.get $9 + local.get $10 i32.const 0 i32.store - local.get $9 + local.get $10 i32.const 0 i32.store offset=4 - local.get $9 + local.get $10 i32.const 0 i32.store offset=8 - local.get $9 + local.get $10 i32.const 0 i32.store offset=12 local.get $4 @@ -13307,35 +13271,35 @@ select i32.const 3 i32.shl - local.tee $8 + local.tee $7 i32.const 0 call $~lib/rt/itcms/__new - local.tee $10 + local.tee $8 i32.store offset=4 - local.get $9 local.get $10 + local.get $8 i32.store - local.get $10 + local.get $8 if - local.get $9 local.get $10 + local.get $8 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $9 local.get $10 - i32.store offset=4 - local.get $9 local.get $8 + i32.store offset=4 + local.get $10 + local.get $7 i32.store offset=8 - local.get $9 + local.get $10 local.get $4 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $5 local.get $9 + local.get $10 i32.store loop $for-loop|02 local.get $3 @@ -13345,17 +13309,17 @@ local.get $3 i32.const 4 i32.shl - local.get $7 + local.get $6 i32.add - local.tee $5 + local.tee $7 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $9 + local.get $10 local.get $0 - local.get $5 + local.get $7 i64.load call $~lib/array/Array#__set local.get $0 @@ -13370,20 +13334,20 @@ br $for-loop|02 end end - local.get $9 + local.get $10 local.get $0 i32.const 3 i32.const 0 call $~lib/array/ensureCapacity - local.get $9 + local.get $10 local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $6 - local.get $9 + local.get $5 + local.get $10 i32.store offset=4 global.get $~lib/memory/__stack_pointer call $~lib/set/Set#constructor @@ -13392,13 +13356,13 @@ i32.const 0 local.set $0 loop $for-loop|2 - local.get $9 + local.get $10 i32.load offset=12 local.get $0 i32.gt_s if - local.get $1 - local.get $9 + local.get $2 + local.get $10 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#has @@ -13412,7 +13376,7 @@ unreachable end local.get $3 - local.get $9 + local.get $10 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add @@ -13425,7 +13389,7 @@ end local.get $3 i32.load offset=20 - local.get $1 + local.get $2 i32.load offset=20 i32.ne if @@ -13437,14 +13401,14 @@ unreachable end i64.const 0 - local.set $2 + local.set $1 loop $for-loop|3 - local.get $2 + local.get $1 i64.const 50 i64.lt_s if - local.get $1 local.get $2 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -13455,11 +13419,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $2 - call $~lib/set/Set#delete local.get $1 + call $~lib/set/Set#delete local.get $2 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -13469,14 +13433,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i64.const 1 i64.add - local.set $2 + local.set $1 br $for-loop|3 end end - local.get $1 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -13489,14 +13453,14 @@ unreachable end i64.const 0 - local.set $2 + local.set $1 loop $for-loop|4 - local.get $2 + local.get $1 i64.const 50 i64.lt_s if - local.get $1 local.get $2 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -13506,11 +13470,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $2 - call $~lib/set/Set#add local.get $1 + call $~lib/set/Set#add local.get $2 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -13521,11 +13485,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $2 - call $~lib/set/Set#delete local.get $1 + call $~lib/set/Set#delete local.get $2 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -13535,14 +13499,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i64.const 1 i64.add - local.set $2 + local.set $1 br $for-loop|4 end end - local.get $1 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -13554,9 +13518,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 call $~lib/set/Set#clear - local.get $1 + local.get $2 i32.load offset=20 if i32.const 0 @@ -13699,7 +13663,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $7 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -13707,7 +13671,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $5 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor @@ -13715,13 +13679,13 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $8 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $8 + local.set $4 local.get $3 local.set $2 loop $while-continue|0 @@ -13729,14 +13693,14 @@ local.get $8 i32.ne if - local.get $4 + local.get $8 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $4 + local.get $8 i64.load local.tee $6 i64.store @@ -13785,7 +13749,7 @@ i32.and i32.const 2 i32.shl - local.get $5 + local.get $7 i32.add local.tee $9 i32.load @@ -13798,20 +13762,20 @@ i32.add local.set $2 end - local.get $4 + local.get $8 i32.const 16 i32.add - local.set $4 + local.set $8 br $while-continue|0 end end local.get $0 - local.get $5 + local.get $7 i32.store - local.get $5 + local.get $7 if local.get $0 - local.get $5 + local.get $7 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 @@ -13827,7 +13791,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $7 + local.get $5 i32.store offset=12 local.get $0 local.get $0 @@ -14151,8 +14115,8 @@ ) (func $std/set/testNumeric (local $0 i32) - (local $1 i32) - (local $2 i64) + (local $1 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -14171,23 +14135,23 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $2 i64.const 0 i64.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 call $~lib/set/Set#constructor - local.tee $1 + local.tee $2 i32.store loop $for-loop|0 - local.get $2 + local.get $1 i64.const 100 i64.lt_u if - local.get $1 local.get $2 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -14197,11 +14161,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $2 - call $~lib/set/Set#add local.get $1 + call $~lib/set/Set#add local.get $2 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -14212,14 +14176,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i64.const 1 i64.add - local.set $2 + local.set $1 br $for-loop|0 end end - local.get $1 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -14232,14 +14196,14 @@ unreachable end i64.const 50 - local.set $2 + local.set $1 loop $for-loop|1 - local.get $2 + local.get $1 i64.const 100 i64.lt_u if - local.get $1 local.get $2 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -14250,11 +14214,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $2 - call $~lib/set/Set#add local.get $1 + call $~lib/set/Set#add local.get $2 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -14265,14 +14229,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i64.const 1 i64.add - local.set $2 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -14285,7 +14249,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $6 + local.tee $5 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -14294,16 +14258,16 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $5 + local.tee $9 i32.const 0 i32.store - local.get $1 + local.get $2 i32.load offset=8 - local.set $7 - local.get $1 + local.set $6 + local.get $2 i32.load offset=16 local.set $4 - local.get $5 + local.get $9 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -14312,25 +14276,25 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $8 + local.tee $7 i64.const 0 i64.store - local.get $8 + local.get $7 i32.const 16 i32.const 18 call $~lib/rt/itcms/__new - local.tee $9 + local.tee $10 i32.store - local.get $9 + local.get $10 i32.const 0 i32.store - local.get $9 + local.get $10 i32.const 0 i32.store offset=4 - local.get $9 + local.get $10 i32.const 0 i32.store offset=8 - local.get $9 + local.get $10 i32.const 0 i32.store offset=12 local.get $4 @@ -14353,35 +14317,35 @@ select i32.const 3 i32.shl - local.tee $8 + local.tee $7 i32.const 0 call $~lib/rt/itcms/__new - local.tee $10 + local.tee $8 i32.store offset=4 - local.get $9 local.get $10 + local.get $8 i32.store - local.get $10 + local.get $8 if - local.get $9 local.get $10 + local.get $8 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $9 local.get $10 - i32.store offset=4 - local.get $9 local.get $8 + i32.store offset=4 + local.get $10 + local.get $7 i32.store offset=8 - local.get $9 + local.get $10 local.get $4 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $5 local.get $9 + local.get $10 i32.store loop $for-loop|02 local.get $3 @@ -14391,17 +14355,17 @@ local.get $3 i32.const 4 i32.shl - local.get $7 + local.get $6 i32.add - local.tee $5 + local.tee $7 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $9 + local.get $10 local.get $0 - local.get $5 + local.get $7 i64.load call $~lib/array/Array#__set local.get $0 @@ -14416,20 +14380,20 @@ br $for-loop|02 end end - local.get $9 + local.get $10 local.get $0 i32.const 3 i32.const 0 call $~lib/array/ensureCapacity - local.get $9 + local.get $10 local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $6 - local.get $9 + local.get $5 + local.get $10 i32.store offset=4 global.get $~lib/memory/__stack_pointer call $~lib/set/Set#constructor @@ -14438,13 +14402,13 @@ i32.const 0 local.set $0 loop $for-loop|2 - local.get $9 + local.get $10 i32.load offset=12 local.get $0 i32.gt_s if - local.get $1 - local.get $9 + local.get $2 + local.get $10 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#has @@ -14458,7 +14422,7 @@ unreachable end local.get $3 - local.get $9 + local.get $10 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add @@ -14471,7 +14435,7 @@ end local.get $3 i32.load offset=20 - local.get $1 + local.get $2 i32.load offset=20 i32.ne if @@ -14483,14 +14447,14 @@ unreachable end i64.const 0 - local.set $2 + local.set $1 loop $for-loop|3 - local.get $2 + local.get $1 i64.const 50 i64.lt_u if - local.get $1 local.get $2 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -14501,11 +14465,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $2 - call $~lib/set/Set#delete local.get $1 + call $~lib/set/Set#delete local.get $2 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -14515,14 +14479,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i64.const 1 i64.add - local.set $2 + local.set $1 br $for-loop|3 end end - local.get $1 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -14535,14 +14499,14 @@ unreachable end i64.const 0 - local.set $2 + local.set $1 loop $for-loop|4 - local.get $2 + local.get $1 i64.const 50 i64.lt_u if - local.get $1 local.get $2 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -14552,11 +14516,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $2 - call $~lib/set/Set#add local.get $1 + call $~lib/set/Set#add local.get $2 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -14567,11 +14531,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $2 - call $~lib/set/Set#delete local.get $1 + call $~lib/set/Set#delete local.get $2 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -14581,14 +14545,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i64.const 1 i64.add - local.set $2 + local.set $1 br $for-loop|4 end end - local.get $1 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -14600,9 +14564,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 call $~lib/set/Set#clear - local.get $1 + local.get $2 i32.load offset=20 if i32.const 0 @@ -14628,11 +14592,11 @@ (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) + (local $8 i32) (local $9 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -14661,7 +14625,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $7 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -14677,33 +14641,33 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $8 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 + local.set $5 local.get $3 local.set $2 loop $while-continue|0 - local.get $4 - local.get $7 + local.get $5 + local.get $8 i32.ne if - local.get $4 + local.get $8 i32.load offset=4 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $4 + local.get $8 f32.load - local.tee $8 + local.tee $4 f32.store local.get $2 - local.get $8 + local.get $4 i32.reinterpret_f32 i32.const -1028477379 i32.mul @@ -14736,7 +14700,7 @@ i32.and i32.const 2 i32.shl - local.get $5 + local.get $7 i32.add local.tee $9 i32.load @@ -14749,20 +14713,20 @@ i32.add local.set $2 end - local.get $4 + local.get $8 i32.const 8 i32.add - local.set $4 + local.set $8 br $while-continue|0 end end local.get $0 - local.get $5 + local.get $7 i32.store - local.get $5 + local.get $7 if local.get $0 - local.get $5 + local.get $7 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 @@ -15489,7 +15453,7 @@ i32.store local.get $11 i32.load offset=8 - local.set $5 + local.set $4 local.get $11 i32.load offset=16 local.set $7 @@ -15509,18 +15473,18 @@ i32.const 16 i32.const 20 call $~lib/rt/itcms/__new - local.tee $4 + local.tee $6 i32.store - local.get $4 + local.get $6 i32.const 0 i32.store - local.get $4 + local.get $6 i32.const 0 i32.store offset=4 - local.get $4 + local.get $6 i32.const 0 i32.store offset=8 - local.get $4 + local.get $6 i32.const 0 i32.store offset=12 local.get $7 @@ -15546,24 +15510,24 @@ local.tee $0 i32.const 0 call $~lib/rt/itcms/__new - local.tee $6 + local.tee $5 i32.store offset=4 - local.get $4 local.get $6 + local.get $5 i32.store - local.get $6 + local.get $5 if - local.get $4 local.get $6 + local.get $5 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $4 local.get $6 + local.get $5 i32.store offset=4 - local.get $4 + local.get $6 local.get $0 i32.store offset=8 - local.get $4 + local.get $6 local.get $7 i32.store offset=12 global.get $~lib/memory/__stack_pointer @@ -15571,7 +15535,7 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $3 - local.get $4 + local.get $6 i32.store loop $for-loop|02 local.get $7 @@ -15581,7 +15545,7 @@ local.get $9 i32.const 3 i32.shl - local.get $5 + local.get $4 i32.add local.tee $0 i32.load offset=4 @@ -15597,7 +15561,7 @@ i32.const 1 i32.add local.set $1 - local.get $4 + local.get $6 i32.load offset=12 local.get $0 i32.le_u @@ -15613,7 +15577,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $6 local.get $0 i32.const 1 i32.add @@ -15621,11 +15585,11 @@ i32.const 2 i32.const 1 call $~lib/array/ensureCapacity - local.get $4 + local.get $6 local.get $3 i32.store offset=12 end - local.get $4 + local.get $6 i32.load offset=4 local.get $0 i32.const 2 @@ -15641,12 +15605,12 @@ br $for-loop|02 end end - local.get $4 + local.get $6 local.get $1 i32.const 2 i32.const 0 call $~lib/array/ensureCapacity - local.get $4 + local.get $6 local.get $1 i32.store offset=12 global.get $~lib/memory/__stack_pointer @@ -15654,19 +15618,19 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $8 - local.get $4 + local.get $6 i32.store offset=4 global.get $~lib/memory/__stack_pointer call $~lib/set/Set#constructor local.tee $3 i32.store offset=8 loop $for-loop|2 - local.get $4 + local.get $6 i32.load offset=12 local.get $10 i32.gt_s if - local.get $4 + local.get $6 local.get $10 call $~lib/array/Array#__get local.tee $2 @@ -15748,7 +15712,7 @@ unreachable end local.get $3 - local.get $4 + local.get $6 local.get $10 call $~lib/array/Array#__get call $~lib/set/Set#add @@ -16330,12 +16294,12 @@ (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $4 i64) + (local $5 f64) (local $6 i32) (local $7 i32) - (local $8 f64) - (local $9 i64) + (local $8 i32) + (local $9 i32) (local $10 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -16364,7 +16328,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $8 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -16372,7 +16336,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor @@ -16380,35 +16344,35 @@ i32.store offset=4 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $9 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $7 + local.set $6 local.get $3 local.set $2 loop $while-continue|0 - local.get $4 - local.get $7 + local.get $6 + local.get $9 i32.ne if - local.get $4 + local.get $9 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $4 + local.get $9 f64.load - local.tee $8 + local.tee $5 f64.store local.get $2 - local.get $8 + local.get $5 i64.reinterpret_f64 - local.tee $9 + local.tee $4 i32.wrap_i64 i32.const -1028477379 i32.mul @@ -16418,7 +16382,7 @@ i32.rotl i32.const 668265263 i32.mul - local.get $9 + local.get $4 i64.const 32 i64.shr_u i32.wrap_i64 @@ -16452,7 +16416,7 @@ i32.and i32.const 2 i32.shl - local.get $5 + local.get $8 i32.add local.tee $10 i32.load @@ -16465,20 +16429,20 @@ i32.add local.set $2 end - local.get $4 + local.get $9 i32.const 16 i32.add - local.set $4 + local.set $9 br $while-continue|0 end end local.get $0 - local.get $5 + local.get $8 i32.store - local.get $5 + local.get $8 if local.get $0 - local.get $5 + local.get $8 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 @@ -16494,7 +16458,7 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $6 + local.get $7 i32.store offset=12 local.get $0 local.get $0 @@ -16825,8 +16789,8 @@ (func $std/set/testNumeric (local $0 i32) (local $1 i32) - (local $2 f64) - (local $3 i32) + (local $2 i32) + (local $3 f64) (local $4 i32) (local $5 i32) (local $6 i32) @@ -16845,23 +16809,23 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i64.const 0 i64.store - local.get $1 + local.get $0 i32.const 0 i32.store offset=8 - local.get $1 + local.get $0 call $~lib/set/Set#constructor - local.tee $8 + local.tee $10 i32.store loop $for-loop|0 - local.get $2 + local.get $3 f64.const 100 f64.lt if - local.get $8 - local.get $2 + local.get $10 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -16871,11 +16835,11 @@ call $~lib/builtins/abort unreachable end - local.get $8 - local.get $2 + local.get $10 + local.get $3 call $~lib/set/Set#add - local.get $8 - local.get $2 + local.get $10 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -16886,14 +16850,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 f64.const 1 f64.add - local.set $2 + local.set $3 br $for-loop|0 end end - local.get $8 + local.get $10 i32.load offset=20 i32.const 100 i32.ne @@ -16906,14 +16870,14 @@ unreachable end f64.const 50 - local.set $2 + local.set $3 loop $for-loop|1 - local.get $2 + local.get $3 f64.const 100 f64.lt if - local.get $8 - local.get $2 + local.get $10 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -16924,11 +16888,11 @@ call $~lib/builtins/abort unreachable end - local.get $8 - local.get $2 + local.get $10 + local.get $3 call $~lib/set/Set#add - local.get $8 - local.get $2 + local.get $10 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -16939,14 +16903,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 f64.const 1 f64.add - local.set $2 + local.set $3 br $for-loop|1 end end - local.get $8 + local.get $10 i32.load offset=20 i32.const 100 i32.ne @@ -16959,7 +16923,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $4 + local.tee $7 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -16968,16 +16932,16 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $2 i32.const 0 i32.store - local.get $8 + local.get $10 i32.load offset=8 - local.set $3 - local.get $8 - i32.load offset=16 local.set $6 - local.get $1 + local.get $10 + i32.load offset=16 + local.set $8 + local.get $2 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -16986,28 +16950,28 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $9 + local.tee $0 i64.const 0 i64.store - local.get $9 + local.get $0 i32.const 16 i32.const 22 call $~lib/rt/itcms/__new - local.tee $9 + local.tee $4 i32.store - local.get $9 + local.get $4 i32.const 0 i32.store - local.get $9 + local.get $4 i32.const 0 i32.store offset=4 - local.get $9 + local.get $4 i32.const 0 i32.store offset=8 - local.get $9 + local.get $4 i32.const 0 i32.store offset=12 - local.get $6 + local.get $8 i32.const 134217727 i32.gt_u if @@ -17019,74 +16983,74 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $8 i32.const 8 - local.get $6 + local.get $8 i32.const 8 i32.gt_u select i32.const 3 i32.shl - local.tee $10 + local.tee $0 i32.const 0 call $~lib/rt/itcms/__new - local.tee $11 + local.tee $5 i32.store offset=4 - local.get $9 - local.get $11 + local.get $4 + local.get $5 i32.store - local.get $11 + local.get $5 if - local.get $9 - local.get $11 + local.get $4 + local.get $5 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $9 - local.get $11 + local.get $4 + local.get $5 i32.store offset=4 - local.get $9 - local.get $10 + local.get $4 + local.get $0 i32.store offset=8 - local.get $9 - local.get $6 + local.get $4 + local.get $8 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 - local.get $9 + local.get $2 + local.get $4 i32.store loop $for-loop|02 - local.get $5 - local.get $6 - i32.lt_s + local.get $8 + local.get $9 + i32.gt_s if - local.get $5 + local.get $9 i32.const 4 i32.shl - local.get $3 + local.get $6 i32.add - local.tee $1 + local.tee $0 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $1 - f64.load - local.set $2 local.get $0 - local.tee $1 + f64.load + local.set $3 + local.get $1 + local.tee $0 i32.const 1 i32.add - local.set $0 - local.get $9 + local.set $1 + local.get $4 i32.load offset=12 - local.get $1 + local.get $0 i32.le_u if - local.get $1 + local.get $0 i32.const 0 i32.lt_s if @@ -17097,62 +17061,62 @@ call $~lib/builtins/abort unreachable end - local.get $9 - local.get $1 + local.get $4 + local.get $0 i32.const 1 i32.add - local.tee $10 + local.tee $2 i32.const 3 i32.const 1 call $~lib/array/ensureCapacity - local.get $9 - local.get $10 + local.get $4 + local.get $2 i32.store offset=12 end - local.get $9 + local.get $4 i32.load offset=4 - local.get $1 + local.get $0 i32.const 3 i32.shl i32.add - local.get $2 + local.get $3 f64.store end - local.get $5 + local.get $9 i32.const 1 i32.add - local.set $5 + local.set $9 br $for-loop|02 end end - local.get $9 - local.get $0 + local.get $4 + local.get $1 i32.const 3 i32.const 0 call $~lib/array/ensureCapacity - local.get $9 - local.get $0 + local.get $4 + local.get $1 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $7 local.get $4 - local.get $9 i32.store offset=4 global.get $~lib/memory/__stack_pointer call $~lib/set/Set#constructor local.tee $0 i32.store offset=8 loop $for-loop|2 - local.get $9 + local.get $4 i32.load offset=12 - local.get $7 + local.get $11 i32.gt_s if - local.get $8 - local.get $9 - local.get $7 + local.get $10 + local.get $4 + local.get $11 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -17165,20 +17129,20 @@ unreachable end local.get $0 - local.get $9 - local.get $7 + local.get $4 + local.get $11 call $~lib/array/Array#__get call $~lib/set/Set#add - local.get $7 + local.get $11 i32.const 1 i32.add - local.set $7 + local.set $11 br $for-loop|2 end end local.get $0 i32.load offset=20 - local.get $8 + local.get $10 i32.load offset=20 i32.ne if @@ -17190,14 +17154,14 @@ unreachable end f64.const 0 - local.set $2 + local.set $3 loop $for-loop|3 - local.get $2 + local.get $3 f64.const 50 f64.lt if - local.get $8 - local.get $2 + local.get $10 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -17208,11 +17172,11 @@ call $~lib/builtins/abort unreachable end - local.get $8 - local.get $2 + local.get $10 + local.get $3 call $~lib/set/Set#delete - local.get $8 - local.get $2 + local.get $10 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -17222,14 +17186,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 f64.const 1 f64.add - local.set $2 + local.set $3 br $for-loop|3 end end - local.get $8 + local.get $10 i32.load offset=20 i32.const 50 i32.ne @@ -17242,14 +17206,14 @@ unreachable end f64.const 0 - local.set $2 + local.set $3 loop $for-loop|4 - local.get $2 + local.get $3 f64.const 50 f64.lt if - local.get $8 - local.get $2 + local.get $10 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -17259,11 +17223,11 @@ call $~lib/builtins/abort unreachable end - local.get $8 - local.get $2 + local.get $10 + local.get $3 call $~lib/set/Set#add - local.get $8 - local.get $2 + local.get $10 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -17274,11 +17238,11 @@ call $~lib/builtins/abort unreachable end - local.get $8 - local.get $2 + local.get $10 + local.get $3 call $~lib/set/Set#delete - local.get $8 - local.get $2 + local.get $10 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -17288,14 +17252,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 f64.const 1 f64.add - local.set $2 + local.set $3 br $for-loop|4 end end - local.get $8 + local.get $10 i32.load offset=20 i32.const 50 i32.ne @@ -17307,9 +17271,9 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $10 call $~lib/set/Set#clear - local.get $8 + local.get $10 i32.load offset=20 if i32.const 0 diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index d9f1093a07..816743a585 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -1515,7 +1515,7 @@ call $~lib/rt/tlsf/removeBlock local.get $1 i32.load - local.set $2 + local.set $4 local.get $3 i32.const 4 i32.add @@ -1529,17 +1529,17 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const -4 i32.and local.get $3 i32.sub - local.tee $4 + local.tee $2 i32.const 16 i32.ge_u if local.get $1 - local.get $2 + local.get $4 i32.const 2 i32.and local.get $3 @@ -1550,19 +1550,19 @@ i32.const 4 i32.add i32.add - local.tee $2 - local.get $4 + local.tee $3 + local.get $2 i32.const 4 i32.sub i32.const 1 i32.or i32.store local.get $0 - local.get $2 + local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $1 - local.get $2 + local.get $4 i32.const -2 i32.and i32.store @@ -3475,8 +3475,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) - (local $13 i32) + (local $12 i32) + (local $13 i64) local.get $1 i32.const 48 i32.le_s @@ -3501,7 +3501,7 @@ end local.get $0 i32.load - local.set $1 + local.set $5 local.get $0 i32.load offset=4 local.set $3 @@ -3509,49 +3509,50 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $5 + local.get $5 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $4 + local.tee $1 select i32.store local.get $0 i32.load offset=8 - local.set $5 + local.set $4 i32.const 2 global.set $~argumentsLength - local.get $0 local.get $5 - local.get $1 local.get $3 - local.get $4 - select - local.tee $1 local.get $1 - local.get $5 + select + local.tee $3 + local.get $4 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $3 + local.set $1 + local.get $0 + local.get $4 + local.get $3 + local.get $1 select i32.store offset=4 local.get $0 - local.get $1 - local.get $5 local.get $3 + local.get $4 + local.get $1 select i32.store offset=8 end local.get $0 i32.load - local.set $1 + local.set $4 local.get $0 i32.load offset=4 local.set $3 @@ -3559,21 +3560,21 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $4 + local.get $4 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $2 + local.tee $1 select i32.store local.get $0 - local.get $1 + local.get $4 local.get $3 - local.get $2 + local.get $1 select i32.store offset=4 return @@ -3592,43 +3593,43 @@ local.get $1 i32.clz i32.sub - local.tee $6 + local.tee $8 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $8 + local.set $5 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $8 + local.get $5 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $9 + local.tee $10 local.get $7 i32.add - local.set $10 + local.set $11 loop $for-loop|1 - local.get $5 local.get $6 + local.get $8 i32.lt_u if - local.get $5 + local.get $6 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|1 end end @@ -3644,84 +3645,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $11 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $8 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $1 + local.tee $7 i32.const 1 i32.add - local.tee $5 + local.tee $1 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $8 + local.get $9 i32.const 31 - local.get $8 + local.get $9 i32.const 31 i32.lt_s select - local.tee $1 - local.get $5 + local.tee $7 + local.get $1 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $1 - local.get $8 + local.get $7 + local.get $9 i32.lt_s if local.get $0 - local.get $1 + local.get $7 i32.const 1 i32.add - local.tee $6 - local.get $8 + local.tee $5 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $5 - local.get $6 + local.tee $6 + local.get $5 i32.sub i32.const 1 i32.add - local.tee $7 + local.tee $8 i32.const 32 i32.lt_s if local.get $0 - local.get $6 - local.get $8 - local.get $6 + local.get $5 + local.get $9 + local.get $5 i32.const 31 i32.add - local.tee $5 - local.get $5 - local.get $8 + local.tee $1 + local.get $1 + local.get $9 i32.gt_s select - local.tee $5 - local.get $7 + local.tee $6 + local.get $8 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $6 + local.get $5 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $8 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $12 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -3731,30 +3732,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $7 + local.set $1 loop $for-loop|3 + local.get $1 local.get $4 - local.get $7 - i32.gt_u + i32.lt_u if local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load - local.tee $13 + local.tee $8 i32.const -1 i32.ne if local.get $0 - local.get $13 - local.get $10 + local.get $8 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -3763,16 +3764,16 @@ i32.load i32.const 1 i32.add - local.get $1 - local.get $11 + local.get $7 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $13 + local.get $8 local.set $3 end local.get $4 @@ -3782,8 +3783,8 @@ br $for-loop|3 end end - local.get $9 - local.get $7 + local.get $10 + local.get $1 i32.const 2 i32.shl local.tee $4 @@ -3791,15 +3792,15 @@ local.get $3 i32.store local.get $4 - local.get $10 + local.get $11 i32.add - local.get $1 + local.get $7 i32.store - local.get $6 - local.set $3 local.get $5 - local.set $1 - local.get $7 + local.set $3 + local.get $6 + local.set $7 + local.get $1 local.set $4 br $while-continue|2 end @@ -3810,7 +3811,7 @@ local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load local.tee $1 @@ -3822,13 +3823,13 @@ local.get $4 i32.const 2 i32.shl - local.get $10 + local.get $11 i32.add i32.load i32.const 1 i32.add - local.get $8 - local.get $11 + local.get $9 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns end @@ -3839,9 +3840,9 @@ br $for-loop|4 end end - local.get $11 + local.get $12 call $~lib/rt/tlsf/__free - local.get $9 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) @@ -3893,26 +3894,16 @@ block $~lib/staticarray/StaticArray block $std/staticarray/Ref block $~lib/staticarray/StaticArray - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/staticarray/StaticArray $std/staticarray/Ref $~lib/staticarray/StaticArray $folding-inner1 $folding-inner1 $~lib/staticarray/StaticArray<~lib/string/String> $~lib/array/Array<~lib/string/String> $~lib/staticarray/StaticArray $~lib/staticarray/StaticArray $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $invalid - end - return + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner1 $~lib/staticarray/StaticArray $std/staticarray/Ref $~lib/staticarray/StaticArray $folding-inner1 $folding-inner1 $~lib/staticarray/StaticArray<~lib/string/String> $~lib/array/Array<~lib/string/String> $~lib/staticarray/StaticArray $~lib/staticarray/StaticArray $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $invalid end return end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end return end return @@ -3935,17 +3926,17 @@ i32.const 2 i32.shl i32.add - local.set $2 + local.set $3 loop $while-continue|0 local.get $1 - local.get $2 + local.get $3 i32.lt_u if local.get $1 i32.load - local.tee $3 + local.tee $2 if - local.get $3 + local.get $2 call $byn-split-outlined-A$~lib/rt/itcms/__visit end local.get $1 @@ -3988,17 +3979,16 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $4 f64) + (local $5 f32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 f64) - (local $10 f32) + (local $9 i32) + (local $10 i32) (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i32) global.get $~lib/memory/__stack_pointer i32.const 32 i32.sub @@ -4009,19 +3999,19 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $6 i64.const 0 i64.store - local.get $2 + local.get $6 i64.const 0 i64.store offset=8 - local.get $2 + local.get $6 i64.const 0 i64.store offset=16 - local.get $2 + local.get $6 i64.const 0 i64.store offset=24 - local.get $2 + local.get $6 i32.const 1056 i32.store i32.const 1056 @@ -4178,17 +4168,17 @@ i32.const 12 i32.const 3 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $6 i32.const 1312 i32.const 12 call $~lib/memory/memory.copy - local.get $2 + local.get $6 global.set $std/staticarray/arr3 global.get $~lib/memory/__stack_pointer global.get $std/staticarray/arr3 - local.tee $2 + local.tee $6 i32.store - local.get $2 + local.get $6 i32.const 0 call $~lib/staticarray/StaticArray#__get i32.const 5 @@ -4203,9 +4193,9 @@ end global.get $~lib/memory/__stack_pointer global.get $std/staticarray/arr3 - local.tee $2 + local.tee $6 i32.store - local.get $2 + local.get $6 i32.const 1 call $~lib/staticarray/StaticArray#__get i32.const 6 @@ -4220,9 +4210,9 @@ end global.get $~lib/memory/__stack_pointer global.get $std/staticarray/arr3 - local.tee $2 + local.tee $6 i32.store - local.get $2 + local.get $6 i32.const 2 call $~lib/staticarray/StaticArray#__get i32.const 7 @@ -4237,9 +4227,9 @@ end global.get $~lib/memory/__stack_pointer global.get $std/staticarray/arr3 - local.tee $2 + local.tee $6 i32.store - local.get $2 + local.get $6 i32.const 20 i32.sub i32.load offset=16 @@ -4257,16 +4247,16 @@ end global.get $~lib/memory/__stack_pointer global.get $std/staticarray/arr3 - local.tee $2 + local.tee $6 i32.store - local.get $2 + local.get $6 i32.const 8 call $~lib/staticarray/StaticArray#__set global.get $~lib/memory/__stack_pointer global.get $std/staticarray/arr3 - local.tee $2 + local.tee $6 i32.store - local.get $2 + local.get $6 i32.const 1 call $~lib/staticarray/StaticArray#__get i32.const 8 @@ -4282,17 +4272,17 @@ i32.const 12 i32.const 3 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $6 i32.const 1312 i32.const 12 call $~lib/memory/memory.copy - local.get $2 + local.get $6 global.set $std/staticarray/arr3 global.get $~lib/memory/__stack_pointer global.get $std/staticarray/arr3 - local.tee $2 + local.tee $6 i32.store - local.get $2 + local.get $6 i32.const 1 call $~lib/staticarray/StaticArray#__get i32.const 6 @@ -4309,24 +4299,24 @@ i32.const 8 i32.const 5 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $6 i32.store offset=4 - local.get $2 + local.get $6 i32.const 0 call $std/staticarray/Ref#constructor call $~lib/staticarray/StaticArray#__uset - local.get $2 + local.get $6 i32.const 1 call $std/staticarray/Ref#constructor call $~lib/staticarray/StaticArray#__uset - local.get $2 + local.get $6 global.set $std/staticarray/arr4 i32.const 0 global.set $std/staticarray/arr3 i32.const 0 global.set $std/staticarray/arr4 global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $6 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -4335,23 +4325,23 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $7 i32.const 0 i32.store - local.get $2 + local.get $7 i32.const 12 i32.const 3 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $7 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 - local.get $2 + local.get $6 + local.get $7 i32.store offset=4 - local.get $2 + local.get $7 i32.const 20 i32.sub i32.load offset=16 @@ -4368,7 +4358,7 @@ unreachable end loop $for-loop|0 - local.get $2 + local.get $7 i32.const 20 i32.sub i32.load offset=16 @@ -4377,7 +4367,7 @@ local.get $0 i32.gt_s if - local.get $2 + local.get $7 local.get $0 call $~lib/staticarray/StaticArray#__get if @@ -4400,16 +4390,16 @@ i32.const 6 i32.const 1728 call $~lib/rt/__newArray - local.tee $3 + local.tee $0 i32.store offset=8 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $0 call $~lib/staticarray/StaticArray.fromArray - local.tee $2 + local.tee $6 i32.store offset=4 - local.get $3 + local.get $0 i32.load offset=12 - local.get $2 + local.get $6 i32.const 20 i32.sub i32.load offset=16 @@ -4424,19 +4414,17 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $0 loop $for-loop|1 - local.get $3 - i32.load offset=12 local.get $0 + i32.load offset=12 + local.get $2 i32.gt_s if + local.get $6 local.get $2 - local.get $0 call $~lib/staticarray/StaticArray#__get - local.get $3 local.get $0 + local.get $2 call $~lib/array/Array#__get i32.ne if @@ -4447,10 +4435,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|1 end end @@ -4459,11 +4447,11 @@ i32.const 6 i32.const 1824 call $~lib/rt/__newArray - local.set $0 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $2 i32.store - local.get $0 + local.get $2 call $~lib/staticarray/StaticArray.fromArray local.tee $0 i32.store offset=4 @@ -4485,25 +4473,25 @@ i32.const 8 i32.const 3 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $2 i32.const 1856 i32.const 8 call $~lib/memory/memory.copy - local.get $3 + local.get $2 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 4 i32.const 3 call $~lib/rt/itcms/__new - local.tee $0 + local.tee $6 i32.const 1888 i32.const 4 call $~lib/memory/memory.copy global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $6 i32.store offset=12 - local.get $3 - local.get $0 + local.get $2 + local.get $6 call $~lib/staticarray/StaticArray.concat local.tee $0 i32.store offset=8 @@ -4527,15 +4515,15 @@ i32.const 0 i32.const 3 call $~lib/rt/itcms/__new - local.tee $0 + local.tee $6 i32.const 1920 i32.const 0 call $~lib/memory/memory.copy global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $6 i32.store offset=12 - local.get $3 - local.get $0 + local.get $2 + local.get $6 call $~lib/staticarray/StaticArray.concat local.tee $0 i32.store offset=8 @@ -4545,7 +4533,7 @@ i32.load offset=16 i32.const 2 i32.shr_u - local.get $3 + local.get $2 i32.const 20 i32.sub i32.load offset=16 @@ -4564,26 +4552,26 @@ i32.const 20 i32.const 8 call $~lib/rt/itcms/__new - local.tee $4 + local.tee $2 i32.const 2128 i32.const 20 call $~lib/memory/memory.copy - local.get $4 + local.get $2 i32.store offset=8 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $2 i32.const 0 i32.const 2147483647 call $~lib/staticarray/StaticArray.slice<~lib/string/String> - local.tee $3 + local.tee $0 i32.store offset=4 - local.get $3 + local.get $0 i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u - local.get $4 + local.get $2 i32.const 20 i32.sub i32.load offset=16 @@ -4599,7 +4587,7 @@ unreachable end loop $for-loop|2 - local.get $4 + local.get $2 i32.const 20 i32.sub i32.load offset=16 @@ -4608,22 +4596,22 @@ local.get $1 i32.gt_s if - local.get $4 + local.get $2 local.get $1 call $~lib/staticarray/StaticArray<~lib/string/String>#__get - local.set $2 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $6 i32.store - local.get $3 + local.get $0 local.get $1 call $~lib/staticarray/StaticArray<~lib/string/String>#__get - local.set $0 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $7 i32.store offset=12 - local.get $2 - local.get $0 + local.get $6 + local.get $7 call $~lib/string/String.__eq i32.eqz if @@ -4642,13 +4630,13 @@ end end global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $2 i32.const 1 i32.const 3 call $~lib/staticarray/StaticArray.slice<~lib/string/String> - local.tee $2 + local.tee $0 i32.store offset=4 - local.get $2 + local.get $0 i32.const 20 i32.sub i32.load offset=16 @@ -4664,15 +4652,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 i32.const 0 call $~lib/staticarray/StaticArray<~lib/string/String>#__get local.set $1 global.get $~lib/memory/__stack_pointer - local.tee $0 + local.tee $6 local.get $1 i32.store - local.get $0 + local.get $6 i32.const 1984 i32.store offset=12 local.get $1 @@ -4687,18 +4675,18 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 i32.const 1 call $~lib/staticarray/StaticArray<~lib/string/String>#__get - local.set $1 + local.set $0 global.get $~lib/memory/__stack_pointer - local.tee $0 - local.get $1 - i32.store + local.tee $1 local.get $0 + i32.store + local.get $1 i32.const 2016 i32.store offset=12 - local.get $1 + local.get $0 i32.const 2016 call $~lib/string/String.__eq i32.eqz @@ -4711,13 +4699,13 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $2 i32.const 1 i32.const 2147483647 call $~lib/staticarray/StaticArray.slice<~lib/string/String> local.tee $0 i32.store offset=4 - local.get $4 + local.get $2 i32.const 20 i32.sub i32.load offset=16 @@ -4741,7 +4729,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $2 i32.const 0 i32.const 50 call $~lib/staticarray/StaticArray.slice<~lib/string/String> @@ -4753,7 +4741,7 @@ i32.load offset=16 i32.const 2 i32.shr_u - local.get $4 + local.get $2 i32.const 20 i32.sub i32.load offset=16 @@ -4769,7 +4757,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $2 i32.const 100 i32.const 2147483647 call $~lib/staticarray/StaticArray.slice<~lib/string/String> @@ -4790,7 +4778,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $2 i32.const -1 i32.const 2147483647 call $~lib/staticarray/StaticArray.slice<~lib/string/String> @@ -4815,15 +4803,15 @@ local.get $0 i32.const 0 call $~lib/staticarray/StaticArray<~lib/string/String>#__get - local.set $1 + local.set $0 global.get $~lib/memory/__stack_pointer - local.tee $0 - local.get $1 - i32.store + local.tee $1 local.get $0 + i32.store + local.get $1 i32.const 2080 i32.store offset=12 - local.get $1 + local.get $0 i32.const 2080 call $~lib/string/String.__eq i32.eqz @@ -4836,7 +4824,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $2 i32.const -2 i32.const -2 call $~lib/staticarray/StaticArray.slice<~lib/string/String> @@ -4857,7 +4845,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $2 i32.const 2 i32.const -2 call $~lib/staticarray/StaticArray.slice<~lib/string/String> @@ -4882,15 +4870,15 @@ local.get $0 i32.const 0 call $~lib/staticarray/StaticArray<~lib/string/String>#__get - local.set $1 + local.set $0 global.get $~lib/memory/__stack_pointer - local.tee $0 - local.get $1 - i32.store + local.tee $1 local.get $0 + i32.store + local.get $1 i32.const 2016 i32.store offset=12 - local.get $1 + local.get $0 i32.const 2016 call $~lib/string/String.__eq i32.eqz @@ -4906,29 +4894,29 @@ i32.const 20 i32.const 8 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $1 i32.const 2304 i32.const 20 call $~lib/memory/memory.copy - local.get $2 + local.get $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 9 i32.const 2352 call $~lib/rt/__newArray - local.set $0 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $2 i32.store offset=12 + local.get $1 local.get $2 - local.get $0 call $~lib/staticarray/StaticArray<~lib/string/String>#concat local.tee $0 i32.store offset=16 local.get $0 i32.load offset=12 - local.get $2 + local.get $1 i32.const 20 i32.sub i32.load offset=16 @@ -4948,18 +4936,18 @@ i32.const 9 i32.const 2416 call $~lib/rt/__newArray - local.set $0 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $2 i32.store offset=12 + local.get $1 local.get $2 - local.get $0 call $~lib/staticarray/StaticArray<~lib/string/String>#concat local.tee $0 i32.store offset=16 local.get $0 i32.load offset=12 - local.get $2 + local.get $1 i32.const 20 i32.sub i32.load offset=16 @@ -4980,16 +4968,16 @@ i32.const 20 i32.const 8 call $~lib/rt/itcms/__new - local.tee $0 + local.tee $1 i32.const 2448 i32.const 20 call $~lib/memory/memory.copy - local.get $0 + local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer i32.const 1984 i32.store offset=12 - local.get $0 + local.get $1 i32.const 1984 i32.const 0 call $~lib/staticarray/StaticArray<~lib/string/String>#includes @@ -5006,7 +4994,7 @@ global.get $~lib/memory/__stack_pointer i32.const 2384 i32.store offset=12 - local.get $0 + local.get $1 i32.const 2384 i32.const 0 call $~lib/staticarray/StaticArray<~lib/string/String>#includes @@ -5021,7 +5009,7 @@ global.get $~lib/memory/__stack_pointer i32.const 2080 i32.store offset=12 - local.get $0 + local.get $1 i32.const 2080 i32.const 5 call $~lib/staticarray/StaticArray<~lib/string/String>#includes @@ -5036,7 +5024,7 @@ global.get $~lib/memory/__stack_pointer i32.const 2080 i32.store offset=12 - local.get $0 + local.get $1 i32.const 2080 i32.const -1 call $~lib/staticarray/StaticArray<~lib/string/String>#includes @@ -5054,51 +5042,51 @@ i32.const 8 i32.const 10 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $0 i32.const 2496 i32.const 8 call $~lib/memory/memory.copy global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $0 i32.store i32.const 0 - local.set $0 + local.set $1 i32.const 0 - local.get $2 + local.get $0 i32.const 20 i32.sub i32.load offset=16 i32.const 3 i32.shr_u - local.tee $1 + local.tee $2 i32.eqz br_if $__inlined_func$~lib/staticarray/StaticArray#includes drop loop $while-continue|0 - local.get $0 local.get $1 + local.get $2 i32.lt_s if i32.const 1 - local.get $0 + local.get $1 i32.const 3 i32.shl - local.get $2 + local.get $0 i32.add f64.load - local.tee $9 + local.tee $4 f64.const nan:0x8000000000000 f64.eq - local.get $9 - local.get $9 + local.get $4 + local.get $4 f64.ne i32.or br_if $__inlined_func$~lib/staticarray/StaticArray#includes drop - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|0 end end @@ -5117,51 +5105,51 @@ i32.const 4 i32.const 11 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $0 i32.const 2528 i32.const 4 call $~lib/memory/memory.copy global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $0 i32.store i32.const 0 - local.set $0 + local.set $1 i32.const 0 - local.get $2 + local.get $0 i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u - local.tee $1 + local.tee $2 i32.eqz br_if $__inlined_func$~lib/staticarray/StaticArray#includes drop loop $while-continue|09 - local.get $0 local.get $1 + local.get $2 i32.lt_s if i32.const 1 - local.get $0 + local.get $1 i32.const 2 i32.shl - local.get $2 + local.get $0 i32.add f32.load - local.tee $10 + local.tee $5 f32.const nan:0x400000 f32.eq - local.get $10 - local.get $10 + local.get $5 + local.get $5 f32.ne i32.or br_if $__inlined_func$~lib/staticarray/StaticArray#includes drop - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|09 end end @@ -5180,36 +5168,36 @@ i32.const 12 i32.const 3 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $2 i32.const 2560 i32.const 12 call $~lib/memory/memory.copy - local.get $3 + local.get $2 i32.store offset=16 i32.const 0 local.set $0 i32.const -1 local.set $1 block $__inlined_func$~lib/staticarray/StaticArray#indexOf - local.get $3 + local.get $2 i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u - local.tee $2 + local.tee $6 i32.eqz br_if $__inlined_func$~lib/staticarray/StaticArray#indexOf loop $while-continue|012 local.get $0 - local.get $2 + local.get $6 i32.lt_s if local.get $0 local.tee $1 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 2 @@ -5239,25 +5227,25 @@ i32.const -1 local.set $1 block $__inlined_func$~lib/staticarray/StaticArray#indexOf13 - local.get $3 + local.get $2 i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u - local.tee $2 + local.tee $6 i32.eqz br_if $__inlined_func$~lib/staticarray/StaticArray#indexOf13 loop $while-continue|028 local.get $0 - local.get $2 + local.get $6 i32.lt_s if local.get $0 local.tee $1 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 7 @@ -5289,29 +5277,29 @@ i32.const -1 local.set $1 block $__inlined_func$~lib/staticarray/StaticArray#indexOf29 - local.get $3 + local.get $2 i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u - local.tee $2 + local.tee $6 i32.const 2 i32.le_u i32.const 1 - local.get $2 + local.get $6 select br_if $__inlined_func$~lib/staticarray/StaticArray#indexOf29 loop $while-continue|033 local.get $0 - local.get $2 + local.get $6 i32.lt_s if local.get $0 local.tee $1 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 9 @@ -5341,7 +5329,7 @@ i32.const -1 local.set $0 block $__inlined_func$~lib/staticarray/StaticArray#indexOf34 - local.get $3 + local.get $2 i32.const 20 i32.sub i32.load offset=16 @@ -5372,7 +5360,7 @@ local.get $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 2 @@ -5402,7 +5390,7 @@ i32.const -1 local.set $0 block $__inlined_func$~lib/staticarray/StaticArray#indexOf38 - local.get $3 + local.get $2 i32.const 20 i32.sub i32.load offset=16 @@ -5433,7 +5421,7 @@ local.get $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 2 @@ -5470,13 +5458,6 @@ i32.store offset=16 i32.const 1 global.set $~argumentsLength - local.get $2 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 2 - i32.shr_u - local.set $3 i32.const -1 local.set $1 block $__inlined_func$~lib/staticarray/StaticArray#lastIndexOf @@ -5490,17 +5471,12 @@ i32.eqz br_if $__inlined_func$~lib/staticarray/StaticArray#lastIndexOf local.get $0 - local.get $3 + local.get $0 i32.add local.get $0 i32.const 1 i32.sub - local.get $3 local.get $0 - local.get $3 - i32.le_s - select - local.get $3 i32.const 0 i32.lt_s select @@ -5542,32 +5518,25 @@ end i32.const 1 global.set $~argumentsLength - local.get $2 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 2 - i32.shr_u - local.tee $3 - local.set $0 i32.const -1 local.set $1 block $__inlined_func$~lib/staticarray/StaticArray#lastIndexOf6 - local.get $3 + local.get $2 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 2 + i32.shr_u + local.tee $0 i32.eqz br_if $__inlined_func$~lib/staticarray/StaticArray#lastIndexOf6 local.get $0 - local.get $3 + local.get $0 i32.add - local.get $3 + local.get $0 i32.const 1 i32.sub local.get $0 - local.get $0 - local.get $3 - i32.ge_s - select - local.get $0 i32.const 0 i32.lt_s select @@ -5767,7 +5736,7 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $__inlined_func$~lib/staticarray/StaticArray#lastIndexOf53 local.get $2 i32.const 20 @@ -5775,19 +5744,19 @@ i32.load offset=16 i32.const 2 i32.shr_u - local.tee $1 + local.tee $0 i32.eqz br_if $__inlined_func$~lib/staticarray/StaticArray#lastIndexOf53 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $0 + local.set $1 loop $while-continue|056 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if - local.get $0 + local.get $1 i32.const 2 i32.shl local.get $2 @@ -5796,17 +5765,17 @@ i32.const 2 i32.eq br_if $__inlined_func$~lib/staticarray/StaticArray#lastIndexOf53 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|056 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 3 i32.ne if @@ -5821,17 +5790,17 @@ i32.const 12 i32.const 8 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $1 i32.const 2736 i32.const 12 call $~lib/memory/memory.copy - local.get $2 + local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer i32.const 2800 i32.store offset=20 - local.get $2 - local.get $2 + local.get $1 + local.get $1 i32.const 20 i32.sub i32.load offset=16 @@ -5861,8 +5830,8 @@ global.get $~lib/memory/__stack_pointer i32.const 2768 i32.store offset=20 - local.get $2 - local.get $2 + local.get $1 + local.get $1 i32.const 20 i32.sub i32.load offset=16 @@ -5892,8 +5861,8 @@ global.get $~lib/memory/__stack_pointer i32.const 2928 i32.store offset=20 - local.get $2 - local.get $2 + local.get $1 + local.get $1 i32.const 20 i32.sub i32.load offset=16 @@ -5923,8 +5892,8 @@ global.get $~lib/memory/__stack_pointer i32.const 3008 i32.store offset=20 - local.get $2 - local.get $2 + local.get $1 + local.get $1 i32.const 20 i32.sub i32.load offset=16 @@ -5954,8 +5923,8 @@ global.get $~lib/memory/__stack_pointer i32.const 2800 i32.store offset=20 - local.get $2 - local.get $2 + local.get $1 + local.get $1 i32.const 20 i32.sub i32.load offset=16 @@ -5963,9 +5932,9 @@ i32.shr_u i32.const 2800 call $~lib/util/string/joinStringArray - local.set $1 + local.set $0 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $0 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 @@ -5976,14 +5945,14 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $0 + local.tee $2 i32.const 0 i32.store - local.get $0 + local.get $2 i32.const 2800 i32.store - local.get $2 - local.get $2 + local.get $1 + local.get $1 i32.const 20 i32.sub i32.load offset=16 @@ -5991,16 +5960,16 @@ i32.shr_u i32.const 2800 call $~lib/util/string/joinStringArray - local.set $0 + local.set $1 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=12 local.get $1 + i32.store offset=12 local.get $0 + local.get $1 call $~lib/string/String.__eq i32.eqz if @@ -6015,34 +5984,34 @@ i32.const 8 i32.const 3 call $~lib/rt/itcms/__new - local.tee $2 + local.tee $1 i32.const 3104 i32.const 8 call $~lib/memory/memory.copy - local.get $2 + local.get $1 i32.store offset=16 i32.const 1 - local.get $2 + local.get $1 i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 i32.const 1 i32.gt_u select local.set $0 loop $for-loop|060 local.get $0 - local.get $1 + local.get $2 i32.lt_s if local.get $0 i32.const 2 i32.shl - local.get $2 + local.get $1 i32.add i32.const 1 i32.store @@ -6053,7 +6022,7 @@ br $for-loop|060 end end - local.get $2 + local.get $1 i32.const 0 call $~lib/staticarray/StaticArray#__get if @@ -6064,7 +6033,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 1 call $~lib/staticarray/StaticArray#__get i32.const 1 @@ -6081,68 +6050,68 @@ i32.const 12 i32.const 3 call $~lib/rt/itcms/__new - local.tee $5 + local.tee $1 i32.const 3136 i32.const 12 call $~lib/memory/memory.copy - local.get $5 + local.get $1 i32.store offset=16 - local.get $5 + local.get $1 i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u - local.tee $0 + local.tee $2 i32.const 1 i32.gt_u if i32.const 0 - local.set $1 - local.get $0 + local.set $0 + local.get $2 i32.const 1 i32.shr_u - local.set $4 - local.get $0 + local.set $6 + local.get $2 i32.const 1 i32.sub - local.set $3 + local.set $2 loop $while-continue|064 - local.get $1 - local.get $4 + local.get $0 + local.get $6 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl - local.get $5 + local.get $1 i32.add - local.tee $0 + local.tee $7 i32.load - local.set $2 + local.set $8 + local.get $7 + local.get $2 local.get $0 - local.get $3 - local.get $1 i32.sub i32.const 2 i32.shl - local.get $5 + local.get $1 i32.add - local.tee $0 + local.tee $7 i32.load i32.store - local.get $0 - local.get $2 + local.get $7 + local.get $8 i32.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|064 end end end - local.get $5 + local.get $1 i32.const 0 call $~lib/staticarray/StaticArray#__get i32.const 3 @@ -6155,7 +6124,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 1 call $~lib/staticarray/StaticArray#__get i32.const 2 @@ -6168,7 +6137,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 2 call $~lib/staticarray/StaticArray#__get i32.const 1 @@ -6185,62 +6154,50 @@ i32.const 20 i32.const 3 call $~lib/rt/itcms/__new - local.tee $4 + local.tee $1 i32.const 3168 i32.const 20 call $~lib/memory/memory.copy - local.get $4 + local.get $1 i32.store offset=16 - local.get $4 + local.get $1 + i32.const 3 + local.get $1 i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u - local.tee $3 - local.set $0 - i32.const 0 - local.tee $1 - i32.const 2 - i32.shl - local.get $4 - i32.add - local.get $4 - i32.const 3 - local.get $3 - local.get $3 + local.tee $0 + local.get $0 i32.const 3 - i32.gt_s + i32.gt_u select local.tee $2 i32.const 2 i32.shl + local.get $1 i32.add local.get $0 i32.const 0 i32.lt_s if (result i32) local.get $0 - local.get $3 + local.get $0 i32.add - local.tee $0 + local.tee $6 i32.const 0 - local.get $0 + local.get $6 i32.const 0 i32.gt_s select else local.get $0 - local.get $3 - local.get $0 - local.get $3 - i32.lt_s - select end local.get $2 i32.sub local.tee $2 - local.get $3 + local.get $0 local.tee $0 local.get $0 local.get $2 @@ -6249,7 +6206,7 @@ i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $4 + local.get $1 i32.const 0 call $~lib/staticarray/StaticArray#__get i32.const 4 @@ -6262,7 +6219,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 i32.const 1 call $~lib/staticarray/StaticArray#__get i32.const 5 @@ -6275,7 +6232,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 i32.const 2 call $~lib/staticarray/StaticArray#__get i32.const 3 @@ -6288,7 +6245,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 i32.const 3 call $~lib/staticarray/StaticArray#__get i32.const 4 @@ -6301,7 +6258,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 i32.const 4 call $~lib/staticarray/StaticArray#__get i32.const 5 @@ -6325,10 +6282,10 @@ local.get $7 i32.store offset=16 global.get $~lib/memory/__stack_pointer - local.tee $6 + local.tee $1 i32.const 3248 i32.store offset=12 - local.get $6 + local.get $1 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -6347,44 +6304,46 @@ i32.load offset=16 i32.const 2 i32.shr_u - local.tee $5 + local.tee $2 i32.const 6 i32.const 0 call $~lib/rt/__newArray - local.tee $4 + local.tee $6 i32.store - local.get $4 + local.get $6 i32.load offset=4 - local.set $3 + local.set $8 + i32.const 0 + local.set $0 loop $for-loop|042 - local.get $1 - local.get $5 + local.get $0 + local.get $2 i32.lt_s if - local.get $1 + local.get $0 i32.const 2 i32.shl - local.tee $2 + local.tee $9 local.get $7 i32.add i32.load - local.set $0 + local.set $10 i32.const 3 global.set $~argumentsLength - local.get $2 - local.get $3 + local.get $8 + local.get $9 i32.add + local.get $10 local.get $0 - local.get $1 local.get $7 i32.const 3248 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|042 end end @@ -6392,10 +6351,10 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $1 local.get $6 - local.get $4 i32.store offset=4 - local.get $4 + local.get $6 i32.const 0 call $~lib/array/Array#__get i32.const 2 @@ -6408,7 +6367,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $6 i32.const 1 call $~lib/array/Array#__get i32.const 3 @@ -6421,7 +6380,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $6 i32.const 2 call $~lib/array/Array#__get i32.const 4 @@ -6445,11 +6404,11 @@ i32.load offset=16 i32.const 2 i32.shr_u - local.set $2 + local.set $0 loop $for-loop|070 + local.get $0 local.get $1 - local.get $2 - i32.lt_s + i32.gt_s if local.get $1 i32.const 2 @@ -6483,10 +6442,10 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $11 + local.tee $8 i32.const 3312 i32.store offset=12 - local.get $11 + local.get $8 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -6503,7 +6462,7 @@ i32.const 6 i32.const 0 call $~lib/rt/__newArray - local.tee $3 + local.tee $9 i32.store local.get $7 i32.const 20 @@ -6511,43 +6470,42 @@ i32.load offset=16 i32.const 2 i32.shr_u - local.set $13 + local.set $10 loop $for-loop|045 - local.get $8 - local.get $13 + local.get $3 + local.get $10 i32.lt_s if - local.get $8 + local.get $3 i32.const 2 i32.shl local.get $7 i32.add i32.load - local.set $12 + local.set $11 i32.const 3 global.set $~argumentsLength - local.get $12 - local.get $8 + local.get $11 + local.get $3 local.get $7 i32.const 3312 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $3 + local.get $9 i32.load offset=12 - local.tee $14 + local.tee $12 i32.const 1 i32.add - local.tee $6 - local.get $3 local.tee $2 + local.get $9 i32.load offset=8 local.tee $0 i32.const 2 i32.shr_u i32.gt_u if - local.get $6 + local.get $2 i32.const 268435455 i32.gt_u if @@ -6568,27 +6526,27 @@ i32.const 1073741820 i32.lt_u select - local.tee $1 - local.get $6 + local.tee $0 + local.get $2 i32.const 8 - local.get $6 + local.get $2 i32.const 8 i32.gt_u select i32.const 2 i32.shl - local.tee $0 + local.tee $1 local.get $0 local.get $1 - i32.lt_u + i32.gt_u select - local.tee $5 - local.get $2 + local.tee $6 + local.get $9 i32.load local.tee $1 i32.const 20 i32.sub - local.tee $4 + local.tee $13 i32.load i32.const -4 i32.and @@ -6596,26 +6554,26 @@ i32.sub i32.le_u if - local.get $4 - local.get $5 + local.get $13 + local.get $6 i32.store offset=16 local.get $1 local.set $0 br $__inlined_func$~lib/rt/itcms/__renew end - local.get $5 - local.get $4 + local.get $6 + local.get $13 i32.load offset=12 call $~lib/rt/itcms/__new local.tee $0 local.get $1 - local.get $5 - local.get $4 + local.get $6 + local.get $13 i32.load offset=16 - local.tee $4 - local.get $4 - local.get $5 - i32.gt_u + local.tee $13 + local.get $6 + local.get $13 + i32.lt_u select call $~lib/memory/memory.copy end @@ -6623,40 +6581,40 @@ local.get $1 i32.ne if - local.get $2 + local.get $9 local.get $0 i32.store - local.get $2 + local.get $9 local.get $0 i32.store offset=4 local.get $0 if - local.get $2 + local.get $9 local.get $0 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end end - local.get $2 - local.get $5 + local.get $9 + local.get $6 i32.store offset=8 end - local.get $2 + local.get $9 i32.load offset=4 - local.get $14 + local.get $12 i32.const 2 i32.shl i32.add - local.get $12 + local.get $11 i32.store + local.get $9 local.get $2 - local.get $6 i32.store offset=12 end - local.get $8 + local.get $3 i32.const 1 i32.add - local.set $8 + local.set $3 br $for-loop|045 end end @@ -6664,10 +6622,10 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $11 - local.get $3 + local.get $8 + local.get $9 i32.store offset=24 - local.get $3 + local.get $9 i32.load offset=12 i32.const 2 i32.ne @@ -6679,7 +6637,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $9 i32.const 0 call $~lib/array/Array#__get i32.const 2 @@ -6692,7 +6650,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $9 i32.const 1 call $~lib/array/Array#__get i32.const 3 @@ -6718,10 +6676,10 @@ i32.load offset=16 i32.const 2 i32.shr_u - local.set $3 + local.set $2 loop $for-loop|076 local.get $0 - local.get $3 + local.get $2 i32.lt_s if local.get $0 @@ -6730,11 +6688,11 @@ local.get $7 i32.add i32.load - local.set $2 + local.set $3 i32.const 4 global.set $~argumentsLength local.get $1 - local.get $2 + local.get $3 local.get $0 local.get $7 i32.const 3344 @@ -6825,11 +6783,11 @@ i32.load offset=16 i32.const 2 i32.shr_u - local.set $2 + local.set $0 loop $for-loop|084 + local.get $0 local.get $1 - local.get $2 - i32.lt_s + i32.gt_s if local.get $1 i32.const 2 @@ -6837,11 +6795,11 @@ local.get $7 i32.add i32.load - local.set $0 + local.set $2 i32.const 3 global.set $~argumentsLength i32.const 1 - local.get $0 + local.get $2 local.get $1 local.get $7 i32.const 3408 @@ -6879,11 +6837,11 @@ i32.load offset=16 i32.const 2 i32.shr_u - local.set $2 + local.set $0 loop $for-loop|089 + local.get $0 local.get $1 - local.get $2 - i32.lt_s + i32.gt_s if local.get $1 i32.const 2 @@ -6891,11 +6849,11 @@ local.get $7 i32.add i32.load - local.set $0 + local.set $2 i32.const 3 global.set $~argumentsLength i32.const 1 - local.get $0 + local.get $2 local.get $1 local.get $7 i32.const 3440 @@ -6932,11 +6890,11 @@ i32.load offset=16 i32.const 2 i32.shr_u - local.set $2 + local.set $0 loop $for-loop|093 + local.get $0 local.get $1 - local.get $2 - i32.lt_s + i32.gt_s if local.get $1 i32.const 2 @@ -6944,11 +6902,11 @@ local.get $7 i32.add i32.load - local.set $0 + local.set $2 i32.const 3 global.set $~argumentsLength i32.const 0 - local.get $0 + local.get $2 local.get $1 local.get $7 i32.const 3472 @@ -6987,11 +6945,11 @@ i32.load offset=16 i32.const 2 i32.shr_u - local.set $2 + local.set $0 loop $for-loop|098 + local.get $0 local.get $1 - local.get $2 - i32.lt_s + i32.gt_s if local.get $1 i32.const 2 @@ -6999,11 +6957,11 @@ local.get $7 i32.add i32.load - local.set $0 + local.set $2 i32.const 3 global.set $~argumentsLength i32.const 0 - local.get $0 + local.get $2 local.get $1 local.get $7 i32.const 3504 @@ -7040,12 +6998,12 @@ i32.load offset=16 i32.const 2 i32.shr_u - local.set $2 + local.set $0 block $__inlined_func$~lib/staticarray/StaticArray#findIndex loop $for-loop|0102 + local.get $0 local.get $1 - local.get $2 - i32.lt_s + i32.gt_s if local.get $1 i32.const 2 @@ -7093,12 +7051,12 @@ i32.load offset=16 i32.const 2 i32.shr_u - local.set $2 + local.set $0 block $__inlined_func$~lib/staticarray/StaticArray#findIndex104 loop $for-loop|0107 + local.get $0 local.get $1 - local.get $2 - i32.lt_s + i32.gt_s if local.get $1 i32.const 2 @@ -7642,13 +7600,13 @@ i32.load offset=16 i32.const 2 i32.shr_u - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $4 + local.get $3 i32.add local.tee $1 i32.const 0 @@ -7658,81 +7616,83 @@ select else local.get $1 - local.get $4 + local.get $3 local.get $1 - local.get $4 + local.get $3 i32.lt_s select end - local.set $1 + local.set $4 global.get $~lib/memory/__stack_pointer local.get $2 i32.const 0 i32.lt_s if (result i32) local.get $2 - local.get $4 + local.get $3 i32.add - local.tee $2 + local.tee $1 i32.const 0 - local.get $2 + local.get $1 i32.const 0 i32.gt_s select else local.get $2 - local.get $4 + local.get $3 local.get $2 - local.get $4 + local.get $3 i32.lt_s select end - local.get $1 + local.get $4 i32.sub - local.tee $2 + local.tee $1 i32.const 0 - local.get $2 + local.get $1 i32.const 0 i32.gt_s select i32.const 2 i32.shl - local.tee $2 + local.tee $3 i32.const 8 call $~lib/rt/itcms/__new - local.tee $4 + local.tee $1 i32.store - local.get $1 + local.get $4 i32.const 2 i32.shl local.get $0 i32.add local.set $0 + i32.const 0 + local.set $2 loop $while-continue|0 local.get $2 local.get $3 - i32.gt_u + i32.lt_u if - local.get $3 - local.get $4 + local.get $1 + local.get $2 i32.add local.get $0 - local.get $3 + local.get $2 i32.add i32.load - local.tee $1 + local.tee $4 i32.store - local.get $1 + local.get $4 if - local.get $4 local.get $1 + local.get $4 i32.const 1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $3 + local.get $2 i32.const 4 i32.add - local.set $3 + local.set $2 br $while-continue|0 end end @@ -7740,7 +7700,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $1 ) (func $~lib/staticarray/StaticArray<~lib/string/String>#__get (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer @@ -7809,7 +7769,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -7840,7 +7799,7 @@ i32.const 0 local.get $1 select - local.tee $6 + local.tee $3 i32.add local.tee $4 i32.const 268435455 @@ -7858,33 +7817,33 @@ i32.const 9 i32.const 0 call $~lib/rt/__newArray - local.tee $7 + local.tee $4 i32.store - local.get $7 + local.get $4 i32.load offset=4 - local.set $4 + local.set $6 local.get $5 i32.const 2 i32.shl - local.set $5 + local.set $7 loop $for-loop|0 local.get $2 - local.get $5 + local.get $7 i32.lt_u if local.get $2 - local.get $4 + local.get $6 i32.add local.get $0 local.get $2 i32.add i32.load - local.tee $8 + local.tee $5 i32.store - local.get $8 + local.get $5 if - local.get $7 - local.get $8 + local.get $4 + local.get $5 i32.const 1 call $byn-split-outlined-A$~lib/rt/itcms/__link end @@ -7895,42 +7854,44 @@ br $for-loop|0 end end - local.get $4 - local.get $5 + local.get $6 + local.get $7 i32.add local.set $0 local.get $1 i32.load offset=4 - local.set $1 - local.get $6 + local.set $2 + local.get $3 i32.const 2 i32.shl - local.set $2 + local.set $3 + i32.const 0 + local.set $1 loop $for-loop|1 - local.get $2 + local.get $1 local.get $3 - i32.gt_u + i32.lt_u if local.get $0 - local.get $3 + local.get $1 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i32.load - local.tee $4 + local.tee $5 i32.store - local.get $4 + local.get $5 if - local.get $7 local.get $4 + local.get $5 i32.const 1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $3 + local.get $1 i32.const 4 i32.add - local.set $3 + local.set $1 br $for-loop|1 end end @@ -7938,7 +7899,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $4 ) (func $~lib/util/string/joinStringArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 4165afc4be..1942f1c16d 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1582,7 +1582,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1597,7 +1597,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1610,7 +1610,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1618,7 +1618,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1629,16 +1629,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1649,16 +1649,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1666,7 +1666,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1674,8 +1674,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1692,7 +1692,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1702,13 +1702,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1721,40 +1721,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -3811,32 +3811,30 @@ i32.sub i32.store16 else - i32.const -1 - local.set $10 local.get $3 i32.const 223 i32.sub i32.const 64056 i32.le_u - if - block $~lib/util/casemap/bsearch|inlined.0 + if (result i32) + block $~lib/util/casemap/bsearch|inlined.0 (result i32) local.get $2 local.set $1 i32.const 0 - local.set $5 + local.set $10 loop $while-continue|1 local.get $1 - local.get $5 + local.get $10 i32.ge_s if local.get $1 - local.get $5 + local.get $10 i32.add i32.const 3 i32.shr_u i32.const 2 i32.shl - local.tee $10 + local.tee $4 i32.const 1 i32.shl i32.const 1488 @@ -3844,35 +3842,39 @@ i32.load16_u local.get $3 i32.sub - local.tee $4 - i32.eqz - br_if $~lib/util/casemap/bsearch|inlined.0 - local.get $4 - i32.const 31 - i32.shr_u + local.tee $5 if - local.get $10 - i32.const 4 - i32.add - local.set $5 + local.get $5 + i32.const 31 + i32.shr_u + if + local.get $4 + i32.const 4 + i32.add + local.set $10 + else + local.get $4 + i32.const 4 + i32.sub + local.set $1 + end else - local.get $10 - i32.const 4 - i32.sub - local.set $1 + local.get $4 + br $~lib/util/casemap/bsearch|inlined.0 end br $while-continue|1 end end i32.const -1 - local.set $10 end + else + i32.const -1 end - local.get $10 + local.tee $1 i32.const -1 i32.xor if - local.get $10 + local.get $1 i32.const 1 i32.shl i32.const 1488 @@ -3983,10 +3985,10 @@ ) (func $start:std/string-casemapping (local $0 i64) - (local $1 i32) + (local $1 i64) (local $2 i64) (local $3 i64) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -4008,16 +4010,16 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $5 i64.const 0 i64.store - local.get $1 + local.get $5 i64.const 0 i64.store offset=8 - local.get $1 + local.get $5 i64.const 0 i64.store offset=16 - local.get $1 + local.get $5 i32.const 0 i32.store offset=24 memory.size @@ -4052,19 +4054,19 @@ i32.store i32.const 1376 global.set $~lib/rt/itcms/fromSpace - local.get $1 + local.get $5 i32.const 1056 i32.store offset=8 i32.const 1056 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 1056 i32.store offset=4 - local.get $1 + local.get $5 i32.const 1056 call $~lib/string/String.__eq i32.eqz @@ -4081,14 +4083,14 @@ i32.store offset=8 i32.const 1056 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 1056 i32.store offset=4 - local.get $1 + local.get $5 i32.const 1056 call $~lib/string/String.__eq i32.eqz @@ -4105,14 +4107,14 @@ i32.store offset=8 i32.const 11808 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 11856 i32.store offset=4 - local.get $1 + local.get $5 i32.const 11856 call $~lib/string/String.__eq i32.eqz @@ -4129,14 +4131,14 @@ i32.store offset=8 i32.const 11904 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 11952 i32.store offset=4 - local.get $1 + local.get $5 i32.const 11952 call $~lib/string/String.__eq i32.eqz @@ -4153,14 +4155,14 @@ i32.store offset=8 i32.const 12000 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 12096 i32.store offset=4 - local.get $1 + local.get $5 i32.const 12096 call $~lib/string/String.__eq i32.eqz @@ -4177,14 +4179,14 @@ i32.store offset=8 i32.const 12096 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 12192 i32.store offset=4 - local.get $1 + local.get $5 i32.const 12192 call $~lib/string/String.__eq i32.eqz @@ -4201,14 +4203,14 @@ i32.store offset=8 i32.const 12288 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 12352 i32.store offset=4 - local.get $1 + local.get $5 i32.const 12352 call $~lib/string/String.__eq i32.eqz @@ -4225,14 +4227,14 @@ i32.store offset=8 i32.const 12352 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 12416 i32.store offset=4 - local.get $1 + local.get $5 i32.const 12416 call $~lib/string/String.__eq i32.eqz @@ -4249,14 +4251,14 @@ i32.store offset=8 i32.const 12480 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 12576 i32.store offset=4 - local.get $1 + local.get $5 i32.const 12576 call $~lib/string/String.__eq i32.eqz @@ -4273,14 +4275,14 @@ i32.store offset=8 i32.const 12576 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 12672 i32.store offset=4 - local.get $1 + local.get $5 i32.const 12672 call $~lib/string/String.__eq i32.eqz @@ -4297,14 +4299,14 @@ i32.store offset=8 i32.const 12768 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 12864 i32.store offset=4 - local.get $1 + local.get $5 i32.const 12864 call $~lib/string/String.__eq i32.eqz @@ -4321,14 +4323,14 @@ i32.store offset=8 i32.const 12864 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 12960 i32.store offset=4 - local.get $1 + local.get $5 i32.const 12960 call $~lib/string/String.__eq i32.eqz @@ -4345,14 +4347,14 @@ i32.store offset=8 i32.const 13056 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 13136 i32.store offset=4 - local.get $1 + local.get $5 i32.const 13136 call $~lib/string/String.__eq i32.eqz @@ -4369,14 +4371,14 @@ i32.store offset=8 i32.const 13216 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 13296 i32.store offset=4 - local.get $1 + local.get $5 i32.const 13296 call $~lib/string/String.__eq i32.eqz @@ -4393,14 +4395,14 @@ i32.store offset=8 i32.const 13376 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 13440 i32.store offset=4 - local.get $1 + local.get $5 i32.const 13440 call $~lib/string/String.__eq i32.eqz @@ -4417,14 +4419,14 @@ i32.store offset=8 i32.const 13504 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 13584 i32.store offset=4 - local.get $1 + local.get $5 i32.const 13584 call $~lib/string/String.__eq i32.eqz @@ -4441,14 +4443,14 @@ i32.store offset=8 i32.const 13664 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 13744 i32.store offset=4 - local.get $1 + local.get $5 i32.const 13744 call $~lib/string/String.__eq i32.eqz @@ -4465,14 +4467,14 @@ i32.store offset=8 i32.const 13824 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 13888 i32.store offset=4 - local.get $1 + local.get $5 i32.const 13888 call $~lib/string/String.__eq i32.eqz @@ -4489,14 +4491,14 @@ i32.store offset=8 i32.const 13952 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 14032 i32.store offset=4 - local.get $1 + local.get $5 i32.const 14032 call $~lib/string/String.__eq i32.eqz @@ -4513,14 +4515,14 @@ i32.store offset=8 i32.const 14112 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 14192 i32.store offset=4 - local.get $1 + local.get $5 i32.const 14192 call $~lib/string/String.__eq i32.eqz @@ -4537,14 +4539,14 @@ i32.store offset=8 i32.const 14272 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 14432 i32.store offset=4 - local.get $1 + local.get $5 i32.const 14432 call $~lib/string/String.__eq i32.eqz @@ -4561,14 +4563,14 @@ i32.store offset=8 i32.const 14272 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 14592 i32.store offset=4 - local.get $1 + local.get $5 i32.const 14592 call $~lib/string/String.__eq i32.eqz @@ -4585,14 +4587,14 @@ i32.store offset=8 i32.const 14752 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 14784 i32.store offset=4 - local.get $1 + local.get $5 i32.const 14784 call $~lib/string/String.__eq i32.eqz @@ -4609,14 +4611,14 @@ i32.store offset=8 i32.const 14816 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 14848 i32.store offset=4 - local.get $1 + local.get $5 i32.const 14848 call $~lib/string/String.__eq i32.eqz @@ -4633,14 +4635,14 @@ i32.store offset=8 i32.const 14880 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 15088 i32.store offset=4 - local.get $1 + local.get $5 i32.const 15088 call $~lib/string/String.__eq i32.eqz @@ -4657,20 +4659,20 @@ i32.store offset=12 i32.const 14752 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store offset=8 - local.get $1 + local.get $5 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 15296 i32.store offset=4 - local.get $1 + local.get $5 i32.const 15296 call $~lib/string/String.__eq i32.eqz @@ -4687,20 +4689,20 @@ i32.store offset=12 i32.const 15328 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store offset=8 - local.get $1 + local.get $5 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 15360 i32.store offset=4 - local.get $1 + local.get $5 i32.const 15360 call $~lib/string/String.__eq i32.eqz @@ -4717,20 +4719,20 @@ i32.store offset=12 i32.const 15392 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store offset=8 - local.get $1 + local.get $5 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 15392 i32.store offset=4 - local.get $1 + local.get $5 i32.const 15392 call $~lib/string/String.__eq i32.eqz @@ -4744,20 +4746,20 @@ end i32.const 65536 call $~lib/string/String.fromCodePoint - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store offset=8 - local.get $1 + local.get $5 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 15648 i32.store offset=4 - local.get $1 + local.get $5 i32.const 15648 call $~lib/string/String.__eq i32.eqz @@ -4771,20 +4773,20 @@ end i32.const 65536 call $~lib/string/String.fromCodePoint - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store offset=8 - local.get $1 + local.get $5 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 15648 i32.store offset=4 - local.get $1 + local.get $5 i32.const 15648 call $~lib/string/String.__eq i32.eqz @@ -4801,14 +4803,14 @@ i32.store offset=8 i32.const 15680 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 15712 i32.store offset=4 - local.get $1 + local.get $5 i32.const 15712 call $~lib/string/String.__eq i32.eqz @@ -4825,14 +4827,14 @@ i32.store offset=8 i32.const 15744 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 15776 i32.store offset=4 - local.get $1 + local.get $5 i32.const 15776 call $~lib/string/String.__eq i32.eqz @@ -4849,14 +4851,14 @@ i32.store offset=8 i32.const 15808 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 15840 i32.store offset=4 - local.get $1 + local.get $5 i32.const 15840 call $~lib/string/String.__eq i32.eqz @@ -4873,14 +4875,14 @@ i32.store offset=8 i32.const 15872 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 15904 i32.store offset=4 - local.get $1 + local.get $5 i32.const 15904 call $~lib/string/String.__eq i32.eqz @@ -4897,14 +4899,14 @@ i32.store offset=8 i32.const 15936 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 15968 i32.store offset=4 - local.get $1 + local.get $5 i32.const 15968 call $~lib/string/String.__eq i32.eqz @@ -4921,14 +4923,14 @@ i32.store offset=8 i32.const 16000 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16032 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16032 call $~lib/string/String.__eq i32.eqz @@ -4945,14 +4947,14 @@ i32.store offset=8 i32.const 16064 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16096 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16096 call $~lib/string/String.__eq i32.eqz @@ -4969,14 +4971,14 @@ i32.store offset=8 i32.const 16128 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16160 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16160 call $~lib/string/String.__eq i32.eqz @@ -4993,14 +4995,14 @@ i32.store offset=8 i32.const 16192 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16224 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16224 call $~lib/string/String.__eq i32.eqz @@ -5017,14 +5019,14 @@ i32.store offset=8 i32.const 16256 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16288 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16288 call $~lib/string/String.__eq i32.eqz @@ -5041,14 +5043,14 @@ i32.store offset=8 i32.const 16320 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16352 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16352 call $~lib/string/String.__eq i32.eqz @@ -5065,14 +5067,14 @@ i32.store offset=8 i32.const 16384 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16416 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16416 call $~lib/string/String.__eq i32.eqz @@ -5089,14 +5091,14 @@ i32.store offset=8 i32.const 16448 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16480 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16480 call $~lib/string/String.__eq i32.eqz @@ -5113,14 +5115,14 @@ i32.store offset=8 i32.const 16512 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16544 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16544 call $~lib/string/String.__eq i32.eqz @@ -5137,14 +5139,14 @@ i32.store offset=8 i32.const 16576 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16608 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16608 call $~lib/string/String.__eq i32.eqz @@ -5161,14 +5163,14 @@ i32.store offset=8 i32.const 16640 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16672 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16672 call $~lib/string/String.__eq i32.eqz @@ -5185,14 +5187,14 @@ i32.store offset=8 i32.const 16704 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16736 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16736 call $~lib/string/String.__eq i32.eqz @@ -5209,14 +5211,14 @@ i32.store offset=8 i32.const 16768 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16800 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16800 call $~lib/string/String.__eq i32.eqz @@ -5233,14 +5235,14 @@ i32.store offset=8 i32.const 16832 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16864 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16864 call $~lib/string/String.__eq i32.eqz @@ -5257,14 +5259,14 @@ i32.store offset=8 i32.const 16896 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16928 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16928 call $~lib/string/String.__eq i32.eqz @@ -5281,14 +5283,14 @@ i32.store offset=8 i32.const 16960 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16992 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16992 call $~lib/string/String.__eq i32.eqz @@ -5305,14 +5307,14 @@ i32.store offset=8 i32.const 17024 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17056 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17056 call $~lib/string/String.__eq i32.eqz @@ -5329,14 +5331,14 @@ i32.store offset=8 i32.const 17088 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17120 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17120 call $~lib/string/String.__eq i32.eqz @@ -5353,14 +5355,14 @@ i32.store offset=8 i32.const 17152 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17184 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17184 call $~lib/string/String.__eq i32.eqz @@ -5377,14 +5379,14 @@ i32.store offset=8 i32.const 17216 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17248 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17248 call $~lib/string/String.__eq i32.eqz @@ -5401,14 +5403,14 @@ i32.store offset=8 i32.const 17280 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 16352 i32.store offset=4 - local.get $1 + local.get $5 i32.const 16352 call $~lib/string/String.__eq i32.eqz @@ -5425,14 +5427,14 @@ i32.store offset=8 i32.const 17312 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17344 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17344 call $~lib/string/String.__eq i32.eqz @@ -5449,14 +5451,14 @@ i32.store offset=8 i32.const 17376 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17408 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17408 call $~lib/string/String.__eq i32.eqz @@ -5473,14 +5475,14 @@ i32.store offset=8 i32.const 17440 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17472 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17472 call $~lib/string/String.__eq i32.eqz @@ -5497,14 +5499,14 @@ i32.store offset=8 i32.const 17504 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17536 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17536 call $~lib/string/String.__eq i32.eqz @@ -5521,14 +5523,14 @@ i32.store offset=8 i32.const 17568 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17600 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17600 call $~lib/string/String.__eq i32.eqz @@ -5545,14 +5547,14 @@ i32.store offset=8 i32.const 17632 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17664 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17664 call $~lib/string/String.__eq i32.eqz @@ -5569,14 +5571,14 @@ i32.store offset=8 i32.const 17696 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17728 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17728 call $~lib/string/String.__eq i32.eqz @@ -5593,14 +5595,14 @@ i32.store offset=8 i32.const 17760 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17792 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17792 call $~lib/string/String.__eq i32.eqz @@ -5617,14 +5619,14 @@ i32.store offset=8 i32.const 17824 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17856 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17856 call $~lib/string/String.__eq i32.eqz @@ -5641,14 +5643,14 @@ i32.store offset=8 i32.const 17888 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17920 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17920 call $~lib/string/String.__eq i32.eqz @@ -5665,14 +5667,14 @@ i32.store offset=8 i32.const 17952 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 17984 i32.store offset=4 - local.get $1 + local.get $5 i32.const 17984 call $~lib/string/String.__eq i32.eqz @@ -5689,14 +5691,14 @@ i32.store offset=8 i32.const 18016 call $~lib/string/String#toLowerCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 18048 i32.store offset=4 - local.get $1 + local.get $5 i32.const 18048 call $~lib/string/String.__eq i32.eqz @@ -5713,14 +5715,14 @@ i32.store offset=8 i32.const 18080 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 18112 i32.store offset=4 - local.get $1 + local.get $5 i32.const 18112 call $~lib/string/String.__eq i32.eqz @@ -5737,14 +5739,14 @@ i32.store offset=8 i32.const 15328 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 18144 i32.store offset=4 - local.get $1 + local.get $5 i32.const 18144 call $~lib/string/String.__eq i32.eqz @@ -5761,14 +5763,14 @@ i32.store offset=8 i32.const 18176 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 18208 i32.store offset=4 - local.get $1 + local.get $5 i32.const 18208 call $~lib/string/String.__eq i32.eqz @@ -5785,14 +5787,14 @@ i32.store offset=8 i32.const 18240 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 18272 i32.store offset=4 - local.get $1 + local.get $5 i32.const 18272 call $~lib/string/String.__eq i32.eqz @@ -5809,14 +5811,14 @@ i32.store offset=8 i32.const 18304 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 18336 i32.store offset=4 - local.get $1 + local.get $5 i32.const 18336 call $~lib/string/String.__eq i32.eqz @@ -5833,14 +5835,14 @@ i32.store offset=8 i32.const 18368 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 18400 i32.store offset=4 - local.get $1 + local.get $5 i32.const 18400 call $~lib/string/String.__eq i32.eqz @@ -5857,14 +5859,14 @@ i32.store offset=8 i32.const 18432 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 18400 i32.store offset=4 - local.get $1 + local.get $5 i32.const 18400 call $~lib/string/String.__eq i32.eqz @@ -5881,14 +5883,14 @@ i32.store offset=8 i32.const 18464 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 18496 i32.store offset=4 - local.get $1 + local.get $5 i32.const 18496 call $~lib/string/String.__eq i32.eqz @@ -5905,14 +5907,14 @@ i32.store offset=8 i32.const 18528 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 18560 i32.store offset=4 - local.get $1 + local.get $5 i32.const 18560 call $~lib/string/String.__eq i32.eqz @@ -5929,14 +5931,14 @@ i32.store offset=8 i32.const 18592 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 18624 i32.store offset=4 - local.get $1 + local.get $5 i32.const 18624 call $~lib/string/String.__eq i32.eqz @@ -5953,14 +5955,14 @@ i32.store offset=8 i32.const 18656 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 18688 i32.store offset=4 - local.get $1 + local.get $5 i32.const 18688 call $~lib/string/String.__eq i32.eqz @@ -5977,14 +5979,14 @@ i32.store offset=8 i32.const 18720 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 18752 i32.store offset=4 - local.get $1 + local.get $5 i32.const 18752 call $~lib/string/String.__eq i32.eqz @@ -6001,14 +6003,14 @@ i32.store offset=8 i32.const 18784 call $~lib/string/String#toUpperCase - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 18816 i32.store offset=4 - local.get $1 + local.get $5 i32.const 18816 call $~lib/string/String.__eq i32.eqz @@ -6021,24 +6023,24 @@ unreachable end loop $for-loop|0 - local.get $5 + local.get $4 i32.const 1114111 i32.le_s if global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $4 call $~lib/string/String.fromCodePoint - local.tee $1 + local.tee $5 i32.store offset=16 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 call $~lib/string/String#toLowerCase local.tee $6 i32.store offset=20 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 call $~lib/string/String#toUpperCase - local.tee $1 + local.tee $5 i32.store offset=24 block $__inlined_func$~lib/string/String#codePointAt (result i32) i32.const -1 @@ -6134,11 +6136,11 @@ i32.sub end i64.extend_i32_s - local.tee $2 + local.tee $1 i64.const 0 i64.ge_s if - local.get $2 + local.get $1 i64.const 16 i64.shl local.get $0 @@ -6192,11 +6194,11 @@ i32.sub end i64.extend_i32_s - local.tee $2 + local.tee $1 i64.const 0 i64.ge_s if (result i64) - local.get $2 + local.get $1 i64.const 32 i64.shl local.get $0 @@ -6204,10 +6206,10 @@ else local.get $0 end - local.set $2 + local.set $1 block $__inlined_func$~lib/string/String#codePointAt2 (result i32) i32.const -1 - local.get $1 + local.get $5 i32.const 20 i32.sub i32.load offset=16 @@ -6220,7 +6222,7 @@ local.get $6 i32.const 1 i32.eq - local.get $1 + local.get $5 i32.load16_u local.tee $6 i32.const 64512 @@ -6233,7 +6235,7 @@ br $__inlined_func$~lib/string/String#codePointAt2 end local.get $6 - local.get $1 + local.get $5 i32.load16_u offset=2 local.tee $7 i32.const 64512 @@ -6254,7 +6256,7 @@ local.set $0 block $__inlined_func$~lib/string/String#codePointAt3 (result i32) i32.const -1 - local.get $1 + local.get $5 i32.const 20 i32.sub i32.load offset=16 @@ -6268,7 +6270,7 @@ local.get $6 i32.const 2 i32.eq - local.get $1 + local.get $5 i32.load16_u offset=2 local.tee $6 i32.const 64512 @@ -6281,7 +6283,7 @@ br $__inlined_func$~lib/string/String#codePointAt3 end local.get $6 - local.get $1 + local.get $5 i32.load16_u offset=4 local.tee $7 i32.const 64512 @@ -6299,11 +6301,11 @@ i32.sub end i64.extend_i32_s - local.tee $3 + local.tee $2 i64.const 0 i64.ge_s if - local.get $3 + local.get $2 i64.const 16 i64.shl local.get $0 @@ -6312,7 +6314,7 @@ end block $__inlined_func$~lib/string/String#codePointAt4 (result i32) i32.const -1 - local.get $1 + local.get $5 i32.const 20 i32.sub i32.load offset=16 @@ -6326,7 +6328,7 @@ local.get $6 i32.const 3 i32.eq - local.get $1 + local.get $5 i32.load16_u offset=4 local.tee $6 i32.const 64512 @@ -6339,16 +6341,16 @@ br $__inlined_func$~lib/string/String#codePointAt4 end local.get $6 - local.get $1 + local.get $5 i32.load16_u offset=6 - local.tee $1 + local.tee $5 i32.const 64512 i32.and i32.const 56320 i32.ne br_if $__inlined_func$~lib/string/String#codePointAt4 drop - local.get $1 + local.get $5 local.get $6 i32.const 10 i32.shl @@ -6357,11 +6359,11 @@ i32.sub end i64.extend_i32_s - local.tee $3 + local.tee $2 i64.const 0 i64.ge_s if (result i64) - local.get $3 + local.get $2 i64.const 32 i64.shl local.get $0 @@ -6369,36 +6371,36 @@ else local.get $0 end - local.set $3 - local.get $5 + local.set $2 + local.get $4 i32.const 0 call $std/string-casemapping/toLowerCaseFromIndex i64.extend_i32_s local.set $0 - local.get $5 + local.get $4 i32.const 1 call $std/string-casemapping/toLowerCaseFromIndex i64.extend_i32_s - local.tee $4 + local.tee $3 i64.const 0 i64.ge_s if - local.get $4 + local.get $3 i64.const 16 i64.shl local.get $0 i64.add local.set $0 end - local.get $5 + local.get $4 i32.const 2 call $std/string-casemapping/toLowerCaseFromIndex i64.extend_i32_s - local.tee $4 + local.tee $3 i64.const 0 i64.ge_s if (result i64) - local.get $4 + local.get $3 i64.const 32 i64.shl local.get $0 @@ -6406,13 +6408,13 @@ else local.get $0 end - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 0 call $std/string-casemapping/toUpperCaseFromIndex i64.extend_i32_s local.set $0 - local.get $5 + local.get $4 i32.const 1 call $std/string-casemapping/toUpperCaseFromIndex i64.extend_i32_s @@ -6427,7 +6429,7 @@ i64.add local.set $0 end - local.get $5 + local.get $4 i32.const 2 call $std/string-casemapping/toUpperCaseFromIndex i64.extend_i32_s @@ -6442,8 +6444,8 @@ i64.add local.set $0 end - local.get $2 - local.get $4 + local.get $1 + local.get $3 i64.ne if global.get $~lib/memory/__stack_pointer @@ -6451,7 +6453,7 @@ i32.store i32.const 18848 i32.const 1 - local.get $5 + local.get $4 f64.convert_i32_s f64.const 0 f64.const 0 @@ -6461,20 +6463,20 @@ global.get $~lib/memory/__stack_pointer i32.const 18944 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/number/I64#toString - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store offset=8 i32.const 18944 - local.get $1 + local.get $5 call $~lib/string/String.__concat - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store - local.get $1 + local.get $5 i32.const 0 f64.const 0 f64.const 0 @@ -6485,20 +6487,20 @@ global.get $~lib/memory/__stack_pointer i32.const 20784 i32.store offset=4 - local.get $4 + local.get $3 call $~lib/number/I64#toString - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store offset=8 i32.const 20784 - local.get $1 + local.get $5 call $~lib/string/String.__concat - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store - local.get $1 + local.get $5 i32.const 0 f64.const 0 f64.const 0 @@ -6508,7 +6510,7 @@ call $~lib/builtins/trace end local.get $0 - local.get $3 + local.get $2 i64.ne if global.get $~lib/memory/__stack_pointer @@ -6516,7 +6518,7 @@ i32.store i32.const 20848 i32.const 1 - local.get $5 + local.get $4 f64.convert_i32_s f64.const 0 f64.const 0 @@ -6526,20 +6528,20 @@ global.get $~lib/memory/__stack_pointer i32.const 20944 i32.store offset=4 - local.get $3 + local.get $2 call $~lib/number/I64#toString - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store offset=8 i32.const 20944 - local.get $1 + local.get $5 call $~lib/string/String.__concat - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store - local.get $1 + local.get $5 i32.const 0 f64.const 0 f64.const 0 @@ -6552,18 +6554,18 @@ i32.store offset=4 local.get $0 call $~lib/number/I64#toString - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store offset=8 i32.const 21008 - local.get $1 + local.get $5 call $~lib/string/String.__concat - local.set $1 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $5 i32.store - local.get $1 + local.get $5 i32.const 0 f64.const 0 f64.const 0 @@ -6572,10 +6574,10 @@ f64.const 0 call $~lib/builtins/trace end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -6594,7 +6596,6 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -6619,7 +6620,7 @@ i32.load offset=16 i32.const 1 i32.shr_u - local.tee $7 + local.tee $4 i32.eqz if global.get $~lib/memory/__stack_pointer @@ -6630,19 +6631,19 @@ return end global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $4 i32.const 2 i32.shl i32.const 1 call $~lib/rt/itcms/__new - local.tee $6 + local.tee $5 i32.store loop $for-loop|0 - local.get $2 - local.get $7 + local.get $3 + local.get $4 i32.lt_u if - local.get $2 + local.get $3 i32.const 1 i32.shl local.get $0 @@ -6658,34 +6659,34 @@ i32.sub i32.const 1025 i32.lt_u - local.get $7 + local.get $4 i32.const 1 i32.sub - local.get $2 + local.get $3 i32.gt_u i32.and if - local.get $2 + local.get $3 i32.const 1 i32.shl local.get $0 i32.add i32.load16_u offset=2 - local.tee $4 + local.tee $7 i32.const 56319 i32.sub i32.const 1025 i32.lt_u if - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 - local.get $4 + local.set $3 + local.get $7 i32.const 1023 i32.and local.get $1 - local.tee $3 + local.tee $2 i32.const 1023 i32.and i32.const 10 @@ -6697,21 +6698,21 @@ i32.const 131072 i32.ge_u if - local.get $5 + local.get $6 i32.const 1 i32.shl - local.get $6 + local.get $5 i32.add - local.get $4 + local.get $7 i32.const 16 i32.shl - local.get $3 + local.get $2 i32.or i32.store - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-continue|0 end end @@ -6720,30 +6721,30 @@ i32.const 304 i32.eq if - local.get $5 + local.get $6 i32.const 1 i32.shl - local.get $6 + local.get $5 i32.add i32.const 50790505 i32.store - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 else local.get $1 i32.const 931 i32.eq if - local.get $5 + local.get $6 i32.const 1 i32.shl - local.get $6 + local.get $5 i32.add i32.const 962 i32.const 963 - local.get $7 + local.get $4 i32.const 1 i32.gt_u if (result i32) @@ -6751,30 +6752,29 @@ i32.const 0 local.set $1 i32.const 0 - local.get $2 - local.tee $3 - local.tee $4 + local.get $3 + local.tee $2 i32.const 30 i32.sub - local.tee $8 - local.get $8 + local.tee $7 + local.get $7 i32.const 0 i32.lt_s select - local.set $9 + local.set $7 loop $while-continue|1 - local.get $4 - local.get $9 + local.get $2 + local.get $7 i32.gt_s if block $~lib/util/string/codePointBefore|inlined.0 (result i32) i32.const -1 - local.get $4 + local.get $2 i32.const 0 i32.le_s br_if $~lib/util/string/codePointBefore|inlined.0 drop - local.get $4 + local.get $2 i32.const 1 i32.sub i32.const 1 @@ -6782,19 +6782,19 @@ local.get $0 i32.add i32.load16_u - local.tee $10 + local.tee $8 i32.const 64512 i32.and i32.const 56320 i32.eq - local.get $4 + local.get $2 i32.const 2 i32.sub i32.const 0 i32.ge_s i32.and if - local.get $4 + local.get $2 i32.const 2 i32.sub i32.const 1 @@ -6802,16 +6802,16 @@ local.get $0 i32.add i32.load16_u - local.tee $8 + local.tee $9 i32.const 64512 i32.and i32.const 55296 i32.eq if - local.get $10 + local.get $8 i32.const 1023 i32.and - local.get $8 + local.get $9 i32.const 1023 i32.and i32.const 10 @@ -6823,8 +6823,8 @@ end end i32.const 65533 - local.get $10 - local.get $10 + local.get $8 + local.get $8 i32.const 63488 i32.and i32.const 55296 @@ -6900,14 +6900,14 @@ i32.const 1 local.set $1 end - local.get $4 + local.get $2 local.get $8 i32.const 65536 i32.ge_s i32.const 1 i32.add i32.sub - local.set $4 + local.set $2 br $while-continue|1 end end @@ -6919,22 +6919,22 @@ local.get $3 i32.const 1 i32.add - local.tee $4 + local.tee $2 i32.const 30 i32.add local.tee $1 - local.get $7 + local.get $4 local.get $1 - local.get $7 + local.get $4 i32.lt_s select - local.set $3 + local.set $7 loop $while-continue|2 - local.get $3 - local.get $4 - i32.gt_s + local.get $2 + local.get $7 + i32.lt_s if - local.get $4 + local.get $2 i32.const 1 i32.shl local.get $0 @@ -6945,14 +6945,14 @@ i32.and i32.const 55296 i32.eq - local.get $7 local.get $4 + local.get $2 i32.const 1 i32.add i32.ne i32.and if - local.get $4 + local.get $2 i32.const 1 i32.shl local.get $0 @@ -7044,9 +7044,9 @@ i32.ge_u i32.const 1 i32.add - local.get $4 + local.get $2 i32.add - local.set $4 + local.set $2 br $while-continue|2 end end @@ -7064,10 +7064,10 @@ i32.const 25 i32.le_u if - local.get $5 + local.get $6 i32.const 1 i32.shl - local.get $6 + local.get $5 i32.add local.get $1 i32.const 26 @@ -7083,18 +7083,18 @@ i32.const 65536 i32.lt_u if - local.get $5 + local.get $6 i32.const 1 i32.shl - local.get $6 + local.get $5 i32.add local.get $1 i32.store16 else - local.get $5 + local.get $6 i32.const 1 i32.shl - local.get $6 + local.get $5 i32.add local.get $1 i32.const 65536 @@ -7113,20 +7113,20 @@ i32.shl i32.or i32.store - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 end end end end end else - local.get $5 + local.get $6 i32.const 1 i32.shl - local.get $6 + local.get $5 i32.add local.get $1 i32.const 7084 @@ -7134,19 +7134,19 @@ i32.load8_u i32.store16 end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 - local.get $5 + local.set $3 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|0 end end - local.get $6 local.get $5 + local.get $6 i32.const 1 i32.shl call $~lib/rt/itcms/__renew diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 90e8fc6d34..7c2c8361aa 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -1167,7 +1167,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1182,7 +1182,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1195,7 +1195,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1203,7 +1203,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1214,16 +1214,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1234,16 +1234,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1251,7 +1251,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1259,8 +1259,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1277,7 +1277,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1287,13 +1287,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1306,40 +1306,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 2656b9f5fd..bf7c1909ce 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -2304,7 +2304,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -2319,7 +2319,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -2332,7 +2332,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -2340,7 +2340,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -2351,16 +2351,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -2371,16 +2371,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -2388,7 +2388,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -2396,8 +2396,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -2414,7 +2414,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -2424,13 +2424,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -2443,40 +2443,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -4464,44 +4464,44 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i64) - (local $5 i64) + (local $5 i32) i32.const 4284 i32.load i32.const 1 i32.shr_u - local.tee $0 + local.tee $1 i32.eqz if i64.const 0 return end i32.const 4288 - local.set $2 + local.set $5 i32.const 4288 i32.load16_u - local.set $1 + local.set $0 loop $while-continue|0 block $__inlined_func$~lib/util/string/isSpace (result i32) - local.get $1 + local.get $0 i32.const 128 i32.or i32.const 160 i32.eq - local.get $1 + local.get $0 i32.const 9 i32.sub i32.const 4 i32.le_u i32.or - local.get $1 + local.get $0 i32.const 5760 i32.lt_u br_if $__inlined_func$~lib/util/string/isSpace drop i32.const 1 - local.get $1 + local.get $0 i32.const -8192 i32.add i32.const 10 @@ -4510,31 +4510,31 @@ drop block $break|0 block $case6|0 - local.get $1 + local.get $0 i32.const 5760 i32.eq br_if $case6|0 - local.get $1 + local.get $0 i32.const 8232 i32.eq br_if $case6|0 - local.get $1 + local.get $0 i32.const 8233 i32.eq br_if $case6|0 - local.get $1 + local.get $0 i32.const 8239 i32.eq br_if $case6|0 - local.get $1 + local.get $0 i32.const 8287 i32.eq br_if $case6|0 - local.get $1 + local.get $0 i32.const 12288 i32.eq br_if $case6|0 - local.get $1 + local.get $0 i32.const 65279 i32.eq br_if $case6|0 @@ -4546,33 +4546,33 @@ i32.const 0 end if - local.get $2 + local.get $5 i32.const 2 i32.add - local.tee $2 + local.tee $5 i32.load16_u - local.set $1 - local.get $0 + local.set $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|0 end end i64.const 1 - local.set $5 - local.get $1 + local.set $3 + local.get $0 i32.const 43 i32.eq - local.get $1 + local.get $0 i32.const 45 i32.eq i32.or if (result i32) - local.get $0 + local.get $1 i32.const 1 i32.sub - local.tee $0 + local.tee $1 i32.eqz if i64.const 0 @@ -4580,22 +4580,22 @@ end i64.const -1 i64.const 1 - local.get $1 + local.get $0 i32.const 45 i32.eq select - local.set $5 - local.get $2 + local.set $3 + local.get $5 i32.const 2 i32.add - local.tee $2 + local.tee $5 i32.load16_u else - local.get $1 + local.get $0 end i32.const 48 i32.eq - local.get $0 + local.get $1 i32.const 2 i32.gt_s i32.and @@ -4603,101 +4603,101 @@ block $break|1 block $case2|1 block $case1|1 - local.get $2 + local.get $5 i32.load16_u offset=2 i32.const 32 i32.or - local.tee $1 + local.tee $0 i32.const 98 i32.ne if - local.get $1 + local.get $0 i32.const 111 i32.eq br_if $case1|1 - local.get $1 + local.get $0 i32.const 120 i32.eq br_if $case2|1 br $break|1 end - local.get $2 + local.get $5 i32.const 4 i32.add - local.set $2 - local.get $0 + local.set $5 + local.get $1 i32.const 2 i32.sub - local.set $0 + local.set $1 i32.const 2 - local.set $3 + local.set $2 br $break|1 end - local.get $2 + local.get $5 i32.const 4 i32.add - local.set $2 - local.get $0 + local.set $5 + local.get $1 i32.const 2 i32.sub - local.set $0 + local.set $1 i32.const 8 - local.set $3 + local.set $2 br $break|1 end - local.get $2 + local.get $5 i32.const 4 i32.add - local.set $2 - local.get $0 + local.set $5 + local.get $1 i32.const 2 i32.sub - local.set $0 + local.set $1 i32.const 16 - local.set $3 + local.set $2 end end - local.get $3 + local.get $2 i32.const 10 - local.get $3 + local.get $2 select - local.set $3 + local.set $2 loop $while-continue|2 block $while-break|2 - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 1 i32.sub - local.set $0 - local.get $1 + local.set $1 + local.get $0 if - local.get $2 + local.get $5 i32.load16_u - local.tee $1 + local.tee $0 i32.const 48 i32.sub i32.const 10 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 48 i32.sub else - local.get $1 + local.get $0 i32.const 65 i32.sub i32.const 25 i32.le_u if (result i32) - local.get $1 + local.get $0 i32.const 55 i32.sub else - local.get $1 + local.get $0 i32.const 87 i32.sub - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.const 97 i32.sub i32.const 25 @@ -4705,8 +4705,8 @@ select end end - local.tee $1 - local.get $3 + local.tee $0 + local.get $2 i32.ge_u if local.get $4 @@ -4717,24 +4717,24 @@ end br $while-break|2 end - local.get $1 + local.get $0 i64.extend_i32_u - local.get $3 + local.get $2 i64.extend_i32_s local.get $4 i64.mul i64.add local.set $4 - local.get $2 + local.get $5 i32.const 2 i32.add - local.set $2 + local.set $5 br $while-continue|2 end end end + local.get $3 local.get $4 - local.get $5 i64.mul ) (func $~lib/math/ipow32 (param $0 i32) (result i32) @@ -4977,8 +4977,8 @@ (local $6 i64) (local $7 i32) (local $8 i64) - (local $9 i32) - (local $10 f64) + (local $9 f64) + (local $10 i32) (local $11 f64) (local $12 i64) (local $13 i64) @@ -5206,7 +5206,7 @@ select br_if $folding-inner0 i32.const 1 - local.set $9 + local.set $10 loop $for-loop|2 local.get $0 i32.load16_u @@ -5254,7 +5254,7 @@ i32.sub local.set $4 loop $for-loop|3 - local.get $9 + local.get $10 i32.eqz local.get $5 i32.const 46 @@ -5297,7 +5297,7 @@ local.get $1 local.set $2 i32.const 1 - local.set $9 + local.set $10 end local.get $7 i32.const 1 @@ -5318,20 +5318,19 @@ end end end - block $~lib/util/string/scientific|inlined.0 (result f64) - local.get $2 - local.get $1 - local.get $9 - select - i32.const 19 - local.get $1 - local.get $1 - i32.const 19 - i32.gt_s - select - i32.sub - local.set $5 - f64.const 0 + local.get $2 + local.get $1 + local.get $10 + select + i32.const 19 + local.get $1 + local.get $1 + i32.const 19 + i32.gt_s + select + i32.sub + local.set $10 + block $~lib/util/string/scientific|inlined.0 local.get $6 i64.eqz block $~lib/util/string/parseExp|inlined.0 (result i32) @@ -5426,9 +5425,9 @@ local.get $2 i32.const 48 i32.sub - local.set $2 + local.set $5 loop $for-loop|5 - local.get $2 + local.get $5 i32.const 10 i32.lt_u i32.const 0 @@ -5443,7 +5442,7 @@ i32.ge_s br_if $~lib/util/string/parseExp|inlined.0 drop - local.get $2 + local.get $5 local.get $3 i32.const 10 i32.mul @@ -5460,7 +5459,7 @@ i32.load16_u i32.const 48 i32.sub - local.set $2 + local.set $5 br $for-loop|5 end end @@ -5468,27 +5467,25 @@ local.get $3 i32.mul end - local.get $5 + local.get $10 i32.add local.tee $0 i32.const -342 i32.lt_s i32.or br_if $~lib/util/string/scientific|inlined.0 - drop f64.const inf + local.set $9 local.get $0 i32.const 308 i32.gt_s br_if $~lib/util/string/scientific|inlined.0 - drop local.get $6 f64.convert_i64_u - local.tee $10 + local.set $9 local.get $0 i32.eqz br_if $~lib/util/string/scientific|inlined.0 - drop local.get $0 i32.const 37 i32.le_s @@ -5497,7 +5494,7 @@ i32.gt_s i32.and if - local.get $10 + local.get $9 local.get $0 i32.const 3 i32.shl @@ -5505,7 +5502,7 @@ i32.add f64.load f64.mul - local.set $10 + local.set $9 i32.const 22 local.set $0 end @@ -5531,7 +5528,7 @@ i32.const 0 i32.gt_s if - local.get $10 + local.get $9 local.get $0 i32.const 3 i32.shl @@ -5539,9 +5536,10 @@ i32.add f64.load f64.mul + local.set $9 br $~lib/util/string/scientific|inlined.0 end - local.get $10 + local.get $9 i32.const 0 local.get $0 i32.sub @@ -5765,7 +5763,9 @@ call $~lib/math/NativeMath.scalbn end end + local.set $9 end + local.get $9 local.get $11 f64.copysign return @@ -6715,6 +6715,7 @@ ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) local.get $2 i32.eqz if @@ -6853,68 +6854,69 @@ local.get $1 i32.const 1 i32.eq - if (result i32) + if local.get $0 i32.const 101 i32.store16 offset=2 local.get $0 i32.const 4 i32.add + local.tee $2 local.get $3 i32.const 1 i32.sub - local.tee $1 + local.tee $0 i32.const 0 i32.lt_s - local.tee $2 + local.tee $3 if i32.const 0 - local.get $1 + local.get $0 i32.sub - local.set $1 + local.set $0 end - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.const 100000 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 100 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 10 i32.ge_u i32.const 1 i32.add else - local.get $1 + local.get $0 i32.const 10000 i32.ge_u i32.const 3 i32.add - local.get $1 + local.get $0 i32.const 1000 i32.ge_u i32.add end else - local.get $1 + local.get $0 i32.const 10000000 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 1000000 i32.ge_u i32.const 6 i32.add else - local.get $1 + local.get $0 i32.const 1000000000 i32.ge_u i32.const 8 i32.add - local.get $1 + local.get $0 i32.const 100000000 i32.ge_u i32.add @@ -6924,13 +6926,12 @@ i32.add local.tee $1 call $~lib/util/number/utoa32_dec_lut - local.get $0 + local.get $2 i32.const 45 i32.const 43 - local.get $2 + local.get $3 select - i32.store16 offset=4 - local.get $1 + i32.store16 else local.get $0 i32.const 4 @@ -6951,19 +6952,20 @@ local.get $0 local.get $2 i32.add - local.tee $2 + local.tee $0 i32.const 101 i32.store16 offset=2 - local.get $2 + local.get $0 i32.const 4 i32.add + local.tee $4 local.get $3 i32.const 1 i32.sub local.tee $0 i32.const 0 i32.lt_s - local.tee $3 + local.tee $2 if i32.const 0 local.get $0 @@ -7021,16 +7023,18 @@ i32.add local.tee $0 call $~lib/util/number/utoa32_dec_lut - local.get $2 + local.get $4 i32.const 45 i32.const 43 - local.get $3 + local.get $2 select - i32.store16 offset=4 + i32.store16 local.get $0 local.get $1 i32.add + local.set $1 end + local.get $1 i32.const 2 i32.add end @@ -7175,37 +7179,36 @@ local.tee $1 i64.const 4294967295 i64.and - local.set $3 + local.set $4 local.get $1 i64.const 32 i64.shr_u - local.tee $9 + local.tee $1 global.get $~lib/util/number/_frc_pow - local.tee $10 + local.tee $9 i64.const 4294967295 i64.and - local.tee $11 - local.tee $1 + local.tee $10 i64.mul - local.get $1 - local.get $3 + local.get $4 + local.get $10 i64.mul i64.const 32 i64.shr_u i64.add - local.set $4 + local.set $11 global.get $~lib/util/number/_frc_plus - local.tee $1 + local.tee $3 i64.const 4294967295 i64.and local.set $12 - local.get $1 + local.get $3 i64.const 32 i64.shr_u - local.tee $1 - local.get $11 + local.tee $3 + local.get $10 i64.mul - local.get $11 + local.get $10 local.get $12 i64.mul i64.const 32 @@ -7221,35 +7224,34 @@ i64.const 32 i64.shr_u local.tee $13 - local.get $11 + local.get $10 i64.mul - local.get $11 + local.get $10 local.get $14 i64.mul i64.const 32 i64.shr_u i64.add - local.set $11 + local.set $10 local.get $2 i32.const 1 i32.shl i32.const 22864 i32.add + local.get $1 local.get $9 - local.get $10 i64.const 32 i64.shr_u local.tee $9 - local.tee $10 i64.mul - local.get $4 + local.get $11 i64.const 32 i64.shr_u i64.add - local.get $3 - local.get $10 - i64.mul local.get $4 + local.get $9 + i64.mul + local.get $11 i64.const 4294967295 i64.and i64.add @@ -7258,7 +7260,7 @@ i64.const 32 i64.shr_u i64.add - local.get $1 + local.get $3 local.get $9 i64.mul local.get $5 @@ -7289,14 +7291,14 @@ local.get $9 local.get $13 i64.mul - local.get $11 + local.get $10 i64.const 32 i64.shr_u i64.add local.get $9 local.get $14 i64.mul - local.get $11 + local.get $10 i64.const 4294967295 i64.and i64.add @@ -7327,26 +7329,16 @@ block $folding-inner0 block $invalid block $~lib/array/Array<~lib/string/String> - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $folding-inner0 $~lib/array/Array<~lib/string/String> $invalid - end - return + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner0 $folding-inner0 $~lib/array/Array<~lib/string/String> $invalid end return end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end return end local.get $0 @@ -7357,17 +7349,17 @@ i32.const 2 i32.shl i32.add - local.set $2 + local.set $3 loop $while-continue|0 local.get $1 - local.get $2 + local.get $3 i32.lt_u if local.get $1 i32.load - local.tee $3 + local.tee $2 if - local.get $3 + local.get $2 call $byn-split-outlined-A$~lib/rt/itcms/__visit end local.get $1 @@ -7417,17 +7409,17 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $6 + local.tee $5 i64.const 0 i64.store - local.get $6 + local.get $5 i64.const 0 i64.store offset=8 - local.get $6 + local.get $5 i64.const 0 i64.store offset=16 - block $folding-inner3 - block $folding-inner2 + block $folding-inner2 + block $folding-inner1 block $folding-inner0 local.get $2 i32.eqz @@ -7457,7 +7449,7 @@ i32.const 1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - br $folding-inner3 + br $folding-inner1 end local.get $0 i32.const 20 @@ -7465,7 +7457,7 @@ i32.load offset=16 i32.const 1 i32.shr_u - local.set $7 + local.set $5 i32.const 2147483647 local.get $2 local.get $2 @@ -7479,9 +7471,9 @@ i32.load offset=16 i32.const 1 i32.shr_u - local.tee $6 + local.tee $8 if - local.get $7 + local.get $5 i32.eqz if global.get $~lib/memory/__stack_pointer @@ -7489,23 +7481,28 @@ i32.const 4 i32.const 0 call $~lib/rt/__newArray - local.tee $1 + local.tee $0 i32.store offset=4 - local.get $1 + local.get $0 i32.load offset=4 i32.const 1712 i32.store - br $folding-inner3 + global.get $~lib/memory/__stack_pointer + i32.const 24 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + return end else - local.get $7 + local.get $5 i32.eqz br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $5 local.get $2 local.get $2 - local.get $7 + local.get $5 i32.gt_s select local.tee $2 @@ -7516,10 +7513,10 @@ i32.store local.get $1 i32.load offset=4 - local.set $3 + local.set $4 loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.gt_s if global.get $~lib/memory/__stack_pointer @@ -7529,17 +7526,17 @@ local.tee $5 i32.store offset=8 local.get $5 - local.get $4 + local.get $3 i32.const 1 i32.shl local.get $0 i32.add i32.load16_u i32.store16 - local.get $4 + local.get $3 i32.const 2 i32.shl - local.get $3 + local.get $4 i32.add local.get $5 i32.store @@ -7550,90 +7547,90 @@ i32.const 1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end - br $folding-inner3 + br $folding-inner1 end global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 4 i32.const 0 call $~lib/rt/__newArray - local.tee $8 + local.tee $6 i32.store offset=12 loop $while-continue|1 local.get $0 local.get $1 - local.get $5 + local.get $3 call $~lib/string/String#indexOf local.tee $9 i32.const -1 i32.xor if local.get $9 - local.get $5 + local.get $3 i32.sub - local.tee $4 + local.tee $7 i32.const 0 i32.gt_s if global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $7 i32.const 1 i32.shl local.tee $10 i32.const 1 call $~lib/rt/itcms/__new - local.tee $4 + local.tee $7 i32.store offset=16 - local.get $4 - local.get $5 + local.get $7 + local.get $3 i32.const 1 i32.shl local.get $0 i32.add local.get $10 call $~lib/memory/memory.copy - local.get $8 - local.get $4 + local.get $6 + local.get $7 call $~lib/array/Array<~lib/string/String>#push else global.get $~lib/memory/__stack_pointer i32.const 1712 i32.store offset=20 - local.get $8 + local.get $6 i32.const 1712 call $~lib/array/Array<~lib/string/String>#push end local.get $2 - local.get $3 + local.get $4 i32.const 1 i32.add - local.tee $3 + local.tee $4 i32.eq br_if $folding-inner2 - local.get $6 + local.get $8 local.get $9 i32.add - local.set $5 + local.set $3 br $while-continue|1 end end - local.get $5 + local.get $3 i32.eqz if - local.get $8 + local.get $6 local.get $0 call $~lib/array/Array<~lib/string/String>#push br $folding-inner2 end - local.get $7 local.get $5 + local.get $3 i32.sub local.tee $1 i32.const 0 @@ -7649,21 +7646,21 @@ local.tee $2 i32.store offset=4 local.get $2 - local.get $5 + local.get $3 i32.const 1 i32.shl local.get $0 i32.add local.get $1 call $~lib/memory/memory.copy - local.get $8 + local.get $6 local.get $2 call $~lib/array/Array<~lib/string/String>#push else global.get $~lib/memory/__stack_pointer i32.const 1712 i32.store offset=20 - local.get $8 + local.get $6 i32.const 1712 call $~lib/array/Array<~lib/string/String>#push end @@ -7671,7 +7668,7 @@ i32.const 24 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $6 return end i32.const 0 @@ -7679,20 +7676,19 @@ i32.const 0 call $~lib/rt/__newArray local.set $1 - br $folding-inner3 end global.get $~lib/memory/__stack_pointer i32.const 24 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $1 return end global.get $~lib/memory/__stack_pointer i32.const 24 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $6 ) (func $start:std/string (local $0 i32) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 41f8793785..6e10d28cdd 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1363,7 +1363,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1378,7 +1378,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1391,7 +1391,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1399,7 +1399,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1410,16 +1410,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1430,16 +1430,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1447,7 +1447,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1455,8 +1455,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1473,7 +1473,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1483,13 +1483,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1502,40 +1502,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -2089,7 +2089,6 @@ local.get $0 i32.load offset=4 local.get $1 - local.tee $2 i32.const -1028477379 i32.mul i32.const 374761397 @@ -2128,21 +2127,20 @@ local.get $0 if local.get $0 - local.tee $1 i32.load offset=8 - local.tee $0 + local.tee $2 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $2 local.get $1 + local.get $0 i32.load i32.eq end br_if $__inlined_func$~lib/map/Map#find - local.get $0 + local.get $2 i32.const -2 i32.and local.set $0 @@ -2150,9 +2148,9 @@ end end i32.const 0 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.eqz if i32.const 1648 @@ -2162,7 +2160,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=4 ) (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) @@ -3118,76 +3116,30 @@ (local $1 i32) (local $2 i32) (local $3 i32) - block $folding-inner0 - block $invalid - block $~lib/map/Map - block $~lib/map/Map<~lib/string/String,usize> - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/map/Map<~lib/string/String,usize> $~lib/map/Map $invalid - end - return + block $invalid + block $~lib/map/Map + block $~lib/map/Map<~lib/string/String,usize> + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/map/Map<~lib/string/String,usize> $~lib/map/Map $invalid end return end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end return end local.get $0 i32.load - local.tee $1 - if - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=16 - i32.const 12 - i32.mul - local.get $0 - i32.load offset=8 - local.tee $1 local.tee $0 - i32.add - local.set $2 - loop $while-continue|0 + if local.get $0 - local.get $2 - i32.lt_u - if - local.get $0 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - i32.load - local.tee $3 - if - local.get $3 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - end - local.get $0 - i32.const 12 - i32.add - local.set $0 - br $while-continue|0 - end + call $byn-split-outlined-A$~lib/rt/itcms/__visit end - br $folding-inner0 + return end local.get $0 i32.load @@ -3206,7 +3158,7 @@ local.tee $0 i32.add local.set $2 - loop $while-continue|01 + loop $while-continue|0 local.get $0 local.get $2 i32.lt_u @@ -3218,7 +3170,7 @@ i32.eqz if local.get $0 - i32.load offset=4 + i32.load local.tee $3 if local.get $3 @@ -3229,18 +3181,67 @@ i32.const 12 i32.add local.set $0 - br $while-continue|01 + br $while-continue|0 end end - br $folding-inner0 + local.get $1 + if + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + return + end + local.get $0 + i32.load + local.tee $1 + if + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $0 + i32.load offset=8 + local.tee $1 + local.tee $0 + i32.add + local.set $2 + loop $while-continue|01 + local.get $0 + local.get $2 + i32.lt_u + if + local.get $0 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + i32.load offset=4 + local.tee $3 + if + local.get $3 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + end + local.get $0 + i32.const 12 + i32.add + local.set $0 + br $while-continue|01 + end end - unreachable - end - local.get $1 - if local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__visit + if + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + return end + unreachable ) (func $~start global.get $~started @@ -3507,11 +3508,11 @@ global.set $~lib/symbol/idToString end global.get $~lib/symbol/nextId - local.tee $3 + local.tee $2 i32.const 1 i32.add global.set $~lib/symbol/nextId - local.get $3 + local.get $2 i32.eqz if unreachable @@ -3540,7 +3541,7 @@ local.tee $0 if local.get $0 - local.get $3 + local.get $2 i32.store offset=4 else local.get $4 @@ -3609,7 +3610,7 @@ i32.store offset=4 local.get $4 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $4 i32.load offset=16 i32.const 12 @@ -3619,18 +3620,18 @@ local.get $1 local.set $0 loop $while-continue|0 - local.get $2 + local.get $3 local.get $9 i32.ne if - local.get $2 + local.get $3 i32.load offset=8 i32.const 1 i32.and i32.eqz if global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $3 i32.load local.tee $10 i32.store offset=8 @@ -3638,7 +3639,7 @@ local.get $10 i32.store local.get $0 - local.get $2 + local.get $3 i32.load offset=4 i32.store offset=4 local.get $0 @@ -3661,10 +3662,10 @@ i32.add local.set $0 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end @@ -3728,7 +3729,7 @@ i32.const 1 call $byn-split-outlined-A$~lib/rt/itcms/__link local.get $0 - local.get $3 + local.get $2 i32.store offset=4 local.get $4 local.get $4 @@ -3774,7 +3775,7 @@ i32.store local.get $4 i32.load - local.get $3 + local.get $2 i32.const -1028477379 i32.mul i32.const 374761397 @@ -3823,7 +3824,7 @@ if (result i32) i32.const 0 else - local.get $3 + local.get $2 local.get $0 i32.load i32.eq @@ -3912,7 +3913,7 @@ i32.store offset=4 local.get $4 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $4 i32.load offset=16 i32.const 12 @@ -3922,23 +3923,23 @@ local.get $1 local.set $0 loop $while-continue|00 - local.get $2 + local.get $3 local.get $9 i32.ne if - local.get $2 + local.get $3 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $0 - local.get $2 + local.get $3 i32.load local.tee $10 i32.store local.get $0 - local.get $2 + local.get $3 i32.load offset=4 i32.store offset=4 local.get $0 @@ -3987,10 +3988,10 @@ i32.add local.set $0 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $while-continue|00 end end @@ -4047,7 +4048,7 @@ local.get $0 i32.add local.tee $0 - local.get $3 + local.get $2 i32.store local.get $0 i32.const 1056 @@ -4087,7 +4088,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 return end i32.const 19104 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index e37533c4cc..8b6fd219e1 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1986,7 +1986,7 @@ call $~lib/rt/tlsf/removeBlock local.get $1 i32.load - local.set $2 + local.set $4 local.get $3 i32.const 4 i32.add @@ -2000,17 +2000,17 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const -4 i32.and local.get $3 i32.sub - local.tee $4 + local.tee $2 i32.const 16 i32.ge_u if local.get $1 - local.get $2 + local.get $4 i32.const 2 i32.and local.get $3 @@ -2021,19 +2021,19 @@ i32.const 4 i32.add i32.add - local.tee $2 - local.get $4 + local.tee $3 + local.get $2 i32.const 4 i32.sub i32.const 1 i32.or i32.store local.get $0 - local.get $2 + local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $1 - local.get $2 + local.get $4 i32.const -2 i32.and i32.store @@ -3399,15 +3399,15 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f64) - (local $10 f64) - (local $11 f64) + (local $8 f64) + (local $9 i32) + (local $10 i32) + (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i64) + (local $13 i64) + (local $14 f64) + (local $15 f64) + (local $16 i32) local.get $1 i32.const 48 i32.le_s @@ -3432,17 +3432,17 @@ end local.get $0 f64.load - local.set $11 + local.set $14 local.get $0 f64.load offset=8 - local.set $10 + local.set $15 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $10 - local.get $11 - local.get $11 - local.get $10 + local.get $15 + local.get $14 + local.get $14 + local.get $15 local.get $2 i32.load call_indirect $0 (type $f64_f64_=>_i32) @@ -3453,46 +3453,47 @@ f64.store local.get $0 f64.load offset=16 - local.set $9 + local.set $8 i32.const 2 global.set $~argumentsLength - local.get $0 - local.get $9 - local.get $11 - local.get $10 + local.get $14 + local.get $15 local.get $1 select - local.tee $10 - local.get $10 - local.get $9 + local.tee $14 + local.get $8 local.get $2 i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.gt_s - local.tee $1 + local.set $1 + local.get $0 + local.get $8 + local.get $14 + local.get $1 select f64.store offset=8 local.get $0 - local.get $10 - local.get $9 + local.get $14 + local.get $8 local.get $1 select f64.store offset=16 end local.get $0 f64.load - local.set $10 + local.set $8 local.get $0 f64.load offset=8 - local.set $9 + local.set $14 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $9 - local.get $10 - local.get $10 - local.get $9 + local.get $14 + local.get $8 + local.get $8 + local.get $14 local.get $2 i32.load call_indirect $0 (type $f64_f64_=>_i32) @@ -3502,8 +3503,8 @@ select f64.store local.get $0 - local.get $10 - local.get $9 + local.get $8 + local.get $14 local.get $1 select f64.store offset=8 @@ -3523,43 +3524,43 @@ local.get $1 i32.clz i32.sub - local.tee $8 + local.tee $6 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $5 + local.set $9 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $5 + local.get $9 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $13 + local.tee $10 local.get $7 i32.add - local.set $14 + local.set $11 loop $for-loop|1 + local.get $5 local.get $6 - local.get $8 i32.lt_u if - local.get $6 + local.get $5 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.const -1 i32.store - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|1 end end @@ -3575,84 +3576,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $15 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $12 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $7 + local.tee $1 i32.const 1 i32.add - local.tee $1 + local.tee $5 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $12 + local.get $9 i32.const 31 - local.get $12 + local.get $9 i32.const 31 i32.lt_s select - local.tee $7 - local.get $1 + local.tee $1 + local.get $5 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $7 - local.get $12 + local.get $1 + local.get $9 i32.lt_s if local.get $0 - local.get $7 + local.get $1 i32.const 1 i32.add - local.tee $5 - local.get $12 + local.tee $6 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $6 - local.get $5 + local.tee $5 + local.get $6 i32.sub i32.const 1 i32.add - local.tee $8 + local.tee $7 i32.const 32 i32.lt_s if local.get $0 - local.get $5 - local.get $12 - local.get $5 + local.get $6 + local.get $9 + local.get $6 i32.const 31 i32.add - local.tee $1 - local.get $1 - local.get $12 + local.tee $5 + local.get $5 + local.get $9 i32.gt_s select - local.tee $6 - local.get $8 + local.tee $5 + local.get $7 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $5 + local.get $6 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $16 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -3662,30 +3663,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $16 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $1 + local.set $7 loop $for-loop|3 - local.get $1 local.get $4 - i32.lt_u + local.get $7 + i32.gt_u if local.get $4 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.load - local.tee $8 + local.tee $16 i32.const -1 i32.ne if local.get $0 - local.get $8 - local.get $14 + local.get $16 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -3694,16 +3695,16 @@ i32.load i32.const 1 i32.add - local.get $7 - local.get $15 + local.get $1 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $13 + local.get $10 i32.add i32.const -1 i32.store - local.get $8 + local.get $16 local.set $3 end local.get $4 @@ -3713,8 +3714,8 @@ br $for-loop|3 end end - local.get $13 - local.get $1 + local.get $10 + local.get $7 i32.const 2 i32.shl local.tee $4 @@ -3722,15 +3723,15 @@ local.get $3 i32.store local.get $4 - local.get $14 + local.get $11 i32.add - local.get $7 + local.get $1 i32.store - local.get $5 - local.set $3 local.get $6 - local.set $7 - local.get $1 + local.set $3 + local.get $5 + local.set $1 + local.get $7 local.set $4 br $while-continue|2 end @@ -3741,7 +3742,7 @@ local.get $4 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.load local.tee $1 @@ -3753,13 +3754,13 @@ local.get $4 i32.const 2 i32.shl - local.get $14 + local.get $11 i32.add i32.load i32.const 1 i32.add + local.get $9 local.get $12 - local.get $15 local.get $2 call $~lib/util/sort/mergeRuns end @@ -3770,9 +3771,9 @@ br $for-loop|4 end end - local.get $15 + local.get $12 call $~lib/rt/tlsf/__free - local.get $13 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) @@ -4869,16 +4870,16 @@ end local.get $0 i32.load offset=8 - local.set $4 + local.set $3 loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Int8Array#__get - local.set $3 + local.set $4 local.get $1 i32.load offset=12 local.get $2 @@ -4896,7 +4897,7 @@ i32.load offset=4 i32.add i32.load8_s - local.get $3 + local.get $4 i32.ne if i32.const 0 @@ -6251,7 +6252,6 @@ br $while-continue|0 end end - local.get $4 local.get $3 i64.const 4503599627370496 i64.ge_u @@ -6269,6 +6269,7 @@ i64.sub local.set $3 end + local.get $4 local.get $3 i64.const 11 i64.shl @@ -6570,43 +6571,41 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $2 i64.const 0 i64.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 i32.const 7728 i32.store - local.get $1 + local.get $2 i32.const 7740 i32.load - local.tee $1 + local.tee $3 call $~lib/typedarray/Int8Array#constructor local.tee $2 i32.store offset=4 loop $for-loop|0 - local.get $0 local.get $1 + local.get $3 i32.lt_s if local.get $2 - local.get $0 + local.get $1 i32.const 7728 - local.get $0 + local.get $1 call $~lib/array/Array#__get i32.extend8_s call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - i32.const 0 - local.set $0 i32.const -1 local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 @@ -7133,28 +7132,21 @@ end i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load offset=8 - local.tee $3 - local.set $2 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.05 - local.get $3 + local.get $0 + i32.load offset=8 + local.tee $2 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.05 local.get $2 - local.get $3 + local.get $2 i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 i32.const 0 i32.lt_s select @@ -7197,28 +7189,21 @@ end i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load offset=8 - local.tee $3 - local.set $2 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.011 - local.get $3 + local.get $0 + i32.load offset=8 + local.tee $2 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.011 local.get $2 - local.get $3 + local.get $2 i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 i32.const 0 i32.lt_s select @@ -7262,41 +7247,44 @@ i32.const 1 global.set $~argumentsLength local.get $0 + local.tee $2 i32.load offset=8 - local.tee $3 - local.set $2 + local.set $3 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.017 - local.get $3 + local.get $2 + i32.load offset=8 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.017 - local.get $2 + local.get $0 local.get $3 i32.add - local.get $3 + local.get $0 i32.const 1 i32.sub - local.get $2 - local.get $2 local.get $3 - i32.ge_s + local.get $0 + local.get $3 + i32.le_s select - local.get $2 + local.get $3 i32.const 0 i32.lt_s select - local.set $1 - local.get $0 + local.set $0 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|018 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 - local.get $2 + local.get $3 + local.get $0 + local.tee $1 i32.add i32.load8_u i32.const 3 @@ -7305,7 +7293,7 @@ local.get $1 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|018 end end @@ -7326,8 +7314,7 @@ i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.019 - local.get $0 - local.tee $2 + local.get $2 i32.load offset=8 local.tee $0 i32.eqz @@ -8076,44 +8063,42 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $2 i64.const 0 i64.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 i32.const 7728 i32.store - local.get $1 + local.get $2 i32.const 7740 i32.load - local.tee $1 + local.tee $3 call $~lib/typedarray/Uint8Array#constructor local.tee $2 i32.store offset=4 loop $for-loop|0 - local.get $0 local.get $1 + local.get $3 i32.lt_s if local.get $2 - local.get $0 + local.get $1 i32.const 7728 - local.get $0 + local.get $1 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - i32.const 0 - local.set $0 i32.const -1 local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 @@ -8640,28 +8625,21 @@ end i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load offset=8 - local.tee $3 - local.set $2 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.05 - local.get $3 + local.get $0 + i32.load offset=8 + local.tee $2 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.05 local.get $2 - local.get $3 + local.get $2 i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 i32.const 0 i32.lt_s select @@ -8704,28 +8682,21 @@ end i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load offset=8 - local.tee $3 - local.set $2 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.011 - local.get $3 + local.get $0 + i32.load offset=8 + local.tee $2 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.011 local.get $2 - local.get $3 + local.get $2 i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 i32.const 0 i32.lt_s select @@ -8769,41 +8740,44 @@ i32.const 1 global.set $~argumentsLength local.get $0 + local.tee $2 i32.load offset=8 - local.tee $3 - local.set $2 + local.set $3 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.017 - local.get $3 + local.get $2 + i32.load offset=8 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.017 - local.get $2 + local.get $0 local.get $3 i32.add - local.get $3 + local.get $0 i32.const 1 i32.sub - local.get $2 - local.get $2 local.get $3 - i32.ge_s + local.get $0 + local.get $3 + i32.le_s select - local.get $2 + local.get $3 i32.const 0 i32.lt_s select - local.set $1 - local.get $0 + local.set $0 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|018 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 - local.get $2 + local.get $3 + local.get $0 + local.tee $1 i32.add i32.load8_u i32.const 3 @@ -8812,7 +8786,7 @@ local.get $1 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|018 end end @@ -8833,8 +8807,7 @@ i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.019 - local.get $0 - local.tee $2 + local.get $2 i32.load offset=8 local.tee $0 i32.eqz @@ -9582,44 +9555,42 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $2 i64.const 0 i64.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 i32.const 7728 i32.store - local.get $1 + local.get $2 i32.const 7740 i32.load - local.tee $1 + local.tee $3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $2 i32.store offset=4 loop $for-loop|0 - local.get $0 local.get $1 + local.get $3 i32.lt_s if local.get $2 - local.get $0 + local.get $1 i32.const 7728 - local.get $0 + local.get $1 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - i32.const 0 - local.set $0 i32.const -1 local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 @@ -10146,28 +10117,21 @@ end i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load offset=8 - local.tee $3 - local.set $2 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.05 - local.get $3 + local.get $0 + i32.load offset=8 + local.tee $2 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.05 local.get $2 - local.get $3 + local.get $2 i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 i32.const 0 i32.lt_s select @@ -10210,28 +10174,21 @@ end i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load offset=8 - local.tee $3 - local.set $2 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.011 - local.get $3 + local.get $0 + i32.load offset=8 + local.tee $2 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.011 local.get $2 - local.get $3 + local.get $2 i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 i32.const 0 i32.lt_s select @@ -10275,41 +10232,44 @@ i32.const 1 global.set $~argumentsLength local.get $0 + local.tee $2 i32.load offset=8 - local.tee $3 - local.set $2 + local.set $3 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.017 - local.get $3 + local.get $2 + i32.load offset=8 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.017 - local.get $2 + local.get $0 local.get $3 i32.add - local.get $3 + local.get $0 i32.const 1 i32.sub - local.get $2 - local.get $2 local.get $3 - i32.ge_s + local.get $0 + local.get $3 + i32.le_s select - local.get $2 + local.get $3 i32.const 0 i32.lt_s select - local.set $1 - local.get $0 + local.set $0 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|018 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 - local.get $2 + local.get $3 + local.get $0 + local.tee $1 i32.add i32.load8_u i32.const 3 @@ -10318,7 +10278,7 @@ local.get $1 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|018 end end @@ -10339,8 +10299,7 @@ i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.019 - local.get $0 - local.tee $2 + local.get $2 i32.load offset=8 local.tee $0 i32.eqz @@ -11167,26 +11126,26 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $0 + local.tee $2 i64.const 0 i64.store - local.get $0 + local.get $2 i32.const 0 i32.store offset=8 - local.get $0 + local.get $2 i32.const 7728 i32.store - local.get $0 + local.get $2 i32.const 7740 i32.load - local.tee $0 + local.tee $2 call $~lib/typedarray/Int16Array#constructor local.tee $4 i32.store offset=4 loop $for-loop|0 - local.get $0 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s if local.get $4 local.get $1 @@ -11202,10 +11161,8 @@ br $for-loop|0 end end - i32.const 0 - local.set $1 i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $4 i32.load offset=8 @@ -11221,12 +11178,12 @@ i32.load offset=4 local.set $2 loop $while-continue|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -11234,17 +11191,17 @@ i32.load16_u i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|0 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 if i32.const 0 i32.const 1568 @@ -11254,9 +11211,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.01 local.get $4 i32.load offset=8 @@ -11272,12 +11229,12 @@ i32.load offset=4 local.set $2 loop $while-continue|02 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -11286,17 +11243,17 @@ i32.const 11 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.01 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|02 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -11308,9 +11265,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.04 local.get $4 i32.load offset=8 @@ -11326,12 +11283,12 @@ i32.load offset=4 local.set $2 loop $while-continue|05 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -11340,17 +11297,17 @@ i32.const 65535 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.04 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|05 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -11362,9 +11319,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.07 local.get $4 i32.load offset=8 @@ -11380,12 +11337,12 @@ i32.load offset=4 local.set $2 loop $while-continue|08 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -11394,17 +11351,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.07 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|08 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 3 i32.ne if @@ -11416,9 +11373,9 @@ unreachable end i32.const 2 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.010 local.get $4 i32.load offset=8 @@ -11435,12 +11392,12 @@ i32.load offset=4 local.set $2 loop $while-continue|011 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -11449,17 +11406,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.010 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|011 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 3 i32.ne if @@ -11471,9 +11428,9 @@ unreachable end i32.const 3 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.013 local.get $4 i32.load offset=8 @@ -11490,12 +11447,12 @@ i32.load offset=4 local.set $2 loop $while-continue|014 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -11504,17 +11461,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.013 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|014 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 3 i32.ne if @@ -11526,9 +11483,9 @@ unreachable end i32.const 4 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.016 local.get $4 i32.load offset=8 @@ -11545,12 +11502,12 @@ i32.load offset=4 local.set $2 loop $while-continue|017 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -11559,17 +11516,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.016 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|017 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -11581,9 +11538,9 @@ unreachable end i32.const 10 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.019 local.get $4 i32.load offset=8 @@ -11600,12 +11557,12 @@ i32.load offset=4 local.set $2 loop $while-continue|020 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -11614,17 +11571,17 @@ i32.const 1 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.019 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|020 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -11636,7 +11593,7 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.022 local.get $4 i32.load offset=8 @@ -11658,35 +11615,35 @@ i32.const 0 i32.gt_s select - local.set $1 + local.set $0 local.get $4 i32.load offset=4 - local.set $0 + local.set $1 loop $while-continue|023 - local.get $1 + local.get $0 local.get $2 i32.lt_s if - local.get $1 + local.get $0 i32.const 1 i32.shl - local.get $0 + local.get $1 i32.add i32.load16_u i32.const 1 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.022 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|023 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 1 i32.ne if @@ -11756,34 +11713,34 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $1 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - local.get $1 + local.get $0 i32.const 1 i32.sub i32.const 4 - local.get $1 + local.get $0 i32.const 4 - i32.le_u + i32.le_s select - local.set $1 + local.set $0 local.get $4 i32.load offset=4 local.set $2 loop $while-continue|024 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -11792,17 +11749,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|024 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 3 i32.ne if @@ -11814,34 +11771,34 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.026 local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $1 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.026 - local.get $1 + local.get $0 i32.const 1 i32.sub i32.const 3 - local.get $1 + local.get $0 i32.const 3 - i32.le_u + i32.le_s select - local.set $1 + local.set $0 local.get $4 i32.load offset=4 local.set $2 loop $while-continue|027 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -11850,17 +11807,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.026 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|027 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 3 i32.ne if @@ -11872,34 +11829,34 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.029 local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $1 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.029 - local.get $1 + local.get $0 i32.const 1 i32.sub i32.const 2 - local.get $1 + local.get $0 i32.const 2 - i32.le_u + i32.le_s select - local.set $1 + local.set $0 local.get $4 i32.load offset=4 local.set $2 loop $while-continue|030 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -11908,17 +11865,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.029 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|030 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -11930,34 +11887,34 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.032 local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $1 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.032 - local.get $1 + local.get $0 i32.const 1 i32.sub i32.const 100 - local.get $1 + local.get $0 i32.const 100 - i32.le_u + i32.le_s select - local.set $1 + local.set $0 local.get $4 i32.load offset=4 local.set $2 loop $while-continue|033 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -11966,17 +11923,17 @@ i32.const 1 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.032 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|033 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 1 i32.ne if @@ -11988,47 +11945,47 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.035 local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $0 + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.035 - local.get $0 + local.get $1 i32.const 10 i32.sub - local.set $1 + local.set $0 local.get $4 i32.load offset=4 - local.set $0 + local.set $1 loop $while-continue|036 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 + local.get $0 i32.const 1 i32.shl - local.get $0 + local.get $1 i32.add i32.load16_u i32.const 1 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.035 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|036 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 1 i32.ne if @@ -12040,47 +11997,47 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.038 local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $0 + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.038 - local.get $0 + local.get $1 i32.const 11 i32.sub - local.set $1 + local.set $0 local.get $4 i32.load offset=4 - local.set $0 + local.set $1 loop $while-continue|039 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 + local.get $0 i32.const 1 i32.shl - local.get $0 + local.get $1 i32.add i32.load16_u i32.const 1 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.038 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|039 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -12098,9 +12055,9 @@ local.tee $4 i32.store offset=8 i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.041 local.get $4 i32.load offset=8 @@ -12116,12 +12073,12 @@ i32.load offset=4 local.set $2 loop $while-continue|042 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12130,17 +12087,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.041 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|042 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -12152,9 +12109,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.044 local.get $4 i32.load offset=8 @@ -12170,12 +12127,12 @@ i32.load offset=4 local.set $2 loop $while-continue|045 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12184,17 +12141,17 @@ i32.const 4 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.044 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|045 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 if i32.const 0 i32.const 1568 @@ -12204,9 +12161,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.047 local.get $4 i32.load offset=8 @@ -12222,12 +12179,12 @@ i32.load offset=4 local.set $2 loop $while-continue|048 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12236,17 +12193,17 @@ i32.const 5 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.047 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|048 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 1 i32.ne if @@ -12258,9 +12215,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.050 local.get $4 i32.load offset=8 @@ -12276,12 +12233,12 @@ i32.load offset=4 local.set $2 loop $while-continue|051 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12290,17 +12247,17 @@ i32.const 9 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.050 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|051 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -12312,9 +12269,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.053 local.get $4 i32.load offset=8 @@ -12330,12 +12287,12 @@ i32.load offset=4 local.set $2 loop $while-continue|054 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12344,17 +12301,17 @@ i32.const 10 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.053 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|054 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -12366,9 +12323,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.056 local.get $4 i32.load offset=8 @@ -12384,12 +12341,12 @@ i32.load offset=4 local.set $2 loop $while-continue|057 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12398,17 +12355,17 @@ i32.const 11 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.056 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|057 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -12420,9 +12377,9 @@ unreachable end i32.const 1 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.059 local.get $4 i32.load offset=8 @@ -12439,12 +12396,12 @@ i32.load offset=4 local.set $2 loop $while-continue|060 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12453,17 +12410,17 @@ i32.const 5 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.059 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|060 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 1 i32.ne if @@ -12475,9 +12432,9 @@ unreachable end i32.const 2 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.062 local.get $4 i32.load offset=8 @@ -12494,12 +12451,12 @@ i32.load offset=4 local.set $2 loop $while-continue|063 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12508,17 +12465,17 @@ i32.const 5 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.062 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|063 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -12556,26 +12513,26 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $0 + local.tee $2 i64.const 0 i64.store - local.get $0 + local.get $2 i32.const 0 i32.store offset=8 - local.get $0 + local.get $2 i32.const 7728 i32.store - local.get $0 + local.get $2 i32.const 7740 i32.load - local.tee $0 + local.tee $2 call $~lib/typedarray/Uint16Array#constructor local.tee $4 i32.store offset=4 loop $for-loop|0 - local.get $0 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s if local.get $4 local.get $1 @@ -12592,10 +12549,8 @@ br $for-loop|0 end end - i32.const 0 - local.set $1 i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 local.get $4 i32.load offset=8 @@ -12611,12 +12566,12 @@ i32.load offset=4 local.set $2 loop $while-continue|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12624,17 +12579,17 @@ i32.load16_u i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|0 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 if i32.const 0 i32.const 1568 @@ -12644,9 +12599,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.01 local.get $4 i32.load offset=8 @@ -12662,12 +12617,12 @@ i32.load offset=4 local.set $2 loop $while-continue|02 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12676,17 +12631,17 @@ i32.const 11 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.01 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|02 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -12698,9 +12653,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.04 local.get $4 i32.load offset=8 @@ -12716,12 +12671,12 @@ i32.load offset=4 local.set $2 loop $while-continue|05 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12730,17 +12685,17 @@ i32.const 65535 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.04 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|05 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -12752,9 +12707,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.07 local.get $4 i32.load offset=8 @@ -12770,12 +12725,12 @@ i32.load offset=4 local.set $2 loop $while-continue|08 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12784,17 +12739,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.07 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|08 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 3 i32.ne if @@ -12806,9 +12761,9 @@ unreachable end i32.const 2 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.010 local.get $4 i32.load offset=8 @@ -12825,12 +12780,12 @@ i32.load offset=4 local.set $2 loop $while-continue|011 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12839,17 +12794,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.010 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|011 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 3 i32.ne if @@ -12861,9 +12816,9 @@ unreachable end i32.const 3 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.013 local.get $4 i32.load offset=8 @@ -12880,12 +12835,12 @@ i32.load offset=4 local.set $2 loop $while-continue|014 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12894,17 +12849,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.013 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|014 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 3 i32.ne if @@ -12916,9 +12871,9 @@ unreachable end i32.const 4 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.016 local.get $4 i32.load offset=8 @@ -12935,12 +12890,12 @@ i32.load offset=4 local.set $2 loop $while-continue|017 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -12949,17 +12904,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.016 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|017 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -12971,9 +12926,9 @@ unreachable end i32.const 10 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.019 local.get $4 i32.load offset=8 @@ -12990,12 +12945,12 @@ i32.load offset=4 local.set $2 loop $while-continue|020 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -13004,17 +12959,17 @@ i32.const 1 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.019 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|020 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -13026,7 +12981,7 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.022 local.get $4 i32.load offset=8 @@ -13048,35 +13003,35 @@ i32.const 0 i32.gt_s select - local.set $1 + local.set $0 local.get $4 i32.load offset=4 - local.set $0 + local.set $1 loop $while-continue|023 - local.get $1 + local.get $0 local.get $2 i32.lt_s if - local.get $1 + local.get $0 i32.const 1 i32.shl - local.get $0 + local.get $1 i32.add i32.load16_u i32.const 1 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.022 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|023 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 1 i32.ne if @@ -13146,34 +13101,34 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $1 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 - local.get $1 + local.get $0 i32.const 1 i32.sub i32.const 4 - local.get $1 + local.get $0 i32.const 4 - i32.le_u + i32.le_s select - local.set $1 + local.set $0 local.get $4 i32.load offset=4 local.set $2 loop $while-continue|024 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -13182,17 +13137,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|024 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 3 i32.ne if @@ -13204,34 +13159,34 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.026 local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $1 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.026 - local.get $1 + local.get $0 i32.const 1 i32.sub i32.const 3 - local.get $1 + local.get $0 i32.const 3 - i32.le_u + i32.le_s select - local.set $1 + local.set $0 local.get $4 i32.load offset=4 local.set $2 loop $while-continue|027 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -13240,17 +13195,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.026 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|027 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 3 i32.ne if @@ -13262,34 +13217,34 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.029 local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $1 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.029 - local.get $1 + local.get $0 i32.const 1 i32.sub i32.const 2 - local.get $1 + local.get $0 i32.const 2 - i32.le_u + i32.le_s select - local.set $1 + local.set $0 local.get $4 i32.load offset=4 local.set $2 loop $while-continue|030 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -13298,17 +13253,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.029 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|030 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -13320,34 +13275,34 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.032 local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $1 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.032 - local.get $1 + local.get $0 i32.const 1 i32.sub i32.const 100 - local.get $1 + local.get $0 i32.const 100 - i32.le_u + i32.le_s select - local.set $1 + local.set $0 local.get $4 i32.load offset=4 local.set $2 loop $while-continue|033 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -13356,17 +13311,17 @@ i32.const 1 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.032 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|033 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 1 i32.ne if @@ -13378,47 +13333,47 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.035 local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $0 + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.035 - local.get $0 + local.get $1 i32.const 10 i32.sub - local.set $1 + local.set $0 local.get $4 i32.load offset=4 - local.set $0 + local.set $1 loop $while-continue|036 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 + local.get $0 i32.const 1 i32.shl - local.get $0 + local.get $1 i32.add i32.load16_u i32.const 1 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.035 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|036 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 1 i32.ne if @@ -13430,47 +13385,47 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.038 local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $0 + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.038 - local.get $0 + local.get $1 i32.const 11 i32.sub - local.set $1 + local.set $0 local.get $4 i32.load offset=4 - local.set $0 + local.set $1 loop $while-continue|039 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if - local.get $1 + local.get $0 i32.const 1 i32.shl - local.get $0 + local.get $1 i32.add i32.load16_u i32.const 1 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.038 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|039 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -13488,9 +13443,9 @@ local.tee $4 i32.store offset=8 i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.041 local.get $4 i32.load offset=8 @@ -13506,12 +13461,12 @@ i32.load offset=4 local.set $2 loop $while-continue|042 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -13520,17 +13475,17 @@ i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.041 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|042 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -13542,9 +13497,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.044 local.get $4 i32.load offset=8 @@ -13560,12 +13515,12 @@ i32.load offset=4 local.set $2 loop $while-continue|045 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -13574,17 +13529,17 @@ i32.const 4 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.044 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|045 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 if i32.const 0 i32.const 1568 @@ -13594,9 +13549,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.047 local.get $4 i32.load offset=8 @@ -13612,12 +13567,12 @@ i32.load offset=4 local.set $2 loop $while-continue|048 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -13626,17 +13581,17 @@ i32.const 5 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.047 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|048 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 1 i32.ne if @@ -13648,9 +13603,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.050 local.get $4 i32.load offset=8 @@ -13666,12 +13621,12 @@ i32.load offset=4 local.set $2 loop $while-continue|051 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -13680,17 +13635,17 @@ i32.const 9 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.050 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|051 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -13702,9 +13657,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.053 local.get $4 i32.load offset=8 @@ -13720,12 +13675,12 @@ i32.load offset=4 local.set $2 loop $while-continue|054 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -13734,17 +13689,17 @@ i32.const 10 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.053 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|054 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -13756,9 +13711,9 @@ unreachable end i32.const 0 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.056 local.get $4 i32.load offset=8 @@ -13774,12 +13729,12 @@ i32.load offset=4 local.set $2 loop $while-continue|057 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -13788,17 +13743,17 @@ i32.const 11 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.056 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|057 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -13810,9 +13765,9 @@ unreachable end i32.const 1 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.059 local.get $4 i32.load offset=8 @@ -13829,12 +13784,12 @@ i32.load offset=4 local.set $2 loop $while-continue|060 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -13843,17 +13798,17 @@ i32.const 5 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.059 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|060 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 1 i32.ne if @@ -13865,9 +13820,9 @@ unreachable end i32.const 2 - local.set $1 - i32.const -1 local.set $0 + i32.const -1 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.062 local.get $4 i32.load offset=8 @@ -13884,12 +13839,12 @@ i32.load offset=4 local.set $2 loop $while-continue|063 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.shl local.get $2 @@ -13898,17 +13853,17 @@ i32.const 5 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.062 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|063 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -13946,28 +13901,28 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $2 i64.const 0 i64.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 i32.const 7728 i32.store - local.get $1 + local.get $2 i32.const 7740 i32.load - local.tee $1 - call $~lib/typedarray/Int32Array#constructor local.tee $3 + call $~lib/typedarray/Int32Array#constructor + local.tee $2 i32.store offset=4 loop $for-loop|0 local.get $0 - local.get $1 + local.get $3 i32.lt_s if - local.get $3 + local.get $2 local.get $0 i32.const 7728 local.get $0 @@ -13980,46 +13935,44 @@ br $for-loop|0 end end - i32.const 0 - local.set $0 i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u local.tee $4 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|0 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|0 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 if i32.const 0 i32.const 1568 @@ -14029,46 +13982,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.01 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u local.tee $4 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.01 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|02 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 11 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.01 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|02 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -14080,46 +14033,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.04 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u local.tee $4 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.04 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|05 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const -1 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.04 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|05 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -14131,46 +14084,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.07 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u local.tee $4 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.07 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|08 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.07 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|08 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -14182,11 +14135,11 @@ unreachable end i32.const 2 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.010 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u @@ -14197,35 +14150,35 @@ local.get $4 select br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.010 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|011 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.010 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|011 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -14237,11 +14190,11 @@ unreachable end i32.const 3 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.013 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u @@ -14252,35 +14205,35 @@ local.get $4 select br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.013 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|014 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.013 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|014 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -14292,11 +14245,11 @@ unreachable end i32.const 4 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.016 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u @@ -14307,35 +14260,35 @@ local.get $4 select br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.016 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|017 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.016 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|017 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -14347,11 +14300,11 @@ unreachable end i32.const 10 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.019 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u @@ -14362,35 +14315,35 @@ local.get $4 select br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.019 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|020 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 1 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.019 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|020 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -14402,20 +14355,20 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.022 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.const -100 i32.le_s i32.const 1 - local.get $2 + local.get $3 select br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.022 - local.get $2 + local.get $3 i32.const 100 i32.sub local.tee $1 @@ -14424,35 +14377,35 @@ i32.const 0 i32.gt_s select - local.set $0 - local.get $3 - i32.load offset=4 local.set $1 + local.get $2 + i32.load offset=4 + local.set $0 loop $while-continue|023 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 + local.get $1 i32.const 2 i32.shl - local.get $1 + local.get $0 i32.add i32.load i32.const 1 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.022 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|023 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 1 i32.ne if @@ -14465,15 +14418,15 @@ end i32.const 1 global.set $~argumentsLength - local.get $3 - local.tee $1 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 + local.set $3 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) i32.const -1 - local.get $1 + local.get $2 + local.tee $1 i32.load offset=8 i32.const 2 i32.shr_u @@ -14484,9 +14437,9 @@ local.get $0 i32.const 1 i32.sub - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 i32.le_s select local.set $0 @@ -14527,15 +14480,15 @@ end i32.const 1 global.set $~argumentsLength - local.get $3 - local.tee $1 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 + local.set $3 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.05 (result i32) i32.const -1 - local.get $1 + local.get $2 + local.tee $1 i32.load offset=8 i32.const 2 i32.shr_u @@ -14546,9 +14499,9 @@ local.get $0 i32.const 1 i32.sub - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 i32.le_s select local.set $0 @@ -14592,15 +14545,15 @@ end i32.const 1 global.set $~argumentsLength - local.get $3 - local.tee $1 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 + local.set $3 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.011 (result i32) i32.const -1 - local.get $1 + local.get $2 + local.tee $1 i32.load offset=8 i32.const 2 i32.shr_u @@ -14611,9 +14564,9 @@ local.get $0 i32.const 1 i32.sub - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 i32.le_s select local.set $0 @@ -14657,15 +14610,15 @@ end i32.const 1 global.set $~argumentsLength - local.get $3 - local.tee $1 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 + local.set $3 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.017 (result i32) i32.const -1 - local.get $1 + local.get $2 + local.tee $1 i32.load offset=8 i32.const 2 i32.shr_u @@ -14676,9 +14629,9 @@ local.get $0 i32.const 1 i32.sub - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 i32.le_s select local.set $0 @@ -14721,53 +14674,53 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.019 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $0 + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.019 - local.get $0 + local.get $1 i32.const 1 i32.sub i32.const 4 - local.get $0 + local.get $1 i32.const 4 - i32.le_u + i32.le_s select - local.set $0 - local.get $3 + local.set $1 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|024 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.019 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|024 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -14779,53 +14732,53 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.026 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $0 + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.026 - local.get $0 + local.get $1 i32.const 1 i32.sub i32.const 3 - local.get $0 + local.get $1 i32.const 3 - i32.le_u + i32.le_s select - local.set $0 - local.get $3 + local.set $1 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|027 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.026 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|027 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -14837,53 +14790,53 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.029 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $0 + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.029 - local.get $0 + local.get $1 i32.const 1 i32.sub i32.const 2 - local.get $0 + local.get $1 i32.const 2 - i32.le_u + i32.le_s select - local.set $0 - local.get $3 + local.set $1 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|030 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.029 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|030 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -14895,53 +14848,53 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.032 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $0 + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.032 - local.get $0 + local.get $1 i32.const 1 i32.sub i32.const 100 - local.get $0 + local.get $1 i32.const 100 - i32.le_u + i32.le_s select - local.set $0 - local.get $3 + local.set $1 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|033 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 1 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.032 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|033 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 1 i32.ne if @@ -14953,47 +14906,47 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.035 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $1 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.035 - local.get $1 + local.get $0 i32.const 10 i32.sub - local.set $0 - local.get $3 - i32.load offset=4 local.set $1 + local.get $2 + i32.load offset=4 + local.set $0 loop $while-continue|036 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if - local.get $0 + local.get $1 i32.const 2 i32.shl - local.get $1 + local.get $0 i32.add i32.load i32.const 1 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.035 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|036 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 1 i32.ne if @@ -15005,47 +14958,47 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.038 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $1 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.038 - local.get $1 + local.get $0 i32.const 11 i32.sub - local.set $0 - local.get $3 - i32.load offset=4 local.set $1 + local.get $2 + i32.load offset=4 + local.set $0 loop $while-continue|039 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if - local.get $0 + local.get $1 i32.const 2 i32.shl - local.get $1 + local.get $0 i32.add i32.load i32.const 1 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.038 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|039 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -15057,53 +15010,53 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.const 4 i32.const 9 call $~lib/typedarray/Int32Array#subarray local.tee $4 i32.store offset=8 i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.041 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.041 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|042 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.041 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|042 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -15115,46 +15068,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.044 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.044 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|045 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 4 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.044 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|045 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 if i32.const 0 i32.const 1568 @@ -15164,46 +15117,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.047 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.047 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|048 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 5 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.047 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|048 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 1 i32.ne if @@ -15215,46 +15168,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.050 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.050 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|051 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 9 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.050 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|051 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -15266,46 +15219,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.053 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.053 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|054 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 10 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.053 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|054 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -15317,46 +15270,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.056 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.056 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|057 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 11 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.056 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|057 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -15368,50 +15321,50 @@ unreachable end i32.const 1 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.059 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.const 1 i32.le_u i32.const 1 - local.get $2 + local.get $3 select br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.059 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|060 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 5 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.059 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|060 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 1 i32.ne if @@ -15423,50 +15376,50 @@ unreachable end i32.const 2 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.062 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.const 2 i32.le_u i32.const 1 - local.get $2 + local.get $3 select br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.062 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|063 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 5 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.062 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|063 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -15504,28 +15457,28 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $2 i64.const 0 i64.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 i32.const 7728 i32.store - local.get $1 + local.get $2 i32.const 7740 i32.load - local.tee $1 - call $~lib/typedarray/Uint32Array#constructor local.tee $3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $2 i32.store offset=4 loop $for-loop|0 local.get $0 - local.get $1 + local.get $3 i32.lt_s if - local.get $3 + local.get $2 local.get $0 i32.const 7728 local.get $0 @@ -15538,46 +15491,44 @@ br $for-loop|0 end end - i32.const 0 - local.set $0 i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u local.tee $4 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|0 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|0 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 if i32.const 0 i32.const 1568 @@ -15587,46 +15538,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.01 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u local.tee $4 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.01 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|02 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 11 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.01 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|02 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -15638,46 +15589,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.04 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u local.tee $4 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.04 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|05 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const -1 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.04 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|05 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -15689,46 +15640,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.07 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u local.tee $4 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.07 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|08 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.07 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|08 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -15740,11 +15691,11 @@ unreachable end i32.const 2 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.010 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u @@ -15755,35 +15706,35 @@ local.get $4 select br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.010 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|011 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.010 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|011 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -15795,11 +15746,11 @@ unreachable end i32.const 3 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.013 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u @@ -15810,35 +15761,35 @@ local.get $4 select br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.013 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|014 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.013 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|014 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -15850,11 +15801,11 @@ unreachable end i32.const 4 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.016 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u @@ -15865,35 +15816,35 @@ local.get $4 select br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.016 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|017 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.016 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|017 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -15905,11 +15856,11 @@ unreachable end i32.const 10 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.019 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u @@ -15920,35 +15871,35 @@ local.get $4 select br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.019 - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|020 - local.get $0 + local.get $1 local.get $4 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 1 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.019 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|020 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -15960,20 +15911,20 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.022 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.const -100 i32.le_s i32.const 1 - local.get $2 + local.get $3 select br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.022 - local.get $2 + local.get $3 i32.const 100 i32.sub local.tee $1 @@ -15982,35 +15933,35 @@ i32.const 0 i32.gt_s select - local.set $0 - local.get $3 - i32.load offset=4 local.set $1 + local.get $2 + i32.load offset=4 + local.set $0 loop $while-continue|023 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 + local.get $1 i32.const 2 i32.shl - local.get $1 + local.get $0 i32.add i32.load i32.const 1 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.022 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|023 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 1 i32.ne if @@ -16023,15 +15974,15 @@ end i32.const 1 global.set $~argumentsLength - local.get $3 - local.tee $1 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 + local.set $3 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) i32.const -1 - local.get $1 + local.get $2 + local.tee $1 i32.load offset=8 i32.const 2 i32.shr_u @@ -16042,9 +15993,9 @@ local.get $0 i32.const 1 i32.sub - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 i32.le_s select local.set $0 @@ -16085,15 +16036,15 @@ end i32.const 1 global.set $~argumentsLength - local.get $3 - local.tee $1 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 + local.set $3 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.05 (result i32) i32.const -1 - local.get $1 + local.get $2 + local.tee $1 i32.load offset=8 i32.const 2 i32.shr_u @@ -16104,9 +16055,9 @@ local.get $0 i32.const 1 i32.sub - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 i32.le_s select local.set $0 @@ -16150,15 +16101,15 @@ end i32.const 1 global.set $~argumentsLength - local.get $3 - local.tee $1 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 + local.set $3 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.011 (result i32) i32.const -1 - local.get $1 + local.get $2 + local.tee $1 i32.load offset=8 i32.const 2 i32.shr_u @@ -16169,9 +16120,9 @@ local.get $0 i32.const 1 i32.sub - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 i32.le_s select local.set $0 @@ -16215,15 +16166,15 @@ end i32.const 1 global.set $~argumentsLength - local.get $3 - local.tee $1 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 + local.set $3 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.017 (result i32) i32.const -1 - local.get $1 + local.get $2 + local.tee $1 i32.load offset=8 i32.const 2 i32.shr_u @@ -16234,9 +16185,9 @@ local.get $0 i32.const 1 i32.sub - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 i32.le_s select local.set $0 @@ -16279,53 +16230,53 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.019 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $0 + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.019 - local.get $0 + local.get $1 i32.const 1 i32.sub i32.const 4 - local.get $0 + local.get $1 i32.const 4 - i32.le_u + i32.le_s select - local.set $0 - local.get $3 + local.set $1 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|024 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.019 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|024 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -16337,53 +16288,53 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.026 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $0 + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.026 - local.get $0 + local.get $1 i32.const 1 i32.sub i32.const 3 - local.get $0 + local.get $1 i32.const 3 - i32.le_u + i32.le_s select - local.set $0 - local.get $3 + local.set $1 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|027 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.026 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|027 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -16395,53 +16346,53 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.029 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $0 + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.029 - local.get $0 + local.get $1 i32.const 1 i32.sub i32.const 2 - local.get $0 + local.get $1 i32.const 2 - i32.le_u + i32.le_s select - local.set $0 - local.get $3 + local.set $1 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|030 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.029 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|030 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -16453,53 +16404,53 @@ unreachable end i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.032 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $0 + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.032 - local.get $0 + local.get $1 i32.const 1 i32.sub i32.const 100 - local.get $0 + local.get $1 i32.const 100 - i32.le_u + i32.le_s select - local.set $0 - local.get $3 + local.set $1 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|033 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 1 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.032 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|033 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 1 i32.ne if @@ -16511,47 +16462,47 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.035 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $1 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.035 - local.get $1 + local.get $0 i32.const 10 i32.sub - local.set $0 - local.get $3 - i32.load offset=4 local.set $1 + local.get $2 + i32.load offset=4 + local.set $0 loop $while-continue|036 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if - local.get $0 + local.get $1 i32.const 2 i32.shl - local.get $1 + local.get $0 i32.add i32.load i32.const 1 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.035 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|036 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const 1 i32.ne if @@ -16563,47 +16514,47 @@ unreachable end i32.const -1 - local.set $0 + local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.038 - local.get $3 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $1 + local.tee $0 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.038 - local.get $1 + local.get $0 i32.const 11 i32.sub - local.set $0 - local.get $3 - i32.load offset=4 local.set $1 + local.get $2 + i32.load offset=4 + local.set $0 loop $while-continue|039 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if - local.get $0 + local.get $1 i32.const 2 i32.shl - local.get $1 + local.get $0 i32.add i32.load i32.const 1 i32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.038 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|039 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -16615,52 +16566,52 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.const 9 call $~lib/typedarray/Uint32Array#subarray local.tee $4 i32.store offset=8 i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.041 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.041 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|042 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 3 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.041 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|042 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -16672,46 +16623,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.044 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.044 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|045 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 4 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.044 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|045 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 if i32.const 0 i32.const 1568 @@ -16721,46 +16672,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.047 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.047 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|048 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 5 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.047 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|048 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 1 i32.ne if @@ -16772,46 +16723,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.050 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.050 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|051 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 9 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.050 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|051 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -16823,46 +16774,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.053 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.053 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|054 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 10 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.053 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|054 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -16874,46 +16825,46 @@ unreachable end i32.const 0 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.056 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.eqz br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.056 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|057 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 11 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.056 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|057 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -16925,50 +16876,50 @@ unreachable end i32.const 1 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.059 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.const 1 i32.le_u i32.const 1 - local.get $2 + local.get $3 select br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.059 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|060 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 5 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.059 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|060 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 1 i32.ne if @@ -16980,50 +16931,50 @@ unreachable end i32.const 2 - local.set $0 - i32.const -1 local.set $1 + i32.const -1 + local.set $0 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.062 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.tee $3 i32.const 2 i32.le_u i32.const 1 - local.get $2 + local.get $3 select br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.062 local.get $4 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|063 - local.get $0 - local.get $2 + local.get $1 + local.get $3 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load i32.const 5 i32.eq br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.062 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|063 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -17061,43 +17012,41 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $2 i64.const 0 i64.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 i32.const 7728 i32.store - local.get $1 + local.get $2 i32.const 7740 i32.load - local.tee $1 + local.tee $3 call $~lib/typedarray/Int64Array#constructor local.tee $2 i32.store offset=4 loop $for-loop|0 - local.get $0 local.get $1 + local.get $3 i32.lt_s if local.get $2 - local.get $0 + local.get $1 i32.const 7728 - local.get $0 + local.get $1 call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - i32.const 0 - local.set $0 i32.const -1 local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 @@ -17650,30 +17599,23 @@ end i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - local.set $2 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.05 - local.get $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $2 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.05 local.get $2 - local.get $3 + local.get $2 i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 i32.const 0 i32.lt_s select @@ -17718,30 +17660,23 @@ end i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - local.set $2 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.011 - local.get $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $2 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.011 local.get $2 - local.get $3 + local.get $2 i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 i32.const 0 i32.lt_s select @@ -17787,51 +17722,56 @@ i32.const 1 global.set $~argumentsLength local.get $0 + local.tee $2 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $3 - local.set $2 + local.set $3 i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.017 - local.get $3 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.017 - local.get $2 + local.get $1 local.get $3 i32.add - local.get $3 + local.get $1 i32.const 1 i32.sub - local.get $2 - local.get $2 local.get $3 - i32.ge_s + local.get $1 + local.get $3 + i32.le_s select - local.get $2 + local.get $3 i32.const 0 i32.lt_s select local.set $1 - local.get $0 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|018 local.get $1 i32.const 0 i32.ge_s if local.get $1 + local.tee $0 i32.const 3 i32.shl - local.get $2 + local.get $3 i32.add i64.load i64.const 3 i64.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.017 - local.get $1 + local.get $0 i32.const 1 i32.sub local.set $1 @@ -17839,9 +17779,9 @@ end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -17855,8 +17795,7 @@ i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.019 - local.get $0 - local.tee $2 + local.get $2 i32.load offset=8 i32.const 3 i32.shr_u @@ -18636,43 +18575,41 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $2 i64.const 0 i64.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 i32.const 7728 i32.store - local.get $1 + local.get $2 i32.const 7740 i32.load - local.tee $1 + local.tee $3 call $~lib/typedarray/Uint64Array#constructor local.tee $2 i32.store offset=4 loop $for-loop|0 - local.get $0 local.get $1 + local.get $3 i32.lt_s if local.get $2 - local.get $0 + local.get $1 i32.const 7728 - local.get $0 + local.get $1 call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - i32.const 0 - local.set $0 i32.const -1 local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.0 @@ -19225,30 +19162,23 @@ end i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - local.set $2 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.05 - local.get $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $2 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.05 local.get $2 - local.get $3 + local.get $2 i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 i32.const 0 i32.lt_s select @@ -19293,30 +19223,23 @@ end i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - local.set $2 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.011 - local.get $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $2 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.011 local.get $2 - local.get $3 + local.get $2 i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 i32.const 0 i32.lt_s select @@ -19362,51 +19285,56 @@ i32.const 1 global.set $~argumentsLength local.get $0 + local.tee $2 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $3 - local.set $2 + local.set $3 i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.017 - local.get $3 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.017 - local.get $2 + local.get $1 local.get $3 i32.add - local.get $3 + local.get $1 i32.const 1 i32.sub - local.get $2 - local.get $2 local.get $3 - i32.ge_s + local.get $1 + local.get $3 + i32.le_s select - local.get $2 + local.get $3 i32.const 0 i32.lt_s select local.set $1 - local.get $0 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|018 local.get $1 i32.const 0 i32.ge_s if local.get $1 + local.tee $0 i32.const 3 i32.shl - local.get $2 + local.get $3 i32.add i64.load i64.const 3 i64.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.017 - local.get $1 + local.get $0 i32.const 1 i32.sub local.set $1 @@ -19414,9 +19342,9 @@ end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -19430,8 +19358,7 @@ i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.019 - local.get $0 - local.tee $2 + local.get $2 i32.load offset=8 i32.const 3 i32.shr_u @@ -20211,43 +20138,41 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $2 i64.const 0 i64.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 i32.const 7728 i32.store - local.get $1 + local.get $2 i32.const 7740 i32.load - local.tee $1 + local.tee $3 call $~lib/typedarray/Float32Array#constructor local.tee $2 i32.store offset=4 loop $for-loop|0 - local.get $0 local.get $1 + local.get $3 i32.lt_s if local.get $2 - local.get $0 + local.get $1 i32.const 7728 - local.get $0 + local.get $1 call $~lib/array/Array#__get f32.convert_i32_s call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - i32.const 0 - local.set $0 i32.const -1 local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 @@ -20802,30 +20727,23 @@ end i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - local.set $2 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.05 - local.get $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $2 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.05 local.get $2 - local.get $3 + local.get $2 i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 i32.const 0 i32.lt_s select @@ -20870,30 +20788,23 @@ end i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - local.set $2 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.011 - local.get $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $2 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.011 local.get $2 - local.get $3 + local.get $2 i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 i32.const 0 i32.lt_s select @@ -20939,51 +20850,56 @@ i32.const 1 global.set $~argumentsLength local.get $0 + local.tee $2 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $3 - local.set $2 + local.set $3 i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.017 - local.get $3 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.017 - local.get $2 + local.get $1 local.get $3 i32.add - local.get $3 + local.get $1 i32.const 1 i32.sub - local.get $2 - local.get $2 local.get $3 - i32.ge_s + local.get $1 + local.get $3 + i32.le_s select - local.get $2 + local.get $3 i32.const 0 i32.lt_s select local.set $1 - local.get $0 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|018 local.get $1 i32.const 0 i32.ge_s if local.get $1 + local.tee $0 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add f32.load f32.const 3 f32.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.017 - local.get $1 + local.get $0 i32.const 1 i32.sub local.set $1 @@ -20991,9 +20907,9 @@ end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -21007,8 +20923,7 @@ i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.019 - local.get $0 - local.tee $2 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u @@ -21788,43 +21703,41 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $2 i64.const 0 i64.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 i32.const 7728 i32.store - local.get $1 + local.get $2 i32.const 7740 i32.load - local.tee $1 + local.tee $3 call $~lib/typedarray/Float64Array#constructor local.tee $2 i32.store offset=4 loop $for-loop|0 - local.get $0 local.get $1 + local.get $3 i32.lt_s if local.get $2 - local.get $0 + local.get $1 i32.const 7728 - local.get $0 + local.get $1 call $~lib/array/Array#__get f64.convert_i32_s call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - i32.const 0 - local.set $0 i32.const -1 local.set $1 block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 @@ -22379,30 +22292,23 @@ end i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - local.set $2 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.05 - local.get $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $2 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.05 local.get $2 - local.get $3 + local.get $2 i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 i32.const 0 i32.lt_s select @@ -22447,30 +22353,23 @@ end i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - local.set $2 i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.011 - local.get $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $2 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.011 local.get $2 - local.get $3 + local.get $2 i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 i32.const 0 i32.lt_s select @@ -22516,51 +22415,56 @@ i32.const 1 global.set $~argumentsLength local.get $0 + local.tee $2 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $3 - local.set $2 + local.set $3 i32.const -1 - local.set $1 + local.set $0 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.017 - local.get $3 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $1 i32.eqz br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.017 - local.get $2 + local.get $1 local.get $3 i32.add - local.get $3 + local.get $1 i32.const 1 i32.sub - local.get $2 - local.get $2 local.get $3 - i32.ge_s + local.get $1 + local.get $3 + i32.le_s select - local.get $2 + local.get $3 i32.const 0 i32.lt_s select local.set $1 - local.get $0 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 loop $while-continue|018 local.get $1 i32.const 0 i32.ge_s if local.get $1 + local.tee $0 i32.const 3 i32.shl - local.get $2 + local.get $3 i32.add f64.load f64.const 3 f64.eq br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.017 - local.get $1 + local.get $0 i32.const 1 i32.sub local.set $1 @@ -22568,9 +22472,9 @@ end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const 3 i32.ne if @@ -22584,8 +22488,7 @@ i32.const -1 local.set $1 block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.019 - local.get $0 - local.tee $2 + local.get $2 i32.load offset=8 i32.const 3 i32.shr_u @@ -26487,6 +26390,7 @@ ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) local.get $2 i32.eqz if @@ -26625,68 +26529,69 @@ local.get $1 i32.const 1 i32.eq - if (result i32) + if local.get $0 i32.const 101 i32.store16 offset=2 local.get $0 i32.const 4 i32.add + local.tee $2 local.get $3 i32.const 1 i32.sub - local.tee $1 + local.tee $0 i32.const 0 i32.lt_s - local.tee $2 + local.tee $3 if i32.const 0 - local.get $1 + local.get $0 i32.sub - local.set $1 + local.set $0 end - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.const 100000 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 100 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 10 i32.ge_u i32.const 1 i32.add else - local.get $1 + local.get $0 i32.const 10000 i32.ge_u i32.const 3 i32.add - local.get $1 + local.get $0 i32.const 1000 i32.ge_u i32.add end else - local.get $1 + local.get $0 i32.const 10000000 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 1000000 i32.ge_u i32.const 6 i32.add else - local.get $1 + local.get $0 i32.const 1000000000 i32.ge_u i32.const 8 i32.add - local.get $1 + local.get $0 i32.const 100000000 i32.ge_u i32.add @@ -26696,13 +26601,12 @@ i32.add local.tee $1 call $~lib/util/number/utoa32_dec_lut - local.get $0 + local.get $2 i32.const 45 i32.const 43 - local.get $2 + local.get $3 select - i32.store16 offset=4 - local.get $1 + i32.store16 else local.get $0 i32.const 4 @@ -26723,19 +26627,20 @@ local.get $0 local.get $2 i32.add - local.tee $2 + local.tee $0 i32.const 101 i32.store16 offset=2 - local.get $2 + local.get $0 i32.const 4 i32.add + local.tee $4 local.get $3 i32.const 1 i32.sub local.tee $0 i32.const 0 i32.lt_s - local.tee $3 + local.tee $2 if i32.const 0 local.get $0 @@ -26793,16 +26698,18 @@ i32.add local.tee $0 call $~lib/util/number/utoa32_dec_lut - local.get $2 + local.get $4 i32.const 45 i32.const 43 - local.get $3 + local.get $2 select - i32.store16 offset=4 + i32.store16 local.get $0 local.get $1 i32.add + local.set $1 end + local.get $1 i32.const 2 i32.add end @@ -26815,16 +26722,15 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i64) + (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) + (local $10 i64) (local $11 i64) (local $12 i64) (local $13 i64) (local $14 i64) (local $15 i64) - (local $16 i64) local.get $1 f64.const 0 f64.lt @@ -26845,19 +26751,19 @@ i64.const 52 i64.shr_u i32.wrap_i64 - local.tee $8 + local.tee $7 i32.const 1 - local.get $8 + local.get $7 select i32.const 1075 i32.sub - local.tee $9 + local.tee $8 i32.const 1 i32.sub local.get $2 i64.const 4503599627370495 i64.and - local.get $8 + local.get $7 i32.const 0 i32.ne i64.extend_i32_u @@ -26872,11 +26778,11 @@ local.tee $4 i64.clz i32.wrap_i64 - local.tee $8 + local.tee $7 i32.sub - local.set $10 + local.set $9 local.get $4 - local.get $8 + local.get $7 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus @@ -26886,25 +26792,25 @@ i64.eq i32.const 1 i32.add - local.tee $8 + local.tee $7 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $9 local.get $8 + local.get $7 i32.sub - local.get $10 + local.get $9 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $10 + local.get $9 global.set $~lib/util/number/_exp i32.const 348 i32.const -61 global.get $~lib/util/number/_exp - local.tee $8 + local.tee $7 i32.sub f64.convert_i32_s f64.const 0.30102999566398114 @@ -26913,9 +26819,9 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $9 + local.tee $8 local.get $1 - local.get $9 + local.get $8 f64.convert_i32_s f64.ne i32.add @@ -26923,18 +26829,18 @@ i32.shr_s i32.const 1 i32.add - local.tee $9 + local.tee $8 i32.const 3 i32.shl - local.tee $10 + local.tee $9 i32.sub global.set $~lib/util/number/_K - local.get $10 + local.get $9 i32.const 9864 i32.add i64.load global.set $~lib/util/number/_frc_pow - local.get $9 + local.get $8 i32.const 1 i32.shl i32.const 10560 @@ -26948,38 +26854,37 @@ local.tee $2 i64.const 4294967295 i64.and - local.set $11 + local.set $5 local.get $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $4 global.get $~lib/util/number/_frc_pow - local.tee $7 + local.tee $10 i64.const 4294967295 i64.and - local.tee $12 - local.tee $2 + local.tee $11 i64.mul - local.get $2 + local.get $5 local.get $11 i64.mul i64.const 32 i64.shr_u i64.add - local.set $13 + local.set $12 global.get $~lib/util/number/_frc_plus - local.tee $4 + local.tee $2 i64.const 4294967295 i64.and - local.set $2 - local.get $4 + local.set $13 + local.get $2 i64.const 32 i64.shr_u local.tee $6 - local.get $12 + local.get $11 i64.mul - local.get $2 - local.get $12 + local.get $11 + local.get $13 i64.mul i64.const 32 i64.shr_u @@ -26989,41 +26894,34 @@ local.tee $15 i64.const 4294967295 i64.and - local.set $4 + local.set $2 local.get $15 i64.const 32 i64.shr_u local.tee $15 - local.get $12 + local.get $11 i64.mul - local.get $4 - local.get $12 + local.get $2 + local.get $11 i64.mul i64.const 32 i64.shr_u i64.add - local.set $12 - local.get $3 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $0 - local.get $5 - local.get $7 + local.set $11 + local.get $6 + local.get $10 i64.const 32 i64.shr_u - local.tee $16 - local.tee $7 + local.tee $10 i64.mul - local.get $13 + local.get $14 i64.const 32 i64.shr_u i64.add - local.get $7 - local.get $11 - i64.mul + local.get $10 local.get $13 + i64.mul + local.get $14 i64.const 4294967295 i64.and i64.add @@ -27032,17 +26930,26 @@ i64.const 32 i64.shr_u i64.add - local.get $6 - local.get $16 + i64.const 1 + i64.sub + local.set $6 + local.get $3 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $0 + local.get $4 + local.get $10 i64.mul - local.get $14 + local.get $12 i64.const 32 i64.shr_u i64.add - local.get $2 - local.get $16 + local.get $5 + local.get $10 i64.mul - local.get $14 + local.get $12 i64.const 4294967295 i64.and i64.add @@ -27051,26 +26958,24 @@ i64.const 32 i64.shr_u i64.add - i64.const 1 - i64.sub - local.tee $2 + local.get $6 global.get $~lib/util/number/_exp_pow - local.get $8 + local.get $7 i32.add i32.const -64 i32.sub - local.get $2 + local.get $6 + local.get $10 local.get $15 - local.get $16 i64.mul - local.get $12 + local.get $11 i64.const 32 i64.shr_u i64.add - local.get $4 - local.get $16 + local.get $2 + local.get $10 i64.mul - local.get $12 + local.get $11 i64.const 4294967295 i64.and i64.add @@ -29137,8 +29042,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) - (local $13 i32) + (local $12 i32) + (local $13 i64) local.get $1 i32.const 48 i32.le_s @@ -29163,7 +29068,7 @@ end local.get $0 i32.load8_s - local.set $1 + local.set $5 local.get $0 i32.load8_s offset=1 local.set $3 @@ -29171,49 +29076,50 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $5 + local.get $5 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $4 + local.tee $1 select i32.store8 local.get $0 i32.load8_s offset=2 - local.set $5 + local.set $4 i32.const 2 global.set $~argumentsLength - local.get $0 local.get $5 - local.get $1 local.get $3 - local.get $4 - select - local.tee $1 local.get $1 - local.get $5 + select + local.tee $3 + local.get $4 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $3 + local.set $1 + local.get $0 + local.get $4 + local.get $3 + local.get $1 select i32.store8 offset=1 local.get $0 - local.get $1 - local.get $5 local.get $3 + local.get $4 + local.get $1 select i32.store8 offset=2 end local.get $0 i32.load8_s - local.set $1 + local.set $4 local.get $0 i32.load8_s offset=1 local.set $3 @@ -29221,21 +29127,21 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $4 + local.get $4 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $2 + local.tee $1 select i32.store8 local.get $0 - local.get $1 + local.get $4 local.get $3 - local.get $2 + local.get $1 select i32.store8 offset=1 return @@ -29254,43 +29160,43 @@ local.get $1 i32.clz i32.sub - local.tee $6 + local.tee $8 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $8 + local.set $5 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $8 + local.get $5 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $9 + local.tee $10 local.get $7 i32.add - local.set $10 + local.set $11 loop $for-loop|1 - local.get $5 local.get $6 + local.get $8 i32.lt_u if - local.get $5 + local.get $6 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|1 end end @@ -29304,84 +29210,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $11 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $8 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $1 + local.tee $7 i32.const 1 i32.add - local.tee $5 + local.tee $1 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $8 + local.get $9 i32.const 31 - local.get $8 + local.get $9 i32.const 31 i32.lt_s select - local.tee $1 - local.get $5 + local.tee $7 + local.get $1 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $1 - local.get $8 + local.get $7 + local.get $9 i32.lt_s if local.get $0 - local.get $1 + local.get $7 i32.const 1 i32.add - local.tee $6 - local.get $8 + local.tee $5 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $5 - local.get $6 + local.tee $6 + local.get $5 i32.sub i32.const 1 i32.add - local.tee $7 + local.tee $8 i32.const 32 i32.lt_s if local.get $0 - local.get $6 - local.get $8 - local.get $6 + local.get $5 + local.get $9 + local.get $5 i32.const 31 i32.add - local.tee $5 - local.get $5 - local.get $8 + local.tee $1 + local.get $1 + local.get $9 i32.gt_s select - local.tee $5 - local.get $7 + local.tee $6 + local.get $8 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $6 + local.get $5 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $8 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $12 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -29391,30 +29297,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $7 + local.set $1 loop $for-loop|3 + local.get $1 local.get $4 - local.get $7 - i32.gt_u + i32.lt_u if local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load - local.tee $13 + local.tee $8 i32.const -1 i32.ne if local.get $0 - local.get $13 - local.get $10 + local.get $8 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -29423,16 +29329,16 @@ i32.load i32.const 1 i32.add - local.get $1 - local.get $11 + local.get $7 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $13 + local.get $8 local.set $3 end local.get $4 @@ -29442,8 +29348,8 @@ br $for-loop|3 end end - local.get $9 - local.get $7 + local.get $10 + local.get $1 i32.const 2 i32.shl local.tee $4 @@ -29451,15 +29357,15 @@ local.get $3 i32.store local.get $4 - local.get $10 + local.get $11 i32.add - local.get $1 + local.get $7 i32.store - local.get $6 - local.set $3 local.get $5 - local.set $1 - local.get $7 + local.set $3 + local.get $6 + local.set $7 + local.get $1 local.set $4 br $while-continue|2 end @@ -29470,7 +29376,7 @@ local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load local.tee $1 @@ -29482,13 +29388,13 @@ local.get $4 i32.const 2 i32.shl - local.get $10 + local.get $11 i32.add i32.load i32.const 1 i32.add - local.get $8 - local.get $11 + local.get $9 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns end @@ -29499,9 +29405,9 @@ br $for-loop|4 end end - local.get $11 + local.get $12 call $~lib/rt/tlsf/__free - local.get $9 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) @@ -29916,8 +29822,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) - (local $13 i32) + (local $12 i32) + (local $13 i64) local.get $1 i32.const 48 i32.le_s @@ -29942,7 +29848,7 @@ end local.get $0 i32.load8_u - local.set $1 + local.set $5 local.get $0 i32.load8_u offset=1 local.set $3 @@ -29950,49 +29856,50 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $5 + local.get $5 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $4 + local.tee $1 select i32.store8 local.get $0 i32.load8_u offset=2 - local.set $5 + local.set $4 i32.const 2 global.set $~argumentsLength - local.get $0 local.get $5 - local.get $1 local.get $3 - local.get $4 - select - local.tee $1 local.get $1 - local.get $5 + select + local.tee $3 + local.get $4 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $3 + local.set $1 + local.get $0 + local.get $4 + local.get $3 + local.get $1 select i32.store8 offset=1 local.get $0 - local.get $1 - local.get $5 local.get $3 + local.get $4 + local.get $1 select i32.store8 offset=2 end local.get $0 i32.load8_u - local.set $1 + local.set $4 local.get $0 i32.load8_u offset=1 local.set $3 @@ -30000,21 +29907,21 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $4 + local.get $4 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $2 + local.tee $1 select i32.store8 local.get $0 - local.get $1 + local.get $4 local.get $3 - local.get $2 + local.get $1 select i32.store8 offset=1 return @@ -30033,43 +29940,43 @@ local.get $1 i32.clz i32.sub - local.tee $6 + local.tee $8 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $8 + local.set $5 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $8 + local.get $5 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $9 + local.tee $10 local.get $7 i32.add - local.set $10 + local.set $11 loop $for-loop|1 - local.get $5 local.get $6 + local.get $8 i32.lt_u if - local.get $5 + local.get $6 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|1 end end @@ -30083,84 +29990,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $11 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $8 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $1 + local.tee $7 i32.const 1 i32.add - local.tee $5 + local.tee $1 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $8 + local.get $9 i32.const 31 - local.get $8 + local.get $9 i32.const 31 i32.lt_s select - local.tee $1 - local.get $5 + local.tee $7 + local.get $1 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $1 - local.get $8 + local.get $7 + local.get $9 i32.lt_s if local.get $0 - local.get $1 + local.get $7 i32.const 1 i32.add - local.tee $6 - local.get $8 + local.tee $5 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $5 - local.get $6 + local.tee $6 + local.get $5 i32.sub i32.const 1 i32.add - local.tee $7 + local.tee $8 i32.const 32 i32.lt_s if local.get $0 - local.get $6 - local.get $8 - local.get $6 + local.get $5 + local.get $9 + local.get $5 i32.const 31 i32.add - local.tee $5 - local.get $5 - local.get $8 + local.tee $1 + local.get $1 + local.get $9 i32.gt_s select - local.tee $5 - local.get $7 + local.tee $6 + local.get $8 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $6 + local.get $5 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $8 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $12 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -30170,30 +30077,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $7 + local.set $1 loop $for-loop|3 + local.get $1 local.get $4 - local.get $7 - i32.gt_u + i32.lt_u if local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load - local.tee $13 + local.tee $8 i32.const -1 i32.ne if local.get $0 - local.get $13 - local.get $10 + local.get $8 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -30202,16 +30109,16 @@ i32.load i32.const 1 i32.add - local.get $1 - local.get $11 + local.get $7 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $13 + local.get $8 local.set $3 end local.get $4 @@ -30221,8 +30128,8 @@ br $for-loop|3 end end - local.get $9 - local.get $7 + local.get $10 + local.get $1 i32.const 2 i32.shl local.tee $4 @@ -30230,15 +30137,15 @@ local.get $3 i32.store local.get $4 - local.get $10 + local.get $11 i32.add - local.get $1 + local.get $7 i32.store - local.get $6 - local.set $3 local.get $5 - local.set $1 - local.get $7 + local.set $3 + local.get $6 + local.set $7 + local.get $1 local.set $4 br $while-continue|2 end @@ -30249,7 +30156,7 @@ local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load local.tee $1 @@ -30261,13 +30168,13 @@ local.get $4 i32.const 2 i32.shl - local.get $10 + local.get $11 i32.add i32.load i32.const 1 i32.add - local.get $8 - local.get $11 + local.get $9 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns end @@ -30278,9 +30185,9 @@ br $for-loop|4 end end - local.get $11 + local.get $12 call $~lib/rt/tlsf/__free - local.get $9 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) @@ -30746,8 +30653,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) - (local $13 i32) + (local $12 i32) + (local $13 i64) local.get $1 i32.const 48 i32.le_s @@ -30772,7 +30679,7 @@ end local.get $0 i32.load16_s - local.set $1 + local.set $5 local.get $0 i32.load16_s offset=2 local.set $3 @@ -30780,49 +30687,50 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $5 + local.get $5 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $4 + local.tee $1 select i32.store16 local.get $0 i32.load16_s offset=4 - local.set $5 + local.set $4 i32.const 2 global.set $~argumentsLength - local.get $0 local.get $5 - local.get $1 local.get $3 - local.get $4 - select - local.tee $1 local.get $1 - local.get $5 + select + local.tee $3 + local.get $4 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $3 + local.set $1 + local.get $0 + local.get $4 + local.get $3 + local.get $1 select i32.store16 offset=2 local.get $0 - local.get $1 - local.get $5 local.get $3 + local.get $4 + local.get $1 select i32.store16 offset=4 end local.get $0 i32.load16_s - local.set $1 + local.set $4 local.get $0 i32.load16_s offset=2 local.set $3 @@ -30830,21 +30738,21 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $4 + local.get $4 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $2 + local.tee $1 select i32.store16 local.get $0 - local.get $1 + local.get $4 local.get $3 - local.get $2 + local.get $1 select i32.store16 offset=2 return @@ -30863,43 +30771,43 @@ local.get $1 i32.clz i32.sub - local.tee $6 + local.tee $8 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $8 + local.set $5 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $8 + local.get $5 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $9 + local.tee $10 local.get $7 i32.add - local.set $10 + local.set $11 loop $for-loop|1 - local.get $5 local.get $6 + local.get $8 i32.lt_u if - local.get $5 + local.get $6 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|1 end end @@ -30915,84 +30823,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $11 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $8 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $1 + local.tee $7 i32.const 1 i32.add - local.tee $5 + local.tee $1 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $8 + local.get $9 i32.const 31 - local.get $8 + local.get $9 i32.const 31 i32.lt_s select - local.tee $1 - local.get $5 + local.tee $7 + local.get $1 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $1 - local.get $8 + local.get $7 + local.get $9 i32.lt_s if local.get $0 - local.get $1 + local.get $7 i32.const 1 i32.add - local.tee $6 - local.get $8 + local.tee $5 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $5 - local.get $6 + local.tee $6 + local.get $5 i32.sub i32.const 1 i32.add - local.tee $7 + local.tee $8 i32.const 32 i32.lt_s if local.get $0 - local.get $6 - local.get $8 - local.get $6 + local.get $5 + local.get $9 + local.get $5 i32.const 31 i32.add - local.tee $5 - local.get $5 - local.get $8 + local.tee $1 + local.get $1 + local.get $9 i32.gt_s select - local.tee $5 - local.get $7 + local.tee $6 + local.get $8 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $6 + local.get $5 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $8 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $12 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -31002,30 +30910,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $7 + local.set $1 loop $for-loop|3 + local.get $1 local.get $4 - local.get $7 - i32.gt_u + i32.lt_u if local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load - local.tee $13 + local.tee $8 i32.const -1 i32.ne if local.get $0 - local.get $13 - local.get $10 + local.get $8 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -31034,16 +30942,16 @@ i32.load i32.const 1 i32.add - local.get $1 - local.get $11 + local.get $7 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $13 + local.get $8 local.set $3 end local.get $4 @@ -31053,8 +30961,8 @@ br $for-loop|3 end end - local.get $9 - local.get $7 + local.get $10 + local.get $1 i32.const 2 i32.shl local.tee $4 @@ -31062,15 +30970,15 @@ local.get $3 i32.store local.get $4 - local.get $10 + local.get $11 i32.add - local.get $1 + local.get $7 i32.store - local.get $6 - local.set $3 local.get $5 - local.set $1 - local.get $7 + local.set $3 + local.get $6 + local.set $7 + local.get $1 local.set $4 br $while-continue|2 end @@ -31081,7 +30989,7 @@ local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load local.tee $1 @@ -31093,13 +31001,13 @@ local.get $4 i32.const 2 i32.shl - local.get $10 + local.get $11 i32.add i32.load i32.const 1 i32.add - local.get $8 - local.get $11 + local.get $9 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns end @@ -31110,9 +31018,9 @@ br $for-loop|4 end end - local.get $11 + local.get $12 call $~lib/rt/tlsf/__free - local.get $9 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) @@ -31568,8 +31476,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) - (local $13 i32) + (local $12 i32) + (local $13 i64) local.get $1 i32.const 48 i32.le_s @@ -31594,7 +31502,7 @@ end local.get $0 i32.load16_u - local.set $1 + local.set $5 local.get $0 i32.load16_u offset=2 local.set $3 @@ -31602,49 +31510,50 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $5 + local.get $5 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $4 + local.tee $1 select i32.store16 local.get $0 i32.load16_u offset=4 - local.set $5 + local.set $4 i32.const 2 global.set $~argumentsLength - local.get $0 local.get $5 - local.get $1 local.get $3 - local.get $4 - select - local.tee $1 local.get $1 - local.get $5 + select + local.tee $3 + local.get $4 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $3 + local.set $1 + local.get $0 + local.get $4 + local.get $3 + local.get $1 select i32.store16 offset=2 local.get $0 - local.get $1 - local.get $5 local.get $3 + local.get $4 + local.get $1 select i32.store16 offset=4 end local.get $0 i32.load16_u - local.set $1 + local.set $4 local.get $0 i32.load16_u offset=2 local.set $3 @@ -31652,21 +31561,21 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $4 + local.get $4 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $2 + local.tee $1 select i32.store16 local.get $0 - local.get $1 + local.get $4 local.get $3 - local.get $2 + local.get $1 select i32.store16 offset=2 return @@ -31685,43 +31594,43 @@ local.get $1 i32.clz i32.sub - local.tee $6 + local.tee $8 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $8 + local.set $5 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $8 + local.get $5 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $9 + local.tee $10 local.get $7 i32.add - local.set $10 + local.set $11 loop $for-loop|1 - local.get $5 local.get $6 + local.get $8 i32.lt_u if - local.get $5 + local.get $6 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|1 end end @@ -31737,84 +31646,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $11 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $8 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $1 + local.tee $7 i32.const 1 i32.add - local.tee $5 + local.tee $1 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $8 + local.get $9 i32.const 31 - local.get $8 + local.get $9 i32.const 31 i32.lt_s select - local.tee $1 - local.get $5 + local.tee $7 + local.get $1 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $1 - local.get $8 + local.get $7 + local.get $9 i32.lt_s if local.get $0 - local.get $1 + local.get $7 i32.const 1 i32.add - local.tee $6 - local.get $8 + local.tee $5 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $5 - local.get $6 + local.tee $6 + local.get $5 i32.sub i32.const 1 i32.add - local.tee $7 + local.tee $8 i32.const 32 i32.lt_s if local.get $0 - local.get $6 - local.get $8 - local.get $6 + local.get $5 + local.get $9 + local.get $5 i32.const 31 i32.add - local.tee $5 - local.get $5 - local.get $8 + local.tee $1 + local.get $1 + local.get $9 i32.gt_s select - local.tee $5 - local.get $7 + local.tee $6 + local.get $8 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $6 + local.get $5 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $8 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $12 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -31824,30 +31733,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $7 + local.set $1 loop $for-loop|3 + local.get $1 local.get $4 - local.get $7 - i32.gt_u + i32.lt_u if local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load - local.tee $13 + local.tee $8 i32.const -1 i32.ne if local.get $0 - local.get $13 - local.get $10 + local.get $8 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -31856,16 +31765,16 @@ i32.load i32.const 1 i32.add - local.get $1 - local.get $11 + local.get $7 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $13 + local.get $8 local.set $3 end local.get $4 @@ -31875,8 +31784,8 @@ br $for-loop|3 end end - local.get $9 - local.get $7 + local.get $10 + local.get $1 i32.const 2 i32.shl local.tee $4 @@ -31884,15 +31793,15 @@ local.get $3 i32.store local.get $4 - local.get $10 + local.get $11 i32.add - local.get $1 + local.get $7 i32.store - local.get $6 - local.set $3 local.get $5 - local.set $1 - local.get $7 + local.set $3 + local.get $6 + local.set $7 + local.get $1 local.set $4 br $while-continue|2 end @@ -31903,7 +31812,7 @@ local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load local.tee $1 @@ -31915,13 +31824,13 @@ local.get $4 i32.const 2 i32.shl - local.get $10 + local.get $11 i32.add i32.load i32.const 1 i32.add - local.get $8 - local.get $11 + local.get $9 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns end @@ -31932,9 +31841,9 @@ br $for-loop|4 end end - local.get $11 + local.get $12 call $~lib/rt/tlsf/__free - local.get $9 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) @@ -32400,8 +32309,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) - (local $13 i32) + (local $12 i32) + (local $13 i64) local.get $1 i32.const 48 i32.le_s @@ -32426,7 +32335,7 @@ end local.get $0 i32.load - local.set $1 + local.set $5 local.get $0 i32.load offset=4 local.set $3 @@ -32434,49 +32343,50 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $5 + local.get $5 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $4 + local.tee $1 select i32.store local.get $0 i32.load offset=8 - local.set $5 + local.set $4 i32.const 2 global.set $~argumentsLength - local.get $0 local.get $5 - local.get $1 local.get $3 - local.get $4 - select - local.tee $1 local.get $1 - local.get $5 + select + local.tee $3 + local.get $4 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $3 + local.set $1 + local.get $0 + local.get $4 + local.get $3 + local.get $1 select i32.store offset=4 local.get $0 - local.get $1 - local.get $5 local.get $3 + local.get $4 + local.get $1 select i32.store offset=8 end local.get $0 i32.load - local.set $1 + local.set $4 local.get $0 i32.load offset=4 local.set $3 @@ -32484,21 +32394,21 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $4 + local.get $4 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $2 + local.tee $1 select i32.store local.get $0 - local.get $1 + local.get $4 local.get $3 - local.get $2 + local.get $1 select i32.store offset=4 return @@ -32517,43 +32427,43 @@ local.get $1 i32.clz i32.sub - local.tee $6 + local.tee $8 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $8 + local.set $5 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $8 + local.get $5 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $9 + local.tee $10 local.get $7 i32.add - local.set $10 + local.set $11 loop $for-loop|1 - local.get $5 local.get $6 + local.get $8 i32.lt_u if - local.get $5 + local.get $6 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|1 end end @@ -32569,84 +32479,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $11 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $8 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $1 + local.tee $7 i32.const 1 i32.add - local.tee $5 + local.tee $1 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $8 + local.get $9 i32.const 31 - local.get $8 + local.get $9 i32.const 31 i32.lt_s select - local.tee $1 - local.get $5 + local.tee $7 + local.get $1 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $1 - local.get $8 + local.get $7 + local.get $9 i32.lt_s if local.get $0 - local.get $1 + local.get $7 i32.const 1 i32.add - local.tee $6 - local.get $8 + local.tee $5 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $5 - local.get $6 + local.tee $6 + local.get $5 i32.sub i32.const 1 i32.add - local.tee $7 + local.tee $8 i32.const 32 i32.lt_s if local.get $0 - local.get $6 - local.get $8 - local.get $6 + local.get $5 + local.get $9 + local.get $5 i32.const 31 i32.add - local.tee $5 - local.get $5 - local.get $8 + local.tee $1 + local.get $1 + local.get $9 i32.gt_s select - local.tee $5 - local.get $7 + local.tee $6 + local.get $8 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $6 + local.get $5 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $8 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $12 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -32656,30 +32566,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $7 + local.set $1 loop $for-loop|3 + local.get $1 local.get $4 - local.get $7 - i32.gt_u + i32.lt_u if local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load - local.tee $13 + local.tee $8 i32.const -1 i32.ne if local.get $0 - local.get $13 - local.get $10 + local.get $8 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -32688,16 +32598,16 @@ i32.load i32.const 1 i32.add - local.get $1 - local.get $11 + local.get $7 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $13 + local.get $8 local.set $3 end local.get $4 @@ -32707,8 +32617,8 @@ br $for-loop|3 end end - local.get $9 - local.get $7 + local.get $10 + local.get $1 i32.const 2 i32.shl local.tee $4 @@ -32716,15 +32626,15 @@ local.get $3 i32.store local.get $4 - local.get $10 + local.get $11 i32.add - local.get $1 + local.get $7 i32.store - local.get $6 - local.set $3 local.get $5 - local.set $1 - local.get $7 + local.set $3 + local.get $6 + local.set $7 + local.get $1 local.set $4 br $while-continue|2 end @@ -32735,7 +32645,7 @@ local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load local.tee $1 @@ -32747,13 +32657,13 @@ local.get $4 i32.const 2 i32.shl - local.get $10 + local.get $11 i32.add i32.load i32.const 1 i32.add - local.get $8 - local.get $11 + local.get $9 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns end @@ -32764,9 +32674,9 @@ br $for-loop|4 end end - local.get $11 + local.get $12 call $~lib/rt/tlsf/__free - local.get $9 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) @@ -33216,8 +33126,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) - (local $13 i32) + (local $12 i32) + (local $13 i64) local.get $1 i32.const 48 i32.le_s @@ -33242,7 +33152,7 @@ end local.get $0 i32.load - local.set $1 + local.set $5 local.get $0 i32.load offset=4 local.set $3 @@ -33250,49 +33160,50 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $5 + local.get $5 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $4 + local.tee $1 select i32.store local.get $0 i32.load offset=8 - local.set $5 + local.set $4 i32.const 2 global.set $~argumentsLength - local.get $0 local.get $5 - local.get $1 local.get $3 - local.get $4 - select - local.tee $1 local.get $1 - local.get $5 + select + local.tee $3 + local.get $4 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $3 + local.set $1 + local.get $0 + local.get $4 + local.get $3 + local.get $1 select i32.store offset=4 local.get $0 - local.get $1 - local.get $5 local.get $3 + local.get $4 + local.get $1 select i32.store offset=8 end local.get $0 i32.load - local.set $1 + local.set $4 local.get $0 i32.load offset=4 local.set $3 @@ -33300,21 +33211,21 @@ global.set $~argumentsLength local.get $0 local.get $3 - local.get $1 - local.get $1 + local.get $4 + local.get $4 local.get $3 local.get $2 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.tee $2 + local.tee $1 select i32.store local.get $0 - local.get $1 + local.get $4 local.get $3 - local.get $2 + local.get $1 select i32.store offset=4 return @@ -33333,43 +33244,43 @@ local.get $1 i32.clz i32.sub - local.tee $6 + local.tee $8 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $8 + local.set $5 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $8 + local.get $5 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $9 + local.tee $10 local.get $7 i32.add - local.set $10 + local.set $11 loop $for-loop|1 - local.get $5 local.get $6 + local.get $8 i32.lt_u if - local.get $5 + local.get $6 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|1 end end @@ -33385,84 +33296,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $11 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $8 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $1 + local.tee $7 i32.const 1 i32.add - local.tee $5 + local.tee $1 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $8 + local.get $9 i32.const 31 - local.get $8 + local.get $9 i32.const 31 i32.lt_s select - local.tee $1 - local.get $5 + local.tee $7 + local.get $1 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $1 - local.get $8 + local.get $7 + local.get $9 i32.lt_s if local.get $0 - local.get $1 + local.get $7 i32.const 1 i32.add - local.tee $6 - local.get $8 + local.tee $5 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $5 - local.get $6 + local.tee $6 + local.get $5 i32.sub i32.const 1 i32.add - local.tee $7 + local.tee $8 i32.const 32 i32.lt_s if local.get $0 - local.get $6 - local.get $8 - local.get $6 + local.get $5 + local.get $9 + local.get $5 i32.const 31 i32.add - local.tee $5 - local.get $5 - local.get $8 + local.tee $1 + local.get $1 + local.get $9 i32.gt_s select - local.tee $5 - local.get $7 + local.tee $6 + local.get $8 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $6 + local.get $5 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $8 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $12 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -33472,30 +33383,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $7 + local.set $1 loop $for-loop|3 + local.get $1 local.get $4 - local.get $7 - i32.gt_u + i32.lt_u if local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load - local.tee $13 + local.tee $8 i32.const -1 i32.ne if local.get $0 - local.get $13 - local.get $10 + local.get $8 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -33504,16 +33415,16 @@ i32.load i32.const 1 i32.add - local.get $1 - local.get $11 + local.get $7 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $9 + local.get $10 i32.add i32.const -1 i32.store - local.get $13 + local.get $8 local.set $3 end local.get $4 @@ -33523,8 +33434,8 @@ br $for-loop|3 end end - local.get $9 - local.get $7 + local.get $10 + local.get $1 i32.const 2 i32.shl local.tee $4 @@ -33532,15 +33443,15 @@ local.get $3 i32.store local.get $4 - local.get $10 + local.get $11 i32.add - local.get $1 + local.get $7 i32.store - local.get $6 - local.set $3 local.get $5 - local.set $1 - local.get $7 + local.set $3 + local.get $6 + local.set $7 + local.get $1 local.set $4 br $while-continue|2 end @@ -33551,7 +33462,7 @@ local.get $4 i32.const 2 i32.shl - local.get $9 + local.get $10 i32.add i32.load local.tee $1 @@ -33563,13 +33474,13 @@ local.get $4 i32.const 2 i32.shl - local.get $10 + local.get $11 i32.add i32.load i32.const 1 i32.add - local.get $8 - local.get $11 + local.get $9 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns end @@ -33580,9 +33491,9 @@ br $for-loop|4 end end - local.get $11 + local.get $12 call $~lib/rt/tlsf/__free - local.get $9 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) @@ -34035,13 +33946,13 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i64) - (local $11 i64) + (local $8 i64) + (local $9 i32) + (local $10 i32) + (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i32) + (local $13 i64) + (local $14 i64) (local $15 i32) local.get $1 i32.const 48 @@ -34067,17 +33978,17 @@ end local.get $0 i64.load - local.set $11 + local.set $13 local.get $0 i64.load offset=8 - local.set $10 + local.set $14 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $10 - local.get $11 - local.get $11 - local.get $10 + local.get $14 + local.get $13 + local.get $13 + local.get $14 local.get $2 i32.load call_indirect $0 (type $i64_i64_=>_i32) @@ -34088,46 +33999,47 @@ i64.store local.get $0 i64.load offset=16 - local.set $9 + local.set $8 i32.const 2 global.set $~argumentsLength - local.get $0 - local.get $9 - local.get $11 - local.get $10 + local.get $13 + local.get $14 local.get $1 select - local.tee $10 - local.get $10 - local.get $9 + local.tee $13 + local.get $8 local.get $2 i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s - local.tee $1 + local.set $1 + local.get $0 + local.get $8 + local.get $13 + local.get $1 select i64.store offset=8 local.get $0 - local.get $10 - local.get $9 + local.get $13 + local.get $8 local.get $1 select i64.store offset=16 end local.get $0 i64.load - local.set $10 + local.set $8 local.get $0 i64.load offset=8 - local.set $9 + local.set $13 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $9 - local.get $10 - local.get $10 - local.get $9 + local.get $13 + local.get $8 + local.get $8 + local.get $13 local.get $2 i32.load call_indirect $0 (type $i64_i64_=>_i32) @@ -34137,8 +34049,8 @@ select i64.store local.get $0 - local.get $10 - local.get $9 + local.get $8 + local.get $13 local.get $1 select i64.store offset=8 @@ -34158,43 +34070,43 @@ local.get $1 i32.clz i32.sub - local.tee $8 + local.tee $6 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $5 + local.set $9 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $5 + local.get $9 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $13 + local.tee $10 local.get $7 i32.add - local.set $14 + local.set $11 loop $for-loop|1 + local.get $5 local.get $6 - local.get $8 i32.lt_u if - local.get $6 + local.get $5 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.const -1 i32.store - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|1 end end @@ -34210,84 +34122,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $15 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $12 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $7 + local.tee $1 i32.const 1 i32.add - local.tee $1 + local.tee $5 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $12 + local.get $9 i32.const 31 - local.get $12 + local.get $9 i32.const 31 i32.lt_s select - local.tee $7 - local.get $1 + local.tee $1 + local.get $5 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $7 - local.get $12 + local.get $1 + local.get $9 i32.lt_s if local.get $0 - local.get $7 + local.get $1 i32.const 1 i32.add - local.tee $5 - local.get $12 + local.tee $6 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $6 - local.get $5 + local.tee $5 + local.get $6 i32.sub i32.const 1 i32.add - local.tee $8 + local.tee $7 i32.const 32 i32.lt_s if local.get $0 - local.get $5 - local.get $12 - local.get $5 + local.get $6 + local.get $9 + local.get $6 i32.const 31 i32.add - local.tee $1 - local.get $1 - local.get $12 + local.tee $5 + local.get $5 + local.get $9 i32.gt_s select - local.tee $6 - local.get $8 + local.tee $5 + local.get $7 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $5 + local.get $6 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $9 + local.tee $8 i64.div_u local.get $5 local.get $6 @@ -34297,30 +34209,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $9 + local.get $8 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $1 + local.set $7 loop $for-loop|3 - local.get $1 local.get $4 - i32.lt_u + local.get $7 + i32.gt_u if local.get $4 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.load - local.tee $8 + local.tee $15 i32.const -1 i32.ne if local.get $0 - local.get $8 - local.get $14 + local.get $15 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -34329,16 +34241,16 @@ i32.load i32.const 1 i32.add - local.get $7 - local.get $15 + local.get $1 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $13 + local.get $10 i32.add i32.const -1 i32.store - local.get $8 + local.get $15 local.set $3 end local.get $4 @@ -34348,8 +34260,8 @@ br $for-loop|3 end end - local.get $13 - local.get $1 + local.get $10 + local.get $7 i32.const 2 i32.shl local.tee $4 @@ -34357,15 +34269,15 @@ local.get $3 i32.store local.get $4 - local.get $14 + local.get $11 i32.add - local.get $7 + local.get $1 i32.store - local.get $5 - local.set $3 local.get $6 - local.set $7 - local.get $1 + local.set $3 + local.get $5 + local.set $1 + local.get $7 local.set $4 br $while-continue|2 end @@ -34376,7 +34288,7 @@ local.get $4 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.load local.tee $1 @@ -34388,13 +34300,13 @@ local.get $4 i32.const 2 i32.shl - local.get $14 + local.get $11 i32.add i32.load i32.const 1 i32.add + local.get $9 local.get $12 - local.get $15 local.get $2 call $~lib/util/sort/mergeRuns end @@ -34405,9 +34317,9 @@ br $for-loop|4 end end - local.get $15 + local.get $12 call $~lib/rt/tlsf/__free - local.get $13 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i64) (param $1 i64) (result i32) @@ -34860,13 +34772,13 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i64) - (local $11 i64) + (local $8 i64) + (local $9 i32) + (local $10 i32) + (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i32) + (local $13 i64) + (local $14 i64) (local $15 i32) local.get $1 i32.const 48 @@ -34892,17 +34804,17 @@ end local.get $0 i64.load - local.set $11 + local.set $13 local.get $0 i64.load offset=8 - local.set $10 + local.set $14 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $10 - local.get $11 - local.get $11 - local.get $10 + local.get $14 + local.get $13 + local.get $13 + local.get $14 local.get $2 i32.load call_indirect $0 (type $i64_i64_=>_i32) @@ -34913,46 +34825,47 @@ i64.store local.get $0 i64.load offset=16 - local.set $9 + local.set $8 i32.const 2 global.set $~argumentsLength - local.get $0 - local.get $9 - local.get $11 - local.get $10 + local.get $13 + local.get $14 local.get $1 select - local.tee $10 - local.get $10 - local.get $9 + local.tee $13 + local.get $8 local.get $2 i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s - local.tee $1 + local.set $1 + local.get $0 + local.get $8 + local.get $13 + local.get $1 select i64.store offset=8 local.get $0 - local.get $10 - local.get $9 + local.get $13 + local.get $8 local.get $1 select i64.store offset=16 end local.get $0 i64.load - local.set $10 + local.set $8 local.get $0 i64.load offset=8 - local.set $9 + local.set $13 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $9 - local.get $10 - local.get $10 - local.get $9 + local.get $13 + local.get $8 + local.get $8 + local.get $13 local.get $2 i32.load call_indirect $0 (type $i64_i64_=>_i32) @@ -34962,8 +34875,8 @@ select i64.store local.get $0 - local.get $10 - local.get $9 + local.get $8 + local.get $13 local.get $1 select i64.store offset=8 @@ -34983,43 +34896,43 @@ local.get $1 i32.clz i32.sub - local.tee $8 + local.tee $6 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $5 + local.set $9 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $5 + local.get $9 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $13 + local.tee $10 local.get $7 i32.add - local.set $14 + local.set $11 loop $for-loop|1 + local.get $5 local.get $6 - local.get $8 i32.lt_u if - local.get $6 + local.get $5 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.const -1 i32.store - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|1 end end @@ -35035,84 +34948,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $15 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $12 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $7 + local.tee $1 i32.const 1 i32.add - local.tee $1 + local.tee $5 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $12 + local.get $9 i32.const 31 - local.get $12 + local.get $9 i32.const 31 i32.lt_s select - local.tee $7 - local.get $1 + local.tee $1 + local.get $5 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $7 - local.get $12 + local.get $1 + local.get $9 i32.lt_s if local.get $0 - local.get $7 + local.get $1 i32.const 1 i32.add - local.tee $5 - local.get $12 + local.tee $6 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $6 - local.get $5 + local.tee $5 + local.get $6 i32.sub i32.const 1 i32.add - local.tee $8 + local.tee $7 i32.const 32 i32.lt_s if local.get $0 - local.get $5 - local.get $12 - local.get $5 + local.get $6 + local.get $9 + local.get $6 i32.const 31 i32.add - local.tee $1 - local.get $1 - local.get $12 + local.tee $5 + local.get $5 + local.get $9 i32.gt_s select - local.tee $6 - local.get $8 + local.tee $5 + local.get $7 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $5 + local.get $6 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $9 + local.tee $8 i64.div_u local.get $5 local.get $6 @@ -35122,30 +35035,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $9 + local.get $8 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $1 + local.set $7 loop $for-loop|3 - local.get $1 local.get $4 - i32.lt_u + local.get $7 + i32.gt_u if local.get $4 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.load - local.tee $8 + local.tee $15 i32.const -1 i32.ne if local.get $0 - local.get $8 - local.get $14 + local.get $15 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -35154,16 +35067,16 @@ i32.load i32.const 1 i32.add - local.get $7 - local.get $15 + local.get $1 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $13 + local.get $10 i32.add i32.const -1 i32.store - local.get $8 + local.get $15 local.set $3 end local.get $4 @@ -35173,8 +35086,8 @@ br $for-loop|3 end end - local.get $13 - local.get $1 + local.get $10 + local.get $7 i32.const 2 i32.shl local.tee $4 @@ -35182,15 +35095,15 @@ local.get $3 i32.store local.get $4 - local.get $14 + local.get $11 i32.add - local.get $7 + local.get $1 i32.store - local.get $5 - local.set $3 local.get $6 - local.set $7 - local.get $1 + local.set $3 + local.get $5 + local.set $1 + local.get $7 local.set $4 br $while-continue|2 end @@ -35201,7 +35114,7 @@ local.get $4 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.load local.tee $1 @@ -35213,13 +35126,13 @@ local.get $4 i32.const 2 i32.shl - local.get $14 + local.get $11 i32.add i32.load i32.const 1 i32.add + local.get $9 local.get $12 - local.get $15 local.get $2 call $~lib/util/sort/mergeRuns end @@ -35230,9 +35143,9 @@ br $for-loop|4 end end - local.get $15 + local.get $12 call $~lib/rt/tlsf/__free - local.get $13 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i64) (param $1 i64) (result i32) @@ -35685,15 +35598,15 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f32) - (local $10 f32) - (local $11 f32) + (local $8 f32) + (local $9 i32) + (local $10 i32) + (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i64) + (local $13 i64) + (local $14 f32) + (local $15 f32) + (local $16 i32) local.get $1 i32.const 48 i32.le_s @@ -35718,17 +35631,17 @@ end local.get $0 f32.load - local.set $11 + local.set $14 local.get $0 f32.load offset=4 - local.set $10 + local.set $15 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $10 - local.get $11 - local.get $11 - local.get $10 + local.get $15 + local.get $14 + local.get $14 + local.get $15 local.get $2 i32.load call_indirect $0 (type $f32_f32_=>_i32) @@ -35739,46 +35652,47 @@ f32.store local.get $0 f32.load offset=8 - local.set $9 + local.set $8 i32.const 2 global.set $~argumentsLength - local.get $0 - local.get $9 - local.get $11 - local.get $10 + local.get $14 + local.get $15 local.get $1 select - local.tee $10 - local.get $10 - local.get $9 + local.tee $14 + local.get $8 local.get $2 i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.gt_s - local.tee $1 + local.set $1 + local.get $0 + local.get $8 + local.get $14 + local.get $1 select f32.store offset=4 local.get $0 - local.get $10 - local.get $9 + local.get $14 + local.get $8 local.get $1 select f32.store offset=8 end local.get $0 f32.load - local.set $10 + local.set $8 local.get $0 f32.load offset=4 - local.set $9 + local.set $14 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $9 - local.get $10 - local.get $10 - local.get $9 + local.get $14 + local.get $8 + local.get $8 + local.get $14 local.get $2 i32.load call_indirect $0 (type $f32_f32_=>_i32) @@ -35788,8 +35702,8 @@ select f32.store local.get $0 - local.get $10 - local.get $9 + local.get $8 + local.get $14 local.get $1 select f32.store offset=4 @@ -35809,43 +35723,43 @@ local.get $1 i32.clz i32.sub - local.tee $8 + local.tee $6 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $5 + local.set $9 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $5 + local.get $9 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $13 + local.tee $10 local.get $7 i32.add - local.set $14 + local.set $11 loop $for-loop|1 + local.get $5 local.get $6 - local.get $8 i32.lt_u if - local.get $6 + local.get $5 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.const -1 i32.store - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|1 end end @@ -35861,84 +35775,84 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.set $15 + local.set $12 local.get $0 i32.const 0 local.get $1 i32.const 1 i32.sub - local.tee $12 + local.tee $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $7 + local.tee $1 i32.const 1 i32.add - local.tee $1 + local.tee $5 i32.const 32 i32.lt_s if local.get $0 i32.const 0 - local.get $12 + local.get $9 i32.const 31 - local.get $12 + local.get $9 i32.const 31 i32.lt_s select - local.tee $7 - local.get $1 + local.tee $1 + local.get $5 local.get $2 call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $7 - local.get $12 + local.get $1 + local.get $9 i32.lt_s if local.get $0 - local.get $7 + local.get $1 i32.const 1 i32.add - local.tee $5 - local.get $12 + local.tee $6 + local.get $9 local.get $2 call $~lib/util/sort/extendRunRight - local.tee $6 - local.get $5 + local.tee $5 + local.get $6 i32.sub i32.const 1 i32.add - local.tee $8 + local.tee $7 i32.const 32 i32.lt_s if local.get $0 - local.get $5 - local.get $12 - local.get $5 + local.get $6 + local.get $9 + local.get $6 i32.const 31 i32.add - local.tee $1 - local.get $1 - local.get $12 + local.tee $5 + local.get $5 + local.get $9 i32.gt_s select - local.tee $6 - local.get $8 + local.tee $5 + local.get $7 local.get $2 call $~lib/util/sort/insertionSort end local.get $3 - local.get $5 + local.get $6 i32.add i64.extend_i32_u i64.const 30 i64.shl - local.get $12 + local.get $9 i32.const 1 i32.add i64.extend_i32_u - local.tee $16 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -35948,30 +35862,30 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $16 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $1 + local.set $7 loop $for-loop|3 - local.get $1 local.get $4 - i32.lt_u + local.get $7 + i32.gt_u if local.get $4 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.load - local.tee $8 + local.tee $16 i32.const -1 i32.ne if local.get $0 - local.get $8 - local.get $14 + local.get $16 + local.get $11 local.get $4 i32.const 2 i32.shl @@ -35980,16 +35894,16 @@ i32.load i32.const 1 i32.add - local.get $7 - local.get $15 + local.get $1 + local.get $12 local.get $2 call $~lib/util/sort/mergeRuns local.get $3 - local.get $13 + local.get $10 i32.add i32.const -1 i32.store - local.get $8 + local.get $16 local.set $3 end local.get $4 @@ -35999,8 +35913,8 @@ br $for-loop|3 end end - local.get $13 - local.get $1 + local.get $10 + local.get $7 i32.const 2 i32.shl local.tee $4 @@ -36008,15 +35922,15 @@ local.get $3 i32.store local.get $4 - local.get $14 + local.get $11 i32.add - local.get $7 + local.get $1 i32.store - local.get $5 - local.set $3 local.get $6 - local.set $7 - local.get $1 + local.set $3 + local.get $5 + local.set $1 + local.get $7 local.set $4 br $while-continue|2 end @@ -36027,7 +35941,7 @@ local.get $4 i32.const 2 i32.shl - local.get $13 + local.get $10 i32.add i32.load local.tee $1 @@ -36039,13 +35953,13 @@ local.get $4 i32.const 2 i32.shl - local.get $14 + local.get $11 i32.add i32.load i32.const 1 i32.add + local.get $9 local.get $12 - local.get $15 local.get $2 call $~lib/util/sort/mergeRuns end @@ -36056,9 +35970,9 @@ br $for-loop|4 end end - local.get $15 + local.get $12 call $~lib/rt/tlsf/__free - local.get $13 + local.get $10 call $~lib/rt/tlsf/__free ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f32) (param $1 f32) (result i32) @@ -36112,26 +36026,16 @@ block $folding-inner3 block $folding-inner2 block $invalid - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner2 $folding-inner3 $folding-inner3 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $invalid - end - return + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner2 $folding-inner3 $folding-inner3 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $invalid end return end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end return end unreachable @@ -36230,13 +36134,13 @@ i32.const 12 i32.const 3 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 i32.const 0 call $~lib/rt/itcms/__new - local.tee $6 + local.tee $8 i32.store offset=4 local.get $7 i32.load offset=4 @@ -36261,7 +36165,7 @@ call_indirect $0 (type $i32_i32_i32_=>_i32) if local.get $0 - local.get $6 + local.get $8 i32.add local.get $3 i32.store8 @@ -36277,33 +36181,33 @@ br $for-loop|0 end end - local.get $8 local.get $6 + local.get $8 local.get $0 call $~lib/rt/itcms/__renew local.tee $1 i32.store local.get $1 if - local.get $8 + local.get $6 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $8 + local.get $6 local.get $0 i32.store offset=8 - local.get $8 + local.get $6 local.get $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $6 i32.store offset=8 - local.get $8 + local.get $6 i32.load offset=4 - local.get $8 + local.get $6 i32.load i32.sub if @@ -36314,7 +36218,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.load offset=8 i32.const 3 i32.ne @@ -36326,7 +36230,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 0 call $~lib/typedarray/Int8Array#__get i32.const 3 @@ -36339,7 +36243,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 1 call $~lib/typedarray/Int8Array#__get i32.const 4 @@ -36352,7 +36256,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 2 call $~lib/typedarray/Int8Array#__get i32.const 5 @@ -36452,13 +36356,13 @@ i32.const 12 i32.const 4 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 i32.const 0 call $~lib/rt/itcms/__new - local.tee $6 + local.tee $8 i32.store offset=4 local.get $7 i32.load offset=4 @@ -36483,7 +36387,7 @@ call_indirect $0 (type $i32_i32_i32_=>_i32) if local.get $0 - local.get $6 + local.get $8 i32.add local.get $3 i32.store8 @@ -36499,33 +36403,33 @@ br $for-loop|0 end end - local.get $8 local.get $6 + local.get $8 local.get $0 call $~lib/rt/itcms/__renew local.tee $1 i32.store local.get $1 if - local.get $8 + local.get $6 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $8 + local.get $6 local.get $0 i32.store offset=8 - local.get $8 + local.get $6 local.get $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $6 i32.store offset=8 - local.get $8 + local.get $6 i32.load offset=4 - local.get $8 + local.get $6 i32.load i32.sub if @@ -36536,7 +36440,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.load offset=8 i32.const 3 i32.ne @@ -36548,7 +36452,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 0 call $~lib/typedarray/Uint8Array#__get i32.const 3 @@ -36561,7 +36465,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 1 call $~lib/typedarray/Uint8Array#__get i32.const 4 @@ -36574,7 +36478,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 2 call $~lib/typedarray/Uint8Array#__get i32.const 5 @@ -36674,13 +36578,13 @@ i32.const 12 i32.const 5 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 i32.const 0 call $~lib/rt/itcms/__new - local.tee $6 + local.tee $8 i32.store offset=4 local.get $7 i32.load offset=4 @@ -36705,7 +36609,7 @@ call_indirect $0 (type $i32_i32_i32_=>_i32) if local.get $0 - local.get $6 + local.get $8 i32.add local.get $3 i32.store8 @@ -36721,33 +36625,33 @@ br $for-loop|0 end end - local.get $8 local.get $6 + local.get $8 local.get $0 call $~lib/rt/itcms/__renew local.tee $1 i32.store local.get $1 if - local.get $8 + local.get $6 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $8 + local.get $6 local.get $0 i32.store offset=8 - local.get $8 + local.get $6 local.get $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $6 i32.store offset=8 - local.get $8 + local.get $6 i32.load offset=4 - local.get $8 + local.get $6 i32.load i32.sub if @@ -36758,7 +36662,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.load offset=8 i32.const 3 i32.ne @@ -36770,7 +36674,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 3 @@ -36783,7 +36687,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 @@ -36796,7 +36700,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 5 @@ -36898,7 +36802,7 @@ i32.const 12 i32.const 6 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -36906,11 +36810,11 @@ i32.shl i32.const 0 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $8 i32.store offset=4 local.get $7 i32.load offset=4 - local.set $6 + local.set $5 loop $for-loop|0 local.get $1 local.get $2 @@ -36919,13 +36823,13 @@ local.get $1 i32.const 1 i32.shl - local.get $6 + local.get $5 i32.add i32.load16_s - local.set $4 + local.set $3 i32.const 3 global.set $~argumentsLength - local.get $4 + local.get $3 local.get $1 local.get $7 i32.const 4048 @@ -36935,9 +36839,9 @@ local.get $0 i32.const 1 i32.shl - local.get $3 + local.get $8 i32.add - local.get $4 + local.get $3 i32.store16 local.get $0 i32.const 1 @@ -36951,8 +36855,8 @@ br $for-loop|0 end end + local.get $6 local.get $8 - local.get $3 local.get $0 i32.const 1 i32.shl @@ -36962,25 +36866,25 @@ i32.store local.get $1 if - local.get $8 + local.get $6 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $8 + local.get $6 local.get $0 i32.store offset=8 - local.get $8 + local.get $6 local.get $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $6 i32.store offset=8 - local.get $8 + local.get $6 i32.load offset=4 - local.get $8 + local.get $6 i32.load i32.sub if @@ -36991,7 +36895,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.load offset=8 i32.const 1 i32.shr_u @@ -37005,7 +36909,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 0 call $~lib/typedarray/Int16Array#__get i32.const 3 @@ -37018,7 +36922,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 1 call $~lib/typedarray/Int16Array#__get i32.const 4 @@ -37031,7 +36935,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 2 call $~lib/typedarray/Int16Array#__get i32.const 5 @@ -37133,7 +37037,7 @@ i32.const 12 i32.const 7 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -37141,11 +37045,11 @@ i32.shl i32.const 0 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $8 i32.store offset=4 local.get $7 i32.load offset=4 - local.set $6 + local.set $5 loop $for-loop|0 local.get $1 local.get $2 @@ -37154,13 +37058,13 @@ local.get $1 i32.const 1 i32.shl - local.get $6 + local.get $5 i32.add i32.load16_u - local.set $4 + local.set $3 i32.const 3 global.set $~argumentsLength - local.get $4 + local.get $3 local.get $1 local.get $7 i32.const 4080 @@ -37170,9 +37074,9 @@ local.get $0 i32.const 1 i32.shl - local.get $3 + local.get $8 i32.add - local.get $4 + local.get $3 i32.store16 local.get $0 i32.const 1 @@ -37186,8 +37090,8 @@ br $for-loop|0 end end + local.get $6 local.get $8 - local.get $3 local.get $0 i32.const 1 i32.shl @@ -37197,25 +37101,25 @@ i32.store local.get $1 if - local.get $8 + local.get $6 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $8 + local.get $6 local.get $0 i32.store offset=8 - local.get $8 + local.get $6 local.get $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $6 i32.store offset=8 - local.get $8 + local.get $6 i32.load offset=4 - local.get $8 + local.get $6 i32.load i32.sub if @@ -37226,7 +37130,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.load offset=8 i32.const 1 i32.shr_u @@ -37240,7 +37144,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 0 call $~lib/typedarray/Uint16Array#__get i32.const 3 @@ -37253,7 +37157,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 1 call $~lib/typedarray/Uint16Array#__get i32.const 4 @@ -37266,7 +37170,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 2 call $~lib/typedarray/Uint16Array#__get i32.const 5 @@ -37368,7 +37272,7 @@ i32.const 12 i32.const 8 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -37376,11 +37280,11 @@ i32.shl i32.const 0 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $8 i32.store offset=4 local.get $7 i32.load offset=4 - local.set $6 + local.set $5 loop $for-loop|0 local.get $1 local.get $2 @@ -37389,13 +37293,13 @@ local.get $1 i32.const 2 i32.shl - local.get $6 + local.get $5 i32.add i32.load - local.set $4 + local.set $3 i32.const 3 global.set $~argumentsLength - local.get $4 + local.get $3 local.get $1 local.get $7 i32.const 4112 @@ -37405,9 +37309,9 @@ local.get $0 i32.const 2 i32.shl - local.get $3 + local.get $8 i32.add - local.get $4 + local.get $3 i32.store local.get $0 i32.const 1 @@ -37421,8 +37325,8 @@ br $for-loop|0 end end + local.get $6 local.get $8 - local.get $3 local.get $0 i32.const 2 i32.shl @@ -37432,25 +37336,25 @@ i32.store local.get $1 if - local.get $8 + local.get $6 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $8 + local.get $6 local.get $0 i32.store offset=8 - local.get $8 + local.get $6 local.get $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $6 i32.store offset=8 - local.get $8 + local.get $6 i32.load offset=4 - local.get $8 + local.get $6 i32.load i32.sub if @@ -37461,7 +37365,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.load offset=8 i32.const 2 i32.shr_u @@ -37475,7 +37379,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 0 call $~lib/typedarray/Int32Array#__get i32.const 3 @@ -37488,7 +37392,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 1 call $~lib/typedarray/Int32Array#__get i32.const 4 @@ -37501,7 +37405,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 2 call $~lib/typedarray/Int32Array#__get i32.const 5 @@ -37603,7 +37507,7 @@ i32.const 12 i32.const 9 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -37611,11 +37515,11 @@ i32.shl i32.const 0 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $8 i32.store offset=4 local.get $7 i32.load offset=4 - local.set $6 + local.set $5 loop $for-loop|0 local.get $1 local.get $2 @@ -37624,13 +37528,13 @@ local.get $1 i32.const 2 i32.shl - local.get $6 + local.get $5 i32.add i32.load - local.set $4 + local.set $3 i32.const 3 global.set $~argumentsLength - local.get $4 + local.get $3 local.get $1 local.get $7 i32.const 4144 @@ -37640,9 +37544,9 @@ local.get $0 i32.const 2 i32.shl - local.get $3 + local.get $8 i32.add - local.get $4 + local.get $3 i32.store local.get $0 i32.const 1 @@ -37656,8 +37560,8 @@ br $for-loop|0 end end + local.get $6 local.get $8 - local.get $3 local.get $0 i32.const 2 i32.shl @@ -37667,25 +37571,25 @@ i32.store local.get $1 if - local.get $8 + local.get $6 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $8 + local.get $6 local.get $0 i32.store offset=8 - local.get $8 + local.get $6 local.get $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $6 i32.store offset=8 - local.get $8 + local.get $6 i32.load offset=4 - local.get $8 + local.get $6 i32.load i32.sub if @@ -37696,7 +37600,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.load offset=8 i32.const 2 i32.shr_u @@ -37710,7 +37614,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 0 call $~lib/typedarray/Uint32Array#__get i32.const 3 @@ -37723,7 +37627,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 1 call $~lib/typedarray/Uint32Array#__get i32.const 4 @@ -37736,7 +37640,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 2 call $~lib/typedarray/Uint32Array#__get i32.const 5 @@ -37766,8 +37670,8 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -37826,7 +37730,7 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $5 i64.const 0 i64.store local.get $7 @@ -37834,11 +37738,11 @@ i32.const 3 i32.shr_u local.set $2 - local.get $3 + local.get $5 i32.const 12 i32.const 10 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -37846,11 +37750,11 @@ i32.shl i32.const 0 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $8 i32.store offset=4 local.get $7 i32.load offset=4 - local.set $6 + local.set $5 loop $for-loop|0 local.get $1 local.get $2 @@ -37859,13 +37763,13 @@ local.get $1 i32.const 3 i32.shl - local.get $6 + local.get $5 i32.add i64.load - local.set $4 + local.set $3 i32.const 3 global.set $~argumentsLength - local.get $4 + local.get $3 local.get $1 local.get $7 i32.const 4176 @@ -37875,9 +37779,9 @@ local.get $0 i32.const 3 i32.shl - local.get $3 + local.get $8 i32.add - local.get $4 + local.get $3 i64.store local.get $0 i32.const 1 @@ -37891,8 +37795,8 @@ br $for-loop|0 end end + local.get $6 local.get $8 - local.get $3 local.get $0 i32.const 3 i32.shl @@ -37902,25 +37806,25 @@ i32.store local.get $1 if - local.get $8 + local.get $6 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $8 + local.get $6 local.get $0 i32.store offset=8 - local.get $8 + local.get $6 local.get $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $6 i32.store offset=8 - local.get $8 + local.get $6 i32.load offset=4 - local.get $8 + local.get $6 i32.load i32.sub if @@ -37931,7 +37835,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.load offset=8 i32.const 3 i32.shr_u @@ -37945,7 +37849,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 0 call $~lib/typedarray/Int64Array#__get i64.const 3 @@ -37958,7 +37862,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 1 call $~lib/typedarray/Int64Array#__get i64.const 4 @@ -37971,7 +37875,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 2 call $~lib/typedarray/Int64Array#__get i64.const 5 @@ -38001,8 +37905,8 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -38061,7 +37965,7 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $5 i64.const 0 i64.store local.get $7 @@ -38069,11 +37973,11 @@ i32.const 3 i32.shr_u local.set $2 - local.get $3 + local.get $5 i32.const 12 i32.const 11 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -38081,11 +37985,11 @@ i32.shl i32.const 0 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $8 i32.store offset=4 local.get $7 i32.load offset=4 - local.set $6 + local.set $5 loop $for-loop|0 local.get $1 local.get $2 @@ -38094,13 +37998,13 @@ local.get $1 i32.const 3 i32.shl - local.get $6 + local.get $5 i32.add i64.load - local.set $4 + local.set $3 i32.const 3 global.set $~argumentsLength - local.get $4 + local.get $3 local.get $1 local.get $7 i32.const 4208 @@ -38110,9 +38014,9 @@ local.get $0 i32.const 3 i32.shl - local.get $3 + local.get $8 i32.add - local.get $4 + local.get $3 i64.store local.get $0 i32.const 1 @@ -38126,8 +38030,8 @@ br $for-loop|0 end end + local.get $6 local.get $8 - local.get $3 local.get $0 i32.const 3 i32.shl @@ -38137,25 +38041,25 @@ i32.store local.get $1 if - local.get $8 + local.get $6 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $8 + local.get $6 local.get $0 i32.store offset=8 - local.get $8 + local.get $6 local.get $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $6 i32.store offset=8 - local.get $8 + local.get $6 i32.load offset=4 - local.get $8 + local.get $6 i32.load i32.sub if @@ -38166,7 +38070,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.load offset=8 i32.const 3 i32.shr_u @@ -38180,7 +38084,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 0 call $~lib/typedarray/Uint64Array#__get i64.const 3 @@ -38193,7 +38097,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 1 call $~lib/typedarray/Uint64Array#__get i64.const 4 @@ -38206,7 +38110,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 2 call $~lib/typedarray/Uint64Array#__get i64.const 5 @@ -38236,8 +38140,8 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 f32) + (local $3 f32) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -38296,7 +38200,7 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $5 i64.const 0 i64.store local.get $7 @@ -38304,11 +38208,11 @@ i32.const 2 i32.shr_u local.set $2 - local.get $3 + local.get $5 i32.const 12 i32.const 12 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -38316,11 +38220,11 @@ i32.shl i32.const 0 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $8 i32.store offset=4 local.get $7 i32.load offset=4 - local.set $6 + local.set $5 loop $for-loop|0 local.get $1 local.get $2 @@ -38329,13 +38233,13 @@ local.get $1 i32.const 2 i32.shl - local.get $6 + local.get $5 i32.add f32.load - local.set $4 + local.set $3 i32.const 3 global.set $~argumentsLength - local.get $4 + local.get $3 local.get $1 local.get $7 i32.const 4240 @@ -38345,9 +38249,9 @@ local.get $0 i32.const 2 i32.shl - local.get $3 + local.get $8 i32.add - local.get $4 + local.get $3 f32.store local.get $0 i32.const 1 @@ -38361,8 +38265,8 @@ br $for-loop|0 end end + local.get $6 local.get $8 - local.get $3 local.get $0 i32.const 2 i32.shl @@ -38372,25 +38276,25 @@ i32.store local.get $1 if - local.get $8 + local.get $6 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $8 + local.get $6 local.get $0 i32.store offset=8 - local.get $8 + local.get $6 local.get $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $6 i32.store offset=8 - local.get $8 + local.get $6 i32.load offset=4 - local.get $8 + local.get $6 i32.load i32.sub if @@ -38401,7 +38305,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.load offset=8 i32.const 2 i32.shr_u @@ -38415,7 +38319,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 0 call $~lib/typedarray/Float32Array#__get f32.const 3 @@ -38428,7 +38332,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 1 call $~lib/typedarray/Float32Array#__get f32.const 4 @@ -38441,7 +38345,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 2 call $~lib/typedarray/Float32Array#__get f32.const 5 @@ -38471,8 +38375,8 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 f64) + (local $3 f64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -38531,7 +38435,7 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $5 i64.const 0 i64.store local.get $7 @@ -38539,11 +38443,11 @@ i32.const 3 i32.shr_u local.set $2 - local.get $3 + local.get $5 i32.const 12 i32.const 13 call $~lib/rt/itcms/__new - local.tee $8 + local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 @@ -38551,11 +38455,11 @@ i32.shl i32.const 0 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $8 i32.store offset=4 local.get $7 i32.load offset=4 - local.set $6 + local.set $5 loop $for-loop|0 local.get $1 local.get $2 @@ -38564,13 +38468,13 @@ local.get $1 i32.const 3 i32.shl - local.get $6 + local.get $5 i32.add f64.load - local.set $4 + local.set $3 i32.const 3 global.set $~argumentsLength - local.get $4 + local.get $3 local.get $1 local.get $7 i32.const 4272 @@ -38580,9 +38484,9 @@ local.get $0 i32.const 3 i32.shl - local.get $3 + local.get $8 i32.add - local.get $4 + local.get $3 f64.store local.get $0 i32.const 1 @@ -38596,8 +38500,8 @@ br $for-loop|0 end end + local.get $6 local.get $8 - local.get $3 local.get $0 i32.const 3 i32.shl @@ -38607,25 +38511,25 @@ i32.store local.get $1 if - local.get $8 + local.get $6 local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $8 + local.get $6 local.get $0 i32.store offset=8 - local.get $8 + local.get $6 local.get $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $6 i32.store offset=8 - local.get $8 + local.get $6 i32.load offset=4 - local.get $8 + local.get $6 i32.load i32.sub if @@ -38636,7 +38540,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.load offset=8 i32.const 3 i32.shr_u @@ -38650,7 +38554,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 0 call $~lib/typedarray/Float64Array#__get f64.const 3 @@ -38663,7 +38567,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 1 call $~lib/typedarray/Float64Array#__get f64.const 4 @@ -38676,7 +38580,7 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $6 i32.const 2 call $~lib/typedarray/Float64Array#__get f64.const 5 @@ -44312,16 +44216,16 @@ i32.shr_u local.set $3 loop $for-loop|02 - local.get $0 + local.get $1 local.get $3 i32.lt_s if - local.get $0 + local.get $1 i32.const 2 i32.shl local.get $2 i32.add - local.get $0 + local.get $1 i32.const 3 i32.shl local.get $6 @@ -44329,10 +44233,10 @@ i64.load f32.convert_i64_s f32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|02 end end @@ -44341,12 +44245,12 @@ i32.const 61 i32.const 14656 call $~lib/rt/__newArray - local.set $0 + local.set $1 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $1 i32.store offset=16 local.get $8 - local.get $0 + local.get $1 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> local.get $4 i32.load offset=8 @@ -44358,7 +44262,7 @@ br_if $folding-inner1 local.get $8 i32.load offset=4 - local.set $0 + local.set $1 local.get $4 i32.load offset=4 local.set $2 @@ -44366,25 +44270,25 @@ i32.load offset=8 local.set $3 loop $for-loop|06 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 + local.get $0 i32.const 2 i32.shl - local.get $0 - i32.add local.get $1 + i32.add + local.get $0 local.get $2 i32.add i32.load8_u f32.convert_i32_u f32.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|06 end end @@ -44404,7 +44308,7 @@ i32.load offset=4 i32.const 16 i32.add - local.set $0 + local.set $1 local.get $5 i32.load offset=4 local.set $2 @@ -44414,18 +44318,18 @@ i32.shr_u local.set $3 i32.const 0 - local.set $1 + local.set $0 loop $for-loop|010 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 + local.get $0 i32.const 2 i32.shl - local.get $0 - i32.add local.get $1 + i32.add + local.get $0 i32.const 1 i32.shl local.get $2 @@ -44433,10 +44337,10 @@ i32.load16_s f32.convert_i32_s f32.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|010 end end @@ -44457,7 +44361,7 @@ i32.load offset=4 i32.const 28 i32.add - local.set $0 + local.set $1 i32.const 11268 i32.load local.set $2 @@ -44465,27 +44369,27 @@ i32.load local.set $3 i32.const 0 - local.set $1 + local.set $0 loop $for-loop|016 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $1 + local.get $0 i32.const 2 i32.shl - local.get $0 - i32.add local.get $1 + i32.add + local.get $0 local.get $2 i32.add i32.load8_s f32.convert_i32_s f32.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|016 end end @@ -44616,7 +44520,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -44633,16 +44536,16 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $2 + local.tee $1 i64.const 0 i64.store - local.get $2 + local.get $1 i64.const 0 i64.store offset=8 - local.get $2 + local.get $1 i32.const 0 i32.store offset=16 - local.get $2 + local.get $1 i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $2 @@ -44700,7 +44603,7 @@ global.get $~lib/memory/__stack_pointer i32.const 10 call $~lib/typedarray/Float64Array#constructor - local.tee $5 + local.tee $1 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 11008 @@ -44708,43 +44611,43 @@ block $folding-inner1 i32.const 11020 i32.load - local.get $5 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner1 - local.get $5 + local.get $1 i32.load offset=4 - local.set $6 + local.set $5 i32.const 11012 i32.load - local.set $7 + local.set $6 i32.const 11020 i32.load - local.set $8 + local.set $7 loop $for-loop|0 - local.get $1 - local.get $8 + local.get $0 + local.get $7 i32.lt_s if - local.get $1 + local.get $0 i32.const 3 i32.shl - local.get $6 + local.get $5 i32.add - local.get $1 + local.get $0 i32.const 2 i32.shl - local.get $7 + local.get $6 i32.add i32.load f64.convert_i32_s f64.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -44753,12 +44656,12 @@ i32.const 62 i32.const 14784 call $~lib/rt/__newArray - local.set $1 + local.set $0 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $0 i32.store offset=16 - local.get $5 local.get $1 + local.get $0 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> global.get $~lib/memory/__stack_pointer i32.const 11088 @@ -44767,47 +44670,47 @@ i32.load i32.const 3 i32.add - local.get $5 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner1 - local.get $5 + local.get $1 i32.load offset=4 i32.const 24 i32.add - local.set $6 + local.set $5 i32.const 11092 i32.load - local.set $7 + local.set $6 i32.const 11100 i32.load - local.set $8 + local.set $7 i32.const 0 - local.set $1 + local.set $0 loop $for-loop|05 - local.get $1 - local.get $8 + local.get $0 + local.get $7 i32.lt_s if - local.get $1 + local.get $0 i32.const 3 i32.shl - local.get $6 + local.get $5 i32.add - local.get $1 + local.get $0 i32.const 2 i32.shl - local.get $7 + local.get $6 i32.add f32.load f64.promote_f32 f64.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|05 end end @@ -44816,12 +44719,12 @@ i32.const 62 i32.const 14944 call $~lib/rt/__newArray - local.set $1 + local.set $0 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $0 i32.store offset=16 - local.get $5 local.get $1 + local.get $0 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> local.get $2 i32.load offset=8 @@ -44829,48 +44732,48 @@ i32.shr_u i32.const 6 i32.add - local.get $5 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner1 - local.get $5 + local.get $1 i32.load offset=4 i32.const 48 i32.add - local.set $6 + local.set $5 local.get $2 i32.load offset=4 - local.set $7 + local.set $6 local.get $2 i32.load offset=8 i32.const 3 i32.shr_u local.set $2 i32.const 0 - local.set $1 + local.set $0 loop $for-loop|09 - local.get $1 + local.get $0 local.get $2 i32.lt_s if - local.get $1 + local.get $0 i32.const 3 i32.shl - local.tee $8 - local.get $6 + local.tee $7 + local.get $5 i32.add + local.get $6 local.get $7 - local.get $8 i32.add i64.load f64.convert_i64_s f64.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|09 end end @@ -44879,30 +44782,32 @@ i32.const 62 i32.const 15056 call $~lib/rt/__newArray - local.set $1 + local.set $0 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $0 i32.store offset=16 - local.get $5 local.get $1 + local.get $0 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> local.get $3 i32.load offset=8 - local.get $5 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner1 - local.get $5 + local.get $1 i32.load offset=4 - local.set $1 + local.set $2 local.get $3 i32.load offset=4 - local.set $2 + local.set $5 local.get $3 i32.load offset=8 local.set $3 + i32.const 0 + local.set $0 loop $for-loop|013 local.get $0 local.get $3 @@ -44911,10 +44816,10 @@ local.get $0 i32.const 3 i32.shl - local.get $1 + local.get $2 i32.add local.get $0 - local.get $2 + local.get $5 i32.add i32.load8_u f64.convert_i32_u @@ -44932,41 +44837,41 @@ i32.shr_u i32.const 4 i32.add - local.get $5 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner1 - local.get $5 + local.get $1 i32.load offset=4 i32.const 32 i32.add - local.set $1 + local.set $2 local.get $4 i32.load offset=4 - local.set $2 + local.set $3 local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.set $3 + local.set $4 i32.const 0 local.set $0 loop $for-loop|017 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $0 i32.const 3 i32.shl - local.get $1 + local.get $2 i32.add local.get $0 i32.const 1 i32.shl - local.get $2 + local.get $3 i32.add i32.load16_s f64.convert_i32_s @@ -44985,37 +44890,37 @@ i32.load i32.const 7 i32.add - local.get $5 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner1 - local.get $5 + local.get $1 i32.load offset=4 i32.const 56 i32.add - local.set $1 + local.set $2 i32.const 11268 i32.load - local.set $2 + local.set $3 i32.const 11276 i32.load - local.set $3 + local.set $4 i32.const 0 local.set $0 loop $for-loop|023 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $0 i32.const 3 i32.shl - local.get $1 + local.get $2 i32.add local.get $0 - local.get $2 + local.get $3 i32.add i32.load8_s f64.convert_i32_s @@ -45036,7 +44941,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=16 - local.get $5 + local.get $1 local.get $0 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> global.get $~lib/memory/__stack_pointer @@ -45058,18 +44963,17 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 f32) - (local $6 i32) - (local $7 f64) - (local $8 i32) + (local $5 i32) + (local $6 f32) + (local $7 i32) + (local $8 f64) (local $9 i32) - (local $10 i64) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (local $10 i32) + (local $11 i64) + (local $12 f64) + (local $13 f32) (local $14 i64) - (local $15 f32) - (local $16 f64) + (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 32 i32.sub @@ -45785,35 +45689,35 @@ i32.load offset=8 i32.const 2 i32.shr_u - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 1 i32.gt_s select - local.set $0 + local.set $1 i32.const 3 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.const 3 i32.gt_s select - local.set $1 + local.set $0 loop $for-loop|0 local.get $0 local.get $1 - i32.lt_s + i32.gt_s if - local.get $0 + local.get $1 i32.const 2 i32.shl local.get $2 i32.add i32.const 1 i32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -45846,28 +45750,28 @@ i32.load offset=8 i32.const 2 i32.shr_u - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 0 i32.gt_s select - local.set $0 + local.set $1 loop $for-loop|01 local.get $0 local.get $1 - i32.lt_s + i32.gt_s if - local.get $0 + local.get $1 i32.const 2 i32.shl local.get $2 i32.add i32.const 0 i32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|01 end end @@ -45900,38 +45804,38 @@ i32.load offset=8 i32.const 2 i32.shr_u - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 0 i32.gt_s select - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 3 i32.sub - local.tee $1 + local.tee $0 i32.const 0 - local.get $1 + local.get $0 i32.const 0 i32.gt_s select - local.set $1 + local.set $0 loop $for-loop|03 local.get $0 local.get $1 - i32.lt_s + i32.gt_s if - local.get $0 + local.get $1 i32.const 2 i32.shl local.get $2 i32.add i32.const 1 i32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|03 end end @@ -45958,12 +45862,12 @@ end local.get $4 i32.load offset=4 - local.set $2 + local.set $3 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $1 + local.tee $2 i32.const 2 i32.sub local.tee $0 @@ -45972,23 +45876,23 @@ i32.const 0 i32.gt_s select - local.set $0 + local.set $1 loop $for-loop|05 - local.get $0 local.get $1 + local.get $2 i32.lt_s if - local.get $0 + local.get $1 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.const 2 i32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|05 end end @@ -46021,35 +45925,35 @@ i32.load offset=8 i32.const 2 i32.shr_u - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 1 i32.gt_s select - local.set $0 + local.set $1 i32.const 0 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.const 0 i32.gt_s select - local.set $1 + local.set $0 loop $for-loop|07 local.get $0 local.get $1 - i32.lt_s + i32.gt_s if - local.get $0 + local.get $1 i32.const 2 i32.shl local.get $2 i32.add i32.const 0 i32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|07 end end @@ -47158,57 +47062,59 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $3 + local.get $4 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $3 + local.get $4 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set global.get $~lib/memory/__stack_pointer i32.const 2896 i32.store offset=4 - local.get $3 + local.get $4 i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 + local.set $3 + i32.const 0 local.set $1 + local.get $4 + i32.load offset=8 + local.set $2 loop $for-loop|010 local.get $1 - local.get $6 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $2 - local.get $6 + local.get $1 + local.get $3 i32.add i32.load8_s local.set $0 i32.const 4 global.set $~argumentsLength - local.get $8 + local.get $5 local.get $0 - local.get $6 - local.get $3 + local.get $1 + local.get $4 i32.const 2896 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $8 - local.get $6 + local.set $5 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|010 end end - local.get $8 + local.get $5 i32.const 255 i32.and i32.const 6 @@ -47233,17 +47139,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $4 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $4 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8Array#__set @@ -47251,43 +47157,43 @@ i32.const 2928 i32.store offset=4 i32.const 0 - local.set $8 - local.get $3 + local.set $5 + local.get $4 i32.load offset=4 - local.set $2 + local.set $3 i32.const 0 - local.set $6 - local.get $3 - i32.load offset=8 local.set $1 + local.get $4 + i32.load offset=8 + local.set $2 loop $for-loop|0511 local.get $1 - local.get $6 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $2 - local.get $6 + local.get $1 + local.get $3 i32.add i32.load8_u local.set $0 i32.const 4 global.set $~argumentsLength - local.get $8 + local.get $5 local.get $0 - local.get $6 - local.get $3 + local.get $1 + local.get $4 i32.const 2928 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $8 - local.get $6 + local.set $5 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|0511 end end - local.get $8 + local.get $5 i32.const 255 i32.and i32.const 6 @@ -47312,17 +47218,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $3 + local.get $4 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $3 + local.get $4 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set @@ -47330,43 +47236,43 @@ i32.const 2960 i32.store offset=4 i32.const 0 - local.set $8 - local.get $3 + local.set $5 + local.get $4 i32.load offset=4 - local.set $2 + local.set $3 i32.const 0 - local.set $6 - local.get $3 - i32.load offset=8 local.set $1 + local.get $4 + i32.load offset=8 + local.set $2 loop $for-loop|013 local.get $1 - local.get $6 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $2 - local.get $6 + local.get $1 + local.get $3 i32.add i32.load8_u local.set $0 i32.const 4 global.set $~argumentsLength - local.get $8 + local.get $5 local.get $0 - local.get $6 - local.get $3 + local.get $1 + local.get $4 i32.const 2960 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $8 - local.get $6 + local.set $5 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|013 end end - local.get $8 + local.get $5 i32.const 255 i32.and i32.const 6 @@ -47391,17 +47297,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 i32.const 0 i32.const 1 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 1 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 2 i32.const 3 call $~lib/typedarray/Int16Array#__set @@ -47409,47 +47315,47 @@ i32.const 2992 i32.store offset=4 i32.const 0 - local.set $8 - local.get $3 + local.set $5 + local.get $4 i32.load offset=4 - local.set $2 + local.set $3 i32.const 0 - local.set $6 - local.get $3 + local.set $1 + local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.set $1 + local.set $2 loop $for-loop|017 local.get $1 - local.get $6 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $6 + local.get $1 i32.const 1 i32.shl - local.get $2 + local.get $3 i32.add i32.load16_s local.set $0 i32.const 4 global.set $~argumentsLength - local.get $8 + local.get $5 local.get $0 - local.get $6 - local.get $3 + local.get $1 + local.get $4 i32.const 2992 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $8 - local.get $6 + local.set $5 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|017 end end - local.get $8 + local.get $5 i32.const 65535 i32.and i32.const 6 @@ -47474,17 +47380,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 i32.const 0 i32.const 1 call $~lib/typedarray/Uint16Array#__set - local.get $3 + local.get $4 i32.const 1 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $3 + local.get $4 i32.const 2 i32.const 3 call $~lib/typedarray/Uint16Array#__set @@ -47492,47 +47398,47 @@ i32.const 3024 i32.store offset=4 i32.const 0 - local.set $8 - local.get $3 + local.set $5 + local.get $4 i32.load offset=4 - local.set $2 + local.set $3 i32.const 0 - local.set $6 - local.get $3 + local.set $1 + local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.set $1 + local.set $2 loop $for-loop|022 local.get $1 - local.get $6 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $6 + local.get $1 i32.const 1 i32.shl - local.get $2 + local.get $3 i32.add i32.load16_u local.set $0 i32.const 4 global.set $~argumentsLength - local.get $8 + local.get $5 local.get $0 - local.get $6 - local.get $3 + local.get $1 + local.get $4 i32.const 3024 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $8 - local.get $6 + local.set $5 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|022 end end - local.get $8 + local.get $5 i32.const 65535 i32.and i32.const 6 @@ -47557,17 +47463,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $3 + local.get $4 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $3 + local.get $4 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set @@ -47575,47 +47481,47 @@ i32.const 3056 i32.store offset=4 i32.const 0 - local.set $8 - local.get $3 + local.set $5 + local.get $4 i32.load offset=4 - local.set $2 + local.set $3 i32.const 0 - local.set $6 - local.get $3 + local.set $1 + local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.set $1 + local.set $2 loop $for-loop|027 local.get $1 - local.get $6 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $6 + local.get $1 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load local.set $0 i32.const 4 global.set $~argumentsLength - local.get $8 + local.get $5 local.get $0 - local.get $6 - local.get $3 + local.get $1 + local.get $4 i32.const 3056 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $8 - local.get $6 + local.set $5 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|027 end end - local.get $8 + local.get $5 i32.const 6 i32.ne br_if $folding-inner1 @@ -47638,17 +47544,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 i32.const 0 i32.const 1 call $~lib/typedarray/Uint32Array#__set - local.get $3 + local.get $4 i32.const 1 i32.const 2 call $~lib/typedarray/Uint32Array#__set - local.get $3 + local.get $4 i32.const 2 i32.const 3 call $~lib/typedarray/Uint32Array#__set @@ -47656,47 +47562,47 @@ i32.const 3088 i32.store offset=4 i32.const 0 - local.set $8 - local.get $3 + local.set $5 + local.get $4 i32.load offset=4 - local.set $2 + local.set $3 i32.const 0 - local.set $6 - local.get $3 + local.set $1 + local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.set $1 + local.set $2 loop $for-loop|032 local.get $1 - local.get $6 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $6 + local.get $1 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load local.set $0 i32.const 4 global.set $~argumentsLength - local.get $8 + local.get $5 local.get $0 - local.get $6 - local.get $3 + local.get $1 + local.get $4 i32.const 3088 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $8 - local.get $6 + local.set $5 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|032 end end - local.get $8 + local.get $5 i32.const 6 i32.ne br_if $folding-inner1 @@ -47719,59 +47625,59 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 i32.const 0 i64.const 1 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $3 i32.const 1 i64.const 2 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $3 i32.const 2 i64.const 3 call $~lib/typedarray/Int64Array#__set global.get $~lib/memory/__stack_pointer i32.const 3120 i32.store offset=4 - local.get $2 + local.get $3 i32.load offset=4 - local.set $1 + local.set $2 i32.const 0 - local.set $6 - local.get $2 + local.set $1 + local.get $3 i32.load offset=8 i32.const 3 i32.shr_u local.set $0 loop $for-loop|037 local.get $0 - local.get $6 + local.get $1 i32.gt_s if - local.get $6 + local.get $1 i32.const 3 i32.shl - local.get $1 + local.get $2 i32.add i64.load - local.set $10 + local.set $11 i32.const 4 global.set $~argumentsLength local.get $14 - local.get $10 - local.get $6 - local.get $2 + local.get $11 + local.get $1 + local.get $3 i32.const 3120 i32.load call_indirect $0 (type $i64_i64_i32_i32_=>_i64) local.set $14 - local.get $6 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|037 end end @@ -47798,17 +47704,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint64Array#constructor - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 i32.const 0 i64.const 1 call $~lib/typedarray/Uint64Array#__set - local.get $2 + local.get $3 i32.const 1 i64.const 2 call $~lib/typedarray/Uint64Array#__set - local.get $2 + local.get $3 i32.const 2 i64.const 3 call $~lib/typedarray/Uint64Array#__set @@ -47817,42 +47723,42 @@ i32.store offset=4 i64.const 0 local.set $14 - local.get $2 + local.get $3 i32.load offset=4 - local.set $1 + local.set $2 i32.const 0 - local.set $6 - local.get $2 + local.set $1 + local.get $3 i32.load offset=8 i32.const 3 i32.shr_u local.set $0 loop $for-loop|042 local.get $0 - local.get $6 + local.get $1 i32.gt_s if - local.get $6 + local.get $1 i32.const 3 i32.shl - local.get $1 + local.get $2 i32.add i64.load - local.set $10 + local.set $11 i32.const 4 global.set $~argumentsLength local.get $14 - local.get $10 - local.get $6 - local.get $2 + local.get $11 + local.get $1 + local.get $3 i32.const 3152 i32.load call_indirect $0 (type $i64_i64_i32_i32_=>_i64) local.set $14 - local.get $6 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|042 end end @@ -47879,63 +47785,63 @@ local.get $0 i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 i32.const 0 f32.const 1 call $~lib/typedarray/Float32Array#__set - local.get $2 + local.get $3 i32.const 1 f32.const 2 call $~lib/typedarray/Float32Array#__set - local.get $2 + local.get $3 i32.const 2 f32.const 3 call $~lib/typedarray/Float32Array#__set global.get $~lib/memory/__stack_pointer i32.const 3184 i32.store offset=4 - local.get $2 + local.get $3 i32.load offset=4 - local.set $1 + local.set $2 i32.const 0 - local.set $6 - local.get $2 + local.set $1 + local.get $3 i32.load offset=8 i32.const 2 i32.shr_u local.set $0 loop $for-loop|047 local.get $0 - local.get $6 + local.get $1 i32.gt_s if - local.get $6 + local.get $1 i32.const 2 i32.shl - local.get $1 + local.get $2 i32.add f32.load - local.set $5 + local.set $6 i32.const 4 global.set $~argumentsLength - local.get $15 - local.get $5 + local.get $13 local.get $6 - local.get $2 + local.get $1 + local.get $3 i32.const 3184 i32.load call_indirect $0 (type $f32_f32_i32_i32_=>_f32) - local.set $15 - local.get $6 + local.set $13 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|047 end end - local.get $15 + local.get $13 f32.const 6 f32.ne br_if $folding-inner1 @@ -47958,63 +47864,63 @@ local.get $0 i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $2 + local.get $3 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $2 + local.get $3 i32.const 2 f64.const 3 call $~lib/typedarray/Float64Array#__set global.get $~lib/memory/__stack_pointer i32.const 3216 i32.store offset=4 - local.get $2 + local.get $3 i32.load offset=4 - local.set $1 + local.set $2 i32.const 0 - local.set $6 - local.get $2 + local.set $1 + local.get $3 i32.load offset=8 i32.const 3 i32.shr_u local.set $0 loop $for-loop|052 local.get $0 - local.get $6 + local.get $1 i32.gt_s if - local.get $6 + local.get $1 i32.const 3 i32.shl - local.get $1 + local.get $2 i32.add f64.load - local.set $7 + local.set $8 i32.const 4 global.set $~argumentsLength - local.get $16 - local.get $7 - local.get $6 - local.get $2 + local.get $12 + local.get $8 + local.get $1 + local.get $3 i32.const 3216 i32.load call_indirect $0 (type $f64_f64_i32_i32_=>_f64) - local.set $16 - local.get $6 + local.set $12 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|052 end end - local.get $16 + local.get $12 f64.const 6 f64.ne br_if $folding-inner1 @@ -48598,17 +48504,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $2 + local.get $3 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $2 + local.get $3 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set @@ -48616,43 +48522,43 @@ i32.const 3248 i32.store offset=4 i32.const 0 - local.set $6 - local.get $2 + local.set $5 + local.get $3 i32.load offset=4 - local.set $1 - local.get $2 + local.set $2 + local.get $3 i32.load offset=8 i32.const 1 i32.sub - local.set $12 + local.set $1 loop $for-loop|059 - local.get $12 + local.get $1 i32.const 0 i32.ge_s if local.get $1 - local.get $12 + local.get $2 i32.add i32.load8_s local.set $0 i32.const 4 global.set $~argumentsLength - local.get $6 + local.get $5 local.get $0 - local.get $12 - local.get $2 + local.get $1 + local.get $3 i32.const 3248 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $6 - local.get $12 + local.set $5 + local.get $1 i32.const 1 i32.sub - local.set $12 + local.set $1 br $for-loop|059 end end - local.get $6 + local.get $5 i32.const 255 i32.and i32.const 6 @@ -48677,17 +48583,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $3 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $3 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8Array#__set @@ -48695,43 +48601,43 @@ i32.const 3280 i32.store offset=4 i32.const 0 - local.set $6 - local.get $2 + local.set $5 + local.get $3 i32.load offset=4 - local.set $1 - local.get $2 + local.set $2 + local.get $3 i32.load offset=8 i32.const 1 i32.sub - local.set $12 + local.set $1 loop $for-loop|064 - local.get $12 + local.get $1 i32.const 0 i32.ge_s if local.get $1 - local.get $12 + local.get $2 i32.add i32.load8_u local.set $0 i32.const 4 global.set $~argumentsLength - local.get $6 + local.get $5 local.get $0 - local.get $12 - local.get $2 + local.get $1 + local.get $3 i32.const 3280 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $6 - local.get $12 + local.set $5 + local.get $1 i32.const 1 i32.sub - local.set $12 + local.set $1 br $for-loop|064 end end - local.get $6 + local.get $5 i32.const 255 i32.and i32.const 6 @@ -48756,17 +48662,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $2 + local.get $3 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $2 + local.get $3 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set @@ -48774,43 +48680,43 @@ i32.const 3312 i32.store offset=4 i32.const 0 - local.set $6 - local.get $2 + local.set $5 + local.get $3 i32.load offset=4 - local.set $1 - local.get $2 + local.set $2 + local.get $3 i32.load offset=8 i32.const 1 i32.sub - local.set $12 + local.set $1 loop $for-loop|071 - local.get $12 + local.get $1 i32.const 0 i32.ge_s if local.get $1 - local.get $12 + local.get $2 i32.add i32.load8_u local.set $0 i32.const 4 global.set $~argumentsLength - local.get $6 + local.get $5 local.get $0 - local.get $12 - local.get $2 + local.get $1 + local.get $3 i32.const 3312 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $6 - local.get $12 + local.set $5 + local.get $1 i32.const 1 i32.sub - local.set $12 + local.set $1 br $for-loop|071 end end - local.get $6 + local.get $5 i32.const 255 i32.and i32.const 6 @@ -48835,17 +48741,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 i32.const 0 i32.const 1 call $~lib/typedarray/Int16Array#__set - local.get $2 + local.get $3 i32.const 1 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $2 + local.get $3 i32.const 2 i32.const 3 call $~lib/typedarray/Int16Array#__set @@ -48853,47 +48759,47 @@ i32.const 3344 i32.store offset=4 i32.const 0 - local.set $6 - local.get $2 + local.set $5 + local.get $3 i32.load offset=4 - local.set $1 - local.get $2 + local.set $2 + local.get $3 i32.load offset=8 i32.const 1 i32.shr_u i32.const 1 i32.sub - local.set $12 + local.set $1 loop $for-loop|076 - local.get $12 + local.get $1 i32.const 0 i32.ge_s if - local.get $12 + local.get $1 i32.const 1 i32.shl - local.get $1 + local.get $2 i32.add i32.load16_s local.set $0 i32.const 4 global.set $~argumentsLength - local.get $6 + local.get $5 local.get $0 - local.get $12 - local.get $2 + local.get $1 + local.get $3 i32.const 3344 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $6 - local.get $12 + local.set $5 + local.get $1 i32.const 1 i32.sub - local.set $12 + local.set $1 br $for-loop|076 end end - local.get $6 + local.get $5 i32.const 65535 i32.and i32.const 6 @@ -48918,17 +48824,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 i32.const 0 i32.const 1 call $~lib/typedarray/Uint16Array#__set - local.get $2 + local.get $3 i32.const 1 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $2 + local.get $3 i32.const 2 i32.const 3 call $~lib/typedarray/Uint16Array#__set @@ -48936,47 +48842,47 @@ i32.const 3376 i32.store offset=4 i32.const 0 - local.set $6 - local.get $2 + local.set $5 + local.get $3 i32.load offset=4 - local.set $1 - local.get $2 + local.set $2 + local.get $3 i32.load offset=8 i32.const 1 i32.shr_u i32.const 1 i32.sub - local.set $12 + local.set $1 loop $for-loop|081 - local.get $12 + local.get $1 i32.const 0 i32.ge_s if - local.get $12 + local.get $1 i32.const 1 i32.shl - local.get $1 + local.get $2 i32.add i32.load16_u local.set $0 i32.const 4 global.set $~argumentsLength - local.get $6 + local.get $5 local.get $0 - local.get $12 - local.get $2 + local.get $1 + local.get $3 i32.const 3376 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $6 - local.get $12 + local.set $5 + local.get $1 i32.const 1 i32.sub - local.set $12 + local.set $1 br $for-loop|081 end end - local.get $6 + local.get $5 i32.const 65535 i32.and i32.const 6 @@ -49001,17 +48907,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $2 + local.get $3 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $2 + local.get $3 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set @@ -49019,47 +48925,47 @@ i32.const 3408 i32.store offset=4 i32.const 0 - local.set $6 - local.get $2 + local.set $5 + local.get $3 i32.load offset=4 - local.set $1 - local.get $2 + local.set $2 + local.get $3 i32.load offset=8 i32.const 2 i32.shr_u i32.const 1 i32.sub - local.set $12 + local.set $1 loop $for-loop|086 - local.get $12 + local.get $1 i32.const 0 i32.ge_s if - local.get $12 + local.get $1 i32.const 2 i32.shl - local.get $1 + local.get $2 i32.add i32.load local.set $0 i32.const 4 global.set $~argumentsLength - local.get $6 + local.get $5 local.get $0 - local.get $12 - local.get $2 + local.get $1 + local.get $3 i32.const 3408 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $6 - local.get $12 + local.set $5 + local.get $1 i32.const 1 i32.sub - local.set $12 + local.set $1 br $for-loop|086 end end - local.get $6 + local.get $5 i32.const 6 i32.ne br_if $folding-inner5 @@ -49082,17 +48988,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 i32.const 0 i32.const 1 call $~lib/typedarray/Uint32Array#__set - local.get $2 + local.get $3 i32.const 1 i32.const 2 call $~lib/typedarray/Uint32Array#__set - local.get $2 + local.get $3 i32.const 2 i32.const 3 call $~lib/typedarray/Uint32Array#__set @@ -49100,47 +49006,47 @@ i32.const 3440 i32.store offset=4 i32.const 0 - local.set $6 - local.get $2 + local.set $5 + local.get $3 i32.load offset=4 - local.set $1 - local.get $2 + local.set $2 + local.get $3 i32.load offset=8 i32.const 2 i32.shr_u i32.const 1 i32.sub - local.set $12 + local.set $1 loop $for-loop|091 - local.get $12 + local.get $1 i32.const 0 i32.ge_s if - local.get $12 + local.get $1 i32.const 2 i32.shl - local.get $1 + local.get $2 i32.add i32.load local.set $0 i32.const 4 global.set $~argumentsLength - local.get $6 + local.get $5 local.get $0 - local.get $12 - local.get $2 + local.get $1 + local.get $3 i32.const 3440 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $6 - local.get $12 + local.set $5 + local.get $1 i32.const 1 i32.sub - local.set $12 + local.set $1 br $for-loop|091 end end - local.get $6 + local.get $5 i32.const 6 i32.ne br_if $folding-inner5 @@ -49163,17 +49069,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $1 + local.tee $2 i32.store - local.get $1 + local.get $2 i32.const 0 i64.const 1 call $~lib/typedarray/Int64Array#__set - local.get $1 + local.get $2 i32.const 1 i64.const 2 call $~lib/typedarray/Int64Array#__set - local.get $1 + local.get $2 i32.const 2 i64.const 3 call $~lib/typedarray/Int64Array#__set @@ -49182,42 +49088,42 @@ i32.store offset=4 i64.const 0 local.set $14 - local.get $1 + local.get $2 i32.load offset=4 local.set $0 - local.get $1 + local.get $2 i32.load offset=8 i32.const 3 i32.shr_u i32.const 1 i32.sub - local.set $12 + local.set $1 loop $for-loop|096 - local.get $12 + local.get $1 i32.const 0 i32.ge_s if - local.get $12 + local.get $1 i32.const 3 i32.shl local.get $0 i32.add i64.load - local.set $10 + local.set $11 i32.const 4 global.set $~argumentsLength local.get $14 - local.get $10 - local.get $12 + local.get $11 local.get $1 + local.get $2 i32.const 3472 i32.load call_indirect $0 (type $i64_i64_i32_i32_=>_i64) local.set $14 - local.get $12 + local.get $1 i32.const 1 i32.sub - local.set $12 + local.set $1 br $for-loop|096 end end @@ -49244,17 +49150,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint64Array#constructor - local.tee $1 + local.tee $2 i32.store - local.get $1 + local.get $2 i32.const 0 i64.const 1 call $~lib/typedarray/Uint64Array#__set - local.get $1 + local.get $2 i32.const 1 i64.const 2 call $~lib/typedarray/Uint64Array#__set - local.get $1 + local.get $2 i32.const 2 i64.const 3 call $~lib/typedarray/Uint64Array#__set @@ -49263,42 +49169,42 @@ i32.store offset=4 i64.const 0 local.set $14 - local.get $1 + local.get $2 i32.load offset=4 local.set $0 - local.get $1 + local.get $2 i32.load offset=8 i32.const 3 i32.shr_u i32.const 1 i32.sub - local.set $12 + local.set $1 loop $for-loop|0101 - local.get $12 + local.get $1 i32.const 0 i32.ge_s if - local.get $12 + local.get $1 i32.const 3 i32.shl local.get $0 i32.add i64.load - local.set $10 + local.set $11 i32.const 4 global.set $~argumentsLength local.get $14 - local.get $10 - local.get $12 + local.get $11 local.get $1 + local.get $2 i32.const 3504 i32.load call_indirect $0 (type $i64_i64_i32_i32_=>_i64) local.set $14 - local.get $12 + local.get $1 i32.const 1 i32.sub - local.set $12 + local.set $1 br $for-loop|0101 end end @@ -49325,17 +49231,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $1 + local.tee $2 i32.store - local.get $1 + local.get $2 i32.const 0 f32.const 1 call $~lib/typedarray/Float32Array#__set - local.get $1 + local.get $2 i32.const 1 f32.const 2 call $~lib/typedarray/Float32Array#__set - local.get $1 + local.get $2 i32.const 2 f32.const 3 call $~lib/typedarray/Float32Array#__set @@ -49343,47 +49249,47 @@ i32.const 3536 i32.store offset=4 f32.const 0 - local.set $15 - local.get $1 + local.set $13 + local.get $2 i32.load offset=4 local.set $0 - local.get $1 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u i32.const 1 i32.sub - local.set $12 + local.set $1 loop $for-loop|0106 - local.get $12 + local.get $1 i32.const 0 i32.ge_s if - local.get $12 + local.get $1 i32.const 2 i32.shl local.get $0 i32.add f32.load - local.set $5 + local.set $6 i32.const 4 global.set $~argumentsLength - local.get $15 - local.get $5 - local.get $12 + local.get $13 + local.get $6 local.get $1 + local.get $2 i32.const 3536 i32.load call_indirect $0 (type $f32_f32_i32_i32_=>_f32) - local.set $15 - local.get $12 + local.set $13 + local.get $1 i32.const 1 i32.sub - local.set $12 + local.set $1 br $for-loop|0106 end end - local.get $15 + local.get $13 f32.const 6 f32.ne br_if $folding-inner5 @@ -49406,17 +49312,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $1 + local.tee $2 i32.store - local.get $1 + local.get $2 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $2 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $2 i32.const 2 f64.const 3 call $~lib/typedarray/Float64Array#__set @@ -49424,47 +49330,47 @@ i32.const 3568 i32.store offset=4 f64.const 0 - local.set $16 - local.get $1 + local.set $12 + local.get $2 i32.load offset=4 local.set $0 - local.get $1 + local.get $2 i32.load offset=8 i32.const 3 i32.shr_u i32.const 1 i32.sub - local.set $12 + local.set $1 loop $for-loop|0111 - local.get $12 + local.get $1 i32.const 0 i32.ge_s if - local.get $12 + local.get $1 i32.const 3 i32.shl local.get $0 i32.add f64.load - local.set $7 + local.set $8 i32.const 4 global.set $~argumentsLength - local.get $16 - local.get $7 local.get $12 + local.get $8 local.get $1 + local.get $2 i32.const 3568 i32.load call_indirect $0 (type $f64_f64_i32_i32_=>_f64) - local.set $16 - local.get $12 + local.set $12 + local.get $1 i32.const 1 i32.sub - local.set $12 + local.set $1 br $for-loop|0111 end end - local.get $16 + local.get $12 f64.const 6 f64.ne br_if $folding-inner5 @@ -49491,17 +49397,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $8 + local.tee $7 i32.store - local.get $8 + local.get $7 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $8 + local.get $7 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $8 + local.get $7 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set @@ -49521,10 +49427,10 @@ local.tee $0 i64.const 0 i64.store - local.get $8 + local.get $7 i32.load offset=8 local.set $4 - local.get $8 + local.get $7 i32.load offset=4 local.set $3 local.get $0 @@ -49541,30 +49447,30 @@ i32.store offset=4 loop $for-loop|02 local.get $4 - local.get $11 + local.get $15 i32.gt_s if local.get $3 - local.get $11 + local.get $15 i32.add i32.load8_s local.set $0 i32.const 3 global.set $~argumentsLength local.get $1 - local.get $11 + local.get $15 i32.add local.get $0 - local.get $11 - local.get $8 + local.get $15 + local.get $7 i32.const 3600 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.store8 - local.get $11 + local.get $15 i32.const 1 i32.add - local.set $11 + local.set $15 br $for-loop|02 end end @@ -49614,7 +49520,7 @@ br $__inlined_func$std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> end i32.const 0 - local.set $11 + local.set $15 global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -49634,17 +49540,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor - local.tee $8 + local.tee $7 i32.store - local.get $8 + local.get $7 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8Array#__set - local.get $8 + local.get $7 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8Array#__set - local.get $8 + local.get $7 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8Array#__set @@ -49664,10 +49570,10 @@ local.tee $0 i64.const 0 i64.store - local.get $8 + local.get $7 i32.load offset=8 local.set $4 - local.get $8 + local.get $7 i32.load offset=4 local.set $3 local.get $0 @@ -49684,30 +49590,30 @@ i32.store offset=4 loop $for-loop|04 local.get $4 - local.get $11 + local.get $15 i32.gt_s if local.get $3 - local.get $11 + local.get $15 i32.add i32.load8_u local.set $0 i32.const 3 global.set $~argumentsLength local.get $1 - local.get $11 + local.get $15 i32.add local.get $0 - local.get $11 - local.get $8 + local.get $15 + local.get $7 i32.const 3632 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.store8 - local.get $11 + local.get $15 i32.const 1 i32.add - local.set $11 + local.set $15 br $for-loop|04 end end @@ -49757,7 +49663,7 @@ br $__inlined_func$std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> end i32.const 0 - local.set $11 + local.set $15 global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -49777,17 +49683,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $8 + local.tee $7 i32.store - local.get $8 + local.get $7 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $8 + local.get $7 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $8 + local.get $7 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set @@ -49807,10 +49713,10 @@ local.tee $0 i64.const 0 i64.store - local.get $8 + local.get $7 i32.load offset=8 local.set $4 - local.get $8 + local.get $7 i32.load offset=4 local.set $3 local.get $0 @@ -49827,30 +49733,30 @@ i32.store offset=4 loop $for-loop|08 local.get $4 - local.get $11 + local.get $15 i32.gt_s if local.get $3 - local.get $11 + local.get $15 i32.add i32.load8_u local.set $0 i32.const 3 global.set $~argumentsLength local.get $1 - local.get $11 + local.get $15 i32.add local.get $0 - local.get $11 - local.get $8 + local.get $15 + local.get $7 i32.const 3664 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.store8 - local.get $11 + local.get $15 i32.const 1 i32.add - local.set $11 + local.set $15 br $for-loop|08 end end @@ -49900,7 +49806,7 @@ br $__inlined_func$std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> end i32.const 0 - local.set $12 + local.set $15 global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -49920,17 +49826,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $11 + local.tee $10 i32.store - local.get $11 + local.get $10 i32.const 0 i32.const 1 call $~lib/typedarray/Int16Array#__set - local.get $11 + local.get $10 i32.const 1 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $11 + local.get $10 i32.const 2 i32.const 3 call $~lib/typedarray/Int16Array#__set @@ -49950,14 +49856,14 @@ local.tee $0 i64.const 0 i64.store - local.get $11 + local.get $10 i32.load offset=8 i32.const 1 i32.shr_u - local.set $8 - local.get $11 + local.set $7 + local.get $10 i32.load offset=4 - local.set $6 + local.set $5 local.get $0 i32.const 12 i32.const 6 @@ -49965,7 +49871,7 @@ local.tee $4 i32.store global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.const 1 i32.shl local.tee $3 @@ -49974,15 +49880,15 @@ local.tee $2 i32.store offset=4 loop $for-loop|011 - local.get $8 - local.get $12 + local.get $7 + local.get $15 i32.gt_s if - local.get $12 + local.get $15 i32.const 1 i32.shl local.tee $1 - local.get $6 + local.get $5 i32.add i32.load16_s local.set $0 @@ -49992,16 +49898,16 @@ local.get $2 i32.add local.get $0 - local.get $12 - local.get $11 + local.get $15 + local.get $10 i32.const 3696 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.store16 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|011 end end @@ -50051,7 +49957,7 @@ br $__inlined_func$std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> end i32.const 0 - local.set $12 + local.set $15 global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -50071,17 +49977,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $11 + local.tee $10 i32.store - local.get $11 + local.get $10 i32.const 0 i32.const 1 call $~lib/typedarray/Uint16Array#__set - local.get $11 + local.get $10 i32.const 1 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $11 + local.get $10 i32.const 2 i32.const 3 call $~lib/typedarray/Uint16Array#__set @@ -50101,14 +50007,14 @@ local.tee $0 i64.const 0 i64.store - local.get $11 + local.get $10 i32.load offset=8 i32.const 1 i32.shr_u - local.set $8 - local.get $11 + local.set $7 + local.get $10 i32.load offset=4 - local.set $6 + local.set $5 local.get $0 i32.const 12 i32.const 7 @@ -50116,7 +50022,7 @@ local.tee $4 i32.store global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.const 1 i32.shl local.tee $3 @@ -50125,15 +50031,15 @@ local.tee $2 i32.store offset=4 loop $for-loop|014 - local.get $8 - local.get $12 + local.get $7 + local.get $15 i32.gt_s if - local.get $12 + local.get $15 i32.const 1 i32.shl local.tee $1 - local.get $6 + local.get $5 i32.add i32.load16_u local.set $0 @@ -50143,16 +50049,16 @@ local.get $2 i32.add local.get $0 - local.get $12 - local.get $11 + local.get $15 + local.get $10 i32.const 3728 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.store16 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|014 end end @@ -50202,7 +50108,7 @@ br $__inlined_func$std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> end i32.const 0 - local.set $12 + local.set $15 global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -50222,17 +50128,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $11 + local.tee $10 i32.store - local.get $11 + local.get $10 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $11 + local.get $10 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $11 + local.get $10 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set @@ -50252,14 +50158,14 @@ local.tee $0 i64.const 0 i64.store - local.get $11 + local.get $10 i32.load offset=8 i32.const 2 i32.shr_u - local.set $8 - local.get $11 + local.set $7 + local.get $10 i32.load offset=4 - local.set $6 + local.set $5 local.get $0 i32.const 12 i32.const 8 @@ -50267,7 +50173,7 @@ local.tee $4 i32.store global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.const 2 i32.shl local.tee $3 @@ -50276,15 +50182,15 @@ local.tee $2 i32.store offset=4 loop $for-loop|018 - local.get $8 - local.get $12 + local.get $7 + local.get $15 i32.gt_s if - local.get $12 + local.get $15 i32.const 2 i32.shl local.tee $1 - local.get $6 + local.get $5 i32.add i32.load local.set $0 @@ -50294,16 +50200,16 @@ local.get $2 i32.add local.get $0 - local.get $12 - local.get $11 + local.get $15 + local.get $10 i32.const 3760 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.store - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|018 end end @@ -50353,7 +50259,7 @@ br $__inlined_func$std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> end i32.const 0 - local.set $12 + local.set $15 global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -50373,17 +50279,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $11 + local.tee $10 i32.store - local.get $11 + local.get $10 i32.const 0 i32.const 1 call $~lib/typedarray/Uint32Array#__set - local.get $11 + local.get $10 i32.const 1 i32.const 2 call $~lib/typedarray/Uint32Array#__set - local.get $11 + local.get $10 i32.const 2 i32.const 3 call $~lib/typedarray/Uint32Array#__set @@ -50403,14 +50309,14 @@ local.tee $0 i64.const 0 i64.store - local.get $11 + local.get $10 i32.load offset=8 i32.const 2 i32.shr_u - local.set $8 - local.get $11 + local.set $7 + local.get $10 i32.load offset=4 - local.set $6 + local.set $5 local.get $0 i32.const 12 i32.const 9 @@ -50418,7 +50324,7 @@ local.tee $4 i32.store global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.const 2 i32.shl local.tee $3 @@ -50427,15 +50333,15 @@ local.tee $2 i32.store offset=4 loop $for-loop|021 - local.get $8 - local.get $12 + local.get $7 + local.get $15 i32.gt_s if - local.get $12 + local.get $15 i32.const 2 i32.shl local.tee $1 - local.get $6 + local.get $5 i32.add i32.load local.set $0 @@ -50445,16 +50351,16 @@ local.get $2 i32.add local.get $0 - local.get $12 - local.get $11 + local.get $15 + local.get $10 i32.const 3792 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.store - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|021 end end @@ -50504,7 +50410,7 @@ br $__inlined_func$std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> end i32.const 0 - local.set $11 + local.set $15 global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -50558,7 +50464,7 @@ i32.load offset=8 i32.const 3 i32.shr_u - local.set $6 + local.set $5 local.get $9 i32.load offset=4 local.set $4 @@ -50569,7 +50475,7 @@ local.tee $3 i32.store global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.const 3 i32.shl local.tee $2 @@ -50578,34 +50484,34 @@ local.tee $1 i32.store offset=4 loop $for-loop|024 - local.get $6 - local.get $11 + local.get $5 + local.get $15 i32.gt_s if - local.get $11 + local.get $15 i32.const 3 i32.shl local.tee $0 local.get $4 i32.add i64.load - local.set $10 + local.set $11 i32.const 3 global.set $~argumentsLength local.get $0 local.get $1 i32.add - local.get $10 local.get $11 + local.get $15 local.get $9 i32.const 3824 i32.load call_indirect $0 (type $i64_i32_i32_=>_i64) i64.store - local.get $11 + local.get $15 i32.const 1 i32.add - local.set $11 + local.set $15 br $for-loop|024 end end @@ -50655,7 +50561,7 @@ br $__inlined_func$std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> end i32.const 0 - local.set $11 + local.set $15 global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -50709,7 +50615,7 @@ i32.load offset=8 i32.const 3 i32.shr_u - local.set $6 + local.set $5 local.get $9 i32.load offset=4 local.set $4 @@ -50720,7 +50626,7 @@ local.tee $3 i32.store global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.const 3 i32.shl local.tee $2 @@ -50729,34 +50635,34 @@ local.tee $1 i32.store offset=4 loop $for-loop|028 - local.get $6 - local.get $11 + local.get $5 + local.get $15 i32.gt_s if - local.get $11 + local.get $15 i32.const 3 i32.shl local.tee $0 local.get $4 i32.add i64.load - local.set $10 + local.set $11 i32.const 3 global.set $~argumentsLength local.get $0 local.get $1 i32.add - local.get $10 local.get $11 + local.get $15 local.get $9 i32.const 3856 i32.load call_indirect $0 (type $i64_i32_i32_=>_i64) i64.store - local.get $11 + local.get $15 i32.const 1 i32.add - local.set $11 + local.set $15 br $for-loop|028 end end @@ -50806,7 +50712,7 @@ br $__inlined_func$std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> end i32.const 0 - local.set $11 + local.set $15 global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -50860,7 +50766,7 @@ i32.load offset=8 i32.const 2 i32.shr_u - local.set $6 + local.set $5 local.get $9 i32.load offset=4 local.set $4 @@ -50871,7 +50777,7 @@ local.tee $3 i32.store global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.const 2 i32.shl local.tee $2 @@ -50880,34 +50786,34 @@ local.tee $1 i32.store offset=4 loop $for-loop|031 - local.get $6 - local.get $11 + local.get $5 + local.get $15 i32.gt_s if - local.get $11 + local.get $15 i32.const 2 i32.shl local.tee $0 local.get $4 i32.add f32.load - local.set $5 + local.set $6 i32.const 3 global.set $~argumentsLength local.get $0 local.get $1 i32.add - local.get $5 - local.get $11 + local.get $6 + local.get $15 local.get $9 i32.const 3888 i32.load call_indirect $0 (type $f32_i32_i32_=>_f32) f32.store - local.get $11 + local.get $15 i32.const 1 i32.add - local.set $11 + local.set $15 br $for-loop|031 end end @@ -50957,7 +50863,7 @@ br $__inlined_func$std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> end i32.const 0 - local.set $11 + local.set $15 global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -51011,7 +50917,7 @@ i32.load offset=8 i32.const 3 i32.shr_u - local.set $6 + local.set $5 local.get $9 i32.load offset=4 local.set $4 @@ -51022,7 +50928,7 @@ local.tee $3 i32.store global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.const 3 i32.shl local.tee $2 @@ -51031,34 +50937,34 @@ local.tee $1 i32.store offset=4 loop $for-loop|034 - local.get $6 - local.get $11 + local.get $5 + local.get $15 i32.gt_s if - local.get $11 + local.get $15 i32.const 3 i32.shl local.tee $0 local.get $4 i32.add f64.load - local.set $7 + local.set $8 i32.const 3 global.set $~argumentsLength local.get $0 local.get $1 i32.add - local.get $7 - local.get $11 + local.get $8 + local.get $15 local.get $9 i32.const 3920 i32.load call_indirect $0 (type $f64_i32_i32_=>_f64) f64.store - local.get $11 + local.get $15 i32.const 1 i32.add - local.set $11 + local.set $15 br $for-loop|034 end end @@ -51118,8 +51024,6 @@ call $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> call $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> call $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> - i32.const 0 - local.set $6 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -51156,16 +51060,18 @@ local.get $3 i32.load offset=4 local.set $2 + i32.const 0 + local.set $5 local.get $3 i32.load offset=8 local.set $1 loop $for-loop|012 local.get $1 - local.get $6 + local.get $5 i32.gt_s if local.get $2 - local.get $6 + local.get $5 i32.add i32.load8_s local.set $0 @@ -51173,17 +51079,17 @@ global.set $~argumentsLength i32.const 1 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 4304 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|012 end end @@ -51199,17 +51105,17 @@ i32.load offset=4 local.set $2 i32.const 0 - local.set $6 + local.set $5 local.get $3 i32.load offset=8 local.set $1 loop $for-loop|0436 local.get $1 - local.get $6 + local.get $5 i32.gt_s if local.get $2 - local.get $6 + local.get $5 i32.add i32.load8_s local.set $0 @@ -51217,17 +51123,17 @@ global.set $~argumentsLength i32.const 1 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 4336 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.01 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0436 end end @@ -51238,8 +51144,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $6 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -51276,16 +51180,18 @@ local.get $3 i32.load offset=4 local.set $2 + i32.const 0 + local.set $5 local.get $3 i32.load offset=8 local.set $1 loop $for-loop|01437 local.get $1 - local.get $6 + local.get $5 i32.gt_s if local.get $2 - local.get $6 + local.get $5 i32.add i32.load8_u local.set $0 @@ -51293,17 +51199,17 @@ global.set $~argumentsLength i32.const 1 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 4368 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|01437 end end @@ -51319,17 +51225,17 @@ i32.load offset=4 local.set $2 i32.const 0 - local.set $6 + local.set $5 local.get $3 i32.load offset=8 local.set $1 loop $for-loop|0415 local.get $1 - local.get $6 + local.get $5 i32.gt_s if local.get $2 - local.get $6 + local.get $5 i32.add i32.load8_u local.set $0 @@ -51337,17 +51243,17 @@ global.set $~argumentsLength i32.const 1 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 4400 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.01 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0415 end end @@ -51358,8 +51264,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $6 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -51396,16 +51300,18 @@ local.get $3 i32.load offset=4 local.set $2 + i32.const 0 + local.set $5 local.get $3 i32.load offset=8 local.set $1 loop $for-loop|01838 local.get $1 - local.get $6 + local.get $5 i32.gt_s if local.get $2 - local.get $6 + local.get $5 i32.add i32.load8_u local.set $0 @@ -51413,17 +51319,17 @@ global.set $~argumentsLength i32.const 1 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 4432 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.016 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|01838 end end @@ -51439,17 +51345,17 @@ i32.load offset=4 local.set $2 i32.const 0 - local.set $6 + local.set $5 local.get $3 i32.load offset=8 local.set $1 loop $for-loop|0420 local.get $1 - local.get $6 + local.get $5 i32.gt_s if local.get $2 - local.get $6 + local.get $5 i32.add i32.load8_u local.set $0 @@ -51457,17 +51363,17 @@ global.set $~argumentsLength i32.const 1 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 4464 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0119 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0420 end end @@ -51478,8 +51384,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $6 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -51516,6 +51420,8 @@ local.get $3 i32.load offset=4 local.set $2 + i32.const 0 + local.set $5 local.get $3 i32.load offset=8 i32.const 1 @@ -51523,10 +51429,10 @@ local.set $1 loop $for-loop|02139 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 1 i32.shl local.get $2 @@ -51537,17 +51443,17 @@ global.set $~argumentsLength i32.const 1 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 4496 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|02139 end end @@ -51563,7 +51469,7 @@ i32.load offset=4 local.set $2 i32.const 0 - local.set $6 + local.set $5 local.get $3 i32.load offset=8 i32.const 1 @@ -51571,10 +51477,10 @@ local.set $1 loop $for-loop|0422 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 1 i32.shl local.get $2 @@ -51585,17 +51491,17 @@ global.set $~argumentsLength i32.const 1 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 4528 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.01 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0422 end end @@ -51606,8 +51512,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $6 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -51644,6 +51548,8 @@ local.get $3 i32.load offset=4 local.set $2 + i32.const 0 + local.set $5 local.get $3 i32.load offset=8 i32.const 1 @@ -51651,10 +51557,10 @@ local.set $1 loop $for-loop|023 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 1 i32.shl local.get $2 @@ -51665,17 +51571,17 @@ global.set $~argumentsLength i32.const 1 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 4560 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|023 end end @@ -51691,7 +51597,7 @@ i32.load offset=4 local.set $2 i32.const 0 - local.set $6 + local.set $5 local.get $3 i32.load offset=8 i32.const 1 @@ -51699,10 +51605,10 @@ local.set $1 loop $for-loop|0424 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 1 i32.shl local.get $2 @@ -51713,17 +51619,17 @@ global.set $~argumentsLength i32.const 1 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 4592 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.01 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0424 end end @@ -51734,8 +51640,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $6 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -51772,6 +51676,8 @@ local.get $3 i32.load offset=4 local.set $2 + i32.const 0 + local.set $5 local.get $3 i32.load offset=8 i32.const 2 @@ -51779,10 +51685,10 @@ local.set $1 loop $for-loop|025 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 2 i32.shl local.get $2 @@ -51793,17 +51699,17 @@ global.set $~argumentsLength i32.const 1 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 4624 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|025 end end @@ -51819,7 +51725,7 @@ i32.load offset=4 local.set $2 i32.const 0 - local.set $6 + local.set $5 local.get $3 i32.load offset=8 i32.const 2 @@ -51827,10 +51733,10 @@ local.set $1 loop $for-loop|0426 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 2 i32.shl local.get $2 @@ -51841,17 +51747,17 @@ global.set $~argumentsLength i32.const 1 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 4656 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.01 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0426 end end @@ -51862,8 +51768,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $6 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -51900,6 +51804,8 @@ local.get $3 i32.load offset=4 local.set $2 + i32.const 0 + local.set $5 local.get $3 i32.load offset=8 i32.const 2 @@ -51907,10 +51813,10 @@ local.set $1 loop $for-loop|02840 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 2 i32.shl local.get $2 @@ -51921,17 +51827,17 @@ global.set $~argumentsLength i32.const 1 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 4688 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Uint32Array,u32>|inlined.0 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|02840 end end @@ -51947,7 +51853,7 @@ i32.load offset=4 local.set $2 i32.const 0 - local.set $6 + local.set $5 local.get $3 i32.load offset=8 i32.const 2 @@ -51955,10 +51861,10 @@ local.set $1 loop $for-loop|0429 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 2 i32.shl local.get $2 @@ -51969,17 +51875,17 @@ global.set $~argumentsLength i32.const 1 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 4720 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Uint32Array,u32>|inlined.01 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0429 end end @@ -51990,8 +51896,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $8 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -52028,6 +51932,8 @@ local.get $2 i32.load offset=4 local.set $1 + i32.const 0 + local.set $5 local.get $2 i32.load offset=8 i32.const 3 @@ -52035,31 +51941,31 @@ local.set $0 loop $for-loop|030 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 3 i32.shl local.get $1 i32.add i64.load - local.set $10 + local.set $11 i32.const 3 global.set $~argumentsLength i32.const 1 - local.get $10 - local.get $8 + local.get $11 + local.get $5 local.get $2 i32.const 4752 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|030 end end @@ -52075,7 +51981,7 @@ i32.load offset=4 local.set $1 i32.const 0 - local.set $8 + local.set $5 local.get $2 i32.load offset=8 i32.const 3 @@ -52083,31 +51989,31 @@ local.set $0 loop $for-loop|0431 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 3 i32.shl local.get $1 i32.add i64.load - local.set $10 + local.set $11 i32.const 3 global.set $~argumentsLength i32.const 1 - local.get $10 - local.get $8 + local.get $11 + local.get $5 local.get $2 i32.const 4784 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.01 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|0431 end end @@ -52118,8 +52024,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $8 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -52156,6 +52060,8 @@ local.get $2 i32.load offset=4 local.set $1 + i32.const 0 + local.set $5 local.get $2 i32.load offset=8 i32.const 3 @@ -52163,31 +52069,31 @@ local.set $0 loop $for-loop|033 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 3 i32.shl local.get $1 i32.add i64.load - local.set $10 + local.set $11 i32.const 3 global.set $~argumentsLength i32.const 1 - local.get $10 - local.get $8 + local.get $11 + local.get $5 local.get $2 i32.const 4816 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Uint64Array,u64>|inlined.0 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|033 end end @@ -52203,7 +52109,7 @@ i32.load offset=4 local.set $1 i32.const 0 - local.set $8 + local.set $5 local.get $2 i32.load offset=8 i32.const 3 @@ -52211,31 +52117,31 @@ local.set $0 loop $for-loop|0434 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 3 i32.shl local.get $1 i32.add i64.load - local.set $10 + local.set $11 i32.const 3 global.set $~argumentsLength i32.const 1 - local.get $10 - local.get $8 + local.get $11 + local.get $5 local.get $2 i32.const 4848 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Uint64Array,u64>|inlined.01 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|0434 end end @@ -52246,8 +52152,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $8 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -52284,6 +52188,8 @@ local.get $2 i32.load offset=4 local.set $1 + i32.const 0 + local.set $5 local.get $2 i32.load offset=8 i32.const 2 @@ -52291,31 +52197,31 @@ local.set $0 loop $for-loop|035 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 2 i32.shl local.get $1 i32.add f32.load - local.set $5 + local.set $6 i32.const 3 global.set $~argumentsLength i32.const 1 + local.get $6 local.get $5 - local.get $8 local.get $2 i32.const 4880 i32.load call_indirect $0 (type $f32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|035 end end @@ -52331,7 +52237,7 @@ i32.load offset=4 local.set $1 i32.const 0 - local.set $8 + local.set $5 local.get $2 i32.load offset=8 i32.const 2 @@ -52339,31 +52245,31 @@ local.set $0 loop $for-loop|043641 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 2 i32.shl local.get $1 i32.add f32.load - local.set $5 + local.set $6 i32.const 3 global.set $~argumentsLength i32.const 1 + local.get $6 local.get $5 - local.get $8 local.get $2 i32.const 4912 i32.load call_indirect $0 (type $f32_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.01 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|043641 end end @@ -52374,8 +52280,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $8 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -52412,6 +52316,8 @@ local.get $2 i32.load offset=4 local.set $1 + i32.const 0 + local.set $5 local.get $2 i32.load offset=8 i32.const 3 @@ -52419,31 +52325,31 @@ local.set $0 loop $for-loop|038 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 3 i32.shl local.get $1 i32.add f64.load - local.set $7 + local.set $8 i32.const 3 global.set $~argumentsLength i32.const 1 - local.get $7 local.get $8 + local.get $5 local.get $2 i32.const 4944 i32.load call_indirect $0 (type $f64_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|038 end end @@ -52459,7 +52365,7 @@ i32.load offset=4 local.set $1 i32.const 0 - local.set $8 + local.set $5 local.get $2 i32.load offset=8 i32.const 3 @@ -52467,31 +52373,31 @@ local.set $0 loop $for-loop|0439 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 3 i32.shl local.get $1 i32.add f64.load - local.set $7 + local.set $8 i32.const 3 global.set $~argumentsLength i32.const 1 - local.get $7 local.get $8 + local.get $5 local.get $2 i32.const 4976 i32.load call_indirect $0 (type $f64_i32_i32_=>_i32) br_if $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.01 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|0439 end end @@ -52502,8 +52408,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -52513,111 +52417,109 @@ i32.lt_s br_if $folding-inner21 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i64.const 0 i64.store - local.get $1 + local.get $0 i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $4 + local.tee $3 i32.store - local.get $4 + local.get $3 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $4 + local.get $3 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $4 + local.get $3 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5008 - i32.store offset=4 - local.get $4 - i32.load offset=4 - local.set $3 - local.get $4 - i32.load offset=8 - local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 5008 + i32.store offset=4 + local.get $3 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $5 + local.get $3 + i32.load offset=8 + local.set $1 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 loop $for-loop|040 - local.get $0 - local.get $2 - i32.lt_s + local.get $1 + local.get $5 + i32.gt_s if - local.get $0 - local.get $3 + local.get $2 + local.get $5 i32.add i32.load8_s - local.set $1 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.const 5008 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|040 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner25 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5040 - i32.store offset=4 - local.get $4 - i32.load offset=4 - local.set $3 - i32.const 0 - local.set $0 - local.get $4 - i32.load offset=8 - local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 5040 + i32.store offset=4 + local.get $3 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $5 + local.get $3 + i32.load offset=8 + local.set $1 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.01 loop $for-loop|0441 - local.get $0 - local.get $2 - i32.lt_s + local.get $1 + local.get $5 + i32.gt_s if - local.get $0 - local.get $3 + local.get $2 + local.get $5 i32.add i32.load8_s - local.set $1 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.const 5040 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.01 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0441 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner26 @@ -52625,8 +52527,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -52636,111 +52536,109 @@ i32.lt_s br_if $folding-inner21 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i64.const 0 i64.store - local.get $1 + local.get $0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor - local.tee $4 + local.tee $3 i32.store - local.get $4 + local.get $3 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8Array#__set - local.get $4 + local.get $3 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8Array#__set - local.get $4 + local.get $3 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8Array#__set - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5072 - i32.store offset=4 - local.get $4 - i32.load offset=4 - local.set $3 - local.get $4 - i32.load offset=8 - local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 5072 + i32.store offset=4 + local.get $3 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $5 + local.get $3 + i32.load offset=8 + local.set $1 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 loop $for-loop|043 - local.get $0 - local.get $2 - i32.lt_s + local.get $1 + local.get $5 + i32.gt_s if - local.get $0 - local.get $3 + local.get $2 + local.get $5 i32.add i32.load8_u - local.set $1 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.const 5072 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|043 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner25 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5104 - i32.store offset=4 - local.get $4 - i32.load offset=4 - local.set $3 - i32.const 0 - local.set $0 - local.get $4 - i32.load offset=8 - local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 5104 + i32.store offset=4 + local.get $3 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $5 + local.get $3 + i32.load offset=8 + local.set $1 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.01 loop $for-loop|0444 - local.get $0 - local.get $2 - i32.lt_s + local.get $1 + local.get $5 + i32.gt_s if - local.get $0 - local.get $3 + local.get $2 + local.get $5 i32.add i32.load8_u - local.set $1 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.const 5104 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.01 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0444 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner26 @@ -52748,8 +52646,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -52759,111 +52655,109 @@ i32.lt_s br_if $folding-inner21 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i64.const 0 i64.store - local.get $1 + local.get $0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $4 + local.tee $3 i32.store - local.get $4 + local.get $3 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $4 + local.get $3 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $4 + local.get $3 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.045 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5136 - i32.store offset=4 - local.get $4 - i32.load offset=4 - local.set $3 - local.get $4 - i32.load offset=8 - local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 5136 + i32.store offset=4 + local.get $3 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $5 + local.get $3 + i32.load offset=8 + local.set $1 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.045 loop $for-loop|046 - local.get $0 - local.get $2 - i32.lt_s + local.get $1 + local.get $5 + i32.gt_s if - local.get $0 - local.get $3 + local.get $2 + local.get $5 i32.add i32.load8_u - local.set $1 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.const 5136 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.045 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|046 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner25 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0147 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5168 - i32.store offset=4 - local.get $4 - i32.load offset=4 - local.set $3 - i32.const 0 - local.set $0 - local.get $4 - i32.load offset=8 - local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 5168 + i32.store offset=4 + local.get $3 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $5 + local.get $3 + i32.load offset=8 + local.set $1 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0147 loop $for-loop|0448 - local.get $0 - local.get $2 - i32.lt_s + local.get $1 + local.get $5 + i32.gt_s if - local.get $0 - local.get $3 + local.get $2 + local.get $5 i32.add i32.load8_u - local.set $1 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.const 5168 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0147 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0448 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner26 @@ -52871,8 +52765,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -52882,119 +52774,117 @@ i32.lt_s br_if $folding-inner21 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i64.const 0 i64.store - local.get $1 + local.get $0 i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $4 + local.tee $3 i32.store - local.get $4 + local.get $3 i32.const 0 i32.const 1 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $3 i32.const 1 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $3 i32.const 2 i32.const 3 call $~lib/typedarray/Int16Array#__set - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5200 - i32.store offset=4 - local.get $4 - i32.load offset=4 - local.set $3 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 5200 + i32.store offset=4 + local.get $3 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $5 + local.get $3 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 loop $for-loop|049 - local.get $0 - local.get $2 - i32.lt_s + local.get $1 + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 1 i32.shl - local.get $3 + local.get $2 i32.add i32.load16_s - local.set $1 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.const 5200 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|049 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner25 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5232 - i32.store offset=4 - local.get $4 - i32.load offset=4 - local.set $3 - i32.const 0 - local.set $0 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 5232 + i32.store offset=4 + local.get $3 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $5 + local.get $3 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.01 loop $for-loop|0450 - local.get $0 - local.get $2 - i32.lt_s + local.get $1 + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 1 i32.shl - local.get $3 + local.get $2 i32.add i32.load16_s - local.set $1 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.const 5232 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.01 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0450 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner26 @@ -53002,8 +52892,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -53013,119 +52901,117 @@ i32.lt_s br_if $folding-inner21 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i64.const 0 i64.store - local.get $1 + local.get $0 i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $4 + local.tee $3 i32.store - local.get $4 + local.get $3 i32.const 0 i32.const 1 call $~lib/typedarray/Uint16Array#__set - local.get $4 + local.get $3 i32.const 1 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $4 + local.get $3 i32.const 2 i32.const 3 call $~lib/typedarray/Uint16Array#__set - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5264 - i32.store offset=4 - local.get $4 - i32.load offset=4 - local.set $3 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 5264 + i32.store offset=4 + local.get $3 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $5 + local.get $3 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 loop $for-loop|051 - local.get $0 - local.get $2 - i32.lt_s + local.get $1 + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 1 i32.shl - local.get $3 + local.get $2 i32.add i32.load16_u - local.set $1 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.const 5264 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|051 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner25 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5296 - i32.store offset=4 - local.get $4 - i32.load offset=4 - local.set $3 - i32.const 0 - local.set $0 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $2 - loop $for-loop|0452 - local.get $0 - local.get $2 - i32.lt_s - if - local.get $0 - i32.const 1 - i32.shl - local.get $3 - i32.add + global.get $~lib/memory/__stack_pointer + i32.const 5296 + i32.store offset=4 + local.get $3 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $5 + local.get $3 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.01 + loop $for-loop|0452 + local.get $1 + local.get $5 + i32.gt_s + if + local.get $5 + i32.const 1 + i32.shl + local.get $2 + i32.add i32.load16_u - local.set $1 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.const 5296 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.01 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0452 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner26 @@ -53133,8 +53019,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -53144,119 +53028,117 @@ i32.lt_s br_if $folding-inner21 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i64.const 0 i64.store - local.get $1 + local.get $0 i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $4 + local.tee $3 i32.store - local.get $4 + local.get $3 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $4 + local.get $3 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $4 + local.get $3 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5328 - i32.store offset=4 - local.get $4 - i32.load offset=4 - local.set $3 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 5328 + i32.store offset=4 + local.get $3 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $5 + local.get $3 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $1 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 loop $for-loop|053 - local.get $0 - local.get $2 - i32.lt_s + local.get $1 + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load - local.set $1 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.const 5328 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|053 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner25 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5360 - i32.store offset=4 - local.get $4 - i32.load offset=4 - local.set $3 - i32.const 0 - local.set $0 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 5360 + i32.store offset=4 + local.get $3 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $5 + local.get $3 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $1 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.01 loop $for-loop|0454 - local.get $0 - local.get $2 - i32.lt_s + local.get $1 + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load - local.set $1 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.const 5360 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.01 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0454 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner26 @@ -53264,8 +53146,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -53275,119 +53155,117 @@ i32.lt_s br_if $folding-inner21 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i64.const 0 i64.store - local.get $1 + local.get $0 i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $4 + local.tee $3 i32.store - local.get $4 + local.get $3 i32.const 0 i32.const 1 call $~lib/typedarray/Uint32Array#__set - local.get $4 + local.get $3 i32.const 1 i32.const 2 call $~lib/typedarray/Uint32Array#__set - local.get $4 + local.get $3 i32.const 2 i32.const 3 call $~lib/typedarray/Uint32Array#__set - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5392 - i32.store offset=4 - local.get $4 - i32.load offset=4 - local.set $3 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 5392 + i32.store offset=4 + local.get $3 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $5 + local.get $3 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $1 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 loop $for-loop|055 - local.get $0 - local.get $2 - i32.lt_s + local.get $1 + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load - local.set $1 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.const 5392 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|055 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner25 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5424 - i32.store offset=4 - local.get $4 - i32.load offset=4 - local.set $3 - i32.const 0 - local.set $0 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 5424 + i32.store offset=4 + local.get $3 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $5 + local.get $3 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $1 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.01 loop $for-loop|0456 - local.get $0 - local.get $2 - i32.lt_s + local.get $1 + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 2 i32.shl - local.get $3 + local.get $2 i32.add i32.load - local.set $1 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.const 5424 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.01 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0456 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner26 @@ -53395,8 +53273,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -53406,119 +53282,117 @@ i32.lt_s br_if $folding-inner21 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i64.const 0 i64.store - local.get $1 + local.get $0 i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $3 + local.tee $2 i32.store - local.get $3 + local.get $2 i32.const 0 i64.const 1 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $2 i32.const 1 i64.const 2 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $2 i32.const 2 i64.const 3 call $~lib/typedarray/Int64Array#__set - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5456 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5456 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + i32.const 0 + local.set $5 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $0 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 loop $for-loop|057 local.get $0 - local.get $1 - i32.lt_s + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 3 i32.shl - local.get $2 + local.get $1 i32.add i64.load - local.set $10 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $10 - local.get $0 - local.get $3 + local.get $5 + local.get $2 i32.const 5456 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|057 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner25 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5488 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5488 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + i32.const 0 + local.set $5 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $0 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.01 loop $for-loop|0458 local.get $0 - local.get $1 - i32.lt_s + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 3 i32.shl - local.get $2 + local.get $1 i32.add i64.load - local.set $10 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $10 - local.get $0 - local.get $3 + local.get $5 + local.get $2 i32.const 5488 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.01 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0458 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner26 @@ -53526,8 +53400,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -53537,119 +53409,117 @@ i32.lt_s br_if $folding-inner21 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i64.const 0 i64.store - local.get $1 + local.get $0 i32.const 3 call $~lib/typedarray/Uint64Array#constructor - local.tee $3 + local.tee $2 i32.store - local.get $3 + local.get $2 i32.const 0 i64.const 1 call $~lib/typedarray/Uint64Array#__set - local.get $3 + local.get $2 i32.const 1 i64.const 2 call $~lib/typedarray/Uint64Array#__set - local.get $3 + local.get $2 i32.const 2 i64.const 3 call $~lib/typedarray/Uint64Array#__set - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5520 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5520 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + i32.const 0 + local.set $5 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $0 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 loop $for-loop|060 local.get $0 - local.get $1 - i32.lt_s + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 3 i32.shl - local.get $2 + local.get $1 i32.add i64.load - local.set $10 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $10 - local.get $0 - local.get $3 + local.get $5 + local.get $2 i32.const 5520 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|060 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner25 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5552 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5552 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + i32.const 0 + local.set $5 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $0 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.01 loop $for-loop|0461 local.get $0 - local.get $1 - i32.lt_s + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 3 i32.shl - local.get $2 + local.get $1 i32.add i64.load - local.set $10 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $10 - local.get $0 - local.get $3 + local.get $5 + local.get $2 i32.const 5552 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.01 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0461 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner26 @@ -53657,8 +53527,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -53668,119 +53536,117 @@ i32.lt_s br_if $folding-inner21 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i64.const 0 i64.store - local.get $1 + local.get $0 i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $3 + local.tee $2 i32.store - local.get $3 + local.get $2 i32.const 0 f32.const 1 call $~lib/typedarray/Float32Array#__set - local.get $3 + local.get $2 i32.const 1 f32.const 2 call $~lib/typedarray/Float32Array#__set - local.get $3 + local.get $2 i32.const 2 f32.const 3 call $~lib/typedarray/Float32Array#__set - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5584 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5584 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + i32.const 0 + local.set $5 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $0 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 loop $for-loop|062 local.get $0 - local.get $1 - i32.lt_s + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 2 i32.shl - local.get $2 + local.get $1 i32.add f32.load - local.set $5 i32.const 3 global.set $~argumentsLength - local.get $0 local.get $5 - local.get $0 - local.get $3 + local.get $2 i32.const 5584 i32.load call_indirect $0 (type $f32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|062 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner25 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5616 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5616 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + i32.const 0 + local.set $5 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $0 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.01 loop $for-loop|0463 local.get $0 - local.get $1 - i32.lt_s + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 2 i32.shl - local.get $2 + local.get $1 i32.add f32.load - local.set $5 i32.const 3 global.set $~argumentsLength - local.get $0 local.get $5 - local.get $0 - local.get $3 + local.get $2 i32.const 5616 i32.load call_indirect $0 (type $f32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.01 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0463 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner26 @@ -53788,8 +53654,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -53799,119 +53663,117 @@ i32.lt_s br_if $folding-inner21 global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $0 i64.const 0 i64.store - local.get $1 + local.get $0 i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $3 + local.tee $2 i32.store - local.get $3 + local.get $2 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $3 + local.get $2 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $3 + local.get $2 i32.const 2 f64.const 3 call $~lib/typedarray/Float64Array#__set - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5648 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5648 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + i32.const 0 + local.set $5 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $0 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 loop $for-loop|065 local.get $0 - local.get $1 - i32.lt_s + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 3 i32.shl - local.get $2 + local.get $1 i32.add f64.load - local.set $7 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $7 - local.get $0 - local.get $3 + local.get $5 + local.get $2 i32.const 5648 i32.load call_indirect $0 (type $f64_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|065 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner25 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5680 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5680 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + i32.const 0 + local.set $5 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $0 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.01 loop $for-loop|0466 local.get $0 - local.get $1 - i32.lt_s + local.get $5 + i32.gt_s if - local.get $0 + local.get $5 i32.const 3 i32.shl - local.get $2 + local.get $1 i32.add f64.load - local.set $7 i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $7 - local.get $0 - local.get $3 + local.get $5 + local.get $2 i32.const 5680 i32.load call_indirect $0 (type $f64_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.01 - drop - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0466 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner26 @@ -53934,107 +53796,103 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $3 + local.tee $2 i32.store - local.get $3 + local.get $2 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $3 + local.get $2 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $3 + local.get $2 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5712 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5712 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 loop $for-loop|067 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if local.get $1 - local.get $2 + local.get $5 i32.add i32.load8_s - local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $1 - local.get $3 + local.get $5 + local.get $2 i32.const 5712 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|067 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner27 - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int8Array,i8>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5744 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5744 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int8Array,i8>|inlined.01 loop $for-loop|0468 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if local.get $1 - local.get $2 + local.get $5 i32.add i32.load8_s - local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $1 - local.get $3 + local.get $5 + local.get $2 i32.const 5744 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int8Array,i8>|inlined.01 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|0468 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner28 @@ -54057,107 +53915,103 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor - local.tee $3 + local.tee $2 i32.store - local.get $3 + local.get $2 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $2 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $2 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8Array#__set - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5776 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5776 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 loop $for-loop|069 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if local.get $1 - local.get $2 + local.get $5 i32.add i32.load8_u - local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $1 - local.get $3 + local.get $5 + local.get $2 i32.const 5776 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|069 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner27 - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5808 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5808 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.01 loop $for-loop|0470 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if local.get $1 - local.get $2 + local.get $5 i32.add i32.load8_u - local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $1 - local.get $3 + local.get $5 + local.get $2 i32.const 5808 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.01 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|0470 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner28 @@ -54180,107 +54034,103 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $3 + local.tee $2 i32.store - local.get $3 + local.get $2 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $3 + local.get $2 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $3 + local.get $2 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.071 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5840 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5840 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.071 loop $for-loop|072 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if local.get $1 - local.get $2 + local.get $5 i32.add i32.load8_u - local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $1 - local.get $3 + local.get $5 + local.get $2 i32.const 5840 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.071 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|072 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner27 - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0173 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5872 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5872 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0173 loop $for-loop|0474 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if local.get $1 - local.get $2 + local.get $5 i32.add i32.load8_u - local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $1 - local.get $3 + local.get $5 + local.get $2 i32.const 5872 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0173 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|0474 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner28 @@ -54303,115 +54153,111 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $2 i32.store - local.get $3 + local.get $2 i32.const 0 i32.const 1 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $2 i32.const 1 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $2 i32.const 2 i32.const 3 call $~lib/typedarray/Int16Array#__set - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5904 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5904 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 loop $for-loop|075 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 1 i32.shl - local.get $2 + local.get $1 i32.add i32.load16_s - local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $1 - local.get $3 + local.get $5 + local.get $2 i32.const 5904 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|075 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner27 - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int16Array,i16>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5936 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5936 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int16Array,i16>|inlined.01 loop $for-loop|0476 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 1 i32.shl - local.get $2 + local.get $1 i32.add i32.load16_s - local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $1 - local.get $3 + local.get $5 + local.get $2 i32.const 5936 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int16Array,i16>|inlined.01 - drop - local.get $1 + br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int16Array,i16>|inlined.01 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|0476 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner28 @@ -54434,115 +54280,111 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $3 + local.tee $2 i32.store - local.get $3 + local.get $2 i32.const 0 i32.const 1 call $~lib/typedarray/Uint16Array#__set - local.get $3 + local.get $2 i32.const 1 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $3 + local.get $2 i32.const 2 i32.const 3 call $~lib/typedarray/Uint16Array#__set - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 5968 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 5968 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 loop $for-loop|077 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 1 i32.shl - local.get $2 + local.get $1 i32.add i32.load16_u - local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $1 - local.get $3 + local.get $5 + local.get $2 i32.const 5968 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|077 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner27 - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 6000 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 6000 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.01 loop $for-loop|0478 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 1 i32.shl - local.get $2 + local.get $1 i32.add i32.load16_u - local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $1 - local.get $3 + local.get $5 + local.get $2 i32.const 6000 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.01 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|0478 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner28 @@ -54565,115 +54407,111 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $3 + local.tee $2 i32.store - local.get $3 + local.get $2 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $3 + local.get $2 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $3 + local.get $2 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 6032 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 6032 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 loop $for-loop|079 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 2 i32.shl - local.get $2 + local.get $1 i32.add i32.load - local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $1 - local.get $3 + local.get $5 + local.get $2 i32.const 6032 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|079 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner27 - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int32Array,i32>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 6064 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 6064 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int32Array,i32>|inlined.01 loop $for-loop|0480 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 2 i32.shl - local.get $2 + local.get $1 i32.add i32.load - local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $1 - local.get $3 + local.get $5 + local.get $2 i32.const 6064 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int32Array,i32>|inlined.01 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|0480 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner28 @@ -54696,115 +54534,111 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $3 + local.tee $2 i32.store - local.get $3 + local.get $2 i32.const 0 i32.const 1 call $~lib/typedarray/Uint32Array#__set - local.get $3 + local.get $2 i32.const 1 i32.const 2 call $~lib/typedarray/Uint32Array#__set - local.get $3 + local.get $2 i32.const 2 i32.const 3 call $~lib/typedarray/Uint32Array#__set - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 6096 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 6096 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 loop $for-loop|082 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 2 i32.shl - local.get $2 + local.get $1 i32.add i32.load - local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $1 - local.get $3 + local.get $5 + local.get $2 i32.const 6096 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|082 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner27 - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 6128 - i32.store offset=4 - local.get $3 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 6128 + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.01 loop $for-loop|0483 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 2 i32.shl - local.get $2 + local.get $1 i32.add i32.load - local.set $0 i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $1 - local.get $3 + local.get $5 + local.get $2 i32.const 6128 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.01 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|0483 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner28 @@ -54827,115 +54661,111 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $1 i32.store - local.get $2 + local.get $1 i32.const 0 i64.const 1 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $1 i32.const 1 i64.const 2 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $1 i32.const 2 i64.const 3 call $~lib/typedarray/Int64Array#__set - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 6160 - i32.store offset=4 - local.get $2 - i32.load offset=4 - local.set $0 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 6160 + i32.store offset=4 + local.get $1 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 loop $for-loop|084 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 3 i32.shl local.get $0 i32.add i64.load - local.set $10 i32.const 3 global.set $~argumentsLength + local.get $5 local.get $1 - local.get $10 - local.get $1 - local.get $2 i32.const 6160 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|084 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner27 - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int64Array,i64>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 6192 - i32.store offset=4 - local.get $2 - i32.load offset=4 - local.set $0 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 6192 + i32.store offset=4 + local.get $1 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int64Array,i64>|inlined.01 loop $for-loop|0485 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 3 i32.shl local.get $0 i32.add i64.load - local.set $10 i32.const 3 global.set $~argumentsLength + local.get $5 local.get $1 - local.get $10 - local.get $1 - local.get $2 i32.const 6192 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int64Array,i64>|inlined.01 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|0485 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner28 @@ -54958,115 +54788,111 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint64Array#constructor - local.tee $2 + local.tee $1 i32.store - local.get $2 + local.get $1 i32.const 0 i64.const 1 call $~lib/typedarray/Uint64Array#__set - local.get $2 + local.get $1 i32.const 1 i64.const 2 call $~lib/typedarray/Uint64Array#__set - local.get $2 + local.get $1 i32.const 2 i64.const 3 call $~lib/typedarray/Uint64Array#__set - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 6224 - i32.store offset=4 - local.get $2 - i32.load offset=4 - local.set $0 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 6224 + i32.store offset=4 + local.get $1 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 loop $for-loop|087 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 3 i32.shl local.get $0 i32.add i64.load - local.set $10 i32.const 3 global.set $~argumentsLength + local.get $5 local.get $1 - local.get $10 - local.get $1 - local.get $2 i32.const 6224 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|087 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner27 - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 6256 - i32.store offset=4 - local.get $2 - i32.load offset=4 - local.set $0 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 6256 + i32.store offset=4 + local.get $1 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.01 loop $for-loop|0488 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 3 i32.shl local.get $0 i32.add i64.load - local.set $10 i32.const 3 global.set $~argumentsLength + local.get $5 local.get $1 - local.get $10 - local.get $1 - local.get $2 i32.const 6256 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.01 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|0488 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner28 @@ -55089,115 +54915,111 @@ local.get $0 i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $2 + local.tee $1 i32.store - local.get $2 + local.get $1 i32.const 0 f32.const 1 call $~lib/typedarray/Float32Array#__set - local.get $2 + local.get $1 i32.const 1 f32.const 2 call $~lib/typedarray/Float32Array#__set - local.get $2 + local.get $1 i32.const 2 f32.const 3 call $~lib/typedarray/Float32Array#__set - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 6288 - i32.store offset=4 - local.get $2 - i32.load offset=4 - local.set $0 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 6288 + i32.store offset=4 + local.get $1 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 loop $for-loop|089 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 2 i32.shl local.get $0 i32.add f32.load - local.set $5 i32.const 3 global.set $~argumentsLength - local.get $1 local.get $5 local.get $1 - local.get $2 i32.const 6288 i32.load call_indirect $0 (type $f32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|089 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner27 - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float32Array,f32>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 6320 - i32.store offset=4 - local.get $2 - i32.load offset=4 - local.set $0 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 6320 + i32.store offset=4 + local.get $1 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float32Array,f32>|inlined.01 loop $for-loop|0490 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 2 i32.shl local.get $0 i32.add f32.load - local.set $5 i32.const 3 global.set $~argumentsLength - local.get $1 local.get $5 local.get $1 - local.get $2 i32.const 6320 i32.load call_indirect $0 (type $f32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float32Array,f32>|inlined.01 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|0490 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner28 @@ -55220,115 +55042,111 @@ local.get $0 i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $2 + local.tee $1 i32.store - local.get $2 + local.get $1 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $2 + local.get $1 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $2 + local.get $1 i32.const 2 f64.const 3 call $~lib/typedarray/Float64Array#__set - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 6352 - i32.store offset=4 - local.get $2 - i32.load offset=4 - local.set $0 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 6352 + i32.store offset=4 + local.get $1 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 loop $for-loop|092 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 3 i32.shl local.get $0 i32.add f64.load - local.set $7 i32.const 3 global.set $~argumentsLength + local.get $5 local.get $1 - local.get $7 - local.get $1 - local.get $2 i32.const 6352 i32.load call_indirect $0 (type $f64_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|092 end end i32.const -1 + local.set $5 end + local.get $5 i32.const 1 i32.ne br_if $folding-inner27 - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float64Array,f64>|inlined.01 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 6384 - i32.store offset=4 - local.get $2 - i32.load offset=4 - local.set $0 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 6384 + i32.store offset=4 + local.get $1 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $5 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float64Array,f64>|inlined.01 loop $for-loop|0493 - local.get $1 + local.get $5 i32.const 0 i32.ge_s if - local.get $1 + local.get $5 i32.const 3 i32.shl local.get $0 i32.add f64.load - local.set $7 i32.const 3 global.set $~argumentsLength + local.get $5 local.get $1 - local.get $7 - local.get $1 - local.get $2 i32.const 6384 i32.load call_indirect $0 (type $f64_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float64Array,f64>|inlined.01 - drop - local.get $1 + local.get $5 i32.const 1 i32.sub - local.set $1 + local.set $5 br $for-loop|0493 end end i32.const -1 + local.set $5 end + local.get $5 i32.const -1 i32.ne br_if $folding-inner28 @@ -55336,8 +55154,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $6 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -55374,16 +55190,18 @@ local.get $3 i32.load offset=4 local.set $2 + i32.const 0 + local.set $5 local.get $3 i32.load offset=8 local.set $1 loop $for-loop|094 local.get $1 - local.get $6 + local.get $5 i32.gt_s if local.get $2 - local.get $6 + local.get $5 i32.add i32.load8_s local.set $0 @@ -55391,7 +55209,7 @@ global.set $~argumentsLength i32.const 0 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 6416 i32.load @@ -55399,10 +55217,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|094 end end @@ -55418,17 +55236,17 @@ i32.load offset=4 local.set $2 i32.const 0 - local.set $6 + local.set $5 local.get $3 i32.load offset=8 local.set $1 loop $for-loop|0495 local.get $1 - local.get $6 + local.get $5 i32.gt_s if local.get $2 - local.get $6 + local.get $5 i32.add i32.load8_s local.set $0 @@ -55436,7 +55254,7 @@ global.set $~argumentsLength i32.const 0 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 6448 i32.load @@ -55444,10 +55262,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.01 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0495 end end @@ -55458,8 +55276,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $6 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -55496,16 +55312,18 @@ local.get $3 i32.load offset=4 local.set $2 + i32.const 0 + local.set $5 local.get $3 i32.load offset=8 local.set $1 loop $for-loop|097 local.get $1 - local.get $6 + local.get $5 i32.gt_s if local.get $2 - local.get $6 + local.get $5 i32.add i32.load8_u local.set $0 @@ -55513,7 +55331,7 @@ global.set $~argumentsLength i32.const 0 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 6480 i32.load @@ -55521,10 +55339,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|097 end end @@ -55540,17 +55358,17 @@ i32.load offset=4 local.set $2 i32.const 0 - local.set $6 + local.set $5 local.get $3 i32.load offset=8 local.set $1 loop $for-loop|0498 local.get $1 - local.get $6 + local.get $5 i32.gt_s if local.get $2 - local.get $6 + local.get $5 i32.add i32.load8_u local.set $0 @@ -55558,7 +55376,7 @@ global.set $~argumentsLength i32.const 0 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 6512 i32.load @@ -55566,10 +55384,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.01 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0498 end end @@ -55580,8 +55398,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $6 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -55618,16 +55434,18 @@ local.get $3 i32.load offset=4 local.set $2 + i32.const 0 + local.set $5 local.get $3 i32.load offset=8 local.set $1 loop $for-loop|0100 local.get $1 - local.get $6 + local.get $5 i32.gt_s if local.get $2 - local.get $6 + local.get $5 i32.add i32.load8_u local.set $0 @@ -55635,7 +55453,7 @@ global.set $~argumentsLength i32.const 0 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 6544 i32.load @@ -55643,10 +55461,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.099 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0100 end end @@ -55662,17 +55480,17 @@ i32.load offset=4 local.set $2 i32.const 0 - local.set $6 + local.set $5 local.get $3 i32.load offset=8 local.set $1 loop $for-loop|04102 local.get $1 - local.get $6 + local.get $5 i32.gt_s if local.get $2 - local.get $6 + local.get $5 i32.add i32.load8_u local.set $0 @@ -55680,7 +55498,7 @@ global.set $~argumentsLength i32.const 0 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 6576 i32.load @@ -55688,10 +55506,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.01101 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|04102 end end @@ -55702,8 +55520,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $6 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -55740,6 +55556,8 @@ local.get $3 i32.load offset=4 local.set $2 + i32.const 0 + local.set $5 local.get $3 i32.load offset=8 i32.const 1 @@ -55747,10 +55565,10 @@ local.set $1 loop $for-loop|0103 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 1 i32.shl local.get $2 @@ -55761,7 +55579,7 @@ global.set $~argumentsLength i32.const 0 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 6608 i32.load @@ -55769,10 +55587,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0103 end end @@ -55788,7 +55606,7 @@ i32.load offset=4 local.set $2 i32.const 0 - local.set $6 + local.set $5 local.get $3 i32.load offset=8 i32.const 1 @@ -55796,10 +55614,10 @@ local.set $1 loop $for-loop|04104 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 1 i32.shl local.get $2 @@ -55810,7 +55628,7 @@ global.set $~argumentsLength i32.const 0 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 6640 i32.load @@ -55818,10 +55636,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.01 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|04104 end end @@ -55832,8 +55650,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $6 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -55870,6 +55686,8 @@ local.get $3 i32.load offset=4 local.set $2 + i32.const 0 + local.set $5 local.get $3 i32.load offset=8 i32.const 1 @@ -55877,10 +55695,10 @@ local.set $1 loop $for-loop|0105 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 1 i32.shl local.get $2 @@ -55891,7 +55709,7 @@ global.set $~argumentsLength i32.const 0 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 6672 i32.load @@ -55899,10 +55717,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0105 end end @@ -55918,7 +55736,7 @@ i32.load offset=4 local.set $2 i32.const 0 - local.set $6 + local.set $5 local.get $3 i32.load offset=8 i32.const 1 @@ -55926,10 +55744,10 @@ local.set $1 loop $for-loop|04106 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 1 i32.shl local.get $2 @@ -55940,7 +55758,7 @@ global.set $~argumentsLength i32.const 0 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 6704 i32.load @@ -55948,10 +55766,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.01 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|04106 end end @@ -55962,8 +55780,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $6 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -56000,6 +55816,8 @@ local.get $3 i32.load offset=4 local.set $2 + i32.const 0 + local.set $5 local.get $3 i32.load offset=8 i32.const 2 @@ -56007,10 +55825,10 @@ local.set $1 loop $for-loop|0107 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 2 i32.shl local.get $2 @@ -56021,7 +55839,7 @@ global.set $~argumentsLength i32.const 0 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 6736 i32.load @@ -56029,10 +55847,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0107 end end @@ -56048,7 +55866,7 @@ i32.load offset=4 local.set $2 i32.const 0 - local.set $6 + local.set $5 local.get $3 i32.load offset=8 i32.const 2 @@ -56056,10 +55874,10 @@ local.set $1 loop $for-loop|04108 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 2 i32.shl local.get $2 @@ -56070,7 +55888,7 @@ global.set $~argumentsLength i32.const 0 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 6768 i32.load @@ -56078,10 +55896,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.01 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|04108 end end @@ -56092,8 +55910,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $6 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -56130,6 +55946,8 @@ local.get $3 i32.load offset=4 local.set $2 + i32.const 0 + local.set $5 local.get $3 i32.load offset=8 i32.const 2 @@ -56137,10 +55955,10 @@ local.set $1 loop $for-loop|0109 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 2 i32.shl local.get $2 @@ -56151,7 +55969,7 @@ global.set $~argumentsLength i32.const 0 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 6800 i32.load @@ -56159,10 +55977,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint32Array,u32>|inlined.0 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0109 end end @@ -56178,7 +55996,7 @@ i32.load offset=4 local.set $2 i32.const 0 - local.set $6 + local.set $5 local.get $3 i32.load offset=8 i32.const 2 @@ -56186,10 +56004,10 @@ local.set $1 loop $for-loop|04110 local.get $1 - local.get $6 + local.get $5 i32.gt_s if - local.get $6 + local.get $5 i32.const 2 i32.shl local.get $2 @@ -56200,7 +56018,7 @@ global.set $~argumentsLength i32.const 0 local.get $0 - local.get $6 + local.get $5 local.get $3 i32.const 6832 i32.load @@ -56208,10 +56026,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint32Array,u32>|inlined.01 drop - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|04110 end end @@ -56222,8 +56040,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $8 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -56260,6 +56076,8 @@ local.get $2 i32.load offset=4 local.set $1 + i32.const 0 + local.set $5 local.get $2 i32.load offset=8 i32.const 3 @@ -56267,21 +56085,21 @@ local.set $0 loop $for-loop|0112 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 3 i32.shl local.get $1 i32.add i64.load - local.set $10 + local.set $11 i32.const 3 global.set $~argumentsLength i32.const 0 - local.get $10 - local.get $8 + local.get $11 + local.get $5 local.get $2 i32.const 6864 i32.load @@ -56289,10 +56107,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|0112 end end @@ -56308,7 +56126,7 @@ i32.load offset=4 local.set $1 i32.const 0 - local.set $8 + local.set $5 local.get $2 i32.load offset=8 i32.const 3 @@ -56316,21 +56134,21 @@ local.set $0 loop $for-loop|04113 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 3 i32.shl local.get $1 i32.add i64.load - local.set $10 + local.set $11 i32.const 3 global.set $~argumentsLength i32.const 0 - local.get $10 - local.get $8 + local.get $11 + local.get $5 local.get $2 i32.const 6896 i32.load @@ -56338,10 +56156,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.01 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|04113 end end @@ -56352,8 +56170,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $8 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -56390,6 +56206,8 @@ local.get $2 i32.load offset=4 local.set $1 + i32.const 0 + local.set $5 local.get $2 i32.load offset=8 i32.const 3 @@ -56397,21 +56215,21 @@ local.set $0 loop $for-loop|0114 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 3 i32.shl local.get $1 i32.add i64.load - local.set $10 + local.set $11 i32.const 3 global.set $~argumentsLength i32.const 0 - local.get $10 - local.get $8 + local.get $11 + local.get $5 local.get $2 i32.const 6928 i32.load @@ -56419,10 +56237,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint64Array,u64>|inlined.0 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|0114 end end @@ -56438,7 +56256,7 @@ i32.load offset=4 local.set $1 i32.const 0 - local.set $8 + local.set $5 local.get $2 i32.load offset=8 i32.const 3 @@ -56446,21 +56264,21 @@ local.set $0 loop $for-loop|04115 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 3 i32.shl local.get $1 i32.add i64.load - local.set $10 + local.set $11 i32.const 3 global.set $~argumentsLength i32.const 0 - local.get $10 - local.get $8 + local.get $11 + local.get $5 local.get $2 i32.const 6960 i32.load @@ -56468,10 +56286,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint64Array,u64>|inlined.01 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|04115 end end @@ -56482,8 +56300,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $8 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -56520,6 +56336,8 @@ local.get $2 i32.load offset=4 local.set $1 + i32.const 0 + local.set $5 local.get $2 i32.load offset=8 i32.const 2 @@ -56527,21 +56345,21 @@ local.set $0 loop $for-loop|0116 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 2 i32.shl local.get $1 i32.add f32.load - local.set $5 + local.set $6 i32.const 3 global.set $~argumentsLength i32.const 0 + local.get $6 local.get $5 - local.get $8 local.get $2 i32.const 6992 i32.load @@ -56549,10 +56367,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|0116 end end @@ -56568,7 +56386,7 @@ i32.load offset=4 local.set $1 i32.const 0 - local.set $8 + local.set $5 local.get $2 i32.load offset=8 i32.const 2 @@ -56576,21 +56394,21 @@ local.set $0 loop $for-loop|04117 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 2 i32.shl local.get $1 i32.add f32.load - local.set $5 + local.set $6 i32.const 3 global.set $~argumentsLength i32.const 0 + local.get $6 local.get $5 - local.get $8 local.get $2 i32.const 7024 i32.load @@ -56598,10 +56416,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.01 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|04117 end end @@ -56612,8 +56430,6 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $8 global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -56650,6 +56466,8 @@ local.get $2 i32.load offset=4 local.set $1 + i32.const 0 + local.set $5 local.get $2 i32.load offset=8 i32.const 3 @@ -56657,21 +56475,21 @@ local.set $0 loop $for-loop|0118 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 3 i32.shl local.get $1 i32.add f64.load - local.set $7 + local.set $8 i32.const 3 global.set $~argumentsLength i32.const 0 - local.get $7 local.get $8 + local.get $5 local.get $2 i32.const 7056 i32.load @@ -56679,10 +56497,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|0118 end end @@ -56698,7 +56516,7 @@ i32.load offset=4 local.set $1 i32.const 0 - local.set $8 + local.set $5 local.get $2 i32.load offset=8 i32.const 3 @@ -56706,21 +56524,21 @@ local.set $0 loop $for-loop|04119 local.get $0 - local.get $8 + local.get $5 i32.gt_s if - local.get $8 + local.get $5 i32.const 3 i32.shl local.get $1 i32.add f64.load - local.set $7 + local.set $8 i32.const 3 global.set $~argumentsLength i32.const 0 - local.get $7 local.get $8 + local.get $5 local.get $2 i32.const 7088 i32.load @@ -56728,10 +56546,10 @@ i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.01 drop - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|04119 end end @@ -56762,14 +56580,14 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 global.set $std/typedarray/forEachSelf global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 0 i32.const 7152 i32.const 0 @@ -56779,7 +56597,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 1 i32.const 7152 i32.const 1 @@ -56789,7 +56607,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 2 i32.const 7152 i32.const 2 @@ -56799,34 +56617,34 @@ global.get $~lib/memory/__stack_pointer i32.const 7200 i32.store offset=8 - local.get $3 + local.get $4 i32.load offset=4 - local.set $2 + local.set $3 i32.const 0 - local.set $6 - local.get $3 - i32.load offset=8 local.set $1 + local.get $4 + i32.load offset=8 + local.set $2 loop $for-loop|0116120 local.get $1 - local.get $6 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $2 - local.get $6 + local.get $1 + local.get $3 i32.add i32.load8_s i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $3 + local.get $1 + local.get $4 i32.const 7200 i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $6 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|0116120 end end @@ -56858,14 +56676,14 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 global.set $std/typedarray/forEachSelf global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 0 i32.const 7152 i32.const 0 @@ -56876,7 +56694,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 1 i32.const 7152 i32.const 1 @@ -56887,7 +56705,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 2 i32.const 7152 i32.const 2 @@ -56898,34 +56716,34 @@ global.get $~lib/memory/__stack_pointer i32.const 7232 i32.store offset=8 - local.get $3 + local.get $4 i32.load offset=4 - local.set $2 + local.set $3 i32.const 0 - local.set $6 - local.get $3 - i32.load offset=8 local.set $1 + local.get $4 + i32.load offset=8 + local.set $2 loop $for-loop|0121 local.get $1 - local.get $6 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $2 - local.get $6 + local.get $1 + local.get $3 i32.add i32.load8_u i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $3 + local.get $1 + local.get $4 i32.const 7232 i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $6 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|0121 end end @@ -56957,14 +56775,14 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 global.set $std/typedarray/forEachSelf global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 0 i32.const 7152 i32.const 0 @@ -56975,7 +56793,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 1 i32.const 7152 i32.const 1 @@ -56986,7 +56804,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 2 i32.const 7152 i32.const 2 @@ -56997,34 +56815,34 @@ global.get $~lib/memory/__stack_pointer i32.const 7264 i32.store offset=8 - local.get $3 + local.get $4 i32.load offset=4 - local.set $2 + local.set $3 i32.const 0 - local.set $6 - local.get $3 - i32.load offset=8 local.set $1 + local.get $4 + i32.load offset=8 + local.set $2 loop $for-loop|0128 local.get $1 - local.get $6 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $2 - local.get $6 + local.get $1 + local.get $3 i32.add i32.load8_u i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $3 + local.get $1 + local.get $4 i32.const 7264 i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $6 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|0128 end end @@ -57056,14 +56874,14 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 global.set $std/typedarray/forEachSelf global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 0 i32.const 7152 i32.const 0 @@ -57073,7 +56891,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 1 i32.const 7152 i32.const 1 @@ -57083,7 +56901,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 2 i32.const 7152 i32.const 2 @@ -57093,38 +56911,38 @@ global.get $~lib/memory/__stack_pointer i32.const 7296 i32.store offset=8 - local.get $3 + local.get $4 i32.load offset=4 - local.set $2 + local.set $3 i32.const 0 - local.set $6 - local.get $3 + local.set $1 + local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.set $1 + local.set $2 loop $for-loop|0133 local.get $1 - local.get $6 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $6 + local.get $1 i32.const 1 i32.shl - local.get $2 + local.get $3 i32.add i32.load16_s i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $3 + local.get $1 + local.get $4 i32.const 7296 i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $6 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|0133 end end @@ -57156,14 +56974,14 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 global.set $std/typedarray/forEachSelf global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 0 i32.const 7152 i32.const 0 @@ -57174,7 +56992,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 1 i32.const 7152 i32.const 1 @@ -57185,7 +57003,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 2 i32.const 7152 i32.const 2 @@ -57196,38 +57014,38 @@ global.get $~lib/memory/__stack_pointer i32.const 7328 i32.store offset=8 - local.get $3 + local.get $4 i32.load offset=4 - local.set $2 + local.set $3 i32.const 0 - local.set $6 - local.get $3 + local.set $1 + local.get $4 i32.load offset=8 i32.const 1 i32.shr_u - local.set $1 + local.set $2 loop $for-loop|0138 local.get $1 - local.get $6 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $6 + local.get $1 i32.const 1 i32.shl - local.get $2 + local.get $3 i32.add i32.load16_u i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $3 + local.get $1 + local.get $4 i32.const 7328 i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $6 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|0138 end end @@ -57259,14 +57077,14 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 global.set $std/typedarray/forEachSelf global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 0 i32.const 7152 i32.const 0 @@ -57275,7 +57093,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 1 i32.const 7152 i32.const 1 @@ -57284,7 +57102,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $3 + local.get $4 i32.const 2 i32.const 7152 i32.const 2 @@ -57293,38 +57111,38 @@ global.get $~lib/memory/__stack_pointer i32.const 7360 i32.store offset=8 - local.get $3 + local.get $4 i32.load offset=4 - local.set $2 + local.set $3 i32.const 0 - local.set $6 - local.get $3 + local.set $1 + local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.set $1 + local.set $2 loop $for-loop|0143 local.get $1 - local.get $6 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $6 + local.get $1 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $3 + local.get $1 + local.get $4 i32.const 7360 i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $6 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|0143 end end @@ -57355,7 +57173,104 @@ global.set $std/typedarray/forEachCallCount local.get $0 i32.const 3 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/typedarray/Uint32Array#constructor + local.tee $4 + i32.store + local.get $4 + global.set $std/typedarray/forEachSelf + global.get $~lib/memory/__stack_pointer + i32.const 7152 + i32.store offset=4 + local.get $4 + i32.const 0 + i32.const 7152 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 7152 + i32.store offset=4 + local.get $4 + i32.const 1 + i32.const 7152 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 7152 + i32.store offset=4 + local.get $4 + i32.const 2 + i32.const 7152 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 7392 + i32.store offset=8 + local.get $4 + i32.load offset=4 + local.set $3 + i32.const 0 + local.set $1 + local.get $4 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $2 + loop $for-loop|0148 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $1 + i32.const 2 + i32.shl + local.get $3 + i32.add + i32.load + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $4 + i32.const 7392 + i32.load + call_indirect $0 (type $i32_i32_i32_=>_none) + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0148 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner6 + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner21 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i64.const 0 + i64.store + local.get $0 + i32.const 0 + i32.store offset=8 + i32.const 0 + global.set $std/typedarray/forEachCallCount + local.get $0 + i32.const 3 + call $~lib/typedarray/Int64Array#constructor local.tee $3 i32.store local.get $3 @@ -57368,109 +57283,12 @@ i32.const 7152 i32.const 0 call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 7152 - i32.store offset=4 - local.get $3 - i32.const 1 - i32.const 7152 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 7152 - i32.store offset=4 - local.get $3 - i32.const 2 - i32.const 7152 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 7392 - i32.store offset=8 - local.get $3 - i32.load offset=4 - local.set $2 - i32.const 0 - local.set $6 - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $1 - loop $for-loop|0148 - local.get $1 - local.get $6 - i32.gt_s - if - local.get $6 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load - i32.const 3 - global.set $~argumentsLength - local.get $6 - local.get $3 - i32.const 7392 - i32.load - call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0148 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner6 - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - br_if $folding-inner21 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i32.const 0 - i32.store offset=8 - i32.const 0 - global.set $std/typedarray/forEachCallCount - local.get $0 - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - i32.store - local.get $2 - global.set $std/typedarray/forEachSelf - global.get $~lib/memory/__stack_pointer - i32.const 7152 - i32.store offset=4 - local.get $2 - i32.const 0 - i32.const 7152 - i32.const 0 - call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Int64Array#__set global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $2 + local.get $3 i32.const 1 i32.const 7152 i32.const 1 @@ -57480,7 +57298,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $2 + local.get $3 i32.const 2 i32.const 7152 i32.const 2 @@ -57490,38 +57308,38 @@ global.get $~lib/memory/__stack_pointer i32.const 7424 i32.store offset=8 - local.get $2 + local.get $3 i32.load offset=4 - local.set $1 + local.set $2 i32.const 0 - local.set $6 - local.get $2 + local.set $1 + local.get $3 i32.load offset=8 i32.const 3 i32.shr_u local.set $0 loop $for-loop|0153 local.get $0 - local.get $6 + local.get $1 i32.gt_s if - local.get $6 + local.get $1 i32.const 3 i32.shl - local.get $1 + local.get $2 i32.add i64.load i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $2 + local.get $1 + local.get $3 i32.const 7424 i32.load call_indirect $0 (type $i64_i32_i32_=>_none) - local.get $6 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|0153 end end @@ -57553,14 +57371,14 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint64Array#constructor - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 global.set $std/typedarray/forEachSelf global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $2 + local.get $3 i32.const 0 i32.const 7152 i32.const 0 @@ -57570,7 +57388,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $2 + local.get $3 i32.const 1 i32.const 7152 i32.const 1 @@ -57580,7 +57398,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $2 + local.get $3 i32.const 2 i32.const 7152 i32.const 2 @@ -57590,38 +57408,38 @@ global.get $~lib/memory/__stack_pointer i32.const 7456 i32.store offset=8 - local.get $2 + local.get $3 i32.load offset=4 - local.set $1 + local.set $2 i32.const 0 - local.set $6 - local.get $2 + local.set $1 + local.get $3 i32.load offset=8 i32.const 3 i32.shr_u local.set $0 loop $for-loop|0158 local.get $0 - local.get $6 + local.get $1 i32.gt_s if - local.get $6 + local.get $1 i32.const 3 i32.shl - local.get $1 + local.get $2 i32.add i64.load i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $2 + local.get $1 + local.get $3 i32.const 7456 i32.load call_indirect $0 (type $i64_i32_i32_=>_none) - local.get $6 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|0158 end end @@ -57653,14 +57471,14 @@ local.get $0 i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 global.set $std/typedarray/forEachSelf global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $2 + local.get $3 i32.const 0 i32.const 7152 i32.const 0 @@ -57670,7 +57488,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $2 + local.get $3 i32.const 1 i32.const 7152 i32.const 1 @@ -57680,7 +57498,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $2 + local.get $3 i32.const 2 i32.const 7152 i32.const 2 @@ -57690,38 +57508,38 @@ global.get $~lib/memory/__stack_pointer i32.const 7488 i32.store offset=8 - local.get $2 + local.get $3 i32.load offset=4 - local.set $1 + local.set $2 i32.const 0 - local.set $6 - local.get $2 + local.set $1 + local.get $3 i32.load offset=8 i32.const 2 i32.shr_u local.set $0 loop $for-loop|0163 local.get $0 - local.get $6 + local.get $1 i32.gt_s if - local.get $6 + local.get $1 i32.const 2 i32.shl - local.get $1 + local.get $2 i32.add f32.load i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $2 + local.get $1 + local.get $3 i32.const 7488 i32.load call_indirect $0 (type $f32_i32_i32_=>_none) - local.get $6 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|0163 end end @@ -57753,14 +57571,14 @@ local.get $0 i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $2 + local.tee $3 i32.store - local.get $2 + local.get $3 global.set $std/typedarray/forEachSelf global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $2 + local.get $3 i32.const 0 i32.const 7152 i32.const 0 @@ -57770,7 +57588,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $2 + local.get $3 i32.const 1 i32.const 7152 i32.const 1 @@ -57780,7 +57598,7 @@ global.get $~lib/memory/__stack_pointer i32.const 7152 i32.store offset=4 - local.get $2 + local.get $3 i32.const 2 i32.const 7152 i32.const 2 @@ -57790,38 +57608,38 @@ global.get $~lib/memory/__stack_pointer i32.const 7520 i32.store offset=8 - local.get $2 + local.get $3 i32.load offset=4 - local.set $1 + local.set $2 i32.const 0 - local.set $6 - local.get $2 + local.set $1 + local.get $3 i32.load offset=8 i32.const 3 i32.shr_u local.set $0 loop $for-loop|0168 local.get $0 - local.get $6 + local.get $1 i32.gt_s if - local.get $6 + local.get $1 i32.const 3 i32.shl - local.get $1 + local.get $2 i32.add f64.load i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $2 + local.get $1 + local.get $3 i32.const 7520 i32.load call_indirect $0 (type $f64_i32_i32_=>_none) - local.get $6 + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|0168 end end @@ -57834,7 +57652,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - local.set $8 + local.set $5 global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -57870,27 +57688,27 @@ i32.store offset=8 loop $for-loop|0122 local.get $2 - local.get $8 + local.get $5 i32.gt_s if local.get $1 - local.get $8 + local.get $5 i32.const 7616 - local.get $8 + local.get $5 call $~lib/array/Array#__get i32.extend8_s call $~lib/typedarray/Int8Array#__set local.get $0 - local.get $8 + local.get $5 i32.const 7616 - local.get $8 + local.get $5 call $~lib/array/Array#__get i32.extend8_s call $~lib/typedarray/Int8Array#__set - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|0122 end end @@ -57900,29 +57718,29 @@ i32.load offset=8 call $~lib/util/bytes/REVERSE i32.const 0 - local.set $8 + local.set $5 loop $for-loop|1 local.get $2 - local.get $8 + local.get $5 i32.gt_s if local.get $1 - local.get $8 + local.get $5 call $~lib/typedarray/Int8Array#__get i32.const 7616 local.get $2 i32.const 1 i32.sub - local.get $8 + local.get $5 i32.sub call $~lib/array/Array#__get i32.extend8_s i32.ne br_if $folding-inner31 - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|1 end end @@ -57971,7 +57789,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - local.set $8 + local.set $5 global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -58007,29 +57825,29 @@ i32.store offset=8 loop $for-loop|0123 local.get $2 - local.get $8 + local.get $5 i32.gt_s if local.get $1 - local.get $8 + local.get $5 i32.const 7616 - local.get $8 + local.get $5 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8Array#__set local.get $0 - local.get $8 + local.get $5 i32.const 7616 - local.get $8 + local.get $5 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8Array#__set - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|0123 end end @@ -58039,30 +57857,30 @@ i32.load offset=8 call $~lib/util/bytes/REVERSE i32.const 0 - local.set $8 + local.set $5 loop $for-loop|1124 local.get $2 - local.get $8 + local.get $5 i32.gt_s if local.get $1 - local.get $8 + local.get $5 call $~lib/typedarray/Uint8Array#__get i32.const 7616 local.get $2 i32.const 1 i32.sub - local.get $8 + local.get $5 i32.sub call $~lib/array/Array#__get i32.const 255 i32.and i32.ne br_if $folding-inner31 - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|1124 end end @@ -58110,7 +57928,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - local.set $8 + local.set $5 global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -58146,29 +57964,29 @@ i32.store offset=8 loop $for-loop|0125 local.get $2 - local.get $8 + local.get $5 i32.gt_s if local.get $1 - local.get $8 + local.get $5 i32.const 7616 - local.get $8 + local.get $5 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - local.get $8 + local.get $5 i32.const 7616 - local.get $8 + local.get $5 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|0125 end end @@ -58178,30 +57996,30 @@ i32.load offset=8 call $~lib/util/bytes/REVERSE i32.const 0 - local.set $8 + local.set $5 loop $for-loop|1126 local.get $2 - local.get $8 + local.get $5 i32.gt_s if local.get $1 - local.get $8 + local.get $5 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 7616 local.get $2 i32.const 1 i32.sub - local.get $8 + local.get $5 i32.sub call $~lib/array/Array#__get i32.const 255 i32.and i32.ne br_if $folding-inner31 - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|1126 end end @@ -58249,7 +58067,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - local.set $8 + local.set $5 global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -58285,27 +58103,27 @@ i32.store offset=8 loop $for-loop|0127 local.get $2 - local.get $8 + local.get $5 i32.gt_s if local.get $1 - local.get $8 + local.get $5 i32.const 7616 - local.get $8 + local.get $5 call $~lib/array/Array#__get i32.extend16_s call $~lib/typedarray/Int16Array#__set local.get $0 - local.get $8 + local.get $5 i32.const 7616 - local.get $8 + local.get $5 call $~lib/array/Array#__get i32.extend16_s call $~lib/typedarray/Int16Array#__set - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|0127 end end @@ -58313,29 +58131,29 @@ call $~lib/typedarray/Int16Array#reverse drop i32.const 0 - local.set $8 + local.set $5 loop $for-loop|1128 local.get $2 - local.get $8 + local.get $5 i32.gt_s if local.get $1 - local.get $8 + local.get $5 call $~lib/typedarray/Int16Array#__get i32.const 7616 local.get $2 i32.const 1 i32.sub - local.get $8 + local.get $5 i32.sub call $~lib/array/Array#__get i32.extend16_s i32.ne br_if $folding-inner31 - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|1128 end end @@ -58380,7 +58198,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - local.set $8 + local.set $5 global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -58416,29 +58234,29 @@ i32.store offset=8 loop $for-loop|0129 local.get $2 - local.get $8 + local.get $5 i32.gt_s if local.get $1 - local.get $8 + local.get $5 i32.const 7616 - local.get $8 + local.get $5 call $~lib/array/Array#__get i32.const 65535 i32.and call $~lib/typedarray/Uint16Array#__set local.get $0 - local.get $8 + local.get $5 i32.const 7616 - local.get $8 + local.get $5 call $~lib/array/Array#__get i32.const 65535 i32.and call $~lib/typedarray/Uint16Array#__set - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|0129 end end @@ -58446,30 +58264,30 @@ call $~lib/typedarray/Int16Array#reverse drop i32.const 0 - local.set $8 + local.set $5 loop $for-loop|1130 local.get $2 - local.get $8 + local.get $5 i32.gt_s if local.get $1 - local.get $8 + local.get $5 call $~lib/typedarray/Uint16Array#__get i32.const 7616 local.get $2 i32.const 1 i32.sub - local.get $8 + local.get $5 i32.sub call $~lib/array/Array#__get i32.const 65535 i32.and i32.ne br_if $folding-inner31 - local.get $8 + local.get $5 i32.const 1 i32.add - local.set $8 + local.set $5 br $for-loop|1130 end end @@ -58537,47 +58355,47 @@ local.get $0 i32.const 7628 i32.load - local.tee $9 + local.tee $10 call $~lib/typedarray/Int32Array#constructor - local.tee $8 + local.tee $9 i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $10 call $~lib/typedarray/Int32Array#constructor - local.tee $6 + local.tee $7 i32.store offset=8 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|0171 - local.get $9 - local.get $12 + local.get $10 + local.get $15 i32.gt_s if - local.get $8 - local.get $12 + local.get $9 + local.get $15 i32.const 7616 - local.get $12 + local.get $15 call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set - local.get $6 - local.get $12 + local.get $7 + local.get $15 i32.const 7616 - local.get $12 + local.get $15 call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|0171 end end i32.const 0 - local.set $12 - local.get $8 + local.set $1 + local.get $9 i32.load offset=4 - local.set $4 - local.get $8 + local.set $5 + local.get $9 i32.load offset=8 i32.const 2 i32.shr_u @@ -58588,87 +58406,87 @@ local.get $0 i32.const 1 i32.shr_u - local.set $3 + local.set $4 local.get $0 i32.const 1 i32.sub - local.set $2 + local.set $3 loop $while-continue|0 - local.get $3 - local.get $12 - i32.gt_u + local.get $1 + local.get $4 + i32.lt_u if - local.get $12 + local.get $1 i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $0 i32.load - local.set $1 + local.set $2 local.get $0 - local.get $2 - local.get $12 + local.get $3 + local.get $1 i32.sub i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $0 i32.load i32.store local.get $0 - local.get $1 + local.get $2 i32.store - local.get $12 + local.get $1 i32.const 1 i32.add - local.set $12 + local.set $1 br $while-continue|0 end end end i32.const 0 - local.set $12 + local.set $15 loop $for-loop|1131 - local.get $9 - local.get $12 + local.get $10 + local.get $15 i32.gt_s if - local.get $8 - local.get $12 + local.get $9 + local.get $15 call $~lib/typedarray/Int32Array#__get i32.const 7616 - local.get $9 + local.get $10 i32.const 1 i32.sub - local.get $12 + local.get $15 i32.sub call $~lib/array/Array#__get i32.ne br_if $folding-inner31 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|1131 end end global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $7 i32.const 4 i32.const 8 call $~lib/typedarray/Int32Array#subarray - local.set $6 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $7 i32.store offset=12 i32.const 0 - local.set $12 - local.get $6 + local.set $1 + local.get $7 i32.load offset=4 - local.set $4 - local.get $6 + local.set $5 + local.get $7 i32.load offset=8 i32.const 2 i32.shr_u @@ -58679,67 +58497,67 @@ local.get $0 i32.const 1 i32.shr_u - local.set $3 + local.set $4 local.get $0 i32.const 1 i32.sub - local.set $2 + local.set $3 loop $while-continue|0133 - local.get $3 - local.get $12 - i32.gt_u + local.get $1 + local.get $4 + i32.lt_u if - local.get $12 + local.get $1 i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $0 i32.load - local.set $1 + local.set $2 local.get $0 - local.get $2 - local.get $12 + local.get $3 + local.get $1 i32.sub i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $0 i32.load i32.store local.get $0 - local.get $1 + local.get $2 i32.store - local.get $12 + local.get $1 i32.const 1 i32.add - local.set $12 + local.set $1 br $while-continue|0133 end end end - local.get $6 + local.get $7 i32.store offset=16 - local.get $6 + local.get $7 i32.const 0 call $~lib/typedarray/Int32Array#__get i32.const 8 i32.ne br_if $folding-inner32 - local.get $6 + local.get $7 i32.const 1 call $~lib/typedarray/Int32Array#__get i32.const 7 i32.ne br_if $folding-inner33 - local.get $6 + local.get $7 i32.const 2 call $~lib/typedarray/Int32Array#__get i32.const 6 i32.ne br_if $folding-inner34 - local.get $6 + local.get $7 i32.const 3 call $~lib/typedarray/Int32Array#__get i32.const 5 @@ -58773,47 +58591,47 @@ local.get $0 i32.const 7628 i32.load - local.tee $9 + local.tee $10 call $~lib/typedarray/Uint32Array#constructor - local.tee $8 + local.tee $9 i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $10 call $~lib/typedarray/Uint32Array#constructor - local.tee $6 + local.tee $7 i32.store offset=8 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|021134 - local.get $9 - local.get $12 + local.get $10 + local.get $15 i32.gt_s if - local.get $8 - local.get $12 + local.get $9 + local.get $15 i32.const 7616 - local.get $12 + local.get $15 call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set - local.get $6 - local.get $12 + local.get $7 + local.get $15 i32.const 7616 - local.get $12 + local.get $15 call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|021134 end end i32.const 0 - local.set $12 - local.get $8 + local.set $1 + local.get $9 i32.load offset=4 - local.set $4 - local.get $8 + local.set $5 + local.get $9 i32.load offset=8 i32.const 2 i32.shr_u @@ -58824,86 +58642,86 @@ local.get $0 i32.const 1 i32.shr_u - local.set $3 + local.set $4 local.get $0 i32.const 1 i32.sub - local.set $2 + local.set $3 loop $while-continue|0136 - local.get $3 - local.get $12 - i32.gt_u + local.get $1 + local.get $4 + i32.lt_u if - local.get $12 + local.get $1 i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $0 i32.load - local.set $1 + local.set $2 local.get $0 - local.get $2 - local.get $12 + local.get $3 + local.get $1 i32.sub i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $0 i32.load i32.store local.get $0 - local.get $1 + local.get $2 i32.store - local.get $12 + local.get $1 i32.const 1 i32.add - local.set $12 + local.set $1 br $while-continue|0136 end end end i32.const 0 - local.set $12 + local.set $15 loop $for-loop|124 - local.get $9 - local.get $12 + local.get $10 + local.get $15 i32.gt_s if - local.get $8 - local.get $12 + local.get $9 + local.get $15 call $~lib/typedarray/Uint32Array#__get i32.const 7616 - local.get $9 + local.get $10 i32.const 1 i32.sub - local.get $12 + local.get $15 i32.sub call $~lib/array/Array#__get i32.ne br_if $folding-inner31 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|124 end end global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $7 i32.const 8 call $~lib/typedarray/Uint32Array#subarray - local.set $6 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $7 i32.store offset=12 i32.const 0 - local.set $12 - local.get $6 + local.set $1 + local.get $7 i32.load offset=4 - local.set $4 - local.get $6 + local.set $5 + local.get $7 i32.load offset=8 i32.const 2 i32.shr_u @@ -58914,67 +58732,67 @@ local.get $0 i32.const 1 i32.shr_u - local.set $3 + local.set $4 local.get $0 i32.const 1 i32.sub - local.set $2 + local.set $3 loop $while-continue|0138 - local.get $3 - local.get $12 - i32.gt_u + local.get $1 + local.get $4 + i32.lt_u if - local.get $12 + local.get $1 i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $0 i32.load - local.set $1 + local.set $2 local.get $0 - local.get $2 - local.get $12 + local.get $3 + local.get $1 i32.sub i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $0 i32.load i32.store local.get $0 - local.get $1 + local.get $2 i32.store - local.get $12 + local.get $1 i32.const 1 i32.add - local.set $12 + local.set $1 br $while-continue|0138 end end end - local.get $6 + local.get $7 i32.store offset=16 - local.get $6 + local.get $7 i32.const 0 call $~lib/typedarray/Uint32Array#__get i32.const 8 i32.ne br_if $folding-inner32 - local.get $6 + local.get $7 i32.const 1 call $~lib/typedarray/Uint32Array#__get i32.const 7 i32.ne br_if $folding-inner33 - local.get $6 + local.get $7 i32.const 2 call $~lib/typedarray/Uint32Array#__get i32.const 6 i32.ne br_if $folding-inner34 - local.get $6 + local.get $7 i32.const 3 call $~lib/typedarray/Uint32Array#__get i32.const 5 @@ -59064,7 +58882,7 @@ end block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) i32.const 0 - local.set $12 + local.set $15 i32.const 0 local.get $4 i32.load offset=8 @@ -59082,29 +58900,29 @@ local.set $0 loop $while-continue|0140 local.get $1 - local.get $12 + local.get $15 i32.gt_s if i32.const 1 - local.get $12 + local.get $15 i32.const 3 i32.shl local.get $0 i32.add f64.load - local.tee $7 + local.tee $8 f64.const nan:0x8000000000000 f64.eq - local.get $7 - local.get $7 + local.get $8 + local.get $8 f64.ne i32.or br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 drop - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $while-continue|0140 end end @@ -59183,14 +59001,16 @@ unreachable end block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + i32.const 0 + local.set $1 i32.const 0 local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $1 + local.tee $2 i32.const 0 - local.get $1 + local.get $2 select i32.eqz br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 @@ -59200,29 +59020,29 @@ local.set $0 loop $while-continue|029 local.get $1 - local.get $13 - i32.gt_s + local.get $2 + i32.lt_s if i32.const 1 - local.get $13 + local.get $1 i32.const 2 i32.shl local.get $0 i32.add f32.load - local.tee $5 + local.tee $6 f32.const nan:0x400000 f32.eq - local.get $5 - local.get $5 + local.get $6 + local.get $6 f32.ne i32.or br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 drop - local.get $13 + local.get $1 i32.const 1 i32.add - local.set $13 + local.set $1 br $while-continue|029 end end @@ -60305,28 +60125,28 @@ local.get $0 i32.const 10940 i32.load - local.tee $6 + local.tee $5 call $~lib/typedarray/Int8Array#constructor local.tee $4 i32.store offset=4 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|035142 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 i32.const 10928 - local.get $12 + local.get $15 call $~lib/array/Array#__get i32.extend8_s call $~lib/typedarray/Int8Array#__set - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|035142 end end @@ -60399,24 +60219,24 @@ local.get $0 i32.store offset=16 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|139 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 call $~lib/typedarray/Int8Array#__get local.get $0 - local.get $12 + local.get $15 call $~lib/typedarray/Int8Array#__get i32.ne br_if $folding-inner19 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|139 end end @@ -60453,24 +60273,24 @@ local.tee $2 i32.store offset=4 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|044 local.get $3 - local.get $12 + local.get $15 i32.gt_s if local.get $2 - local.get $12 + local.get $15 i32.const 10928 - local.get $12 + local.get $15 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8Array#__set - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|044 end end @@ -60504,24 +60324,24 @@ local.tee $0 i32.store offset=16 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|149 local.get $3 - local.get $12 + local.get $15 i32.gt_s if local.get $2 - local.get $12 + local.get $15 call $~lib/typedarray/Uint8Array#__get local.get $0 - local.get $12 + local.get $15 call $~lib/typedarray/Uint8Array#__get i32.ne br_if $folding-inner19 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|149 end end @@ -60553,29 +60373,29 @@ local.get $0 i32.const 10940 i32.load - local.tee $6 + local.tee $5 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $4 i32.store offset=4 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|054 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 i32.const 10928 - local.get $12 + local.get $15 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|054 end end @@ -60648,24 +60468,24 @@ local.get $0 i32.store offset=16 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|159 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 call $~lib/typedarray/Uint8ClampedArray#__get local.get $0 - local.get $12 + local.get $15 call $~lib/typedarray/Uint8ClampedArray#__get i32.ne br_if $folding-inner19 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|159 end end @@ -60697,28 +60517,28 @@ local.get $0 i32.const 10940 i32.load - local.tee $6 + local.tee $5 call $~lib/typedarray/Int16Array#constructor local.tee $4 i32.store offset=4 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|064200 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 i32.const 10928 - local.get $12 + local.get $15 call $~lib/array/Array#__get i32.extend16_s call $~lib/typedarray/Int16Array#__set - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|064200 end end @@ -60793,24 +60613,24 @@ local.get $0 i32.store offset=16 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|169 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 call $~lib/typedarray/Int16Array#__get local.get $0 - local.get $12 + local.get $15 call $~lib/typedarray/Int16Array#__get i32.ne br_if $folding-inner19 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|169 end end @@ -60842,29 +60662,29 @@ local.get $0 i32.const 10940 i32.load - local.tee $6 + local.tee $5 call $~lib/typedarray/Uint16Array#constructor local.tee $4 i32.store offset=4 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|074 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 i32.const 10928 - local.get $12 + local.get $15 call $~lib/array/Array#__get i32.const 65535 i32.and call $~lib/typedarray/Uint16Array#__set - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|074 end end @@ -60939,24 +60759,24 @@ local.get $0 i32.store offset=16 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|179 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 call $~lib/typedarray/Uint16Array#__get local.get $0 - local.get $12 + local.get $15 call $~lib/typedarray/Uint16Array#__get i32.ne br_if $folding-inner19 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|179 end end @@ -60988,27 +60808,27 @@ local.get $0 i32.const 10940 i32.load - local.tee $6 + local.tee $5 call $~lib/typedarray/Int32Array#constructor local.tee $4 i32.store offset=4 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|084146 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 i32.const 10928 - local.get $12 + local.get $15 call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|084146 end end @@ -61083,24 +60903,24 @@ local.get $0 i32.store offset=16 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|189 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 call $~lib/typedarray/Int32Array#__get local.get $0 - local.get $12 + local.get $15 call $~lib/typedarray/Int32Array#__get i32.ne br_if $folding-inner19 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|189 end end @@ -61132,27 +60952,27 @@ local.get $0 i32.const 10940 i32.load - local.tee $6 + local.tee $5 call $~lib/typedarray/Uint32Array#constructor local.tee $4 i32.store offset=4 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|094148 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 i32.const 10928 - local.get $12 + local.get $15 call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|094148 end end @@ -61227,24 +61047,24 @@ local.get $0 i32.store offset=16 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|199 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 call $~lib/typedarray/Uint32Array#__get local.get $0 - local.get $12 + local.get $15 call $~lib/typedarray/Uint32Array#__get i32.ne br_if $folding-inner19 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|199 end end @@ -61276,28 +61096,28 @@ local.get $0 i32.const 10940 i32.load - local.tee $6 + local.tee $5 call $~lib/typedarray/Int64Array#constructor local.tee $4 i32.store offset=4 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|0104 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 i32.const 10928 - local.get $12 + local.get $15 call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Int64Array#__set - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|0104 end end @@ -61372,24 +61192,24 @@ local.get $0 i32.store offset=16 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|1109 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 call $~lib/typedarray/Int64Array#__get local.get $0 - local.get $12 + local.get $15 call $~lib/typedarray/Int64Array#__get i64.ne br_if $folding-inner19 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|1109 end end @@ -61421,28 +61241,28 @@ local.get $0 i32.const 10940 i32.load - local.tee $6 + local.tee $5 call $~lib/typedarray/Uint64Array#constructor local.tee $4 i32.store offset=4 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|0114151 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 i32.const 10928 - local.get $12 + local.get $15 call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Uint64Array#__set - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|0114151 end end @@ -61517,24 +61337,24 @@ local.get $0 i32.store offset=16 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|1119 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 call $~lib/typedarray/Uint64Array#__get local.get $0 - local.get $12 + local.get $15 call $~lib/typedarray/Uint64Array#__get i64.ne br_if $folding-inner19 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|1119 end end @@ -61566,28 +61386,28 @@ local.get $0 i32.const 10940 i32.load - local.tee $6 + local.tee $5 call $~lib/typedarray/Float32Array#constructor local.tee $4 i32.store offset=4 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|0124 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 i32.const 10928 - local.get $12 + local.get $15 call $~lib/array/Array#__get f32.convert_i32_s call $~lib/typedarray/Float32Array#__set - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|0124 end end @@ -61662,24 +61482,24 @@ local.get $0 i32.store offset=16 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|1129 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 call $~lib/typedarray/Float32Array#__get local.get $0 - local.get $12 + local.get $15 call $~lib/typedarray/Float32Array#__get f32.ne br_if $folding-inner19 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|1129 end end @@ -61711,28 +61531,28 @@ local.get $0 i32.const 10940 i32.load - local.tee $6 + local.tee $5 call $~lib/typedarray/Float64Array#constructor local.tee $4 i32.store offset=4 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|0134 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 i32.const 10928 - local.get $12 + local.get $15 call $~lib/array/Array#__get f64.convert_i32_s call $~lib/typedarray/Float64Array#__set - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|0134 end end @@ -61807,24 +61627,24 @@ local.get $0 i32.store offset=16 i32.const 0 - local.set $12 + local.set $15 loop $for-loop|1139 - local.get $6 - local.get $12 + local.get $5 + local.get $15 i32.gt_s if local.get $4 - local.get $12 + local.get $15 call $~lib/typedarray/Float64Array#__get local.get $0 - local.get $12 + local.get $15 call $~lib/typedarray/Float64Array#__get f64.ne br_if $folding-inner19 - local.get $12 + local.get $15 i32.const 1 i32.add - local.set $12 + local.set $15 br $for-loop|1139 end end @@ -61846,7 +61666,7 @@ global.get $~lib/memory/__stack_pointer i32.const 10 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $6 + local.tee $7 i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 3 @@ -61868,38 +61688,38 @@ global.get $~lib/memory/__stack_pointer i32.const 4 call $~lib/typedarray/Int64Array#constructor - local.tee $3 + local.tee $4 i32.store offset=8 - local.get $3 + local.get $4 i32.const 0 i64.const -10 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $4 i32.const 1 i64.const 100 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $4 i32.const 2 i64.const 10 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $4 i32.const 3 i64.const 300 call $~lib/typedarray/Int64Array#__set global.get $~lib/memory/__stack_pointer i32.const 2 call $~lib/typedarray/Int32Array#constructor - local.tee $4 + local.tee $5 i32.store offset=16 - local.get $4 + local.get $5 i32.const 0 i32.const 300 call $~lib/typedarray/Int32Array#__set - local.get $4 + local.get $5 i32.const 1 i32.const -1 call $~lib/typedarray/Int32Array#__set - local.get $6 + local.get $7 i32.load offset=8 local.get $0 i32.load offset=8 @@ -61909,44 +61729,44 @@ i32.add i32.lt_s br_if $folding-inner22 - local.get $6 + local.get $7 i32.load offset=4 i32.const 1 i32.add - local.set $2 + local.set $3 local.get $0 i32.load offset=4 - local.set $1 + local.set $2 local.get $0 i32.load offset=8 i32.const 2 i32.shr_u local.set $0 i32.const 0 - local.set $13 + local.set $1 loop $for-loop|0145 local.get $0 - local.get $13 + local.get $1 i32.gt_s if - local.get $2 - local.get $13 + local.get $1 + local.get $3 i32.add - local.get $13 + local.get $1 i32.const 2 i32.shl - local.get $1 + local.get $2 i32.add f32.load - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 f32.sub f32.const 0 f32.eq if (result i32) f32.const 0 f32.const 255 - local.get $5 + local.get $6 f32.min f32.max i32.trunc_f32_u @@ -61954,20 +61774,20 @@ i32.const 0 end i32.store8 - local.get $13 + local.get $1 i32.const 1 i32.add - local.set $13 + local.set $1 br $for-loop|0145 end end - local.get $6 - local.get $3 + local.get $7 + local.get $4 i32.const 4 call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> - local.get $6 + local.get $7 i32.load offset=8 - local.get $4 + local.get $5 i32.load offset=8 i32.const 2 i32.shr_u @@ -61975,34 +61795,34 @@ i32.add i32.lt_s br_if $folding-inner22 - local.get $6 + local.get $7 i32.load offset=4 i32.const 8 i32.add - local.set $3 - local.get $4 + local.set $4 + local.get $5 i32.load offset=4 - local.set $2 - local.get $4 + local.set $3 + local.get $5 i32.load offset=8 i32.const 2 i32.shr_u - local.set $1 + local.set $2 i32.const 0 - local.set $13 + local.set $1 loop $for-loop|0151 local.get $1 - local.get $13 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $3 - local.get $13 + local.get $1 + local.get $4 i32.add i32.const 255 - local.get $13 + local.get $1 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load local.tee $0 @@ -62018,10 +61838,10 @@ i32.xor i32.and i32.store8 - local.get $13 + local.get $1 i32.const 1 i32.add - local.set $13 + local.set $1 br $for-loop|0151 end end @@ -62034,7 +61854,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 - local.get $6 + local.get $7 local.get $0 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> global.get $~lib/memory/__stack_pointer @@ -62061,25 +61881,25 @@ global.get $~lib/memory/__stack_pointer i32.const 4 call $~lib/typedarray/Int16Array#constructor - local.tee $4 + local.tee $5 i32.store - local.get $4 + local.get $5 i32.const 0 i32.const -10 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $5 i32.const 1 i32.const 100 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $5 i32.const 2 i32.const 10 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $5 i32.const 3 i32.const 300 call $~lib/typedarray/Int16Array#__set - local.get $6 + local.get $7 i32.load offset=8 local.get $0 i32.load offset=8 @@ -62087,32 +61907,32 @@ i32.shr_u i32.lt_s br_if $folding-inner22 - local.get $6 + local.get $7 i32.load offset=4 - local.set $3 + local.set $4 local.get $0 i32.load offset=4 - local.set $2 + local.set $3 local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $1 + local.set $2 i32.const 0 - local.set $13 + local.set $1 loop $for-loop|0157 local.get $1 - local.get $13 - i32.gt_s + local.get $2 + i32.lt_s if - local.get $3 - local.get $13 + local.get $1 + local.get $4 i32.add i32.const 255 - local.get $13 + local.get $1 i32.const 2 i32.shl - local.get $2 + local.get $3 i32.add i32.load local.tee $0 @@ -62121,15 +61941,15 @@ i32.gt_u select i32.store8 - local.get $13 + local.get $1 i32.const 1 i32.add - local.set $13 + local.set $1 br $for-loop|0157 end end - local.get $6 - local.get $4 + local.get $7 + local.get $5 i32.const 5 call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> i32.const 10 @@ -62141,7 +61961,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 - local.get $6 + local.get $7 local.get $0 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> i32.const 0 @@ -64368,20 +64188,20 @@ i32.const 12 i32.const 8 call $~lib/rt/itcms/__new - local.tee $4 + local.tee $5 i32.store - local.get $4 + local.get $5 local.get $0 i32.load - local.tee $5 + local.tee $4 i32.store - local.get $5 + local.get $4 if - local.get $4 local.get $5 + local.get $4 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $4 + local.get $5 local.get $0 i32.load offset=4 local.get $1 @@ -64410,7 +64230,7 @@ i32.shl i32.add i32.store offset=4 - local.get $4 + local.get $5 local.get $2 i32.const 0 i32.lt_s @@ -64447,7 +64267,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $5 ) (func $~lib/typedarray/Float64Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -64481,20 +64301,20 @@ i32.const 12 i32.const 13 call $~lib/rt/itcms/__new - local.tee $4 + local.tee $5 i32.store - local.get $4 + local.get $5 local.get $0 i32.load - local.tee $5 + local.tee $4 i32.store - local.get $5 + local.get $4 if - local.get $4 local.get $5 + local.get $4 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $4 + local.get $5 local.get $0 i32.load offset=4 local.get $1 @@ -64523,7 +64343,7 @@ i32.shl i32.add i32.store offset=4 - local.get $4 + local.get $5 local.get $2 i32.const 0 i32.lt_s @@ -64560,7 +64380,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $5 ) (func $~lib/typedarray/Float64Array#sort@varargs (param $0 i32) (result i32) (local $1 i32) @@ -64635,37 +64455,37 @@ local.get $0 local.get $1 i32.shl - local.tee $1 + local.tee $5 i32.const 0 call $~lib/rt/itcms/__new - local.set $5 + local.set $1 local.get $3 if - local.get $5 - local.get $3 local.get $1 + local.get $3 + local.get $5 call $~lib/memory/memory.copy end local.get $4 - local.get $5 + local.get $1 i32.store i32.const 16 local.get $2 call $~lib/rt/itcms/__new local.tee $2 - local.get $5 + local.get $1 i32.store - local.get $5 + local.get $1 if local.get $2 - local.get $5 + local.get $1 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $2 - local.get $5 + local.get $1 i32.store offset=4 local.get $2 - local.get $1 + local.get $5 i32.store offset=8 local.get $2 local.get $0 @@ -64706,20 +64526,20 @@ i32.const 12 i32.const 3 call $~lib/rt/itcms/__new - local.tee $4 + local.tee $5 i32.store - local.get $4 + local.get $5 local.get $0 i32.load - local.tee $5 + local.tee $4 i32.store - local.get $5 + local.get $4 if - local.get $4 local.get $5 + local.get $4 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $4 + local.get $5 local.get $0 i32.load offset=4 local.get $1 @@ -64746,7 +64566,7 @@ local.tee $0 i32.add i32.store offset=4 - local.get $4 + local.get $5 local.get $2 i32.const 0 i32.lt_s @@ -64781,7 +64601,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $5 ) (func $~lib/typedarray/Int32Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -64910,208 +64730,208 @@ local.set $2 local.get $3 i32.const 12 - i32.const 4 - call $~lib/rt/itcms/__new - local.tee $3 - i32.store - local.get $3 - local.get $0 - i32.load - local.tee $4 - i32.store - local.get $4 - if - local.get $3 - local.get $4 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $3 - local.get $0 - i32.load offset=4 - i32.const 4 - local.get $2 - local.get $2 - i32.const 4 - i32.gt_s - select - local.tee $0 - i32.add - i32.store offset=4 - local.get $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select - end - local.tee $1 - local.get $0 - local.get $0 - local.get $1 - i32.lt_s - select - local.get $0 - i32.sub - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $3 - i32.const 0 - i32.store - local.get $0 - i32.load offset=8 - local.set $2 - local.get $3 - i32.const 12 - i32.const 5 - call $~lib/rt/itcms/__new - local.tee $3 - i32.store - local.get $3 - local.get $0 - i32.load - local.tee $4 - i32.store - local.get $4 - if - local.get $3 - local.get $4 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $3 - local.get $0 - i32.load offset=4 - i32.const 4 - local.get $2 - local.get $2 - i32.const 4 - i32.gt_s - select - local.tee $0 - i32.add - i32.store offset=4 - local.get $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select - end - local.tee $1 - local.get $0 - local.get $0 - local.get $1 - i32.lt_s - select - local.get $0 - i32.sub - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - ) - (func $~lib/typedarray/Int16Array#subarray (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $3 - i32.const 0 - i32.store - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $2 - local.get $3 - i32.const 12 - i32.const 6 + i32.const 4 call $~lib/rt/itcms/__new + local.tee $4 + i32.store + local.get $4 + local.get $0 + i32.load local.tee $3 i32.store local.get $3 + if + local.get $4 + local.get $3 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $4 local.get $0 - i32.load + i32.load offset=4 + i32.const 4 + local.get $2 + local.get $2 + i32.const 4 + i32.gt_s + select + local.tee $0 + i32.add + i32.store offset=4 + local.get $4 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select + end + local.tee $1 + local.get $0 + local.get $0 + local.get $1 + i32.lt_s + select + local.get $0 + i32.sub + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $~lib/typedarray/Uint8ClampedArray#subarray (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + if + i32.const 33040 + i32.const 33088 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 + i32.const 0 + i32.store + local.get $0 + i32.load offset=8 + local.set $2 + local.get $3 + i32.const 12 + i32.const 5 + call $~lib/rt/itcms/__new local.tee $4 i32.store local.get $4 + local.get $0 + i32.load + local.tee $3 + i32.store + local.get $3 if - local.get $3 local.get $4 + local.get $3 call $byn-split-outlined-A$~lib/rt/itcms/__link end + local.get $4 + local.get $0 + i32.load offset=4 + i32.const 4 + local.get $2 + local.get $2 + i32.const 4 + i32.gt_s + select + local.tee $0 + i32.add + i32.store offset=4 + local.get $4 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select + end + local.tee $1 + local.get $0 + local.get $0 + local.get $1 + i32.lt_s + select + local.get $0 + i32.sub + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $4 + ) + (func $~lib/typedarray/Int16Array#subarray (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + if + i32.const 33040 + i32.const 33088 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 + i32.const 0 + i32.store + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $2 local.get $3 + i32.const 12 + i32.const 6 + call $~lib/rt/itcms/__new + local.tee $4 + i32.store + local.get $4 + local.get $0 + i32.load + local.tee $3 + i32.store + local.get $3 + if + local.get $4 + local.get $3 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $4 local.get $0 i32.load offset=4 i32.const 4 @@ -65125,7 +64945,7 @@ i32.shl i32.add i32.store offset=4 - local.get $3 + local.get $4 local.get $1 i32.const 0 i32.lt_s @@ -65162,7 +64982,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $4 ) (func $~lib/typedarray/Uint16Array#subarray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -65196,20 +65016,20 @@ i32.const 12 i32.const 7 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 local.get $0 i32.load - local.tee $4 + local.tee $3 i32.store - local.get $4 + local.get $3 if - local.get $3 local.get $4 + local.get $3 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $3 + local.get $4 local.get $0 i32.load offset=4 i32.const 4 @@ -65223,7 +65043,7 @@ i32.shl i32.add i32.store offset=4 - local.get $3 + local.get $4 local.get $1 i32.const 0 i32.lt_s @@ -65260,7 +65080,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $4 ) (func $~lib/typedarray/Uint32Array#subarray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -65294,20 +65114,20 @@ i32.const 12 i32.const 9 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 local.get $0 i32.load - local.tee $4 + local.tee $3 i32.store - local.get $4 + local.get $3 if - local.get $3 local.get $4 + local.get $3 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $3 + local.get $4 local.get $0 i32.load offset=4 i32.const 4 @@ -65321,7 +65141,7 @@ i32.shl i32.add i32.store offset=4 - local.get $3 + local.get $4 local.get $1 i32.const 0 i32.lt_s @@ -65358,7 +65178,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $4 ) (func $~lib/typedarray/Int64Array#subarray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -65392,20 +65212,20 @@ i32.const 12 i32.const 10 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 local.get $0 i32.load - local.tee $4 + local.tee $3 i32.store - local.get $4 + local.get $3 if - local.get $3 local.get $4 + local.get $3 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $3 + local.get $4 local.get $0 i32.load offset=4 i32.const 4 @@ -65419,7 +65239,7 @@ i32.shl i32.add i32.store offset=4 - local.get $3 + local.get $4 local.get $1 i32.const 0 i32.lt_s @@ -65456,7 +65276,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $4 ) (func $~lib/typedarray/Uint64Array#subarray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -65490,20 +65310,20 @@ i32.const 12 i32.const 11 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 local.get $0 i32.load - local.tee $4 + local.tee $3 i32.store - local.get $4 + local.get $3 if - local.get $3 local.get $4 + local.get $3 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $3 + local.get $4 local.get $0 i32.load offset=4 i32.const 4 @@ -65517,7 +65337,7 @@ i32.shl i32.add i32.store offset=4 - local.get $3 + local.get $4 local.get $1 i32.const 0 i32.lt_s @@ -65554,7 +65374,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $4 ) (func $~lib/typedarray/Float32Array#subarray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -65588,20 +65408,20 @@ i32.const 12 i32.const 12 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $4 i32.store - local.get $3 + local.get $4 local.get $0 i32.load - local.tee $4 + local.tee $3 i32.store - local.get $4 + local.get $3 if - local.get $3 local.get $4 + local.get $3 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $3 + local.get $4 local.get $0 i32.load offset=4 i32.const 4 @@ -65615,7 +65435,7 @@ i32.shl i32.add i32.store offset=4 - local.get $3 + local.get $4 local.get $1 i32.const 0 i32.lt_s @@ -65652,7 +65472,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $4 ) (func $~lib/util/number/itoa32 (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/uri.optimized.wat b/tests/compiler/std/uri.optimized.wat index b47cc855eb..d104db6e95 100644 --- a/tests/compiler/std/uri.optimized.wat +++ b/tests/compiler/std/uri.optimized.wat @@ -1248,7 +1248,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1263,7 +1263,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1276,7 +1276,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1284,7 +1284,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1295,16 +1295,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1315,16 +1315,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1332,7 +1332,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1340,8 +1340,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1358,7 +1358,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1368,13 +1368,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1387,40 +1387,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -2669,9 +2669,6 @@ i32.le_u br_if $while-break|0 end - local.get $8 - i32.const 6 - i32.const 24 local.get $6 i32.const 55296 i32.ge_u @@ -2746,6 +2743,9 @@ end local.set $6 end + local.get $8 + i32.const 6 + i32.const 24 local.get $6 i32.const 128 i32.lt_u diff --git a/tests/compiler/templateliteral.optimized.wat b/tests/compiler/templateliteral.optimized.wat index 9ba2ab6fb4..0d0a525028 100644 --- a/tests/compiler/templateliteral.optimized.wat +++ b/tests/compiler/templateliteral.optimized.wat @@ -1483,7 +1483,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.set $5 + local.set $4 local.get $0 i32.const 16 i32.add @@ -1498,7 +1498,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 12 local.get $2 i32.const 19 @@ -1511,7 +1511,7 @@ i32.const 12 i32.le_u select - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1519,7 +1519,7 @@ memory.size local.tee $2 i32.const 4 - local.get $5 + local.get $4 i32.load offset=1568 local.get $2 i32.const 16 @@ -1530,16 +1530,16 @@ i32.shl i32.const 1 i32.const 27 - local.get $3 + local.get $5 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $5 + local.get $5 i32.const 536870910 i32.lt_u select @@ -1550,16 +1550,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 local.get $2 - local.get $4 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1567,7 +1567,7 @@ unreachable end end - local.get $5 + local.get $4 local.get $2 i32.const 16 i32.shl @@ -1575,8 +1575,8 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory + local.get $4 local.get $5 - local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz @@ -1593,7 +1593,7 @@ i32.load i32.const -4 i32.and - local.get $3 + local.get $5 i32.lt_u if i32.const 0 @@ -1603,13 +1603,13 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.const 4 i32.add i32.const 15 @@ -1622,40 +1622,40 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.const -4 i32.and - local.get $3 + local.get $5 i32.sub - local.tee $4 + local.tee $6 i32.const 16 i32.ge_u if local.get $2 - local.get $6 + local.get $3 i32.const 2 i32.and - local.get $3 + local.get $5 i32.or i32.store - local.get $3 + local.get $5 local.get $2 i32.const 4 i32.add i32.add local.tee $3 - local.get $4 + local.get $6 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $5 + local.get $4 local.get $3 call $~lib/rt/tlsf/insertBlock else local.get $2 - local.get $6 + local.get $3 i32.const -2 i32.and i32.store @@ -3645,6 +3645,7 @@ ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) local.get $2 i32.eqz if @@ -3783,68 +3784,69 @@ local.get $1 i32.const 1 i32.eq - if (result i32) + if local.get $0 i32.const 101 i32.store16 offset=2 local.get $0 i32.const 4 i32.add + local.tee $2 local.get $3 i32.const 1 i32.sub - local.tee $1 + local.tee $0 i32.const 0 i32.lt_s - local.tee $2 + local.tee $3 if i32.const 0 - local.get $1 + local.get $0 i32.sub - local.set $1 + local.set $0 end - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.const 100000 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 100 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 10 i32.ge_u i32.const 1 i32.add else - local.get $1 + local.get $0 i32.const 10000 i32.ge_u i32.const 3 i32.add - local.get $1 + local.get $0 i32.const 1000 i32.ge_u i32.add end else - local.get $1 + local.get $0 i32.const 10000000 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 1000000 i32.ge_u i32.const 6 i32.add else - local.get $1 + local.get $0 i32.const 1000000000 i32.ge_u i32.const 8 i32.add - local.get $1 + local.get $0 i32.const 100000000 i32.ge_u i32.add @@ -3854,13 +3856,12 @@ i32.add local.tee $1 call $~lib/util/number/utoa32_dec_lut - local.get $0 + local.get $2 i32.const 45 i32.const 43 - local.get $2 + local.get $3 select - i32.store16 offset=4 - local.get $1 + i32.store16 else local.get $0 i32.const 4 @@ -3881,19 +3882,20 @@ local.get $0 local.get $2 i32.add - local.tee $2 + local.tee $0 i32.const 101 i32.store16 offset=2 - local.get $2 + local.get $0 i32.const 4 i32.add + local.tee $4 local.get $3 i32.const 1 i32.sub local.tee $0 i32.const 0 i32.lt_s - local.tee $3 + local.tee $2 if i32.const 0 local.get $0 @@ -3951,16 +3953,18 @@ i32.add local.tee $0 call $~lib/util/number/utoa32_dec_lut - local.get $2 + local.get $4 i32.const 45 i32.const 43 - local.get $3 + local.get $2 select - i32.store16 offset=4 + i32.store16 local.get $0 local.get $1 i32.add + local.set $1 end + local.get $1 i32.const 2 i32.add end @@ -4105,37 +4109,36 @@ local.tee $1 i64.const 4294967295 i64.and - local.set $3 + local.set $4 local.get $1 i64.const 32 i64.shr_u - local.tee $9 + local.tee $1 global.get $~lib/util/number/_frc_pow - local.tee $10 + local.tee $9 i64.const 4294967295 i64.and - local.tee $11 - local.tee $1 + local.tee $10 i64.mul - local.get $1 - local.get $3 + local.get $4 + local.get $10 i64.mul i64.const 32 i64.shr_u i64.add - local.set $4 + local.set $11 global.get $~lib/util/number/_frc_plus - local.tee $1 + local.tee $3 i64.const 4294967295 i64.and local.set $12 - local.get $1 + local.get $3 i64.const 32 i64.shr_u - local.tee $1 - local.get $11 + local.tee $3 + local.get $10 i64.mul - local.get $11 + local.get $10 local.get $12 i64.mul i64.const 32 @@ -4151,35 +4154,34 @@ i64.const 32 i64.shr_u local.tee $13 - local.get $11 + local.get $10 i64.mul - local.get $11 + local.get $10 local.get $14 i64.mul i64.const 32 i64.shr_u i64.add - local.set $11 + local.set $10 local.get $2 i32.const 1 i32.shl i32.const 3920 i32.add + local.get $1 local.get $9 - local.get $10 i64.const 32 i64.shr_u local.tee $9 - local.tee $10 i64.mul - local.get $4 + local.get $11 i64.const 32 i64.shr_u i64.add - local.get $3 - local.get $10 - i64.mul local.get $4 + local.get $9 + i64.mul + local.get $11 i64.const 4294967295 i64.and i64.add @@ -4188,7 +4190,7 @@ i64.const 32 i64.shr_u i64.add - local.get $1 + local.get $3 local.get $9 i64.mul local.get $5 @@ -4219,14 +4221,14 @@ local.get $9 local.get $13 i64.mul - local.get $11 + local.get $10 i64.const 32 i64.shr_u i64.add local.get $9 local.get $14 i64.mul - local.get $11 + local.get $10 i64.const 4294967295 i64.and i64.add @@ -4991,17 +4993,17 @@ i32.load offset=16 local.get $0 i32.add - local.set $2 + local.set $1 loop $while-continue|0 local.get $0 - local.get $2 + local.get $1 i32.lt_u if local.get $0 i32.load - local.tee $1 + local.tee $2 if - local.get $1 + local.get $2 call $byn-split-outlined-A$~lib/rt/itcms/__visit end local.get $0 diff --git a/tests/compiler/throw.optimized.wat b/tests/compiler/throw.optimized.wat index 00cea386d3..57703faef9 100644 --- a/tests/compiler/throw.optimized.wat +++ b/tests/compiler/throw.optimized.wat @@ -642,11 +642,11 @@ return end global.get $~lib/rt/itcms/iter - local.tee $0 + local.tee $1 global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $1 i32.load offset=4 local.tee $3 i32.const -4 @@ -666,19 +666,19 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 18140 i32.lt_u if - local.get $0 + local.get $1 i32.const 0 i32.store offset=4 - local.get $0 + local.get $1 i32.const 0 i32.store offset=8 else global.get $~lib/rt/itcms/total - local.get $0 + local.get $1 i32.load i32.const -4 i32.and @@ -686,7 +686,7 @@ i32.add i32.sub global.set $~lib/rt/itcms/total - local.get $0 + local.get $1 i32.const 4 i32.add local.tee $3 @@ -697,12 +697,12 @@ i32.eqz if memory.size - local.tee $0 + local.tee $1 i32.const 0 i32.le_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -720,11 +720,11 @@ i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 18144 @@ -732,14 +732,14 @@ i32.const 0 i32.store offset=4 i32.const 0 - local.set $0 + local.set $1 loop $for-loop|1 - local.get $0 + local.get $1 i32.const 16 i32.lt_u if - local.get $0 local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -749,17 +749,17 @@ i32.add i32.const 0 i32.store offset=96 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -963,7 +963,6 @@ (func $~start (local $0 i32) (local $1 i32) - (local $2 i32) block $__inlined_func$start:throw global.get $~lib/memory/__stack_pointer i32.const 12 @@ -976,13 +975,12 @@ br_if $folding-inner0 global.get $~lib/memory/__stack_pointer local.tee $1 - local.tee $2 i64.const 0 i64.store - local.get $2 + local.get $1 i32.const 0 i32.store offset=8 - local.get $2 + local.get $1 i32.const 1056 i32.store local.get $1 diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index ca32daa0b6..6fac2b9873 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -2569,6 +2569,7 @@ ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) local.get $2 i32.eqz if @@ -2707,68 +2708,69 @@ local.get $1 i32.const 1 i32.eq - if (result i32) + if local.get $0 i32.const 101 i32.store16 offset=2 local.get $0 i32.const 4 i32.add + local.tee $2 local.get $3 i32.const 1 i32.sub - local.tee $1 + local.tee $0 i32.const 0 i32.lt_s - local.tee $2 + local.tee $3 if i32.const 0 - local.get $1 + local.get $0 i32.sub - local.set $1 + local.set $0 end - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.const 100000 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 100 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 10 i32.ge_u i32.const 1 i32.add else - local.get $1 + local.get $0 i32.const 10000 i32.ge_u i32.const 3 i32.add - local.get $1 + local.get $0 i32.const 1000 i32.ge_u i32.add end else - local.get $1 + local.get $0 i32.const 10000000 i32.lt_u if (result i32) - local.get $1 + local.get $0 i32.const 1000000 i32.ge_u i32.const 6 i32.add else - local.get $1 + local.get $0 i32.const 1000000000 i32.ge_u i32.const 8 i32.add - local.get $1 + local.get $0 i32.const 100000000 i32.ge_u i32.add @@ -2778,13 +2780,12 @@ i32.add local.tee $1 call $~lib/util/number/utoa32_dec_lut - local.get $0 + local.get $2 i32.const 45 i32.const 43 - local.get $2 + local.get $3 select - i32.store16 offset=4 - local.get $1 + i32.store16 else local.get $0 i32.const 4 @@ -2805,19 +2806,20 @@ local.get $0 local.get $2 i32.add - local.tee $2 + local.tee $0 i32.const 101 i32.store16 offset=2 - local.get $2 + local.get $0 i32.const 4 i32.add + local.tee $4 local.get $3 i32.const 1 i32.sub local.tee $0 i32.const 0 i32.lt_s - local.tee $3 + local.tee $2 if i32.const 0 local.get $0 @@ -2875,16 +2877,18 @@ i32.add local.tee $0 call $~lib/util/number/utoa32_dec_lut - local.get $2 + local.get $4 i32.const 45 i32.const 43 - local.get $3 + local.get $2 select - i32.store16 offset=4 + i32.store16 local.get $0 local.get $1 i32.add + local.set $1 end + local.get $1 i32.const 2 i32.add end @@ -2897,16 +2901,15 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i64) + (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) + (local $10 i64) (local $11 i64) (local $12 i64) (local $13 i64) (local $14 i64) (local $15 i64) - (local $16 i64) local.get $1 f64.const 0 f64.lt @@ -2927,19 +2930,19 @@ i64.const 52 i64.shr_u i32.wrap_i64 - local.tee $8 + local.tee $7 i32.const 1 - local.get $8 + local.get $7 select i32.const 1075 i32.sub - local.tee $9 + local.tee $8 i32.const 1 i32.sub local.get $2 i64.const 4503599627370495 i64.and - local.get $8 + local.get $7 i32.const 0 i32.ne i64.extend_i32_u @@ -2954,11 +2957,11 @@ local.tee $4 i64.clz i32.wrap_i64 - local.tee $8 + local.tee $7 i32.sub - local.set $10 + local.set $9 local.get $4 - local.get $8 + local.get $7 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus @@ -2968,25 +2971,25 @@ i64.eq i32.const 1 i32.add - local.tee $8 + local.tee $7 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $9 local.get $8 + local.get $7 i32.sub - local.get $10 + local.get $9 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $10 + local.get $9 global.set $~lib/util/number/_exp i32.const 348 i32.const -61 global.get $~lib/util/number/_exp - local.tee $8 + local.tee $7 i32.sub f64.convert_i32_s f64.const 0.30102999566398114 @@ -2995,9 +2998,9 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $9 + local.tee $8 local.get $1 - local.get $9 + local.get $8 f64.convert_i32_s f64.ne i32.add @@ -3005,18 +3008,18 @@ i32.shr_s i32.const 1 i32.add - local.tee $9 + local.tee $8 i32.const 3 i32.shl - local.tee $10 + local.tee $9 i32.sub global.set $~lib/util/number/_K - local.get $10 + local.get $9 i32.const 1328 i32.add i64.load global.set $~lib/util/number/_frc_pow - local.get $9 + local.get $8 i32.const 1 i32.shl i32.const 2024 @@ -3030,38 +3033,37 @@ local.tee $2 i64.const 4294967295 i64.and - local.set $11 + local.set $5 local.get $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $4 global.get $~lib/util/number/_frc_pow - local.tee $7 + local.tee $10 i64.const 4294967295 i64.and - local.tee $12 - local.tee $2 + local.tee $11 i64.mul - local.get $2 + local.get $5 local.get $11 i64.mul i64.const 32 i64.shr_u i64.add - local.set $13 + local.set $12 global.get $~lib/util/number/_frc_plus - local.tee $4 + local.tee $2 i64.const 4294967295 i64.and - local.set $2 - local.get $4 + local.set $13 + local.get $2 i64.const 32 i64.shr_u local.tee $6 - local.get $12 + local.get $11 i64.mul - local.get $2 - local.get $12 + local.get $11 + local.get $13 i64.mul i64.const 32 i64.shr_u @@ -3071,41 +3073,34 @@ local.tee $15 i64.const 4294967295 i64.and - local.set $4 + local.set $2 local.get $15 i64.const 32 i64.shr_u local.tee $15 - local.get $12 + local.get $11 i64.mul - local.get $4 - local.get $12 + local.get $2 + local.get $11 i64.mul i64.const 32 i64.shr_u i64.add - local.set $12 - local.get $3 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $0 - local.get $5 - local.get $7 + local.set $11 + local.get $6 + local.get $10 i64.const 32 i64.shr_u - local.tee $16 - local.tee $7 + local.tee $10 i64.mul - local.get $13 + local.get $14 i64.const 32 i64.shr_u i64.add - local.get $7 - local.get $11 - i64.mul + local.get $10 local.get $13 + i64.mul + local.get $14 i64.const 4294967295 i64.and i64.add @@ -3114,17 +3109,26 @@ i64.const 32 i64.shr_u i64.add - local.get $6 - local.get $16 + i64.const 1 + i64.sub + local.set $6 + local.get $3 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $0 + local.get $4 + local.get $10 i64.mul - local.get $14 + local.get $12 i64.const 32 i64.shr_u i64.add - local.get $2 - local.get $16 + local.get $5 + local.get $10 i64.mul - local.get $14 + local.get $12 i64.const 4294967295 i64.and i64.add @@ -3133,26 +3137,24 @@ i64.const 32 i64.shr_u i64.add - i64.const 1 - i64.sub - local.tee $2 + local.get $6 global.get $~lib/util/number/_exp_pow - local.get $8 + local.get $7 i32.add i32.const -64 i32.sub - local.get $2 + local.get $6 + local.get $10 local.get $15 - local.get $16 i64.mul - local.get $12 + local.get $11 i64.const 32 i64.shr_u i64.add - local.get $4 - local.get $16 + local.get $2 + local.get $10 i64.mul - local.get $12 + local.get $11 i64.const 4294967295 i64.and i64.add From 0a93d9249951a7157e69a23f0a27ac5544a1a686 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 2 Dec 2021 10:31:43 +0100 Subject: [PATCH 081/175] exclude 'debug.log' --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 06e91487ba..aa04eaa0bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ node_modules/ -npm-debug.* +*debug.* dist/ out/ raw/ From eac6b314045e589d7596f9c29dbf292459d210a0 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 00:14:44 +0100 Subject: [PATCH 082/175] more --- .eslintrc.cjs | 4 +++- cli/index.d.ts | 2 +- cli/index.js | 11 +++-------- package.json | 2 +- scripts/build.js | 13 ++++++++----- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index dce09ed1ec..18892f0cce 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,4 +1,6 @@ -module.exports = { // eslint-disable-line no-undef +/* global module */ + +module.exports = { root: true, parser: "@typescript-eslint/parser", plugins: [ diff --git a/cli/index.d.ts b/cli/index.d.ts index 3cd1810220..0c034b7dec 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -29,7 +29,7 @@ export const defaultShrinkLevel: number; /** A compatible output stream. */ export interface OutputStream { - /** Writes another chunk of data to the stream. */ + /** Writes a chunk of data to the stream. */ write(chunk: Uint8Array | string): void; } diff --git a/cli/index.js b/cli/index.js index 778117bf7f..af5bf2bde5 100644 --- a/cli/index.js +++ b/cli/index.js @@ -85,11 +85,6 @@ if (useWasm) { if (assemblyscript._start) assemblyscript._start(); } -export { - loader, - rtrace -}; - const require = module.createRequire(import.meta.url); const WIN = process.platform === "win32"; @@ -130,7 +125,7 @@ export const version = generated.version; export const options = generated.options; /** Prefix used for library files. */ -export const libraryPrefix = __getString(assemblyscript.LIBRARY_PREFIX.valueOf()); +export const libraryPrefix = generated.libraryPrefix; /** Bundled library files. */ export const libraryFiles = generated.libraryFiles; @@ -1399,14 +1394,14 @@ export function createMemoryStream(fn) { /** Compatible TypeScript compiler options for syntax highlighting etc. */ export const tscOptions = { alwaysStrict: true, + strictNullChecks: true, noImplicitAny: true, noImplicitReturns: true, noImplicitThis: true, noEmitOnError: true, - strictNullChecks: true, + noPropertyAccessFromIndexSignature: true, experimentalDecorators: true, target: "esnext", - module: "commonjs", noLib: true, types: [], allowJs: false diff --git a/package.json b/package.json index 783277fc21..784488f3bc 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "lint": "eslint --max-warnings 0 --ext js . && eslint --max-warnings 0 --ext ts .", "build": "node scripts/build", "watch": "node scripts/build --watch", - "test": "npm run test:parser && npm run test:compiler --parallel && npm run test:browser && npm run test:packages && npm run test:extension && npm run test:asconfig", + "test": "npm run test:parser && npm run test:compiler -- --parallel && npm run test:browser && npm run test:packages && npm run test:extension && npm run test:asconfig", "test:parser": "node --enable-source-maps tests/parser", "test:compiler": "node --enable-source-maps --experimental-wasi-unstable-preview1 --no-warnings tests/compiler", "test:browser": "node --enable-source-maps tests/browser", diff --git a/scripts/build.js b/scripts/build.js index bb552d1ab8..119b8d1e4f 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -81,12 +81,8 @@ const stdlibPlugin = { out.push( `export const options = ${JSON.stringify(options, null, 2)};\n` ); - const definitionFiles = { - assembly: bundleFile(path.join(dirname, "..", "std", "assembly", "index.d.ts")), - portable: bundleFile(path.join(dirname, "..", "std", "portable", "index.d.ts")) - }; out.push( - `export const definitionFiles = ${JSON.stringify(definitionFiles, null, 2)};\n` + `export const libraryPrefix = "~lib/";\n` ); const libraryDir = path.join(dirname, "..", "std", "assembly"); const libraryFiles = {}; @@ -96,6 +92,13 @@ const stdlibPlugin = { out.push( `export const libraryFiles = ${JSON.stringify(libraryFiles, null, 2)};\n` ); + const definitionFiles = { + assembly: bundleFile(path.join(dirname, "..", "std", "assembly", "index.d.ts")), + portable: bundleFile(path.join(dirname, "..", "std", "portable", "index.d.ts")) + }; + out.push( + `export const definitionFiles = ${JSON.stringify(definitionFiles, null, 2)};\n` + ); const generated = out.join(""); fs.writeFileSync(path.join(dirname, "..", "cli", "index.generated.js"), generated); return { From 416d734687e13ed0ef48f045d560e9804d2191b4 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 13:23:33 +0100 Subject: [PATCH 083/175] drop webidl and asm.js --- cli/index.d.ts | 4 - cli/index.js | 55 +------- cli/options.json | 14 -- src/{definitions.ts => bindings.ts} | 198 +--------------------------- src/glue/binaryen.js | 4 - src/index.ts | 9 +- src/module.ts | 4 - 7 files changed, 5 insertions(+), 283 deletions(-) rename src/{definitions.ts => bindings.ts} (72%) diff --git a/cli/index.d.ts b/cli/index.d.ts index 0c034b7dec..9f2f5c9769 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -98,10 +98,6 @@ export interface CompilerOptions { binaryFile?: string; /** Specifies the text output file (.wat). */ textFile?: string; - /** Specifies the JavaScript (via wasm2js) output file (.js). */ - jsFile?: string; - /** Specifies the WebIDL output file (.webidl). */ - idlFile?: string; /** Specifies the TypeScript definition output file (.d.ts). */ tsdFile?: string; /** Enables source map generation. Optionally takes the URL. */ diff --git a/cli/index.js b/cli/index.js index af5bf2bde5..84de38136c 100644 --- a/cli/index.js +++ b/cli/index.js @@ -964,8 +964,6 @@ export async function main(argv, options) { if (opts.outFile != null) { if (opts.textFile == null && /\.was?t$/.test(opts.outFile)) { opts.textFile = opts.outFile; - } else if (opts.jsFile == null && /\.js$/.test(opts.outFile)) { - opts.jsFile = opts.outFile; } else if (opts.binaryFile == null) { opts.binaryFile = opts.outFile; } @@ -974,9 +972,7 @@ export async function main(argv, options) { let hasStdout = false; let hasOutput = opts.textFile != null || opts.binaryFile != null - || opts.jsFile != null - || opts.tsdFile != null - || opts.idlFile != null; + || opts.tsdFile != null; // Write binary if (opts.binaryFile != null) { @@ -1057,27 +1053,6 @@ export async function main(argv, options) { } } - // Write WebIDL - if (opts.idlFile != null) { - let begin = stats.begin(); - stats.emitCount++; - let idl; - try { - idl = assemblyscript.buildIDL(program); - } catch (e) { - crash("buildIDL", e); - } - stats.emitTime += stats.end(begin); - if (opts.idlFile.length) { - pending.push( - writeFile(opts.idlFile, __getString(idl), baseDir) - ); - } else if (!hasStdout) { - hasStdout = true; - writeStdout(__getString(idl)); - } - } - // Write TypeScript definition if (opts.tsdFile != null) { let begin = stats.begin(); @@ -1098,34 +1073,6 @@ export async function main(argv, options) { writeStdout(__getString(tsd)); } } - - // Write JS (modifies the binary, so must be last) - if (opts.jsFile != null) { - let js; - if (opts.jsFile.length) { - stats.emitCount++; - let begin = stats.begin(); - try { - js = module.emitAsmjs(); - } catch (e) { - crash("emitJS", e); - } - stats.emitTime += stats.end(begin); - pending.push( - writeFile(opts.jsFile, js, baseDir) - ); - } else if (!hasStdout) { - stats.emitCount++; - let begin = stats.begin(); - try { - js = module.emitAsmjs(); - } catch (e) { - crash("emitJS", e); - } - stats.emitTime += stats.end(begin); - writeStdout(js); - } - } } try { diff --git a/cli/options.json b/cli/options.json index e8b049cf63..2bf22ee92c 100644 --- a/cli/options.json +++ b/cli/options.json @@ -89,20 +89,6 @@ "alias": "t", "isPath": true }, - "jsFile": { - "category": "Output", - "description": "Specifies the JavaScript (via wasm2js) output file (.js).", - "type": "s", - "alias": "j", - "isPath": true - }, - "idlFile": { - "category": "Output", - "description": "Specifies the WebIDL output file (.webidl).", - "type": "s", - "alias": "i", - "isPath": true - }, "tsdFile": { "category": "Output", "description": "Specifies the TypeScript definition output file (.d.ts).", diff --git a/src/definitions.ts b/src/bindings.ts similarity index 72% rename from src/definitions.ts rename to src/bindings.ts index cdf6749d06..ba09db5ddb 100644 --- a/src/definitions.ts +++ b/src/bindings.ts @@ -2,7 +2,6 @@ * @fileoverview Builders for various definitions describing a module. * * - TSDBuilder: Creates a TypeScript definition file (.d.ts) - * - IDLBuilder: Creates a WebIDL interface definition (.webidl) * * @license Apache-2.0 */ @@ -23,7 +22,6 @@ import { FunctionPrototype, Class, ClassPrototype, - Namespace, ConstantValueKind, Interface, Property, @@ -176,198 +174,6 @@ export abstract class ExportsWalker { abstract visitAlias(name: string, element: Element, originalName: string): void; } -/** A WebIDL definitions builder. */ -export class IDLBuilder extends ExportsWalker { - - /** Builds WebIDL definitions for the specified program. */ - static build(program: Program): string { - return new IDLBuilder(program).build(); - } - - private sb: string[] = []; - private indentLevel: i32 = 0; - - /** Constructs a new WebIDL builder. */ - constructor(program: Program, includePrivate: bool = false) { - super(program, includePrivate); - } - - visitGlobal(name: string, element: Global): void { - var sb = this.sb; - var isConst = element.is(CommonFlags.INLINED); - indent(sb, this.indentLevel); - if (isConst) sb.push("const "); - sb.push(this.typeToString(element.type)); - sb.push(" "); - sb.push(name); - if (isConst) { - switch (element.constantValueKind) { - case ConstantValueKind.INTEGER: { - sb.push(" = "); - sb.push(i64_to_string(element.constantIntegerValue)); - break; - } - case ConstantValueKind.FLOAT: { - sb.push(" = "); - sb.push(element.constantFloatValue.toString()); - break; - } - default: assert(false); - } - } - sb.push(";\n"); - } - - visitEnum(name: string, element: Enum): void { - var sb = this.sb; - indent(sb, this.indentLevel++); - sb.push("interface "); - sb.push(name); - sb.push(" {\n"); - var members = element.members; - if (members) { - // TODO: for (let [memberName, member] of members) { - for (let _keys = Map_keys(members), i = 0, k = _keys.length; i < k; ++i) { - let memberName = unchecked(_keys[i]); - let member = assert(members.get(memberName)); - if (member.kind == ElementKind.ENUMVALUE) { - let enumValue = member; - let isConst = enumValue.is(CommonFlags.INLINED); - indent(sb, this.indentLevel); - if (isConst) sb.push("const "); - else sb.push("readonly "); - sb.push("unsigned long "); - sb.push(memberName); - if (isConst) { - sb.push(" = "); - assert(enumValue.constantValueKind == ConstantValueKind.INTEGER); - sb.push(i64_low(enumValue.constantIntegerValue).toString()); - } - sb.push(";\n"); - } - } - // TODO: for (let member of members.values()) { - for (let _values = Map_values(members), i = 0, k = _values.length; i < k; ++i) { - let member = unchecked(_values[i]); - if (member.kind != ElementKind.ENUMVALUE) this.visitElement(member.name, member); - } - } - indent(sb, --this.indentLevel); - sb.push("}\n"); - } - - visitFunction(name: string, element: Function): void { - var sb = this.sb; - var signature = element.signature; - indent(sb, this.indentLevel); - sb.push(this.typeToString(signature.returnType)); - sb.push(" "); - sb.push(name); - sb.push("("); - var parameters = signature.parameterTypes; - var numParameters = parameters.length; - // var requiredParameters = signature.requiredParameters; - for (let i = 0; i < numParameters; ++i) { - if (i) sb.push(", "); - // if (i >= requiredParameters) sb.push("optional "); - sb.push(this.typeToString(parameters[i])); - sb.push(" "); - sb.push(element.getParameterName(i)); - } - sb.push(");\n"); - var members = element.members; - if (members !== null && members.size > 0) { - indent(sb, this.indentLevel); - sb.push("interface "); - sb.push(element.name); - sb.push(" {\n"); - // TODO: for (let member of members.values()) { - for (let _values = Map_values(members), i = 0, k = _values.length; i < k; ++i) { - let member = unchecked(_values[i]); - this.visitElement(member.name, member); - } - indent(sb, --this.indentLevel); - sb.push("}\n"); - } - } - - visitClass(name: string, element: Class): void { - var sb = this.sb; - indent(sb, this.indentLevel++); - sb.push("interface "); - sb.push(name); - sb.push(" {\n"); - // TODO - indent(sb, --this.indentLevel); - sb.push("}\n"); - } - - visitInterface(name: string, element: Interface): void { - this.visitClass(name, element); - } - - visitField(name: string, element: Field): void { - // TODO - } - - visitNamespace(name: string, element: Namespace): void { - var sb = this.sb; - indent(sb, this.indentLevel++); - sb.push("interface "); - sb.push(name); - sb.push(" {\n"); - var members = element.members; - if (members) { - // TODO: for (let member of members.values()) { - for (let _values = Map_values(members), i = 0, k = _values.length; i < k; ++i) { - let member = unchecked(_values[i]); - this.visitElement(member.name, member); - } - } - indent(sb, --this.indentLevel); - sb.push("}\n"); - } - - visitAlias(name: string, element: Element, originalName: string): void { - // TODO - } - - typeToString(type: Type): string { - switch (type.kind) { - case TypeKind.I8: return "byte"; - case TypeKind.I16: return "short"; - case TypeKind.I32: return "long"; - case TypeKind.I64: return "long long"; - case TypeKind.ISIZE: return this.program.options.isWasm64 ? "long long" : "long"; - case TypeKind.U8: return "octet"; - case TypeKind.U16: return "unsigned short"; - case TypeKind.U32: return "unsigned long"; - // ^ TODO: function types - case TypeKind.U64: return "unsigned long long"; - case TypeKind.USIZE: return this.program.options.isWasm64 ? "unsigned long long" : "unsigned long"; - // ^ TODO: class types - case TypeKind.BOOL: return "boolean"; - case TypeKind.F32: return "unrestricted float"; - case TypeKind.F64: return "unrestricted double"; - case TypeKind.VOID: return "void"; - default: { - assert(false); - return ""; - } - } - } - - build(): string { - var sb = this.sb; - sb.push("interface ASModule {\n"); - ++this.indentLevel; - this.walk(); - --this.indentLevel; - sb.push("}\n"); - return sb.join(""); - } -} - /** A TypeScript definitions builder. */ export class TSDBuilder extends ExportsWalker { @@ -379,7 +185,7 @@ export class TSDBuilder extends ExportsWalker { private sb: string[] = []; private indentLevel: i32 = 0; - /** Constructs a new WebIDL builder. */ + /** Constructs a new TypeScript definitions builder. */ constructor(program: Program, includePrivate: bool = false) { super(program, includePrivate); } @@ -640,7 +446,7 @@ export class TSDBuilder extends ExportsWalker { sb.push("export const __rtti_base: usize;\n"); } sb.push("export const __setArgumentsLength: ((n: i32) => void) | undefined;\n"); - return this.sb.join(""); + return sb.join(""); } } diff --git a/src/glue/binaryen.js b/src/glue/binaryen.js index d89b8c8684..eb0e869fb2 100644 --- a/src/glue/binaryen.js +++ b/src/glue/binaryen.js @@ -18,10 +18,6 @@ Module.prototype.toText = function toText(watFormat = true) { } }; -Module.prototype.toAsmjs = function toAsmjs() { - return binaryen.wrapModule(this.ref).emitAsmjs(); -}; - export const { _BinaryenTypeCreate, _BinaryenTypeArity, diff --git a/src/index.ts b/src/index.ts index 34f5e268b8..912dbc1f5c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -35,7 +35,7 @@ import { Target, Runtime, Feature } from "./common"; import { Compiler, Options } from "./compiler"; -import { IDLBuilder, TSDBuilder } from "./definitions"; +import { TSDBuilder } from "./bindings"; import { DiagnosticMessage, DiagnosticCategory, formatDiagnosticMessage } from "./diagnostics"; import { Module } from "./module"; import { Program } from "./program"; @@ -280,11 +280,6 @@ export function compile(program: Program): Module { return new Compiler(program).compile(); } -/** Builds WebIDL definitions for the specified program. */ -export function buildIDL(program: Program): string { - return IDLBuilder.build(program); -} - /** Builds TypeScript definitions for the specified program. */ export function buildTSD(program: Program): string { return TSDBuilder.build(program); @@ -294,7 +289,7 @@ export function buildTSD(program: Program): string { export * from "./ast"; export * from "./common"; export * from "./compiler"; -export * from "./definitions"; +export * from "./bindings"; export * from "./diagnostics"; export * from "./flow"; export * from "./module"; diff --git a/src/module.ts b/src/module.ts index dea9d7acfa..7962519f38 100644 --- a/src/module.ts +++ b/src/module.ts @@ -2495,10 +2495,6 @@ export class Module { throw new Error("not implemented"); // JS glue overrides this } - toAsmjs(): string { - throw new Error("not implemented"); // JS glue overrides this - } - private cachedStringsToPointers: Map = new Map(); private cachedPointersToStrings: Map = new Map(); From c2f5f32540c07081d906fb590cef1c9065948c10 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 14:18:25 +0100 Subject: [PATCH 084/175] support ESM and CJS transforms --- cli/index.js | 31 ++++++++++++++++++++++++------- package.json | 3 ++- scripts/build-dts.js | 2 +- tests/transform/index.cjs | 5 +++++ tests/transform/index.js | 8 ++++++++ util/browser/url.js | 3 +++ util/node.d.ts | 4 +++- util/node.js | 6 +++++- 8 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 tests/transform/index.cjs create mode 100644 tests/transform/index.js create mode 100644 util/browser/url.js diff --git a/cli/index.js b/cli/index.js index 84de38136c..29146d1b84 100644 --- a/cli/index.js +++ b/cli/index.js @@ -27,7 +27,7 @@ * in the build step. See dist/asc.js for the bundle. */ -import { fs, module, path, process } from "../util/node.js"; +import { fs, module, path, process, url } from "../util/node.js"; import { fetch } from "../util/web.js"; import { Colors} from "../util/terminal.js"; import { utf8 } from "../util/text.js"; @@ -463,13 +463,30 @@ export async function main(argv, options) { let transformArgs = unique(opts.transform); for (let i = 0, k = transformArgs.length; i < k; ++i) { let filename = transformArgs[i].trim(); - try { - transforms.push(require(require.resolve(filename, { - paths: [baseDir, process.cwd()] - }))); - } catch (e) { - return prepareResult(e); + let resolved; + let transform; + if (require.resolve && url.pathToFileURL) { + try { + resolved = require.resolve(filename, { paths: [process.cwd(), baseDir] }); + transform = (await import(url.pathToFileURL(resolved))).default; + } catch (e1) { + try { + transform = require(resolved); + } catch (e2) { + return prepareResult(e1); + } + } + } else { + try { + transform = (await import(new URL(filename, import.meta.url))).default; + } catch (e) { + return prepareResult(e); + } + } + if (typeof transform !== "function") { + return prepareResult(Error("not a transform: " + transformArgs[i])); } + transforms.push(transform); } } diff --git a/package.json b/package.json index 784488f3bc..3108487e9d 100644 --- a/package.json +++ b/package.json @@ -64,13 +64,14 @@ "lint": "eslint --max-warnings 0 --ext js . && eslint --max-warnings 0 --ext ts .", "build": "node scripts/build", "watch": "node scripts/build --watch", - "test": "npm run test:parser && npm run test:compiler -- --parallel && npm run test:browser && npm run test:packages && npm run test:extension && npm run test:asconfig", + "test": "npm run test:parser && npm run test:compiler -- --parallel && npm run test:browser && npm run test:packages && npm run test:extension && npm run test:asconfig && npm run test:transform", "test:parser": "node --enable-source-maps tests/parser", "test:compiler": "node --enable-source-maps --experimental-wasi-unstable-preview1 --no-warnings tests/compiler", "test:browser": "node --enable-source-maps tests/browser", "test:packages": "cd tests/packages && npm run test", "test:extension": "cd tests/extension && npm run test", "test:asconfig": "cd tests/asconfig && npm run test", + "test:transform": "node bin/asc tests/compiler/empty --transform ./tests/transform/index.js --noEmit && node bin/asc tests/compiler/empty --transform ./tests/transform/index.cjs --noEmit", "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized", "asbuild:untouched": "node bin/asc --config src/asconfig.json --target untouched", "asbuild:optimized": "node bin/asc --config src/asconfig.json --target optimized", diff --git a/scripts/build-dts.js b/scripts/build-dts.js index 2baaf6f7cc..49ddcdc0a0 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -560,7 +560,7 @@ function generateTransform() { fs.writeFileSync( pathUtil.resolve(__dirname, "..", "dist", "transform.js"), [ - `export class Transform {}\n` + `export function Transform() { /* stub */ }\n` ].join("") ); fs.writeFileSync( diff --git a/tests/transform/index.cjs b/tests/transform/index.cjs new file mode 100644 index 0000000000..039ed4f3ba --- /dev/null +++ b/tests/transform/index.cjs @@ -0,0 +1,5 @@ +/* global module, console */ + +module.exports = function MyTransform() { + console.log("CJS transform loaded"); +}; diff --git a/tests/transform/index.js b/tests/transform/index.js new file mode 100644 index 0000000000..0139fdb578 --- /dev/null +++ b/tests/transform/index.js @@ -0,0 +1,8 @@ +import { Transform } from "../../dist/transform.js"; + +export default class MyTransform extends Transform { + constructor() { + super(); + console.log("ESM transform loaded"); + } +} diff --git a/util/browser/url.js b/util/browser/url.js new file mode 100644 index 0000000000..9999fae9fd --- /dev/null +++ b/util/browser/url.js @@ -0,0 +1,3 @@ +const url = { +}; +export default url; diff --git a/util/node.d.ts b/util/node.d.ts index 1f9f5dcd65..25575020ff 100644 --- a/util/node.d.ts +++ b/util/node.d.ts @@ -7,6 +7,7 @@ import fs from "fs"; import module from "module"; import path from "path"; import process from "process"; +import url from "url"; /** Whether the environment is Node.js. */ export const isNode: boolean; @@ -15,5 +16,6 @@ export { fs, module, path, - process + process, + url }; diff --git a/util/node.js b/util/node.js index 76b2f7ab29..29953de11b 100644 --- a/util/node.js +++ b/util/node.js @@ -9,22 +9,26 @@ var fs; var module; var path; var process; +var url; if (isNode) { fs = await import("fs"); module = await import("module"); path = await import("path"); process = globalThis.process; + url = await import("url"); } else { fs = await import("./browser/fs.js"); module = await import("./browser/module.js"); path = await import("./browser/path.js"); process = await import("./browser/process.js"); + url = await import("./browser/url.js"); } export { fs, module, path, - process + process, + url }; From eda668e07cc0b5057cb1841a9130f5a1b625d866 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 14:22:26 +0100 Subject: [PATCH 085/175] support async transforms --- cli/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/index.js b/cli/index.js index 29146d1b84..d59dff1ee8 100644 --- a/cli/index.js +++ b/cli/index.js @@ -513,14 +513,14 @@ export async function main(argv, options) { return prepareResult(e); } - function applyTransform(name, ...args) { + async function applyTransform(name, ...args) { for (let i = 0, k = transforms.length; i < k; ++i) { let transform = transforms[i]; if (typeof transform[name] === "function") { try { let start = stats.begin(); stats.transformCount++; - transform[name](...args); + await transform[name](...args); stats.transformTime += stats.end(start); } catch (e) { return e; @@ -792,7 +792,7 @@ export async function main(argv, options) { // Call afterParse transform hook { - let error = applyTransform("afterParse", program.parser); + let error = await applyTransform("afterParse", program.parser); if (error) return prepareResult(error); } @@ -823,7 +823,7 @@ export async function main(argv, options) { // Call afterInitialize transform hook { - let error = applyTransform("afterInitialize", program); + let error = await applyTransform("afterInitialize", program); if (error) return prepareResult(error); } @@ -862,7 +862,7 @@ export async function main(argv, options) { // Call afterCompile transform hook { - let error = applyTransform("afterCompile", module); + let error = await applyTransform("afterCompile", module); if (error) return prepareResult(error); } From 049205584b4d7d2fcdf515fabb26f9803db94bca Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 14:26:27 +0100 Subject: [PATCH 086/175] update definitions --- cli/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/index.d.ts b/cli/index.d.ts index 9f2f5c9769..d4d17bfb72 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -278,11 +278,11 @@ export abstract class Transform { listFiles(dirname: string, baseDir: string): string[] | null | Promise; /** Called when parsing is complete, before a program is instantiated from the AST. */ - afterParse?(parser: Parser): void; + afterParse?(parser: Parser): void | Promise; /** Called after the program is instantiated. */ - afterInitialize?(program: Program): void; + afterInitialize?(program: Program): void | Promise; /** Called when compilation is complete, before the module is being validated. */ - afterCompile?(module: Module): void; + afterCompile?(module: Module): void | Promise; } From 5d0b109c0da1097247480e0a7aeb1e7ee6e0d824 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 15:19:58 +0100 Subject: [PATCH 087/175] can't even test this snap stuff --- snap/snapcraft.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index d4655e495d..39fb828155 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -12,14 +12,20 @@ grade: stable confinement: strict apps: asc: - command: asc + command: bin/asc asinit: - command: asinit + command: bin/asinit parts: assemblyscript: + plugin: nodejs + nodejs-version: 16.13.1 + nodejs-package-manager: npm source: . - plugin: npm - npm-node-version: 16.9.1 -architectures: - - build-on: amd64 + override-build: | + npm install + npm run build + node ./scripts/prepublish + npm prune +architectures: + - build-on: amd64 run-on: [amd64, armhf, arm64, i386] From 272461a5158ba58dc5db92a203b3912c132786b9 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 16:21:49 +0100 Subject: [PATCH 088/175] still no idea --- snap/README.md | 3 --- snap/snapcraft.yaml | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 snap/README.md diff --git a/snap/README.md b/snap/README.md deleted file mode 100644 index d7245ed05f..0000000000 --- a/snap/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Snaps are containerised software packages that are simple to create and install on all major Linux systems without modification. [Learn more](https://docs.snapcraft.io). - -[![Snap Status](https://snapcraft.io/assemblyscript/badge.svg)](https://snapcraft.io/assemblyscript) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 39fb828155..7a00ef9719 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,13 +1,13 @@ name: assemblyscript +version: git summary: A TypeScript-like language for WebAssembly. description: | AssemblyScript compiles a variant of TypeScript to WebAssembly using Binaryen. See the AssemblyScript website for documentation: https://www.assemblyscript.org -type: app +base: core20 icon: media/icon.svg -version: git grade: stable confinement: strict apps: From 40679b5604b78d28240797f86ac84db8a145d666 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 16:55:54 +0100 Subject: [PATCH 089/175] update binaryen --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 33504e285b..35414d97f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "binaryen": "103.0.0", + "binaryen": "103.0.0-nightly.20211203", "long": "^5.2.0" }, "bin": { @@ -375,9 +375,9 @@ "dev": true }, "node_modules/binaryen": { - "version": "103.0.0", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-103.0.0.tgz", - "integrity": "sha512-dejnXckPWetpBYc021d1hnbM8tECz7cjACKhJWEQEtiqTarYMqLLzH20AthjMgblnySkcRUzEMXbeWPI7UYTQw==", + "version": "103.0.0-nightly.20211203", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-103.0.0-nightly.20211203.tgz", + "integrity": "sha512-9TJGLGFKIg4n5R1BwlAEDDppWIE4rYzdHsRU9Ck11mByUC7Sp/ss6Jn1L+glOt1iw1b4EmPvjh1J8JZpxGxu/Q==", "bin": { "wasm-opt": "bin/wasm-opt", "wasm2js": "bin/wasm2js" @@ -2016,9 +2016,9 @@ "dev": true }, "binaryen": { - "version": "103.0.0", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-103.0.0.tgz", - "integrity": "sha512-dejnXckPWetpBYc021d1hnbM8tECz7cjACKhJWEQEtiqTarYMqLLzH20AthjMgblnySkcRUzEMXbeWPI7UYTQw==" + "version": "103.0.0-nightly.20211203", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-103.0.0-nightly.20211203.tgz", + "integrity": "sha512-9TJGLGFKIg4n5R1BwlAEDDppWIE4rYzdHsRU9Ck11mByUC7Sp/ss6Jn1L+glOt1iw1b4EmPvjh1J8JZpxGxu/Q==" }, "brace-expansion": { "version": "1.1.11", diff --git a/package.json b/package.json index 3108487e9d..a363f7b358 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "103.0.0", + "binaryen": "103.0.0-nightly.20211203", "long": "^5.2.0" }, "devDependencies": { From 1c4082221e5dbf0672312ea8c15f29b089501983 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 17:08:13 +0100 Subject: [PATCH 090/175] fix fs/url shim --- cli/index.js | 2 +- util/browser/fs.js | 5 +---- util/browser/url.js | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/cli/index.js b/cli/index.js index d59dff1ee8..88ea970a46 100644 --- a/cli/index.js +++ b/cli/index.js @@ -288,7 +288,7 @@ export async function main(argv, options) { } // I/O must be specified if not present in the environment - if (!fs.promises.readFile) { + if (!(fs.promises && fs.promises.readFile)) { if (readFile === readFileNode) throw Error("'options.readFile' must be specified"); if (writeFile === writeFileNode) throw Error("'options.writeFile' must be specified"); if (listFiles === listFilesNode) throw Error("'options.listFiles' must be specified"); diff --git a/util/browser/fs.js b/util/browser/fs.js index efd4cd2e46..1339856fa2 100644 --- a/util/browser/fs.js +++ b/util/browser/fs.js @@ -1,4 +1 @@ -const fs = { - promises: {} -}; -export default fs; +export const promises = {}; diff --git a/util/browser/url.js b/util/browser/url.js index 9999fae9fd..e69de29bb2 100644 --- a/util/browser/url.js +++ b/util/browser/url.js @@ -1,3 +0,0 @@ -const url = { -}; -export default url; From 34b7c55b0cd724b021369924a6d10d6bcc2fcce3 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 17:18:27 +0100 Subject: [PATCH 091/175] test more of transform --- tests/transform/index.cjs | 20 +++++++++++++++++--- tests/transform/index.js | 11 ++++++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/tests/transform/index.cjs b/tests/transform/index.cjs index 039ed4f3ba..4aabfac4d6 100644 --- a/tests/transform/index.cjs +++ b/tests/transform/index.cjs @@ -1,5 +1,19 @@ -/* global module, console */ +/* global module */ -module.exports = function MyTransform() { - console.log("CJS transform loaded"); +function MyTransform() { + this.log("CJS transform loaded"); +} + +MyTransform.prototype.afterParse = function() { + this.log("- afterParse"); +}; + +MyTransform.prototype.afterInitialize = function() { + this.log("- afterInitialize"); }; + +MyTransform.prototype.afterCompile = function() { + this.log("- afterCompile"); +}; + +module.exports = MyTransform; diff --git a/tests/transform/index.js b/tests/transform/index.js index 0139fdb578..f6148b79a3 100644 --- a/tests/transform/index.js +++ b/tests/transform/index.js @@ -3,6 +3,15 @@ import { Transform } from "../../dist/transform.js"; export default class MyTransform extends Transform { constructor() { super(); - console.log("ESM transform loaded"); + this.log("ESM transform loaded"); + } + afterParse() { + this.log("- afterParse"); + } + afterInitialize() { + this.log("- afterInitialize"); + } + afterCompile() { + this.log("- afterCompile"); } } From 3c73d15e9a78c79608ade4aa01ef3f2e96801d20 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 17:36:18 +0100 Subject: [PATCH 092/175] Update cli/index.d.ts Co-authored-by: Max Graey --- cli/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/index.d.ts b/cli/index.d.ts index d4d17bfb72..72c9456b08 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -171,7 +171,7 @@ export interface APIOptions { /** Standard error stream to use. */ stderr?: OutputStream; /** Reads a file from disk (or memory). */ - readFile?: (filename: string, baseDir: string) => string | null | Promise; + readFile?: (filename: string, baseDir: string) => (string | null) | Promise; /** Writes a file to disk (or memory). */ writeFile?: (filename: string, contents: Uint8Array, baseDir: string) => void | Promise; /** Lists all files within a directory. */ From 2b2ae1d8da504c7a89eab677b4aa7ccd067ed911 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 17:36:24 +0100 Subject: [PATCH 093/175] Update cli/index.d.ts Co-authored-by: Max Graey --- cli/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/index.d.ts b/cli/index.d.ts index 72c9456b08..4783556870 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -175,7 +175,7 @@ export interface APIOptions { /** Writes a file to disk (or memory). */ writeFile?: (filename: string, contents: Uint8Array, baseDir: string) => void | Promise; /** Lists all files within a directory. */ - listFiles?: (dirname: string, baseDir: string) => string[] | null | Promise; + listFiles?: (dirname: string, baseDir: string) => (string[] | null) | Promise; /** Handler for diagnostic messages. */ reportDiagnostic?: DiagnosticReporter; /** Additional transforms to apply. */ From 14c25d92ef9e9a3e8edd8c0e670a0cf1dbd32ecd Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 17:38:19 +0100 Subject: [PATCH 094/175] more --- cli/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/index.d.ts b/cli/index.d.ts index 4783556870..17f9ba0331 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -269,13 +269,13 @@ export abstract class Transform { readonly log: typeof console.log; /** Reads a file from disk. */ - readFile(filename: string, baseDir: string): string | null | Promise; + readFile(filename: string, baseDir: string): (string | null) | Promise; /** Writes a file to disk. */ writeFile(filename: string, contents: string | Uint8Array, baseDir: string): void | Promise; /** Lists all files in a directory. */ - listFiles(dirname: string, baseDir: string): string[] | null | Promise; + listFiles(dirname: string, baseDir: string): (string[] | null) | Promise; /** Called when parsing is complete, before a program is instantiated from the AST. */ afterParse?(parser: Parser): void | Promise; From 0ba9dcf306b6a0d8f69fb29fd340260d18899e43 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 17:38:55 +0100 Subject: [PATCH 095/175] Update cli/index.js Co-authored-by: Max Graey --- cli/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/index.js b/cli/index.js index 88ea970a46..c4f3e7ce5a 100644 --- a/cli/index.js +++ b/cli/index.js @@ -75,7 +75,7 @@ if (useWasm) { } } }); - let { exports } = await loader.instantiate(await (await fetch(binaryPath)).arrayBuffer(), rtraceInstance.install({ binaryen })); + const { exports } = await loader.instantiate(await (await fetch(binaryPath)).arrayBuffer(), rtraceInstance.install({ binaryen })); assemblyscript = exports; __newString = assemblyscript.__newString; __getString = assemblyscript.__getString; From 850ec4b42e5ecdfa4707e9efcbfaed2f0059687a Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 17:44:54 +0100 Subject: [PATCH 096/175] more --- cli/index.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cli/index.js b/cli/index.js index c4f3e7ce5a..f4b83beeba 100644 --- a/cli/index.js +++ b/cli/index.js @@ -48,12 +48,11 @@ var __unpin = _ => undefined; var __collect = _ => undefined; // Use the AS->Wasm variant as an option (experimental) -const useWasm = process.argv.includes("--wasm"); -if (useWasm) { - let argPos = process.argv.indexOf("--wasm"); - let binaryPath = String(process.argv[argPos + 1]); - process.argv.splice(argPos, 2); - let rtraceInstance = new rtrace.Rtrace({ +const wasmPos = process.argv.indexOf("--wasm"); +if (~wasmPos) { + const binaryPath = String(process.argv[wasmPos + 1]); + process.argv.splice(wasmPos, 2); + const rtraceInstance = new rtrace.Rtrace({ onerror(err, info) { console.log(err, info); }, From 046d8e7252ef29e1c2652e0032a79564c1328089 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 17:49:48 +0100 Subject: [PATCH 097/175] more --- cli/index.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cli/index.js b/cli/index.js index f4b83beeba..e4c2cae58d 100644 --- a/cli/index.js +++ b/cli/index.js @@ -76,11 +76,12 @@ if (~wasmPos) { }); const { exports } = await loader.instantiate(await (await fetch(binaryPath)).arrayBuffer(), rtraceInstance.install({ binaryen })); assemblyscript = exports; - __newString = assemblyscript.__newString; - __getString = assemblyscript.__getString; - __pin = assemblyscript.__pin; - __unpin = assemblyscript.__unpin; - __collect = assemblyscript.__collect; + ({ __newString, + __getString, + __pin, + __unpin, + __collect + } = assemblyscript); if (assemblyscript._start) assemblyscript._start(); } From 4fd9050cb1c73bd38e8506a26c771f4779879ed7 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 17:56:41 +0100 Subject: [PATCH 098/175] manually sync esbuild version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a363f7b358..1afaf33339 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", "diff": "^5.0.0", - "esbuild": "^0.14.0", + "esbuild": "^0.14.1", "eslint": "^8.2.0", "glob": "^7.2.0", "typescript": "~4.5.2" From 43ecbe82c1759f670bc49ded6abe179baa0bfdf0 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 3 Dec 2021 18:12:03 +0100 Subject: [PATCH 099/175] invert asc stdout/stderr default to memory stream --- bin/asc.js | 5 ++++- cli/README.md | 5 +---- cli/index.js | 10 ++-------- scripts/build-web.js | 2 -- tests/asconfig/index.js | 3 +-- tests/browser.js | 12 ++---------- tests/packages/packages/g/test.js | 13 +++++-------- 7 files changed, 15 insertions(+), 35 deletions(-) diff --git a/bin/asc.js b/bin/asc.js index 2f369f90f7..f011bb52f7 100644 --- a/bin/asc.js +++ b/bin/asc.js @@ -24,6 +24,9 @@ if (!hasSourceMaps || hasCustomArgs) { ); } else { const asc = await import("../dist/asc.js"); - const { error } = await asc.main(process.argv.slice(2)); + const { error } = await asc.main(process.argv.slice(2), { + stdout: process.stdout, + stderr: process.stderr + }); if (error) process.exitCode = 1; } diff --git a/cli/README.md b/cli/README.md index 7159041afc..43b50a5943 100644 --- a/cli/README.md +++ b/cli/README.md @@ -24,10 +24,7 @@ const { error, stdout } = await asc.main([ "--optimize", "--sourceMap", "--measure" -], { - stdout: asc.createMemoryStream(), - stderr: asc.createMemoryStream() -}); +]); if (error) { console.log("Compilation failed: " + error.message); } else { diff --git a/cli/index.js b/cli/index.js index e4c2cae58d..a8153dcabd 100644 --- a/cli/index.js +++ b/cli/index.js @@ -166,8 +166,6 @@ export async function compileString(sources, config = {}) { configToArguments(config, argv); const output = {}; const result = await main(argv.concat(Object.keys(sources)), { - stdout: createMemoryStream(), - stderr: createMemoryStream(), readFile: name => Object.prototype.hasOwnProperty.call(sources, name) ? sources[name] : null, writeFile: (name, contents) => { output[name] = contents; }, listFiles: () => [] @@ -189,18 +187,14 @@ export async function main(argv, options) { bundlePatchVersion = parseInt(versionParts[2]) | 0; } - const stdout = options.stdout || process.stdout; - const stderr = options.stderr || process.stderr; + const stdout = options.stdout || createMemoryStream(); + const stderr = options.stderr || createMemoryStream(); const readFile = options.readFile || readFileNode; const writeFile = options.writeFile || writeFileNode; const listFiles = options.listFiles || listFilesNode; const stats = options.stats || new Stats(); let extension = defaultExtension; - // Output must be specified if not present in the environment - if (!stdout) throw Error("'options.stdout' must be specified"); - if (!stderr) throw Error("'options.stderr' must be specified"); - // Parse command line options but do not populate option defaults yet const optionsResult = optionsUtil.parse(argv, generated.options, false); let opts = optionsResult.options; diff --git a/scripts/build-web.js b/scripts/build-web.js index c8bc2eaad8..297b55796b 100644 --- a/scripts/build-web.js +++ b/scripts/build-web.js @@ -35,8 +35,6 @@ const files = { const { error, stdout } = await asc.main([ "index.ts", "--textFile", "--optimize" ], { - stdout: asc.createMemoryStream(), - stderr: asc.createMemoryStream(), readFile(name, baseDir) { if (Object.prototype.hasOwnProperty.call(files, name)) return files[name]; return null; diff --git a/tests/asconfig/index.js b/tests/asconfig/index.js index 5f6f5a3ccc..944c22b76b 100644 --- a/tests/asconfig/index.js +++ b/tests/asconfig/index.js @@ -17,8 +17,7 @@ const { error, stderr } = await asc.main(["assembly/index.ts", "--outFile", "out } else if (name !== "output.wasm.map") { throw Error("Unexpected output file: " + name); } - }, - stderr: asc.createMemoryStream() + } }); if (error) { diff --git a/tests/browser.js b/tests/browser.js index c1c977fabd..3be84bbd36 100644 --- a/tests/browser.js +++ b/tests/browser.js @@ -7,10 +7,7 @@ const files = { "index.ts": `export function test(): void {}` }; console.log("# asc --version"); { - const { stdout, stderr } = await asc.main([ "--version" ], { - stdout: asc.createMemoryStream(), - stderr: asc.createMemoryStream() - }); + const { stdout, stderr } = await asc.main([ "--version" ]); console.log(">>> STDOUT >>>"); process.stdout.write(stdout.toString()); @@ -20,10 +17,7 @@ console.log("# asc --version"); console.log("\n# asc --help"); { - const { stdout, stderr } = await asc.main([ "--help" ], { - stdout: asc.createMemoryStream(), - stderr: asc.createMemoryStream() - }); + const { stdout, stderr } = await asc.main([ "--help" ]); console.log(">>> STDOUT >>>"); process.stdout.write(stdout.toString()); @@ -34,8 +28,6 @@ console.log("\n# asc --help"); console.log("\n# asc index.ts --textFile"); { const { error, stdout, stderr } = await asc.main([ "index.ts", "--textFile" ], { - stdout: asc.createMemoryStream(), - stderr: asc.createMemoryStream(), readFile: (name, baseDir) => { console.log("readFile: " + name + ", baseDir=" + baseDir); if (Object.prototype.hasOwnProperty.call(files, name)) return files[name]; diff --git a/tests/packages/packages/g/test.js b/tests/packages/packages/g/test.js index b25067e0d3..03d0b1f10b 100644 --- a/tests/packages/packages/g/test.js +++ b/tests/packages/packages/g/test.js @@ -1,15 +1,12 @@ #!/usr/bin/env node import * as asc from "../../../../cli/index.js"; -const stderr = asc.createMemoryStream(); -asc.main([ +const { error, stderr } = await asc.main([ "assembly/index.ts", "--noEmit", "--traceResolution" -], { stderr }, err => { - if (stderr.toString().includes("File '~lib/a.ts' not found.")) { - process.exit(0); - } - console.error("Failed!\n" + err); +]); +if (!stderr.toString().includes("File '~lib/a.ts' not found.")) { + console.error("Failed!\n" + error); process.exit(1); -}); +} From abc1d81a78b5952294cb48b704419c85ebb9c516 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 4 Dec 2021 00:34:47 +0100 Subject: [PATCH 100/175] more --- bin/asc.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/asc.js b/bin/asc.js index f011bb52f7..281c7d170d 100644 --- a/bin/asc.js +++ b/bin/asc.js @@ -6,16 +6,15 @@ const [ nodePath, thisPath, ...args ] = process.argv; const nodeArgs = process.execArgv; const hasSourceMaps = nodeArgs.includes("--enable-source-maps"); -const hasCustomArgs = args.includes("--"); +const posCustomArgs = args.indexOf("--"); -if (!hasSourceMaps || hasCustomArgs) { +if (!hasSourceMaps || ~posCustomArgs) { if (!hasSourceMaps) { nodeArgs.push("--enable-source-maps"); } - if (hasCustomArgs) { - const index = args.indexOf("--"); - nodeArgs.push(...args.slice(index + 1)); - args.length = index; + if (~posCustomArgs) { + nodeArgs.push(...args.slice(posCustomArgs + 1)); + args.length = posCustomArgs; } childProcess.spawnSync( nodePath, From 67f4b840d35dbf5c7b2956c4fa87e6513923efb5 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 4 Dec 2021 00:46:22 +0100 Subject: [PATCH 101/175] delete snap, probably not good ux anyway --- snap/snapcraft.yaml | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 snap/snapcraft.yaml diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml deleted file mode 100644 index 7a00ef9719..0000000000 --- a/snap/snapcraft.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: assemblyscript -version: git -summary: A TypeScript-like language for WebAssembly. -description: | - AssemblyScript compiles a variant of TypeScript to WebAssembly using Binaryen. - - See the AssemblyScript website for documentation: - https://www.assemblyscript.org -base: core20 -icon: media/icon.svg -grade: stable -confinement: strict -apps: - asc: - command: bin/asc - asinit: - command: bin/asinit -parts: - assemblyscript: - plugin: nodejs - nodejs-version: 16.13.1 - nodejs-package-manager: npm - source: . - override-build: | - npm install - npm run build - node ./scripts/prepublish - npm prune -architectures: - - build-on: amd64 - run-on: [amd64, armhf, arm64, i386] From d08c3dd456190829ccfaac6c926af0fa4e91084a Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 4 Dec 2021 00:56:51 +0100 Subject: [PATCH 102/175] defer building definitions on first run --- scripts/build.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/scripts/build.js b/scripts/build.js index 119b8d1e4f..016e520dc7 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -29,7 +29,7 @@ function time() { } function reportPlugin(name) { - return { + const reporter = { name: "reporter", setup(build) { let startTime = 0; @@ -44,9 +44,11 @@ function reportPlugin(name) { } else { console.log(`${time()} - ${name} - ${stdoutColors.green("SUCCESS")} (${warnings.length} warnings, ${duration} ms)`); } + reporter.ran = true; }); } }; + return reporter; } // Standard library integration @@ -197,6 +199,7 @@ const webPlugin = { const externals = [ "assemblyscript", "binaryen", "long" ]; +const srcReporter = reportPlugin("src"); esbuild.build({ tsconfig: "./src/tsconfig.json", entryPoints: [ "./src/index-js.ts" ], @@ -214,9 +217,10 @@ esbuild.build({ js: prelude("The AssemblyScript compiler") }, watch, - plugins: [ diagnosticsPlugin, reportPlugin("src") ] + plugins: [ diagnosticsPlugin, srcReporter ] }); +const cliReporter = reportPlugin("cli"); esbuild.build({ entryPoints: [ "./cli/index.js" ], bundle: true, @@ -233,7 +237,7 @@ esbuild.build({ js: prelude("The AssemblyScript frontend") }, watch, - plugins: [ stdlibPlugin, webPlugin, reportPlugin("cli") ] + plugins: [ stdlibPlugin, webPlugin, cliReporter ] }); // Optionally build definitions (takes a while) @@ -278,4 +282,10 @@ cli : Compiler frontend asc dts : TS definition bundles web : Example web template\n`); -buildDefinitions(); +(function defer() { + if (srcReporter.ran && cliReporter.ran) { + buildDefinitions(); + } else { + setTimeout(defer, 100); + } +})(); From 94c4f3764502b011eb1d66e54279d3c3038d3080 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 4 Dec 2021 01:46:08 +0100 Subject: [PATCH 103/175] use promise defer --- scripts/build.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/scripts/build.js b/scripts/build.js index 016e520dc7..bacda02f55 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -199,8 +199,7 @@ const webPlugin = { const externals = [ "assemblyscript", "binaryen", "long" ]; -const srcReporter = reportPlugin("src"); -esbuild.build({ +const srcBuild = esbuild.build({ tsconfig: "./src/tsconfig.json", entryPoints: [ "./src/index-js.ts" ], bundle: true, @@ -217,11 +216,10 @@ esbuild.build({ js: prelude("The AssemblyScript compiler") }, watch, - plugins: [ diagnosticsPlugin, srcReporter ] + plugins: [ diagnosticsPlugin, reportPlugin("src") ] }); -const cliReporter = reportPlugin("cli"); -esbuild.build({ +const cliBuild = esbuild.build({ entryPoints: [ "./cli/index.js" ], bundle: true, target: "esnext", @@ -237,7 +235,7 @@ esbuild.build({ js: prelude("The AssemblyScript frontend") }, watch, - plugins: [ stdlibPlugin, webPlugin, cliReporter ] + plugins: [ stdlibPlugin, webPlugin, reportPlugin("cli") ] }); // Optionally build definitions (takes a while) @@ -282,10 +280,5 @@ cli : Compiler frontend asc dts : TS definition bundles web : Example web template\n`); -(function defer() { - if (srcReporter.ran && cliReporter.ran) { - buildDefinitions(); - } else { - setTimeout(defer, 100); - } -})(); +await Promise.all([ srcBuild, cliBuild ]); +buildDefinitions(); From 31702c6fb8adef76d6cd3742d0c80ae146621c7d Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 4 Dec 2021 01:48:32 +0100 Subject: [PATCH 104/175] undo reporter flag --- scripts/build.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/build.js b/scripts/build.js index bacda02f55..5dec866cac 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -29,7 +29,7 @@ function time() { } function reportPlugin(name) { - const reporter = { + return { name: "reporter", setup(build) { let startTime = 0; @@ -44,11 +44,9 @@ function reportPlugin(name) { } else { console.log(`${time()} - ${name} - ${stdoutColors.green("SUCCESS")} (${warnings.length} warnings, ${duration} ms)`); } - reporter.ran = true; }); } }; - return reporter; } // Standard library integration From 02972f8b14b788721370c1b0d8d4a409d388d00b Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 4 Dec 2021 03:25:00 +0100 Subject: [PATCH 105/175] move parse to examples --- lib/parse/README.md | 107 ---- lib/parse/assembly/index.ts | 406 -------------- lib/parse/assembly/options.ts | 20 - lib/parse/assembly/tsconfig.json | 6 - lib/parse/build/.gitignore | 2 - lib/parse/build/index.wat | 932 ------------------------------- lib/parse/index.d.ts | 1 - lib/parse/index.js | 2 - lib/parse/index.js.map | 1 - lib/parse/package.json | 30 - lib/parse/src/common.ts | 225 -------- lib/parse/src/index.ts | 165 ------ lib/parse/src/tsconfig.json | 8 - lib/parse/tests/index.ts | 121 ---- lib/parse/tests/libm.wasm | Bin 10175 -> 0 bytes lib/parse/webpack.config.js | 36 -- 16 files changed, 2062 deletions(-) delete mode 100644 lib/parse/README.md delete mode 100644 lib/parse/assembly/index.ts delete mode 100644 lib/parse/assembly/options.ts delete mode 100644 lib/parse/assembly/tsconfig.json delete mode 100644 lib/parse/build/.gitignore delete mode 100644 lib/parse/build/index.wat delete mode 100644 lib/parse/index.d.ts delete mode 100644 lib/parse/index.js delete mode 100644 lib/parse/index.js.map delete mode 100644 lib/parse/package.json delete mode 100644 lib/parse/src/common.ts delete mode 100644 lib/parse/src/index.ts delete mode 100644 lib/parse/src/tsconfig.json delete mode 100644 lib/parse/tests/index.ts delete mode 100644 lib/parse/tests/libm.wasm delete mode 100644 lib/parse/webpack.config.js diff --git a/lib/parse/README.md b/lib/parse/README.md deleted file mode 100644 index 2864308a11..0000000000 --- a/lib/parse/README.md +++ /dev/null @@ -1,107 +0,0 @@ -# WebAssembly Parser - -A WebAssembly binary parser in WebAssembly. Super small, super fast, with TypeScript support. - -API ---- - -* **parse**(binary: `Uint8Array`, options?: `ParseOptions`): `void`
- Parses the contents of a WebAssembly binary according to the specified options. - -* **ParseOptions**
- Options specified to the parser. The `onSection` callback determines the sections being evaluated in detail. - - * **onSection**?(id: `SectionId`, payloadOff: `number`, payloadLen: `number`, nameOff: `number`, nameLen: `number`): `boolean`
- Called with each section in the binary. Returning `true` evaluates the section. - - * **onType**?(index: `number`, form: `number`): `void`
- Called with each function type if the type section is evaluated. - - * **onTypeParam**?(index: `number`, paramIndex: `number`, paramType: `Type`): `void`
- Called with each function parameter if the type section is evaluated. - - * **onTypeReturn**?(index: `number`, returnIndex: `number`, returnType: `Type`): `void`
- Called with each function return type if the type section is evaluated. - - * **onImport**?(index: `number`, kind: `ExternalKind`, moduleOff: `number`, moduleLen: `number`, fieldOff: `number`, fieldLen: `number`): `void`
- Called with each import if the import section is evaluated. - - * **onFunctionImport**?(index: `number`, type: `number`): `void`
- Called with each function import if the import section is evaluated. - - * **onTableImport**?(index: `number`, type: `Type`, initial: `number`, maximum: `number`, flags: `number`): `void`
- Called with each table import if the import section is evaluated. - - * **onMemoryImport**?(index: `number`, initial: `number`, maximum: `number`, flags: `number`): `void`
- Called with each memory import if the import section is evaluated. - - * **onGlobalImport**?(index: `number`, type: `Type`, mutability: `number`): `void`
- Called with each global import if the import section is evaluated. - - * **onMemory**?(index: `number`, initial: `number`, maximum: `number`, flags: `number`): `void`
- Called with each memory if the memory section is evaluated. - - * **onFunction**?(index: `number`, typeIndex: `number`): `void`
- Called with each function if the function section is evaluated. - - * **onGlobal**?(index: `number`, type: `Type`, mutability: `number`): `void`
- Called with each global if the global section is evaluated. - - * **onStart**?(index: `number`): `void`
- Called with the start function index if the start section is evaluated. - - * **onExport**?(index: `number`, kind: `ExternalKind`, kindIndex: `number`, nameOff: `number`, nameLen: `number`): `void`
- Called with each export if the export section is evaluated. - - * **onSourceMappingURL**?(offset: `number`, length: `number`): `void`
- Called with the source map URL if the 'sourceMappingURL' section is evaluated. - - * **onModuleName**?(offset: `number`, length: `number`): `void`
- Called with the module name if present and the 'name' section is evaluated. - - * **onFunctionName**?(index: `number`, offset: `number`, length: `number`): `void`
- Called with each function name if present and the 'name' section is evaluated. - - * **onLocalName**?(funcIndex: `number`, index: `number`, offset: `number`, length: `number`): `void`
- Called with each local name if present and the 'name' section is evaluated. - -* **Type**
- A value or element type, depending on context. - - | Name | Value - |---------|------- - | i32 | 0x7f - | i64 | 0x7e - | f32 | 0x7d - | f64 | 0x7c - | anyfunc | 0x70 - | func | 0x60 - | none | 0x40 - -* **SectionId**
- Numerical id of the current section. - - | Name | Value - |----------|------- - | Custom | 0 - | Type | 1 - | Import | 2 - | Function | 3 - | Table | 4 - | Memory | 5 - | Global | 6 - | Export | 7 - | Start | 8 - | Element | 9 - | Code | 10 - | Data | 11 - -* **ExternalKind**
- Kind of an export or import. - - | Name | Value - |----------|------- - | Function | 0 - | Table | 1 - | Memory | 2 - | Global | 3 diff --git a/lib/parse/assembly/index.ts b/lib/parse/assembly/index.ts deleted file mode 100644 index 3defa2ec19..0000000000 --- a/lib/parse/assembly/index.ts +++ /dev/null @@ -1,406 +0,0 @@ -/** A WebAssembly module that parses WebAssembly modules. */ - -// Common constants shared between AssemblyScript and TypeScript -import { - SectionId, - ExternalKind, - NameType, - MAX_PAGES, - MAX_ELEMS, - Opcode -} from "../src/common"; - -import * as opt from "./options"; - -/** Current offset in memory. */ -var off: usize = 0; - -/** Reads an unsigned integer from memory. */ -function readUint(): u32 { - var pos = off; - var val = load(pos); - off = pos + sizeof(); - return val; -} - -/** Reads an unsigned 64-bit integer from memory. */ -function readUint64(): u64 { - var pos = off; - var val = load(pos); - off = pos + 8; - return val; -} - -/** Reads a LEB128-encoded unsigned integer from memory. */ -function readVaruint(size: u32): u32 { - var val: u32 = 0; - var shl: u32 = 0; - var byt: u32; - var pos = off; - do { - byt = load(pos++); - val |= (byt & 0x7F) << shl; - if (!(byt & 0x80)) break; - shl += 7; - } while (true); - off = pos; - return val; -} - -/** Reads a LEB128-encoded signed integer from memory. */ -function readVarint(size: u32): i32 { - var val: u32 = 0; - var shl: u32 = 0; - var byt: u32; - var pos = off; - do { - byt = load(pos++); - val |= (byt & 0x7F) << shl; - shl += 7; - } while (byt & 0x80); - off = pos; - return select(val | (~0 << shl), val, shl < size && (byt & 0x40) != 0); -} - -/** Reads a LEB128-encoded signed 64-bit integer from memory. */ -function readVarint64(): i64 { - var val: u64 = 0; - var shl: u64 = 0; - var byt: u64; - var pos = off; - do { - byt = load(pos++); - val |= (byt & 0x7F) << shl; - shl += 7; - } while (byt & 0x80); - off = pos; - return select(val | (~0 << shl), val, shl < 64 && (byt & 0x40) != 0); -} - -function skipInitExpr(): void { - var op = readUint(); - switch (op) { - case Opcode.i32_const: { - readVarint(32); - break; - } - case Opcode.i64_const: { - readVarint64(); - break; - } - case Opcode.f32_const: { - readUint(); - break; - } - case Opcode.f64_const: { - readUint64(); - break; - } - case Opcode.get_global: { - readVaruint(32); - break; - } - default: unreachable(); // MVP - } - if (readUint() != Opcode.end) unreachable(); -} - -/** Starts parsing the module that has been placed in memory. */ -export function parse(begin: usize, end: usize): void { - off = begin; - var magic = readUint(); - if (magic != 0x6D736100) unreachable(); - var version = readUint(); - if (version != 1) unreachable(); - var fun_space_index: u32 = 0; - var glo_space_index: u32 = 0; - var mem_space_index: u32 = 0; - var tbl_space_index: u32 = 0; - while (off < end) { - // let section_off = off; - let id = readVaruint(7); - let payload_len = readVaruint(32); - let name_off = 0; - let name_len = 0; - if (!id) { - let before = off; - name_len = readVaruint(32); - name_off = off; - off += name_len; - payload_len -= off - before; - } else if (id > SectionId.Data) unreachable(); - let payload_off = off; - if (opt.onSection( - id, - payload_off, - payload_len, - name_off, - name_len - )) { - switch (id) { - case SectionId.Type: { - let count = readVaruint(32); - for (let index: u32 = 0; index < count; ++index) { - let form = readVarint(7) & 0x7f; - opt.onType( - index, - form - ); - let paramCount = readVaruint(32); - for (let paramIndex: u32 = 0; paramIndex < paramCount; ++paramIndex) { - let paramType = readVarint(7) & 0x7f; - opt.onTypeParam( - index, - paramIndex, - paramType - ); - } - let returnCount = readVaruint(1); // MVP - for (let returnIndex: u32 = 0; returnIndex < returnCount; ++returnIndex) { - let returnType = readVarint(7) & 0x7f; - opt.onTypeReturn( - index, - returnIndex, - returnType - ); - } - } - break; - } - case SectionId.Import: { - let count = readVaruint(32); - for (let index: u32 = 0; index < count; ++index) { - let module_len = readVaruint(32); - let module_off = off; - off += module_len; - let field_len = readVaruint(32); - let field_off = off; - off += field_len; - let kind = readUint(); - opt.onImport( - index, - kind, - module_off, - module_len, - field_off, - field_len - ); - switch (kind) { - case ExternalKind.Function: { - let type = readVaruint(32); - opt.onFunctionImport( - fun_space_index++, - type - ); - break; - } - case ExternalKind.Table: { - let type = readVarint(7) & 0x7f; - let flags = readVaruint(1); - let initial = readVaruint(32); - let maximum = flags & 1 ? readVaruint(32) : MAX_ELEMS; - opt.onTableImport( - tbl_space_index++, - type, - initial, - maximum, - flags - ); - break; - } - case ExternalKind.Memory: { - let flags = readVaruint(1); - let initial = readVaruint(32); - let maximum = flags & 1 ? readVaruint(32) : MAX_PAGES; - opt.onMemoryImport( - mem_space_index++, - initial, - maximum, - flags - ); - break; - } - case ExternalKind.Global: { - let type = readVarint(7) & 0x7f; - let mutability = readVaruint(1); - opt.onGlobalImport( - glo_space_index++, - type, - mutability - ); - break; - } - default: unreachable(); - } - } - break; - } - case SectionId.Function: { - let count = readVaruint(32); - for (let i: u32 = 0; i < count; ++i) { - let typeIndex = readVaruint(32); - opt.onFunction( - fun_space_index++, - typeIndex - ); - } - break; - } - case SectionId.Table: { - let count = readVaruint(32); - for (let index: u32 = 0; index < count; ++index) { - let type = readVaruint(7) & 0x7f; - let flags = readVaruint(1); - let initial = readVaruint(32); - let maximum = flags & 1 ? readVaruint(32) : MAX_ELEMS; - opt.onTable( - tbl_space_index++, - type, - initial, - maximum, - flags - ); - } - break; - } - case SectionId.Memory: { - let count = readVaruint(32); - for (let index: u32 = 0; index < count; ++index) { - let flags = readVaruint(1); - let initial = readVaruint(32); - let maximum = flags & 1 ? readVaruint(32) : MAX_PAGES; - opt.onMemory( - mem_space_index++, - initial, - maximum, - flags - ); - } - break; - } - case SectionId.Global: { - let count = readVaruint(32); - for (let i: u32 = 0; i < count; ++i) { - let type = readVarint(7) & 0x7f; - let mutability = readVaruint(1); - skipInitExpr(); - opt.onGlobal( - glo_space_index++, - type, - mutability - ); - } - break; - } - case SectionId.Export: { - let count = readVaruint(32); - for (let index: u32 = 0; index < count; ++index) { - let field_len = readVaruint(32); - let field_off = off; - off += field_len; - let kind = readUint(); - let kind_index = readVaruint(32); - opt.onExport( - index, - kind, - kind_index, - field_off, - field_len - ); - } - break; - } - case SectionId.Start: { - let index = readVaruint(32); - opt.onStart( - index - ); - break; - } - case SectionId.Custom: { - if ( - name_len == 4 && - load(name_off) == 0x656D616E // "name" - ) { - let name_type = readVaruint(7); - let name_payload_len = readVaruint(32); - let name_payload_off = off; - switch (name_type) { - case NameType.Module: { - let module_name_len = readVaruint(32); - let module_name_off = off; - opt.onModuleName( - module_name_off, - module_name_len - ); - break; - } - case NameType.Function: { - let count = readVaruint(32); - for (let i: u32 = 0; i < count; ++i) { - let fn_index = readVaruint(32); - let fn_name_len = readVaruint(32); - let fn_name_off = off; - off += fn_name_len; - opt.onFunctionName( - fn_index, - fn_name_off, - fn_name_len - ); - } - break; - } - case NameType.Local: { - let count = readVaruint(32); - for (let i: u32 = 0; i < count; ++i) { - let fn_index = readVaruint(32); - let lc_count = readVaruint(32); - for (let j: u32 = 0; j < lc_count; ++j) { - let lc_index = readVaruint(32); - let lc_name_len = readVaruint(32); - let lc_name_off = off; - off += lc_name_len; - opt.onLocalName( - fn_index, - lc_index, - lc_name_off, - lc_name_len - ); - } - } - break; - } - default: unreachable(); - } - off = name_payload_off + name_payload_len; // ignore errors - break; - } else if ( - name_len == 16 && - load(name_off ) == 0x614D656372756F73 && // "sourceMa" - load(name_off + 8) == 0x4C5255676E697070 // "ppingURL" - ) { - let url_len = readVaruint(32); - let url_off = off; - off += url_len; - opt.onSourceMappingURL( - url_off, - url_len - ); - } - off = payload_off + payload_len; // ignore errors - break; - } - case SectionId.Element: - case SectionId.Code: - case SectionId.Data: { // skip - off += payload_len; - break; - } - default: unreachable(); - } - } else { // skip - off += payload_len; - } - } - if (off != end) unreachable(); -} diff --git a/lib/parse/assembly/options.ts b/lib/parse/assembly/options.ts deleted file mode 100644 index e4ca8ad219..0000000000 --- a/lib/parse/assembly/options.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Imported callbacks -export declare function onSection(id: u32, offset: u32, length: u32, nameOffset: u32, nameLength: u32): bool; -export declare function onType(index: u32, form: u32): void; -export declare function onTypeParam(index: u32, paramIndex: u32, paramType: u32): void; -export declare function onTypeReturn(index: u32, returnIndex: u32, returnType: u32): void; -export declare function onImport(index: u32, kind: u32, moduleOff: u32, moduleLen: u32, fieldOff: u32, fieldLen: u32): void; -export declare function onFunctionImport(index: u32, type: u32): void; -export declare function onTableImport(index: u32, type: u32, initial: u32, maximum: u32, flags: u32): void; -export declare function onMemoryImport(index: u32, initial: u32, maximum: u32, flags: u32): void; -export declare function onGlobalImport(index: u32, type: u32, mutability: u32): void; -export declare function onMemory(index: u32, initial: u32, maximum: u32, flags: u32): void; -export declare function onFunction(index: u32, typeIndex: u32): void; -export declare function onTable(index: u32, type: u32, initial: u32, maximum: u32, flags: u32): void; -export declare function onGlobal(index: u32, type: u32, mutability: u32): void; -export declare function onExport(index: u32, kind: u32, kindIndex: u32, nameOffset: u32, nameLength: u32): void; -export declare function onStart(index: u32): void; -export declare function onSourceMappingURL(offset: u32, length: u32): void; -export declare function onModuleName(offset: u32, length: u32): void; -export declare function onFunctionName(index: u32, offset: u32, length: u32): void; -export declare function onLocalName(funcIndex: u32, index: u32, offset: u32, length: u32): void; diff --git a/lib/parse/assembly/tsconfig.json b/lib/parse/assembly/tsconfig.json deleted file mode 100644 index 6e52b21c48..0000000000 --- a/lib/parse/assembly/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "../../../std/assembly.json", - "include": [ - "./**/*.ts" - ] -} diff --git a/lib/parse/build/.gitignore b/lib/parse/build/.gitignore deleted file mode 100644 index d873de2f78..0000000000 --- a/lib/parse/build/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.wasm -*.wasm.map diff --git a/lib/parse/build/index.wat b/lib/parse/build/index.wat deleted file mode 100644 index 73b58157fd..0000000000 --- a/lib/parse/build/index.wat +++ /dev/null @@ -1,932 +0,0 @@ -(module - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiiiii (func (param i32 i32 i32 i32 i32 i32))) - (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$i (func (result i32))) - (import "env" "memory" (memory $0 0)) - (import "options" "onSection" (func $assembly/options/onSection (param i32 i32 i32 i32 i32) (result i32))) - (import "options" "onType" (func $assembly/options/onType (param i32 i32))) - (import "options" "onTypeParam" (func $assembly/options/onTypeParam (param i32 i32 i32))) - (import "options" "onTypeReturn" (func $assembly/options/onTypeReturn (param i32 i32 i32))) - (import "options" "onImport" (func $assembly/options/onImport (param i32 i32 i32 i32 i32 i32))) - (import "options" "onFunctionImport" (func $assembly/options/onFunctionImport (param i32 i32))) - (import "options" "onTableImport" (func $assembly/options/onTableImport (param i32 i32 i32 i32 i32))) - (import "options" "onMemoryImport" (func $assembly/options/onMemoryImport (param i32 i32 i32 i32))) - (import "options" "onGlobalImport" (func $assembly/options/onGlobalImport (param i32 i32 i32))) - (import "options" "onFunction" (func $assembly/options/onFunction (param i32 i32))) - (import "options" "onTable" (func $assembly/options/onTable (param i32 i32 i32 i32 i32))) - (import "options" "onMemory" (func $assembly/options/onMemory (param i32 i32 i32 i32))) - (import "options" "onGlobal" (func $assembly/options/onGlobal (param i32 i32 i32))) - (import "options" "onExport" (func $assembly/options/onExport (param i32 i32 i32 i32 i32))) - (import "options" "onStart" (func $assembly/options/onStart (param i32))) - (import "options" "onModuleName" (func $assembly/options/onModuleName (param i32 i32))) - (import "options" "onFunctionName" (func $assembly/options/onFunctionName (param i32 i32 i32))) - (import "options" "onLocalName" (func $assembly/options/onLocalName (param i32 i32 i32 i32))) - (import "options" "onSourceMappingURL" (func $assembly/options/onSourceMappingURL (param i32 i32))) - (global $assembly/index/off (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "parse" (func $assembly/index/parse)) - (func $assembly/index/readVaruint (; 19 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $assembly/index/off - local.set $0 - loop $continue|0 - local.get $0 - local.tee $1 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.load8_u - local.tee $1 - i32.const 127 - i32.and - local.get $3 - i32.shl - local.get $2 - i32.or - local.set $2 - local.get $1 - i32.const 128 - i32.and - if - local.get $3 - i32.const 7 - i32.add - local.set $3 - br $continue|0 - end - end - local.get $0 - global.set $assembly/index/off - local.get $2 - ) - (func $assembly/index/readVarint (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $assembly/index/off - local.set $4 - loop $continue|0 - local.get $4 - local.tee $3 - i32.const 1 - i32.add - local.set $4 - local.get $3 - i32.load8_u - local.tee $3 - i32.const 127 - i32.and - local.get $1 - i32.shl - local.get $2 - i32.or - local.set $2 - local.get $1 - i32.const 7 - i32.add - local.set $1 - local.get $3 - i32.const 128 - i32.and - br_if $continue|0 - end - local.get $4 - global.set $assembly/index/off - i32.const -1 - local.get $1 - i32.shl - local.get $2 - i32.or - local.get $2 - local.get $3 - i32.const 64 - i32.and - i32.const 0 - i32.ne - i32.const 0 - local.get $1 - local.get $0 - i32.lt_u - select - select - ) - (func $assembly/index/readVarint64 (; 21 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i64) - (local $2 i32) - (local $3 i64) - (local $4 i64) - global.get $assembly/index/off - local.set $0 - loop $continue|0 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $2 - i64.load8_u - local.tee $4 - i64.const 127 - i64.and - local.get $1 - i64.shl - local.get $3 - i64.or - local.set $3 - local.get $1 - i64.const 7 - i64.add - local.set $1 - local.get $4 - i64.const 128 - i64.and - i64.const 0 - i64.ne - br_if $continue|0 - end - local.get $0 - global.set $assembly/index/off - ) - (func $assembly/index/skipInitExpr (; 22 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - global.get $assembly/index/off - local.tee $1 - i32.load8_u - local.set $0 - local.get $1 - i32.const 1 - i32.add - global.set $assembly/index/off - block $break|0 - block $case5|0 - block $case4|0 - block $case3|0 - block $case2|0 - block $case1|0 - local.get $0 - i32.const 65 - i32.ne - if - local.get $0 - i32.const 66 - i32.eq - br_if $case1|0 - local.get $0 - i32.const 67 - i32.eq - br_if $case2|0 - local.get $0 - i32.const 68 - i32.eq - br_if $case3|0 - local.get $0 - i32.const 35 - i32.eq - br_if $case4|0 - br $case5|0 - end - i32.const 32 - call $assembly/index/readVarint - drop - br $break|0 - end - call $assembly/index/readVarint64 - br $break|0 - end - global.get $assembly/index/off - local.tee $0 - i32.load - drop - local.get $0 - i32.const 4 - i32.add - global.set $assembly/index/off - br $break|0 - end - global.get $assembly/index/off - local.tee $0 - i64.load - drop - local.get $0 - i32.const 8 - i32.add - global.set $assembly/index/off - br $break|0 - end - call $assembly/index/readVaruint - drop - br $break|0 - end - unreachable - end - global.get $assembly/index/off - local.tee $1 - i32.load8_u - local.get $1 - i32.const 1 - i32.add - global.set $assembly/index/off - i32.const 11 - i32.ne - if - unreachable - end - ) - (func $assembly/index/parse (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - local.get $0 - global.set $assembly/index/off - global.get $assembly/index/off - local.tee $0 - i32.load - local.get $0 - i32.const 4 - i32.add - global.set $assembly/index/off - i32.const 1836278016 - i32.ne - if - unreachable - end - global.get $assembly/index/off - local.tee $0 - i32.load - local.get $0 - i32.const 4 - i32.add - global.set $assembly/index/off - i32.const 1 - i32.ne - if - unreachable - end - i32.const 0 - local.set $0 - loop $continue|0 - global.get $assembly/index/off - local.get $1 - i32.lt_u - if - call $assembly/index/readVaruint - local.set $4 - call $assembly/index/readVaruint - local.set $3 - i32.const 0 - local.set $5 - i32.const 0 - local.set $2 - local.get $4 - if - local.get $4 - i32.const 11 - i32.gt_u - if - unreachable - end - else - global.get $assembly/index/off - local.set $6 - call $assembly/index/readVaruint - local.tee $2 - global.get $assembly/index/off - local.tee $5 - i32.add - global.set $assembly/index/off - local.get $3 - global.get $assembly/index/off - local.get $6 - i32.sub - i32.sub - local.set $3 - end - local.get $4 - global.get $assembly/index/off - local.tee $6 - local.get $3 - local.get $5 - local.get $2 - call $assembly/options/onSection - if - block $break|1 - block $case12|1 - block $case11|1 - block $case8|1 - block $case7|1 - block $case6|1 - block $case5|1 - block $case4|1 - block $case3|1 - block $case2|1 - block $case1|1 - local.get $4 - i32.const 1 - i32.ne - if - local.get $4 - i32.const 2 - i32.eq - br_if $case1|1 - block $tablify|0 - local.get $4 - br_table $case8|1 $tablify|0 $tablify|0 $case2|1 $case3|1 $case4|1 $case5|1 $case6|1 $case7|1 $case11|1 $case11|1 $case11|1 $tablify|0 - end - br $case12|1 - end - call $assembly/index/readVaruint - local.set $4 - i32.const 0 - local.set $2 - loop $loop|2 - local.get $2 - local.get $4 - i32.lt_u - if - local.get $2 - i32.const 7 - call $assembly/index/readVarint - i32.const 127 - i32.and - call $assembly/options/onType - call $assembly/index/readVaruint - local.set $5 - i32.const 0 - local.set $3 - loop $loop|3 - local.get $3 - local.get $5 - i32.lt_u - if - local.get $2 - local.get $3 - i32.const 7 - call $assembly/index/readVarint - i32.const 127 - i32.and - call $assembly/options/onTypeParam - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $loop|3 - end - end - call $assembly/index/readVaruint - local.set $5 - i32.const 0 - local.set $3 - loop $loop|4 - local.get $3 - local.get $5 - i32.lt_u - if - local.get $2 - local.get $3 - i32.const 7 - call $assembly/index/readVarint - i32.const 127 - i32.and - call $assembly/options/onTypeReturn - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $loop|4 - end - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $loop|2 - end - end - br $break|1 - end - call $assembly/index/readVaruint - local.set $7 - i32.const 0 - local.set $4 - loop $loop|5 - local.get $4 - local.get $7 - i32.lt_u - if - call $assembly/index/readVaruint - local.tee $3 - global.get $assembly/index/off - local.tee $5 - i32.add - global.set $assembly/index/off - call $assembly/index/readVaruint - local.tee $6 - global.get $assembly/index/off - local.tee $8 - i32.add - global.set $assembly/index/off - global.get $assembly/index/off - local.tee $9 - i32.load8_u - local.set $2 - local.get $9 - i32.const 1 - i32.add - global.set $assembly/index/off - local.get $4 - local.get $2 - local.get $5 - local.get $3 - local.get $8 - local.get $6 - call $assembly/options/onImport - block $break|6 - block $case4|6 - block $case3|6 - block $case2|6 - block $case1|6 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - br_table $case1|6 $case2|6 $case3|6 $case4|6 - end - local.get $10 - local.tee $2 - i32.const 1 - i32.add - local.set $10 - local.get $2 - call $assembly/index/readVaruint - call $assembly/options/onFunctionImport - br $break|6 - end - i32.const 7 - call $assembly/index/readVarint - i32.const 127 - i32.and - local.set $3 - call $assembly/index/readVaruint - local.set $5 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $3 - call $assembly/index/readVaruint - local.get $5 - i32.const 1 - i32.and - if (result i32) - call $assembly/index/readVaruint - else - i32.const -1 - end - local.get $5 - call $assembly/options/onTableImport - br $break|6 - end - call $assembly/index/readVaruint - local.set $3 - local.get $11 - local.tee $2 - i32.const 1 - i32.add - local.set $11 - local.get $2 - call $assembly/index/readVaruint - local.get $3 - i32.const 1 - i32.and - if (result i32) - call $assembly/index/readVaruint - else - i32.const 65535 - end - local.get $3 - call $assembly/options/onMemoryImport - br $break|6 - end - local.get $12 - local.tee $2 - i32.const 1 - i32.add - local.set $12 - local.get $2 - i32.const 7 - call $assembly/index/readVarint - i32.const 127 - i32.and - call $assembly/index/readVaruint - call $assembly/options/onGlobalImport - br $break|6 - end - unreachable - end - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $loop|5 - end - end - br $break|1 - end - call $assembly/index/readVaruint - local.set $4 - i32.const 0 - local.set $3 - loop $loop|7 - local.get $3 - local.get $4 - i32.lt_u - if - local.get $10 - local.tee $2 - i32.const 1 - i32.add - local.set $10 - local.get $2 - call $assembly/index/readVaruint - call $assembly/options/onFunction - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $loop|7 - end - end - br $break|1 - end - call $assembly/index/readVaruint - local.set $7 - i32.const 0 - local.set $4 - loop $loop|8 - local.get $4 - local.get $7 - i32.lt_u - if - call $assembly/index/readVaruint - i32.const 127 - i32.and - local.set $3 - call $assembly/index/readVaruint - local.set $5 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $3 - call $assembly/index/readVaruint - local.get $5 - i32.const 1 - i32.and - if (result i32) - call $assembly/index/readVaruint - else - i32.const -1 - end - local.get $5 - call $assembly/options/onTable - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $loop|8 - end - end - br $break|1 - end - call $assembly/index/readVaruint - local.set $6 - i32.const 0 - local.set $3 - loop $loop|9 - local.get $3 - local.get $6 - i32.lt_u - if - call $assembly/index/readVaruint - local.set $4 - local.get $11 - local.tee $2 - i32.const 1 - i32.add - local.set $11 - local.get $2 - call $assembly/index/readVaruint - local.get $4 - i32.const 1 - i32.and - if (result i32) - call $assembly/index/readVaruint - else - i32.const 65535 - end - local.get $4 - call $assembly/options/onMemory - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $loop|9 - end - end - br $break|1 - end - call $assembly/index/readVaruint - local.set $4 - i32.const 0 - local.set $3 - loop $loop|10 - local.get $3 - local.get $4 - i32.lt_u - if - i32.const 7 - call $assembly/index/readVarint - i32.const 127 - i32.and - local.set $5 - call $assembly/index/readVaruint - local.set $6 - call $assembly/index/skipInitExpr - local.get $12 - local.tee $2 - i32.const 1 - i32.add - local.set $12 - local.get $2 - local.get $5 - local.get $6 - call $assembly/options/onGlobal - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $loop|10 - end - end - br $break|1 - end - call $assembly/index/readVaruint - local.set $3 - i32.const 0 - local.set $2 - loop $loop|11 - local.get $2 - local.get $3 - i32.lt_u - if - call $assembly/index/readVaruint - local.tee $4 - global.get $assembly/index/off - local.tee $5 - i32.add - global.set $assembly/index/off - global.get $assembly/index/off - local.tee $6 - i32.load8_u - local.set $7 - local.get $6 - i32.const 1 - i32.add - global.set $assembly/index/off - local.get $2 - local.get $7 - call $assembly/index/readVaruint - local.get $5 - local.get $4 - call $assembly/options/onExport - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $loop|11 - end - end - br $break|1 - end - call $assembly/index/readVaruint - call $assembly/options/onStart - br $break|1 - end - local.get $2 - i32.const 4 - i32.eq - if (result i32) - local.get $5 - i32.load - i32.const 1701667182 - i32.eq - else - i32.const 0 - end - if - call $assembly/index/readVaruint - local.set $2 - call $assembly/index/readVaruint - global.get $assembly/index/off - block $break|12 - block $case3|12 - block $case2|12 - block $case1|12 - local.get $2 - if - local.get $2 - i32.const 1 - i32.eq - br_if $case1|12 - local.get $2 - i32.const 2 - i32.eq - br_if $case2|12 - br $case3|12 - end - call $assembly/index/readVaruint - local.set $2 - global.get $assembly/index/off - local.get $2 - call $assembly/options/onModuleName - br $break|12 - end - call $assembly/index/readVaruint - local.set $2 - i32.const 0 - local.set $3 - loop $loop|13 - local.get $3 - local.get $2 - i32.lt_u - if - call $assembly/index/readVaruint - call $assembly/index/readVaruint - local.tee $7 - global.get $assembly/index/off - local.tee $8 - i32.add - global.set $assembly/index/off - local.get $8 - local.get $7 - call $assembly/options/onFunctionName - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $loop|13 - end - end - br $break|12 - end - call $assembly/index/readVaruint - local.set $6 - i32.const 0 - local.set $2 - loop $loop|14 - local.get $2 - local.get $6 - i32.lt_u - if - call $assembly/index/readVaruint - local.set $7 - call $assembly/index/readVaruint - local.set $8 - i32.const 0 - local.set $3 - loop $loop|15 - local.get $3 - local.get $8 - i32.lt_u - if - call $assembly/index/readVaruint - local.set $9 - call $assembly/index/readVaruint - local.tee $13 - global.get $assembly/index/off - local.tee $14 - i32.add - global.set $assembly/index/off - local.get $7 - local.get $9 - local.get $14 - local.get $13 - call $assembly/options/onLocalName - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $loop|15 - end - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $loop|14 - end - end - br $break|12 - end - unreachable - end - i32.add - global.set $assembly/index/off - br $break|1 - else - local.get $2 - i32.const 16 - i32.eq - if (result i32) - local.get $5 - i64.load - i64.const 7011371672682196851 - i64.eq - else - i32.const 0 - end - if (result i32) - local.get $5 - i32.const 8 - i32.add - i64.load - i64.const 5499551997695193200 - i64.eq - else - i32.const 0 - end - if - call $assembly/index/readVaruint - local.tee $2 - global.get $assembly/index/off - local.tee $4 - i32.add - global.set $assembly/index/off - local.get $4 - local.get $2 - call $assembly/options/onSourceMappingURL - end - end - local.get $3 - local.get $6 - i32.add - global.set $assembly/index/off - br $break|1 - end - global.get $assembly/index/off - local.get $3 - i32.add - global.set $assembly/index/off - br $break|1 - end - unreachable - end - else - global.get $assembly/index/off - local.get $3 - i32.add - global.set $assembly/index/off - end - br $continue|0 - end - end - global.get $assembly/index/off - local.get $1 - i32.ne - if - unreachable - end - ) - (func $null (; 24 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/lib/parse/index.d.ts b/lib/parse/index.d.ts deleted file mode 100644 index 3bd16e178a..0000000000 --- a/lib/parse/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./src"; diff --git a/lib/parse/index.js b/lib/parse/index.js deleted file mode 100644 index 79b2952d67..0000000000 --- a/lib/parse/index.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(A,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.asparse=e():A.asparse=e()}("undefined"!=typeof self?self:this,function(){return function(A){var e={};function n(o){if(e[o])return e[o].exports;var Q=e[o]={i:o,l:!1,exports:{}};return A[o].call(Q.exports,Q,Q.exports,n),Q.l=!0,Q.exports}return n.m=A,n.c=e,n.d=function(A,e,o){n.o(A,e)||Object.defineProperty(A,e,{enumerable:!0,get:o})},n.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},n.t=function(A,e){if(1&e&&(A=n(A)),8&e)return A;if(4&e&&"object"==typeof A&&A&&A.__esModule)return A;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:A}),2&e&&"string"!=typeof A)for(var Q in A)n.d(o,Q,function(e){return A[e]}.bind(null,Q));return o},n.n=function(A){var e=A&&A.__esModule?function(){return A.default}:function(){return A};return n.d(e,"a",e),e},n.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},n.p="",n(n.s=0)}([function(A,e,n){A.exports=n(1)},function(A,e,n){"use strict";e.__esModule=!0;var o=n(2);e.Type=o.Type,e.SectionId=o.SectionId,e.ExternalKind=o.ExternalKind;var Q=null;e.parse=function A(e,n){n||(n={}),Q||(Q=new WebAssembly.Module(function(A){var e=A.length;if(e){for(var n=0,o=e;--o%4>1&&61===A.charCodeAt(o);)++n;e=Math.ceil(3*e)/4-n}for(var Q=new Uint8Array(e),B=0,I=0,E=0,r=0,i=A.length;r1)break;if(void 0===(C=t[C]))throw Error();switch(B){case 0:E=C,B=1;break;case 1:Q[I++]=E<<2|(48&C)>>4,E=C,B=2;break;case 2:Q[I++]=(15&E)<<4|(60&C)>>2,E=C,B=3;break;case 3:Q[I++]=(3&E)<<6|C,B=0}}if(1===B)throw Error();return Q}("AGFzbQEAAAABPQpgAn9/AGABfwF/YAV/f39/fwF/YAN/f38AYAZ/f39/f38AYAV/f39/fwBgBH9/f38AYAAAYAF/AGAAAX8CrgMUB29wdGlvbnMJb25TZWN0aW9uAAIHb3B0aW9ucwZvblR5cGUAAAdvcHRpb25zC29uVHlwZVBhcmFtAAMHb3B0aW9ucwxvblR5cGVSZXR1cm4AAwdvcHRpb25zCG9uSW1wb3J0AAQHb3B0aW9ucxBvbkZ1bmN0aW9uSW1wb3J0AAAHb3B0aW9ucw1vblRhYmxlSW1wb3J0AAUHb3B0aW9ucw5vbk1lbW9yeUltcG9ydAAGB29wdGlvbnMOb25HbG9iYWxJbXBvcnQAAwdvcHRpb25zCm9uRnVuY3Rpb24AAAdvcHRpb25zB29uVGFibGUABQdvcHRpb25zCG9uTWVtb3J5AAYHb3B0aW9ucwhvbkdsb2JhbAADB29wdGlvbnMIb25FeHBvcnQABQdvcHRpb25zB29uU3RhcnQACAdvcHRpb25zDG9uTW9kdWxlTmFtZQAAB29wdGlvbnMOb25GdW5jdGlvbk5hbWUAAwdvcHRpb25zC29uTG9jYWxOYW1lAAYHb3B0aW9ucxJvblNvdXJjZU1hcHBpbmdVUkwAAANlbnYGbWVtb3J5AgAAAwcGCQEHBwAHBgYBfwFBAAsHEgIGbWVtb3J5AgAFcGFyc2UAFwrlDAY/AQR/IwAhAANAIAAiAUEBaiEAIAEtAAAiAUH/AHEgA3QgAnIhAiABQYABcQRAIANBB2ohAwwBCwsgACQAIAILVgEEfyMAIQQDQCAEIgNBAWohBCADLQAAIgNB/wBxIAF0IAJyIQIgAUEHaiEBIANBgAFxDQALIAQkAEF/IAF0IAJyIAIgA0HAAHFBAEdBACABIABJGxsLPwICfwN+IwAhAANAIAAiAUEBaiEAIAExAAAiBEL/AIMgAoYgA4QhAyACQgd8IQIgBEKAAYNCAFINAAsgACQAC5wBAQJ/IwAiAS0AACEAIAFBAWokAAJAAkACQAJAAkACQCAAQcEARwRAIABBwgBGDQEgAEHDAEYNAiAAQcQARg0DIABBI0YNBAwFC0EgEBQaDAULEBUMBAsjACIAKAIAGiAAQQRqJAAMAwsjACIAKQMAGiAAQQhqJAAMAgsQExoMAQsACyMAIgEtAAAhACABQQFqJAAgAEELRwRAAAsL6QkBDX8gACQAIwAiACgCACECIABBBGokACACQYDCzesGRwRAAAsjACIAKAIAIQIgAEEEaiQAIAJBAUcEQAALQQAhAANAIwAgAUkEQBATIQQQEyEDQQAhBUEAIQIgBARAIARBC0sEQAALBSMAIQYQEyICIwAiBWokACADIwAgBmtrIQMLIAQjACIGIAMgBSACEAAEQAJAAkACQAJAAkACQAJAAkACQAJAAkAgBEEBRwRAIARBAkYNAQJAIAQODAkAAAMEBQYHCAoKCgALDAoLEBMhBEEAIQIDQCACIARJBEAgAkEHEBRB/wBxEAEQEyEFQQAhAwNAIAMgBUkEQCACIANBBxAUQf8AcRACIANBAWohAwwBCwsQEyEFQQAhAwNAIAMgBUkEQCACIANBBxAUQf8AcRADIANBAWohAwwBCwsgAkEBaiECDAELCwwKCxATIQdBACEEA0AgBCAHSQRAEBMiAyMAIgVqJAAQEyIGIwAiCGokACMAIgktAAAhAiAJQQFqJAAgBCACIAUgAyAIIAYQBAJAAkACQAJAAkAgAgRAIAJBAWsOAwECAwQLIAoiAkEBaiEKIAIQExAFDAQLQQcQFEH/AHEhAxATIQUgACICQQFqIQAgAiADEBMgBUEBcQR/EBMFQX8LIAUQBgwDCxATIQMgCyICQQFqIQsgAhATIANBAXEEfxATBUH//wMLIAMQBwwCCyAMIgJBAWohDCACQQcQFEH/AHEQExAIDAELAAsgBEEBaiEEDAELCwwJCxATIQRBACEDA0AgAyAESQRAIAoiAkEBaiEKIAIQExAJIANBAWohAwwBCwsMCAsQEyEHQQAhBANAIAQgB0kEQBATQf8AcSEDEBMhBSAAIgJBAWohACACIAMQEyAFQQFxBH8QEwVBfwsgBRAKIARBAWohBAwBCwsMBwsQEyEGQQAhAwNAIAMgBkkEQBATIQQgCyICQQFqIQsgAhATIARBAXEEfxATBUH//wMLIAQQCyADQQFqIQMMAQsLDAYLEBMhBEEAIQMDQCADIARJBEBBBxAUQf8AcSEFEBMhBhAWIAwiAkEBaiEMIAIgBSAGEAwgA0EBaiEDDAELCwwFCxATIQNBACECA0AgAiADSQRAEBMiBCMAIgVqJAAjACIGLQAAIQcgBkEBaiQAIAIgBxATIAUgBBANIAJBAWohAgwBCwsMBAsQExAODAMLIAJBBEYEfyAFKAIAQe7CtasGRgVBAAsEQBATIQIQEyEEIwAhBQJAAkACQAJAIAIEQCACQQFGDQEgAkECRg0CDAMLEBMhAiMAIAIQDwwDCxATIQJBACEDA0AgAyACSQRAEBMhBhATIgcjACIIaiQAIAYgCCAHEBAgA0EBaiEDDAELCwwCCxATIQZBACECA0AgAiAGSQRAEBMhBxATIQhBACEDA0AgAyAISQRAEBMhCRATIg0jACIOaiQAIAcgCSAOIA0QESADQQFqIQMMAQsLIAJBAWohAgwBCwsMAQsACyAEIAVqJAAMAwUgAkEQRgR/IAUpAwBC897Vk7es2abhAFEFQQALBH8gBUEIaikDAELw4KXz9qyVqcwAUQVBAAsEQBATIgIjACIEaiQAIAQgAhASCwsgAyAGaiQADAILIwAgA2okAAwBCwALBSMAIANqJAALDAELCyMAIAFHBEAACwsDAAELACAQc291cmNlTWFwcGluZ1VSTA5pbmRleC53YXNtLm1hcA==")));var o=e.length,B=(o+65535&-65536)>>16,I=new WebAssembly.Memory({initial:B}),E=new Uint8Array(I.buffer);E.set(e),A.readString=function(A,e){return function(A,e,n){if(n-e<1)return"";for(var o=null,Q=[],t=0,B=0;e191&&B<224?Q[t++]=(31&B)<<6|63&A[e++]:B>239&&B<365?(B=((7&B)<<18|(63&A[e++])<<12|(63&A[e++])<<6|63&A[e++])-65536,Q[t++]=55296+(B>>10),Q[t++]=56320+(1023&B)):Q[t++]=(15&B)<<12|(63&A[e++])<<6|63&A[e++],t>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,Q)),t=0);return o?(t&&o.push(String.fromCharCode.apply(String,Q.slice(0,t))),o.join("")):String.fromCharCode.apply(String,Q.slice(0,t))}(E,A,A+e)};var r={env:{memory:I},options:{}};["onSection","onType","onTypeParam","onTypeReturn","onImport","onFunctionImport","onTableImport","onMemoryImport","onGlobalImport","onMemory","onFunction","onTable","onGlobal","onExport","onStart","onSourceMappingURL","onModuleName","onFunctionName","onLocalName"].forEach(function(A){return r.options[A]=n[A]||function(){}}),new WebAssembly.Instance(Q,r).exports.parse(0,o)};for(var t=new Array(123),B=0;B<64;)t[B<26?B+65:B<52?B+71:B<62?B-4:B-59|43]=B++},function(A,e,n){"use strict";e.__esModule=!0,function(A){A[A.i32=127]="i32",A[A.i64=126]="i64",A[A.f32=125]="f32",A[A.f64=124]="f64",A[A.anyfunc=112]="anyfunc",A[A.func=96]="func",A[A.none=64]="none"}(e.Type||(e.Type={})),function(A){A[A.Custom=0]="Custom",A[A.Type=1]="Type",A[A.Import=2]="Import",A[A.Function=3]="Function",A[A.Table=4]="Table",A[A.Memory=5]="Memory",A[A.Global=6]="Global",A[A.Export=7]="Export",A[A.Start=8]="Start",A[A.Element=9]="Element",A[A.Code=10]="Code",A[A.Data=11]="Data"}(e.SectionId||(e.SectionId={})),function(A){A[A.Function=0]="Function",A[A.Table=1]="Table",A[A.Memory=2]="Memory",A[A.Global=3]="Global"}(e.ExternalKind||(e.ExternalKind={})),function(A){A[A.Module=0]="Module",A[A.Function=1]="Function",A[A.Local=2]="Local"}(e.NameType||(e.NameType={})),e.MAX_PAGES=65535,e.MAX_ELEMS=4294967295,function(A){A[A.end=11]="end",A[A.get_global=35]="get_global",A[A.i32_const=65]="i32_const",A[A.i64_const=66]="i64_const",A[A.f32_const=67]="f32_const",A[A.f64_const=68]="f64_const"}(e.Opcode||(e.Opcode={}))}])}); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/parse/index.js.map b/lib/parse/index.js.map deleted file mode 100644 index 0253c777cb..0000000000 --- a/lib/parse/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://asparse/webpack/universalModuleDefinition","webpack://asparse/webpack/bootstrap","webpack://asparse/./src/index.ts","webpack://asparse/./src/common.ts"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","common_1","Type","SectionId","ExternalKind","compiled","parse","binary","options","WebAssembly","Module","string","length","charCodeAt","Math","ceil","buffer","Uint8Array","j","k","undefined","s64","Error","base64_decode","nBytes","nPages","memory","Memory","initial","set","readString","offset","start","end","parts","chunk","push","String","fromCharCode","apply","slice","join","utf8_read","imports","env","forEach","Instance","Array","NameType","MAX_PAGES","MAX_ELEMS","Opcode"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,UAAAH,GACA,iBAAAC,QACAA,QAAA,QAAAD,IAEAD,EAAA,QAAAC,IARA,CASC,oBAAAK,UAAAC,KAAA,WACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAR,QAGA,IAAAC,EAAAK,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAV,YAUA,OANAW,EAAAH,GAAAI,KAAAX,EAAAD,QAAAC,IAAAD,QAAAO,GAGAN,EAAAS,GAAA,EAGAT,EAAAD,QA0DA,OArDAO,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAf,EAAAgB,EAAAC,GACAV,EAAAW,EAAAlB,EAAAgB,IACAG,OAAAC,eAAApB,EAAAgB,GAA0CK,YAAA,EAAAC,IAAAL,KAK1CV,EAAAgB,EAAA,SAAAvB,GACA,oBAAAwB,eAAAC,aACAN,OAAAC,eAAApB,EAAAwB,OAAAC,aAAwDC,MAAA,WAExDP,OAAAC,eAAApB,EAAA,cAAiD0B,OAAA,KAQjDnB,EAAAoB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAAnB,EAAAmB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFAxB,EAAAgB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAAnB,EAAAQ,EAAAe,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAvB,EAAA2B,EAAA,SAAAjC,GACA,IAAAgB,EAAAhB,KAAA4B,WACA,WAA2B,OAAA5B,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAM,EAAAQ,EAAAE,EAAA,IAAAA,GACAA,GAIAV,EAAAW,EAAA,SAAAiB,EAAAC,GAAsD,OAAAjB,OAAAkB,UAAAC,eAAA1B,KAAAuB,EAAAC,IAGtD7B,EAAAgC,EAAA,GAIAhC,IAAAiC,EAAA,kECjFAxC,EAAA6B,YAAA,EACA,IAAAY,EAAelC,EAAQ,GACvBP,EAAA0C,KAAAD,EAAAC,KACA1C,EAAA2C,UAAAF,EAAAE,UACA3C,EAAA4C,aAAAH,EAAAG,aAEA,IAAAC,EAAA,KAgDA7C,EAAA8C,MA5CA,SAAAA,EAAAC,EAAAC,GACAA,IACAA,MAEAH,IACAA,EAAA,IAAAI,YAAAC,OA4EA,SAAAC,GACA,IAAAC,EAAAD,EAAAC,OACA,GAAAA,EAAA,CAEA,IADA,IAAAlB,EAAA,EAAAK,EAAAa,IACAb,EAAA,UAAAY,EAAAE,WAAAd,MACAL,EACAkB,EAAAE,KAAAC,KAAA,EAAAH,GAAA,EAAAlB,EAIA,IAFA,IAAAsB,EAAA,IAAAC,WAAAL,GACAM,EAAA,EAAAxC,EAAA,EAAAS,EAAA,EACAlB,EAAA,EAAAkD,EAAAR,EAAAC,OAAsC3C,EAAAkD,GAAO,CAC7C,IAAA7C,EAAAqC,EAAAE,WAAA5C,KACA,QAAAK,GAAA4C,EAAA,EACA,MACA,QAAAE,KAAA9C,EAAA+C,EAAA/C,IACA,MAAAgD,QACA,OAAAJ,GACA,OACA/B,EAAAb,EACA4C,EAAA,EACA,MAEA,OACAF,EAAAtC,KAAAS,GAAA,MAAAb,IAAA,EACAa,EAAAb,EACA4C,EAAA,EACA,MAEA,OACAF,EAAAtC,MAAA,GAAAS,IAAA,MAAAb,IAAA,EACAa,EAAAb,EACA4C,EAAA,EACA,MAEA,OACAF,EAAAtC,MAAA,EAAAS,IAAA,EAAAb,EACA4C,EAAA,GAKA,OAAAA,EACA,MAAAI,QACA,OAAAN,EAvHAO,CAAwD,k5FAExD,IAAAC,EAAAjB,EAAAK,OACAa,GAAAD,EAAA,kBACAE,EAAA,IAAAjB,YAAAkB,QAAyCC,QAAAH,IACzCT,EAAA,IAAAC,WAAAS,EAAAV,QACAA,EAAAa,IAAAtB,GAEAD,EAAAwB,WAAA,SAAAC,EAAAnB,GAAkD,OAiClD,SAAAI,EAAAgB,EAAAC,GAEA,GADAA,EAAAD,EACA,EACA,SAGA,IAFA,IAAAE,EAAA,KAAAC,KAAAlE,EAAA,EACAkB,EAAA,EACA6C,EAAAC,IACA9C,EAAA6B,EAAAgB,MACA,IACAG,EAAAlE,KAAAkB,EAEAA,EAAA,KAAAA,EAAA,IACAgD,EAAAlE,MAAA,GAAAkB,IAAA,KAAA6B,EAAAgB,KAEA7C,EAAA,KAAAA,EAAA,KACAA,IAAA,EAAAA,IAAA,OAAA6B,EAAAgB,OAAA,OAAAhB,EAAAgB,OAAA,KAAAhB,EAAAgB,MAAA,MACAG,EAAAlE,KAAA,OAAAkB,GAAA,IACAgD,EAAAlE,KAAA,YAAAkB,IAGAgD,EAAAlE,MAAA,GAAAkB,IAAA,OAAA6B,EAAAgB,OAAA,KAAAhB,EAAAgB,KAEA/D,EAAA,QACAiE,WAAAE,KAAAC,OAAAC,aAAAC,MAAAF,OAAAF,IACAlE,EAAA,GAGA,OAAAiE,GACAjE,GACAiE,EAAAE,KAAAC,OAAAC,aAAAC,MAAAF,OAAAF,EAAAK,MAAA,EAAAvE,KACAiE,EAAAO,KAAA,KAEAJ,OAAAC,aAAAC,MAAAF,OAAAF,EAAAK,MAAA,EAAAvE,IAjEkDyE,CAAA1B,EAAAe,IAAAnB,IAElD,IAAA+B,GACAC,KACAlB,UAEAlB,aAEA,YACA,SACA,cACA,eACA,WACA,mBACA,gBACA,iBACA,iBACA,WACA,aACA,UACA,WACA,WACA,UACA,qBACA,eACA,iBACA,eACAqC,QAAA,SAAArE,GAA+B,OAAAmE,EAAAnC,QAAAhC,GAAAgC,EAAAhC,IAAA,eAC/B,IAAAiC,YAAAqC,SAAAzC,EAAAsC,GACAnF,QAAA8C,MAAA,EAAAkB,IAqFA,IADA,IAAAH,EAAA,IAAA0B,MAAA,KACA9E,EAAA,EAAeA,EAAA,IACfoD,EAAApD,EAAA,GAAAA,EAAA,GAAAA,EAAA,GAAAA,EAAA,GAAAA,EAAA,GAAAA,EAAA,EAAAA,EAAA,OAAAA,kCCzIAT,EAAA6B,YAAA,EAGA,SAAAa,GACAA,IAAA,eACAA,IAAA,eACAA,IAAA,eACAA,IAAA,eACAA,IAAA,uBACAA,IAAA,gBACAA,IAAA,gBAPA,CAQC1C,EAAA0C,OAAA1C,EAAA0C,UAGD,SAAAC,GACAA,IAAA,mBACAA,IAAA,eACAA,IAAA,mBACAA,IAAA,uBACAA,IAAA,iBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,iBACAA,IAAA,qBACAA,IAAA,gBACAA,IAAA,gBAZA,CAaC3C,EAAA2C,YAAA3C,EAAA2C,eAGD,SAAAC,GACAA,IAAA,uBACAA,IAAA,iBACAA,IAAA,mBACAA,IAAA,mBAJA,CAKC5C,EAAA4C,eAAA5C,EAAA4C,kBAGD,SAAA4C,GACAA,IAAA,mBACAA,IAAA,uBACAA,IAAA,iBAHA,CAICxF,EAAAwF,WAAAxF,EAAAwF,cAEDxF,EAAAyF,UAAA,MAEAzF,EAAA0F,UAAA,WAGA,SAAAC,GAOAA,IAAA,cAYAA,IAAA,4BA2BAA,IAAA,0BACAA,IAAA,0BACAA,IAAA,0BACAA,IAAA,0BAjDA,CA6KC3F,EAAA2F,SAAA3F,EAAA2F","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"asparse\"] = factory();\n\telse\n\t\troot[\"asparse\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","\"use strict\";\r\nexports.__esModule = true;\r\nvar common_1 = require(\"./common\");\r\nexports.Type = common_1.Type;\r\nexports.SectionId = common_1.SectionId;\r\nexports.ExternalKind = common_1.ExternalKind;\r\n/** Cached compiled parser. */\r\nvar compiled = null;\r\nif (typeof WASM_DATA !== \"string\")\r\n WASM_DATA = require(\"fs\").readFileSync(__dirname + \"/../build/index.wasm\", \"base64\");\r\n/** Parses the contents of a WebAssembly binary according to the specified options. */\r\nfunction parse(binary, options) {\r\n if (!options)\r\n options = {};\r\n // compile the parser if not yet compiled\r\n if (!compiled)\r\n compiled = new WebAssembly.Module(base64_decode(WASM_DATA));\r\n // use the binary as the parser's memory\r\n var nBytes = binary.length;\r\n var nPages = ((nBytes + 0xffff) & ~0xffff) >> 16;\r\n var memory = new WebAssembly.Memory({ initial: nPages });\r\n var buffer = new Uint8Array(memory.buffer);\r\n buffer.set(binary);\r\n // provide a way to read strings from memory\r\n parse.readString = function (offset, length) { return utf8_read(buffer, offset, offset + length); };\r\n // instantiate the parser and return its exports\r\n var imports = {\r\n env: {\r\n memory: memory\r\n },\r\n options: {}\r\n };\r\n [\"onSection\",\r\n \"onType\",\r\n \"onTypeParam\",\r\n \"onTypeReturn\",\r\n \"onImport\",\r\n \"onFunctionImport\",\r\n \"onTableImport\",\r\n \"onMemoryImport\",\r\n \"onGlobalImport\",\r\n \"onMemory\",\r\n \"onFunction\",\r\n \"onTable\",\r\n \"onGlobal\",\r\n \"onExport\",\r\n \"onStart\",\r\n \"onSourceMappingURL\",\r\n \"onModuleName\",\r\n \"onFunctionName\",\r\n \"onLocalName\"\r\n ].forEach(function (name) { return imports.options[name] = options[name] || function () { }; });\r\n var instance = new WebAssembly.Instance(compiled, imports);\r\n instance.exports.parse(0, nBytes);\r\n}\r\nexports.parse = parse;\r\n// see: https://github.com/dcodeIO/protobuf.js/tree/master/lib/utf8\r\nfunction utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null, chunk = [], i = 0, // char offset\r\n t = 0; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128) {\r\n chunk[i++] = t;\r\n }\r\n else if (t > 191 && t < 224) {\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n }\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n }\r\n else {\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n}\r\n// see: https://github.com/dcodeIO/protobuf.js/tree/master/lib/base64\r\nfunction base64_decode(string) {\r\n var length = string.length;\r\n if (length) {\r\n var n = 0, p = length;\r\n while (--p % 4 > 1 && string.charCodeAt(p) === 61)\r\n ++n;\r\n length = Math.ceil(length * 3) / 4 - n;\r\n }\r\n var buffer = new Uint8Array(length);\r\n var j = 0, o = 0, t = 0;\r\n for (var i = 0, k = string.length; i < k;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error();\r\n switch (j) {\r\n case 0: {\r\n t = c;\r\n j = 1;\r\n break;\r\n }\r\n case 1: {\r\n buffer[o++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n }\r\n case 2: {\r\n buffer[o++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n }\r\n case 3: {\r\n buffer[o++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n }\r\n if (j === 1)\r\n throw Error();\r\n return buffer;\r\n}\r\nvar s64 = new Array(123);\r\nfor (var i = 0; i < 64;)\r\n s64[i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n","\"use strict\";\r\n/** Common constants shared between AssemblyScript and TypeScript. */\r\nexports.__esModule = true;\r\n/** WebAssembly types. */\r\nvar Type;\r\n(function (Type) {\r\n Type[Type[\"i32\"] = 127] = \"i32\";\r\n Type[Type[\"i64\"] = 126] = \"i64\";\r\n Type[Type[\"f32\"] = 125] = \"f32\";\r\n Type[Type[\"f64\"] = 124] = \"f64\";\r\n Type[Type[\"anyfunc\"] = 112] = \"anyfunc\";\r\n Type[Type[\"func\"] = 96] = \"func\";\r\n Type[Type[\"none\"] = 64] = \"none\";\r\n})(Type = exports.Type || (exports.Type = {}));\r\n/** WebAssembly section ids. */\r\nvar SectionId;\r\n(function (SectionId) {\r\n SectionId[SectionId[\"Custom\"] = 0] = \"Custom\";\r\n SectionId[SectionId[\"Type\"] = 1] = \"Type\";\r\n SectionId[SectionId[\"Import\"] = 2] = \"Import\";\r\n SectionId[SectionId[\"Function\"] = 3] = \"Function\";\r\n SectionId[SectionId[\"Table\"] = 4] = \"Table\";\r\n SectionId[SectionId[\"Memory\"] = 5] = \"Memory\";\r\n SectionId[SectionId[\"Global\"] = 6] = \"Global\";\r\n SectionId[SectionId[\"Export\"] = 7] = \"Export\";\r\n SectionId[SectionId[\"Start\"] = 8] = \"Start\";\r\n SectionId[SectionId[\"Element\"] = 9] = \"Element\";\r\n SectionId[SectionId[\"Code\"] = 10] = \"Code\";\r\n SectionId[SectionId[\"Data\"] = 11] = \"Data\";\r\n})(SectionId = exports.SectionId || (exports.SectionId = {}));\r\n/** WebAssembly external kinds. */\r\nvar ExternalKind;\r\n(function (ExternalKind) {\r\n ExternalKind[ExternalKind[\"Function\"] = 0] = \"Function\";\r\n ExternalKind[ExternalKind[\"Table\"] = 1] = \"Table\";\r\n ExternalKind[ExternalKind[\"Memory\"] = 2] = \"Memory\";\r\n ExternalKind[ExternalKind[\"Global\"] = 3] = \"Global\";\r\n})(ExternalKind = exports.ExternalKind || (exports.ExternalKind = {}));\r\n/** Name section types. */\r\nvar NameType;\r\n(function (NameType) {\r\n NameType[NameType[\"Module\"] = 0] = \"Module\";\r\n NameType[NameType[\"Function\"] = 1] = \"Function\";\r\n NameType[NameType[\"Local\"] = 2] = \"Local\";\r\n})(NameType = exports.NameType || (exports.NameType = {}));\r\n/** Maximum number of memory pages. */\r\nexports.MAX_PAGES = 0xffff;\r\n/** Maximum number of table elements. */\r\nexports.MAX_ELEMS = 0xffffffff;\r\n/** WebAssembly opcodes. */\r\nvar Opcode;\r\n(function (Opcode) {\r\n // unreachable = 0x00,\r\n // nop = 0x01,\r\n // block = 0x02,\r\n // loop = 0x03,\r\n // if_ = 0x04,\r\n // else_ = 0x05,\r\n Opcode[Opcode[\"end\"] = 11] = \"end\";\r\n // br = 0x0c,\r\n // br_if = 0x0d,\r\n // br_table = 0x0e,\r\n // return_ = 0x0f,\r\n // call = 0x10,\r\n // call_indirect = 0x11,\r\n // drop = 0x1a,\r\n // select = 0x1b,\r\n // get_local = 0x20,\r\n // set_local = 0x21,\r\n // tee_local = 0x22,\r\n Opcode[Opcode[\"get_global\"] = 35] = \"get_global\";\r\n // set_global = 0x24,\r\n // i32_load = 0x28,\r\n // i64_load = 0x29,\r\n // f32_load = 0x2a,\r\n // f64_load = 0x2b,\r\n // i32_load8_s = 0x2c,\r\n // i32_load8_u = 0x2d,\r\n // i32_load16_s = 0x2e,\r\n // i32_load16_u = 0x2f,\r\n // i64_load8_s = 0x30,\r\n // i64_load8_u = 0x31,\r\n // i64_load16_s = 0x32,\r\n // i64_load16_u = 0x33,\r\n // i64_load32_s = 0x34,\r\n // i64_load32_u = 0x35,\r\n // i32_store = 0x36,\r\n // i64_store = 0x37,\r\n // f32_store = 0x38,\r\n // f64_store = 0x39,\r\n // i32_store8 = 0x3a,\r\n // i32_store16 = 0x3b,\r\n // i64_store8 = 0x3c,\r\n // i64_store16 = 0x3d,\r\n // i64_store32 = 0x3e,\r\n // current_memory = 0x3f,\r\n // grow_memory = 0x40,\r\n Opcode[Opcode[\"i32_const\"] = 65] = \"i32_const\";\r\n Opcode[Opcode[\"i64_const\"] = 66] = \"i64_const\";\r\n Opcode[Opcode[\"f32_const\"] = 67] = \"f32_const\";\r\n Opcode[Opcode[\"f64_const\"] = 68] = \"f64_const\";\r\n // i32_eqz = 0x45,\r\n // i32_eq = 0x46,\r\n // i32_ne = 0x47,\r\n // i32_lt_s = 0x48,\r\n // i32_lt_u = 0x49,\r\n // i32_gt_s = 0x4a,\r\n // i32_gt_u = 0x4b,\r\n // i32_le_s = 0x4c,\r\n // i32_le_u = 0x4d,\r\n // i32_ge_s = 0x4e,\r\n // i32_ge_u = 0x4f,\r\n // i64_eqz = 0x50,\r\n // i64_eq = 0x51,\r\n // i64_ne = 0x52,\r\n // i64_lt_s = 0x53,\r\n // i64_lt_u = 0x54,\r\n // i64_gt_s = 0x55,\r\n // i64_gt_u = 0x56,\r\n // i64_le_s = 0x57,\r\n // i64_le_u = 0x58,\r\n // i64_ge_s = 0x59,\r\n // i64_ge_u = 0x5a,\r\n // f32_eq = 0x5b,\r\n // f32_ne = 0x5c,\r\n // f32_lt = 0x5d,\r\n // f32_gt = 0x5e,\r\n // f32_le = 0x5f,\r\n // f32_ge = 0x60,\r\n // f64_eq = 0x61,\r\n // f64_ne = 0x62,\r\n // f64_lt = 0x63,\r\n // f64_gt = 0x64,\r\n // f64_le = 0x65,\r\n // f64_ge = 0x66,\r\n // i32_clz = 0x67,\r\n // i32_ctz = 0x68,\r\n // i32_popcnt = 0x69,\r\n // i32_add = 0x6a,\r\n // i32_sub = 0x6b,\r\n // i32_mul = 0x6c,\r\n // i32_div_s = 0x6d,\r\n // i32_div_u = 0x6e,\r\n // i32_rem_s = 0x6f,\r\n // i32_rem_u = 0x70,\r\n // i32_and = 0x71,\r\n // i32_or = 0x72,\r\n // i32_xor = 0x73,\r\n // i32_shl = 0x74,\r\n // i32_shr_s = 0x75,\r\n // i32_shr_u = 0x76,\r\n // i32_rotl = 0x77,\r\n // i32_rotr = 0x78,\r\n // i64_clz = 0x79,\r\n // i64_ctz = 0x7a,\r\n // i64_popcnt = 0x7b,\r\n // i64_add = 0x7c,\r\n // i64_sub = 0x7d,\r\n // i64_mul = 0x7e,\r\n // i64_div_s = 0x7f,\r\n // i64_div_u = 0x80,\r\n // i64_rem_s = 0x81,\r\n // i64_rem_u = 0x82,\r\n // i64_and = 0x83,\r\n // i64_or = 0x84,\r\n // i64_xor = 0x85,\r\n // i64_shl = 0x86,\r\n // i64_shr_s = 0x87,\r\n // i64_shr_u = 0x88,\r\n // i64_rotl = 0x89,\r\n // i64_rotr = 0x8a,\r\n // f32_abs = 0x8b,\r\n // f32_neg = 0x8c,\r\n // f32_ceil = 0x8d,\r\n // f32_floor = 0x8e,\r\n // f32_trunc = 0x8f,\r\n // f32_nearest = 0x90,\r\n // f32_sqrt = 0x91,\r\n // f32_add = 0x92,\r\n // f32_sub = 0x93,\r\n // f32_mul = 0x94,\r\n // f32_div = 0x95,\r\n // f32_min = 0x96,\r\n // f32_max = 0x97,\r\n // f32_copysign = 0x98,\r\n // f64_abs = 0x99,\r\n // f64_neg = 0x9a,\r\n // f64_ceil = 0x9b,\r\n // f64_floor = 0x9c,\r\n // f64_trunc = 0x9d,\r\n // f64_nearest = 0x9e,\r\n // f64_sqrt = 0x9f,\r\n // f64_add = 0xa0,\r\n // f64_sub = 0xa1,\r\n // f64_mul = 0xa2,\r\n // f64_div = 0xa3,\r\n // f64_min = 0xa4,\r\n // f64_max = 0xa5,\r\n // f64_copysign = 0xa6,\r\n // i32_wrap_i64 = 0xa7,\r\n // i32_trunc_s_f32 = 0xa8,\r\n // i32_trunc_u_f32 = 0xa9,\r\n // i32_trunc_s_f64 = 0xaa,\r\n // i32_trunc_u_f64 = 0xab,\r\n // i64_extend_s_i32 = 0xac,\r\n // i64_extend_u_i32 = 0xad,\r\n // i64_trunc_s_f32 = 0xae,\r\n // i64_trunc_u_f32 = 0xaf,\r\n // i64_trunc_s_f64 = 0xb0,\r\n // i64_trunc_u_f64 = 0xb1,\r\n // f32_convert_s_i32 = 0xb2,\r\n // f32_convert_u_i32 = 0xb3,\r\n // f32_convert_s_i64 = 0xb4,\r\n // f32_convert_u_i64 = 0xb5,\r\n // f32_demote_f64 = 0xb6,\r\n // f64_convert_s_i32 = 0xb7,\r\n // f64_convert_u_i32 = 0xb8,\r\n // f64_convert_s_i64 = 0xb9,\r\n // f64_convert_u_i64 = 0xba,\r\n // f64_promote_f32 = 0xbb,\r\n // i32_reinterpret_f32 = 0xbc,\r\n // i64_reinterpret_f64 = 0xbd,\r\n // f32_reinterpret_i32 = 0xbe,\r\n // f64_reinterpret_i64 = 0xbf\r\n})(Opcode = exports.Opcode || (exports.Opcode = {}));\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/parse/package.json b/lib/parse/package.json deleted file mode 100644 index f91a68c569..0000000000 --- a/lib/parse/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "@assemblyscript/parse", - "version": "1.0.0", - "license": "Apache-2.0", - "main": "index.js", - "types": "index.d.ts", - "scripts": { - "asbuild": "asc assembly/index.ts -O3 -b build/index.wasm -t build/index.wat --importMemory --runtime none --sourceMap", - "build": "npm run asbuild && webpack --mode production --display-modules", - "test": "ts-node tests/" - }, - "files": [ - "package.json", - "index.d.ts", - "index.js", - "index.js.map", - "src/", - "README.md" - ], - "dependencies": {}, - "devDependencies": { - "@types/webassembly-js-api": "0.0.1", - "assemblyscript": "AssemblyScript/assemblyscript", - "ts-loader": "^5.2.1", - "ts-node": "^6.2.0", - "typescript": "^3.1.2", - "webpack": "^4.20.2", - "webpack-cli": "^3.1.2" - } -} diff --git a/lib/parse/src/common.ts b/lib/parse/src/common.ts deleted file mode 100644 index e45100db5f..0000000000 --- a/lib/parse/src/common.ts +++ /dev/null @@ -1,225 +0,0 @@ -/** Common constants shared between AssemblyScript and TypeScript. */ - -/** WebAssembly types. */ -export enum Type { - i32 = 0x7f, - i64 = 0x7e, - f32 = 0x7d, - f64 = 0x7c, - anyfunc = 0x70, - func = 0x60, - none = 0x40 -} - -/** WebAssembly section ids. */ -export enum SectionId { - Custom = 0, - Type = 1, - Import = 2, - Function = 3, - Table = 4, - Memory = 5, - Global = 6, - Export = 7, - Start = 8, - Element = 9, - Code = 10, - Data = 11 -} - -/** WebAssembly external kinds. */ -export enum ExternalKind { - Function = 0, - Table = 1, - Memory = 2, - Global = 3 -} - -/** Name section types. */ -export enum NameType { - Module = 0, - Function = 1, - Local = 2 -} - -/** Maximum number of memory pages. */ -export const MAX_PAGES = 0xffff; - -/** Maximum number of table elements. */ -export const MAX_ELEMS = 0xffffffff; - -/** WebAssembly opcodes. */ -export enum Opcode { // just a few of these are actually used - // unreachable = 0x00, - // nop = 0x01, - // block = 0x02, - // loop = 0x03, - // if_ = 0x04, - // else_ = 0x05, - end = 0x0b, - // br = 0x0c, - // br_if = 0x0d, - // br_table = 0x0e, - // return_ = 0x0f, - // call = 0x10, - // call_indirect = 0x11, - // drop = 0x1a, - // select = 0x1b, - // get_local = 0x20, - // set_local = 0x21, - // tee_local = 0x22, - get_global = 0x23, - // set_global = 0x24, - // i32_load = 0x28, - // i64_load = 0x29, - // f32_load = 0x2a, - // f64_load = 0x2b, - // i32_load8_s = 0x2c, - // i32_load8_u = 0x2d, - // i32_load16_s = 0x2e, - // i32_load16_u = 0x2f, - // i64_load8_s = 0x30, - // i64_load8_u = 0x31, - // i64_load16_s = 0x32, - // i64_load16_u = 0x33, - // i64_load32_s = 0x34, - // i64_load32_u = 0x35, - // i32_store = 0x36, - // i64_store = 0x37, - // f32_store = 0x38, - // f64_store = 0x39, - // i32_store8 = 0x3a, - // i32_store16 = 0x3b, - // i64_store8 = 0x3c, - // i64_store16 = 0x3d, - // i64_store32 = 0x3e, - // current_memory = 0x3f, - // grow_memory = 0x40, - i32_const = 0x41, - i64_const = 0x42, - f32_const = 0x43, - f64_const = 0x44 - // i32_eqz = 0x45, - // i32_eq = 0x46, - // i32_ne = 0x47, - // i32_lt_s = 0x48, - // i32_lt_u = 0x49, - // i32_gt_s = 0x4a, - // i32_gt_u = 0x4b, - // i32_le_s = 0x4c, - // i32_le_u = 0x4d, - // i32_ge_s = 0x4e, - // i32_ge_u = 0x4f, - // i64_eqz = 0x50, - // i64_eq = 0x51, - // i64_ne = 0x52, - // i64_lt_s = 0x53, - // i64_lt_u = 0x54, - // i64_gt_s = 0x55, - // i64_gt_u = 0x56, - // i64_le_s = 0x57, - // i64_le_u = 0x58, - // i64_ge_s = 0x59, - // i64_ge_u = 0x5a, - // f32_eq = 0x5b, - // f32_ne = 0x5c, - // f32_lt = 0x5d, - // f32_gt = 0x5e, - // f32_le = 0x5f, - // f32_ge = 0x60, - // f64_eq = 0x61, - // f64_ne = 0x62, - // f64_lt = 0x63, - // f64_gt = 0x64, - // f64_le = 0x65, - // f64_ge = 0x66, - // i32_clz = 0x67, - // i32_ctz = 0x68, - // i32_popcnt = 0x69, - // i32_add = 0x6a, - // i32_sub = 0x6b, - // i32_mul = 0x6c, - // i32_div_s = 0x6d, - // i32_div_u = 0x6e, - // i32_rem_s = 0x6f, - // i32_rem_u = 0x70, - // i32_and = 0x71, - // i32_or = 0x72, - // i32_xor = 0x73, - // i32_shl = 0x74, - // i32_shr_s = 0x75, - // i32_shr_u = 0x76, - // i32_rotl = 0x77, - // i32_rotr = 0x78, - // i64_clz = 0x79, - // i64_ctz = 0x7a, - // i64_popcnt = 0x7b, - // i64_add = 0x7c, - // i64_sub = 0x7d, - // i64_mul = 0x7e, - // i64_div_s = 0x7f, - // i64_div_u = 0x80, - // i64_rem_s = 0x81, - // i64_rem_u = 0x82, - // i64_and = 0x83, - // i64_or = 0x84, - // i64_xor = 0x85, - // i64_shl = 0x86, - // i64_shr_s = 0x87, - // i64_shr_u = 0x88, - // i64_rotl = 0x89, - // i64_rotr = 0x8a, - // f32_abs = 0x8b, - // f32_neg = 0x8c, - // f32_ceil = 0x8d, - // f32_floor = 0x8e, - // f32_trunc = 0x8f, - // f32_nearest = 0x90, - // f32_sqrt = 0x91, - // f32_add = 0x92, - // f32_sub = 0x93, - // f32_mul = 0x94, - // f32_div = 0x95, - // f32_min = 0x96, - // f32_max = 0x97, - // f32_copysign = 0x98, - // f64_abs = 0x99, - // f64_neg = 0x9a, - // f64_ceil = 0x9b, - // f64_floor = 0x9c, - // f64_trunc = 0x9d, - // f64_nearest = 0x9e, - // f64_sqrt = 0x9f, - // f64_add = 0xa0, - // f64_sub = 0xa1, - // f64_mul = 0xa2, - // f64_div = 0xa3, - // f64_min = 0xa4, - // f64_max = 0xa5, - // f64_copysign = 0xa6, - // i32_wrap_i64 = 0xa7, - // i32_trunc_s_f32 = 0xa8, - // i32_trunc_u_f32 = 0xa9, - // i32_trunc_s_f64 = 0xaa, - // i32_trunc_u_f64 = 0xab, - // i64_extend_s_i32 = 0xac, - // i64_extend_u_i32 = 0xad, - // i64_trunc_s_f32 = 0xae, - // i64_trunc_u_f32 = 0xaf, - // i64_trunc_s_f64 = 0xb0, - // i64_trunc_u_f64 = 0xb1, - // f32_convert_s_i32 = 0xb2, - // f32_convert_u_i32 = 0xb3, - // f32_convert_s_i64 = 0xb4, - // f32_convert_u_i64 = 0xb5, - // f32_demote_f64 = 0xb6, - // f64_convert_s_i32 = 0xb7, - // f64_convert_u_i32 = 0xb8, - // f64_convert_s_i64 = 0xb9, - // f64_convert_u_i64 = 0xba, - // f64_promote_f32 = 0xbb, - // i32_reinterpret_f32 = 0xbc, - // i64_reinterpret_f64 = 0xbd, - // f32_reinterpret_i32 = 0xbe, - // f64_reinterpret_i64 = 0xbf -} diff --git a/lib/parse/src/index.ts b/lib/parse/src/index.ts deleted file mode 100644 index ebd48a3541..0000000000 --- a/lib/parse/src/index.ts +++ /dev/null @@ -1,165 +0,0 @@ -import { Type, SectionId, ExternalKind } from "./common"; -export { Type, SectionId, ExternalKind }; - -/** Cached compiled parser. */ -var compiled: WebAssembly.Module | null = null; - -declare var WASM_DATA: string; // injected by webpack -if (typeof WASM_DATA !== "string") { - // eslint-disable-next-line @typescript-eslint/no-var-requires - WASM_DATA = require("fs").readFileSync(__dirname + "/../build/index.wasm", "base64"); -} - -/** Options specified to the parser. The `onSection` callback determines the sections being evaluated in detail. */ -export interface ParseOptions { - /** Called with each section in the binary. Returning `true` evaluates the section. */ - onSection?(id: SectionId, payloadOff: number, payloadLen: number, nameOff: number, nameLen: number): boolean; - /** Called with each function type if the type section is evaluated. */ - onType?(index: number, form: number): void; - /** Called with each function parameter if the type section is evaluated. */ - onTypeParam?(index: number, paramIndex: number, paramType: Type): void; - /** Called with each function return type if the type section is evaluated. */ - onTypeReturn?(index: number, returnIndex: number, returnType: Type): void; - /** Called with each import if the import section is evaluated. */ - onImport?(index: number, kind: ExternalKind, moduleOff: number, moduleLen: number, fieldOff: number, fieldLen: number): void; - /** Called with each function import if the import section is evaluated. */ - onFunctionImport?(index: number, type: number): void; - /** Called with each table import if the import section is evaluated. */ - onTableImport?(index: number, type: Type, initial: number, maximum: number, flags: number): void; - /** Called with each memory import if the import section is evaluated. */ - onMemoryImport?(index: number, initial: number, maximum: number, flags: number): void; - /** Called with each global import if the import section is evaluated. */ - onGlobalImport?(index: number, type: Type, mutability: number): void; - /** Called with each memory if the memory section is evaluated.*/ - onMemory?(index: number, initial: number, maximum: number, flags: number): void; - /** Called with each function if the function section is evaluated. */ - onFunction?(index: number, typeIndex: number): void; - /** Called with each table if the table section is evaluated.*/ - onTable?(index: number, type: Type, initial: number, maximum: number, flags: number): void; - /** Called with each global if the global section is evaluated. */ - onGlobal?(index: number, type: Type, mutability: number): void; - /** Called with the start function index if the start section is evaluated. */ - onStart?(index: number): void; - /** Called with each export if the export section is evaluated. */ - onExport?(index: number, kind: ExternalKind, kindIndex: number, nameOff: number, nameLen: number): void; - /** Called with the source map URL if the 'sourceMappingURL' section is evaluated. */ - onSourceMappingURL?(offset: number, length: number): void; - /** Called with the module name if present and the 'name' section is evaluated. */ - onModuleName?(offset: number, length: number): void; - /** Called with each function name if present and the 'name' section is evaluated. */ - onFunctionName?(index: number, offset: number, length: number): void; - /** Called with each local name if present and the 'name' section is evaluated. */ - onLocalName?(funcIndex: number, index: number, offset: number, length: number): void; -} - -/** Parses the contents of a WebAssembly binary according to the specified options. */ -export function parse(binary: Uint8Array, options?: ParseOptions): void { - if (!options) options = {}; - - // compile the parser if not yet compiled - if (!compiled) compiled = new WebAssembly.Module(base64_decode(WASM_DATA)); - - // use the binary as the parser's memory - var nBytes = binary.length; - var nPages = ((nBytes + 0xffff) & ~0xffff) >> 16; - var memory = new WebAssembly.Memory({ initial: nPages }); - var buffer = new Uint8Array(memory.buffer); - buffer.set(binary); - - // provide a way to read strings from memory - parse.readString = (offset: number, length: number): string => utf8_read(buffer, offset, offset + length); - - // instantiate the parser and return its exports - var imports = { - env: { - memory - }, - options: {} - }; - [ "onSection", - "onType", - "onTypeParam", - "onTypeReturn", - "onImport", - "onFunctionImport", - "onTableImport", - "onMemoryImport", - "onGlobalImport", - "onMemory", - "onFunction", - "onTable", - "onGlobal", - "onExport", - "onStart", - "onSourceMappingURL", - "onModuleName", - "onFunctionName", - "onLocalName" - ].forEach((name: string) => imports.options[name] = options[name] || function() { /* nop */ }); - var instance = new WebAssembly.Instance(compiled, imports); - instance.exports.parse(0, nBytes); -} - -export declare namespace parse { - /** Utility function for reading an UTF8 encoded string from memory while parsing. */ - function readString(offset: number, length: number): string; -} - -// see: https://github.com/dcodeIO/protobuf.js/tree/master/lib/utf8 -function utf8_read(buffer: Uint8Array, start: number, end: number): string { - var len = end - start; - if (len < 1) return ""; - var parts: string[] | null = null, chunk: number[] = []; - var i = 0, t = 0; // char offset and temporary - while (start < end) { - t = buffer[start++]; - if (t < 128) { - chunk[i++] = t; - } else if (t > 191 && t < 224) { - chunk[i++] = (t & 31) << 6 | buffer[start++] & 63; - } else if (t > 239 && t < 365) { - t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000; - chunk[i++] = 0xD800 + (t >> 10); - chunk[i++] = 0xDC00 + (t & 1023); - } else { - chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63; - } - if (i > 8191) { - (parts || (parts = [])).push(String.fromCharCode(...chunk)); - i = 0; - } - } - if (parts) { - if (i) parts.push(String.fromCharCode(...chunk.slice(0, i))); - return parts.join(""); - } - return String.fromCharCode(...chunk.slice(0, i)); -} - -// see: https://github.com/dcodeIO/protobuf.js/tree/master/lib/base64 -function base64_decode(string: string): Uint8Array { - var length = string.length; - if (length) { - let n = 0, p = length; - while (--p % 4 > 1 && string.charCodeAt(p) === 61) ++n; - length = Math.ceil(length * 3) / 4 - n; - } - var buffer = new Uint8Array(length); - var j = 0, o = 0, t = 0; - for (let i = 0, k = string.length; i < k;) { - let c = string.charCodeAt(i++); - if (c === 61 && j > 1) break; - if ((c = s64[c]) === undefined) throw Error(); - switch (j) { - case 0: { t = c; j = 1; break; } - case 1: { buffer[o++] = t << 2 | (c & 48) >> 4; t = c; j = 2; break; } - case 2: { buffer[o++] = (t & 15) << 4 | (c & 60) >> 2; t = c; j = 3; break; } - case 3: { buffer[o++] = (t & 3) << 6 | c; j = 0; break; } - } - } - if (j === 1) throw Error(); - return buffer; -} - -var s64 = new Array(123); -for (let i = 0; i < 64;) s64[i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; diff --git a/lib/parse/src/tsconfig.json b/lib/parse/src/tsconfig.json deleted file mode 100644 index 6aaa787469..0000000000 --- a/lib/parse/src/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs" - }, - "include": [ - "./**/*.ts" - ] -} diff --git a/lib/parse/tests/index.ts b/lib/parse/tests/index.ts deleted file mode 100644 index 3ca12d4c62..0000000000 --- a/lib/parse/tests/index.ts +++ /dev/null @@ -1,121 +0,0 @@ -import * as fs from "fs"; -import { - Type, - SectionId, - ExternalKind, - parse -} from ".."; - -function onSection(id: SectionId, offset: number, length: number, nameOffset: number, nameLength: number): boolean { - var name = id == 0 ? "'" + parse.readString(nameOffset, nameLength) + "'" : SectionId[id]; - console.log(name + " section at " + offset + ".." + (offset + length)); - return true; -} - -function onType(index: number, form: Type): void { - console.log("- FunctionType[" + index + "]: " + Type[form]); -} - -function onTypeParam(index: number, paramIndex: number, paramType: Type): void { - console.log(" > param[" + paramIndex + "] -> " + Type[paramType]); -} - -function onTypeReturn(index: number, returnIndex: number, returnType: Type): void { - console.log(" > return[" + returnIndex + "] -> " + Type[returnType]); -} - -function onImport(index: number, kind: ExternalKind, moduleOff: number, moduleLen: number, fieldOff: number, fieldLen: number): void { - var moduleName = parse.readString(moduleOff, moduleLen); - var fieldName = parse.readString(fieldOff, fieldLen); - console.log("- Import[" + index + "]: '" + moduleName + "." + fieldName + "'"); -} - -function onFunctionImport(funIndex: number, type: number): void { - console.log(" - Function[" + funIndex + "] -> FunctionType[" + type + "]"); -} - -function onTableImport(tblIndex: number, type: Type, initial: number, maximum: number, flags: number): void { - console.log(" - Table[" + tblIndex + "] -> " + Type[type] + ": initial=" + initial + ", maximum=" + maximum); -} - -function onMemoryImport(memIndex: number, initial: number, maximum: number, flags: number): void { - console.log(" - Memory[" + memIndex + "]: initial=" + initial + ", maximum=" + maximum); -} - -function onGlobalImport(gloIndex: number, type: Type, mutability: number): void { - console.log(" - Global[" + gloIndex + "]: " + (mutability & 1 ? "mutable " : "const ") + Type[type]); -} - -function onMemory(memIndex: number, initial: number, maximum: number, flags: number): void { - console.log("- Memory[" + memIndex + "]: initial=" + initial + ", maximum=" + maximum); -} - -function onFunction(funIndex: number, typeIndex: number): void { - console.log("- Function[" + funIndex + "] -> FunctionType[" + typeIndex + "]"); -} - -function onTable(tblIndex: number, type: number, initial: number, maximum: number, flags: number): void { - console.log("- Table[" + tblIndex + "] -> " + Type[type] + ": initial=" + initial + ", maximum=" + (maximum >>> 0)); -} - -function onGlobal(gloIndex: number, type: Type, mutability: number): void { - console.log("- Global[" + gloIndex + "]: " + (mutability & 1 ? "mutable " : "const ") + Type[type]); -} - -function onStart(index: number): void { - console.log("- Start: Function[" + index + "]"); -} - -function onExport(index: number, kind: ExternalKind, kindIndex: number, fieldOffset: number, fieldLength: number): void { - var field = parse.readString(fieldOffset, fieldLength); - console.log("- Export[" + index + "], '" + field + "' -> " + ExternalKind[kind] + "[" + kindIndex + "]"); -} - -function onSourceMappingURL(offset: number, length: number): void { - var url = parse.readString(offset, length); - console.log("- sourceMap: " + url); -} - -function onModuleName(offset: number, length: number): void { - var name = parse.readString(offset, length); - console.log("- moduleName: " + name); -} - -function onFunctionName(index: number, offset: number, length: number): void { - var name = parse.readString(offset, length); - console.log(" - Function[" + index + "] name: " + name); -} - -function onLocalName(funcIndex: number, index: number, offset: number, length: number): void { - var name = parse.readString(offset, length); - console.log(" - Function[" + funcIndex + "].local[" + index + "] name: " + name); -} - -[ "../build/index.wasm", - "libm.wasm" -].forEach((filename: string): void => { - const binary: Uint8Array = fs.readFileSync(__dirname + "/" + filename); - console.log("Testing '" + filename + "' ..."); - parse(binary, { - onSection, - onType, - onTypeParam, - onTypeReturn, - onImport, - onFunctionImport, - onTableImport, - onMemoryImport, - onGlobalImport, - onMemory, - onFunction, - onTable, - onGlobal, - onStart, - onExport, - onSourceMappingURL, - onModuleName, - onFunctionName, - onLocalName - }); - console.log(); -}); diff --git a/lib/parse/tests/libm.wasm b/lib/parse/tests/libm.wasm deleted file mode 100644 index 44467da623583daa1db300cf52d7faed4a0a6fdb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10175 zcmdT~dz4kxdEe*kbMBp)Gmpzd5RGx)6Erjk@-V&v+ej6`7-Pn8Ymw1rv@J5*)Nec5=(va9cmsyd`53eS zA5%RTH*^mg(HMqoZZIQNSJuV~EB|=tmnw>O-a&iVf@hxF(_qT>iJQ*!*N#1&qyFmm zuD;~%!$)Pif79q?w_NgT*}im4;r9Q|mdp9Ce6D@@W4@ZN+P}&<>1WN+#x%~X*>lE^ z;|8BSX971cdi1xs6X>sGE|itR>4PwE&Fsq5^5(|YHA|VWSKPU_v4y$T%GIr_ z*r)ia#yi+Z8^7bnv8&~CE&H^E_X+F|`0Bb1>@$2d5F5?cHvTyqV=E}vTI*Kcv4)M~ zg!3@G0LKZ|x+dT@krU#>EQ$AL?Uv@&HA~p_snyF?H#XmCvWlKrH`q+D9nSp*9)$(+ zb1;YIJ&hmo!9RYjNWFz^)eByDnR-9>;EHEPZF-z~w|&QG?L9Grddq)(w(4Ieo4L@B zzXc^3eKb64%zdBu^v%2n&40LW;iK<;hUL**XxxAKs?>1;wdtX;dk%j0>3Ds&^NeYl z?Pi-``)b9uov!H(;FE504X>l4XMoSO@*-+BV9w6wY3MM$E7x23f|iyVC&GcTlBU2h zgYFtfF7FuNGa^VG@9@vZi%;jULcuvr2S|T$=)|kP`Q=HpSgCQM)%6x~$9Pf@KWB!x&`X2VsITy(7n2#~Ra6$XL}%kTF6 z&`ANkjOo11Id3;MT5X<@H4+-0+44a@pW$+=U2t0>?|4R&q#RN8ZlWsF7!>PD-WVg2 z0k}p=b(o&f0)})PN)s7DW&r)(*+czzgOnblt+Td6I}!M_1YhHT^dNL19{xVpA|`vs z_Fq-+a&PE*Zy?GuGkbHw4)KSG^Rp*z`e1S>(!MWJ0g%F6#(Jfx41MQO&0sKBQBP?G zi@9q+86xglwZ_(3HZLK1kvJJDB_Ngg2xGmOSyOIET)J&)810cYh!rKg)USNH6e_Th zHnIg*J4ciw{R7uctd%S_yrHec;`*$a(AM}r@yeAf$fnL`SX!iGhNZ>F%OP`b!XM2X z^p$c4K5!$c-F4e)A#AQu+fjCVi8l4+f|$DJwL?uaFePeYM(B6>8Hs zHq7LILd=TiB+Fr-6GO{kslh72{cc$N3qZjz3=a@fo%|!qp&VGSpq?A`#1`UJoU?9PeY1%86CvSe2U~mH&TP=GpE#XO_ zkUz0x_+3d8^Q|l+{p7W5J`67Fv~dD;gbL?A`y4+^Rt2Vklr?e3z9lWYV2hO#h?zp? zOn6k(Y&e~BNR(kn`rwYRhMFA^5w+ZFCp*J-5K%Dj1M<;rviY!Vl4FVRmwb%RqNRm; z{ccH9xFcKXTUHPf&BvPuzEI z-u>6wUr-zc>RE;FefTiE#>+)Cn}&U=|D~qqskyqd<;h<>^)xj*&%QN(%v-yudF`tD zYYKlC7ULL9stUW6$Vx&iEI&llV&+S~!l~1vGjD1*^)R?Gug~UNL4CgT72TI-Y=s0 zYIb6K+Z!e!5H*2-eQ_u(`e1(4>WBfJe+--hcy)++VJR;J(rZj3^8dyI+90lE87(3( zdeC!A`L2sT1E~im?YDQlGk_+6qY$tqjNnx$YA&_JQH&kQ5;23#fY;TgO-6F(uA;n&No&m4c-v2&J#5yKWmGS(ne|TA z5T;B#aP*Fj_RYeeKzd72T095{>n6Jg6)rqqq-8bg_Z2#fH&uRRh|NY(9*i%uUtUPa7o7}JsnGTuNZsa?havbgpq&e6P zO+bkvnZXVvu#Y%t{O-DAufq}hAG4$UhZKmC3uzb9n@OcCmrtI{!Qn(F2Q3X z(Fd^v7wFa3NLMojNJ2M?%Zl0z<{_KI1n`{fU-lRloAMA zqyuC=0Xk@g*A9CUpIx3x$2`3`%EArLAmgLCbELQ=p3iy!O%L?uN^|YlyOZGucA-z8 zcGnK1+iI`dT11Xvct$-pWVjiqOj5Jt-(o>4Dl z(F4D23^THZBLkvM8z@-Na57B6=}*@K&Tk#V41%LFy_k-nbIde(NhwE$kQ}Fu4cE6` zdU(tEdiWa@4|JY4Zp`bM8GqSR!e|&Vl7v_zVK0?V&b8W0RZ7zcVaGT9UC==Rm&zL) zw={(dThpl>Hc@g+u z^VU^Q*8kBU%q*O2c=e#S@45YG9(jC!^U52RPl*)>+N&jrgf!?D7L@`>=1gt4(ac=x zjFPfY_|i`=yJWfeYCgz}h|by5?iw0KPkZP*VwmJWD9IuE%MaV^nv{Y_&j3yzcvA-2 zd39bHm&bw``&&9@X1I%^YVa%{&jLZhZmCZMYzty+J%%a@%Zw<|1~?EO))c*$shs0- z^%$WZ!=-h9RQ^8e+)HH-j=I+Q_(NIGJ&;XNUkWuK8;YEkC7xo|5H>$^J--T0N~CPP|CW`(?fQKBP@Y*B}6W4<Cg^VtJK4Ce)M}@jQpMXo(kcM zVPjH}CPVR3s2-C_O2a54ADEvK))HT#ykIU%ipX|SM7EP6vi*@FvYix>?WBlof24@) z11AVvnM6#;YcwF_10CS%7g%^=?Elz5qv|qoT#frOL<4huNQL6;C>c`=;~UZQac9dQ zUJmb3CN#7Gv7rWPvIIh_J36g7xS24s6(EI##_^7(DoDF2 zZzx%K%ezjb8rHkEe6|P+&cZVVf`um7c0@`Rd0(u;tX9mTXN#b;w`3MYLP*fnOm#9W zQinvyQQn-q5e{V@!xe`xbX0*XrpAtXwRkavAf2e4F+J&2J7tIZDCE*4n7qvCnf#ES zrb>Sq9lwK4BE5y~8Q|0d5)lrp3ttn;pF58xN`MqCD}bV= z@MtUBHtF3PHik*dM)$&Bo;q;lnr|Qqi(4gI5q4^;|2Kq6ja)8pt3*{8y&}S@itcey zg{+EtkL1Dt-z?d9wumm)vBDjM@xt4Gddm6s?Nbm%#Bp*MxP$%JA7!h>U{Ngw;mQrQ zS5rv^an+lJH;qPqYUozV+uAION;E6J<&osdHMy$j!kb|vEboCm)w8X34>E0eXZ~&M zt!T^8$bbiqwrI$552a{CZ~#o9YRzWBqw<5^_LQ#WLE=)E!$-M;V!A-6PzZJhhwhN% zFjeT~p3y4x!ED9@6`hnfxJBL&7Tsz{R{#YVB8G%+Mr6VQpGco~aw1b0_*Uc5XICGk z=I5_|aNdFiAaSN(cvn2JsO3l0Tz2&3?K8K&Ld_F%rp+9+@la_=7jy*4MKvxJfCl&h zH&G>qpxW!|^OWV$1J-1GQJJv7t&R>=mJdXR@T2$M^6&o#_y~C5B*Ozo8vFkC_j<4lnas4 zv4spYBmxF=ixpYP3#t~h)rjQvYm-1L?7b8#FEW>ej07m%)I_|47J$MDZ(L;nrs6+rNJtDw3&cCV z4GdubZd&y>m33bfsM|nrTo_~ehFBQqu2qFNcdbft*Qz9Ut-4U|3YKfBWqIVTg8>(U z2ayM}LLVj{FUn%zs6$)oVIN>J*lgJDO3G^C8Dh1!l-fIPWt@Us%RO{wQsY+3?aXS3%lX=VqDv zyE4DS7K{OA3=R=P)MgB*>i#170pxi_KvVbk=Aev{mWn?4Xnt=oYZ28*h2%$-43HF4 z45&&5GRwyW?QjYKNobS*t)c5*C=g0CDELYgVOLPu#aZY_BbCE_HE~B3cuTvfLXa%9 zuqJa^^v^EiWoe+x`M|(Mr7Uc?TvmADM9#sNQ=-o!d_UN^bwJi}2-73?TC)<;lo&hK zjjLmYZ%MT Date: Tue, 7 Dec 2021 03:20:23 +0100 Subject: [PATCH 106/175] enable incremental builds when watching --- scripts/build.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build.js b/scripts/build.js index 5dec866cac..e2ed22bf1f 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -214,6 +214,7 @@ const srcBuild = esbuild.build({ js: prelude("The AssemblyScript compiler") }, watch, + incremental: watch, plugins: [ diagnosticsPlugin, reportPlugin("src") ] }); From e39d9aef9608c2827ea75cf9aac6369f3821784e Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 7 Dec 2021 04:03:43 +0100 Subject: [PATCH 107/175] harden transforms --- package.json | 3 +- scripts/build-dts.js | 6 +++ tests/transform/index.js | 44 ++++++++++++++++++- .../transform/{index.cjs => legacy/index.js} | 6 ++- tests/transform/legacy/package.json | 3 ++ 5 files changed, 57 insertions(+), 5 deletions(-) rename tests/transform/{index.cjs => legacy/index.js} (63%) create mode 100644 tests/transform/legacy/package.json diff --git a/package.json b/package.json index 1afaf33339..0c894dab81 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ }, "./transform": { "import": "./dist/transform.js", + "require": "./dist/transform.cjs", "types": "./dist/transform.d.ts" }, "./binaryen": { @@ -71,7 +72,7 @@ "test:packages": "cd tests/packages && npm run test", "test:extension": "cd tests/extension && npm run test", "test:asconfig": "cd tests/asconfig && npm run test", - "test:transform": "node bin/asc tests/compiler/empty --transform ./tests/transform/index.js --noEmit && node bin/asc tests/compiler/empty --transform ./tests/transform/index.cjs --noEmit", + "test:transform": "node bin/asc tests/compiler/empty --transform ./tests/transform/index.js --noEmit && node bin/asc tests/compiler/empty --transform ./tests/transform/legacy/index.js --noEmit", "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized", "asbuild:untouched": "node bin/asc --config src/asconfig.json --target untouched", "asbuild:optimized": "node bin/asc --config src/asconfig.json --target optimized", diff --git a/scripts/build-dts.js b/scripts/build-dts.js index 49ddcdc0a0..477724d578 100644 --- a/scripts/build-dts.js +++ b/scripts/build-dts.js @@ -563,6 +563,12 @@ function generateTransform() { `export function Transform() { /* stub */ }\n` ].join("") ); + fs.writeFileSync( + pathUtil.resolve(__dirname, "..", "dist", "transform.cjs"), + [ + `module.exports = function Transform() { /* stub */ }\n` + ].join("") + ); fs.writeFileSync( pathUtil.resolve(__dirname, "..", "dist", "transform.d.ts"), [ diff --git a/tests/transform/index.js b/tests/transform/index.js index f6148b79a3..2c7cbf9b9a 100644 --- a/tests/transform/index.js +++ b/tests/transform/index.js @@ -1,17 +1,57 @@ +import assert from "assert"; import { Transform } from "../../dist/transform.js"; +var afterParseCalled = false; +var afterInitializeCalled = false; +var afterCompileCalled = false; + export default class MyTransform extends Transform { constructor() { super(); - this.log("ESM transform loaded"); + check(this); + this.log("Transform loaded"); } - afterParse() { + async afterParse() { + check(this); + assert(!afterParseCalled && !afterInitializeCalled && !afterCompileCalled); + afterParseCalled = true; this.log("- afterParse"); + await defer(); + await defer(); + await defer(); + this.log(" complete"); + assert(afterParseCalled && !afterInitializeCalled && !afterCompileCalled); } afterInitialize() { + check(this); + assert(afterParseCalled && !afterInitializeCalled && !afterCompileCalled); + afterInitializeCalled = true; this.log("- afterInitialize"); + assert(afterParseCalled && afterInitializeCalled && !afterCompileCalled); + return defer(); } afterCompile() { + check(this); + assert(afterParseCalled && afterInitializeCalled && !afterCompileCalled); + afterCompileCalled = true; this.log("- afterCompile"); } } + +function check(transform) { + assert(typeof transform.program === "object" && transform.program !== null); + assert(typeof transform.baseDir === "string"); + assert(typeof transform.stdout === "object" && transform.stdout !== null); + assert(typeof transform.stderr === "object" && transform.stderr !== null); + assert(typeof transform.log === "function"); + assert(typeof transform.readFile === "function"); + assert(typeof transform.writeFile === "function"); + assert(typeof transform.listFiles === "function"); +} + +function defer() { + return new Promise((resolve, reject) => { + console.log(" defer"); + setTimeout(() => { console.log(" resolve"); resolve(); }, 100); + }); +} diff --git a/tests/transform/index.cjs b/tests/transform/legacy/index.js similarity index 63% rename from tests/transform/index.cjs rename to tests/transform/legacy/index.js index 4aabfac4d6..30085c85f7 100644 --- a/tests/transform/index.cjs +++ b/tests/transform/legacy/index.js @@ -1,9 +1,11 @@ -/* global module */ +var Transform = require("../../../dist/transform.cjs"); function MyTransform() { - this.log("CJS transform loaded"); + this.log("Legacy transform loaded"); } +(MyTransform.prototype = Object.create(Transform.prototype)).constructor = Transform; + MyTransform.prototype.afterParse = function() { this.log("- afterParse"); }; diff --git a/tests/transform/legacy/package.json b/tests/transform/legacy/package.json new file mode 100644 index 0000000000..c9a4422614 --- /dev/null +++ b/tests/transform/legacy/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} \ No newline at end of file From d46eb6896dd8b1d501f03ebf9541ba45724f63f8 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 7 Dec 2021 04:32:13 +0100 Subject: [PATCH 108/175] make sure it's super duper --- cli/index.js | 31 ++++++++++++++-------------- package.json | 2 +- tests/transform/legacy/superduper.js | 18 ++++++++++++++++ 3 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 tests/transform/legacy/superduper.js diff --git a/cli/index.js b/cli/index.js index a8153dcabd..09ee11b9a2 100644 --- a/cli/index.js +++ b/cli/index.js @@ -477,7 +477,7 @@ export async function main(argv, options) { return prepareResult(e); } } - if (typeof transform !== "function") { + if (!transform || (typeof transform !== "function" && typeof transform !== "object")) { return prepareResult(Error("not a transform: " + transformArgs[i])); } transforms.push(transform); @@ -486,22 +486,21 @@ export async function main(argv, options) { // Fix up the prototype of the transforms’ constructors and instantiate them. try { - transforms = transforms.map(classOrModule => { - // Except if it’s a legacy module, just pass it through. - if (typeof classOrModule !== "function") { - return classOrModule; + transforms = transforms.map(transform => { + if (typeof transform === "function") { + Object.assign(transform.prototype, { + program, + baseDir, + stdout, + stderr, + log: console.error, + readFile, + writeFile, + listFiles + }); + transform = new transform(); } - Object.assign(classOrModule.prototype, { - program, - baseDir, - stdout, - stderr, - log: console.error, - readFile, - writeFile, - listFiles - }); - return new classOrModule(); + return transform; }); } catch (e) { return prepareResult(e); diff --git a/package.json b/package.json index 0c894dab81..cdee023be7 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "test:packages": "cd tests/packages && npm run test", "test:extension": "cd tests/extension && npm run test", "test:asconfig": "cd tests/asconfig && npm run test", - "test:transform": "node bin/asc tests/compiler/empty --transform ./tests/transform/index.js --noEmit && node bin/asc tests/compiler/empty --transform ./tests/transform/legacy/index.js --noEmit", + "test:transform": "node bin/asc tests/compiler/empty --transform ./tests/transform/index.js --noEmit && node bin/asc tests/compiler/empty --transform ./tests/transform/legacy/index.js --noEmit && node bin/asc tests/compiler/empty --transform ./tests/transform/legacy/superduper.js --noEmit", "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized", "asbuild:untouched": "node bin/asc --config src/asconfig.json --target untouched", "asbuild:optimized": "node bin/asc --config src/asconfig.json --target optimized", diff --git a/tests/transform/legacy/superduper.js b/tests/transform/legacy/superduper.js new file mode 100644 index 0000000000..56f4ec2b27 --- /dev/null +++ b/tests/transform/legacy/superduper.js @@ -0,0 +1,18 @@ +const assert = require("assert"); + +exports.afterParse = function(parser) { + assert(typeof parser === "object" && parser !== null); + console.log("- afterParse"); +}; + +exports.afterInitialize = function(program) { + assert(typeof program === "object" && program !== null); + console.log("- afterInitialize"); +}; + +exports.afterCompile = function(module) { + assert(typeof module === "object" && module !== null); + console.log("- afterCompile"); +}; + +console.log("Super duper legacy transform loaded"); From 0eba5694f81f5ad128fafaad270907956a5a73f7 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 7 Dec 2021 04:39:38 +0100 Subject: [PATCH 109/175] did this even exist by then --- tests/transform/legacy/superduper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/transform/legacy/superduper.js b/tests/transform/legacy/superduper.js index 56f4ec2b27..315f11f1c4 100644 --- a/tests/transform/legacy/superduper.js +++ b/tests/transform/legacy/superduper.js @@ -1,4 +1,4 @@ -const assert = require("assert"); +var assert = require("assert"); exports.afterParse = function(parser) { assert(typeof parser === "object" && parser !== null); From 2f1eb73e6b9981b2d94fa573f61a5f60b619010c Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 7 Dec 2021 06:09:04 +0100 Subject: [PATCH 110/175] modernize --- cli/index.js | 6 ++++-- package.json | 4 +++- tests/transform/cjs/index.js | 21 +++++++++++++++++++ tests/transform/{legacy => cjs}/package.json | 2 +- .../{legacy/superduper.js => cjs/simple.js} | 12 +++++------ tests/transform/index.js | 18 ++++++++++------ tests/transform/legacy/index.js | 21 ------------------- tests/transform/simple.js | 18 ++++++++++++++++ 8 files changed, 65 insertions(+), 37 deletions(-) create mode 100644 tests/transform/cjs/index.js rename tests/transform/{legacy => cjs}/package.json (92%) rename tests/transform/{legacy/superduper.js => cjs/simple.js} (57%) delete mode 100644 tests/transform/legacy/index.js create mode 100644 tests/transform/simple.js diff --git a/cli/index.js b/cli/index.js index 09ee11b9a2..c0f93bb73b 100644 --- a/cli/index.js +++ b/cli/index.js @@ -462,7 +462,8 @@ export async function main(argv, options) { if (require.resolve && url.pathToFileURL) { try { resolved = require.resolve(filename, { paths: [process.cwd(), baseDir] }); - transform = (await import(url.pathToFileURL(resolved))).default; + transform = await import(url.pathToFileURL(resolved)); + if (transform.default) transform = transform.default; } catch (e1) { try { transform = require(resolved); @@ -472,7 +473,8 @@ export async function main(argv, options) { } } else { try { - transform = (await import(new URL(filename, import.meta.url))).default; + transform = await import(new URL(filename, import.meta.url)); + if (transform.default) transform = transform.default; } catch (e) { return prepareResult(e); } diff --git a/package.json b/package.json index cdee023be7..3cb8b3af08 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,9 @@ "test:packages": "cd tests/packages && npm run test", "test:extension": "cd tests/extension && npm run test", "test:asconfig": "cd tests/asconfig && npm run test", - "test:transform": "node bin/asc tests/compiler/empty --transform ./tests/transform/index.js --noEmit && node bin/asc tests/compiler/empty --transform ./tests/transform/legacy/index.js --noEmit && node bin/asc tests/compiler/empty --transform ./tests/transform/legacy/superduper.js --noEmit", + "test:transform": "npm run test:transform:esm && npm run test:transform:cjs", + "test:transform:esm": "node bin/asc tests/compiler/empty --transform ./tests/transform/index.js --noEmit && node bin/asc tests/compiler/empty --transform ./tests/transform/simple.js --noEmit", + "test:transform:cjs": "node bin/asc tests/compiler/empty --transform ./tests/transform/cjs/index.js --noEmit && node bin/asc tests/compiler/empty --transform ./tests/transform/cjs/simple.js --noEmit", "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized", "asbuild:untouched": "node bin/asc --config src/asconfig.json --target untouched", "asbuild:optimized": "node bin/asc --config src/asconfig.json --target optimized", diff --git a/tests/transform/cjs/index.js b/tests/transform/cjs/index.js new file mode 100644 index 0000000000..1df40f5de4 --- /dev/null +++ b/tests/transform/cjs/index.js @@ -0,0 +1,21 @@ +const Transform = require("../../../dist/transform.cjs"); + +console.log("CommonJS transform loaded"); + +class MyTransform extends Transform { + constructor() { + super(); + this.log("- constructor"); + } + afterParse () { + this.log("- afterParse"); + } + afterInitialize() { + this.log("- afterInitialize"); + } + afterCompile() { + this.log("- afterCompile"); + } +} + +module.exports = MyTransform; diff --git a/tests/transform/legacy/package.json b/tests/transform/cjs/package.json similarity index 92% rename from tests/transform/legacy/package.json rename to tests/transform/cjs/package.json index c9a4422614..5bbefffbab 100644 --- a/tests/transform/legacy/package.json +++ b/tests/transform/cjs/package.json @@ -1,3 +1,3 @@ { "type": "commonjs" -} \ No newline at end of file +} diff --git a/tests/transform/legacy/superduper.js b/tests/transform/cjs/simple.js similarity index 57% rename from tests/transform/legacy/superduper.js rename to tests/transform/cjs/simple.js index 315f11f1c4..79ede6ad6c 100644 --- a/tests/transform/legacy/superduper.js +++ b/tests/transform/cjs/simple.js @@ -1,18 +1,18 @@ -var assert = require("assert"); +const assert = require("assert"); -exports.afterParse = function(parser) { +console.log("Simple CommonJS transform loaded"); + +exports.afterParse = (parser) => { assert(typeof parser === "object" && parser !== null); console.log("- afterParse"); }; -exports.afterInitialize = function(program) { +exports.afterInitialize = (program) => { assert(typeof program === "object" && program !== null); console.log("- afterInitialize"); }; -exports.afterCompile = function(module) { +exports.afterCompile = (module) => { assert(typeof module === "object" && module !== null); console.log("- afterCompile"); }; - -console.log("Super duper legacy transform loaded"); diff --git a/tests/transform/index.js b/tests/transform/index.js index 2c7cbf9b9a..fca2bd7fa3 100644 --- a/tests/transform/index.js +++ b/tests/transform/index.js @@ -1,38 +1,44 @@ import assert from "assert"; import { Transform } from "../../dist/transform.js"; +var constructorCalled = false; var afterParseCalled = false; var afterInitializeCalled = false; var afterCompileCalled = false; +console.log("Transform loaded"); + export default class MyTransform extends Transform { constructor() { + assert(!constructorCalled && !afterParseCalled && !afterInitializeCalled && !afterCompileCalled); + constructorCalled = true; super(); check(this); - this.log("Transform loaded"); + this.log("- constructor"); + assert(constructorCalled && !afterParseCalled && !afterInitializeCalled && !afterCompileCalled); } async afterParse() { check(this); - assert(!afterParseCalled && !afterInitializeCalled && !afterCompileCalled); + assert(constructorCalled && !afterParseCalled && !afterInitializeCalled && !afterCompileCalled); afterParseCalled = true; this.log("- afterParse"); await defer(); await defer(); await defer(); this.log(" complete"); - assert(afterParseCalled && !afterInitializeCalled && !afterCompileCalled); + assert(constructorCalled && afterParseCalled && !afterInitializeCalled && !afterCompileCalled); } afterInitialize() { check(this); - assert(afterParseCalled && !afterInitializeCalled && !afterCompileCalled); + assert(constructorCalled && afterParseCalled && !afterInitializeCalled && !afterCompileCalled); afterInitializeCalled = true; this.log("- afterInitialize"); - assert(afterParseCalled && afterInitializeCalled && !afterCompileCalled); + assert(constructorCalled && afterParseCalled && afterInitializeCalled && !afterCompileCalled); return defer(); } afterCompile() { check(this); - assert(afterParseCalled && afterInitializeCalled && !afterCompileCalled); + assert(constructorCalled && afterParseCalled && afterInitializeCalled && !afterCompileCalled); afterCompileCalled = true; this.log("- afterCompile"); } diff --git a/tests/transform/legacy/index.js b/tests/transform/legacy/index.js deleted file mode 100644 index 30085c85f7..0000000000 --- a/tests/transform/legacy/index.js +++ /dev/null @@ -1,21 +0,0 @@ -var Transform = require("../../../dist/transform.cjs"); - -function MyTransform() { - this.log("Legacy transform loaded"); -} - -(MyTransform.prototype = Object.create(Transform.prototype)).constructor = Transform; - -MyTransform.prototype.afterParse = function() { - this.log("- afterParse"); -}; - -MyTransform.prototype.afterInitialize = function() { - this.log("- afterInitialize"); -}; - -MyTransform.prototype.afterCompile = function() { - this.log("- afterCompile"); -}; - -module.exports = MyTransform; diff --git a/tests/transform/simple.js b/tests/transform/simple.js new file mode 100644 index 0000000000..352212fd78 --- /dev/null +++ b/tests/transform/simple.js @@ -0,0 +1,18 @@ +import assert from "assert"; + +console.log("Simple transform loaded"); + +export function afterParse(parser) { + assert(typeof parser === "object" && parser !== null); + console.log("- afterParse"); +} + +export function afterInitialize(program) { + assert(typeof program === "object" && program !== null); + console.log("- afterInitialize"); +} + +export function afterCompile(module) { + assert(typeof module === "object" && module !== null); + console.log("- afterCompile"); +} From 5706912a3aba53f43940093a59bf4eed02e18adf Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 9 Dec 2021 11:42:12 +0100 Subject: [PATCH 111/175] delete old packages tests --- package.json | 3 +-- tests/packages/.gitignore | 4 --- tests/packages/package.json | 17 ------------ tests/packages/packages/a/assembly/a.ts | 3 --- tests/packages/packages/a/assembly/index.ts | 1 - tests/packages/packages/as/as/as.ts | 3 --- tests/packages/packages/as/as/index.ts | 1 - tests/packages/packages/as/package.json | 3 --- tests/packages/packages/b/assembly/b.ts | 9 ------- tests/packages/packages/b/assembly/index.ts | 1 - .../packages/b/node_modules/a/assembly/a.ts | 3 --- .../b/node_modules/a/assembly/index.ts | 1 - tests/packages/packages/c/assembly/c.ts | 13 --------- tests/packages/packages/c/assembly/index.ts | 1 - .../packages/c/node_modules/b/assembly/b.ts | 9 ------- .../c/node_modules/b/assembly/index.ts | 1 - .../b/node_modules/a/assembly/a.ts | 3 --- .../b/node_modules/a/assembly/index.ts | 1 - tests/packages/packages/d/assembly/d.ts | 27 ------------------- tests/packages/packages/d/assembly/index.ts | 1 - .../d/node_modules/as/notassembly/as.ts | 3 --- .../d/node_modules/as/notassembly/index.ts | 1 - .../packages/d/node_modules/as/package.json | 3 --- .../packages/d/node_modules/c/assembly/c.ts | 13 --------- .../d/node_modules/c/assembly/index.ts | 1 - .../c/node_modules/b/assembly/b.ts | 9 ------- .../c/node_modules/b/assembly/index.ts | 1 - .../b/node_modules/a/assembly/a.ts | 3 --- .../b/node_modules/a/assembly/index.ts | 1 - .../packages/d/packages/e/assembly/e.ts | 9 ------- .../packages/d/packages/e/assembly/index.ts | 1 - .../d/packages/e/packages/f/assembly/f.ts | 3 --- .../d/packages/e/packages/f/assembly/index.ts | 1 - tests/packages/packages/g/assembly/g.ts | 10 ------- tests/packages/packages/g/assembly/index.ts | 1 - .../packages/g/node_modules/c/assembly/c.ts | 13 --------- .../g/node_modules/c/assembly/index.ts | 1 - .../c/node_modules/b/assembly/b.ts | 9 ------- .../c/node_modules/b/assembly/index.ts | 1 - .../b/node_modules/a/assembly/a.ts | 3 --- .../b/node_modules/a/assembly/index.ts | 1 - tests/packages/packages/g/test.js | 12 --------- tests/packages/packages/h/assembly/index.ts | 5 ---- .../h/node_modules/@foo/bar/assembly/index.ts | 3 --- .../node_modules/@bar/baz/assembly/index.ts | 1 - tests/packages/tsconfig.json | 4 --- 46 files changed, 1 insertion(+), 217 deletions(-) delete mode 100644 tests/packages/.gitignore delete mode 100644 tests/packages/package.json delete mode 100644 tests/packages/packages/a/assembly/a.ts delete mode 100644 tests/packages/packages/a/assembly/index.ts delete mode 100644 tests/packages/packages/as/as/as.ts delete mode 100644 tests/packages/packages/as/as/index.ts delete mode 100644 tests/packages/packages/as/package.json delete mode 100644 tests/packages/packages/b/assembly/b.ts delete mode 100644 tests/packages/packages/b/assembly/index.ts delete mode 100644 tests/packages/packages/b/node_modules/a/assembly/a.ts delete mode 100644 tests/packages/packages/b/node_modules/a/assembly/index.ts delete mode 100644 tests/packages/packages/c/assembly/c.ts delete mode 100644 tests/packages/packages/c/assembly/index.ts delete mode 100644 tests/packages/packages/c/node_modules/b/assembly/b.ts delete mode 100644 tests/packages/packages/c/node_modules/b/assembly/index.ts delete mode 100644 tests/packages/packages/c/node_modules/b/node_modules/a/assembly/a.ts delete mode 100644 tests/packages/packages/c/node_modules/b/node_modules/a/assembly/index.ts delete mode 100644 tests/packages/packages/d/assembly/d.ts delete mode 100644 tests/packages/packages/d/assembly/index.ts delete mode 100644 tests/packages/packages/d/node_modules/as/notassembly/as.ts delete mode 100644 tests/packages/packages/d/node_modules/as/notassembly/index.ts delete mode 100644 tests/packages/packages/d/node_modules/as/package.json delete mode 100644 tests/packages/packages/d/node_modules/c/assembly/c.ts delete mode 100644 tests/packages/packages/d/node_modules/c/assembly/index.ts delete mode 100644 tests/packages/packages/d/node_modules/c/node_modules/b/assembly/b.ts delete mode 100644 tests/packages/packages/d/node_modules/c/node_modules/b/assembly/index.ts delete mode 100644 tests/packages/packages/d/node_modules/c/node_modules/b/node_modules/a/assembly/a.ts delete mode 100644 tests/packages/packages/d/node_modules/c/node_modules/b/node_modules/a/assembly/index.ts delete mode 100644 tests/packages/packages/d/packages/e/assembly/e.ts delete mode 100644 tests/packages/packages/d/packages/e/assembly/index.ts delete mode 100644 tests/packages/packages/d/packages/e/packages/f/assembly/f.ts delete mode 100644 tests/packages/packages/d/packages/e/packages/f/assembly/index.ts delete mode 100644 tests/packages/packages/g/assembly/g.ts delete mode 100644 tests/packages/packages/g/assembly/index.ts delete mode 100644 tests/packages/packages/g/node_modules/c/assembly/c.ts delete mode 100644 tests/packages/packages/g/node_modules/c/assembly/index.ts delete mode 100644 tests/packages/packages/g/node_modules/c/node_modules/b/assembly/b.ts delete mode 100644 tests/packages/packages/g/node_modules/c/node_modules/b/assembly/index.ts delete mode 100644 tests/packages/packages/g/node_modules/c/node_modules/b/node_modules/a/assembly/a.ts delete mode 100644 tests/packages/packages/g/node_modules/c/node_modules/b/node_modules/a/assembly/index.ts delete mode 100644 tests/packages/packages/g/test.js delete mode 100644 tests/packages/packages/h/assembly/index.ts delete mode 100644 tests/packages/packages/h/node_modules/@foo/bar/assembly/index.ts delete mode 100644 tests/packages/packages/h/node_modules/@foo/bar/node_modules/@bar/baz/assembly/index.ts delete mode 100644 tests/packages/tsconfig.json diff --git a/package.json b/package.json index 3cb8b3af08..921412b29b 100644 --- a/package.json +++ b/package.json @@ -65,11 +65,10 @@ "lint": "eslint --max-warnings 0 --ext js . && eslint --max-warnings 0 --ext ts .", "build": "node scripts/build", "watch": "node scripts/build --watch", - "test": "npm run test:parser && npm run test:compiler -- --parallel && npm run test:browser && npm run test:packages && npm run test:extension && npm run test:asconfig && npm run test:transform", + "test": "npm run test:parser && npm run test:compiler -- --parallel && npm run test:browser && npm run test:extension && npm run test:asconfig && npm run test:transform", "test:parser": "node --enable-source-maps tests/parser", "test:compiler": "node --enable-source-maps --experimental-wasi-unstable-preview1 --no-warnings tests/compiler", "test:browser": "node --enable-source-maps tests/browser", - "test:packages": "cd tests/packages && npm run test", "test:extension": "cd tests/extension && npm run test", "test:asconfig": "cd tests/asconfig && npm run test", "test:transform": "npm run test:transform:esm && npm run test:transform:cjs", diff --git a/tests/packages/.gitignore b/tests/packages/.gitignore deleted file mode 100644 index be98dd7167..0000000000 --- a/tests/packages/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -packages/*/package-lock.json -package-lock.json -!node_modules/ -!packages/**/*/node_modules/ \ No newline at end of file diff --git a/tests/packages/package.json b/tests/packages/package.json deleted file mode 100644 index 8f58bd6be2..0000000000 --- a/tests/packages/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "type": "module", - "scripts": { - "test": "npm run a && npm run b && npm run c && npm run d && npm run e && npm run f && npm run g && npm run as && npm run h", - "a": "cd ./packages/a && node ../../../../bin/asc assembly/index.ts --noEmit", - "as": "cd ./packages/as && node ../../../../bin/asc as/index.ts --noEmit", - "b": "cd ./packages/b && node ../../../../bin/asc assembly/index.ts --noEmit && node ../../../../bin/asc assembly/index.ts --noEmit --listFiles", - "c": "cd ./packages/c && node ../../../../bin/asc assembly/index.ts --noEmit", - "d": "cd ./packages/d && node ../../../../bin/asc assembly/index.ts --path packages --noEmit --traceResolution", - "e": "cd ./packages/d/packages/e && node ../../../../../../bin/asc assembly/index.ts --noEmit", - "f": "cd ./packages/d/packages/e/packages/f && node ../../../../../../../../bin/asc assembly/index.ts --noEmit", - "g": "cd ./packages/g && node test.js", - "h": "cd ./packages/h && node ../../../../bin/asc assembly/index.ts --noEmit --traceResolution" - }, - "author": "Willem Wyndham", - "license": "Apache-2.0" -} diff --git a/tests/packages/packages/a/assembly/a.ts b/tests/packages/packages/a/assembly/a.ts deleted file mode 100644 index 3b795e86cb..0000000000 --- a/tests/packages/packages/a/assembly/a.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function A(): string { - return "A"; -} diff --git a/tests/packages/packages/a/assembly/index.ts b/tests/packages/packages/a/assembly/index.ts deleted file mode 100644 index 378dcf843c..0000000000 --- a/tests/packages/packages/a/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./a"; diff --git a/tests/packages/packages/as/as/as.ts b/tests/packages/packages/as/as/as.ts deleted file mode 100644 index 3a3f725f66..0000000000 --- a/tests/packages/packages/as/as/as.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function AS(str: string): string { - return str + "S"; -} diff --git a/tests/packages/packages/as/as/index.ts b/tests/packages/packages/as/as/index.ts deleted file mode 100644 index 74dad6ad7a..0000000000 --- a/tests/packages/packages/as/as/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./as"; diff --git a/tests/packages/packages/as/package.json b/tests/packages/packages/as/package.json deleted file mode 100644 index 1d7d981fe4..0000000000 --- a/tests/packages/packages/as/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ascMain": "as/index.ts" -} diff --git a/tests/packages/packages/b/assembly/b.ts b/tests/packages/packages/b/assembly/b.ts deleted file mode 100644 index 65b46079da..0000000000 --- a/tests/packages/packages/b/assembly/b.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { A } from "a"; - -export function B(): string { - return "B"; -} - -export function AB(): string { - return A() + B(); -} diff --git a/tests/packages/packages/b/assembly/index.ts b/tests/packages/packages/b/assembly/index.ts deleted file mode 100644 index 14065b7bb3..0000000000 --- a/tests/packages/packages/b/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./b"; diff --git a/tests/packages/packages/b/node_modules/a/assembly/a.ts b/tests/packages/packages/b/node_modules/a/assembly/a.ts deleted file mode 100644 index 3b795e86cb..0000000000 --- a/tests/packages/packages/b/node_modules/a/assembly/a.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function A(): string { - return "A"; -} diff --git a/tests/packages/packages/b/node_modules/a/assembly/index.ts b/tests/packages/packages/b/node_modules/a/assembly/index.ts deleted file mode 100644 index 378dcf843c..0000000000 --- a/tests/packages/packages/b/node_modules/a/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./a"; diff --git a/tests/packages/packages/c/assembly/c.ts b/tests/packages/packages/c/assembly/c.ts deleted file mode 100644 index f1e862d4c5..0000000000 --- a/tests/packages/packages/c/assembly/c.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { B, AB } from "b"; - -export function C(): string { - return "C"; -} - -export function BC(): string { - return B() + C(); -} - -export function ABC(): string { - return AB() + C(); -} diff --git a/tests/packages/packages/c/assembly/index.ts b/tests/packages/packages/c/assembly/index.ts deleted file mode 100644 index 6531c23265..0000000000 --- a/tests/packages/packages/c/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./c"; diff --git a/tests/packages/packages/c/node_modules/b/assembly/b.ts b/tests/packages/packages/c/node_modules/b/assembly/b.ts deleted file mode 100644 index 65b46079da..0000000000 --- a/tests/packages/packages/c/node_modules/b/assembly/b.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { A } from "a"; - -export function B(): string { - return "B"; -} - -export function AB(): string { - return A() + B(); -} diff --git a/tests/packages/packages/c/node_modules/b/assembly/index.ts b/tests/packages/packages/c/node_modules/b/assembly/index.ts deleted file mode 100644 index 14065b7bb3..0000000000 --- a/tests/packages/packages/c/node_modules/b/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./b"; diff --git a/tests/packages/packages/c/node_modules/b/node_modules/a/assembly/a.ts b/tests/packages/packages/c/node_modules/b/node_modules/a/assembly/a.ts deleted file mode 100644 index 3b795e86cb..0000000000 --- a/tests/packages/packages/c/node_modules/b/node_modules/a/assembly/a.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function A(): string { - return "A"; -} diff --git a/tests/packages/packages/c/node_modules/b/node_modules/a/assembly/index.ts b/tests/packages/packages/c/node_modules/b/node_modules/a/assembly/index.ts deleted file mode 100644 index 378dcf843c..0000000000 --- a/tests/packages/packages/c/node_modules/b/node_modules/a/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./a"; diff --git a/tests/packages/packages/d/assembly/d.ts b/tests/packages/packages/d/assembly/d.ts deleted file mode 100644 index 34974286d8..0000000000 --- a/tests/packages/packages/d/assembly/d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { C, BC, ABC } from "c"; -import { E } from "e"; -import { AS } from "as"; - -export function D(): string { - return "D"; -} - -export function CD(): string { - return C() + D(); -} - -export function BCD(): string { - return BC() + D(); -} - -export function ABCD(): string { - return ABC() + D(); -} - -export function ABCDE(): string { - return ABCD() + E(); -} - -export function ABCDS(): string { - return AS(ABCD()); -} diff --git a/tests/packages/packages/d/assembly/index.ts b/tests/packages/packages/d/assembly/index.ts deleted file mode 100644 index bc24287205..0000000000 --- a/tests/packages/packages/d/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./d"; diff --git a/tests/packages/packages/d/node_modules/as/notassembly/as.ts b/tests/packages/packages/d/node_modules/as/notassembly/as.ts deleted file mode 100644 index 3a3f725f66..0000000000 --- a/tests/packages/packages/d/node_modules/as/notassembly/as.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function AS(str: string): string { - return str + "S"; -} diff --git a/tests/packages/packages/d/node_modules/as/notassembly/index.ts b/tests/packages/packages/d/node_modules/as/notassembly/index.ts deleted file mode 100644 index 74dad6ad7a..0000000000 --- a/tests/packages/packages/d/node_modules/as/notassembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./as"; diff --git a/tests/packages/packages/d/node_modules/as/package.json b/tests/packages/packages/d/node_modules/as/package.json deleted file mode 100644 index 614a251f86..0000000000 --- a/tests/packages/packages/d/node_modules/as/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ascMain": "./notassembly/index.ts" -} diff --git a/tests/packages/packages/d/node_modules/c/assembly/c.ts b/tests/packages/packages/d/node_modules/c/assembly/c.ts deleted file mode 100644 index f1e862d4c5..0000000000 --- a/tests/packages/packages/d/node_modules/c/assembly/c.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { B, AB } from "b"; - -export function C(): string { - return "C"; -} - -export function BC(): string { - return B() + C(); -} - -export function ABC(): string { - return AB() + C(); -} diff --git a/tests/packages/packages/d/node_modules/c/assembly/index.ts b/tests/packages/packages/d/node_modules/c/assembly/index.ts deleted file mode 100644 index 6531c23265..0000000000 --- a/tests/packages/packages/d/node_modules/c/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./c"; diff --git a/tests/packages/packages/d/node_modules/c/node_modules/b/assembly/b.ts b/tests/packages/packages/d/node_modules/c/node_modules/b/assembly/b.ts deleted file mode 100644 index 65b46079da..0000000000 --- a/tests/packages/packages/d/node_modules/c/node_modules/b/assembly/b.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { A } from "a"; - -export function B(): string { - return "B"; -} - -export function AB(): string { - return A() + B(); -} diff --git a/tests/packages/packages/d/node_modules/c/node_modules/b/assembly/index.ts b/tests/packages/packages/d/node_modules/c/node_modules/b/assembly/index.ts deleted file mode 100644 index 14065b7bb3..0000000000 --- a/tests/packages/packages/d/node_modules/c/node_modules/b/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./b"; diff --git a/tests/packages/packages/d/node_modules/c/node_modules/b/node_modules/a/assembly/a.ts b/tests/packages/packages/d/node_modules/c/node_modules/b/node_modules/a/assembly/a.ts deleted file mode 100644 index 3b795e86cb..0000000000 --- a/tests/packages/packages/d/node_modules/c/node_modules/b/node_modules/a/assembly/a.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function A(): string { - return "A"; -} diff --git a/tests/packages/packages/d/node_modules/c/node_modules/b/node_modules/a/assembly/index.ts b/tests/packages/packages/d/node_modules/c/node_modules/b/node_modules/a/assembly/index.ts deleted file mode 100644 index 378dcf843c..0000000000 --- a/tests/packages/packages/d/node_modules/c/node_modules/b/node_modules/a/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./a"; diff --git a/tests/packages/packages/d/packages/e/assembly/e.ts b/tests/packages/packages/d/packages/e/assembly/e.ts deleted file mode 100644 index 5b9ffc04f8..0000000000 --- a/tests/packages/packages/d/packages/e/assembly/e.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { C } from "c"; - -export function E(): string { - return "E"; -} - -export function EC(): string { - return C() + E(); -} diff --git a/tests/packages/packages/d/packages/e/assembly/index.ts b/tests/packages/packages/d/packages/e/assembly/index.ts deleted file mode 100644 index 1b294003b9..0000000000 --- a/tests/packages/packages/d/packages/e/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./e"; diff --git a/tests/packages/packages/d/packages/e/packages/f/assembly/f.ts b/tests/packages/packages/d/packages/e/packages/f/assembly/f.ts deleted file mode 100644 index b727d02584..0000000000 --- a/tests/packages/packages/d/packages/e/packages/f/assembly/f.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function F(): string { - return "F"; -} diff --git a/tests/packages/packages/d/packages/e/packages/f/assembly/index.ts b/tests/packages/packages/d/packages/e/packages/f/assembly/index.ts deleted file mode 100644 index ec8b811dc9..0000000000 --- a/tests/packages/packages/d/packages/e/packages/f/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./f"; diff --git a/tests/packages/packages/g/assembly/g.ts b/tests/packages/packages/g/assembly/g.ts deleted file mode 100644 index 7e67700d37..0000000000 --- a/tests/packages/packages/g/assembly/g.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ABC } from "c"; -import { A } from "a"; - -export function AAG(): string { - return A() + A() + "G"; -} - -export function ABCG(): string { - return ABC() + "G"; -} diff --git a/tests/packages/packages/g/assembly/index.ts b/tests/packages/packages/g/assembly/index.ts deleted file mode 100644 index 434c8fb2be..0000000000 --- a/tests/packages/packages/g/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./g"; diff --git a/tests/packages/packages/g/node_modules/c/assembly/c.ts b/tests/packages/packages/g/node_modules/c/assembly/c.ts deleted file mode 100644 index f1e862d4c5..0000000000 --- a/tests/packages/packages/g/node_modules/c/assembly/c.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { B, AB } from "b"; - -export function C(): string { - return "C"; -} - -export function BC(): string { - return B() + C(); -} - -export function ABC(): string { - return AB() + C(); -} diff --git a/tests/packages/packages/g/node_modules/c/assembly/index.ts b/tests/packages/packages/g/node_modules/c/assembly/index.ts deleted file mode 100644 index 6531c23265..0000000000 --- a/tests/packages/packages/g/node_modules/c/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./c"; diff --git a/tests/packages/packages/g/node_modules/c/node_modules/b/assembly/b.ts b/tests/packages/packages/g/node_modules/c/node_modules/b/assembly/b.ts deleted file mode 100644 index 65b46079da..0000000000 --- a/tests/packages/packages/g/node_modules/c/node_modules/b/assembly/b.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { A } from "a"; - -export function B(): string { - return "B"; -} - -export function AB(): string { - return A() + B(); -} diff --git a/tests/packages/packages/g/node_modules/c/node_modules/b/assembly/index.ts b/tests/packages/packages/g/node_modules/c/node_modules/b/assembly/index.ts deleted file mode 100644 index 14065b7bb3..0000000000 --- a/tests/packages/packages/g/node_modules/c/node_modules/b/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./b"; diff --git a/tests/packages/packages/g/node_modules/c/node_modules/b/node_modules/a/assembly/a.ts b/tests/packages/packages/g/node_modules/c/node_modules/b/node_modules/a/assembly/a.ts deleted file mode 100644 index 3b795e86cb..0000000000 --- a/tests/packages/packages/g/node_modules/c/node_modules/b/node_modules/a/assembly/a.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function A(): string { - return "A"; -} diff --git a/tests/packages/packages/g/node_modules/c/node_modules/b/node_modules/a/assembly/index.ts b/tests/packages/packages/g/node_modules/c/node_modules/b/node_modules/a/assembly/index.ts deleted file mode 100644 index 378dcf843c..0000000000 --- a/tests/packages/packages/g/node_modules/c/node_modules/b/node_modules/a/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./a"; diff --git a/tests/packages/packages/g/test.js b/tests/packages/packages/g/test.js deleted file mode 100644 index 03d0b1f10b..0000000000 --- a/tests/packages/packages/g/test.js +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env node -import * as asc from "../../../../cli/index.js"; - -const { error, stderr } = await asc.main([ - "assembly/index.ts", - "--noEmit", - "--traceResolution" -]); -if (!stderr.toString().includes("File '~lib/a.ts' not found.")) { - console.error("Failed!\n" + error); - process.exit(1); -} diff --git a/tests/packages/packages/h/assembly/index.ts b/tests/packages/packages/h/assembly/index.ts deleted file mode 100644 index 20091e99f3..0000000000 --- a/tests/packages/packages/h/assembly/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { h } from "@foo/bar"; - -export function getH(): i32 { - return h; -} diff --git a/tests/packages/packages/h/node_modules/@foo/bar/assembly/index.ts b/tests/packages/packages/h/node_modules/@foo/bar/assembly/index.ts deleted file mode 100644 index 5cf0d3fbdf..0000000000 --- a/tests/packages/packages/h/node_modules/@foo/bar/assembly/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { h2 } from "@bar/baz"; - -export const h = h2; diff --git a/tests/packages/packages/h/node_modules/@foo/bar/node_modules/@bar/baz/assembly/index.ts b/tests/packages/packages/h/node_modules/@foo/bar/node_modules/@bar/baz/assembly/index.ts deleted file mode 100644 index 0d49ca8468..0000000000 --- a/tests/packages/packages/h/node_modules/@foo/bar/node_modules/@bar/baz/assembly/index.ts +++ /dev/null @@ -1 +0,0 @@ -export const h2 = 3; diff --git a/tests/packages/tsconfig.json b/tests/packages/tsconfig.json deleted file mode 100644 index 21cef40f1d..0000000000 --- a/tests/packages/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../std/assembly.json", - "include": ["**/*/assembly/**/*.ts"] -} From 3900ef89eed5c0bc50620c4b4e8db230b7194761 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 9 Dec 2021 12:06:07 +0100 Subject: [PATCH 112/175] remove ascMain, add new tests --- cli/index.js | 54 ++++-------- src/ast.ts | 4 +- tests/compiler.js | 4 +- tests/compiler/.gitignore | 1 + tests/compiler/node_modules/README.md | 1 + tests/compiler/node_modules/_/index.ts | 29 +++++++ .../node_modules/_/node_modules/a/index.ts | 8 ++ .../_/node_modules/a/node_modules/c/index.ts | 7 ++ .../node_modules/_/node_modules/a/other.ts | 1 + tests/compiler/node_modules/b/index.ts | 1 + tests/compiler/node_modules/b/other.ts | 1 + tests/compiler/node_modules/b/other/index.ts | 1 + tests/compiler/node_modules/tsconfig.json | 9 ++ tests/compiler/packages.json | 5 ++ tests/compiler/packages.optimized.wat | 4 + tests/compiler/packages.ts | 2 + tests/compiler/packages.untouched.wat | 87 +++++++++++++++++++ 17 files changed, 178 insertions(+), 41 deletions(-) create mode 100644 tests/compiler/.gitignore create mode 100644 tests/compiler/node_modules/README.md create mode 100644 tests/compiler/node_modules/_/index.ts create mode 100644 tests/compiler/node_modules/_/node_modules/a/index.ts create mode 100644 tests/compiler/node_modules/_/node_modules/a/node_modules/c/index.ts create mode 100644 tests/compiler/node_modules/_/node_modules/a/other.ts create mode 100644 tests/compiler/node_modules/b/index.ts create mode 100644 tests/compiler/node_modules/b/other.ts create mode 100644 tests/compiler/node_modules/b/other/index.ts create mode 100644 tests/compiler/node_modules/tsconfig.json create mode 100644 tests/compiler/packages.json create mode 100644 tests/compiler/packages.optimized.wat create mode 100644 tests/compiler/packages.ts create mode 100644 tests/compiler/packages.untouched.wat diff --git a/cli/index.js b/cli/index.js index c0f93bb73b..69a1f9979f 100644 --- a/cli/index.js +++ b/cli/index.js @@ -569,7 +569,6 @@ export async function main(argv, options) { opts.path = opts.path || []; // Maps package names to parent directory - const packageMains = new Map(); const packageBases = new Map(); // Gets the file matching the specified source path, imported at the given dependee path @@ -613,12 +612,8 @@ export async function main(argv, options) { const match = internalPath.match(/^~lib\/((?:@[^/]+\/)?[^/]+)(?:\/(.+))?/); // ~lib/(pkg)/(path), ~lib/(@org/pkg)/(path) if (match) { const packageName = match[1]; - const isPackageRoot = match[2] === undefined; - const filePath = isPackageRoot ? "index" : match[2]; - const basePath = packageBases.has(dependeePath) - ? packageBases.get(dependeePath) - : "."; - + const filePath = match[2] || "index"; + const basePath = packageBases.has(dependeePath) ? packageBases.get(dependeePath) : "."; if (opts.traceResolution) { stderr.write(`Looking for package '${packageName}' file '${filePath}' relative to '${basePath}'${EOL}`); } @@ -629,45 +624,28 @@ export async function main(argv, options) { paths.push(`${parts.slice(0, i).join(SEP)}${SEP}node_modules`); } } - for (const currentPath of paths.concat(...opts.path).map(p => path.relative(baseDir, p))) { + paths.push(...opts.path); + for (const currentDir of paths.map(p => path.relative(baseDir, p))) { if (opts.traceResolution) { - stderr.write(` in ${path.join(currentPath, packageName)}${EOL}`); - } - let mainPath = "assembly"; - if (packageMains.has(packageName)) { // use cached - mainPath = packageMains.get(packageName); - } else { // evaluate package.json - let jsonPath = path.join(currentPath, packageName, "package.json"); - let jsonText = await readFile(jsonPath, baseDir); - if (jsonText != null) { - try { - let json = JSON.parse(jsonText); - if (typeof json.ascMain === "string") { - mainPath = json.ascMain.replace(extension.re_index, ""); - packageMains.set(packageName, mainPath); - } - } catch (e) { /* nop */ } - } + stderr.write(` in ${path.join(currentDir, packageName)}${EOL}`); } - const mainDir = path.join(currentPath, packageName, mainPath); const plainName = filePath; - if ((sourceText = await readFile(path.join(mainDir, plainName + extension.ext), baseDir)) != null) { + if ((sourceText = await readFile(path.join(currentDir, packageName, plainName + extension.ext), baseDir)) != null) { sourcePath = `${libraryPrefix}${packageName}/${plainName}${extension.ext}`; - packageBases.set(sourcePath.replace(extension.re, ""), path.join(currentPath, packageName)); + packageBases.set(sourcePath.replace(extension.re, ""), path.join(currentDir, packageName)); if (opts.traceResolution) { - stderr.write(` -> ${path.join(mainDir, plainName + extension.ext)}${EOL}`); + stderr.write(` -> ${path.join(currentDir, packageName, plainName + extension.ext)}${EOL}`); } break; - } else if (!isPackageRoot) { - const indexName = `${filePath}/index`; - if ((sourceText = await readFile(path.join(mainDir, indexName + extension.ext), baseDir)) !== null) { - sourcePath = `${libraryPrefix}${packageName}/${indexName}${extension.ext}`; - packageBases.set(sourcePath.replace(extension.re, ""), path.join(currentPath, packageName)); - if (opts.traceResolution) { - stderr.write(` -> ${path.join(mainDir, indexName + extension.ext)}${EOL}`); - } - break; + } + const indexName = `${filePath}/index`; + if ((sourceText = await readFile(path.join(currentDir, packageName, indexName + extension.ext), baseDir)) != null) { + sourcePath = `${libraryPrefix}${packageName}/${indexName}${extension.ext}`; + packageBases.set(sourcePath.replace(extension.re, ""), path.join(currentDir, packageName)); + if (opts.traceResolution) { + stderr.write(` -> ${path.join(currentDir, packageName, indexName + extension.ext)}${EOL}`); } + break; } } } diff --git a/src/ast.ts b/src/ast.ts index 3f725bd24c..be594dad73 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -2106,7 +2106,7 @@ export class ImportStatement extends Statement { } else { // absolute in library if (!normalizedPath.startsWith(LIBRARY_PREFIX)) normalizedPath = LIBRARY_PREFIX + normalizedPath; } - this.internalPath = normalizedPath; + this.internalPath = mangleInternalPath(normalizedPath); } /** Internal path being referenced. */ @@ -2342,6 +2342,7 @@ export function findDecorator(kind: DecoratorKind, decorators: DecoratorNode[] | /** Mangles an external to an internal path. */ export function mangleInternalPath(path: string): string { + if (path.endsWith("/")) path += "index"; var pos = path.lastIndexOf("."); var len = path.length; if (pos >= 0 && len - pos >= 2) { // at least one char plus dot @@ -2354,7 +2355,6 @@ export function mangleInternalPath(path: string): string { } return path.substring(0, pos); } - assert(false); // not an external path return path; } diff --git a/tests/compiler.js b/tests/compiler.js index 9f04e8980c..b18dae4001 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -75,7 +75,9 @@ const basedir = path.join(dirname, "compiler"); // Gets a list of all relevant tests function getTests() { - var tests = glob.sync("**/!(_*).ts", { cwd: basedir }).map(name => name.replace(/\.ts$/, "")); + var tests = glob.sync("**/!(_*).ts", { cwd: basedir }) + .map(name => name.replace(/\.ts$/, "")) + .filter(name => !name.includes("node_modules")); if (argv.length) { // run matching tests only tests = tests.filter(filename => argv.indexOf(filename.replace(/\.ts$/, "")) >= 0); if (!tests.length) { diff --git a/tests/compiler/.gitignore b/tests/compiler/.gitignore new file mode 100644 index 0000000000..ddf342489b --- /dev/null +++ b/tests/compiler/.gitignore @@ -0,0 +1 @@ +!node_modules/ diff --git a/tests/compiler/node_modules/README.md b/tests/compiler/node_modules/README.md new file mode 100644 index 0000000000..d0e880ec02 --- /dev/null +++ b/tests/compiler/node_modules/README.md @@ -0,0 +1 @@ +Test files for [tests/compiler/packages.ts](../packages.ts). diff --git a/tests/compiler/node_modules/_/index.ts b/tests/compiler/node_modules/_/index.ts new file mode 100644 index 0000000000..66227e4ffc --- /dev/null +++ b/tests/compiler/node_modules/_/index.ts @@ -0,0 +1,29 @@ +// node_modules/a/index.ts +import { a } from "a"; +assert(a == 1); +import { a as a2 } from "a/"; +assert(a2 == 1); +import { a as a3 } from "a/index"; +assert(a3 == 1); + +// node_modules/a/other.ts +import { a_other } from "a/other"; +assert(a_other == 11); + +// ../b/index.ts +import { b } from "b"; +assert(b == 2); +import { b as b2 } from "b/"; +assert(b2 == 2); +import { b as b3 } from "b/index"; +assert(b3 == 2); + +// ../b/other.ts +import { b_other } from "b/other"; +assert(b_other == 22); + +// ../b/other/index.ts +import { b_other_index } from "b/other/"; +assert(b_other_index == 222); +import { b_other_index as b_other_index2 } from "b/other/index"; +assert(b_other_index2 == 222); diff --git a/tests/compiler/node_modules/_/node_modules/a/index.ts b/tests/compiler/node_modules/_/node_modules/a/index.ts new file mode 100644 index 0000000000..2ee5714306 --- /dev/null +++ b/tests/compiler/node_modules/_/node_modules/a/index.ts @@ -0,0 +1,8 @@ +export const a = 1; + +// node_modules/c/index.ts +import { c } from "c"; +assert(c == 3); + +import { b } from "b"; +assert(b == 2); diff --git a/tests/compiler/node_modules/_/node_modules/a/node_modules/c/index.ts b/tests/compiler/node_modules/_/node_modules/a/node_modules/c/index.ts new file mode 100644 index 0000000000..180fd532fc --- /dev/null +++ b/tests/compiler/node_modules/_/node_modules/a/node_modules/c/index.ts @@ -0,0 +1,7 @@ +export const c = 3; + +import { a } from "a"; +assert(a == 1); + +import { b } from "b"; +assert(b == 2); diff --git a/tests/compiler/node_modules/_/node_modules/a/other.ts b/tests/compiler/node_modules/_/node_modules/a/other.ts new file mode 100644 index 0000000000..99e5c1bb7d --- /dev/null +++ b/tests/compiler/node_modules/_/node_modules/a/other.ts @@ -0,0 +1 @@ +export const a_other = 11; diff --git a/tests/compiler/node_modules/b/index.ts b/tests/compiler/node_modules/b/index.ts new file mode 100644 index 0000000000..202103085c --- /dev/null +++ b/tests/compiler/node_modules/b/index.ts @@ -0,0 +1 @@ +export const b = 2; diff --git a/tests/compiler/node_modules/b/other.ts b/tests/compiler/node_modules/b/other.ts new file mode 100644 index 0000000000..d00c40875b --- /dev/null +++ b/tests/compiler/node_modules/b/other.ts @@ -0,0 +1 @@ +export const b_other = 22; diff --git a/tests/compiler/node_modules/b/other/index.ts b/tests/compiler/node_modules/b/other/index.ts new file mode 100644 index 0000000000..20b07610a0 --- /dev/null +++ b/tests/compiler/node_modules/b/other/index.ts @@ -0,0 +1 @@ +export const b_other_index = 222; diff --git a/tests/compiler/node_modules/tsconfig.json b/tests/compiler/node_modules/tsconfig.json new file mode 100644 index 0000000000..d11208de23 --- /dev/null +++ b/tests/compiler/node_modules/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "moduleResolution": "node" + }, + "include": [ + "./**/*.ts" + ] +} \ No newline at end of file diff --git a/tests/compiler/packages.json b/tests/compiler/packages.json new file mode 100644 index 0000000000..7b611bf9d2 --- /dev/null +++ b/tests/compiler/packages.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--traceResolution" + ] +} diff --git a/tests/compiler/packages.optimized.wat b/tests/compiler/packages.optimized.wat new file mode 100644 index 0000000000..23da3862e2 --- /dev/null +++ b/tests/compiler/packages.optimized.wat @@ -0,0 +1,4 @@ +(module + (memory $0 0) + (export "memory" (memory $0)) +) diff --git a/tests/compiler/packages.ts b/tests/compiler/packages.ts new file mode 100644 index 0000000000..23bdbfb28b --- /dev/null +++ b/tests/compiler/packages.ts @@ -0,0 +1,2 @@ +// node_modules/_/index.ts +import "_"; diff --git a/tests/compiler/packages.untouched.wat b/tests/compiler/packages.untouched.wat new file mode 100644 index 0000000000..aef7560b4a --- /dev/null +++ b/tests/compiler/packages.untouched.wat @@ -0,0 +1,87 @@ +(module + (type $none_=>_none (func)) + (global $~lib/a/index/a i32 (i32.const 1)) + (global $~lib/c/index/c i32 (i32.const 3)) + (global $~lib/b/index/b i32 (i32.const 2)) + (global $~lib/a/other/a_other i32 (i32.const 11)) + (global $~lib/b/other/b_other i32 (i32.const 22)) + (global $~lib/b/other/index/b_other_index i32 (i32.const 222)) + (global $~lib/memory/__data_end i32 (i32.const 8)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16392)) + (global $~lib/memory/__heap_base i32 (i32.const 16392)) + (memory $0 0) + (table $0 1 funcref) + (elem $0 (i32.const 1)) + (export "memory" (memory $0)) + (start $~start) + (func $start:~lib/c/index + global.get $~lib/a/index/a + i32.const 1 + i32.eq + drop + global.get $~lib/b/index/b + i32.const 2 + i32.eq + drop + ) + (func $start:~lib/a/index + call $start:~lib/c/index + global.get $~lib/c/index/c + i32.const 3 + i32.eq + drop + global.get $~lib/b/index/b + i32.const 2 + i32.eq + drop + ) + (func $start:~lib/_/index + call $start:~lib/a/index + global.get $~lib/a/index/a + i32.const 1 + i32.eq + drop + global.get $~lib/a/index/a + i32.const 1 + i32.eq + drop + global.get $~lib/a/index/a + i32.const 1 + i32.eq + drop + global.get $~lib/a/other/a_other + i32.const 11 + i32.eq + drop + global.get $~lib/b/index/b + i32.const 2 + i32.eq + drop + global.get $~lib/b/index/b + i32.const 2 + i32.eq + drop + global.get $~lib/b/index/b + i32.const 2 + i32.eq + drop + global.get $~lib/b/other/b_other + i32.const 22 + i32.eq + drop + global.get $~lib/b/other/index/b_other_index + i32.const 222 + i32.eq + drop + global.get $~lib/b/other/index/b_other_index + i32.const 222 + i32.eq + drop + ) + (func $start:packages + call $start:~lib/_/index + ) + (func $~start + call $start:packages + ) +) From 090ce5c00f71b67248ed3a646b6b9293b8d3e1d1 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 9 Dec 2021 13:22:02 +0100 Subject: [PATCH 113/175] fix --- src/ast.ts | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/ast.ts b/src/ast.ts index be594dad73..4664902f0f 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -2342,18 +2342,28 @@ export function findDecorator(kind: DecoratorKind, decorators: DecoratorNode[] | /** Mangles an external to an internal path. */ export function mangleInternalPath(path: string): string { - if (path.endsWith("/")) path += "index"; - var pos = path.lastIndexOf("."); - var len = path.length; - if (pos >= 0 && len - pos >= 2) { // at least one char plus dot - let cur = pos; - while (++cur < len) { - if (!isAlphaOrDecimal(path.charCodeAt(cur))) { - assert(false); // not a valid external path - return path; + // Normalize index + if (path.endsWith("/")) { + path += "index"; + } else { + let dotPos = path.lastIndexOf("."); + if (~dotPos) { + // Skip over leading `../` + let startPos = 0; + while (path.startsWith("../", startPos)) startPos += 3; + // Strip extension + let length = path.length; + if (dotPos >= startPos && length - dotPos >= 2) { // at least one char plus dot + let pos = dotPos; + while (++pos < length) { + if (!isAlphaOrDecimal(path.charCodeAt(pos))) { + assert(false); // not a valid external path + return path; + } + } + return path.substring(0, dotPos); } } - return path.substring(0, pos); } return path; } From 096a77cf5fc88f0ac9764bc54bb09c9a6b44212b Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 9 Dec 2021 13:40:56 +0100 Subject: [PATCH 114/175] fix --- src/ast.ts | 22 ++---------- src/program.ts | 4 +-- tests/compiler/NonNullable.untouched.wat | 2 +- tests/compiler/asc-constants.untouched.wat | 36 +++++++++---------- tests/compiler/binary.untouched.wat | 2 +- tests/compiler/builtins.untouched.wat | 2 +- tests/compiler/call-super.untouched.wat | 4 +-- tests/compiler/class-implements.untouched.wat | 4 +-- .../class-overloading-cast.untouched.wat | 4 +-- .../compiler/class-overloading.untouched.wat | 4 +-- tests/compiler/class.untouched.wat | 6 ++-- tests/compiler/constructor.untouched.wat | 4 +-- tests/compiler/do.untouched.wat | 4 +-- tests/compiler/duplicate-fields.untouched.wat | 4 +-- .../empty-exportruntime.untouched.wat | 4 +-- tests/compiler/empty-new.untouched.wat | 4 +-- tests/compiler/exports.untouched.wat | 4 +-- .../exportstar-rereexport.untouched.wat | 4 +-- .../extends-baseaggregate.untouched.wat | 6 ++-- .../compiler/extends-recursive.untouched.wat | 4 +-- tests/compiler/features/simd.untouched.wat | 4 +-- tests/compiler/features/threads.untouched.wat | 2 +- .../field-initialization.untouched.wat | 6 ++-- tests/compiler/field.untouched.wat | 4 +-- tests/compiler/for.untouched.wat | 4 +-- tests/compiler/function-call.untouched.wat | 4 +-- .../function-expression.untouched.wat | 4 +-- tests/compiler/getter-call.untouched.wat | 4 +-- tests/compiler/heap.untouched.wat | 4 +-- .../implicit-getter-setter.untouched.wat | 4 +-- tests/compiler/infer-array.untouched.wat | 4 +-- tests/compiler/infer-generic.untouched.wat | 4 +-- tests/compiler/inlining.untouched.wat | 4 +-- tests/compiler/instanceof-class.untouched.wat | 4 +-- tests/compiler/issues/1095.untouched.wat | 4 +-- tests/compiler/issues/1225.untouched.wat | 4 +-- tests/compiler/issues/1699.untouched.wat | 6 ++-- tests/compiler/logical.untouched.wat | 4 +-- tests/compiler/managed-cast.untouched.wat | 4 +-- tests/compiler/memorybase.untouched.wat | 2 +- tests/compiler/new.untouched.wat | 4 +-- tests/compiler/number.untouched.wat | 4 +-- tests/compiler/object-literal.untouched.wat | 4 +-- .../optional-typeparameters.untouched.wat | 4 +-- tests/compiler/reexport.untouched.wat | 4 +-- tests/compiler/rereexport.untouched.wat | 4 +-- tests/compiler/resolve-access.untouched.wat | 4 +-- tests/compiler/resolve-binary.untouched.wat | 4 +-- .../resolve-elementaccess.untouched.wat | 6 ++-- .../resolve-function-expression.untouched.wat | 4 +-- tests/compiler/resolve-nested.untouched.wat | 4 +-- tests/compiler/resolve-new.untouched.wat | 4 +-- .../resolve-propertyaccess.untouched.wat | 4 +-- tests/compiler/resolve-ternary.untouched.wat | 4 +-- tests/compiler/resolve-unary.untouched.wat | 4 +-- tests/compiler/rt/finalize.untouched.wat | 4 +-- tests/compiler/rt/instanceof.untouched.wat | 4 +-- .../runtime-incremental-export.untouched.wat | 4 +-- .../rt/runtime-minimal-export.untouched.wat | 2 +- tests/compiler/std-wasi/console.untouched.wat | 6 ++-- tests/compiler/std-wasi/crypto.untouched.wat | 6 ++-- tests/compiler/std-wasi/process.untouched.wat | 6 ++-- tests/compiler/std/array-access.untouched.wat | 2 +- .../compiler/std/array-literal.untouched.wat | 4 +-- tests/compiler/std/array.untouched.wat | 6 ++-- tests/compiler/std/arraybuffer.untouched.wat | 6 ++-- tests/compiler/std/dataview.untouched.wat | 6 ++-- tests/compiler/std/date.untouched.wat | 6 ++-- tests/compiler/std/map.untouched.wat | 6 ++-- tests/compiler/std/math.untouched.wat | 2 +- tests/compiler/std/new.untouched.wat | 4 +-- tests/compiler/std/object.untouched.wat | 2 +- .../std/operator-overloading.untouched.wat | 4 +-- tests/compiler/std/pointer.untouched.wat | 2 +- tests/compiler/std/set.untouched.wat | 6 ++-- tests/compiler/std/simd.untouched.wat | 2 +- tests/compiler/std/static-array.untouched.wat | 6 ++-- tests/compiler/std/staticarray.untouched.wat | 6 ++-- .../std/string-casemapping.untouched.wat | 4 +-- .../std/string-encoding.untouched.wat | 4 +-- tests/compiler/std/string.untouched.wat | 6 ++-- tests/compiler/std/symbol.untouched.wat | 6 ++-- tests/compiler/std/typedarray.untouched.wat | 6 ++-- tests/compiler/std/uri.untouched.wat | 4 +-- tests/compiler/super-inline.untouched.wat | 4 +-- tests/compiler/tablebase.untouched.wat | 2 +- tests/compiler/templateliteral.untouched.wat | 4 +-- tests/compiler/throw.untouched.wat | 2 +- tests/compiler/typeof.untouched.wat | 4 +-- .../wasi/snapshot_preview1.untouched.wat | 2 +- tests/compiler/wasi/trace.untouched.wat | 4 +-- tests/compiler/while.untouched.wat | 4 +-- 92 files changed, 205 insertions(+), 223 deletions(-) diff --git a/src/ast.ts b/src/ast.ts index 4664902f0f..9075c417ed 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -2342,28 +2342,10 @@ export function findDecorator(kind: DecoratorKind, decorators: DecoratorNode[] | /** Mangles an external to an internal path. */ export function mangleInternalPath(path: string): string { - // Normalize index if (path.endsWith("/")) { path += "index"; - } else { - let dotPos = path.lastIndexOf("."); - if (~dotPos) { - // Skip over leading `../` - let startPos = 0; - while (path.startsWith("../", startPos)) startPos += 3; - // Strip extension - let length = path.length; - if (dotPos >= startPos && length - dotPos >= 2) { // at least one char plus dot - let pos = dotPos; - while (++pos < length) { - if (!isAlphaOrDecimal(path.charCodeAt(pos))) { - assert(false); // not a valid external path - return path; - } - } - return path.substring(0, dotPos); - } - } + } else if (path.endsWith(".ts")) { + path = path.substring(0, path.length - 3); } return path; } diff --git a/src/program.ts b/src/program.ts index e1faf7596f..51834811c3 100644 --- a/src/program.ts +++ b/src/program.ts @@ -44,7 +44,7 @@ import { GETTER_PREFIX, SETTER_PREFIX, INNER_DELIMITER, - LIBRARY_SUBST, + LIBRARY_PREFIX, INDEX_SUFFIX, STUB_DELIMITER, CommonNames, @@ -430,7 +430,7 @@ export class Program extends DiagnosticEmitter { diagnostics: DiagnosticMessage[] | null = null ) { super(diagnostics); - var nativeSource = new Source(SourceKind.LIBRARY_ENTRY, LIBRARY_SUBST + ".wasm", "[native code]"); + var nativeSource = new Source(SourceKind.LIBRARY_ENTRY, LIBRARY_PREFIX + "native.ts", "[native code]"); this.nativeSource = nativeSource; this.parser = new Parser(this.diagnostics, this.sources); this.resolver = new Resolver(this); diff --git a/tests/compiler/NonNullable.untouched.wat b/tests/compiler/NonNullable.untouched.wat index 5678a98ff6..c95d96c4c6 100644 --- a/tests/compiler/NonNullable.untouched.wat +++ b/tests/compiler/NonNullable.untouched.wat @@ -9,7 +9,7 @@ (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $NonNullable/z (mut i32) (i32.const 224)) (global $~lib/memory/__data_end i32 (i32.const 300)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16684)) diff --git a/tests/compiler/asc-constants.untouched.wat b/tests/compiler/asc-constants.untouched.wat index be45b662f8..8e8a5e8981 100644 --- a/tests/compiler/asc-constants.untouched.wat +++ b/tests/compiler/asc-constants.untouched.wat @@ -1,23 +1,23 @@ (module (type $none_=>_none (func)) - (global $~lib/ASC_TARGET i32 (i32.const 1)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) - (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/ASC_MEMORY_BASE i32 (i32.const 0)) - (global $~lib/ASC_OPTIMIZE_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_FEATURE_SIGN_EXTENSION i32 (i32.const 1)) - (global $~lib/ASC_FEATURE_MUTABLE_GLOBALS i32 (i32.const 1)) - (global $~lib/ASC_FEATURE_NONTRAPPING_F2I i32 (i32.const 0)) - (global $~lib/ASC_FEATURE_BULK_MEMORY i32 (i32.const 0)) - (global $~lib/ASC_FEATURE_SIMD i32 (i32.const 0)) - (global $~lib/ASC_FEATURE_THREADS i32 (i32.const 0)) - (global $~lib/ASC_FEATURE_EXCEPTION_HANDLING i32 (i32.const 0)) - (global $~lib/ASC_FEATURE_TAIL_CALLS i32 (i32.const 0)) - (global $~lib/ASC_FEATURE_REFERENCE_TYPES i32 (i32.const 0)) - (global $~lib/ASC_FEATURE_MULTI_VALUE i32 (i32.const 0)) - (global $~lib/ASC_FEATURE_GC i32 (i32.const 0)) - (global $~lib/ASC_FEATURE_MEMORY64 i32 (i32.const 0)) + (global $~lib/native/ASC_TARGET i32 (i32.const 1)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/native/ASC_MEMORY_BASE i32 (i32.const 0)) + (global $~lib/native/ASC_OPTIMIZE_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_SIGN_EXTENSION i32 (i32.const 1)) + (global $~lib/native/ASC_FEATURE_MUTABLE_GLOBALS i32 (i32.const 1)) + (global $~lib/native/ASC_FEATURE_NONTRAPPING_F2I i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_BULK_MEMORY i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_SIMD i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_THREADS i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_EXCEPTION_HANDLING i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_TAIL_CALLS i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_REFERENCE_TYPES i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_MULTI_VALUE i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_GC i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_MEMORY64 i32 (i32.const 0)) (global $~lib/memory/__data_end i32 (i32.const 8)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16392)) (global $~lib/memory/__heap_base i32 (i32.const 16392)) diff --git a/tests/compiler/binary.untouched.wat b/tests/compiler/binary.untouched.wat index 4ba77b7887..da699a2c1f 100644 --- a/tests/compiler/binary.untouched.wat +++ b/tests/compiler/binary.untouched.wat @@ -5,7 +5,7 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (global $binary/b (mut i32) (i32.const 0)) (global $binary/i (mut i32) (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $binary/I (mut i64) (i64.const 0)) (global $~lib/util/math/log_tail (mut f64) (f64.const 0)) (global $binary/f (mut f32) (f32.const 0)) diff --git a/tests/compiler/builtins.untouched.wat b/tests/compiler/builtins.untouched.wat index ff642e6620..46e531c6a7 100644 --- a/tests/compiler/builtins.untouched.wat +++ b/tests/compiler/builtins.untouched.wat @@ -24,7 +24,7 @@ (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/i8.MIN_VALUE i32 (i32.const -128)) (global $~lib/builtins/i8.MAX_VALUE i32 (i32.const 127)) (global $~lib/builtins/i16.MIN_VALUE i32 (i32.const -32768)) diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 3cd4a32f81..ec6788f0ac 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 464)) (global $~lib/memory/__data_end i32 (i32.const 572)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16956)) diff --git a/tests/compiler/class-implements.untouched.wat b/tests/compiler/class-implements.untouched.wat index 3d1f967fd7..84c0643478 100644 --- a/tests/compiler/class-implements.untouched.wat +++ b/tests/compiler/class-implements.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $class-implements/a (mut i32) (i32.const 0)) (global $class-implements/c (mut i32) (i32.const 0)) (global $class-implements/A i32 (i32.const 3)) diff --git a/tests/compiler/class-overloading-cast.untouched.wat b/tests/compiler/class-overloading-cast.untouched.wat index 1bcc0ca549..6427c45893 100644 --- a/tests/compiler/class-overloading-cast.untouched.wat +++ b/tests/compiler/class-overloading-cast.untouched.wat @@ -24,8 +24,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $class-overloading-cast/v (mut i32) (i32.const 0)) (global $class-overloading-cast/v2 (mut i32) (i32.const 0)) (global $class-overloading-cast/v3 (mut i32) (i32.const 0)) diff --git a/tests/compiler/class-overloading.untouched.wat b/tests/compiler/class-overloading.untouched.wat index b77ff017c3..29ccb3ebff 100644 --- a/tests/compiler/class-overloading.untouched.wat +++ b/tests/compiler/class-overloading.untouched.wat @@ -24,8 +24,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $class-overloading/a (mut i32) (i32.const 0)) (global $class-overloading/c (mut i32) (i32.const 0)) (global $class-overloading/ia (mut i32) (i32.const 0)) diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index e27fc15a42..f4bb1e7696 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -25,9 +25,9 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/rt/__rtti_base i32 (i32.const 512)) (global $~lib/memory/__data_end i32 (i32.const 564)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16948)) diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index e6cb986975..593f988c58 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $constructor/emptyCtor (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldInit (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldNoInit (mut i32) (i32.const 0)) diff --git a/tests/compiler/do.untouched.wat b/tests/compiler/do.untouched.wat index 92a47f874d..0199e03ba0 100644 --- a/tests/compiler/do.untouched.wat +++ b/tests/compiler/do.untouched.wat @@ -23,8 +23,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 448)) (global $~lib/memory/__data_end i32 (i32.const 484)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16868)) diff --git a/tests/compiler/duplicate-fields.untouched.wat b/tests/compiler/duplicate-fields.untouched.wat index 8bf32e91a4..a44045ccbf 100644 --- a/tests/compiler/duplicate-fields.untouched.wat +++ b/tests/compiler/duplicate-fields.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $duplicate-fields/foo (mut i32) (i32.const 0)) (global $duplicate-fields/raz (mut i32) (i32.const 0)) (global $duplicate-fields/B3 i32 (i32.const 9)) diff --git a/tests/compiler/empty-exportruntime.untouched.wat b/tests/compiler/empty-exportruntime.untouched.wat index bcf84011f0..88a710db37 100644 --- a/tests/compiler/empty-exportruntime.untouched.wat +++ b/tests/compiler/empty-exportruntime.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 544)) (global $~lib/memory/__data_end i32 (i32.const 572)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16956)) diff --git a/tests/compiler/empty-new.untouched.wat b/tests/compiler/empty-new.untouched.wat index 8f30e3f8cd..2ac86d389e 100644 --- a/tests/compiler/empty-new.untouched.wat +++ b/tests/compiler/empty-new.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) (global $~lib/memory/__data_end i32 (i32.const 444)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16828)) diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 8d3f9103b0..36b69f2b52 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -32,8 +32,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $exports/Car i32 (i32.const 3)) (global $exports/vehicles.Car i32 (i32.const 4)) diff --git a/tests/compiler/exportstar-rereexport.untouched.wat b/tests/compiler/exportstar-rereexport.untouched.wat index b78191f004..0cd5ad2e6e 100644 --- a/tests/compiler/exportstar-rereexport.untouched.wat +++ b/tests/compiler/exportstar-rereexport.untouched.wat @@ -28,8 +28,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $reexport/car (mut i32) (i32.const 0)) (global $rereexport/car (mut i32) (i32.const 0)) (global $rereexport/exportsNamespaceCar (mut i32) (i32.const 0)) diff --git a/tests/compiler/extends-baseaggregate.untouched.wat b/tests/compiler/extends-baseaggregate.untouched.wat index e839a9c359..c8c383fd65 100644 --- a/tests/compiler/extends-baseaggregate.untouched.wat +++ b/tests/compiler/extends-baseaggregate.untouched.wat @@ -25,9 +25,9 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/rt/__rtti_base i32 (i32.const 672)) (global $~lib/memory/__data_end i32 (i32.const 748)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17132)) diff --git a/tests/compiler/extends-recursive.untouched.wat b/tests/compiler/extends-recursive.untouched.wat index 1e77d96a2a..70248bb3ed 100644 --- a/tests/compiler/extends-recursive.untouched.wat +++ b/tests/compiler/extends-recursive.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $extends-recursive/Child i32 (i32.const 3)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) (global $~lib/memory/__data_end i32 (i32.const 460)) diff --git a/tests/compiler/features/simd.untouched.wat b/tests/compiler/features/simd.untouched.wat index 29a3b2e40d..dbc3bd91cf 100644 --- a/tests/compiler/features/simd.untouched.wat +++ b/tests/compiler/features/simd.untouched.wat @@ -9,9 +9,9 @@ (type $i32_=>_none (func (param i32))) (type $none_=>_v128 (func (result v128))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (global $~lib/ASC_FEATURE_SIMD i32 (i32.const 1)) + (global $~lib/native/ASC_FEATURE_SIMD i32 (i32.const 1)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $~lib/builtins/i16.MAX_VALUE i32 (i32.const 32767)) (global $~lib/builtins/i8.MAX_VALUE i32 (i32.const 127)) (global $~lib/builtins/u8.MAX_VALUE i32 (i32.const 255)) diff --git a/tests/compiler/features/threads.untouched.wat b/tests/compiler/features/threads.untouched.wat index 8bffb922ca..8eab421228 100644 --- a/tests/compiler/features/threads.untouched.wat +++ b/tests/compiler/features/threads.untouched.wat @@ -1,6 +1,6 @@ (module (type $none_=>_none (func)) - (global $~lib/ASC_FEATURE_THREADS i32 (i32.const 1)) + (global $~lib/native/ASC_FEATURE_THREADS i32 (i32.const 1)) (global $~lib/memory/__data_end i32 (i32.const 8)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16392)) (global $~lib/memory/__heap_base i32 (i32.const 16392)) diff --git a/tests/compiler/field-initialization.untouched.wat b/tests/compiler/field-initialization.untouched.wat index 9eeb4a40b4..f3d6dc05e6 100644 --- a/tests/compiler/field-initialization.untouched.wat +++ b/tests/compiler/field-initialization.untouched.wat @@ -23,9 +23,9 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/rt/__rtti_base i32 (i32.const 768)) (global $~lib/memory/__data_end i32 (i32.const 972)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17356)) diff --git a/tests/compiler/field.untouched.wat b/tests/compiler/field.untouched.wat index 0b3da62555..3bd4ab5457 100644 --- a/tests/compiler/field.untouched.wat +++ b/tests/compiler/field.untouched.wat @@ -23,8 +23,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 448)) (global $~lib/memory/__data_end i32 (i32.const 500)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16884)) diff --git a/tests/compiler/for.untouched.wat b/tests/compiler/for.untouched.wat index 1e1cbea9db..8c290cd1a0 100644 --- a/tests/compiler/for.untouched.wat +++ b/tests/compiler/for.untouched.wat @@ -23,8 +23,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 448)) (global $~lib/memory/__data_end i32 (i32.const 484)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16868)) diff --git a/tests/compiler/function-call.untouched.wat b/tests/compiler/function-call.untouched.wat index 4e98519326..f2f7c7de6d 100644 --- a/tests/compiler/function-call.untouched.wat +++ b/tests/compiler/function-call.untouched.wat @@ -28,8 +28,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $function-call/foo (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 736)) (global $~lib/memory/__data_end i32 (i32.const 812)) diff --git a/tests/compiler/function-expression.untouched.wat b/tests/compiler/function-expression.untouched.wat index f142d9be69..05fb472091 100644 --- a/tests/compiler/function-expression.untouched.wat +++ b/tests/compiler/function-expression.untouched.wat @@ -29,8 +29,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 1088)) (global $~lib/memory/__data_end i32 (i32.const 1172)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17556)) diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 11bf3c25b4..e5894e8c46 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 448)) (global $~lib/memory/__data_end i32 (i32.const 492)) diff --git a/tests/compiler/heap.untouched.wat b/tests/compiler/heap.untouched.wat index 2673f79c6d..834975369e 100644 --- a/tests/compiler/heap.untouched.wat +++ b/tests/compiler/heap.untouched.wat @@ -9,9 +9,9 @@ (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $heap/ptr (mut i32) (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/memory/__data_end i32 (i32.const 252)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16636)) (global $~lib/memory/__heap_base i32 (i32.const 16636)) diff --git a/tests/compiler/implicit-getter-setter.untouched.wat b/tests/compiler/implicit-getter-setter.untouched.wat index 54685f8625..aa2dea3417 100644 --- a/tests/compiler/implicit-getter-setter.untouched.wat +++ b/tests/compiler/implicit-getter-setter.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $implicit-getter-setter/Basic i32 (i32.const 3)) (global $implicit-getter-setter/Managed i32 (i32.const 4)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) diff --git a/tests/compiler/infer-array.untouched.wat b/tests/compiler/infer-array.untouched.wat index 25fb03dc89..76234dcdc7 100644 --- a/tests/compiler/infer-array.untouched.wat +++ b/tests/compiler/infer-array.untouched.wat @@ -25,8 +25,8 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 1088)) (global $~lib/memory/__data_end i32 (i32.const 1188)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17572)) diff --git a/tests/compiler/infer-generic.untouched.wat b/tests/compiler/infer-generic.untouched.wat index 30134cd190..5fd16618e0 100644 --- a/tests/compiler/infer-generic.untouched.wat +++ b/tests/compiler/infer-generic.untouched.wat @@ -27,8 +27,8 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 592)) (global $~lib/memory/__data_end i32 (i32.const 660)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17044)) diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 2992a1704e..43367d9f24 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -24,8 +24,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 496)) (global $~lib/memory/__data_end i32 (i32.const 556)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16940)) diff --git a/tests/compiler/instanceof-class.untouched.wat b/tests/compiler/instanceof-class.untouched.wat index 4f986b8fa1..9ade92492a 100644 --- a/tests/compiler/instanceof-class.untouched.wat +++ b/tests/compiler/instanceof-class.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $instanceof-class/a (mut i32) (i32.const 0)) (global $instanceof-class/b (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 480)) diff --git a/tests/compiler/issues/1095.untouched.wat b/tests/compiler/issues/1095.untouched.wat index 6e7d533459..a5cbb84821 100644 --- a/tests/compiler/issues/1095.untouched.wat +++ b/tests/compiler/issues/1095.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 560)) (global $~lib/memory/__data_end i32 (i32.const 596)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16980)) diff --git a/tests/compiler/issues/1225.untouched.wat b/tests/compiler/issues/1225.untouched.wat index 6d1f184cd0..88250d171a 100644 --- a/tests/compiler/issues/1225.untouched.wat +++ b/tests/compiler/issues/1225.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $issues/1225/x (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 464)) (global $~lib/memory/__data_end i32 (i32.const 500)) diff --git a/tests/compiler/issues/1699.untouched.wat b/tests/compiler/issues/1699.untouched.wat index 27534979fa..49951b41ae 100644 --- a/tests/compiler/issues/1699.untouched.wat +++ b/tests/compiler/issues/1699.untouched.wat @@ -22,9 +22,9 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/rt/__rtti_base i32 (i32.const 688)) (global $~lib/memory/__data_end i32 (i32.const 732)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17116)) diff --git a/tests/compiler/logical.untouched.wat b/tests/compiler/logical.untouched.wat index e47276a328..a97e0aa6b6 100644 --- a/tests/compiler/logical.untouched.wat +++ b/tests/compiler/logical.untouched.wat @@ -27,8 +27,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 464)) (global $~lib/memory/__data_end i32 (i32.const 500)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16884)) diff --git a/tests/compiler/managed-cast.untouched.wat b/tests/compiler/managed-cast.untouched.wat index bd5c191b51..8a6df2dcad 100644 --- a/tests/compiler/managed-cast.untouched.wat +++ b/tests/compiler/managed-cast.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 608)) (global $~lib/memory/__data_end i32 (i32.const 652)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17036)) diff --git a/tests/compiler/memorybase.untouched.wat b/tests/compiler/memorybase.untouched.wat index db18d4b952..28f0dbeb0e 100644 --- a/tests/compiler/memorybase.untouched.wat +++ b/tests/compiler/memorybase.untouched.wat @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) (global $memorybase/staticData i32 (i32.const 1024)) - (global $~lib/ASC_MEMORY_BASE i32 (i32.const 1024)) + (global $~lib/native/ASC_MEMORY_BASE i32 (i32.const 1024)) (global $~lib/memory/__data_end i32 (i32.const 1028)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17412)) (global $~lib/memory/__heap_base i32 (i32.const 17412)) diff --git a/tests/compiler/new.untouched.wat b/tests/compiler/new.untouched.wat index 6d850e0d3e..4984a46c06 100644 --- a/tests/compiler/new.untouched.wat +++ b/tests/compiler/new.untouched.wat @@ -23,8 +23,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $new/gen (mut i32) (i32.const 0)) (global $new/ref2 (mut i32) (i32.const 0)) (global $new/genext (mut i32) (i32.const 0)) diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 19b979c51a..11939140ce 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -32,8 +32,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) (global $~lib/util/number/_exp (mut i32) (i32.const 0)) diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index 5c152a30b5..a3e09f1dfa 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -26,8 +26,8 @@ (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 688)) (global $~lib/memory/__data_end i32 (i32.const 748)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17132)) diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index be40364603..f4a056e901 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -23,8 +23,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $optional-typeparameters/tConcrete (mut i32) (i32.const 0)) (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) diff --git a/tests/compiler/reexport.untouched.wat b/tests/compiler/reexport.untouched.wat index 09709a9c0c..4cccddb5c7 100644 --- a/tests/compiler/reexport.untouched.wat +++ b/tests/compiler/reexport.untouched.wat @@ -32,8 +32,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $reexport/car (mut i32) (i32.const 0)) (global $exports/Car i32 (i32.const 3)) (global $~argumentsLength (mut i32) (i32.const 0)) diff --git a/tests/compiler/rereexport.untouched.wat b/tests/compiler/rereexport.untouched.wat index 2ee9a00878..a20e11255a 100644 --- a/tests/compiler/rereexport.untouched.wat +++ b/tests/compiler/rereexport.untouched.wat @@ -28,8 +28,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $reexport/car (mut i32) (i32.const 0)) (global $rereexport/car (mut i32) (i32.const 0)) (global $rereexport/exportsNamespaceCar (mut i32) (i32.const 0)) diff --git a/tests/compiler/resolve-access.untouched.wat b/tests/compiler/resolve-access.untouched.wat index 11df03b345..5ef97a8322 100644 --- a/tests/compiler/resolve-access.untouched.wat +++ b/tests/compiler/resolve-access.untouched.wat @@ -29,8 +29,8 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/rt/__rtti_base i32 (i32.const 2272)) (global $~lib/memory/__data_end i32 (i32.const 2324)) diff --git a/tests/compiler/resolve-binary.untouched.wat b/tests/compiler/resolve-binary.untouched.wat index 740e8907c9..dd99ca4cf9 100644 --- a/tests/compiler/resolve-binary.untouched.wat +++ b/tests/compiler/resolve-binary.untouched.wat @@ -21,7 +21,7 @@ (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $resolve-binary/a (mut i32) (i32.const 0)) (global $resolve-binary/f (mut f64) (f64.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) @@ -34,7 +34,7 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $~lib/util/math/log_tail (mut f64) (f64.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) diff --git a/tests/compiler/resolve-elementaccess.untouched.wat b/tests/compiler/resolve-elementaccess.untouched.wat index 1255683dc2..5f73e59de1 100644 --- a/tests/compiler/resolve-elementaccess.untouched.wat +++ b/tests/compiler/resolve-elementaccess.untouched.wat @@ -32,9 +32,9 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $resolve-elementaccess/arr (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) diff --git a/tests/compiler/resolve-function-expression.untouched.wat b/tests/compiler/resolve-function-expression.untouched.wat index 9a94ff8609..a9e103d9b9 100644 --- a/tests/compiler/resolve-function-expression.untouched.wat +++ b/tests/compiler/resolve-function-expression.untouched.wat @@ -27,8 +27,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 2400)) (global $~lib/memory/__data_end i32 (i32.const 2436)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 18820)) diff --git a/tests/compiler/resolve-nested.untouched.wat b/tests/compiler/resolve-nested.untouched.wat index c8c8038796..8786327a8d 100644 --- a/tests/compiler/resolve-nested.untouched.wat +++ b/tests/compiler/resolve-nested.untouched.wat @@ -38,8 +38,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $resolve-nested/Outer.InnerClass i32 (i32.const 4)) (global $resolve-nested/Outer.Inner.EvenInnerClass i32 (i32.const 5)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) diff --git a/tests/compiler/resolve-new.untouched.wat b/tests/compiler/resolve-new.untouched.wat index 534a0de5f0..628af018f4 100644 --- a/tests/compiler/resolve-new.untouched.wat +++ b/tests/compiler/resolve-new.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $resolve-new/foo (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) (global $~lib/memory/__data_end i32 (i32.const 452)) diff --git a/tests/compiler/resolve-propertyaccess.untouched.wat b/tests/compiler/resolve-propertyaccess.untouched.wat index 08355c586a..c747c25427 100644 --- a/tests/compiler/resolve-propertyaccess.untouched.wat +++ b/tests/compiler/resolve-propertyaccess.untouched.wat @@ -27,8 +27,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $resolve-propertyaccess/Namespace.lazyMember i32 (i32.const 11)) (global $resolve-propertyaccess/MergedNamespace.member i32 (i32.const 2)) (global $resolve-propertyaccess/MergedNamespace.lazyMember i32 (i32.const 22)) diff --git a/tests/compiler/resolve-ternary.untouched.wat b/tests/compiler/resolve-ternary.untouched.wat index 6cb50eb234..877076fc96 100644 --- a/tests/compiler/resolve-ternary.untouched.wat +++ b/tests/compiler/resolve-ternary.untouched.wat @@ -31,8 +31,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) (global $~lib/util/number/_exp (mut i32) (i32.const 0)) diff --git a/tests/compiler/resolve-unary.untouched.wat b/tests/compiler/resolve-unary.untouched.wat index 6e43525dc4..8d4ae758c6 100644 --- a/tests/compiler/resolve-unary.untouched.wat +++ b/tests/compiler/resolve-unary.untouched.wat @@ -26,8 +26,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $resolve-unary/a (mut i32) (i32.const 1)) (global $resolve-unary/b (mut i32) (i32.const 1)) (global $resolve-unary/foo (mut i32) (i32.const 0)) diff --git a/tests/compiler/rt/finalize.untouched.wat b/tests/compiler/rt/finalize.untouched.wat index 73c8adfcee..8e8ab12838 100644 --- a/tests/compiler/rt/finalize.untouched.wat +++ b/tests/compiler/rt/finalize.untouched.wat @@ -24,8 +24,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 464)) (global $~lib/memory/__data_end i32 (i32.const 500)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16884)) diff --git a/tests/compiler/rt/instanceof.untouched.wat b/tests/compiler/rt/instanceof.untouched.wat index edb3157a87..38e6c13efe 100644 --- a/tests/compiler/rt/instanceof.untouched.wat +++ b/tests/compiler/rt/instanceof.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $rt/instanceof/animal (mut i32) (i32.const 0)) (global $rt/instanceof/cat (mut i32) (i32.const 0)) (global $rt/instanceof/blackcat (mut i32) (i32.const 0)) diff --git a/tests/compiler/rt/runtime-incremental-export.untouched.wat b/tests/compiler/rt/runtime-incremental-export.untouched.wat index bcf84011f0..88a710db37 100644 --- a/tests/compiler/rt/runtime-incremental-export.untouched.wat +++ b/tests/compiler/rt/runtime-incremental-export.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 544)) (global $~lib/memory/__data_end i32 (i32.const 572)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16956)) diff --git a/tests/compiler/rt/runtime-minimal-export.untouched.wat b/tests/compiler/rt/runtime-minimal-export.untouched.wat index 4a4b8da36f..fdf07f6b5e 100644 --- a/tests/compiler/rt/runtime-minimal-export.untouched.wat +++ b/tests/compiler/rt/runtime-minimal-export.untouched.wat @@ -9,7 +9,7 @@ (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $~lib/rt/tcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tcms/white (mut i32) (i32.const 0)) (global $~lib/rt/tcms/total (mut i32) (i32.const 0)) diff --git a/tests/compiler/std-wasi/console.untouched.wat b/tests/compiler/std-wasi/console.untouched.wat index 3886345944..b951ce79bb 100644 --- a/tests/compiler/std-wasi/console.untouched.wat +++ b/tests/compiler/std-wasi/console.untouched.wat @@ -29,7 +29,7 @@ (global $~lib/bindings/wasi/tempbuf i32 (i32.const 112)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $~lib/process/process.stdout i32 (i32.const 1)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) @@ -40,8 +40,8 @@ (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0)) (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/console/timers (mut i32) (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/rt/__rtti_base i32 (i32.const 6912)) diff --git a/tests/compiler/std-wasi/crypto.untouched.wat b/tests/compiler/std-wasi/crypto.untouched.wat index bd5cad7d2c..271ea14c0b 100644 --- a/tests/compiler/std-wasi/crypto.untouched.wat +++ b/tests/compiler/std-wasi/crypto.untouched.wat @@ -30,9 +30,9 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $std-wasi/crypto/ab (mut i32) (i32.const 0)) (global $std-wasi/crypto/buf (mut i32) (i32.const 0)) (global $~lib/process/process.stdout i32 (i32.const 1)) diff --git a/tests/compiler/std-wasi/process.untouched.wat b/tests/compiler/std-wasi/process.untouched.wat index d097d147d1..249a786630 100644 --- a/tests/compiler/std-wasi/process.untouched.wat +++ b/tests/compiler/std-wasi/process.untouched.wat @@ -31,7 +31,7 @@ (global $~lib/bindings/wasi/tempbuf i32 (i32.const 64)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $~lib/process/process.arch i32 (i32.const 3424)) (global $~lib/process/process.platform i32 (i32.const 3504)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) @@ -43,8 +43,8 @@ (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0)) (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/process/process.argv (mut i32) (i32.const 0)) (global $std-wasi/process/argv (mut i32) (i32.const 0)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 7b8ca0eb92..9699142e0f 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -9,7 +9,7 @@ (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/memory/__data_end i32 (i32.const 284)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16668)) (global $~lib/memory/__heap_base i32 (i32.const 16668)) diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index b32f64f179..3706c2da8b 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -27,8 +27,8 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $std/array-literal/dynamicArrayI8 (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayI32 (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayRef (mut i32) (i32.const 0)) diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 2202591239..d5b1f26677 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -46,9 +46,9 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $std/array/arr (mut i32) (i32.const 0)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) (global $std/array/i (mut i32) (i32.const 0)) diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 48fd5021e3..5a4246d53b 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -23,9 +23,9 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 688)) (global $~lib/memory/__data_end i32 (i32.const 820)) diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 2950f7f29b..2fedbdd27f 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -30,9 +30,9 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 720)) (global $~lib/memory/__data_end i32 (i32.const 764)) diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 1d5aadc95d..1c4fc071e4 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -34,10 +34,10 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/rt/__rtti_base i32 (i32.const 6480)) (global $~lib/memory/__data_end i32 (i32.const 6540)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 22924)) diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index d74fda104e..c24430bc52 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -43,9 +43,9 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/rt/__rtti_base i32 (i32.const 736)) (global $~lib/memory/__data_end i32 (i32.const 996)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17380)) diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 176beb6f5c..7b9c67acf9 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -90,7 +90,7 @@ (global $~lib/math/NativeMathf.PI f32 (f32.const 3.1415927410125732)) (global $~lib/math/NativeMathf.SQRT1_2 f32 (f32.const 0.7071067690849304)) (global $~lib/math/NativeMathf.SQRT2 f32 (f32.const 1.4142135381698608)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/math/rempio2_y0 (mut f64) (f64.const 0)) (global $~lib/math/rempio2_y1 (mut f64) (f64.const 0)) (global $~lib/math/res128_hi (mut i64) (i64.const 0)) diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 3478dd091c..54d67324e1 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -25,8 +25,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) (global $~lib/memory/__data_end i32 (i32.const 452)) diff --git a/tests/compiler/std/object.untouched.wat b/tests/compiler/std/object.untouched.wat index f36d38346e..62a21402f5 100644 --- a/tests/compiler/std/object.untouched.wat +++ b/tests/compiler/std/object.untouched.wat @@ -10,7 +10,7 @@ (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/memory/__data_end i32 (i32.const 188)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16572)) (global $~lib/memory/__heap_base i32 (i32.const 16572)) diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 34dfb694fb..a0400e1cae 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $std/operator-overloading/a1 (mut i32) (i32.const 0)) (global $std/operator-overloading/a2 (mut i32) (i32.const 0)) (global $std/operator-overloading/a (mut i32) (i32.const 0)) diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index aa23eef8ba..a05e0b0065 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -9,7 +9,7 @@ (global $std/pointer/add (mut i32) (i32.const 0)) (global $std/pointer/sub (mut i32) (i32.const 0)) (global $std/pointer/nextOne (mut i32) (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $std/pointer/buf (mut i32) (i32.const 0)) (global $~lib/memory/__data_end i32 (i32.const 60)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16444)) diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index c58528fe3e..c29b88c6a5 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -40,9 +40,9 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/rt/__rtti_base i32 (i32.const 624)) (global $~lib/memory/__data_end i32 (i32.const 812)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17196)) diff --git a/tests/compiler/std/simd.untouched.wat b/tests/compiler/std/simd.untouched.wat index 196aa636d5..b0823775ca 100644 --- a/tests/compiler/std/simd.untouched.wat +++ b/tests/compiler/std/simd.untouched.wat @@ -1,6 +1,6 @@ (module (type $none_=>_none (func)) - (global $~lib/ASC_FEATURE_SIMD i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_SIMD i32 (i32.const 0)) (global $~lib/memory/__data_end i32 (i32.const 8)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16392)) (global $~lib/memory/__heap_base i32 (i32.const 16392)) diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index d10cb3566b..7992554ea2 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -32,9 +32,9 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/rt/__rtti_base i32 (i32.const 928)) (global $~lib/memory/__data_end i32 (i32.const 988)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17372)) diff --git a/tests/compiler/std/staticarray.untouched.wat b/tests/compiler/std/staticarray.untouched.wat index 62b5515c7a..edfcb42f55 100644 --- a/tests/compiler/std/staticarray.untouched.wat +++ b/tests/compiler/std/staticarray.untouched.wat @@ -30,11 +30,11 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $std/staticarray/arr3 (mut i32) (i32.const 0)) (global $std/staticarray/arr4 (mut i32) (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $std/staticarray/maxVal (mut i32) (i32.const 0)) diff --git a/tests/compiler/std/string-casemapping.untouched.wat b/tests/compiler/std/string-casemapping.untouched.wat index 49a2dfc5da..8772d5afc4 100644 --- a/tests/compiler/std/string-casemapping.untouched.wat +++ b/tests/compiler/std/string-casemapping.untouched.wat @@ -31,8 +31,8 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/util/casemap/SPECIALS_UPPER i32 (i32.const 464)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/rt/__rtti_base i32 (i32.const 20032)) diff --git a/tests/compiler/std/string-encoding.untouched.wat b/tests/compiler/std/string-encoding.untouched.wat index 3211f81ba3..f766ed1192 100644 --- a/tests/compiler/std/string-encoding.untouched.wat +++ b/tests/compiler/std/string-encoding.untouched.wat @@ -24,8 +24,8 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 21488)) (global $~lib/memory/__data_end i32 (i32.const 21516)) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 0f8eecf07f..90e904784b 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -28,7 +28,7 @@ (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) @@ -39,7 +39,7 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/string/String.MAX_LENGTH i32 (i32.const 536870910)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) @@ -52,7 +52,7 @@ (global $~lib/builtins/f64.MIN_VALUE f64 (f64.const 5e-324)) (global $std/string/Ox1p_1073 f64 (f64.const 1e-323)) (global $std/string/Ox1_0000000000001p_1022 f64 (f64.const 2.225073858507202e-308)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/builtins/u64.MAX_VALUE i64 (i64.const -1)) (global $~lib/builtins/i64.MIN_VALUE i64 (i64.const -9223372036854775808)) diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index ed4a37b46d..5fedea1f5c 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -27,9 +27,9 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/symbol/idToString (mut i32) (i32.const 0)) (global $std/symbol/sym3 (mut i32) (i32.const 0)) (global $std/symbol/sym4 (mut i32) (i32.const 0)) diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 151728470b..400ac3b10b 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -77,9 +77,9 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) diff --git a/tests/compiler/std/uri.untouched.wat b/tests/compiler/std/uri.untouched.wat index db02ab3292..8176f82b89 100644 --- a/tests/compiler/std/uri.untouched.wat +++ b/tests/compiler/std/uri.untouched.wat @@ -24,8 +24,8 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/util/uri/URI_UNSAFE i32 (i32.const 2364)) (global $~lib/util/uri/URI_RESERVED i32 (i32.const 2572)) (global $~lib/rt/__rtti_base i32 (i32.const 3312)) diff --git a/tests/compiler/super-inline.untouched.wat b/tests/compiler/super-inline.untouched.wat index b144116759..13e8004d63 100644 --- a/tests/compiler/super-inline.untouched.wat +++ b/tests/compiler/super-inline.untouched.wat @@ -22,8 +22,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $super-inline/foo (mut i32) (i32.const 0)) (global $super-inline/bar (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) diff --git a/tests/compiler/tablebase.untouched.wat b/tests/compiler/tablebase.untouched.wat index 6b13412c68..d7ab0cbcb6 100644 --- a/tests/compiler/tablebase.untouched.wat +++ b/tests/compiler/tablebase.untouched.wat @@ -4,7 +4,7 @@ (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $tablebase/staticFunction i32 (i32.const 32)) - (global $~lib/ASC_TABLE_BASE i32 (i32.const 32)) + (global $~lib/native/ASC_TABLE_BASE i32 (i32.const 32)) (global $~lib/memory/__data_end i32 (i32.const 92)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16476)) (global $~lib/memory/__heap_base i32 (i32.const 16476)) diff --git a/tests/compiler/templateliteral.untouched.wat b/tests/compiler/templateliteral.untouched.wat index 23a8ef1f66..2a1e50b66e 100644 --- a/tests/compiler/templateliteral.untouched.wat +++ b/tests/compiler/templateliteral.untouched.wat @@ -20,7 +20,7 @@ (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) @@ -31,7 +31,7 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) (global $~lib/util/number/_exp (mut i32) (i32.const 0)) diff --git a/tests/compiler/throw.untouched.wat b/tests/compiler/throw.untouched.wat index 3ab9afb46d..a289eb954a 100644 --- a/tests/compiler/throw.untouched.wat +++ b/tests/compiler/throw.untouched.wat @@ -20,7 +20,7 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 704)) (global $~lib/memory/__data_end i32 (i32.const 732)) diff --git a/tests/compiler/typeof.untouched.wat b/tests/compiler/typeof.untouched.wat index d3f978daea..e7af4a1991 100644 --- a/tests/compiler/typeof.untouched.wat +++ b/tests/compiler/typeof.untouched.wat @@ -14,7 +14,7 @@ (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $typeof/b (mut i32) (i32.const 1)) (global $typeof/i (mut i32) (i32.const 1)) (global $typeof/f (mut f32) (f32.const 1)) @@ -32,7 +32,7 @@ (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $typeof/c (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 768)) (global $~lib/memory/__data_end i32 (i32.const 812)) diff --git a/tests/compiler/wasi/snapshot_preview1.untouched.wat b/tests/compiler/wasi/snapshot_preview1.untouched.wat index c954b2c789..80c91b9344 100644 --- a/tests/compiler/wasi/snapshot_preview1.untouched.wat +++ b/tests/compiler/wasi/snapshot_preview1.untouched.wat @@ -3,7 +3,7 @@ (global $~lib/shared/target/Target.JS i32 (i32.const 0)) (global $~lib/shared/target/Target.WASM32 i32 (i32.const 1)) (global $~lib/shared/target/Target.WASM64 i32 (i32.const 2)) - (global $~lib/ASC_TARGET i32 (i32.const 1)) + (global $~lib/native/ASC_TARGET i32 (i32.const 1)) (global $wasi/snapshot_preview1/sig (mut i32) (i32.const 1)) (global $~lib/memory/__data_end i32 (i32.const 8)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16392)) diff --git a/tests/compiler/wasi/trace.untouched.wat b/tests/compiler/wasi/trace.untouched.wat index bf82ac0d78..cf121e3259 100644 --- a/tests/compiler/wasi/trace.untouched.wat +++ b/tests/compiler/wasi/trace.untouched.wat @@ -18,7 +18,7 @@ (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) @@ -26,7 +26,7 @@ (global $~lib/util/number/_K (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/memory/__data_end i32 (i32.const 1616)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 18000)) (global $~lib/memory/__heap_base i32 (i32.const 18000)) diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index b5b316251b..242a12f684 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -23,8 +23,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 464)) (global $~lib/memory/__data_end i32 (i32.const 500)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16884)) From 88b31bf9362f965834a27cfa18e7d1ac0ef2e581 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 9 Dec 2021 13:52:33 +0100 Subject: [PATCH 115/175] fix, remove --extension --- cli/index.d.ts | 2 - cli/index.js | 99 +++++++++++++------------------ cli/options.json | 5 -- package.json | 3 +- src/ast.ts | 3 +- tests/extension/assembly/index.as | 2 - tests/extension/assembly/other.as | 3 - tests/extension/package.json | 6 -- 8 files changed, 42 insertions(+), 81 deletions(-) delete mode 100644 tests/extension/assembly/index.as delete mode 100644 tests/extension/assembly/other.as delete mode 100644 tests/extension/package.json diff --git a/cli/index.d.ts b/cli/index.d.ts index 17f9ba0331..343910b91a 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -160,8 +160,6 @@ export interface CompilerOptions { measure?: boolean; /** Disables terminal colors. */ noColors?: boolean; - /** Specifies an alternative file extension. */ - extension?: string; } /** Compiler API options. */ diff --git a/cli/index.js b/cli/index.js index 69a1f9979f..13a65fd274 100644 --- a/cli/index.js +++ b/cli/index.js @@ -91,25 +91,15 @@ const WIN = process.platform === "win32"; const EOL = WIN ? "\r\n" : "\n"; const SEP = WIN ? "\\" : "/"; +const extension = ".ts"; +const extension_d = `.d${extension}`; +const extension_re = new RegExp("\\" + extension + "$"); +const extension_re_except_d = new RegExp("^(?!.*\\.d\\" + extension + "$).*\\" + extension + "$"); + function toUpperSnakeCase(str) { return str.replace(/-/g, "_").toUpperCase(); } -// Sets up an extension with its definition counterpart and relevant regexes. -function setupExtension(ext) { - if (!ext.startsWith(".")) ext = `.${ext}`; - return { - ext, - ext_d: `.d${ext}`, - re: new RegExp("\\" + ext + "$"), - re_d: new RegExp("\\.d\\" + ext + "$"), - re_except_d: new RegExp("^(?!.*\\.d\\" + ext + "$).*\\" + ext + "$"), - re_index: new RegExp("(?:^|[\\\\\\/])index\\" + ext + "$") - }; -} - -const defaultExtension = setupExtension(".ts"); - /** Ensures that an object is a wrapper class instead of just a pointer. */ function __wrap(ptrOrObj, wrapperClass) { if (typeof ptrOrObj === "number") { @@ -158,7 +148,7 @@ export function configToArguments(options, argv = []) { /** Convenience function that parses and compiles source strings directly. */ export async function compileString(sources, config = {}) { - if (typeof sources === "string") sources = { [`input${defaultExtension.ext}`]: sources }; + if (typeof sources === "string") sources = { [`input${extension}`]: sources }; var argv = [ "--binaryFile", "binary", "--textFile", "text", @@ -193,7 +183,6 @@ export async function main(argv, options) { const writeFile = options.writeFile || writeFileNode; const listFiles = options.listFiles || listFilesNode; const stats = options.stats || new Stats(); - let extension = defaultExtension; // Parse command line options but do not populate option defaults yet const optionsResult = optionsUtil.parse(argv, generated.options, false); @@ -242,14 +231,6 @@ export async function main(argv, options) { return prepareResult(null); } - // Use another extension if requested - if (typeof opts.extension === "string") { - if (!/^\.?[0-9a-zA-Z]{1,14}$/.test(opts.extension)) { - throw Error(`Invalid extension: ${opts.extension}`); - } - extension = setupExtension(opts.extension); - } - // Set up base directory const baseDir = path.normalize(opts.baseDir || "."); @@ -269,9 +250,9 @@ export async function main(argv, options) { " " + colors.cyan("asc") + " [entryFile ...] [options]", "", colors.white("EXAMPLES"), - " " + colors.cyan("asc") + " hello" + extension.ext, - " " + colors.cyan("asc") + " hello" + extension.ext + " -b hello.wasm -t hello.wat", - " " + colors.cyan("asc") + " hello1" + extension.ext + " hello2" + extension.ext + " -b -O > hello.wasm", + " " + colors.cyan("asc") + " hello" + extension, + " " + colors.cyan("asc") + " hello" + extension + " -b hello.wasm -t hello.wat", + " " + colors.cyan("asc") + " hello1" + extension + " hello2" + extension + " -b -O > hello.wasm", " " + colors.cyan("asc") + " --config asconfig.json --target release", "", colors.white("OPTIONS"), @@ -530,7 +511,7 @@ export async function main(argv, options) { let begin = stats.begin(); stats.parseCount++; let textPtr = __pin(__newString(libraryFiles[libPath])); - let pathPtr = __newString(libraryPrefix + libPath + extension.ext); + let pathPtr = __newString(libraryPrefix + libPath + extension); assemblyscript.parse(program, textPtr, pathPtr, false); __unpin(textPtr); stats.parseTime += stats.end(begin); @@ -544,7 +525,7 @@ export async function main(argv, options) { for (let i = 0, k = customLibDirs.length; i < k; ++i) { // custom let libDir = customLibDirs[i]; let libFiles; - if (libDir.endsWith(extension.ext)) { + if (libDir.endsWith(extension)) { libFiles = [ path.basename(libDir) ]; libDir = path.dirname(libDir); } else { @@ -555,7 +536,7 @@ export async function main(argv, options) { if (libText == null) { return prepareResult(Error(`Library file '${libPath}' not found.`)); } - libraryFiles[libPath.replace(extension.re, "")] = libText; + libraryFiles[libPath.replace(extension_re, "")] = libText; let begin = stats.begin(); stats.parseCount++; let textPtr = __pin(__newString(libText)); @@ -578,11 +559,11 @@ export async function main(argv, options) { // Try file.ext, file/index.ext, file.d.ext if (!internalPath.startsWith(libraryPrefix)) { - if ((sourceText = await readFile(sourcePath = internalPath + extension.ext, baseDir)) == null) { - if ((sourceText = await readFile(sourcePath = internalPath + "/index" + extension.ext, baseDir)) == null) { + if ((sourceText = await readFile(sourcePath = internalPath + extension, baseDir)) == null) { + if ((sourceText = await readFile(sourcePath = internalPath + "/index" + extension, baseDir)) == null) { // portable d.ext: uses the .js file next to it in JS or becomes an import in Wasm - sourcePath = internalPath + extension.ext; - sourceText = await readFile(internalPath + extension.ext_d, baseDir); + sourcePath = internalPath + extension; + sourceText = await readFile(internalPath + extension_d, baseDir); } } @@ -592,18 +573,18 @@ export async function main(argv, options) { const indexName = `${plainName}/index`; if (Object.prototype.hasOwnProperty.call(libraryFiles, plainName)) { sourceText = libraryFiles[plainName]; - sourcePath = libraryPrefix + plainName + extension.ext; + sourcePath = libraryPrefix + plainName + extension; } else if (Object.prototype.hasOwnProperty.call(libraryFiles, indexName)) { sourceText = libraryFiles[indexName]; - sourcePath = libraryPrefix + indexName + extension.ext; + sourcePath = libraryPrefix + indexName + extension; } else { // custom lib dirs for (const libDir of customLibDirs) { - if ((sourceText = await readFile(plainName + extension.ext, libDir)) != null) { - sourcePath = libraryPrefix + plainName + extension.ext; + if ((sourceText = await readFile(plainName + extension, libDir)) != null) { + sourcePath = libraryPrefix + plainName + extension; break; } else { - if ((sourceText = await readFile(indexName + extension.ext, libDir)) != null) { - sourcePath = libraryPrefix + indexName + extension.ext; + if ((sourceText = await readFile(indexName + extension, libDir)) != null) { + sourcePath = libraryPrefix + indexName + extension; break; } } @@ -630,20 +611,20 @@ export async function main(argv, options) { stderr.write(` in ${path.join(currentDir, packageName)}${EOL}`); } const plainName = filePath; - if ((sourceText = await readFile(path.join(currentDir, packageName, plainName + extension.ext), baseDir)) != null) { - sourcePath = `${libraryPrefix}${packageName}/${plainName}${extension.ext}`; - packageBases.set(sourcePath.replace(extension.re, ""), path.join(currentDir, packageName)); + if ((sourceText = await readFile(path.join(currentDir, packageName, plainName + extension), baseDir)) != null) { + sourcePath = `${libraryPrefix}${packageName}/${plainName}${extension}`; + packageBases.set(sourcePath.replace(extension_re, ""), path.join(currentDir, packageName)); if (opts.traceResolution) { - stderr.write(` -> ${path.join(currentDir, packageName, plainName + extension.ext)}${EOL}`); + stderr.write(` -> ${path.join(currentDir, packageName, plainName + extension)}${EOL}`); } break; } const indexName = `${filePath}/index`; - if ((sourceText = await readFile(path.join(currentDir, packageName, indexName + extension.ext), baseDir)) != null) { - sourcePath = `${libraryPrefix}${packageName}/${indexName}${extension.ext}`; - packageBases.set(sourcePath.replace(extension.re, ""), path.join(currentDir, packageName)); + if ((sourceText = await readFile(path.join(currentDir, packageName, indexName + extension), baseDir)) != null) { + sourcePath = `${libraryPrefix}${packageName}/${indexName}${extension}`; + packageBases.set(sourcePath.replace(extension_re, ""), path.join(currentDir, packageName)); if (opts.traceResolution) { - stderr.write(` -> ${path.join(currentDir, packageName, indexName + extension.ext)}${EOL}`); + stderr.write(` -> ${path.join(currentDir, packageName, indexName + extension)}${EOL}`); } break; } @@ -689,7 +670,7 @@ export async function main(argv, options) { __unpin(textPtr); } else { const textPtr = __newString(null); // no need to pin - const pathPtr = __newString(internalPath + extension.ext); + const pathPtr = __newString(internalPath + extension); assemblyscript.parse(program, textPtr, pathPtr, false); } stats.parseTime += stats.end(begin); @@ -710,7 +691,7 @@ export async function main(argv, options) { let runtimeText = libraryFiles[runtimePath]; if (runtimeText == null) { runtimePath = runtimeName; - runtimeText = await readFile(runtimePath + extension.ext, baseDir); + runtimeText = await readFile(runtimePath + extension, baseDir); if (runtimeText == null) return prepareResult(Error(`Runtime '${runtimeName}' not found.`)); } else { runtimePath = `~lib/${runtimePath}`; @@ -718,7 +699,7 @@ export async function main(argv, options) { let begin = stats.begin(); stats.parseCount++; let textPtr = __pin(__newString(runtimeText)); - let pathPtr = __newString(runtimePath + extension.ext); + let pathPtr = __newString(runtimePath + extension); assemblyscript.parse(program, textPtr, pathPtr, true); __unpin(textPtr); stats.parseTime += stats.end(begin); @@ -729,7 +710,7 @@ export async function main(argv, options) { const filename = argv[i]; let sourcePath = String(filename) .replace(/\\/g, "/") - .replace(extension.re, "") + .replace(extension_re, "") .replace(/[\\/]$/, ""); // Setting the path to relative path @@ -738,14 +719,14 @@ export async function main(argv, options) { : sourcePath; // Try entryPath.ext, then entryPath/index.ext - let sourceText = await readFile(sourcePath + extension.ext, baseDir); + let sourceText = await readFile(sourcePath + extension, baseDir); if (sourceText == null) { - const path = `${sourcePath}/index${extension.ext}`; + const path = `${sourcePath}/index${extension}`; sourceText = await readFile(path, baseDir); if (sourceText != null) sourcePath = path; - else sourcePath += extension.ext; + else sourcePath += extension; } else { - sourcePath += extension.ext; + sourcePath += extension; } let begin = stats.begin(); @@ -1000,7 +981,7 @@ export async function main(argv, options) { let contents = []; for (let i = 0, k = map.sources.length; i < k; ++i) { let name = map.sources[i]; - let text = assemblyscript.getSource(program, __newString(name.replace(extension.re, ""))); + let text = assemblyscript.getSource(program, __newString(name.replace(extension_re, ""))); if (text == null) return prepareResult(Error(`Source of file '${name}' not found.`)); contents[i] = text; } @@ -1105,7 +1086,7 @@ export async function main(argv, options) { try { stats.readCount++; return (await fs.promises.readdir(path.join(baseDir, dirname))) - .filter(file => extension.re_except_d.test(file)); + .filter(file => extension_re_except_d.test(file)); } catch (e) { return null; } diff --git a/cli/options.json b/cli/options.json index 2bf22ee92c..9729606ce9 100644 --- a/cli/options.json +++ b/cli/options.json @@ -301,11 +301,6 @@ "type": "s", "default": "." }, - "extension": { - "description": "Specifies an alternative file extension to use.", - "type": "s", - "cliOnly": true - }, "noUnsafe": { "description": [ "Disallows the use of unsafe features in user code.", diff --git a/package.json b/package.json index 921412b29b..282be5c39d 100644 --- a/package.json +++ b/package.json @@ -65,11 +65,10 @@ "lint": "eslint --max-warnings 0 --ext js . && eslint --max-warnings 0 --ext ts .", "build": "node scripts/build", "watch": "node scripts/build --watch", - "test": "npm run test:parser && npm run test:compiler -- --parallel && npm run test:browser && npm run test:extension && npm run test:asconfig && npm run test:transform", + "test": "npm run test:parser && npm run test:compiler -- --parallel && npm run test:browser && npm run test:asconfig && npm run test:transform", "test:parser": "node --enable-source-maps tests/parser", "test:compiler": "node --enable-source-maps --experimental-wasi-unstable-preview1 --no-warnings tests/compiler", "test:browser": "node --enable-source-maps tests/browser", - "test:extension": "cd tests/extension && npm run test", "test:asconfig": "cd tests/asconfig && npm run test", "test:transform": "npm run test:transform:esm && npm run test:transform:cjs", "test:transform:esm": "node bin/asc tests/compiler/empty --transform ./tests/transform/index.js --noEmit && node bin/asc tests/compiler/empty --transform ./tests/transform/simple.js --noEmit", diff --git a/src/ast.ts b/src/ast.ts index 9075c417ed..6ed44eeeeb 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -29,8 +29,7 @@ import { import { normalizePath, resolvePath, - CharCode, - isAlphaOrDecimal + CharCode } from "./util"; import { diff --git a/tests/extension/assembly/index.as b/tests/extension/assembly/index.as deleted file mode 100644 index 923334a12e..0000000000 --- a/tests/extension/assembly/index.as +++ /dev/null @@ -1,2 +0,0 @@ -import { add } from "./other"; -add(1, 2); diff --git a/tests/extension/assembly/other.as b/tests/extension/assembly/other.as deleted file mode 100644 index caed355404..0000000000 --- a/tests/extension/assembly/other.as +++ /dev/null @@ -1,3 +0,0 @@ -export function add(a: i32, b: i32): i32 { - return a + b; -} diff --git a/tests/extension/package.json b/tests/extension/package.json deleted file mode 100644 index 0bfdd721eb..0000000000 --- a/tests/extension/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "scripts": { - "test": "npm run asbuild", - "asbuild": "node ../../bin/asc assembly/index.as --extension .as --noEmit" - } -} From 7fb896a8625e077ca09cc1bbaa245baea194a89e Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 9 Dec 2021 14:07:46 +0100 Subject: [PATCH 116/175] update fixture --- tests/compiler/issues/2166.optimized.wat | 3 +-- tests/compiler/issues/2166.untouched.wat | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/compiler/issues/2166.optimized.wat b/tests/compiler/issues/2166.optimized.wat index 49b551f77e..85a6ad6e83 100644 --- a/tests/compiler/issues/2166.optimized.wat +++ b/tests/compiler/issues/2166.optimized.wat @@ -1532,10 +1532,9 @@ br_if $folding-inner0 global.get $~lib/memory/__stack_pointer local.tee $0 - local.tee $1 i64.const 0 i64.store - local.get $1 + local.get $0 i32.const 0 i32.store offset=8 local.get $0 diff --git a/tests/compiler/issues/2166.untouched.wat b/tests/compiler/issues/2166.untouched.wat index 135d89b2f1..2f33a2b7d3 100644 --- a/tests/compiler/issues/2166.untouched.wat +++ b/tests/compiler/issues/2166.untouched.wat @@ -23,8 +23,8 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 608)) (global $~lib/memory/__data_end i32 (i32.const 652)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17036)) From 6a711e7a84d3c4d55ac7195bd82d8169a8b4f6fa Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 9 Dec 2021 14:19:02 +0100 Subject: [PATCH 117/175] fix? --- cli/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cli/index.js b/cli/index.js index 13a65fd274..2b27cd5782 100644 --- a/cli/index.js +++ b/cli/index.js @@ -653,9 +653,8 @@ export async function main(argv, options) { while ((backlog = getBacklog()).length) { let files = []; for (let internalPath of backlog) { - files.push( - getFile(internalPath, assemblyscript.getDependee(program, internalPath)) - ); + const dependee = __getString(assemblyscript.getDependee(program, __newString(internalPath))); + files.push(getFile(internalPath, dependee)); // queue } files = await Promise.all(files); // parallel for (let i = 0, k = backlog.length; i < k; ++i) { From 34b1212cc87d687be5d9c01aaa68b2400dc96f40 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 9 Dec 2021 14:26:29 +0100 Subject: [PATCH 118/175] nuke more options --- cli/index.d.ts | 4 ---- cli/index.js | 19 ------------------- cli/options.json | 23 ++++++----------------- tests/compiler/packages.json | 1 - 4 files changed, 6 insertions(+), 41 deletions(-) diff --git a/cli/index.d.ts b/cli/index.d.ts index 343910b91a..3e686493db 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -152,10 +152,6 @@ export interface CompilerOptions { transform?: string | string[]; /** Make yourself sad for no good reason. */ pedantic?: boolean; - /** Enables tracing of package resolution. */ - traceResolution?: boolean; - /** Lists files to be compiled and exits. */ - listFiles?: boolean; /** Prints measuring information on I/O and compile times. */ measure?: boolean; /** Disables terminal colors. */ diff --git a/cli/index.js b/cli/index.js index 2b27cd5782..6b74e04b71 100644 --- a/cli/index.js +++ b/cli/index.js @@ -595,9 +595,6 @@ export async function main(argv, options) { const packageName = match[1]; const filePath = match[2] || "index"; const basePath = packageBases.has(dependeePath) ? packageBases.get(dependeePath) : "."; - if (opts.traceResolution) { - stderr.write(`Looking for package '${packageName}' file '${filePath}' relative to '${basePath}'${EOL}`); - } const paths = []; const parts = path.resolve(baseDir, basePath).split(SEP); for (let i = parts.length, k = WIN ? 1 : 0; i >= k; --i) { @@ -607,25 +604,16 @@ export async function main(argv, options) { } paths.push(...opts.path); for (const currentDir of paths.map(p => path.relative(baseDir, p))) { - if (opts.traceResolution) { - stderr.write(` in ${path.join(currentDir, packageName)}${EOL}`); - } const plainName = filePath; if ((sourceText = await readFile(path.join(currentDir, packageName, plainName + extension), baseDir)) != null) { sourcePath = `${libraryPrefix}${packageName}/${plainName}${extension}`; packageBases.set(sourcePath.replace(extension_re, ""), path.join(currentDir, packageName)); - if (opts.traceResolution) { - stderr.write(` -> ${path.join(currentDir, packageName, plainName + extension)}${EOL}`); - } break; } const indexName = `${filePath}/index`; if ((sourceText = await readFile(path.join(currentDir, packageName, indexName + extension), baseDir)) != null) { sourcePath = `${libraryPrefix}${packageName}/${indexName}${extension}`; packageBases.set(sourcePath.replace(extension_re, ""), path.join(currentDir, packageName)); - if (opts.traceResolution) { - stderr.write(` -> ${path.join(currentDir, packageName, indexName + extension)}${EOL}`); - } break; } } @@ -755,13 +743,6 @@ export async function main(argv, options) { if (code) return code; } - // Print files and exit if listFiles - if (opts.listFiles) { - // FIXME: not a proper C-like API - stderr.write(program.sources.map(s => s.normalizedPath).sort().join(EOL) + EOL); - return prepareResult(null); - } - // Pre-emptively initialize the program { let begin = stats.begin(); diff --git a/cli/options.json b/cli/options.json index 9729606ce9..6499dfb329 100644 --- a/cli/options.json +++ b/cli/options.json @@ -11,12 +11,6 @@ "type": "b", "alias": "h" }, - "noColors": { - "category": "General", - "description": "Disables terminal colors.", - "type": "b", - "default": false - }, "config": { "category": "General", "description": "Configuration file to apply. CLI arguments take precedence.", @@ -25,7 +19,7 @@ }, "target": { "category": "General", - "description": "Target configuration to use. Defaults to 'release'.", + "description": "Configuration file target to use. Defaults to 'release'.", "type": "s", "cliOnly": true }, @@ -301,6 +295,11 @@ "type": "s", "default": "." }, + "noColors": { + "description": "Disables terminal colors.", + "type": "b", + "default": false + }, "noUnsafe": { "description": [ "Disallows the use of unsafe features in user code.", @@ -346,16 +345,6 @@ "type": "S", "isPath": true }, - "traceResolution": { - "description": "Enables tracing of package resolution.", - "type": "b", - "default": false - }, - "listFiles": { - "description": "Lists files to be compiled and exits.", - "type": "b", - "default": false - }, "wasm": { "description": "Uses the specified Wasm binary of the compiler.", "type": "s" diff --git a/tests/compiler/packages.json b/tests/compiler/packages.json index 7b611bf9d2..1bdd02b1be 100644 --- a/tests/compiler/packages.json +++ b/tests/compiler/packages.json @@ -1,5 +1,4 @@ { "asc_flags": [ - "--traceResolution" ] } From 81ef12831c50a714fe10efede91b5fe3011fd7a6 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 9 Dec 2021 14:34:07 +0100 Subject: [PATCH 119/175] update Binaryen --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 35414d97f0..8b989f609f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "binaryen": "103.0.0-nightly.20211203", + "binaryen": "103.0.0-nightly.20211209", "long": "^5.2.0" }, "bin": { @@ -20,7 +20,7 @@ "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", "diff": "^5.0.0", - "esbuild": "^0.14.0", + "esbuild": "^0.14.1", "eslint": "^8.2.0", "glob": "^7.2.0", "typescript": "~4.5.2" @@ -375,9 +375,9 @@ "dev": true }, "node_modules/binaryen": { - "version": "103.0.0-nightly.20211203", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-103.0.0-nightly.20211203.tgz", - "integrity": "sha512-9TJGLGFKIg4n5R1BwlAEDDppWIE4rYzdHsRU9Ck11mByUC7Sp/ss6Jn1L+glOt1iw1b4EmPvjh1J8JZpxGxu/Q==", + "version": "103.0.0-nightly.20211209", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-103.0.0-nightly.20211209.tgz", + "integrity": "sha512-hJwgeNIFVV0mHYjOlCq0DdnCj00wEEIwPl5MKtd2G5j9JyX9iHL5mG4ummuygkD23tmgBjSbNLKAwcN7lHWx0g==", "bin": { "wasm-opt": "bin/wasm-opt", "wasm2js": "bin/wasm2js" @@ -2016,9 +2016,9 @@ "dev": true }, "binaryen": { - "version": "103.0.0-nightly.20211203", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-103.0.0-nightly.20211203.tgz", - "integrity": "sha512-9TJGLGFKIg4n5R1BwlAEDDppWIE4rYzdHsRU9Ck11mByUC7Sp/ss6Jn1L+glOt1iw1b4EmPvjh1J8JZpxGxu/Q==" + "version": "103.0.0-nightly.20211209", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-103.0.0-nightly.20211209.tgz", + "integrity": "sha512-hJwgeNIFVV0mHYjOlCq0DdnCj00wEEIwPl5MKtd2G5j9JyX9iHL5mG4ummuygkD23tmgBjSbNLKAwcN7lHWx0g==" }, "brace-expansion": { "version": "1.1.11", diff --git a/package.json b/package.json index 282be5c39d..01b437c635 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "103.0.0-nightly.20211203", + "binaryen": "103.0.0-nightly.20211209", "long": "^5.2.0" }, "devDependencies": { From 40dceea9309f7717051c4f9cb8c61645475ae8b9 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 9 Dec 2021 17:18:32 +0100 Subject: [PATCH 120/175] rename --measure to --stats --- cli/index.js | 2 +- cli/options.json | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cli/index.js b/cli/index.js index 6b74e04b71..6bccecd875 100644 --- a/cli/index.js +++ b/cli/index.js @@ -1032,7 +1032,7 @@ export async function main(argv, options) { return prepareResult(err); } - if (opts.measure) stderr.write(stats.toString()); + if (opts.stats) stderr.write(stats.toString()); return prepareResult(null); diff --git a/cli/options.json b/cli/options.json index 6499dfb329..ffbce45662 100644 --- a/cli/options.json +++ b/cli/options.json @@ -318,8 +318,8 @@ "type": "b", "default": false }, - "measure": { - "description": "Prints measuring information on I/O and compile times.", + "stats": { + "description": "Prints statistics on I/O and compile times.", "type": "b", "default": false }, @@ -367,5 +367,6 @@ "-O2z": { "value": { "optimizeLevel": 2, "shrinkLevel": 2 } }, "-O3z": { "value": { "optimizeLevel": 3, "shrinkLevel": 2 } }, "-Ospeed": { "value": { "optimizeLevel": 3, "shrinkLevel": 0 } }, - "-Osize": { "value": { "optimizeLevel": 0, "shrinkLevel": 2, "converge": true } } + "-Osize": { "value": { "optimizeLevel": 0, "shrinkLevel": 2, "converge": true } }, + "--measure": { "value": { "stats": true } } } From 81827794826fbbbf63dc39a34309ad7f4fbdaa4f Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 9 Dec 2021 17:20:40 +0100 Subject: [PATCH 121/175] fix unknown option warning --- cli/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/index.js b/cli/index.js index 6bccecd875..7d4b74d368 100644 --- a/cli/index.js +++ b/cli/index.js @@ -201,7 +201,7 @@ export async function main(argv, options) { if (unknownOpts.length) { unknownOpts.forEach(arg => { stderr.write( - `${stderrColors.yellow("WARNING ")}Unknown option '${arg}'%{EOL}` + `${stderrColors.yellow("WARNING ")}Unknown option '${arg}'${EOL}` ); }); } From 541a1cd921923b8ef8905e3bb3e538299043aecb Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 9 Dec 2021 18:38:13 +0100 Subject: [PATCH 122/175] fix --- tests/browser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/browser.js b/tests/browser.js index 3be84bbd36..0661990ef2 100644 --- a/tests/browser.js +++ b/tests/browser.js @@ -54,7 +54,7 @@ console.log("\n# asc index.ts --textFile"); console.log("\n# asc.compileString"); { - const { stdout, stderr, text, binary } = await asc.compileString(`export function test(): void {}`, { optimizeLevel: 3, exportTable: true, measure: true }); + const { stdout, stderr, text, binary } = await asc.compileString(`export function test(): void {}`, { optimizeLevel: 3, exportTable: true, stats: true }); console.log(">>> .stdout >>>"); process.stdout.write(stdout.toString()); console.log(">>> .stderr >>>"); From 15c47ea09abc3eca73ac84104f1560c9aa2eeff6 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 11 Dec 2021 18:44:22 +0100 Subject: [PATCH 123/175] use incremental in cli build as well --- scripts/build.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build.js b/scripts/build.js index e2ed22bf1f..73c4a3f3d7 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -234,6 +234,7 @@ const cliBuild = esbuild.build({ js: prelude("The AssemblyScript frontend") }, watch, + incremental: watch, plugins: [ stdlibPlugin, webPlugin, reportPlugin("cli") ] }); From c83998634fe64e28eb1ea0271decd28cd6bc36ed Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 11 Dec 2021 18:55:49 +0100 Subject: [PATCH 124/175] better --- scripts/build.js | 47 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/scripts/build.js b/scripts/build.js index 73c4a3f3d7..45ac88545a 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -195,47 +195,36 @@ const webPlugin = { // Build compiler and CLI -const externals = [ "assemblyscript", "binaryen", "long" ]; - -const srcBuild = esbuild.build({ - tsconfig: "./src/tsconfig.json", - entryPoints: [ "./src/index-js.ts" ], - bundle: true, +const common = { target: "esnext", - outfile: "./dist/assemblyscript.js", platform: "node", format: "esm", + external: [ "assemblyscript", "binaryen", "long" ], + legalComments: "none", + bundle: true, sourcemap: true, - external: externals, treeShaking: true, minify: true, - legalComments: "none", - banner: { - js: prelude("The AssemblyScript compiler") - }, watch, - incremental: watch, - plugins: [ diagnosticsPlugin, reportPlugin("src") ] + incremental: watch +}; + +const srcBuild = esbuild.build({ + entryPoints: [ "./src/index-js.ts" ], + tsconfig: "./src/tsconfig.json", + outfile: "./dist/assemblyscript.js", + banner: { js: prelude("The AssemblyScript compiler") }, + plugins: [ diagnosticsPlugin, reportPlugin("src") ], + ...common }); const cliBuild = esbuild.build({ entryPoints: [ "./cli/index.js" ], - bundle: true, - target: "esnext", + tsconfig: "./cli/tsconfig.json", outfile: "./dist/asc.js", - platform: "node", - format: "esm", - sourcemap: true, - external: externals, - treeShaking: true, - minify: true, - legalComments: "none", - banner: { - js: prelude("The AssemblyScript frontend") - }, - watch, - incremental: watch, - plugins: [ stdlibPlugin, webPlugin, reportPlugin("cli") ] + banner: { js: prelude("The AssemblyScript frontend") }, + plugins: [ stdlibPlugin, webPlugin, reportPlugin("cli") ], + ...common }); // Optionally build definitions (takes a while) From 1d3c4beee465f861ff2492f4f0137d23526da282 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 12 Dec 2021 20:17:07 +0100 Subject: [PATCH 125/175] Update cli/README.md Co-authored-by: Max Graey --- cli/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/README.md b/cli/README.md index 43b50a5943..cabb06c762 100644 --- a/cli/README.md +++ b/cli/README.md @@ -23,7 +23,7 @@ const { error, stdout } = await asc.main([ "--binaryFile", "myModule.wasm", "--optimize", "--sourceMap", - "--measure" + "--stats" ]); if (error) { console.log("Compilation failed: " + error.message); From 0ff082076fe1b0a12b14d4f25c0daf542c8d718e Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 12 Dec 2021 20:17:15 +0100 Subject: [PATCH 126/175] Update cli/index.js Co-authored-by: Max Graey --- cli/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/index.js b/cli/index.js index 7d4b74d368..5d9c1760c6 100644 --- a/cli/index.js +++ b/cli/index.js @@ -330,6 +330,7 @@ export async function main(argv, options) { switch (opts.runtime) { case "stub": runtime = 0; break; case "minimal": runtime = 1; break; + /* incremental */ default: runtime = 2; break; } assemblyscript.setTarget(compilerOptions, 0); From 2b6428f4cc0b7b12c9756cdbe3e5ef60d802cf36 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 12 Dec 2021 20:17:21 +0100 Subject: [PATCH 127/175] Update tests/allocators/default/package.json Co-authored-by: Max Graey --- tests/allocators/default/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/allocators/default/package.json b/tests/allocators/default/package.json index 44552fb8b4..4990b858e0 100644 --- a/tests/allocators/default/package.json +++ b/tests/allocators/default/package.json @@ -3,7 +3,7 @@ "type": "module", "scripts": { "build": "npm run build:untouched && npm run build:optimized", - "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --sourceMap --measure --debug", + "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --sourceMap --stats --debug", "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --sourceMap --measure --noAssert --optimize" } } From e17a6ca9ba4254d8e3501e5e604408d6220fee44 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 12 Dec 2021 20:17:31 +0100 Subject: [PATCH 128/175] Update cli/index.d.ts Co-authored-by: Max Graey --- cli/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/index.d.ts b/cli/index.d.ts index 3e686493db..a1cfab4a3d 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -153,7 +153,7 @@ export interface CompilerOptions { /** Make yourself sad for no good reason. */ pedantic?: boolean; /** Prints measuring information on I/O and compile times. */ - measure?: boolean; + stats?: boolean; /** Disables terminal colors. */ noColors?: boolean; } From 556f0dfe87b646f85029ab0e69eb28d6e2e7af0d Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 13 Dec 2021 08:11:22 +0100 Subject: [PATCH 129/175] sync fixtures --- tests/compiler/std-wasi/console.untouched.wat | 12 +++++++++++- tests/compiler/std-wasi/process.optimized.wat | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/compiler/std-wasi/console.untouched.wat b/tests/compiler/std-wasi/console.untouched.wat index b951ce79bb..6d33e81c83 100644 --- a/tests/compiler/std-wasi/console.untouched.wat +++ b/tests/compiler/std-wasi/console.untouched.wat @@ -234,6 +234,16 @@ i32.const 1 i32.add local.set $6 + local.get $3 + local.get $8 + i32.eqz + i32.and + if + local.get $6 + local.get $2 + i32.sub + return + end else local.get $8 i32.const 2048 @@ -367,7 +377,7 @@ if i32.const 160 i32.const 224 - i32.const 739 + i32.const 741 i32.const 49 call $~lib/wasi/index/abort unreachable diff --git a/tests/compiler/std-wasi/process.optimized.wat b/tests/compiler/std-wasi/process.optimized.wat index 41e6b3d343..c0b7cbced6 100644 --- a/tests/compiler/std-wasi/process.optimized.wat +++ b/tests/compiler/std-wasi/process.optimized.wat @@ -5889,7 +5889,7 @@ if i32.const 0 i32.const 1200 - i32.const 767 + i32.const 769 i32.const 7 call $~lib/wasi/index/abort unreachable From df054ba0f5737d77b805cbfc1f62f983ab635799 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 13 Dec 2021 10:47:19 +0100 Subject: [PATCH 130/175] more measure -> stats --- src/asconfig.json | 2 +- tests/allocators/default/package.json | 2 +- tests/allocators/stub/package.json | 4 ++-- tests/asconfig/complicated/asconfig.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/asconfig.json b/src/asconfig.json index 2335eca294..ccfe2c617d 100644 --- a/src/asconfig.json +++ b/src/asconfig.json @@ -8,7 +8,7 @@ "exportRuntime": true, "initialMemory": 768, "runtime": "incremental", - "measure": true + "stats": true }, "targets": { "untouched": { diff --git a/tests/allocators/default/package.json b/tests/allocators/default/package.json index 4990b858e0..c3ed052949 100644 --- a/tests/allocators/default/package.json +++ b/tests/allocators/default/package.json @@ -4,6 +4,6 @@ "scripts": { "build": "npm run build:untouched && npm run build:optimized", "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --sourceMap --stats --debug", - "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --sourceMap --measure --noAssert --optimize" + "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --sourceMap --stats --noAssert --optimize" } } diff --git a/tests/allocators/stub/package.json b/tests/allocators/stub/package.json index c15f70749b..2ffecd2a01 100644 --- a/tests/allocators/stub/package.json +++ b/tests/allocators/stub/package.json @@ -3,7 +3,7 @@ "type": "module", "scripts": { "build": "npm run build:untouched && npm run build:optimized", - "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --runtime stub --sourceMap --measure", - "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --runtime stub --sourceMap --measure --noAssert --optimize" + "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --runtime stub --sourceMap --stats", + "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --runtime stub --sourceMap --stats --noAssert --optimize" } } diff --git a/tests/asconfig/complicated/asconfig.json b/tests/asconfig/complicated/asconfig.json index 0a8e106ebc..a1226061a3 100644 --- a/tests/asconfig/complicated/asconfig.json +++ b/tests/asconfig/complicated/asconfig.json @@ -5,7 +5,7 @@ "exportRuntime": true, "initialMemory": 30, "explicitStart": true, - "measure": true, + "stats": true, "pedantic": true, "sourceMap": true } From 83e06327e4d01cf647f6e4983b0ec2ad30144393 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 13 Dec 2021 17:40:40 +0100 Subject: [PATCH 131/175] explicitStart -> exportStart --- cli/index.d.ts | 4 +-- cli/index.js | 4 +-- cli/options.json | 17 +++++---- lib/loader/index.d.ts | 3 -- lib/rtrace/README.md | 6 ++-- lib/rtrace/tlsfvis.html | 2 +- src/asconfig.json | 2 +- src/bindings.ts | 8 +++-- src/compiler.ts | 36 +++++++++++++------ src/diagnosticMessages.json | 1 + src/index.ts | 6 ++-- src/util/text.ts | 11 ++++++ tests/README.md | 2 +- tests/asconfig/complicated/asconfig.json | 2 +- tests/asconfig/index.js | 2 +- tests/compiler.js | 7 ++-- tests/compiler/class-overloading-cast.json | 2 +- tests/compiler/class-overloading.json | 2 +- tests/compiler/features/gc.json | 2 +- .../features/js-bigint-integration.json | 2 +- tests/compiler/features/mutable-globals.json | 2 +- tests/compiler/features/nontrapping-f2i.json | 2 +- tests/compiler/rt/finalize.json | 2 +- tests/compiler/rt/instanceof.json | 2 +- tests/compiler/std-wasi/console.json | 2 +- tests/compiler/std-wasi/crypto.json | 2 +- tests/compiler/std-wasi/process.json | 2 +- tests/compiler/std/array.json | 2 +- tests/compiler/std/date.json | 2 +- tests/compiler/std/symbol.json | 2 +- tests/compiler/std/trace.json | 2 +- tests/compiler/templateliteral.json | 2 +- tests/compiler/typeof.json | 2 +- tests/compiler/wasi/abort.optimized.wat | 2 +- tests/compiler/wasi/abort.untouched.wat | 2 +- tests/compiler/wasi/seed.optimized.wat | 2 +- tests/compiler/wasi/seed.untouched.wat | 2 +- 37 files changed, 95 insertions(+), 60 deletions(-) diff --git a/cli/index.d.ts b/cli/index.d.ts index a1cfab4a3d..adcbf26b97 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -130,8 +130,8 @@ export interface CompilerOptions { importTable?: boolean; /** Exports the function table as 'table'. */ exportTable?: boolean; - /** Exports an explicit start function to be called manually. */ - explicitStart?: boolean; + /** Exports the start function instead of calling it implicitly. */ + exportStart?: string; /** "Adds one or multiple paths to custom library components. */ lib?: string | string[]; /** Adds one or multiple paths to package resolution. */ diff --git a/cli/index.js b/cli/index.js index 5d9c1760c6..78fe9f8cd5 100644 --- a/cli/index.js +++ b/cli/index.js @@ -82,7 +82,7 @@ if (~wasmPos) { __unpin, __collect } = assemblyscript); - if (assemblyscript._start) assemblyscript._start(); + if (assemblyscript._initialize) assemblyscript._initialize(); } const require = module.createRequire(import.meta.url); @@ -343,7 +343,7 @@ export async function main(argv, options) { assemblyscript.setSharedMemory(compilerOptions, opts.sharedMemory); assemblyscript.setImportTable(compilerOptions, opts.importTable); assemblyscript.setExportTable(compilerOptions, opts.exportTable); - assemblyscript.setExplicitStart(compilerOptions, opts.explicitStart); + assemblyscript.setExportStart(compilerOptions, __newString(typeof opts.exportStart === "string" ? opts.exportStart : null)); assemblyscript.setMemoryBase(compilerOptions, opts.memoryBase >>> 0); assemblyscript.setTableBase(compilerOptions, opts.tableBase >>> 0); assemblyscript.setSourceMap(compilerOptions, opts.sourceMap != null); diff --git a/cli/options.json b/cli/options.json index ffbce45662..7ca6573e36 100644 --- a/cli/options.json +++ b/cli/options.json @@ -138,7 +138,7 @@ }, "zeroFilledMemory": { "category": "Features", - "description": "Assume that imported memory is zero filled. Requires importMemory.", + "description": "Assume imported memory is zeroed. Requires importMemory.", "type": "b", "default": false }, @@ -154,6 +154,15 @@ "type": "b", "default": false }, + "exportStart": { + "category": "Features", + "description": [ + "Exports the start function using the specified name instead", + "of calling it implicitly. Useful for WASI or to obtain the", + "exported memory before executing any code accessing it." + ], + "type": "s" + }, "runtime": { "category": "Features", "description": [ @@ -184,12 +193,6 @@ "default": 0, "type": "i" }, - "explicitStart": { - "category": "Features", - "description": "Exports an explicit '_start' function to call.", - "type": "b", - "default": false - }, "enable": { "category": "Features", "description": [ diff --git a/lib/loader/index.d.ts b/lib/loader/index.d.ts index 8db7280e14..f0e484ab6b 100644 --- a/lib/loader/index.d.ts +++ b/lib/loader/index.d.ts @@ -24,9 +24,6 @@ export interface ASUtil { memory?: WebAssembly.Memory; table?: WebAssembly.Table; - /** Explicit start function, if requested. */ - _start(): void; - /** Copies a string's value from the module's memory. */ __getString(ptr: number): string; /** Copies an ArrayBuffer's value from the module's memory. */ diff --git a/lib/rtrace/README.md b/lib/rtrace/README.md index 27635a6824..622f41a1fd 100644 --- a/lib/rtrace/README.md +++ b/lib/rtrace/README.md @@ -5,7 +5,7 @@ A tiny utility to sanitize the AssemblyScript runtime. Records allocations and f Instructions ------------ -Compile your module that uses the full or half runtime with `-use ASC_RTRACE=1 --explicitStart` and include an instance of this module as the import named `rtrace`. +Compile your module that uses the full or half runtime with `-use ASC_RTRACE=1 --exportStart _initialize` and include an instance of this module as the import named `rtrace`. ```js const rtrace = new Rtrace({ @@ -17,7 +17,7 @@ const rtrace = new Rtrace({ }, getMemory() { // obtain the module's memory, - // e.g. with --explicitStart: + // e.g. using --exportStart: return instance.exports.memory; } }); @@ -27,7 +27,7 @@ const { module, instance } = await WebAssembly.instantiate(..., ...imports... }) ); -instance.exports._start(); +instance.exports._initialize(); ... if (rtrace.active) { diff --git a/lib/rtrace/tlsfvis.html b/lib/rtrace/tlsfvis.html index aa359833a3..f7783c9f38 100644 --- a/lib/rtrace/tlsfvis.html +++ b/lib/rtrace/tlsfvis.html @@ -27,7 +27,7 @@ }) ).then(result => { exports = result.instance.exports; - if (exports._start) exports._start(); + if (exports._initialize) exports._initialize(); U32 = new Uint32Array(exports.memory.buffer); var first = exports.__alloc(255); exports.__free(first); diff --git a/src/asconfig.json b/src/asconfig.json index ccfe2c617d..dc305396c9 100644 --- a/src/asconfig.json +++ b/src/asconfig.json @@ -4,7 +4,7 @@ "./index.ts" ], "options": { - "explicitStart": true, + "exportStart": "_initialize", "exportRuntime": true, "initialMemory": 768, "runtime": "incremental", diff --git a/src/bindings.ts b/src/bindings.ts index ba09db5ddb..3fe37e700f 100644 --- a/src/bindings.ts +++ b/src/bindings.ts @@ -41,6 +41,7 @@ import { import { indent } from "./util"; +import { ExportNames } from "."; /** Walker base class. */ export abstract class ExportsWalker { @@ -435,8 +436,11 @@ export class TSDBuilder extends ExportsWalker { if (options.exportTable) { sb.push("export const table: WebAssembly.Table;\n"); } - if (options.explicitStart) { - sb.push("export function _start(): void;\n"); + let exportStart = options.exportStart || null; + if (exportStart !== null) { + sb.push("export function "); + sb.push(exportStart); + sb.push("(): void;\n"); } if (options.exportRuntime) { sb.push("export function __new(size: usize, id: u32): usize;\n"); diff --git a/src/compiler.ts b/src/compiler.ts index eb629cc25b..30d07468a8 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -197,7 +197,8 @@ import { uniqueMap, isPowerOf2, v128_zero, - readI32 + readI32, + isIdentifier } from "./util"; import { @@ -235,8 +236,8 @@ export class Options { exportTable: bool = false; /** If true, generates information necessary for source maps. */ sourceMap: bool = false; - /** If true, generates an explicit start function. */ - explicitStart: bool = false; + /** If given, exports the start function instead of calling it implicitly. */ + exportStart: string | null = null; /** Static memory start offset. */ memoryBase: u32 = 0; /** Static table start offset. */ @@ -338,8 +339,6 @@ export const enum RuntimeFeatures { /** Exported names of compiler-generated elements. */ export namespace ExportNames { - /** Name of the explicit start function, if applicable. */ - export const start = "_start"; // match WASI /** Name of the argumentsLength varargs helper global. */ export const argumentsLength = "__argumentsLength"; /** Name of the alternative argumentsLength setter function. */ @@ -401,6 +400,8 @@ export class Compiler extends DiagnosticEmitter { doneModuleExports: Set = new Set(); /** Shadow stack reference. */ shadowStack!: ShadowStackPass; + /** Whether the module has custom function exports. */ + hasCustomFunctionExports: bool = false; /** Compiles a {@link Program} to a {@link Module} using the specified options. */ static compile(program: Program): Module { @@ -735,10 +736,15 @@ export class Compiler extends DiagnosticEmitter { // compile the start function if not empty or if explicitly requested var startIsEmpty = !startFunctionBody.length; - var explicitStart = program.isWasi || options.explicitStart; - if (!startIsEmpty || explicitStart) { + var exportStart = options.exportStart; + if (program.isWasi && !exportStart) { + // Try to do the right thing for WASI. If the module has custom function + // exports it is likely a reactor, otherwise it is likely a command. + exportStart = this.hasCustomFunctionExports ? "_initialize" : "_start"; + } + if (!startIsEmpty || exportStart !== null) { let signature = startFunctionInstance.signature; - if (!startIsEmpty && explicitStart) { + if (!startIsEmpty && exportStart !== null) { module.addGlobal(BuiltinNames.started, TypeRef.I32, true, module.i32(0)); startFunctionBody.unshift( module.global_set(BuiltinNames.started, module.i32(1)) @@ -758,8 +764,17 @@ export class Compiler extends DiagnosticEmitter { module.flatten(startFunctionBody) ); startFunctionInstance.finalize(module, funcRef); - if (!explicitStart) module.setStart(funcRef); - else module.addFunctionExport(startFunctionInstance.internalName, ExportNames.start); + if (exportStart === null) module.setStart(funcRef); + else { + if (!isIdentifier(exportStart) || module.hasExport(exportStart)) { + this.error( + DiagnosticCode.Start_function_name_0_is_invalid_or_conflicts_with_another_export, + this.program.nativeRange, exportStart + ); + } else { + module.addFunctionExport(startFunctionInstance.internalName, exportStart); + } + } } // Run custom passes @@ -899,6 +914,7 @@ export class Compiler extends DiagnosticEmitter { let exportName = prefix + name; if (!module.hasExport(exportName)) { module.addFunctionExport(functionInstance.internalName, exportName); + this.hasCustomFunctionExports = true; if (signature.hasManagedOperands) { this.shadowStack.noteExport(exportName, signature.getManagedOperandIndices()); } diff --git a/src/diagnosticMessages.json b/src/diagnosticMessages.json index 15fa9b38ed..aa9f52a51a 100644 --- a/src/diagnosticMessages.json +++ b/src/diagnosticMessages.json @@ -9,6 +9,7 @@ "Shared memory requires maximum memory to be defined.": 107, "Shared memory requires feature 'threads' to be enabled.": 108, "Transform '{0}': {1}": 109, + "Start function name '{0}' is invalid or conflicts with another export.": 110, "Conversion from type '{0}' to '{1}' requires an explicit cast.": 200, "Conversion from type '{0}' to '{1}' will require an explicit cast when switching between 32/64-bit.": 201, diff --git a/src/index.ts b/src/index.ts index 912dbc1f5c..fe27658c4a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -118,9 +118,9 @@ export function setGlobalAlias(options: Options, alias: string, name: string): v globalAliases.set(alias, name); } -/** Sets the `explicitStart` option. */ -export function setExplicitStart(options: Options, explicitStart: bool): void { - options.explicitStart = explicitStart; +/** Sets the `exportStart` option. */ +export function setExportStart(options: Options, exportStart: string | null): void { + options.exportStart = exportStart; } /** Sets the `noUnsafe` option. */ diff --git a/src/util/text.ts b/src/util/text.ts index 6b3598e061..3d7af2cf0d 100644 --- a/src/util/text.ts +++ b/src/util/text.ts @@ -263,6 +263,17 @@ export function isIdentifierPart(c: i32): bool { && lookupInUnicodeMap(c as u16, unicodeIdentifierPart); } +/** Tests if the specified string is a valid identifer. */ +export function isIdentifier(str: string): bool { + var len = str.length; + if (!len) return false; + if (!isIdentifierStart(str.charCodeAt(0))) return false; + for (let i = 1; i < len; ++i) { + if (!isIdentifierPart(str.charCodeAt(i))) return false; + } + return true; +} + // storing as u16 to save memory const unicodeIdentifierStart: u16[] = [ 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, diff --git a/tests/README.md b/tests/README.md index 17b393f098..3bbaef5656 100644 --- a/tests/README.md +++ b/tests/README.md @@ -81,7 +81,7 @@ and post instantiation of the module, with the following export signatures: * **preInstantiate**(imports: `object`, exports: `object`): `void`
Can be used to populate imports with functionality required by the test. Note that `exports` is an empty object that will be populated with the actual exports after instantiation. Useful if an import - needs to call an export (usually in combination with the `--explicitStart` flag). + needs to call an export (usually in combination with the `--exportStart` flag). * **postInstantiate**(instance: `WebAssembly.Instance`): `void`
Can be used to execute custom test logic once the module is ready. Throwing an error will fail the diff --git a/tests/asconfig/complicated/asconfig.json b/tests/asconfig/complicated/asconfig.json index a1226061a3..991cbf8a7a 100644 --- a/tests/asconfig/complicated/asconfig.json +++ b/tests/asconfig/complicated/asconfig.json @@ -4,7 +4,7 @@ "optimize": true, "exportRuntime": true, "initialMemory": 30, - "explicitStart": true, + "exportStart": "_start", "stats": true, "pedantic": true, "sourceMap": true diff --git a/tests/asconfig/index.js b/tests/asconfig/index.js index 944c22b76b..e81d18dfa1 100644 --- a/tests/asconfig/index.js +++ b/tests/asconfig/index.js @@ -10,7 +10,7 @@ const args = process.argv.slice(2); /** @type {Uint8Array} */ let binary; -const { error, stderr } = await asc.main(["assembly/index.ts", "--outFile", "output.wasm", "--explicitStart", ...args], { +const { error, stderr } = await asc.main(["assembly/index.ts", "--outFile", "output.wasm", "--exportStart", "_start", ...args], { writeFile(name, contents) { if (name === "output.wasm") { binary = contents; diff --git a/tests/compiler.js b/tests/compiler.js index b18dae4001..a53cacc300 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -298,7 +298,7 @@ async function runTest(basename) { "--binaryFile", // -> stdout "--debug", "--use", "ASC_RTRACE=1", - "--explicitStart", + "--exportStart", "_initialize", // "--runPasses", "instrument-memory" ]; if (asc_flags) cmd.push(...asc_flags); @@ -395,8 +395,11 @@ async function testInstantiate(binaryBuffer, glue, stderr, wasiOptions) { const code = wasi.start(instance); console.log(" [wasi exit] code=" + code); } else if (exports._start) { - console.log(" [call start]"); + console.log(" [call _start]"); exports._start(); + } else if (exports._initialize) { + console.log(" [call _initialize]"); + exports._initialize(); } if (glue.postStart) { console.log(" [call postStart]"); diff --git a/tests/compiler/class-overloading-cast.json b/tests/compiler/class-overloading-cast.json index 1b3c185bda..d89aa6d3b8 100644 --- a/tests/compiler/class-overloading-cast.json +++ b/tests/compiler/class-overloading-cast.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ] } diff --git a/tests/compiler/class-overloading.json b/tests/compiler/class-overloading.json index 1b3c185bda..d89aa6d3b8 100644 --- a/tests/compiler/class-overloading.json +++ b/tests/compiler/class-overloading.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ] } diff --git a/tests/compiler/features/gc.json b/tests/compiler/features/gc.json index ed1300131d..f90012c0fb 100644 --- a/tests/compiler/features/gc.json +++ b/tests/compiler/features/gc.json @@ -3,7 +3,7 @@ "gc" ], "asc_flags": [ - "--explicitStart", + "--exportStart", "_start", "--noValidate" ], "skipInstantiate": true diff --git a/tests/compiler/features/js-bigint-integration.json b/tests/compiler/features/js-bigint-integration.json index e8e76ac898..6f0734818b 100644 --- a/tests/compiler/features/js-bigint-integration.json +++ b/tests/compiler/features/js-bigint-integration.json @@ -3,6 +3,6 @@ "bigint-integration" ], "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ] } diff --git a/tests/compiler/features/mutable-globals.json b/tests/compiler/features/mutable-globals.json index b227d5c3d9..46620cb015 100644 --- a/tests/compiler/features/mutable-globals.json +++ b/tests/compiler/features/mutable-globals.json @@ -3,6 +3,6 @@ "mutable-globals" ], "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ] } diff --git a/tests/compiler/features/nontrapping-f2i.json b/tests/compiler/features/nontrapping-f2i.json index 1e3d40d020..15cc7bd4ae 100644 --- a/tests/compiler/features/nontrapping-f2i.json +++ b/tests/compiler/features/nontrapping-f2i.json @@ -3,6 +3,6 @@ "nontrapping-f2i" ], "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ] } diff --git a/tests/compiler/rt/finalize.json b/tests/compiler/rt/finalize.json index 1b3c185bda..d89aa6d3b8 100644 --- a/tests/compiler/rt/finalize.json +++ b/tests/compiler/rt/finalize.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ] } diff --git a/tests/compiler/rt/instanceof.json b/tests/compiler/rt/instanceof.json index 1b3c185bda..d89aa6d3b8 100644 --- a/tests/compiler/rt/instanceof.json +++ b/tests/compiler/rt/instanceof.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ] } diff --git a/tests/compiler/std-wasi/console.json b/tests/compiler/std-wasi/console.json index cce2bd869a..7d7fd4a682 100644 --- a/tests/compiler/std-wasi/console.json +++ b/tests/compiler/std-wasi/console.json @@ -1,6 +1,6 @@ { "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ], "asc_wasi": { "args": [], diff --git a/tests/compiler/std-wasi/crypto.json b/tests/compiler/std-wasi/crypto.json index cce2bd869a..7d7fd4a682 100644 --- a/tests/compiler/std-wasi/crypto.json +++ b/tests/compiler/std-wasi/crypto.json @@ -1,6 +1,6 @@ { "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ], "asc_wasi": { "args": [], diff --git a/tests/compiler/std-wasi/process.json b/tests/compiler/std-wasi/process.json index ca8bfd0d09..d7d6e5057e 100644 --- a/tests/compiler/std-wasi/process.json +++ b/tests/compiler/std-wasi/process.json @@ -1,6 +1,6 @@ { "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ], "asc_wasi": { "args": [ diff --git a/tests/compiler/std/array.json b/tests/compiler/std/array.json index f38dcdc11d..bec32a4d51 100644 --- a/tests/compiler/std/array.json +++ b/tests/compiler/std/array.json @@ -1,6 +1,6 @@ { "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ], "asc_rtrace": true } diff --git a/tests/compiler/std/date.json b/tests/compiler/std/date.json index 1b3c185bda..d89aa6d3b8 100644 --- a/tests/compiler/std/date.json +++ b/tests/compiler/std/date.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ] } diff --git a/tests/compiler/std/symbol.json b/tests/compiler/std/symbol.json index 1b3c185bda..d89aa6d3b8 100644 --- a/tests/compiler/std/symbol.json +++ b/tests/compiler/std/symbol.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ] } diff --git a/tests/compiler/std/trace.json b/tests/compiler/std/trace.json index 1b3c185bda..d89aa6d3b8 100644 --- a/tests/compiler/std/trace.json +++ b/tests/compiler/std/trace.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ] } diff --git a/tests/compiler/templateliteral.json b/tests/compiler/templateliteral.json index 1b3c185bda..d89aa6d3b8 100644 --- a/tests/compiler/templateliteral.json +++ b/tests/compiler/templateliteral.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ] } diff --git a/tests/compiler/typeof.json b/tests/compiler/typeof.json index 1b3c185bda..d89aa6d3b8 100644 --- a/tests/compiler/typeof.json +++ b/tests/compiler/typeof.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--explicitStart" + "--exportStart", "_start" ] } diff --git a/tests/compiler/wasi/abort.optimized.wat b/tests/compiler/wasi/abort.optimized.wat index b78322598c..b458fbbb1d 100644 --- a/tests/compiler/wasi/abort.optimized.wat +++ b/tests/compiler/wasi/abort.optimized.wat @@ -17,7 +17,7 @@ (data (i32.const 1208) "\01\00\00\00\1a\00\00\00w\00a\00s\00i\00/\00a\00b\00o\00r\00t\00.\00t\00s") (export "test" (func $wasi/abort/test)) (export "memory" (memory $0)) - (export "_start" (func $~start)) + (export "_initialize" (func $~start)) (func $~lib/string/String.UTF8.encodeUnsafe@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) diff --git a/tests/compiler/wasi/abort.untouched.wat b/tests/compiler/wasi/abort.untouched.wat index 4c29f23363..4c9c72ad37 100644 --- a/tests/compiler/wasi/abort.untouched.wat +++ b/tests/compiler/wasi/abort.untouched.wat @@ -24,7 +24,7 @@ (elem $0 (i32.const 1)) (export "test" (func $wasi/abort/test)) (export "memory" (memory $0)) - (export "_start" (func $~start)) + (export "_initialize" (func $~start)) (func $~lib/bindings/wasi_snapshot_preview1/iovec#set:buf (param $0 i32) (param $1 i32) local.get $0 local.get $1 diff --git a/tests/compiler/wasi/seed.optimized.wat b/tests/compiler/wasi/seed.optimized.wat index 07eb13b218..a611729c9b 100644 --- a/tests/compiler/wasi/seed.optimized.wat +++ b/tests/compiler/wasi/seed.optimized.wat @@ -9,7 +9,7 @@ (memory $0 1) (export "test" (func $wasi/seed/test)) (export "memory" (memory $0)) - (export "_start" (func $~start)) + (export "_initialize" (func $~start)) (func $wasi/seed/test (result f64) (local $0 i64) (local $1 i64) diff --git a/tests/compiler/wasi/seed.untouched.wat b/tests/compiler/wasi/seed.untouched.wat index 7d0a0aaab9..df6a5479cc 100644 --- a/tests/compiler/wasi/seed.untouched.wat +++ b/tests/compiler/wasi/seed.untouched.wat @@ -21,7 +21,7 @@ (elem $0 (i32.const 1)) (export "test" (func $wasi/seed/test)) (export "memory" (memory $0)) - (export "_start" (func $~start)) + (export "_initialize" (func $~start)) (func $~lib/wasi/index/seed (result f64) (local $0 i64) loop $do-loop|0 From 931495d82cef0f0e5c403d7f0c2438ca0cd66c29 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 13 Dec 2021 17:52:04 +0100 Subject: [PATCH 132/175] lint --- src/bindings.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/bindings.ts b/src/bindings.ts index 3fe37e700f..17b05c9853 100644 --- a/src/bindings.ts +++ b/src/bindings.ts @@ -41,7 +41,6 @@ import { import { indent } from "./util"; -import { ExportNames } from "."; /** Walker base class. */ export abstract class ExportsWalker { From 3a83bb0259124a93a345d5e8857618dc1c09fa43 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 14 Dec 2021 11:57:25 +0100 Subject: [PATCH 133/175] enable various features --- cli/options.json | 6 +- src/compiler.ts | 8 +- src/module.ts | 2 +- tests/compiler/asc-constants.untouched.wat | 12 +- tests/compiler/binary.optimized.wat | 71 +- tests/compiler/binary.untouched.wat | 2 +- tests/compiler/call-super.optimized.wat | 181 +- tests/compiler/call-super.untouched.wat | 236 +- tests/compiler/class-implements.optimized.wat | 5 + tests/compiler/class-implements.untouched.wat | 236 +- .../class-overloading-cast.optimized.wat | 5 + .../class-overloading-cast.untouched.wat | 237 +- .../compiler/class-overloading.optimized.wat | 5 + .../compiler/class-overloading.untouched.wat | 235 +- tests/compiler/class.optimized.wat | 181 +- tests/compiler/class.untouched.wat | 234 +- tests/compiler/constructor.optimized.wat | 181 +- tests/compiler/constructor.untouched.wat | 236 +- tests/compiler/do.optimized.wat | 6 +- tests/compiler/do.untouched.wat | 236 +- tests/compiler/duplicate-fields.optimized.wat | 181 +- tests/compiler/duplicate-fields.untouched.wat | 234 +- .../empty-exportruntime.optimized.wat | 181 +- .../empty-exportruntime.untouched.wat | 236 +- tests/compiler/empty-new.optimized.wat | 6 + tests/compiler/empty-new.untouched.wat | 236 +- tests/compiler/exports.optimized.wat | 26 +- tests/compiler/exports.untouched.wat | 234 +- .../exportstar-rereexport.optimized.wat | 26 +- .../exportstar-rereexport.untouched.wat | 234 +- .../extends-baseaggregate.optimized.wat | 1624 +- .../extends-baseaggregate.untouched.wat | 1491 +- .../compiler/extends-recursive.optimized.wat | 26 +- .../compiler/extends-recursive.untouched.wat | 236 +- .../features/js-bigint-integration.json | 3 - tests/compiler/features/mutable-globals.json | 3 - tests/compiler/features/nontrapping-f2i.json | 3 - tests/compiler/features/not-supported.json | 1 + tests/compiler/features/simd.json | 3 - .../field-initialization.optimized.wat | 198 +- .../field-initialization.untouched.wat | 252 +- tests/compiler/field.optimized.wat | 1265 +- tests/compiler/field.untouched.wat | 1489 +- tests/compiler/for.optimized.wat | 6 +- tests/compiler/for.untouched.wat | 236 +- tests/compiler/function-call.optimized.wat | 5 + tests/compiler/function-call.untouched.wat | 236 +- .../function-expression.optimized.wat | 26 +- .../function-expression.untouched.wat | 234 +- tests/compiler/getter-call.optimized.wat | 6 +- tests/compiler/getter-call.untouched.wat | 236 +- tests/compiler/heap.optimized.wat | 891 +- tests/compiler/heap.untouched.wat | 1258 +- .../implicit-getter-setter.optimized.wat | 26 +- .../implicit-getter-setter.untouched.wat | 236 +- tests/compiler/infer-array.optimized.wat | 1431 +- tests/compiler/infer-array.untouched.wat | 1491 +- tests/compiler/infer-generic.optimized.wat | 26 +- tests/compiler/infer-generic.untouched.wat | 236 +- tests/compiler/inlining.optimized.wat | 181 +- tests/compiler/inlining.untouched.wat | 236 +- tests/compiler/instanceof-class.optimized.wat | 5 + tests/compiler/instanceof-class.untouched.wat | 234 +- tests/compiler/issues/1095.optimized.wat | 26 +- tests/compiler/issues/1095.untouched.wat | 234 +- tests/compiler/issues/1225.optimized.wat | 206 +- tests/compiler/issues/1225.untouched.wat | 236 +- tests/compiler/issues/1699.optimized.wat | 1223 +- tests/compiler/issues/1699.untouched.wat | 1491 +- tests/compiler/issues/2166.optimized.wat | 5 + tests/compiler/issues/2166.untouched.wat | 235 +- tests/compiler/logical.optimized.wat | 6 +- tests/compiler/logical.untouched.wat | 236 +- tests/compiler/managed-cast.optimized.wat | 5 + tests/compiler/managed-cast.untouched.wat | 234 +- tests/compiler/new.optimized.wat | 5 + tests/compiler/new.untouched.wat | 236 +- tests/compiler/number.optimized.wat | 1064 +- tests/compiler/number.untouched.wat | 1498 +- tests/compiler/object-literal.optimized.wat | 1229 +- tests/compiler/object-literal.untouched.wat | 1523 +- .../optional-typeparameters.optimized.wat | 5 + .../optional-typeparameters.untouched.wat | 236 +- .../portable-conversions.untouched.wat | 40 +- tests/compiler/reexport.optimized.wat | 26 +- tests/compiler/reexport.untouched.wat | 236 +- tests/compiler/rereexport.optimized.wat | 26 +- tests/compiler/rereexport.untouched.wat | 234 +- tests/compiler/resolve-access.optimized.wat | 1328 +- tests/compiler/resolve-access.untouched.wat | 1492 +- tests/compiler/resolve-binary.optimized.wat | 1362 +- tests/compiler/resolve-binary.untouched.wat | 1523 +- .../resolve-elementaccess.optimized.wat | 1066 +- .../resolve-elementaccess.untouched.wat | 1500 +- .../resolve-function-expression.optimized.wat | 1394 +- .../resolve-function-expression.untouched.wat | 233 +- tests/compiler/resolve-nested.optimized.wat | 5 + tests/compiler/resolve-nested.untouched.wat | 234 +- tests/compiler/resolve-new.optimized.wat | 6 +- tests/compiler/resolve-new.untouched.wat | 236 +- .../resolve-propertyaccess.optimized.wat | 181 +- .../resolve-propertyaccess.untouched.wat | 233 +- tests/compiler/resolve-ternary.optimized.wat | 1064 +- tests/compiler/resolve-ternary.untouched.wat | 1498 +- tests/compiler/resolve-unary.optimized.wat | 191 +- tests/compiler/resolve-unary.untouched.wat | 242 +- tests/compiler/rt/finalize.optimized.wat | 6 +- tests/compiler/rt/finalize.untouched.wat | 236 +- tests/compiler/rt/flags.json | 3 - tests/compiler/rt/instanceof.optimized.wat | 5 + tests/compiler/rt/instanceof.untouched.wat | 234 +- .../runtime-incremental-export.optimized.wat | 181 +- .../runtime-incremental-export.untouched.wat | 236 +- tests/compiler/simd.untouched.wat | 2083 -- tests/compiler/std-wasi/console.json | 5 +- tests/compiler/std-wasi/console.optimized.wat | 550 +- tests/compiler/std-wasi/console.untouched.wat | 235 +- tests/compiler/std-wasi/crypto.json | 5 +- tests/compiler/std-wasi/crypto.optimized.wat | 1369 +- tests/compiler/std-wasi/crypto.untouched.wat | 1500 +- tests/compiler/std-wasi/process.json | 5 +- tests/compiler/std-wasi/process.optimized.wat | 1394 +- tests/compiler/std-wasi/process.untouched.wat | 1494 +- .../compiler/std/array-literal.optimized.wat | 181 +- .../compiler/std/array-literal.untouched.wat | 1491 +- tests/compiler/std/array.optimized.wat | 3674 +-- tests/compiler/std/array.untouched.wat | 2273 +- tests/compiler/std/arraybuffer.optimized.wat | 1355 +- tests/compiler/std/arraybuffer.untouched.wat | 1508 +- tests/compiler/std/dataview.optimized.wat | 181 +- tests/compiler/std/dataview.untouched.wat | 234 +- tests/compiler/std/date.optimized.wat | 1618 +- tests/compiler/std/date.untouched.wat | 1701 +- tests/compiler/std/map.optimized.wat | 1299 +- tests/compiler/std/map.untouched.wat | 1899 +- tests/compiler/std/math.optimized.wat | 104 +- tests/compiler/std/math.untouched.wat | 22 +- tests/compiler/std/new.optimized.wat | 36 +- tests/compiler/std/new.untouched.wat | 236 +- .../std/operator-overloading.optimized.wat | 36 +- .../std/operator-overloading.untouched.wat | 235 +- tests/compiler/std/pointer.optimized.wat | 913 +- tests/compiler/std/pointer.untouched.wat | 1490 +- tests/compiler/std/set.optimized.wat | 1197 +- tests/compiler/std/set.untouched.wat | 1491 +- tests/compiler/std/simd.json | 4 - tests/compiler/std/simd.optimized.wat | 4 - tests/compiler/std/simd.ts | 31 - tests/compiler/std/simd.untouched.wat | 19 - tests/compiler/std/static-array.optimized.wat | 1751 +- tests/compiler/std/static-array.untouched.wat | 1491 +- tests/compiler/std/staticarray.optimized.wat | 1326 +- tests/compiler/std/staticarray.untouched.wat | 1760 +- .../std/string-casemapping.optimized.wat | 1847 +- .../std/string-casemapping.untouched.wat | 1534 +- .../std/string-encoding.optimized.wat | 1194 +- .../std/string-encoding.untouched.wat | 1580 +- tests/compiler/std/string.optimized.wat | 2803 +-- tests/compiler/std/string.untouched.wat | 1675 +- tests/compiler/std/symbol.optimized.wat | 1060 +- tests/compiler/std/symbol.untouched.wat | 1494 +- tests/compiler/std/typedarray.optimized.wat | 19201 +++++++--------- tests/compiler/std/typedarray.untouched.wat | 2665 +-- tests/compiler/std/uri.optimized.wat | 1250 +- tests/compiler/std/uri.untouched.wat | 1494 +- tests/compiler/super-inline.optimized.wat | 5 + tests/compiler/super-inline.untouched.wat | 236 +- tests/compiler/templateliteral.optimized.wat | 1383 +- tests/compiler/templateliteral.untouched.wat | 1882 +- tests/compiler/typeof.optimized.wat | 6 +- tests/compiler/typeof.untouched.wat | 233 +- tests/compiler/wasi/trace.optimized.wat | 883 +- tests/compiler/wasi/trace.untouched.wat | 1263 +- tests/compiler/while.optimized.wat | 6 +- tests/compiler/while.untouched.wat | 236 +- tests/features.json | 17 - 176 files changed, 16158 insertions(+), 108912 deletions(-) delete mode 100644 tests/compiler/simd.untouched.wat delete mode 100644 tests/compiler/std/simd.json delete mode 100644 tests/compiler/std/simd.optimized.wat delete mode 100644 tests/compiler/std/simd.ts delete mode 100644 tests/compiler/std/simd.untouched.wat diff --git a/cli/options.json b/cli/options.json index 7ca6573e36..14a2e8eaf4 100644 --- a/cli/options.json +++ b/cli/options.json @@ -198,9 +198,6 @@ "description": [ "Enables WebAssembly features being disabled by default.", "", - " nontrapping-f2i Non-trapping float to integer ops.", - " bulk-memory Bulk memory operations.", - " simd SIMD types and operations.", " threads Threading and atomic operations.", " reference-types Reference types and operations.", " gc Garbage collection (WIP).", @@ -222,6 +219,9 @@ "", " mutable-globals Mutable global imports and exports.", " sign-extension Sign-extension operations", + " nontrapping-f2i Non-trapping float to integer ops.", + " bulk-memory Bulk memory operations.", + " simd SIMD types and operations.", "" ], "type": "S", diff --git a/src/compiler.ts b/src/compiler.ts index 30d07468a8..2a3dba6ed3 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -245,7 +245,11 @@ export class Options { /** Global aliases, mapping alias names as the key to internal names to be aliased as the value. */ globalAliases: Map | null = null; /** Features to activate by default. These are the finished proposals. */ - features: Feature = Feature.MUTABLE_GLOBALS | Feature.SIGN_EXTENSION; + features: Feature = Feature.MUTABLE_GLOBALS + | Feature.SIGN_EXTENSION + | Feature.NONTRAPPING_F2I + | Feature.BULK_MEMORY + | Feature.SIMD; /** If true, disallows unsafe features in user code. */ noUnsafe: bool = false; /** If true, enables pedantic diagnostics. */ @@ -429,7 +433,7 @@ export class Compiler extends DiagnosticEmitter { } var featureFlags: FeatureFlags = 0; if (options.hasFeature(Feature.SIGN_EXTENSION)) featureFlags |= FeatureFlags.SignExt; - if (options.hasFeature(Feature.MUTABLE_GLOBALS)) featureFlags |= FeatureFlags.MutableGloabls; + if (options.hasFeature(Feature.MUTABLE_GLOBALS)) featureFlags |= FeatureFlags.MutableGlobals; if (options.hasFeature(Feature.NONTRAPPING_F2I)) featureFlags |= FeatureFlags.TruncSat; if (options.hasFeature(Feature.BULK_MEMORY)) featureFlags |= FeatureFlags.BulkMemory; if (options.hasFeature(Feature.SIMD)) featureFlags |= FeatureFlags.SIMD; diff --git a/src/module.ts b/src/module.ts index 7962519f38..b617fe864c 100644 --- a/src/module.ts +++ b/src/module.ts @@ -71,7 +71,7 @@ export namespace TypeRef { export enum FeatureFlags { MVP = 0 /* _BinaryenFeatureMVP */, Atomics = 1 /* _BinaryenFeatureAtomics */, - MutableGloabls = 2 /* _BinaryenFeatureMutableGlobals */, + MutableGlobals = 2 /* _BinaryenFeatureMutableGlobals */, TruncSat = 4 /* _BinaryenFeatureNontrappingFPToInt */, SIMD = 8 /* _BinaryenFeatureSIMD128 */, BulkMemory = 16 /* _BinaryenFeatureBulkMemory */, diff --git a/tests/compiler/asc-constants.untouched.wat b/tests/compiler/asc-constants.untouched.wat index 8e8a5e8981..94fde223b3 100644 --- a/tests/compiler/asc-constants.untouched.wat +++ b/tests/compiler/asc-constants.untouched.wat @@ -8,9 +8,9 @@ (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_FEATURE_SIGN_EXTENSION i32 (i32.const 1)) (global $~lib/native/ASC_FEATURE_MUTABLE_GLOBALS i32 (i32.const 1)) - (global $~lib/native/ASC_FEATURE_NONTRAPPING_F2I i32 (i32.const 0)) - (global $~lib/native/ASC_FEATURE_BULK_MEMORY i32 (i32.const 0)) - (global $~lib/native/ASC_FEATURE_SIMD i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_NONTRAPPING_F2I i32 (i32.const 1)) + (global $~lib/native/ASC_FEATURE_BULK_MEMORY i32 (i32.const 1)) + (global $~lib/native/ASC_FEATURE_SIMD i32 (i32.const 1)) (global $~lib/native/ASC_FEATURE_THREADS i32 (i32.const 0)) (global $~lib/native/ASC_FEATURE_EXCEPTION_HANDLING i32 (i32.const 0)) (global $~lib/native/ASC_FEATURE_TAIL_CALLS i32 (i32.const 0)) @@ -43,11 +43,11 @@ drop i32.const 1 drop - i32.const 0 + i32.const 1 drop - i32.const 0 + i32.const 1 drop - i32.const 0 + i32.const 1 drop i32.const 0 drop diff --git a/tests/compiler/binary.optimized.wat b/tests/compiler/binary.optimized.wat index 36ab116b87..bbe6f77e1c 100644 --- a/tests/compiler/binary.optimized.wat +++ b/tests/compiler/binary.optimized.wat @@ -64,76 +64,7 @@ (data (i32.const 2801) " \06?\07\1b\b5\bfW^\c6a[\02\1f=\00\00\00\00\00@\f1?") (data (i32.const 2833) "\e0\1b\96\d7A\b3\bf\df\13\f9\cc\da^,=\00\00\00\00\00@\f1?") (data (i32.const 2865) "\e0\1b\96\d7A\b3\bf\df\13\f9\cc\da^,=\00\00\00\00\00 \f1?") - (data (i32.const 2897) "\80\a3\ee6e\b1\bf\t\a3\8fv^|\14=\00\00\00\00\00\00\f1?") - (data (i32.const 2929) "\80\11\c00\n\af\bf\91\8e6\83\9eY-=\00\00\00\00\00\00\f1?") - (data (i32.const 2961) "\80\11\c00\n\af\bf\91\8e6\83\9eY-=\00\00\00\00\00\e0\f0?") - (data (i32.const 2993) "\80\19q\ddB\ab\bfLp\d6\e5z\82\1c=\00\00\00\00\00\e0\f0?") - (data (i32.const 3025) "\80\19q\ddB\ab\bfLp\d6\e5z\82\1c=\00\00\00\00\00\c0\f0?") - (data (i32.const 3057) "\c02\f6Xt\a7\bf\ee\a1\f24F\fc,\bd\00\00\00\00\00\c0\f0?") - (data (i32.const 3089) "\c02\f6Xt\a7\bf\ee\a1\f24F\fc,\bd\00\00\00\00\00\a0\f0?") - (data (i32.const 3121) "\c0\fe\b9\87\9e\a3\bf\aa\fe&\f5\b7\02\f5<\00\00\00\00\00\a0\f0?") - (data (i32.const 3153) "\c0\fe\b9\87\9e\a3\bf\aa\fe&\f5\b7\02\f5<\00\00\00\00\00\80\f0?") - (data (i32.const 3186) "x\0e\9b\82\9f\bf\e4\t~|&\80)\bd\00\00\00\00\00\80\f0?") - (data (i32.const 3218) "x\0e\9b\82\9f\bf\e4\t~|&\80)\bd\00\00\00\00\00`\f0?") - (data (i32.const 3249) "\80\d5\07\1b\b9\97\bf9\a6\fa\93T\8d(\bd\00\00\00\00\00@\f0?") - (data (i32.const 3282) "\fc\b0\a8\c0\8f\bf\9c\a6\d3\f6|\1e\df\bc\00\00\00\00\00@\f0?") - (data (i32.const 3314) "\fc\b0\a8\c0\8f\bf\9c\a6\d3\f6|\1e\df\bc\00\00\00\00\00 \f0?") - (data (i32.const 3346) "\10k*\e0\7f\bf\e4@\da\0d?\e2\19\bd\00\00\00\00\00 \f0?") - (data (i32.const 3378) "\10k*\e0\7f\bf\e4@\da\0d?\e2\19\bd\00\00\00\00\00\00\f0?") - (data (i32.const 3430) "\f0?") - (data (i32.const 3461) "\c0\ef?") - (data (i32.const 3474) "\89u\15\10\80?\e8+\9d\99k\c7\10\bd\00\00\00\00\00\80\ef?") - (data (i32.const 3505) "\80\93XV \90?\d2\f7\e2\06[\dc#\bd\00\00\00\00\00@\ef?") - (data (i32.const 3538) "\c9(%I\98?4\0cZ2\ba\a0*\bd\00\00\00\00\00\00\ef?") - (data (i32.const 3569) "@\e7\89]A\a0?S\d7\f1\\\c0\11\01=\00\00\00\00\00\c0\ee?") - (data (i32.const 3602) ".\d4\aef\a4?(\fd\bdus\16,\bd\00\00\00\00\00\80\ee?") - (data (i32.const 3633) "\c0\9f\14\aa\94\a8?}&Z\d0\95y\19\bd\00\00\00\00\00@\ee?") - (data (i32.const 3665) "\c0\dd\cds\cb\ac?\07(\d8G\f2h\1a\bd\00\00\00\00\00 \ee?") - (data (i32.const 3697) "\c0\06\c01\ea\ae?{;\c9O>\11\0e\bd\00\00\00\00\00\e0\ed?") - (data (i32.const 3729) "`F\d1;\97\b1?\9b\9e\0dV]2%\bd\00\00\00\00\00\a0\ed?") - (data (i32.const 3761) "\e0\d1\a7\f5\bd\b3?\d7N\db\a5^\c8,=\00\00\00\00\00`\ed?") - (data (i32.const 3793) "\a0\97MZ\e9\b5?\1e\1d]<\06i,\bd\00\00\00\00\00@\ed?") - (data (i32.const 3825) "\c0\ea\n\d3\00\b7?2\ed\9d\a9\8d\1e\ec<\00\00\00\00\00\00\ed?") - (data (i32.const 3857) "@Y]^3\b9?\daG\bd:\\\11#=\00\00\00\00\00\c0\ec?") - (data (i32.const 3889) "`\ad\8d\c8j\bb?\e5h\f7+\80\90\13\bd\00\00\00\00\00\a0\ec?") - (data (i32.const 3921) "@\bc\01X\88\bc?\d3\acZ\c6\d1F&=\00\00\00\00\00`\ec?") - (data (i32.const 3953) " \n\839\c7\be?\e0E\e6\afh\c0-\bd\00\00\00\00\00@\ec?") - (data (i32.const 3985) "\e0\db9\91\e8\bf?\fd\n\a1O\d64%\bd\00\00\00\00\00\00\ec?") - (data (i32.const 4017) "\e0\'\82\8e\17\c1?\f2\07-\cex\ef!=\00\00\00\00\00\e0\eb?") - (data (i32.const 4049) "\f0#~+\aa\c1?4\998D\8e\a7,=\00\00\00\00\00\a0\eb?") - (data (i32.const 4081) "\80\86\0ca\d1\c2?\a1\b4\81\cbl\9d\03=\00\00\00\00\00\80\eb?") - (data (i32.const 4113) "\90\15\b0\fce\c3?\89rK#\a8/\c6<\00\00\00\00\00@\eb?") - (data (i32.const 4145) "\b03\83=\91\c4?x\b6\fdTy\83%=\00\00\00\00\00 \eb?") - (data (i32.const 4177) "\b0\a1\e4\e5\'\c5?\c7}i\e5\e83&=\00\00\00\00\00\e0\ea?") - (data (i32.const 4209) "\10\8c\beNW\c6?x.<,\8b\cf\19=\00\00\00\00\00\c0\ea?") - (data (i32.const 4241) "pu\8b\12\f0\c6?\e1!\9c\e5\8d\11%\bd\00\00\00\00\00\a0\ea?") - (data (i32.const 4273) "PD\85\8d\89\c7?\05C\91p\10f\1c\bd\00\00\00\00\00`\ea?") - (data (i32.const 4306) "9\eb\af\be\c8?\d1,\e9\aaT=\07\bd\00\00\00\00\00@\ea?") - (data (i32.const 4338) "\f7\dcZZ\c9?o\ff\a0X(\f2\07=\00\00\00\00\00\00\ea?") - (data (i32.const 4369) "\e0\8a<\ed\93\ca?i!VPCr(\bd\00\00\00\00\00\e0\e9?") - (data (i32.const 4401) "\d0[W\d81\cb?\aa\e1\acN\8d5\0c\bd\00\00\00\00\00\c0\e9?") - (data (i32.const 4433) "\e0;8\87\d0\cb?\b6\12TY\c4K-\bd\00\00\00\00\00\a0\e9?") - (data (i32.const 4465) "\10\f0\c6\fbo\cc?\d2+\96\c5r\ec\f1\bc\00\00\00\00\00`\e9?") - (data (i32.const 4497) "\90\d4\b0=\b1\cd?5\b0\15\f7*\ff*\bd\00\00\00\00\00@\e9?") - (data (i32.const 4529) "\10\e7\ff\0eS\ce?0\f4A`\'\12\c2<\00\00\00\00\00 \e9?") - (data (i32.const 4562) "\dd\e4\ad\f5\ce?\11\8e\bbe\15!\ca\bc\00\00\00\00\00\00\e9?") - (data (i32.const 4593) "\b0\b3l\1c\99\cf?0\df\0c\ca\ec\cb\1b=\00\00\00\00\00\c0\e8?") - (data (i32.const 4625) "XM`8q\d0?\91N\ed\16\db\9c\f8<\00\00\00\00\00\a0\e8?") - (data (i32.const 4657) "`ag-\c4\d0?\e9\ea<\16\8b\18\'=\00\00\00\00\00\80\e8?") - (data (i32.const 4689) "\e8\'\82\8e\17\d1?\1c\f0\a5c\0e!,\bd\00\00\00\00\00`\e8?") - (data (i32.const 4721) "\f8\ac\cb\\k\d1?\81\16\a5\f7\cd\9a+=\00\00\00\00\00@\e8?") - (data (i32.const 4753) "hZc\99\bf\d1?\b7\bdGQ\ed\a6,=\00\00\00\00\00 \e8?") - (data (i32.const 4785) "\b8\0emE\14\d2?\ea\baF\ba\de\87\n=\00\00\00\00\00\e0\e7?") - (data (i32.const 4817) "\90\dc|\f0\be\d2?\f4\04PJ\fa\9c*=\00\00\00\00\00\c0\e7?") - (data (i32.const 4849) "`\d3\e1\f1\14\d3?\b8\11\0e\bd\00\00\00\00\00\e0\ed?\00\00\00\00\00\00\00\00\00`F\d1;\97\b1?\9b\9e\0dV]2%\bd\00\00\00\00\00\a0\ed?\00\00\00\00\00\00\00\00\00\e0\d1\a7\f5\bd\b3?\d7N\db\a5^\c8,=\00\00\00\00\00`\ed?\00\00\00\00\00\00\00\00\00\a0\97MZ\e9\b5?\1e\1d]<\06i,\bd\00\00\00\00\00@\ed?\00\00\00\00\00\00\00\00\00\c0\ea\n\d3\00\b7?2\ed\9d\a9\8d\1e\ec<\00\00\00\00\00\00\ed?\00\00\00\00\00\00\00\00\00@Y]^3\b9?\daG\bd:\\\11#=\00\00\00\00\00\c0\ec?\00\00\00\00\00\00\00\00\00`\ad\8d\c8j\bb?\e5h\f7+\80\90\13\bd\00\00\00\00\00\a0\ec?\00\00\00\00\00\00\00\00\00@\bc\01X\88\bc?\d3\acZ\c6\d1F&=\00\00\00\00\00`\ec?\00\00\00\00\00\00\00\00\00 \n\839\c7\be?\e0E\e6\afh\c0-\bd\00\00\00\00\00@\ec?\00\00\00\00\00\00\00\00\00\e0\db9\91\e8\bf?\fd\n\a1O\d64%\bd\00\00\00\00\00\00\ec?\00\00\00\00\00\00\00\00\00\e0\'\82\8e\17\c1?\f2\07-\cex\ef!=\00\00\00\00\00\e0\eb?\00\00\00\00\00\00\00\00\00\f0#~+\aa\c1?4\998D\8e\a7,=\00\00\00\00\00\a0\eb?\00\00\00\00\00\00\00\00\00\80\86\0ca\d1\c2?\a1\b4\81\cbl\9d\03=\00\00\00\00\00\80\eb?\00\00\00\00\00\00\00\00\00\90\15\b0\fce\c3?\89rK#\a8/\c6<\00\00\00\00\00@\eb?\00\00\00\00\00\00\00\00\00\b03\83=\91\c4?x\b6\fdTy\83%=\00\00\00\00\00 \eb?\00\00\00\00\00\00\00\00\00\b0\a1\e4\e5\'\c5?\c7}i\e5\e83&=\00\00\00\00\00\e0\ea?\00\00\00\00\00\00\00\00\00\10\8c\beNW\c6?x.<,\8b\cf\19=\00\00\00\00\00\c0\ea?\00\00\00\00\00\00\00\00\00pu\8b\12\f0\c6?\e1!\9c\e5\8d\11%\bd\00\00\00\00\00\a0\ea?\00\00\00\00\00\00\00\00\00PD\85\8d\89\c7?\05C\91p\10f\1c\bd\00\00\00\00\00`\ea?\00\00\00\00\00\00\00\00\00\009\eb\af\be\c8?\d1,\e9\aaT=\07\bd\00\00\00\00\00@\ea?\00\00\00\00\00\00\00\00\00\00\f7\dcZZ\c9?o\ff\a0X(\f2\07=\00\00\00\00\00\00\ea?\00\00\00\00\00\00\00\00\00\e0\8a<\ed\93\ca?i!VPCr(\bd\00\00\00\00\00\e0\e9?\00\00\00\00\00\00\00\00\00\d0[W\d81\cb?\aa\e1\acN\8d5\0c\bd\00\00\00\00\00\c0\e9?\00\00\00\00\00\00\00\00\00\e0;8\87\d0\cb?\b6\12TY\c4K-\bd\00\00\00\00\00\a0\e9?\00\00\00\00\00\00\00\00\00\10\f0\c6\fbo\cc?\d2+\96\c5r\ec\f1\bc\00\00\00\00\00`\e9?\00\00\00\00\00\00\00\00\00\90\d4\b0=\b1\cd?5\b0\15\f7*\ff*\bd\00\00\00\00\00@\e9?\00\00\00\00\00\00\00\00\00\10\e7\ff\0eS\ce?0\f4A`\'\12\c2<\00\00\00\00\00 \e9?\00\00\00\00\00\00\00\00\00\00\dd\e4\ad\f5\ce?\11\8e\bbe\15!\ca\bc\00\00\00\00\00\00\e9?\00\00\00\00\00\00\00\00\00\b0\b3l\1c\99\cf?0\df\0c\ca\ec\cb\1b=\00\00\00\00\00\c0\e8?\00\00\00\00\00\00\00\00\00XM`8q\d0?\91N\ed\16\db\9c\f8<\00\00\00\00\00\a0\e8?\00\00\00\00\00\00\00\00\00`ag-\c4\d0?\e9\ea<\16\8b\18\'=\00\00\00\00\00\80\e8?\00\00\00\00\00\00\00\00\00\e8\'\82\8e\17\d1?\1c\f0\a5c\0e!,\bd\00\00\00\00\00`\e8?\00\00\00\00\00\00\00\00\00\f8\ac\cb\\k\d1?\81\16\a5\f7\cd\9a+=\00\00\00\00\00@\e8?\00\00\00\00\00\00\00\00\00hZc\99\bf\d1?\b7\bdGQ\ed\a6,=\00\00\00\00\00 \e8?\00\00\00\00\00\00\00\00\00\b8\0emE\14\d2?\ea\baF\ba\de\87\n=\00\00\00\00\00\e0\e7?\00\00\00\00\00\00\00\00\00\90\dc|\f0\be\d2?\f4\04PJ\fa\9c*=\00\00\00\00\00\c0\e7?\00\00\00\00\00\00\00\00\00`\d3\e1\f1\14\d3?\b8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") (data (i32.const 7168) "\be\f3\f8y\eca\f6?\190\96[\c6\fe\de\bf=\88\afJ\edq\f5?\a4\fc\d42h\0b\db\bf\b0\10\f0\f09\95\f4?{\b7\1f\n\8bA\d7\bf\85\03\b8\b0\95\c9\f3?{\cfm\1a\e9\9d\d3\bf\a5d\88\0c\19\0d\f3?1\b6\f2\f3\9b\1d\d0\bf\a0\8e\0b{\"^\f2?\f0z;\1b\1d|\c9\bf?4\1aJJ\bb\f1?\9f<\af\93\e3\f9\c2\bf\ba\e5\8a\f0X#\f1?\\\8dx\bf\cb`\b9\bf\a7\00\99A?\95\f0?\ce_G\b6\9do\aa\bf\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\acG\9a\fd\8c`\ee?=\f5$\9f\ca8\b3?\a0j\02\1f\b3\a4\ec?\ba\918T\a9v\c4?\e6\fcjW6 \eb?\d2\e4\c4J\0b\84\ce?-\aa\a1c\d1\c2\e9?\1ce\c6\f0E\06\d4?\edAx\03\e6\86\e8?\f8\9f\1b,\9c\8e\d8?bHS\f5\dcg\e7?\cc{\b1N\a4\e0\dc?") (data (i32.const 7430) "\f0?t\85\15\d3\b0\d9\ef?\0f\89\f9lX\b5\ef?Q[\12\d0\01\93\ef?{Q}<\b8r\ef?\aa\b9h1\87T\ef?8bunz8\ef?\e1\de\1f\f5\9d\1e\ef?\15\b71\n\fe\06\ef?\cb\a9:7\a7\f1\ee?\"4\12L\a6\de\ee?-\89a`\08\ce\ee?\'*6\d5\da\bf\ee?\82O\9dV+\b4\ee?)TH\dd\07\ab\ee?\85U:\b0~\a4\ee?\cd;\7ff\9e\a0\ee?t_\ec\e8u\9f\ee?\87\01\ebs\14\a1\ee?\13\ceL\99\89\a5\ee?\db\a0*B\e5\ac\ee?\e5\c5\cd\b07\b7\ee?\90\f0\a3\82\91\c4\ee?]%>\b2\03\d5\ee?\ad\d3Z\99\9f\e8\ee?G^\fb\f2v\ff\ee?\9cR\85\dd\9b\19\ef?i\90\ef\dc 7\ef?\87\a4\fb\dc\18X\ef?_\9b{3\97|\ef?\da\90\a4\a2\af\a4\ef?@En[v\d0\ef?") diff --git a/tests/compiler/binary.untouched.wat b/tests/compiler/binary.untouched.wat index da699a2c1f..0b41939ff6 100644 --- a/tests/compiler/binary.untouched.wat +++ b/tests/compiler/binary.untouched.wat @@ -2654,7 +2654,7 @@ f64.convert_i64_s f64.const 1 call $~lib/math/NativeMath.pow - i64.trunc_f64_s + i64.trunc_sat_f64_s global.set $binary/I global.get $binary/I i64.const 1 diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 601b004a4d..fbee925aa7 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -1361,182 +1361,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/rt/__visit_members (param $0 i32) block $invalid diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index ec6788f0ac..53b31bfb6c 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 464)) (global $~lib/memory/__data_end i32 (i32.const 572)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16956)) @@ -2063,237 +2062,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2343,7 +2111,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $call-super/A#set:a (param $0 i32) (param $1 i32) diff --git a/tests/compiler/class-implements.optimized.wat b/tests/compiler/class-implements.optimized.wat index e38032dcbb..04f8c230bf 100644 --- a/tests/compiler/class-implements.optimized.wat +++ b/tests/compiler/class-implements.optimized.wat @@ -1241,6 +1241,11 @@ local.get $1 i32.const 20 i32.add + local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $0 ) (func $~lib/rt/__visit_members (param $0 i32) block $invalid diff --git a/tests/compiler/class-implements.untouched.wat b/tests/compiler/class-implements.untouched.wat index 84c0643478..c36333ad7e 100644 --- a/tests/compiler/class-implements.untouched.wat +++ b/tests/compiler/class-implements.untouched.wat @@ -3,8 +3,8 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $class-implements/a (mut i32) (i32.const 0)) (global $class-implements/c (mut i32) (i32.const 0)) (global $class-implements/A i32 (i32.const 3)) @@ -2073,237 +2072,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2353,7 +2121,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $class-implements/A#foo (param $0 i32) (result i32) diff --git a/tests/compiler/class-overloading-cast.optimized.wat b/tests/compiler/class-overloading-cast.optimized.wat index b517856eda..5993731266 100644 --- a/tests/compiler/class-overloading-cast.optimized.wat +++ b/tests/compiler/class-overloading-cast.optimized.wat @@ -1255,6 +1255,11 @@ local.get $1 i32.const 20 i32.add + local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $0 ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/class-overloading-cast.untouched.wat b/tests/compiler/class-overloading-cast.untouched.wat index 6427c45893..b6e723f7ff 100644 --- a/tests/compiler/class-overloading-cast.untouched.wat +++ b/tests/compiler/class-overloading-cast.untouched.wat @@ -4,8 +4,8 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) @@ -25,10 +25,10 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $class-overloading-cast/v (mut i32) (i32.const 0)) (global $class-overloading-cast/v2 (mut i32) (i32.const 0)) (global $class-overloading-cast/v3 (mut i32) (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $class-overloading-cast/c (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 592)) (global $~lib/memory/__data_end i32 (i32.const 676)) @@ -2073,237 +2073,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2353,7 +2122,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $class-overloading-cast/A#foo (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/class-overloading.optimized.wat b/tests/compiler/class-overloading.optimized.wat index 7d862517ba..5845b31180 100644 --- a/tests/compiler/class-overloading.optimized.wat +++ b/tests/compiler/class-overloading.optimized.wat @@ -1279,6 +1279,11 @@ local.get $1 i32.const 20 i32.add + local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $0 ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/class-overloading.untouched.wat b/tests/compiler/class-overloading.untouched.wat index 29ccb3ebff..34bf267948 100644 --- a/tests/compiler/class-overloading.untouched.wat +++ b/tests/compiler/class-overloading.untouched.wat @@ -25,8 +25,8 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $class-overloading/a (mut i32) (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $class-overloading/c (mut i32) (i32.const 0)) (global $class-overloading/ia (mut i32) (i32.const 0)) (global $class-overloading/ic (mut i32) (i32.const 0)) @@ -2079,237 +2079,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2359,7 +2128,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $class-overloading/A#a (param $0 i32) (param $1 i32) diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 309a264c2a..219f4b7a5f 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -1501,182 +1501,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $class/testGenericInitializer (local $0 i32) diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index f4bb1e7696..724bf3d83f 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -26,7 +26,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/rt/__rtti_base i32 (i32.const 512)) (global $~lib/memory/__data_end i32 (i32.const 564)) @@ -2176,237 +2175,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2456,7 +2224,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 28cb0342a8..d5e2fd03c3 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1424,182 +1424,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $start:constructor (local $0 i32) diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 593f988c58..dfcbdf978c 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $constructor/emptyCtor (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldInit (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldNoInit (mut i32) (i32.const 0)) @@ -2075,237 +2074,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2355,7 +2123,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $constructor/EmptyCtorWithFieldInit#set:a (param $0 i32) (param $1 i32) diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 85ff5e74b6..da6b9a9b47 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1718,11 +1718,15 @@ i32.add i32.add global.set $~lib/rt/itcms/total - local.get $2 local.get $0 i32.const 20 i32.add local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $2 + local.get $0 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 diff --git a/tests/compiler/do.untouched.wat b/tests/compiler/do.untouched.wat index 0199e03ba0..f0239dfac4 100644 --- a/tests/compiler/do.untouched.wat +++ b/tests/compiler/do.untouched.wat @@ -4,8 +4,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -24,7 +24,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 448)) (global $~lib/memory/__data_end i32 (i32.const 484)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16868)) @@ -2472,237 +2471,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2752,7 +2520,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $do/testRef diff --git a/tests/compiler/duplicate-fields.optimized.wat b/tests/compiler/duplicate-fields.optimized.wat index 7b35fa25fa..a0d73a881e 100644 --- a/tests/compiler/duplicate-fields.optimized.wat +++ b/tests/compiler/duplicate-fields.optimized.wat @@ -1519,182 +1519,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/rt/__visit_members (param $0 i32) (local $1 i32) diff --git a/tests/compiler/duplicate-fields.untouched.wat b/tests/compiler/duplicate-fields.untouched.wat index a44045ccbf..52b6109933 100644 --- a/tests/compiler/duplicate-fields.untouched.wat +++ b/tests/compiler/duplicate-fields.untouched.wat @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $duplicate-fields/foo (mut i32) (i32.const 0)) (global $duplicate-fields/raz (mut i32) (i32.const 0)) (global $duplicate-fields/B3 i32 (i32.const 9)) @@ -2079,237 +2078,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2359,7 +2127,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $duplicate-fields/B#set:bar (param $0 i32) (param $1 i32) diff --git a/tests/compiler/empty-exportruntime.optimized.wat b/tests/compiler/empty-exportruntime.optimized.wat index 6d050a93d9..d1611e10a5 100644 --- a/tests/compiler/empty-exportruntime.optimized.wat +++ b/tests/compiler/empty-exportruntime.optimized.wat @@ -1507,182 +1507,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/rt/itcms/__pin (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/empty-exportruntime.untouched.wat b/tests/compiler/empty-exportruntime.untouched.wat index 88a710db37..6b98a6fe6a 100644 --- a/tests/compiler/empty-exportruntime.untouched.wat +++ b/tests/compiler/empty-exportruntime.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 544)) (global $~lib/memory/__data_end i32 (i32.const 572)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16956)) @@ -2069,237 +2068,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2349,7 +2117,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__pin (param $0 i32) (result i32) diff --git a/tests/compiler/empty-new.optimized.wat b/tests/compiler/empty-new.optimized.wat index f761c77533..d52a19b681 100644 --- a/tests/compiler/empty-new.optimized.wat +++ b/tests/compiler/empty-new.optimized.wat @@ -1270,6 +1270,12 @@ i32.add i32.add global.set $~lib/rt/itcms/total + local.get $0 + i32.const 20 + i32.add + i32.const 0 + i32.const 0 + memory.fill ) (func $byn-split-outlined-A$~lib/rt/itcms/__visit (param $0 i32) (local $1 i32) diff --git a/tests/compiler/empty-new.untouched.wat b/tests/compiler/empty-new.untouched.wat index 2ac86d389e..dce893876b 100644 --- a/tests/compiler/empty-new.untouched.wat +++ b/tests/compiler/empty-new.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) (global $~lib/memory/__data_end i32 (i32.const 444)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16828)) @@ -2062,237 +2061,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2342,7 +2110,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $start:empty-new diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index c548f56a50..7ce8a4f6ec 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -1271,31 +1271,7 @@ i32.add local.tee $0 i32.const 0 - i32.store8 - local.get $0 - i32.const 4 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 + i32.store align=1 local.get $0 ) (func $export/mul (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 36b69f2b52..d48f958f7e 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -33,7 +33,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $exports/Car i32 (i32.const 3)) (global $exports/vehicles.Car i32 (i32.const 4)) @@ -2126,237 +2125,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2406,7 +2174,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $exports/Car#get:doors (param $0 i32) (result i32) diff --git a/tests/compiler/exportstar-rereexport.optimized.wat b/tests/compiler/exportstar-rereexport.optimized.wat index 1e0891b773..68d3345d9e 100644 --- a/tests/compiler/exportstar-rereexport.optimized.wat +++ b/tests/compiler/exportstar-rereexport.optimized.wat @@ -1460,31 +1460,7 @@ i32.add local.tee $0 i32.const 0 - i32.store8 - local.get $0 - i32.const 4 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 + i32.store align=1 local.get $2 local.get $0 i32.store diff --git a/tests/compiler/exportstar-rereexport.untouched.wat b/tests/compiler/exportstar-rereexport.untouched.wat index 0cd5ad2e6e..e9f1830f4a 100644 --- a/tests/compiler/exportstar-rereexport.untouched.wat +++ b/tests/compiler/exportstar-rereexport.untouched.wat @@ -29,7 +29,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $reexport/car (mut i32) (i32.const 0)) (global $rereexport/car (mut i32) (i32.const 0)) (global $rereexport/exportsNamespaceCar (mut i32) (i32.const 0)) @@ -2107,237 +2106,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2387,7 +2155,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $exports/Car#get:numDoors (param $0 i32) (result i32) diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 09f0d2ae79..032fc360fc 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -2,9 +2,9 @@ (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) @@ -1507,1387 +1507,339 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 + ) + (func $~lib/array/Array~visit (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 + i32.lt_u + if + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.tee $0 + if local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + ) + (func $~lib/rt/__visit_members (param $0 i32) + block $folding-inner1 + block $folding-inner0 + block $invalid + block $~lib/array/Array + block $~lib/array/Array + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $~lib/array/Array $~lib/array/Array $invalid + end + return + end + return + end + local.get $0 + call $~lib/array/Array~visit + return + end + local.get $0 + call $~lib/array/Array~visit + return + end + unreachable + end local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + return + end + local.get $0 + i32.load offset=16 + local.tee $0 + if local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + ) + (func $~start + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 1772 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer local.tee $0 - i32.add - local.tee $3 - i32.const 4 + i64.const 0 + i64.store + memory.size + i32.const 16 + i32.shl + i32.const 18156 i32.sub - i32.const 0 + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 1332 + i32.const 1328 i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 + i32.const 1336 + i32.const 1328 i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 + i32.const 1328 + global.set $~lib/rt/itcms/pinSpace + i32.const 1364 + i32.const 1360 + i32.store + i32.const 1368 + i32.const 1360 + i32.store + i32.const 1360 + global.set $~lib/rt/itcms/toSpace + i32.const 1508 + i32.const 1504 + i32.store + i32.const 1512 + i32.const 1504 i32.store + i32.const 1504 + global.set $~lib/rt/itcms/fromSpace local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 + i32.const 1168 i32.store - local.get $3 - i32.const 24 + local.get $0 + i32.const 4 i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1772 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $0 i32.const 0 i32.store - local.get $3 + local.get $0 i32.const 20 - i32.sub - i32.const 0 + i32.const 6 + call $~lib/rt/itcms/__new + local.tee $5 i32.store - local.get $3 - i32.const 16 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 4 i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1772 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/array/Array#push (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - i32.const 1180 - i32.load - local.tee $9 - i32.const 1 - i32.add - local.tee $8 - i32.const 1176 - i32.load - local.tee $1 - i32.const 2 - i32.shr_u - i32.gt_u - if - local.get $8 - i32.const 268435455 - i32.gt_u - if - i32.const 1616 - i32.const 1664 - i32.const 19 - i32.const 48 - call $~lib/builtins/abort - unreachable - end - block $__inlined_func$~lib/rt/itcms/__renew - local.get $1 - i32.const 1 - i32.shl - local.tee $1 - i32.const 1073741820 - local.get $1 - i32.const 1073741820 - i32.lt_u - select - local.tee $1 - local.get $8 - i32.const 8 - local.get $8 - i32.const 8 - i32.gt_u - select - i32.const 2 - i32.shl - local.tee $2 - local.get $1 - local.get $2 - i32.gt_u - select - local.tee $10 - i32.const 1168 - i32.load - local.tee $3 - i32.const 20 - i32.sub - local.tee $1 - i32.load - i32.const -4 - i32.and - i32.const 16 - i32.sub - i32.le_u - if - local.get $1 - local.get $10 - i32.store offset=16 - local.get $3 - local.set $6 - br $__inlined_func$~lib/rt/itcms/__renew - end - local.get $10 - local.get $1 - i32.load offset=12 - call $~lib/rt/itcms/__new - local.tee $6 - local.set $2 - local.get $10 - local.get $1 - i32.load offset=16 - local.tee $1 - local.get $1 - local.get $10 - i32.gt_u - select - local.set $7 - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.get $3 - local.tee $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $2 - i32.sub - local.get $7 - i32.sub - i32.const 0 - local.get $7 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $2 - local.get $1 - local.get $7 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $1 - local.get $2 - i32.gt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $2 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $2 - i32.const 7 - i32.and - if - local.get $7 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $7 - i32.const 1 - i32.sub - local.set $7 - local.get $2 - local.tee $4 - i32.const 1 - i32.add - local.set $2 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $5 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $7 - i32.const 8 - i32.ge_u - if - local.get $2 - local.get $1 - i64.load - i64.store - local.get $7 - i32.const 8 - i32.sub - local.set $7 - local.get $2 - i32.const 8 - i32.add - local.set $2 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $7 - if - local.get $2 - local.tee $4 - i32.const 1 - i32.add - local.set $2 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $5 - i32.load8_u - i32.store8 - local.get $7 - i32.const 1 - i32.sub - local.set $7 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $2 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $2 - local.get $7 - i32.add - i32.const 7 - i32.and - if - local.get $7 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $7 - i32.const 1 - i32.sub - local.tee $7 - local.get $2 - i32.add - local.get $1 - local.get $7 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $7 - i32.const 8 - i32.ge_u - if - local.get $7 - i32.const 8 - i32.sub - local.tee $7 - local.get $2 - i32.add - local.get $1 - local.get $7 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $7 - if - local.get $7 - i32.const 1 - i32.sub - local.tee $7 - local.get $2 - i32.add - local.get $1 - local.get $7 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - end - local.get $3 - local.get $6 - i32.ne - if - i32.const 1168 - local.get $6 - i32.store - i32.const 1172 - local.get $6 - i32.store - local.get $6 - if - local.get $6 - i32.const 0 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - end - i32.const 1176 - local.get $10 - i32.store - end - i32.const 1172 - i32.load - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $0 - i32.store - local.get $0 - if - local.get $0 - i32.const 1 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - i32.const 1180 - local.get $8 - i32.store - ) - (func $~lib/array/Array~visit (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - local.get $0 - i32.load offset=12 - i32.const 2 - i32.shl - i32.add - local.set $3 - loop $while-continue|0 - local.get $1 - local.get $3 - i32.lt_u - if - local.get $1 - i32.load - local.tee $2 - if - local.get $2 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $while-continue|0 - end - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - ) - (func $~lib/rt/__visit_members (param $0 i32) - block $folding-inner1 - block $folding-inner0 - block $invalid - block $~lib/array/Array - block $~lib/array/Array - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $~lib/array/Array $~lib/array/Array $invalid - end - return - end - return - end - local.get $0 - call $~lib/array/Array~visit - return - end - local.get $0 - call $~lib/array/Array~visit - return - end - unreachable - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - return - end - local.get $0 - i32.load offset=16 - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - ) - (func $~start - (local $0 i32) - (local $1 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 1772 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - memory.size - i32.const 16 - i32.shl - i32.const 18156 - i32.sub - i32.const 1 - i32.shr_u - global.set $~lib/rt/itcms/threshold - i32.const 1332 - i32.const 1328 - i32.store - i32.const 1336 - i32.const 1328 - i32.store - i32.const 1328 - global.set $~lib/rt/itcms/pinSpace - i32.const 1364 - i32.const 1360 - i32.store - i32.const 1368 - i32.const 1360 - i32.store - i32.const 1360 - global.set $~lib/rt/itcms/toSpace - i32.const 1508 - i32.const 1504 - i32.store - i32.const 1512 - i32.const 1504 - i32.store - i32.const 1504 - global.set $~lib/rt/itcms/fromSpace - local.get $0 - i32.const 1168 - i32.store - local.get $0 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1772 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i32.const 0 - i32.store - local.get $0 - i32.const 20 - i32.const 6 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - global.get $~lib/memory/__stack_pointer - local.tee $1 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1772 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 + local.get $5 i32.eqz if global.get $~lib/memory/__stack_pointer i32.const 20 i32.const 4 call $~lib/rt/itcms/__new - local.tee $0 + local.tee $5 i32.store end - local.get $0 + local.get $5 f64.const 0 f64.store - local.get $0 + local.get $5 f64.const 0 f64.store offset=8 - local.get $0 + local.get $5 i32.const 0 i32.store offset=16 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 local.get $0 + local.get $5 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $5 i32.store offset=4 - local.get $0 - call $~lib/array/Array#push + i32.const 1180 + i32.load + local.tee $3 + i32.const 1 + i32.add + local.tee $4 + i32.const 1176 + i32.load + local.tee $0 + i32.const 2 + i32.shr_u + i32.gt_u + if + local.get $4 + i32.const 268435455 + i32.gt_u + if + i32.const 1616 + i32.const 1664 + i32.const 19 + i32.const 48 + call $~lib/builtins/abort + unreachable + end + block $__inlined_func$~lib/rt/itcms/__renew + local.get $0 + i32.const 1 + i32.shl + local.tee $0 + i32.const 1073741820 + local.get $0 + i32.const 1073741820 + i32.lt_u + select + local.tee $0 + local.get $4 + i32.const 8 + local.get $4 + i32.const 8 + i32.gt_u + select + i32.const 2 + i32.shl + local.tee $1 + local.get $0 + local.get $1 + i32.gt_u + select + local.tee $2 + i32.const 1168 + i32.load + local.tee $1 + i32.const 20 + i32.sub + local.tee $6 + i32.load + i32.const -4 + i32.and + i32.const 16 + i32.sub + i32.le_u + if + local.get $6 + local.get $2 + i32.store offset=16 + local.get $1 + local.set $0 + br $__inlined_func$~lib/rt/itcms/__renew + end + local.get $2 + local.get $6 + i32.load offset=12 + call $~lib/rt/itcms/__new + local.tee $0 + local.get $1 + local.get $2 + local.get $6 + i32.load offset=16 + local.tee $6 + local.get $2 + local.get $6 + i32.lt_u + select + memory.copy + end + local.get $0 + local.get $1 + i32.ne + if + i32.const 1168 + local.get $0 + i32.store + i32.const 1172 + local.get $0 + i32.store + local.get $0 + if + local.get $0 + i32.const 0 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + end + i32.const 1176 + local.get $2 + i32.store + end + i32.const 1172 + i32.load + local.get $3 + i32.const 2 + i32.shl + i32.add + local.get $5 + i32.store + local.get $5 + if + local.get $5 + i32.const 1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + i32.const 1180 + local.get $4 + i32.store global.get $~lib/memory/__stack_pointer i32.const 8 i32.add diff --git a/tests/compiler/extends-baseaggregate.untouched.wat b/tests/compiler/extends-baseaggregate.untouched.wat index c8c383fd65..19c77a4b63 100644 --- a/tests/compiler/extends-baseaggregate.untouched.wat +++ b/tests/compiler/extends-baseaggregate.untouched.wat @@ -2,9 +2,9 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_f64_=>_none (func (param i32 f64))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) @@ -26,7 +26,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/rt/__rtti_base i32 (i32.const 672)) (global $~lib/memory/__data_end i32 (i32.const 748)) @@ -2072,237 +2071,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2352,7 +2120,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $extends-baseaggregate/A1#set:padding0 (param $0 i32) (param $1 f64) @@ -2442,1259 +2210,6 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -3737,7 +2252,7 @@ local.get $5 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy local.get $3 ) (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) diff --git a/tests/compiler/extends-recursive.optimized.wat b/tests/compiler/extends-recursive.optimized.wat index 19b1b9e2e3..95d2ae4f74 100644 --- a/tests/compiler/extends-recursive.optimized.wat +++ b/tests/compiler/extends-recursive.optimized.wat @@ -1356,31 +1356,7 @@ i32.add local.tee $0 i32.const 0 - i32.store8 - local.get $0 - i32.const 4 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 + i32.store align=1 local.get $0 ) (func $~lib/rt/__visit_members (param $0 i32) diff --git a/tests/compiler/extends-recursive.untouched.wat b/tests/compiler/extends-recursive.untouched.wat index 70248bb3ed..0cb0304e08 100644 --- a/tests/compiler/extends-recursive.untouched.wat +++ b/tests/compiler/extends-recursive.untouched.wat @@ -2,8 +2,8 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $extends-recursive/Child i32 (i32.const 3)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) (global $~lib/memory/__data_end i32 (i32.const 460)) @@ -2067,237 +2066,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2347,7 +2115,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) diff --git a/tests/compiler/features/js-bigint-integration.json b/tests/compiler/features/js-bigint-integration.json index 6f0734818b..d89aa6d3b8 100644 --- a/tests/compiler/features/js-bigint-integration.json +++ b/tests/compiler/features/js-bigint-integration.json @@ -1,7 +1,4 @@ { - "features": [ - "bigint-integration" - ], "asc_flags": [ "--exportStart", "_start" ] diff --git a/tests/compiler/features/mutable-globals.json b/tests/compiler/features/mutable-globals.json index 46620cb015..d89aa6d3b8 100644 --- a/tests/compiler/features/mutable-globals.json +++ b/tests/compiler/features/mutable-globals.json @@ -1,7 +1,4 @@ { - "features": [ - "mutable-globals" - ], "asc_flags": [ "--exportStart", "_start" ] diff --git a/tests/compiler/features/nontrapping-f2i.json b/tests/compiler/features/nontrapping-f2i.json index 15cc7bd4ae..d89aa6d3b8 100644 --- a/tests/compiler/features/nontrapping-f2i.json +++ b/tests/compiler/features/nontrapping-f2i.json @@ -1,7 +1,4 @@ { - "features": [ - "nontrapping-f2i" - ], "asc_flags": [ "--exportStart", "_start" ] diff --git a/tests/compiler/features/not-supported.json b/tests/compiler/features/not-supported.json index 0c149610ab..c00b1eca4d 100644 --- a/tests/compiler/features/not-supported.json +++ b/tests/compiler/features/not-supported.json @@ -1,5 +1,6 @@ { "asc_flags": [ + "--disable", "simd" ], "stderr": [ "AS103: Feature 'simd' is not enabled.", diff --git a/tests/compiler/features/simd.json b/tests/compiler/features/simd.json index cd4e868be3..23ec5535fe 100644 --- a/tests/compiler/features/simd.json +++ b/tests/compiler/features/simd.json @@ -1,7 +1,4 @@ { - "features": [ - "simd" - ], "asc_flags": [ ], "skipInstantiate": true diff --git a/tests/compiler/field-initialization.optimized.wat b/tests/compiler/field-initialization.optimized.wat index 33844a0f64..25a85465fc 100644 --- a/tests/compiler/field-initialization.optimized.wat +++ b/tests/compiler/field-initialization.optimized.wat @@ -1514,182 +1514,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1904,20 +1733,9 @@ br_if $folding-inner0 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 - local.get $0 - i64.const 0 - i64.store offset=32 + i32.const 0 + i32.const 40 + memory.fill memory.size i32.const 16 i32.shl diff --git a/tests/compiler/field-initialization.untouched.wat b/tests/compiler/field-initialization.untouched.wat index f3d6dc05e6..dbb61e8609 100644 --- a/tests/compiler/field-initialization.untouched.wat +++ b/tests/compiler/field-initialization.untouched.wat @@ -24,8 +24,8 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 768)) (global $~lib/memory/__data_end i32 (i32.const 972)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17356)) @@ -2072,237 +2072,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2352,7 +2121,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $field-initialization/Value_Init#set:a (param $0 i32) (param $1 i32) @@ -3115,20 +2884,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 + i32.const 0 + i32.const 40 + memory.fill memory.size i32.const 16 i32.shl diff --git a/tests/compiler/field.optimized.wat b/tests/compiler/field.optimized.wat index 7b55dbd668..592f8a2351 100644 --- a/tests/compiler/field.optimized.wat +++ b/tests/compiler/field.optimized.wat @@ -1492,1153 +1492,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 - ) - (func $~lib/util/memory/memcpy (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 1456 - local.set $1 - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $5 - select - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $5 - i32.const 1 - i32.sub - local.set $5 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $5 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $5 - i32.const 16 - i32.sub - local.set $5 - br $while-continue|1 - end - end - local.get $5 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $5 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $5 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $5 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $5 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $5 - i32.const 3 - i32.sub - local.set $5 - loop $while-continue|3 - local.get $5 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $2 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $3 - i32.const 8 - i32.shl - local.get $2 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $2 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $4 - i32.const 8 - i32.shl - local.get $2 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $5 - i32.const 16 - i32.sub - local.set $5 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $2 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 2 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $5 - i32.const 2 - i32.sub - local.set $5 - loop $while-continue|4 - local.get $5 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $2 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $3 - i32.const 16 - i32.shl - local.get $2 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $2 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $4 - i32.const 16 - i32.shl - local.get $2 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $5 - i32.const 16 - i32.sub - local.set $5 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $5 - i32.const 1 - i32.sub - local.set $5 - loop $while-continue|5 - local.get $5 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $2 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $3 - i32.const 24 - i32.shl - local.get $2 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $2 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $4 - i32.const 24 - i32.shl - local.get $2 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $5 - i32.const 16 - i32.sub - local.set $5 - br $while-continue|5 - end - end - end - end - local.get $5 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $2 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $2 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $5 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $2 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $2 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $5 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $2 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $2 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $5 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $2 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 2 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $5 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $field/testNoStaticConflict - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 1524 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $6 - i32.const 0 - i32.store - local.get $6 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1524 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i32.const 0 - i32.store - local.get $0 - i32.const 4 - i32.const 3 - call $~lib/rt/itcms/__new - local.tee $7 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1524 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $5 - i32.const 0 - i32.store - i32.const 1456 - local.set $0 - block $~lib/util/memory/memmove|inlined.0 - i32.const 0 - i32.const 0 - call $~lib/rt/itcms/__new - local.tee $4 - local.tee $1 - i32.const 1456 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - i32.const 1456 - i32.eq - if - local.get $1 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $1 - i32.const 1456 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - i32.eqz - if - loop $while-continue|0 - local.get $1 - i32.const 7 - i32.and - if - local.get $8 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $8 - i32.const 1 - i32.sub - local.set $8 - local.get $1 - local.tee $2 - i32.const 1 - i32.add - local.set $1 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $8 - i32.const 8 - i32.ge_u - if - local.get $1 - local.get $0 - i64.load - i64.store - local.get $8 - i32.const 8 - i32.sub - local.set $8 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $8 - if - local.get $1 - local.tee $2 - i32.const 1 - i32.add - local.set $1 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $8 - i32.const 1 - i32.sub - local.set $8 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - i32.eqz - if - loop $while-continue|3 - local.get $1 - local.get $8 - i32.add - i32.const 7 - i32.and - if - local.get $8 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $8 - i32.const 1 - i32.sub - local.tee $8 - local.get $1 - i32.add - local.get $8 - i32.const 1456 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $8 - i32.const 8 - i32.ge_u - if - local.get $8 - i32.const 8 - i32.sub - local.tee $8 - local.get $1 - i32.add - local.get $8 - i32.const 1456 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $8 - if - local.get $8 - i32.const 1 - i32.sub - local.tee $8 - local.get $1 - i32.add - local.get $8 - i32.const 1456 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - local.get $5 - local.get $4 - i32.store - i32.const 16 - i32.const 4 - call $~lib/rt/itcms/__new - local.tee $0 - local.get $4 - i32.store - local.get $4 - if - local.get $0 - local.get $4 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $0 - local.get $4 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 - local.get $0 - i32.store - local.get $0 - if - local.get $7 - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - local.get $7 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - return - end - i32.const 17936 - i32.const 17984 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/rt/__visit_members (param $0 i32) (local $1 i32) @@ -2710,6 +1568,10 @@ end ) (func $~start + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) memory.size i32.const 16 i32.shl @@ -2742,7 +1604,114 @@ i32.store i32.const 1344 global.set $~lib/rt/itcms/fromSpace - call $field/testNoStaticConflict + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + block $__inlined_func$field/testNoStaticConflict + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 1524 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1524 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 4 + i32.const 3 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1524 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $2 + i32.const 0 + i32.store + i32.const 0 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $3 + i32.const 1456 + i32.const 0 + memory.copy + local.get $2 + local.get $3 + i32.store + i32.const 16 + i32.const 4 + call $~lib/rt/itcms/__new + local.tee $2 + local.get $3 + i32.store + local.get $3 + if + local.get $2 + local.get $3 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $2 + local.get $3 + i32.store offset=4 + local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + i32.const 0 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + local.get $2 + i32.store + local.get $2 + if + local.get $0 + local.get $2 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + br $__inlined_func$field/testNoStaticConflict + end + i32.const 17936 + i32.const 17984 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/rt/itcms/state i32.const 0 i32.gt_s diff --git a/tests/compiler/field.untouched.wat b/tests/compiler/field.untouched.wat index 3bd4ab5457..cef54831a7 100644 --- a/tests/compiler/field.untouched.wat +++ b/tests/compiler/field.untouched.wat @@ -24,7 +24,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 448)) (global $~lib/memory/__data_end i32 (i32.const 500)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16884)) @@ -2064,237 +2063,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2344,7 +2112,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) @@ -2424,1259 +2192,6 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 @@ -3688,7 +2203,7 @@ local.get $3 local.get $2 local.get $0 - call $~lib/memory/memory.copy + memory.copy end local.get $3 ) diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 449ace1ed4..866daa10bd 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1714,11 +1714,15 @@ i32.add i32.add global.set $~lib/rt/itcms/total - local.get $2 local.get $0 i32.const 20 i32.add local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $2 + local.get $0 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 diff --git a/tests/compiler/for.untouched.wat b/tests/compiler/for.untouched.wat index 8c290cd1a0..5ac45c0543 100644 --- a/tests/compiler/for.untouched.wat +++ b/tests/compiler/for.untouched.wat @@ -3,8 +3,8 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) @@ -24,7 +24,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 448)) (global $~lib/memory/__data_end i32 (i32.const 484)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16868)) @@ -2489,237 +2488,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2769,7 +2537,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $for/testRef diff --git a/tests/compiler/function-call.optimized.wat b/tests/compiler/function-call.optimized.wat index 61dbfbe950..1127d0eee8 100644 --- a/tests/compiler/function-call.optimized.wat +++ b/tests/compiler/function-call.optimized.wat @@ -1257,6 +1257,11 @@ local.get $0 i32.const 20 i32.add + local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $0 ) (func $function-call/Foo#fnVoid (param $0 i32) nop diff --git a/tests/compiler/function-call.untouched.wat b/tests/compiler/function-call.untouched.wat index f2f7c7de6d..7cdcb24b87 100644 --- a/tests/compiler/function-call.untouched.wat +++ b/tests/compiler/function-call.untouched.wat @@ -4,8 +4,8 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -29,7 +29,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $function-call/foo (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 736)) (global $~lib/memory/__data_end i32 (i32.const 812)) @@ -2097,237 +2096,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2377,7 +2145,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $function-call/Foo#fnVoid (param $0 i32) diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index d0654eee7f..bba5fab8b1 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -1523,31 +1523,7 @@ i32.add local.tee $0 i32.const 0 - i32.store8 - local.get $0 - i32.const 4 - i32.add - local.tee $2 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $2 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 + i32.store align=1 local.get $1 local.get $0 i32.store diff --git a/tests/compiler/function-expression.untouched.wat b/tests/compiler/function-expression.untouched.wat index 05fb472091..e3f259681d 100644 --- a/tests/compiler/function-expression.untouched.wat +++ b/tests/compiler/function-expression.untouched.wat @@ -30,7 +30,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 1088)) (global $~lib/memory/__data_end i32 (i32.const 1172)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17556)) @@ -2253,237 +2252,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2533,7 +2301,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 8e8d5fb2f4..85a3cae4bb 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -1315,11 +1315,15 @@ i32.add i32.add global.set $~lib/rt/itcms/total - local.get $2 local.get $0 i32.const 20 i32.add local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $2 + local.get $0 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index e5894e8c46..bf2fee3a33 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -4,8 +4,8 @@ (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 448)) (global $~lib/memory/__data_end i32 (i32.const 492)) @@ -2065,237 +2064,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2345,7 +2113,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $getter-call/C#get:x~anonymous|0 (result i32) diff --git a/tests/compiler/heap.optimized.wat b/tests/compiler/heap.optimized.wat index 395b714751..af9de9f6dd 100644 --- a/tests/compiler/heap.optimized.wat +++ b/tests/compiler/heap.optimized.wat @@ -1,9 +1,9 @@ (module - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) @@ -987,894 +987,21 @@ end local.get $1 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) (func $~lib/rt/tlsf/moveBlock (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.get $0 local.get $2 call $~lib/rt/tlsf/allocateBlock - local.set $6 + local.tee $2 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add local.get $1 i32.load i32.const -4 i32.and - local.set $7 - block $~lib/util/memory/memmove|inlined.0 - local.get $6 - i32.const 4 - i32.add - local.tee $2 - local.get $1 - i32.const 4 - i32.add - local.tee $3 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 - local.get $2 - i32.sub - local.get $7 - i32.sub - i32.const 0 - local.get $7 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $2 - local.get $3 - local.get $7 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $2 - local.get $3 - i32.lt_u - if - local.get $3 - i32.const 7 - i32.and - local.get $2 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $2 - i32.const 7 - i32.and - if - local.get $7 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $7 - i32.const 1 - i32.sub - local.set $7 - local.get $2 - local.tee $4 - i32.const 1 - i32.add - local.set $2 - local.get $3 - local.tee $5 - i32.const 1 - i32.add - local.set $3 - local.get $4 - local.get $5 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $7 - i32.const 8 - i32.ge_u - if - local.get $2 - local.get $3 - i64.load - i64.store - local.get $7 - i32.const 8 - i32.sub - local.set $7 - local.get $2 - i32.const 8 - i32.add - local.set $2 - local.get $3 - i32.const 8 - i32.add - local.set $3 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $7 - if - local.get $2 - local.tee $4 - i32.const 1 - i32.add - local.set $2 - local.get $3 - local.tee $5 - i32.const 1 - i32.add - local.set $3 - local.get $4 - local.get $5 - i32.load8_u - i32.store8 - local.get $7 - i32.const 1 - i32.sub - local.set $7 - br $while-continue|2 - end - end - else - local.get $3 - i32.const 7 - i32.and - local.get $2 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $2 - local.get $7 - i32.add - i32.const 7 - i32.and - if - local.get $7 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $7 - i32.const 1 - i32.sub - local.tee $7 - local.get $2 - i32.add - local.get $3 - local.get $7 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $7 - i32.const 8 - i32.ge_u - if - local.get $7 - i32.const 8 - i32.sub - local.tee $7 - local.get $2 - i32.add - local.get $3 - local.get $7 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $7 - if - local.get $7 - i32.const 1 - i32.sub - local.tee $7 - local.get $2 - i32.add - local.get $3 - local.get $7 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end + memory.copy local.get $1 i32.const 17660 i32.ge_u @@ -1889,7 +1016,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock end - local.get $6 + local.get $2 ) (func $~lib/memory/heap.realloc (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/heap.untouched.wat b/tests/compiler/heap.untouched.wat index 834975369e..46dfc46b42 100644 --- a/tests/compiler/heap.untouched.wat +++ b/tests/compiler/heap.untouched.wat @@ -4,14 +4,13 @@ (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $heap/ptr (mut i32) (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/memory/__data_end i32 (i32.const 252)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16636)) (global $~lib/memory/__heap_base i32 (i32.const 16636)) @@ -1431,1259 +1430,6 @@ end local.get $1 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) i32.const 0 drop @@ -2715,7 +1461,7 @@ i32.const -1 i32.xor i32.and - call $~lib/memory/memory.copy + memory.copy local.get $1 global.get $~lib/memory/__heap_base i32.ge_u diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 95b131e5d9..acaca52c6f 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1362,31 +1362,7 @@ i32.add local.tee $0 i32.const 0 - i32.store8 - local.get $0 - i32.const 4 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 + i32.store align=1 local.get $0 ) (func $~lib/rt/__visit_members (param $0 i32) diff --git a/tests/compiler/implicit-getter-setter.untouched.wat b/tests/compiler/implicit-getter-setter.untouched.wat index aa2dea3417..abedf602f5 100644 --- a/tests/compiler/implicit-getter-setter.untouched.wat +++ b/tests/compiler/implicit-getter-setter.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $implicit-getter-setter/Basic i32 (i32.const 3)) (global $implicit-getter-setter/Managed i32 (i32.const 4)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) @@ -2072,237 +2071,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2352,7 +2120,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $implicit-getter-setter/Basic#set:val (param $0 i32) (param $1 i32) diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index af3287622b..6f34e4d213 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) @@ -1528,1058 +1528,205 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 + ) + (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $2 + if local.get $0 - local.get $1 - i32.add - local.tee $3 + local.get $2 i32.const 1 - i32.sub - i32.const 0 - i32.store8 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + ) + (func $start:infer-array + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 16 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2212 + i32.lt_s + if + i32.const 18624 + i32.const 18672 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + memory.size + i32.const 16 + i32.shl + i32.const 18596 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 1204 + i32.const 1200 + i32.store + i32.const 1208 + i32.const 1200 + i32.store + i32.const 1200 + global.set $~lib/rt/itcms/pinSpace + i32.const 1236 + i32.const 1232 + i32.store + i32.const 1240 + i32.const 1232 + i32.store + i32.const 1232 + global.set $~lib/rt/itcms/toSpace + i32.const 1380 + i32.const 1376 + i32.store + i32.const 1384 + i32.const 1376 + i32.store + i32.const 1376 + global.set $~lib/rt/itcms/fromSpace + local.get $0 + i32.const 3 + i32.const 2 + i32.const 3 + i32.const 1056 + call $~lib/rt/__newArray + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 3 + i32.const 3 + i32.const 4 + i32.const 1536 + call $~lib/rt/__newArray + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 2 + i32.const 2 + i32.const 5 + i32.const 1584 + call $~lib/rt/__newArray + local.tee $0 + i32.store + block $folding-inner0 local.get $0 - i32.const 2 + i32.load offset=12 + i32.const 1 i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 + br_if $folding-inner0 local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 + i32.load offset=4 + i32.load offset=4 + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1616 + i32.const 14 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 3 + i32.const 3 i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub + i32.const 1664 + call $~lib/rt/__newArray + i32.store offset=4 + global.get $~lib/memory/__stack_pointer i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and + i32.const 2 + i32.const 6 + i32.const 1712 + call $~lib/rt/__newArray local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 i32.store local.get $0 - i32.const 8 + i32.load offset=12 + i32.const 1 i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + f32.load offset=4 + drop + global.get $~lib/memory/__stack_pointer + call $infer-array/Ref#constructor + local.tee $0 + i32.store + global.get $~lib/memory/__stack_pointer + call $infer-array/Ref#constructor + local.tee $1 i32.store offset=4 - local.get $1 + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2 + i32.const 2 + i32.const 8 i32.const 0 + call $~lib/rt/__newArray + local.tee $3 i32.store offset=8 + global.get $~lib/memory/__stack_pointer local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store + i32.load offset=4 + i32.store offset=12 local.get $3 - i32.const 8 - i32.sub i32.const 0 - i32.store local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 + call $~lib/array/Array#__uset + local.get $3 + i32.const 1 local.get $1 - i32.const 0 - i32.store offset=24 + call $~lib/array/Array#__uset local.get $3 - i32.const 28 - i32.sub + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + call $infer-array/Ref#constructor + local.tee $0 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + call $infer-array/Ref#constructor + local.tee $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2 + i32.const 2 + i32.const 8 i32.const 0 + call $~lib/rt/__newArray + local.tee $3 i32.store + global.get $~lib/memory/__stack_pointer local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - ) - (func $start:infer-array - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 16 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2212 - i32.lt_s - if - i32.const 18624 - i32.const 18672 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - memory.size - i32.const 16 - i32.shl - i32.const 18596 - i32.sub - i32.const 1 - i32.shr_u - global.set $~lib/rt/itcms/threshold - i32.const 1204 - i32.const 1200 - i32.store - i32.const 1208 - i32.const 1200 - i32.store - i32.const 1200 - global.set $~lib/rt/itcms/pinSpace - i32.const 1236 - i32.const 1232 - i32.store - i32.const 1240 - i32.const 1232 - i32.store - i32.const 1232 - global.set $~lib/rt/itcms/toSpace - i32.const 1380 - i32.const 1376 - i32.store - i32.const 1384 - i32.const 1376 - i32.store - i32.const 1376 - global.set $~lib/rt/itcms/fromSpace - local.get $0 - i32.const 3 - i32.const 2 - i32.const 3 - i32.const 1056 - call $~lib/rt/__newArray - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 3 - i32.const 3 - i32.const 4 - i32.const 1536 - call $~lib/rt/__newArray - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 2 - i32.const 2 - i32.const 5 - i32.const 1584 - call $~lib/rt/__newArray - local.tee $0 - i32.store - block $folding-inner0 - local.get $0 - i32.load offset=12 - i32.const 1 - i32.le_u - br_if $folding-inner0 - local.get $0 - i32.load offset=4 - i32.load offset=4 - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1616 - i32.const 14 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 3 - i32.const 3 - i32.const 4 - i32.const 1664 - call $~lib/rt/__newArray - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 3 - i32.const 2 - i32.const 6 - i32.const 1712 - call $~lib/rt/__newArray - local.tee $0 - i32.store - local.get $0 - i32.load offset=12 - i32.const 1 - i32.le_u - br_if $folding-inner0 - local.get $0 - i32.load offset=4 - f32.load offset=4 - drop - global.get $~lib/memory/__stack_pointer - call $infer-array/Ref#constructor - local.tee $0 - i32.store - global.get $~lib/memory/__stack_pointer - call $infer-array/Ref#constructor - local.tee $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2 - i32.const 2 - i32.const 8 - i32.const 0 - call $~lib/rt/__newArray - local.tee $3 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.load offset=4 - i32.store offset=12 - local.get $3 - i32.const 0 - local.get $0 - call $~lib/array/Array#__uset - local.get $3 - i32.const 1 - local.get $1 - call $~lib/array/Array#__uset - local.get $3 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - call $infer-array/Ref#constructor - local.tee $0 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - call $infer-array/Ref#constructor - local.tee $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2 - i32.const 2 - i32.const 8 - i32.const 0 - call $~lib/rt/__newArray - local.tee $3 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.load offset=4 - i32.store offset=8 + i32.load offset=4 + i32.store offset=8 local.get $3 i32.const 0 local.get $0 @@ -2771,10 +1918,6 @@ (func $~lib/rt/__newArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2791,237 +1934,53 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $9 + local.tee $4 i32.const 0 i32.store local.get $0 local.get $1 i32.shl - local.tee $8 + local.tee $5 i32.const 0 call $~lib/rt/itcms/__new - local.set $6 + local.set $1 local.get $3 if - block $~lib/util/memory/memmove|inlined.0 - local.get $8 - local.set $7 - local.get $6 - local.tee $1 - local.get $3 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 - local.get $1 - i32.sub - local.get $7 - i32.sub - i32.const 0 - local.get $7 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $1 - local.get $3 - local.get $7 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $1 - local.get $3 - i32.lt_u - if - local.get $3 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $1 - i32.const 7 - i32.and - if - local.get $7 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $7 - i32.const 1 - i32.sub - local.set $7 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.tee $5 - i32.const 1 - i32.add - local.set $3 - local.get $4 - local.get $5 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $7 - i32.const 8 - i32.ge_u - if - local.get $1 - local.get $3 - i64.load - i64.store - local.get $7 - i32.const 8 - i32.sub - local.set $7 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $3 - i32.const 8 - i32.add - local.set $3 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $7 - if - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.tee $5 - i32.const 1 - i32.add - local.set $3 - local.get $4 - local.get $5 - i32.load8_u - i32.store8 - local.get $7 - i32.const 1 - i32.sub - local.set $7 - br $while-continue|2 - end - end - else - local.get $3 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $1 - local.get $7 - i32.add - i32.const 7 - i32.and - if - local.get $7 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $7 - i32.const 1 - i32.sub - local.tee $7 - local.get $1 - i32.add - local.get $3 - local.get $7 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $7 - i32.const 8 - i32.ge_u - if - local.get $7 - i32.const 8 - i32.sub - local.tee $7 - local.get $1 - i32.add - local.get $3 - local.get $7 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $7 - if - local.get $7 - i32.const 1 - i32.sub - local.tee $7 - local.get $1 - i32.add - local.get $3 - local.get $7 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end + local.get $1 + local.get $3 + local.get $5 + memory.copy end - local.get $9 - local.get $6 + local.get $4 + local.get $1 i32.store i32.const 16 local.get $2 call $~lib/rt/itcms/__new - local.tee $1 - local.get $6 + local.tee $2 + local.get $1 i32.store - local.get $6 + local.get $1 if + local.get $2 local.get $1 - local.get $6 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end + local.get $2 local.get $1 - local.get $6 i32.store offset=4 - local.get $1 - local.get $8 + local.get $2 + local.get $5 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $2 ) (func $infer-array/Ref#constructor (result i32) (local $0 i32) diff --git a/tests/compiler/infer-array.untouched.wat b/tests/compiler/infer-array.untouched.wat index 76234dcdc7..23e6e1b337 100644 --- a/tests/compiler/infer-array.untouched.wat +++ b/tests/compiler/infer-array.untouched.wat @@ -2,8 +2,8 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -26,7 +26,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 1088)) (global $~lib/memory/__data_end i32 (i32.const 1188)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17572)) @@ -2081,237 +2080,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2361,1262 +2129,9 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 @@ -3628,7 +2143,7 @@ local.get $3 local.get $2 local.get $0 - call $~lib/memory/memory.copy + memory.copy end local.get $3 ) diff --git a/tests/compiler/infer-generic.optimized.wat b/tests/compiler/infer-generic.optimized.wat index 7c6b5480b0..f29c99f5bf 100644 --- a/tests/compiler/infer-generic.optimized.wat +++ b/tests/compiler/infer-generic.optimized.wat @@ -1246,31 +1246,7 @@ i32.add local.tee $0 i32.const 0 - i32.store8 - local.get $0 - i32.const 4 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 + i32.store align=1 local.get $0 ) (func $infer-generic/test1 (param $0 f32) (result f32) diff --git a/tests/compiler/infer-generic.untouched.wat b/tests/compiler/infer-generic.untouched.wat index 5fd16618e0..0ff5e3cf81 100644 --- a/tests/compiler/infer-generic.untouched.wat +++ b/tests/compiler/infer-generic.untouched.wat @@ -3,10 +3,10 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_f32_i32_i32_=>_i32 (func (param i32 f32 i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $f32_=>_f32 (func (param f32) (result f32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -28,7 +28,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 592)) (global $~lib/memory/__data_end i32 (i32.const 660)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17044)) @@ -2151,237 +2150,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2431,7 +2199,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $infer-generic/inferDefault (param $0 i32) (result i32) diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 23018c5627..ef069cde4b 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -1373,182 +1373,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/rt/__visit_members (param $0 i32) block $invalid diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 43367d9f24..0534093350 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -3,9 +3,9 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -25,7 +25,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 496)) (global $~lib/memory/__data_end i32 (i32.const 556)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16940)) @@ -2271,237 +2270,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2551,7 +2319,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $inlining/Baz#set:a (param $0 i32) (param $1 i32) diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index a2b2a2fc4c..002f2e6542 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -1233,6 +1233,11 @@ local.get $1 i32.const 20 i32.add + local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $0 ) (func $start:instanceof-class (local $0 i32) diff --git a/tests/compiler/instanceof-class.untouched.wat b/tests/compiler/instanceof-class.untouched.wat index 9ade92492a..363a0eab83 100644 --- a/tests/compiler/instanceof-class.untouched.wat +++ b/tests/compiler/instanceof-class.untouched.wat @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $instanceof-class/a (mut i32) (i32.const 0)) (global $instanceof-class/b (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 480)) @@ -2065,237 +2064,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2345,7 +2113,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $start:instanceof-class diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 97143ca3ac..f3a3b2466c 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -1356,31 +1356,7 @@ i32.add local.tee $0 i32.const 0 - i32.store8 - local.get $0 - i32.const 4 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 + i32.store align=1 local.get $0 ) (func $~lib/rt/__visit_members (param $0 i32) diff --git a/tests/compiler/issues/1095.untouched.wat b/tests/compiler/issues/1095.untouched.wat index a5cbb84821..099c23fb20 100644 --- a/tests/compiler/issues/1095.untouched.wat +++ b/tests/compiler/issues/1095.untouched.wat @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 560)) (global $~lib/memory/__data_end i32 (i32.const 596)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16980)) @@ -2065,237 +2064,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2345,7 +2113,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) diff --git a/tests/compiler/issues/1225.optimized.wat b/tests/compiler/issues/1225.optimized.wat index 1b30edf1b9..ff4e46890d 100644 --- a/tests/compiler/issues/1225.optimized.wat +++ b/tests/compiler/issues/1225.optimized.wat @@ -1015,7 +1015,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) memory.size i32.const 16 i32.shl @@ -1118,7 +1117,7 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $3 call $~lib/rt/tlsf/searchBlock local.tee $0 i32.eqz @@ -1126,7 +1125,7 @@ memory.size local.tee $0 i32.const 4 - local.get $1 + local.get $3 i32.load offset=1568 local.get $0 i32.const 16 @@ -1141,16 +1140,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 + local.tee $1 local.get $0 - local.get $3 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -1158,7 +1157,7 @@ unreachable end end - local.get $1 + local.get $3 local.get $0 i32.const 16 i32.shl @@ -1166,7 +1165,7 @@ i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory - local.get $1 + local.get $3 call $~lib/rt/tlsf/searchBlock local.tee $0 i32.eqz @@ -1193,22 +1192,22 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 local.get $0 call $~lib/rt/tlsf/removeBlock local.get $0 i32.load - local.tee $3 + local.tee $4 i32.const -4 i32.and i32.const 28 i32.sub - local.tee $4 + local.tee $1 i32.const 16 i32.ge_u if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.and i32.const 28 @@ -1217,19 +1216,19 @@ local.get $0 i32.const 32 i32.add - local.tee $3 - local.get $4 + local.tee $4 + local.get $1 i32.const 4 i32.sub i32.const 1 i32.or i32.store - local.get $1 local.get $3 + local.get $4 call $~lib/rt/tlsf/insertBlock else local.get $0 - local.get $3 + local.get $4 i32.const -2 i32.and i32.store @@ -1289,189 +1288,34 @@ local.get $0 i32.const 20 i32.add - local.tee $3 local.tee $0 i32.const 0 - i32.store8 - local.get $0 i32.const 12 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 0 - i32.store8 offset=3 - local.get $1 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 0 + memory.fill + local.get $2 local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $1 - i32.add - local.tee $0 - i32.const 0 i32.store local.get $0 - i32.const 12 - local.get $1 - i32.sub - i32.const -4 - i32.and - local.tee $4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - i32.const 0 - i32.store - block $~lib/util/memory/memset|inlined.0 - local.get $4 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $4 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $1 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $0 - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $5 - i32.add - local.set $1 - local.get $4 - local.get $5 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 - local.get $3 - i32.store - local.get $3 i32.const 4 i32.store offset=8 - local.get $3 + local.get $0 i32.const 0 i32.store - local.get $3 + local.get $0 i32.const 0 i32.store offset=4 - local.get $3 - local.get $3 + local.get $0 + local.get $0 i32.load offset=8 i32.store offset=4 - local.get $3 + local.get $0 i32.const 4 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $0 global.set $issues/1225/x global.get $issues/1225/x i32.load @@ -1503,12 +1347,12 @@ i32.const 0 i32.gt_s if - loop $while-continue|00 + loop $while-continue|0 global.get $~lib/rt/itcms/state if call $~lib/rt/itcms/step drop - br $while-continue|00 + br $while-continue|0 end end end diff --git a/tests/compiler/issues/1225.untouched.wat b/tests/compiler/issues/1225.untouched.wat index 88250d171a..e338e61487 100644 --- a/tests/compiler/issues/1225.untouched.wat +++ b/tests/compiler/issues/1225.untouched.wat @@ -4,8 +4,8 @@ (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $issues/1225/x (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 464)) (global $~lib/memory/__data_end i32 (i32.const 500)) @@ -2076,237 +2075,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2356,7 +2124,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $issues/1225/X#set:x (param $0 i32) (param $1 i32) diff --git a/tests/compiler/issues/1699.optimized.wat b/tests/compiler/issues/1699.optimized.wat index 3fa24fc513..9854775515 100644 --- a/tests/compiler/issues/1699.optimized.wat +++ b/tests/compiler/issues/1699.optimized.wat @@ -1,7 +1,7 @@ (module - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -1503,1161 +1503,118 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=12 + local.get $1 + i32.le_u + if local.get $1 i32.const 0 - i32.store8 - local.get $0 + i32.lt_s + if + i32.const 1344 + i32.const 1104 + i32.const 130 + i32.const 22 + call $~lib/builtins/abort + unreachable + end local.get $1 - i32.add - local.tee $3 i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 i32.add local.tee $3 - i32.add - local.set $1 local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select + i32.load offset=8 + local.tee $4 + i32.const 2 + i32.shr_u + i32.gt_u if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u + i32.const 268435455 + i32.gt_u if + i32.const 1056 + i32.const 1104 + i32.const 19 + i32.const 48 + call $~lib/builtins/abort + unreachable + end + block $__inlined_func$~lib/rt/itcms/__renew + local.get $4 + i32.const 1 + i32.shl + local.tee $4 + i32.const 1073741820 + local.get $4 + i32.const 1073741820 + i32.lt_u + select + local.tee $4 + local.get $3 + i32.const 8 + local.get $3 + i32.const 8 + i32.gt_u + select + i32.const 2 + i32.shl + local.tee $3 + local.get $3 + local.get $4 + i32.lt_u + select + local.tee $5 local.get $0 - local.get $1 i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - local.get $0 - i32.load offset=12 - local.get $1 - i32.le_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 1344 - i32.const 1104 - i32.const 130 - i32.const 22 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.add - local.tee $3 - local.get $0 - i32.load offset=8 - local.tee $4 - i32.const 2 - i32.shr_u - i32.gt_u - if - local.get $3 - i32.const 268435455 - i32.gt_u - if - i32.const 1056 - i32.const 1104 - i32.const 19 - i32.const 48 - call $~lib/builtins/abort - unreachable - end - block $__inlined_func$~lib/rt/itcms/__renew (result i32) - local.get $4 - i32.const 1 - i32.shl - local.tee $4 - i32.const 1073741820 - local.get $4 - i32.const 1073741820 - i32.lt_u - select - local.tee $4 - local.get $3 - i32.const 8 - local.get $3 - i32.const 8 - i32.gt_u - select - i32.const 2 - i32.shl - local.tee $3 - local.get $3 - local.get $4 - i32.lt_u - select - local.tee $9 - local.get $0 - i32.load - local.tee $8 - i32.const 20 - i32.sub - local.tee $3 - i32.load - i32.const -4 - i32.and + local.tee $4 + i32.const 20 + i32.sub + local.tee $6 + i32.load + i32.const -4 + i32.and i32.const 16 i32.sub i32.le_u if - local.get $3 - local.get $9 + local.get $6 + local.get $5 i32.store offset=16 - local.get $8 + local.get $4 + local.set $3 br $__inlined_func$~lib/rt/itcms/__renew end - local.get $9 - local.get $3 + local.get $5 + local.get $6 i32.load offset=12 call $~lib/rt/itcms/__new - local.set $7 - local.get $9 - local.get $3 - i32.load offset=16 local.tee $3 - local.get $3 - local.get $9 - i32.gt_u + local.get $4 + local.get $5 + local.get $6 + i32.load offset=16 + local.tee $6 + local.get $5 + local.get $6 + i32.lt_u select - local.set $10 - block $~lib/util/memory/memmove|inlined.0 - local.get $7 - local.tee $4 - local.get $8 - local.tee $3 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 - local.get $4 - i32.sub - local.get $10 - i32.sub - i32.const 0 - local.get $10 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $4 - local.get $3 - local.get $10 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - local.get $4 - i32.gt_u - if - local.get $3 - i32.const 7 - i32.and - local.get $4 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $4 - i32.const 7 - i32.and - if - local.get $10 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $10 - i32.const 1 - i32.sub - local.set $10 - local.get $4 - local.tee $5 - i32.const 1 - i32.add - local.set $4 - local.get $3 - local.tee $6 - i32.const 1 - i32.add - local.set $3 - local.get $5 - local.get $6 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $10 - i32.const 8 - i32.ge_u - if - local.get $4 - local.get $3 - i64.load - i64.store - local.get $10 - i32.const 8 - i32.sub - local.set $10 - local.get $4 - i32.const 8 - i32.add - local.set $4 - local.get $3 - i32.const 8 - i32.add - local.set $3 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $10 - if - local.get $4 - local.tee $5 - i32.const 1 - i32.add - local.set $4 - local.get $3 - local.tee $6 - i32.const 1 - i32.add - local.set $3 - local.get $5 - local.get $6 - i32.load8_u - i32.store8 - local.get $10 - i32.const 1 - i32.sub - local.set $10 - br $while-continue|2 - end - end - else - local.get $3 - i32.const 7 - i32.and - local.get $4 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $4 - local.get $10 - i32.add - i32.const 7 - i32.and - if - local.get $10 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $10 - i32.const 1 - i32.sub - local.tee $10 - local.get $4 - i32.add - local.get $3 - local.get $10 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $10 - i32.const 8 - i32.ge_u - if - local.get $10 - i32.const 8 - i32.sub - local.tee $10 - local.get $4 - i32.add - local.get $3 - local.get $10 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $10 - if - local.get $10 - i32.const 1 - i32.sub - local.tee $10 - local.get $4 - i32.add - local.get $3 - local.get $10 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - local.get $7 + memory.copy end - local.tee $3 - local.get $8 + local.get $3 + local.get $4 i32.ne if local.get $0 @@ -2675,7 +1632,7 @@ end end local.get $0 - local.get $9 + local.get $5 i32.store offset=8 end local.get $0 diff --git a/tests/compiler/issues/1699.untouched.wat b/tests/compiler/issues/1699.untouched.wat index 49951b41ae..03e6eedfc3 100644 --- a/tests/compiler/issues/1699.untouched.wat +++ b/tests/compiler/issues/1699.untouched.wat @@ -1,10 +1,10 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/rt/__rtti_base i32 (i32.const 688)) (global $~lib/memory/__data_end i32 (i32.const 732)) @@ -2067,237 +2066,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2347,7 +2115,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) @@ -2447,1259 +2215,6 @@ local.get $1 i32.store ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -3742,7 +2257,7 @@ local.get $5 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy local.get $3 ) (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) diff --git a/tests/compiler/issues/2166.optimized.wat b/tests/compiler/issues/2166.optimized.wat index 85a6ad6e83..b300e213d5 100644 --- a/tests/compiler/issues/2166.optimized.wat +++ b/tests/compiler/issues/2166.optimized.wat @@ -1228,6 +1228,11 @@ local.get $1 i32.const 20 i32.add + local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $0 ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/issues/2166.untouched.wat b/tests/compiler/issues/2166.untouched.wat index 2f33a2b7d3..23c7bec9db 100644 --- a/tests/compiler/issues/2166.untouched.wat +++ b/tests/compiler/issues/2166.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) @@ -2068,237 +2068,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2348,7 +2117,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index 9d588d0b05..72fe274540 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -1387,11 +1387,15 @@ i32.add i32.add global.set $~lib/rt/itcms/total - local.get $2 local.get $0 i32.const 20 i32.add local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $2 + local.get $0 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 diff --git a/tests/compiler/logical.untouched.wat b/tests/compiler/logical.untouched.wat index a97e0aa6b6..fc05bf37c0 100644 --- a/tests/compiler/logical.untouched.wat +++ b/tests/compiler/logical.untouched.wat @@ -4,8 +4,8 @@ (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i64_i32_=>_i32 (func (param i64 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) @@ -28,7 +28,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 464)) (global $~lib/memory/__data_end i32 (i32.const 500)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16884)) @@ -2088,237 +2087,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2368,7 +2136,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $logical/testContextualBoolAnd (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 874b65e297..7960564e04 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -1223,6 +1223,11 @@ local.get $1 i32.const 20 i32.add + local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $0 ) (func $~lib/rt/__visit_members (param $0 i32) block $invalid diff --git a/tests/compiler/managed-cast.untouched.wat b/tests/compiler/managed-cast.untouched.wat index 8a6df2dcad..e74c89beea 100644 --- a/tests/compiler/managed-cast.untouched.wat +++ b/tests/compiler/managed-cast.untouched.wat @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 608)) (global $~lib/memory/__data_end i32 (i32.const 652)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17036)) @@ -2065,237 +2064,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2345,7 +2113,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $managed-cast/Animal#tame (param $0 i32) diff --git a/tests/compiler/new.optimized.wat b/tests/compiler/new.optimized.wat index 63c45a9f98..01daec402f 100644 --- a/tests/compiler/new.optimized.wat +++ b/tests/compiler/new.optimized.wat @@ -1259,6 +1259,11 @@ local.get $1 i32.const 20 i32.add + local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $0 ) (func $~lib/rt/__visit_members (param $0 i32) block $invalid diff --git a/tests/compiler/new.untouched.wat b/tests/compiler/new.untouched.wat index 4984a46c06..32dc39b5a6 100644 --- a/tests/compiler/new.untouched.wat +++ b/tests/compiler/new.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) @@ -24,7 +24,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $new/gen (mut i32) (i32.const 0)) (global $new/ref2 (mut i32) (i32.const 0)) (global $new/genext (mut i32) (i32.const 0)) @@ -2068,237 +2067,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2348,7 +2116,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $new/Ref#get:ref (param $0 i32) (result i32) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 902b8c2561..0f6851309d 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -1408,182 +1408,11 @@ local.get $1 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -2348,879 +2177,6 @@ i32.store16 local.get $4 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -3302,7 +2258,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $2 i32.const 46 i32.store16 @@ -3330,7 +2286,7 @@ local.get $0 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy i32.const 3456 i32.const 3014704 i32.store @@ -3446,7 +2402,7 @@ local.tee $1 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy i32.const 3458 i32.const 46 i32.store16 @@ -3767,7 +2723,7 @@ local.get $1 i32.const 3456 local.get $0 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 11939140ce..195a4471a4 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $f64_=>_i32 (func (param f64) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $f32_=>_i32 (func (param f32) (result i32))) @@ -2166,237 +2166,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2446,7 +2215,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) @@ -3466,1259 +3235,6 @@ end unreachable ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -4828,7 +3344,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $3 i32.const 1 @@ -4865,7 +3381,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 48 i32.const 46 @@ -4972,7 +3488,7 @@ local.get $7 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -5186,7 +3702,7 @@ f64.add local.set $16 local.get $16 - i32.trunc_f64_s + i32.trunc_sat_f64_s local.set $15 local.get $15 local.get $15 @@ -6702,7 +5218,7 @@ local.get $2 i32.const 2432 local.get $1 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.set $3 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index c04124f17a..aa5ee9ce87 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -3,8 +3,8 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) @@ -1514,182 +1514,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1808,753 +1637,71 @@ local.get $3 i32.eqz ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if + (func $~lib/rt/__visit_members (param $0 i32) + (local $1 i32) + block $folding-inner0 + block $invalid + block $object-literal/OmittedFoo + block $object-literal/OmittedTypes + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $folding-inner0 $object-literal/OmittedTypes $folding-inner0 $object-literal/OmittedFoo $invalid + end + return + end + return + end + local.get $0 + i32.load + local.tee $0 + if + local.get $0 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + return + end + return + end local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u + i32.load + local.tee $1 if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + local.get $0 + i32.load offset=4 + local.tee $1 + if local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + local.get $0 + i32.load offset=8 + local.tee $1 + if local.get $1 - i32.load offset=12 - i32.store offset=12 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + local.get $0 + i32.load offset=12 + local.tee $1 + if local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 + call $byn-split-outlined-A$~lib/rt/itcms/__visit end - end - local.get $2 - i32.const 8 - i32.and - if local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/rt/__visit_members (param $0 i32) - (local $1 i32) - block $folding-inner0 - block $invalid - block $object-literal/OmittedFoo - block $object-literal/OmittedTypes - block $~lib/arraybuffer/ArrayBufferView - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $folding-inner0 $object-literal/OmittedTypes $folding-inner0 $object-literal/OmittedFoo $invalid - end - return - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - return - end - return - end - local.get $0 - i32.load - local.tee $1 - if - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=4 - local.tee $1 - if - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=8 - local.tee $1 - if - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=12 - local.tee $1 - if - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - local.get $0 - i32.load offset=16 - local.tee $1 - if - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end + i32.load offset=16 + local.tee $1 + if + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end local.get $0 i32.load offset=20 local.tee $1 @@ -2594,8 +1741,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -2608,14 +1753,9 @@ br_if $folding-inner0 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill i32.const 1156 i32.const 1152 i32.store @@ -2750,13 +1890,13 @@ call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $5 + local.tee $2 i32.const 0 i32.store - local.get $5 + local.get $2 i32.const 0 i32.store offset=4 - local.get $5 + local.get $2 i32.const 123 i32.store global.get $~lib/memory/__stack_pointer @@ -2792,7 +1932,7 @@ select i32.const 1 i32.shl - local.set $2 + local.set $3 block $__inlined_func$~lib/string/String#substring i32.const 0 local.get $1 @@ -2802,10 +1942,10 @@ select i32.const 1 i32.shl - local.tee $1 - local.get $2 + local.tee $4 + local.get $3 i32.sub - local.tee $6 + local.tee $1 i32.eqz if global.get $~lib/memory/__stack_pointer @@ -2813,16 +1953,16 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 1568 - local.set $4 + local.set $0 br $__inlined_func$~lib/string/String#substring end i32.const 0 local.get $0 i32.const 1 i32.shl - local.get $1 + local.get $4 i32.eq - local.get $2 + local.get $3 select if global.get $~lib/memory/__stack_pointer @@ -2830,211 +1970,28 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 1056 - local.set $4 + local.set $0 br $__inlined_func$~lib/string/String#substring end global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $1 i32.const 1 call $~lib/rt/itcms/__new - local.tee $4 + local.tee $0 i32.store - block $~lib/util/memory/memmove|inlined.0 - local.get $4 - local.tee $0 - local.get $2 - i32.const 1056 - i32.add - local.tee $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $6 - i32.sub - i32.const 0 - local.get $6 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $6 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $6 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $6 - i32.const 1 - i32.sub - local.set $6 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $6 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $6 - i32.const 8 - i32.sub - local.set $6 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $6 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.set $6 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $6 - i32.add - i32.const 7 - i32.and - if - local.get $6 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $6 - i32.const 1 - i32.sub - local.tee $6 - local.get $0 - i32.add - local.get $1 - local.get $6 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $6 - i32.const 8 - i32.ge_u - if - local.get $6 - i32.const 8 - i32.sub - local.tee $6 - local.get $0 - i32.add - local.get $1 - local.get $6 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $6 - if - local.get $6 - i32.const 1 - i32.sub - local.tee $6 - local.get $0 - i32.add - local.get $1 - local.get $6 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end + local.get $0 + local.get $3 + i32.const 1056 + i32.add + local.get $1 + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer end - local.get $5 - local.get $4 + local.get $2 + local.get $0 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 @@ -3047,7 +2004,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $5 + local.get $2 i32.load i32.const 123 i32.ne @@ -3061,7 +2018,7 @@ end global.get $~lib/memory/__stack_pointer local.tee $0 - local.get $5 + local.get $2 i32.load offset=4 local.tee $1 i32.store @@ -3080,7 +2037,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $2 call $~lib/rt/tlsf/__free global.get $~lib/memory/__stack_pointer i32.const 8 @@ -3729,23 +2686,23 @@ i32.const 0 i32.gt_s if - loop $while-continue|017 + loop $while-continue|0 global.get $~lib/rt/itcms/state if call $~lib/rt/itcms/step drop - br $while-continue|017 + br $while-continue|0 end end end call $~lib/rt/itcms/step drop - loop $while-continue|118 + loop $while-continue|1 global.get $~lib/rt/itcms/state if call $~lib/rt/itcms/step drop - br $while-continue|118 + br $while-continue|1 end end global.get $~lib/rt/itcms/total diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index a3e09f1dfa..cfd47bdf11 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -2,9 +2,9 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_f64_=>_none (func (param i32 f64))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i64_=>_none (func (param i32 i64))) @@ -2155,237 +2155,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2435,7 +2204,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) @@ -2598,1271 +2367,18 @@ local.get $1 i32.store ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) - (func $object-literal/Unmanaged#set:baz (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $object-literal/Unmanaged#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/rt/tlsf/__alloc - local.set $0 + (func $object-literal/Unmanaged#set:baz (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=4 + ) + (func $object-literal/Unmanaged#constructor (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 8 + call $~lib/rt/tlsf/__alloc + local.set $0 end local.get $0 i32.const 0 @@ -4823,14 +3339,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill i32.const 128 call $~lib/rt/itcms/initLazy global.set $~lib/rt/itcms/toSpace @@ -5159,7 +3670,7 @@ local.get $8 i32.add local.get $10 - call $~lib/memory/memory.copy + memory.copy local.get $11 local.set $12 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 1deb071c38..e8034ca5e3 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -1231,6 +1231,11 @@ local.get $1 i32.const 20 i32.add + local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $0 ) (func $~lib/rt/__visit_members (param $0 i32) block $invalid diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index f4a056e901..3224a3b70f 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -24,7 +24,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $optional-typeparameters/tConcrete (mut i32) (i32.const 0)) (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) @@ -2071,237 +2070,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2351,7 +2119,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $optional-typeparameters/TestConcrete#test (param $0 i32) (param $1 i32) (param $2 i32) (result i32) diff --git a/tests/compiler/portable-conversions.untouched.wat b/tests/compiler/portable-conversions.untouched.wat index fda49f783b..5f7090e136 100644 --- a/tests/compiler/portable-conversions.untouched.wat +++ b/tests/compiler/portable-conversions.untouched.wat @@ -40,7 +40,7 @@ unreachable end global.get $portable-conversions/f - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.extend8_s i32.eqz if @@ -52,7 +52,7 @@ unreachable end global.get $portable-conversions/F - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.extend8_s i32.eqz if @@ -87,7 +87,7 @@ unreachable end global.get $portable-conversions/f - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.extend16_s i32.eqz if @@ -99,7 +99,7 @@ unreachable end global.get $portable-conversions/F - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.extend16_s i32.eqz if @@ -132,7 +132,7 @@ unreachable end global.get $portable-conversions/f - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.eqz if i32.const 0 @@ -143,7 +143,7 @@ unreachable end global.get $portable-conversions/F - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.eqz if i32.const 0 @@ -175,7 +175,7 @@ unreachable end global.get $portable-conversions/f - i64.trunc_f32_s + i64.trunc_sat_f32_s i64.eqz if i32.const 0 @@ -186,7 +186,7 @@ unreachable end global.get $portable-conversions/F - i64.trunc_f64_s + i64.trunc_sat_f64_s i64.eqz if i32.const 0 @@ -218,7 +218,7 @@ unreachable end global.get $portable-conversions/f - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.eqz if i32.const 0 @@ -229,7 +229,7 @@ unreachable end global.get $portable-conversions/F - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.eqz if i32.const 0 @@ -265,7 +265,7 @@ unreachable end global.get $portable-conversions/f - i32.trunc_f32_u + i32.trunc_sat_f32_u i32.const 255 i32.and i32.eqz @@ -278,7 +278,7 @@ unreachable end global.get $portable-conversions/F - i32.trunc_f64_u + i32.trunc_sat_f64_u i32.const 255 i32.and i32.eqz @@ -316,7 +316,7 @@ unreachable end global.get $portable-conversions/f - i32.trunc_f32_u + i32.trunc_sat_f32_u i32.const 65535 i32.and i32.eqz @@ -329,7 +329,7 @@ unreachable end global.get $portable-conversions/F - i32.trunc_f64_u + i32.trunc_sat_f64_u i32.const 65535 i32.and i32.eqz @@ -363,7 +363,7 @@ unreachable end global.get $portable-conversions/f - i32.trunc_f32_u + i32.trunc_sat_f32_u i32.eqz if i32.const 0 @@ -374,7 +374,7 @@ unreachable end global.get $portable-conversions/F - i32.trunc_f64_u + i32.trunc_sat_f64_u i32.eqz if i32.const 0 @@ -406,7 +406,7 @@ unreachable end global.get $portable-conversions/f - i64.trunc_f32_u + i64.trunc_sat_f32_u i64.eqz if i32.const 0 @@ -417,7 +417,7 @@ unreachable end global.get $portable-conversions/F - i64.trunc_f64_u + i64.trunc_sat_f64_u i64.eqz if i32.const 0 @@ -449,7 +449,7 @@ unreachable end global.get $portable-conversions/f - i32.trunc_f32_u + i32.trunc_sat_f32_u i32.eqz if i32.const 0 @@ -460,7 +460,7 @@ unreachable end global.get $portable-conversions/F - i32.trunc_f64_u + i32.trunc_sat_f64_u i32.eqz if i32.const 0 diff --git a/tests/compiler/reexport.optimized.wat b/tests/compiler/reexport.optimized.wat index 43b85df772..e32b83a0c3 100644 --- a/tests/compiler/reexport.optimized.wat +++ b/tests/compiler/reexport.optimized.wat @@ -1310,31 +1310,7 @@ i32.add local.tee $0 i32.const 0 - i32.store8 - local.get $0 - i32.const 4 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 + i32.store align=1 local.get $0 ) (func $export/sub (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/reexport.untouched.wat b/tests/compiler/reexport.untouched.wat index 4cccddb5c7..7c95c57fd0 100644 --- a/tests/compiler/reexport.untouched.wat +++ b/tests/compiler/reexport.untouched.wat @@ -4,8 +4,8 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -33,7 +33,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $reexport/car (mut i32) (i32.const 0)) (global $exports/Car i32 (i32.const 3)) (global $~argumentsLength (mut i32) (i32.const 0)) @@ -2155,237 +2154,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2435,7 +2203,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $exports/Car#get:numDoors (param $0 i32) (result i32) diff --git a/tests/compiler/rereexport.optimized.wat b/tests/compiler/rereexport.optimized.wat index aa5d4ec90b..d074b4803e 100644 --- a/tests/compiler/rereexport.optimized.wat +++ b/tests/compiler/rereexport.optimized.wat @@ -1458,31 +1458,7 @@ i32.add local.tee $0 i32.const 0 - i32.store8 - local.get $0 - i32.const 4 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 + i32.store align=1 local.get $2 local.get $0 i32.store diff --git a/tests/compiler/rereexport.untouched.wat b/tests/compiler/rereexport.untouched.wat index a20e11255a..16e1511bfd 100644 --- a/tests/compiler/rereexport.untouched.wat +++ b/tests/compiler/rereexport.untouched.wat @@ -29,7 +29,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $reexport/car (mut i32) (i32.const 0)) (global $rereexport/car (mut i32) (i32.const 0)) (global $rereexport/exportsNamespaceCar (mut i32) (i32.const 0)) @@ -2107,237 +2106,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2387,7 +2155,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $exports/Car#get:numDoors (param $0 i32) (result i32) diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 873e229a57..6d8352ab87 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -1,7 +1,7 @@ (module (type $none_=>_i32 (func (result i32))) - (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) @@ -1514,1007 +1514,148 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 + ) + (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + loop $while-continue|0 local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 + i32.const 10000 + i32.ge_u + if + local.get $1 + i32.const 10000 + i32.rem_u + local.set $3 + local.get $1 + i32.const 10000 + i32.div_u + local.set $1 + local.get $2 + i32.const 4 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $3 + i32.const 100 + i32.div_u + i32.const 2 + i32.shl + i32.const 1740 + i32.add + i64.load32_u + local.get $3 + i32.const 100 + i32.rem_u + i32.const 2 + i32.shl + i32.const 1740 + i32.add + i64.load32_u + i64.const 32 + i64.shl + i64.or + i64.store + br $while-continue|0 + end + end + local.get $1 + i32.const 100 + i32.ge_u + if + local.get $2 i32.const 2 i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 + local.tee $2 + i32.const 1 + i32.shl local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 i32.add - local.tee $1 - i32.const 0 - i32.store local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 + i32.const 100 + i32.rem_u + i32.const 2 + i32.shl + i32.const 1740 i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 + i32.load i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 + i32.const 100 + i32.div_u + local.set $1 + end + local.get $1 + i32.const 10 + i32.ge_u + if + local.get $2 + i32.const 2 i32.sub - i32.const 0 - i32.store + i32.const 1 + i32.shl local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 + i32.add local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 + i32.const 2 + i32.shl + i32.const 1740 + i32.add + i32.load i32.store - local.get $3 - i32.const 16 + else + local.get $2 + i32.const 1 i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 + i32.const 1 + i32.shl + local.get $0 i32.add - local.tee $3 + local.get $1 + i32.const 48 i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end + i32.store16 end - local.get $2 ) - (func $~lib/util/memory/memcpy (param $0 i32) + (func $~lib/number/U64#toString (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - i32.const 8 - local.set $5 - i32.const 1056 - local.set $1 - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $5 - select + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 3348 + i32.lt_s + if + i32.const 19760 + i32.const 19808 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + block $__inlined_func$~lib/util/number/utoa64 + local.get $0 + i64.eqz if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $5 - i32.const 1 - i32.sub - local.set $5 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $5 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $5 - i32.const 16 - i32.sub - local.set $5 - br $while-continue|1 - end - end - local.get $5 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $5 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $5 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $5 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $5 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $5 - i32.const 3 - i32.sub - local.set $5 - loop $while-continue|3 - local.get $5 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $2 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $3 - i32.const 8 - i32.shl - local.get $2 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $2 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $4 - i32.const 8 - i32.shl - local.get $2 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $5 - i32.const 16 - i32.sub - local.set $5 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $2 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 2 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $5 - i32.const 2 - i32.sub - local.set $5 - loop $while-continue|4 - local.get $5 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $2 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $3 - i32.const 16 - i32.shl - local.get $2 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $2 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $4 - i32.const 16 - i32.shl - local.get $2 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $5 - i32.const 16 - i32.sub - local.set $5 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $5 - i32.const 1 - i32.sub - local.set $5 - loop $while-continue|5 - local.get $5 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $2 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $3 - i32.const 24 - i32.shl - local.get $2 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $2 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $4 - i32.const 24 - i32.shl - local.get $2 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $5 - i32.const 16 - i32.sub - local.set $5 - br $while-continue|5 - end - end - end - end - local.get $5 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $2 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $2 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $5 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $2 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $2 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $5 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $2 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $2 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $5 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $2 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 2 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $5 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - loop $while-continue|0 - local.get $1 - i32.const 10000 - i32.ge_u - if - local.get $1 - i32.const 10000 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10000 - i32.div_u - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $3 - i32.const 100 - i32.div_u - i32.const 2 - i32.shl - i32.const 1740 - i32.add - i64.load32_u - local.get $3 - i32.const 100 - i32.rem_u - i32.const 2 - i32.shl - i32.const 1740 - i32.add - i64.load32_u - i64.const 32 - i64.shl - i64.or - i64.store - br $while-continue|0 - end - end - local.get $1 - i32.const 100 - i32.ge_u - if - local.get $2 - i32.const 2 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $1 - i32.const 100 - i32.rem_u - i32.const 2 - i32.shl - i32.const 1740 - i32.add - i32.load - i32.store - local.get $1 - i32.const 100 - i32.div_u - local.set $1 - end - local.get $1 - i32.const 10 - i32.ge_u - if - local.get $2 - i32.const 2 - i32.sub - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $1 - i32.const 2 - i32.shl - i32.const 1740 - i32.add - i32.load - i32.store - else - local.get $2 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $1 - i32.const 48 - i32.add - i32.store16 - end - ) - (func $~lib/number/U64#toString (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 3348 - i32.lt_s - if - i32.const 19760 - i32.const 19808 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - block $__inlined_func$~lib/util/number/utoa64 - local.get $0 - i64.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 1728 + global.set $~lib/memory/__stack_pointer + i32.const 1728 local.set $1 br $__inlined_func$~lib/util/number/utoa64 end @@ -2801,9 +1942,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2814,10 +1952,10 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $5 + local.tee $0 i32.const 0 i32.store - local.get $5 + local.get $0 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -2826,200 +1964,28 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $4 + local.tee $1 i32.const 0 i32.store i32.const 8 - local.set $7 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $3 i32.const 1056 - local.set $0 - block $~lib/util/memory/memmove|inlined.0 - i32.const 8 - i32.const 0 - call $~lib/rt/itcms/__new - local.tee $6 - local.tee $1 - i32.const 1056 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - i32.const 1048 - local.get $1 - i32.sub - i32.const -16 - i32.le_u - if - local.get $1 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $1 - i32.const 1056 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - i32.eqz - if - loop $while-continue|0 - local.get $1 - i32.const 7 - i32.and - if - local.get $7 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $7 - i32.const 1 - i32.sub - local.set $7 - local.get $1 - local.tee $2 - i32.const 1 - i32.add - local.set $1 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $7 - i32.const 8 - i32.ge_u - if - local.get $1 - local.get $0 - i64.load - i64.store - local.get $7 - i32.const 8 - i32.sub - local.set $7 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $7 - if - local.get $1 - local.tee $2 - i32.const 1 - i32.add - local.set $1 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $7 - i32.const 1 - i32.sub - local.set $7 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - i32.eqz - if - loop $while-continue|3 - local.get $1 - local.get $7 - i32.add - i32.const 7 - i32.and - if - local.get $7 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $7 - i32.const 1 - i32.sub - local.tee $7 - local.get $1 - i32.add - local.get $7 - i32.const 1056 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $7 - i32.const 8 - i32.ge_u - if - local.get $7 - i32.const 8 - i32.sub - local.tee $7 - local.get $1 - i32.add - local.get $7 - i32.const 1056 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $7 - if - local.get $7 - i32.const 1 - i32.sub - local.tee $7 - local.get $1 - i32.add - local.get $7 - i32.const 1056 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - local.get $4 - local.get $6 + i64.load align=1 + i64.store align=1 + local.get $1 + local.get $3 i32.store i32.const 16 i32.const 3 call $~lib/rt/itcms/__new - local.tee $0 - local.get $6 + local.tee $2 + local.get $3 i32.store - local.get $6 + local.get $3 if - local.get $0 + local.get $2 i32.eqz if i32.const 0 @@ -3030,60 +1996,60 @@ unreachable end global.get $~lib/rt/itcms/white - local.get $6 + local.get $3 i32.const 20 i32.sub - local.tee $1 + local.tee $4 i32.load offset=4 i32.const 3 i32.and i32.eq if - local.get $0 + local.get $2 i32.const 20 i32.sub i32.load offset=4 i32.const 3 i32.and - local.tee $2 + local.tee $1 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $1 + local.get $4 call $~lib/rt/itcms/Object#makeGray else global.get $~lib/rt/itcms/state i32.const 1 i32.eq - local.get $2 + local.get $1 i32.const 3 i32.eq i32.and if - local.get $1 + local.get $4 call $~lib/rt/itcms/Object#makeGray end end end end - local.get $0 - local.get $6 + local.get $2 + local.get $3 i32.store offset=4 - local.get $0 + local.get $2 i32.const 8 i32.store offset=8 - local.get $0 + local.get $2 i32.const 1 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $5 local.get $0 + local.get $2 i32.store - local.get $0 + local.get $2 i32.load offset=12 i32.eqz if @@ -3094,7 +2060,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.load offset=4 i64.load call $~lib/number/U64#toString diff --git a/tests/compiler/resolve-access.untouched.wat b/tests/compiler/resolve-access.untouched.wat index 5ef97a8322..671c53722f 100644 --- a/tests/compiler/resolve-access.untouched.wat +++ b/tests/compiler/resolve-access.untouched.wat @@ -2,8 +2,8 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) (type $i64_i32_=>_i32 (func (param i64 i32) (result i32))) @@ -30,8 +30,8 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 2272)) (global $~lib/memory/__data_end i32 (i32.const 2324)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 18708)) @@ -2081,237 +2081,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2361,1262 +2130,9 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 @@ -3628,7 +2144,7 @@ local.get $3 local.get $2 local.get $0 - call $~lib/memory/memory.copy + memory.copy end local.get $3 ) diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index ff19f47f14..3b544655a5 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -1,9 +1,9 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) @@ -64,178 +64,33 @@ (data (i32.const 3445) "\a0\f6?") (data (i32.const 3457) "\c8\b9\f2\82,\d6\bf\80V7($\b4\fa<\00\00\00\00\00\80\f6?") (data (i32.const 3489) "\08X\bf\bd\d1\d5\bf \f7\e0\d8\08\a5\1c\bd\00\00\00\00\00`\f6?") - (data (i32.const 3521) "XE\17wv\d5\bfmP\b6\d5\a4b#\bd\00\00\00\00\00@\f6?") - (data (i32.const 3553) "\f8-\87\ad\1a\d5\bf\d5g\b0\9e\e4\84\e6\bc\00\00\00\00\00 \f6?") - (data (i32.const 3585) "xw\95_\be\d4\bf\e0>)\93i\1b\04\bd\00\00\00\00\00\00\f6?") - (data (i32.const 3617) "`\1c\c2\8ba\d4\bf\cc\84LH/\d8\13=\00\00\00\00\00\e0\f5?") - (data (i32.const 3649) "\a8\86\860\04\d4\bf:\0b\82\ed\f3B\dc<\00\00\00\00\00\c0\f5?") - (data (i32.const 3681) "HiUL\a6\d3\bf`\94Q\86\c6\b1 =\00\00\00\00\00\a0\f5?") - (data (i32.const 3713) "\80\98\9a\ddG\d3\bf\92\80\c5\d4MY%=\00\00\00\00\00\80\f5?") - (data (i32.const 3745) " \e1\ba\e2\e8\d2\bf\d8+\b7\99\1e{&=\00\00\00\00\00`\f5?") - (data (i32.const 3777) "\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00`\f5?") - (data (i32.const 3809) "\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00@\f5?") - (data (i32.const 3841) "x\cf\fbA)\d2\bfv\daS($Z\16\bd\00\00\00\00\00 \f5?") - (data (i32.const 3873) "\98i\c1\98\c8\d1\bf\04T\e7h\bc\af\1f\bd\00\00\00\00\00\00\f5?") - (data (i32.const 3905) "\a8\ab\ab\\g\d1\bf\f0\a8\823\c6\1f\1f=\00\00\00\00\00\e0\f4?") - (data (i32.const 3937) "H\ae\f9\8b\05\d1\bffZ\05\fd\c4\a8&\bd\00\00\00\00\00\c0\f4?") - (data (i32.const 3969) "\90s\e2$\a3\d0\bf\0e\03\f4~\eek\0c\bd\00\00\00\00\00\a0\f4?") - (data (i32.const 4001) "\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\a0\f4?") - (data (i32.const 4033) "\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\80\f4?") - (data (i32.const 4065) "@^m\18\b9\cf\bf\87<\99\ab*W\0d=\00\00\00\00\00`\f4?") - (data (i32.const 4097) "`\dc\cb\ad\f0\ce\bf$\af\86\9c\b7&+=\00\00\00\00\00@\f4?") - (data (i32.const 4129) "\f0*n\07\'\ce\bf\10\ff?TO/\17\bd\00\00\00\00\00 \f4?") - (data (i32.const 4161) "\c0Ok!\\\cd\bf\1bh\ca\bb\91\ba!=\00\00\00\00\00\00\f4?") - (data (i32.const 4193) "\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy\'=\00\00\00\00\00\00\f4?") - (data (i32.const 4225) "\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy\'=\00\00\00\00\00\e0\f3?") - (data (i32.const 4257) "\90-t\86\c2\cb\bf\8f\b7\8b1\b0N\19=\00\00\00\00\00\c0\f3?") - (data (i32.const 4289) "\c0\80N\c9\f3\ca\bff\90\cd?cN\ba<\00\00\00\00\00\a0\f3?") - (data (i32.const 4321) "\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\a0\f3?") - (data (i32.const 4353) "\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\80\f3?") - (data (i32.const 4385) "P\f4\9cZR\c9\bf\e3\d4\c1\04\d9\d1*\bd\00\00\00\00\00`\f3?") - (data (i32.const 4417) "\d0 e\a0\7f\c8\bf\t\fa\db\7f\bf\bd+=\00\00\00\00\00@\f3?") - (data (i32.const 4449) "\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00@\f3?") - (data (i32.const 4481) "\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00 \f3?") - (data (i32.const 4513) "\d0\19\e7\0f\d6\c6\bff\e2\b2\a3j\e4\10\bd\00\00\00\00\00\00\f3?") - (data (i32.const 4545) "\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\00\f3?") - (data (i32.const 4577) "\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\e0\f2?") - (data (i32.const 4609) "\b0\a1\e3\e5&\c5\bf\8f[\07\90\8b\de \bd\00\00\00\00\00\c0\f2?") - (data (i32.const 4641) "\80\cbl+M\c4\bf\11\0e\bd\00\00\00\00\00\e0\ed?") - (data (i32.const 6145) "`F\d1;\97\b1?\9b\9e\0dV]2%\bd\00\00\00\00\00\a0\ed?") - (data (i32.const 6177) "\e0\d1\a7\f5\bd\b3?\d7N\db\a5^\c8,=\00\00\00\00\00`\ed?") - (data (i32.const 6209) "\a0\97MZ\e9\b5?\1e\1d]<\06i,\bd\00\00\00\00\00@\ed?") - (data (i32.const 6241) "\c0\ea\n\d3\00\b7?2\ed\9d\a9\8d\1e\ec<\00\00\00\00\00\00\ed?") - (data (i32.const 6273) "@Y]^3\b9?\daG\bd:\\\11#=\00\00\00\00\00\c0\ec?") - (data (i32.const 6305) "`\ad\8d\c8j\bb?\e5h\f7+\80\90\13\bd\00\00\00\00\00\a0\ec?") - (data (i32.const 6337) "@\bc\01X\88\bc?\d3\acZ\c6\d1F&=\00\00\00\00\00`\ec?") - (data (i32.const 6369) " \n\839\c7\be?\e0E\e6\afh\c0-\bd\00\00\00\00\00@\ec?") - (data (i32.const 6401) "\e0\db9\91\e8\bf?\fd\n\a1O\d64%\bd\00\00\00\00\00\00\ec?") - (data (i32.const 6433) "\e0\'\82\8e\17\c1?\f2\07-\cex\ef!=\00\00\00\00\00\e0\eb?") - (data (i32.const 6465) "\f0#~+\aa\c1?4\998D\8e\a7,=\00\00\00\00\00\a0\eb?") - (data (i32.const 6497) "\80\86\0ca\d1\c2?\a1\b4\81\cbl\9d\03=\00\00\00\00\00\80\eb?") - (data (i32.const 6529) "\90\15\b0\fce\c3?\89rK#\a8/\c6<\00\00\00\00\00@\eb?") - (data (i32.const 6561) "\b03\83=\91\c4?x\b6\fdTy\83%=\00\00\00\00\00 \eb?") - (data (i32.const 6593) "\b0\a1\e4\e5\'\c5?\c7}i\e5\e83&=\00\00\00\00\00\e0\ea?") - (data (i32.const 6625) "\10\8c\beNW\c6?x.<,\8b\cf\19=\00\00\00\00\00\c0\ea?") - (data (i32.const 6657) "pu\8b\12\f0\c6?\e1!\9c\e5\8d\11%\bd\00\00\00\00\00\a0\ea?") - (data (i32.const 6689) "PD\85\8d\89\c7?\05C\91p\10f\1c\bd\00\00\00\00\00`\ea?") - (data (i32.const 6722) "9\eb\af\be\c8?\d1,\e9\aaT=\07\bd\00\00\00\00\00@\ea?") - (data (i32.const 6754) "\f7\dcZZ\c9?o\ff\a0X(\f2\07=\00\00\00\00\00\00\ea?") - (data (i32.const 6785) "\e0\8a<\ed\93\ca?i!VPCr(\bd\00\00\00\00\00\e0\e9?") - (data (i32.const 6817) "\d0[W\d81\cb?\aa\e1\acN\8d5\0c\bd\00\00\00\00\00\c0\e9?") - (data (i32.const 6849) "\e0;8\87\d0\cb?\b6\12TY\c4K-\bd\00\00\00\00\00\a0\e9?") - (data (i32.const 6881) "\10\f0\c6\fbo\cc?\d2+\96\c5r\ec\f1\bc\00\00\00\00\00`\e9?") - (data (i32.const 6913) "\90\d4\b0=\b1\cd?5\b0\15\f7*\ff*\bd\00\00\00\00\00@\e9?") - (data (i32.const 6945) "\10\e7\ff\0eS\ce?0\f4A`\'\12\c2<\00\00\00\00\00 \e9?") - (data (i32.const 6978) "\dd\e4\ad\f5\ce?\11\8e\bbe\15!\ca\bc\00\00\00\00\00\00\e9?") - (data (i32.const 7009) "\b0\b3l\1c\99\cf?0\df\0c\ca\ec\cb\1b=\00\00\00\00\00\c0\e8?") - (data (i32.const 7041) "XM`8q\d0?\91N\ed\16\db\9c\f8<\00\00\00\00\00\a0\e8?") - (data (i32.const 7073) "`ag-\c4\d0?\e9\ea<\16\8b\18\'=\00\00\00\00\00\80\e8?") - (data (i32.const 7105) "\e8\'\82\8e\17\d1?\1c\f0\a5c\0e!,\bd\00\00\00\00\00`\e8?") - (data (i32.const 7137) "\f8\ac\cb\\k\d1?\81\16\a5\f7\cd\9a+=\00\00\00\00\00@\e8?") - (data (i32.const 7169) "hZc\99\bf\d1?\b7\bdGQ\ed\a6,=\00\00\00\00\00 \e8?") - (data (i32.const 7201) "\b8\0emE\14\d2?\ea\baF\ba\de\87\n=\00\00\00\00\00\e0\e7?") - (data (i32.const 7233) "\90\dc|\f0\be\d2?\f4\04PJ\fa\9c*=\00\00\00\00\00\c0\e7?") - (data (i32.const 7265) "`\d3\e1\f1\14\d3?\b8)\93i\1b\04\bd\00\00\00\00\00\00\f6?\00\00\00\00\00\00\00\00\00`\1c\c2\8ba\d4\bf\cc\84LH/\d8\13=\00\00\00\00\00\e0\f5?\00\00\00\00\00\00\00\00\00\a8\86\860\04\d4\bf:\0b\82\ed\f3B\dc<\00\00\00\00\00\c0\f5?\00\00\00\00\00\00\00\00\00HiUL\a6\d3\bf`\94Q\86\c6\b1 =\00\00\00\00\00\a0\f5?\00\00\00\00\00\00\00\00\00\80\98\9a\ddG\d3\bf\92\80\c5\d4MY%=\00\00\00\00\00\80\f5?\00\00\00\00\00\00\00\00\00 \e1\ba\e2\e8\d2\bf\d8+\b7\99\1e{&=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00@\f5?\00\00\00\00\00\00\00\00\00x\cf\fbA)\d2\bfv\daS($Z\16\bd\00\00\00\00\00 \f5?\00\00\00\00\00\00\00\00\00\98i\c1\98\c8\d1\bf\04T\e7h\bc\af\1f\bd\00\00\00\00\00\00\f5?\00\00\00\00\00\00\00\00\00\a8\ab\ab\\g\d1\bf\f0\a8\823\c6\1f\1f=\00\00\00\00\00\e0\f4?\00\00\00\00\00\00\00\00\00H\ae\f9\8b\05\d1\bffZ\05\fd\c4\a8&\bd\00\00\00\00\00\c0\f4?\00\00\00\00\00\00\00\00\00\90s\e2$\a3\d0\bf\0e\03\f4~\eek\0c\bd\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\80\f4?\00\00\00\00\00\00\00\00\00@^m\18\b9\cf\bf\87<\99\ab*W\0d=\00\00\00\00\00`\f4?\00\00\00\00\00\00\00\00\00`\dc\cb\ad\f0\ce\bf$\af\86\9c\b7&+=\00\00\00\00\00@\f4?\00\00\00\00\00\00\00\00\00\f0*n\07\'\ce\bf\10\ff?TO/\17\bd\00\00\00\00\00 \f4?\00\00\00\00\00\00\00\00\00\c0Ok!\\\cd\bf\1bh\ca\bb\91\ba!=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy\'=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy\'=\00\00\00\00\00\e0\f3?\00\00\00\00\00\00\00\00\00\90-t\86\c2\cb\bf\8f\b7\8b1\b0N\19=\00\00\00\00\00\c0\f3?\00\00\00\00\00\00\00\00\00\c0\80N\c9\f3\ca\bff\90\cd?cN\ba<\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\80\f3?\00\00\00\00\00\00\00\00\00P\f4\9cZR\c9\bf\e3\d4\c1\04\d9\d1*\bd\00\00\00\00\00`\f3?\00\00\00\00\00\00\00\00\00\d0 e\a0\7f\c8\bf\t\fa\db\7f\bf\bd+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00 \f3?\00\00\00\00\00\00\00\00\00\d0\19\e7\0f\d6\c6\bff\e2\b2\a3j\e4\10\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\e0\f2?\00\00\00\00\00\00\00\00\00\b0\a1\e3\e5&\c5\bf\8f[\07\90\8b\de \bd\00\00\00\00\00\c0\f2?\00\00\00\00\00\00\00\00\00\80\cbl+M\c4\bf\11\0e\bd\00\00\00\00\00\e0\ed?\00\00\00\00\00\00\00\00\00`F\d1;\97\b1?\9b\9e\0dV]2%\bd\00\00\00\00\00\a0\ed?\00\00\00\00\00\00\00\00\00\e0\d1\a7\f5\bd\b3?\d7N\db\a5^\c8,=\00\00\00\00\00`\ed?\00\00\00\00\00\00\00\00\00\a0\97MZ\e9\b5?\1e\1d]<\06i,\bd\00\00\00\00\00@\ed?\00\00\00\00\00\00\00\00\00\c0\ea\n\d3\00\b7?2\ed\9d\a9\8d\1e\ec<\00\00\00\00\00\00\ed?\00\00\00\00\00\00\00\00\00@Y]^3\b9?\daG\bd:\\\11#=\00\00\00\00\00\c0\ec?\00\00\00\00\00\00\00\00\00`\ad\8d\c8j\bb?\e5h\f7+\80\90\13\bd\00\00\00\00\00\a0\ec?\00\00\00\00\00\00\00\00\00@\bc\01X\88\bc?\d3\acZ\c6\d1F&=\00\00\00\00\00`\ec?\00\00\00\00\00\00\00\00\00 \n\839\c7\be?\e0E\e6\afh\c0-\bd\00\00\00\00\00@\ec?\00\00\00\00\00\00\00\00\00\e0\db9\91\e8\bf?\fd\n\a1O\d64%\bd\00\00\00\00\00\00\ec?\00\00\00\00\00\00\00\00\00\e0\'\82\8e\17\c1?\f2\07-\cex\ef!=\00\00\00\00\00\e0\eb?\00\00\00\00\00\00\00\00\00\f0#~+\aa\c1?4\998D\8e\a7,=\00\00\00\00\00\a0\eb?\00\00\00\00\00\00\00\00\00\80\86\0ca\d1\c2?\a1\b4\81\cbl\9d\03=\00\00\00\00\00\80\eb?\00\00\00\00\00\00\00\00\00\90\15\b0\fce\c3?\89rK#\a8/\c6<\00\00\00\00\00@\eb?\00\00\00\00\00\00\00\00\00\b03\83=\91\c4?x\b6\fdTy\83%=\00\00\00\00\00 \eb?\00\00\00\00\00\00\00\00\00\b0\a1\e4\e5\'\c5?\c7}i\e5\e83&=\00\00\00\00\00\e0\ea?\00\00\00\00\00\00\00\00\00\10\8c\beNW\c6?x.<,\8b\cf\19=\00\00\00\00\00\c0\ea?\00\00\00\00\00\00\00\00\00pu\8b\12\f0\c6?\e1!\9c\e5\8d\11%\bd\00\00\00\00\00\a0\ea?\00\00\00\00\00\00\00\00\00PD\85\8d\89\c7?\05C\91p\10f\1c\bd\00\00\00\00\00`\ea?\00\00\00\00\00\00\00\00\00\009\eb\af\be\c8?\d1,\e9\aaT=\07\bd\00\00\00\00\00@\ea?\00\00\00\00\00\00\00\00\00\00\f7\dcZZ\c9?o\ff\a0X(\f2\07=\00\00\00\00\00\00\ea?\00\00\00\00\00\00\00\00\00\e0\8a<\ed\93\ca?i!VPCr(\bd\00\00\00\00\00\e0\e9?\00\00\00\00\00\00\00\00\00\d0[W\d81\cb?\aa\e1\acN\8d5\0c\bd\00\00\00\00\00\c0\e9?\00\00\00\00\00\00\00\00\00\e0;8\87\d0\cb?\b6\12TY\c4K-\bd\00\00\00\00\00\a0\e9?\00\00\00\00\00\00\00\00\00\10\f0\c6\fbo\cc?\d2+\96\c5r\ec\f1\bc\00\00\00\00\00`\e9?\00\00\00\00\00\00\00\00\00\90\d4\b0=\b1\cd?5\b0\15\f7*\ff*\bd\00\00\00\00\00@\e9?\00\00\00\00\00\00\00\00\00\10\e7\ff\0eS\ce?0\f4A`\'\12\c2<\00\00\00\00\00 \e9?\00\00\00\00\00\00\00\00\00\00\dd\e4\ad\f5\ce?\11\8e\bbe\15!\ca\bc\00\00\00\00\00\00\e9?\00\00\00\00\00\00\00\00\00\b0\b3l\1c\99\cf?0\df\0c\ca\ec\cb\1b=\00\00\00\00\00\c0\e8?\00\00\00\00\00\00\00\00\00XM`8q\d0?\91N\ed\16\db\9c\f8<\00\00\00\00\00\a0\e8?\00\00\00\00\00\00\00\00\00`ag-\c4\d0?\e9\ea<\16\8b\18\'=\00\00\00\00\00\80\e8?\00\00\00\00\00\00\00\00\00\e8\'\82\8e\17\d1?\1c\f0\a5c\0e!,\bd\00\00\00\00\00`\e8?\00\00\00\00\00\00\00\00\00\f8\ac\cb\\k\d1?\81\16\a5\f7\cd\9a+=\00\00\00\00\00@\e8?\00\00\00\00\00\00\00\00\00hZc\99\bf\d1?\b7\bdGQ\ed\a6,=\00\00\00\00\00 \e8?\00\00\00\00\00\00\00\00\00\b8\0emE\14\d2?\ea\baF\ba\de\87\n=\00\00\00\00\00\e0\e7?\00\00\00\00\00\00\00\00\00\90\dc|\f0\be\d2?\f4\04PJ\fa\9c*=\00\00\00\00\00\c0\e7?\00\00\00\00\00\00\00\00\00`\d3\e1\f1\14\d3?\b8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") - (data (i32.const 9596) "\1c") - (data (i32.const 9608) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 9628) "\1c") - (data (i32.const 9640) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 9660) ",") - (data (i32.const 9672) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 9708) ",") - (data (i32.const 9720) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 9596) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000") + (data (i32.const 9628) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N") + (data (i32.const 9660) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 9708) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 9816) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -2339,237 +2339,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2619,7 +2388,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) @@ -4468,1271 +4237,18 @@ end unreachable ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) - (func $~lib/util/number/prettify (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) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $2 - i32.eqz + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + local.get $2 + i32.eqz if local.get $0 local.get $1 @@ -5830,7 +4346,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $3 i32.const 1 @@ -5867,7 +4383,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 48 i32.const 46 @@ -5974,7 +4490,7 @@ local.get $7 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -6188,7 +4704,7 @@ f64.add local.set $16 local.get $16 - i32.trunc_f64_s + i32.trunc_sat_f64_s local.set $15 local.get $15 local.get $15 @@ -6839,14 +5355,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill i32.const 1 i32.const 2 i32.lt_s @@ -8697,7 +7208,7 @@ local.get $2 i32.const 8736 local.get $1 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.set $3 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 3e6e87b583..7c9bd5f70a 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1,8 +1,8 @@ (module - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -1566,182 +1566,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/typedarray/Float32Array#__set (param $0 i32) (param $1 i32) (param $2 f32) local.get $0 @@ -2216,879 +2045,6 @@ i32.store16 local.get $4 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $while-continue|0 @@ -3274,7 +2230,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 @@ -3302,7 +2258,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 3014704 i32.store @@ -3425,7 +2381,7 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -3623,7 +2579,7 @@ f64.const 347 f64.add local.tee $0 - i32.trunc_f64_s + i32.trunc_sat_f64_s local.tee $7 local.get $0 local.get $7 @@ -3881,7 +2837,7 @@ local.get $2 i32.const 1776 local.get $3 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/tests/compiler/resolve-elementaccess.untouched.wat b/tests/compiler/resolve-elementaccess.untouched.wat index 5f73e59de1..f972e36db6 100644 --- a/tests/compiler/resolve-elementaccess.untouched.wat +++ b/tests/compiler/resolve-elementaccess.untouched.wat @@ -2,8 +2,8 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -33,7 +33,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $resolve-elementaccess/arr (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) @@ -42,6 +41,7 @@ (global $~lib/util/number/_K (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $resolve-elementaccess/buf (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 3776)) (global $~lib/memory/__data_end i32 (i32.const 3828)) @@ -2105,237 +2105,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2385,7 +2154,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) @@ -3077,1259 +2846,6 @@ end unreachable ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -4579,7 +3095,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $3 i32.const 1 @@ -4616,7 +3132,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 48 i32.const 46 @@ -4723,7 +3239,7 @@ local.get $7 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -4937,7 +3453,7 @@ f64.add local.set $16 local.get $16 - i32.trunc_f64_s + i32.trunc_sat_f64_s local.set $15 local.get $15 local.get $15 @@ -6307,7 +4823,7 @@ local.get $2 i32.const 752 local.get $1 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.set $3 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 7b90a6f71a..e22ce999f8 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -1101,482 +1101,520 @@ end end ) - (func $~lib/rt/itcms/__new (param $0 i32) (result i32) + (func $~lib/number/I32#toString (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.const 1073741804 - i32.ge_u + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 3460 + i32.lt_s if - i32.const 1456 - i32.const 1520 - i32.const 260 - i32.const 31 + i32.const 19872 + i32.const 19920 + i32.const 1 + i32.const 1 call $~lib/builtins/abort unreachable end - global.get $~lib/rt/itcms/total - global.get $~lib/rt/itcms/threshold - i32.ge_u - if - block $__inlined_func$~lib/rt/itcms/interrupt - i32.const 2048 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + block $__inlined_func$~lib/util/number/itoa32 + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 1424 local.set $1 - loop $do-loop|0 - local.get $1 - call $~lib/rt/itcms/step - i32.sub - local.set $1 - global.get $~lib/rt/itcms/state - i32.eqz - if - global.get $~lib/rt/itcms/total - i64.extend_i32_u - i64.const 200 - i64.mul - i64.const 100 - i64.div_u - i32.wrap_i64 - i32.const 1024 - i32.add - global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt - end - local.get $1 - i32.const 0 - i32.gt_s - br_if $do-loop|0 + br $__inlined_func$~lib/util/number/itoa32 + end + global.get $~lib/memory/__stack_pointer + i32.const 0 + local.get $0 + i32.sub + local.get $0 + local.get $0 + i32.const 31 + i32.shr_u + local.tee $3 + select + local.tee $0 + i32.const 100000 + i32.lt_u + if (result i32) + local.get $0 + i32.const 100 + i32.lt_u + if (result i32) + local.get $0 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + else + local.get $0 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $0 + i32.const 1000 + i32.ge_u + i32.add end - global.get $~lib/rt/itcms/total - local.tee $1 - local.get $1 - global.get $~lib/rt/itcms/threshold - i32.sub - i32.const 1024 + else + local.get $0 + i32.const 10000000 i32.lt_u - i32.const 10 - i32.shl - i32.add - global.set $~lib/rt/itcms/threshold + if (result i32) + local.get $0 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + else + local.get $0 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $0 + i32.const 100000000 + i32.ge_u + i32.add + end end - end - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.set $3 - local.get $0 - i32.const 16 - i32.add - local.tee $1 - i32.const 1073741820 - i32.gt_u - if - i32.const 1456 - i32.const 1792 - i32.const 458 - i32.const 29 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 12 - local.get $1 - i32.const 19 - i32.add - i32.const -16 - i32.and - i32.const 4 - i32.sub - local.get $1 - i32.const 12 - i32.le_u - select - local.tee $4 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - memory.size - local.tee $1 - i32.const 4 local.get $3 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - i32.ne - i32.shl + i32.add + local.tee $2 i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub i32.shl - i32.const 1 - i32.sub - local.get $4 - i32.add - local.get $4 - local.get $4 - i32.const 536870910 - i32.lt_u - select + local.tee $6 + i32.const 1073741804 + i32.ge_u + if + i32.const 1456 + i32.const 1520 + i32.const 260 + i32.const 31 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.ge_u + if + block $__inlined_func$~lib/rt/itcms/interrupt + i32.const 2048 + local.set $1 + loop $do-loop|0 + local.get $1 + call $~lib/rt/itcms/step + i32.sub + local.set $1 + global.get $~lib/rt/itcms/state + i32.eqz + if + global.get $~lib/rt/itcms/total + i64.extend_i32_u + i64.const 200 + i64.mul + i64.const 100 + i64.div_u + i32.wrap_i64 + i32.const 1024 + i32.add + global.set $~lib/rt/itcms/threshold + br $__inlined_func$~lib/rt/itcms/interrupt + end + local.get $1 + i32.const 0 + i32.gt_s + br_if $do-loop|0 + end + global.get $~lib/rt/itcms/total + local.tee $1 + local.get $1 + global.get $~lib/rt/itcms/threshold + i32.sub + i32.const 1024 + i32.lt_u + i32.const 10 + i32.shl + i32.add + global.set $~lib/rt/itcms/threshold + end + end + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.set $7 + local.get $6 + i32.const 16 i32.add - i32.const 65535 + local.tee $1 + i32.const 1073741820 + i32.gt_u + if + i32.const 1456 + i32.const 1792 + i32.const 458 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $7 + i32.const 12 + local.get $1 + i32.const 19 i32.add - i32.const -65536 + i32.const -16 i32.and - i32.const 16 - i32.shr_u - local.tee $2 + i32.const 4 + i32.sub local.get $1 - local.get $2 - i32.gt_s + i32.const 12 + i32.le_u select - memory.grow - i32.const 0 - i32.lt_s + local.tee $8 + call $~lib/rt/tlsf/searchBlock + local.tee $1 + i32.eqz if - local.get $2 + memory.size + local.tee $1 + i32.const 4 + local.get $7 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 4 + i32.sub + i32.ne + i32.shl + i32.const 1 + i32.const 27 + local.get $8 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + local.get $8 + i32.add + local.get $8 + local.get $8 + i32.const 536870910 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $1 + local.get $5 + i32.gt_s + select memory.grow i32.const 0 i32.lt_s if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $7 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + local.get $7 + local.get $8 + call $~lib/rt/tlsf/searchBlock + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 1792 + i32.const 496 + i32.const 16 + call $~lib/builtins/abort unreachable end end - local.get $3 local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - local.get $3 - local.get $4 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz + i32.load + i32.const -4 + i32.and + local.get $8 + i32.lt_u if i32.const 0 i32.const 1792 - i32.const 496 - i32.const 16 + i32.const 498 + i32.const 14 call $~lib/builtins/abort unreachable end - end - local.get $1 - i32.load - i32.const -4 - i32.and - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 1792 - i32.const 498 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $1 - call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.set $2 - local.get $4 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1792 - i32.const 357 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and - local.get $4 - i32.sub - local.tee $5 - i32.const 16 - i32.ge_u - if + local.get $7 local.get $1 - local.get $2 - i32.const 2 - i32.and - local.get $4 - i32.or - i32.store - local.get $4 + call $~lib/rt/tlsf/removeBlock local.get $1 + i32.load + local.set $5 + local.get $8 i32.const 4 i32.add - i32.add - local.tee $2 - local.get $5 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $3 - local.get $2 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $2 - i32.const -2 + i32.const 15 i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load + if + i32.const 0 + i32.const 1792 + i32.const 357 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $5 i32.const -4 i32.and - i32.add - local.tee $2 - local.get $2 - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 - i32.const 1 - i32.store offset=12 - local.get $1 - local.get $0 - i32.store offset=16 - global.get $~lib/rt/itcms/fromSpace - local.tee $2 - i32.load offset=8 - local.set $3 - local.get $1 - global.get $~lib/rt/itcms/white - local.get $2 - i32.or - i32.store offset=4 - local.get $1 - local.get $3 - i32.store offset=8 - local.get $3 - local.get $3 - i32.load offset=4 - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store offset=4 - local.get $2 - local.get $1 - i32.store offset=8 - global.get $~lib/rt/itcms/total - local.get $1 - i32.load - i32.const -4 - i32.and - i32.const 4 - i32.add - i32.add - global.set $~lib/rt/itcms/total - local.get $1 - i32.const 20 - i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 + local.get $8 i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 + local.tee $9 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $5 + i32.const 2 + i32.and + local.get $8 + i32.or + i32.store + local.get $8 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $5 + local.get $9 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $7 + local.get $5 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $5 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $5 + local.get $5 + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 + i32.const 1 + i32.store offset=12 local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 + local.get $6 + i32.store offset=16 + global.get $~lib/rt/itcms/fromSpace + local.tee $5 + i32.load offset=8 + local.set $7 local.get $1 - i32.const 0 + global.get $~lib/rt/itcms/white + local.get $5 + i32.or + i32.store offset=4 local.get $1 - i32.sub + local.get $7 + i32.store offset=8 + local.get $7 + local.get $7 + i32.load offset=4 i32.const 3 i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 local.get $1 - i32.const 0 + i32.or i32.store offset=4 + local.get $5 local.get $1 - i32.const 0 i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 + global.get $~lib/rt/itcms/total local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 + i32.load + i32.const -4 + i32.and + i32.const 4 + i32.add + i32.add + global.set $~lib/rt/itcms/total local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub + i32.add + local.tee $1 i32.const 0 - i32.store - local.get $1 + local.get $6 + memory.fill local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 + i32.store loop $while-continue|0 local.get $0 - i32.const 32 + i32.const 10000 i32.ge_u if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 local.get $0 - i32.const 32 - i32.sub + i32.const 10000 + i32.rem_u + local.set $4 + local.get $0 + i32.const 10000 + i32.div_u local.set $0 + local.get $2 + i32.const 4 + i32.sub + local.tee $2 + i32.const 1 + i32.shl local.get $1 - i32.const 32 i32.add - local.set $1 + local.get $4 + i32.const 100 + i32.div_u + i32.const 2 + i32.shl + i32.const 1836 + i32.add + i64.load32_u + local.get $4 + i32.const 100 + i32.rem_u + i32.const 2 + i32.shl + i32.const 1836 + i32.add + i64.load32_u + i64.const 32 + i64.shl + i64.or + i64.store br $while-continue|0 end end + local.get $0 + i32.const 100 + i32.ge_u + if + local.get $2 + i32.const 2 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + local.get $1 + i32.add + local.get $0 + i32.const 100 + i32.rem_u + i32.const 2 + i32.shl + i32.const 1836 + i32.add + i32.load + i32.store + local.get $0 + i32.const 100 + i32.div_u + local.set $0 + end + local.get $0 + i32.const 10 + i32.ge_u + if + local.get $2 + i32.const 2 + i32.sub + i32.const 1 + i32.shl + local.get $1 + i32.add + local.get $0 + i32.const 2 + i32.shl + i32.const 1836 + i32.add + i32.load + i32.store + else + local.get $2 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + local.get $1 + i32.add + local.get $0 + i32.const 48 + i32.add + i32.store16 + end + local.get $3 + if + local.get $1 + i32.const 45 + i32.store16 + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer end - local.get $2 + local.get $1 ) (func $~lib/rt/__visit_members (param $0 i32) block $invalid @@ -1624,409 +1662,209 @@ i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 3460 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - i32.const 2 - i32.const 1056 - i32.load - call_indirect $0 (type $i32_=>_i32) - i32.const 42 - i32.ne - if - i32.const 0 - i32.const 1088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end + global.get $~lib/memory/__stack_pointer + i32.const 3460 + i32.lt_s + if + i32.const 19872 + i32.const 19920 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + i32.const 2 + i32.const 1056 + i32.load + call_indirect $0 (type $i32_=>_i32) + i32.const 42 + i32.ne + if + i32.const 0 + i32.const 1088 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + i32.const 1168 + i32.load + call_indirect $0 (type $i32_=>_i32) + i32.const 42 + i32.ne + if + i32.const 0 + i32.const 1088 + i32.const 6 i32.const 1 - i32.const 1168 + call $~lib/builtins/abort + unreachable + end + memory.size + i32.const 16 + i32.shl + i32.const 19844 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 1572 + i32.const 1568 + i32.store + i32.const 1576 + i32.const 1568 + i32.store + i32.const 1568 + global.set $~lib/rt/itcms/pinSpace + i32.const 1604 + i32.const 1600 + i32.store + i32.const 1608 + i32.const 1600 + i32.store + i32.const 1600 + global.set $~lib/rt/itcms/toSpace + i32.const 1748 + i32.const 1744 + i32.store + i32.const 1752 + i32.const 1744 + i32.store + i32.const 1744 + global.set $~lib/rt/itcms/fromSpace + block $__inlined_func$~lib/string/String.__eq (result i32) + i32.const 0 + i32.const 1200 i32.load call_indirect $0 (type $i32_=>_i32) - i32.const 42 - i32.ne - if - i32.const 0 - i32.const 1088 - i32.const 6 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - memory.size - i32.const 16 - i32.shl - i32.const 19844 + call $~lib/number/I32#toString + local.set $4 + global.get $~lib/memory/__stack_pointer + local.tee $0 + local.get $4 + i32.store + local.get $0 + i32.const 3408 + i32.store offset=4 + i32.const 3408 + local.set $3 + i32.const 1 + local.get $4 + i32.const 3408 + i32.eq + br_if $__inlined_func$~lib/string/String.__eq + drop + i32.const 0 + i32.const 3408 + i32.const 0 + local.get $4 + select + i32.eqz + br_if $__inlined_func$~lib/string/String.__eq + drop + i32.const 0 + local.get $4 + i32.const 20 i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + local.tee $1 + i32.const 3404 + i32.load i32.const 1 i32.shr_u - global.set $~lib/rt/itcms/threshold - i32.const 1572 - i32.const 1568 - i32.store - i32.const 1576 - i32.const 1568 - i32.store - i32.const 1568 - global.set $~lib/rt/itcms/pinSpace - i32.const 1604 - i32.const 1600 - i32.store - i32.const 1608 - i32.const 1600 - i32.store - i32.const 1600 - global.set $~lib/rt/itcms/toSpace - i32.const 1748 - i32.const 1744 - i32.store - i32.const 1752 - i32.const 1744 - i32.store - i32.const 1744 - global.set $~lib/rt/itcms/fromSpace - block $__inlined_func$~lib/string/String.__eq (result i32) - i32.const 0 - i32.const 1200 - i32.load - call_indirect $0 (type $i32_=>_i32) - local.set $0 - global.get $~lib/memory/__stack_pointer + i32.ne + br_if $__inlined_func$~lib/string/String.__eq + drop + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $4 + i32.const 7 + i32.and + i32.eqz + local.get $1 i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 3460 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - block $__inlined_func$~lib/util/number/itoa32 - local.get $0 - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 1424 - local.set $3 - br $__inlined_func$~lib/util/number/itoa32 - end - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $0 - i32.sub - local.get $0 - local.get $0 - i32.const 31 - i32.shr_u - local.tee $1 - select - local.tee $0 - i32.const 100000 - i32.lt_u - if (result i32) - local.get $0 - i32.const 100 - i32.lt_u - if (result i32) - local.get $0 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add - else - local.get $0 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $0 - i32.const 1000 - i32.ge_u - i32.add - end - else - local.get $0 - i32.const 10000000 - i32.lt_u - if (result i32) - local.get $0 - i32.const 1000000 - i32.ge_u - i32.const 6 + i32.ge_u + i32.and + if + loop $do-loop|0 + local.get $4 + i64.load + local.get $3 + i64.load + i64.eq + if + local.get $4 + i32.const 8 i32.add - else - local.get $0 - i32.const 1000000000 - i32.ge_u + local.set $4 + local.get $3 i32.const 8 i32.add - local.get $0 - i32.const 100000000 + local.set $3 + local.get $1 + i32.const 4 + i32.sub + local.tee $1 + i32.const 4 i32.ge_u - i32.add + br_if $do-loop|0 end end + end + loop $while-continue|1 local.get $1 - i32.add - local.tee $2 + local.tee $0 i32.const 1 - i32.shl - call $~lib/rt/itcms/__new - local.tee $3 - i32.store - loop $while-continue|0 - local.get $0 - i32.const 10000 - i32.ge_u - if - local.get $0 - i32.const 10000 - i32.rem_u - local.set $4 - local.get $0 - i32.const 10000 - i32.div_u - local.set $0 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.const 100 - i32.div_u - i32.const 2 - i32.shl - i32.const 1836 - i32.add - i64.load32_u - local.get $4 - i32.const 100 - i32.rem_u - i32.const 2 - i32.shl - i32.const 1836 - i32.add - i64.load32_u - i64.const 32 - i64.shl - i64.or - i64.store - br $while-continue|0 - end - end + i32.sub + local.set $1 local.get $0 - i32.const 100 - i32.ge_u if - local.get $2 - i32.const 2 - i32.sub + local.get $4 + i32.load16_u local.tee $2 - i32.const 1 - i32.shl local.get $3 - i32.add - local.get $0 - i32.const 100 - i32.rem_u + i32.load16_u + local.tee $0 + i32.ne + if + local.get $2 + local.get $0 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $4 i32.const 2 - i32.shl - i32.const 1836 i32.add - i32.load - i32.store - local.get $0 - i32.const 100 - i32.div_u - local.set $0 - end - local.get $0 - i32.const 10 - i32.ge_u - if - local.get $2 - i32.const 2 - i32.sub - i32.const 1 - i32.shl + local.set $4 local.get $3 - i32.add - local.get $0 i32.const 2 - i32.shl - i32.const 1836 - i32.add - i32.load - i32.store - else - local.get $2 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - local.get $3 - i32.add - local.get $0 - i32.const 48 i32.add - i32.store16 - end - local.get $1 - if - local.get $3 - i32.const 45 - i32.store16 + local.set $3 + br $while-continue|1 end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer end - global.get $~lib/memory/__stack_pointer - local.tee $0 - local.get $3 - i32.store - local.get $0 - i32.const 3408 - i32.store offset=4 - i32.const 3408 - local.set $2 - i32.const 1 - local.get $3 - i32.const 3408 - i32.eq - br_if $__inlined_func$~lib/string/String.__eq - drop i32.const 0 - i32.const 3408 - i32.const 0 - local.get $3 - select - i32.eqz - br_if $__inlined_func$~lib/string/String.__eq - drop - i32.const 0 - local.get $3 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - local.tee $0 - i32.const 3404 - i32.load - i32.const 1 - i32.shr_u - i32.ne - br_if $__inlined_func$~lib/string/String.__eq - drop - block $__inlined_func$~lib/util/string/compareImpl (result i32) - local.get $3 - i32.const 7 - i32.and - i32.eqz - local.get $0 - i32.const 4 - i32.ge_u - i32.and - if - loop $do-loop|0 - local.get $3 - i64.load - local.get $2 - i64.load - i64.eq - if - local.get $3 - i32.const 8 - i32.add - local.set $3 - local.get $2 - i32.const 8 - i32.add - local.set $2 - local.get $0 - i32.const 4 - i32.sub - local.tee $0 - i32.const 4 - i32.ge_u - br_if $do-loop|0 - end - end - end - loop $while-continue|1 - local.get $0 - local.tee $1 - i32.const 1 - i32.sub - local.set $0 - local.get $1 - if - local.get $2 - i32.load16_u - local.tee $1 - local.get $3 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $4 - local.get $1 - i32.sub - br $__inlined_func$~lib/util/string/compareImpl - end - local.get $3 - i32.const 2 - i32.add - local.set $3 - local.get $2 - i32.const 2 - i32.add - local.set $2 - br $while-continue|1 - end - end - i32.const 0 - end - i32.eqz end i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 11 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - return end - i32.const 19872 - i32.const 19920 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 11 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer ) (func $byn-split-outlined-A$~lib/rt/itcms/__visit (param $0 i32) (local $1 i32) diff --git a/tests/compiler/resolve-function-expression.untouched.wat b/tests/compiler/resolve-function-expression.untouched.wat index a9e103d9b9..d745521c1b 100644 --- a/tests/compiler/resolve-function-expression.untouched.wat +++ b/tests/compiler/resolve-function-expression.untouched.wat @@ -2148,237 +2148,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2428,7 +2197,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) diff --git a/tests/compiler/resolve-nested.optimized.wat b/tests/compiler/resolve-nested.optimized.wat index b1181d460c..3461c576ca 100644 --- a/tests/compiler/resolve-nested.optimized.wat +++ b/tests/compiler/resolve-nested.optimized.wat @@ -1228,6 +1228,11 @@ local.get $1 i32.const 20 i32.add + local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $0 ) (func $~lib/rt/__visit_members (param $0 i32) block $invalid diff --git a/tests/compiler/resolve-nested.untouched.wat b/tests/compiler/resolve-nested.untouched.wat index 8786327a8d..07b5192f12 100644 --- a/tests/compiler/resolve-nested.untouched.wat +++ b/tests/compiler/resolve-nested.untouched.wat @@ -39,7 +39,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $resolve-nested/Outer.InnerClass i32 (i32.const 4)) (global $resolve-nested/Outer.Inner.EvenInnerClass i32 (i32.const 5)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) @@ -2087,237 +2086,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2367,7 +2135,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $resolve-nested/Outer.Inner.evenInner (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index 1c8e9ee99c..19c3ca58e8 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -1334,11 +1334,15 @@ i32.add i32.add global.set $~lib/rt/itcms/total - local.get $2 local.get $0 i32.const 20 i32.add local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $2 + local.get $0 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 diff --git a/tests/compiler/resolve-new.untouched.wat b/tests/compiler/resolve-new.untouched.wat index 628af018f4..78c668ceeb 100644 --- a/tests/compiler/resolve-new.untouched.wat +++ b/tests/compiler/resolve-new.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $resolve-new/foo (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) (global $~lib/memory/__data_end i32 (i32.const 452)) @@ -2063,237 +2062,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2343,7 +2111,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $resolve-new/Foo#bar (param $0 i32) diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 34a2305399..5a2ae47e7f 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -1401,182 +1401,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/number/I32#toString (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/resolve-propertyaccess.untouched.wat b/tests/compiler/resolve-propertyaccess.untouched.wat index c747c25427..abfc82212e 100644 --- a/tests/compiler/resolve-propertyaccess.untouched.wat +++ b/tests/compiler/resolve-propertyaccess.untouched.wat @@ -2149,237 +2149,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2429,7 +2198,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index f92f6d64b6..f30db6d1d3 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1,9 +1,9 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -1405,182 +1405,11 @@ local.get $1 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -2230,879 +2059,6 @@ i32.store16 local.get $4 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -3184,7 +2140,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $2 i32.const 46 i32.store16 @@ -3212,7 +2168,7 @@ local.get $0 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy i32.const 3472 i32.const 3014704 i32.store @@ -3328,7 +2284,7 @@ local.tee $1 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy i32.const 3474 i32.const 46 i32.store16 @@ -3700,7 +2656,7 @@ local.get $4 i32.const 3472 local.get $0 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/tests/compiler/resolve-ternary.untouched.wat b/tests/compiler/resolve-ternary.untouched.wat index 877076fc96..9c31f57473 100644 --- a/tests/compiler/resolve-ternary.untouched.wat +++ b/tests/compiler/resolve-ternary.untouched.wat @@ -2,9 +2,9 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -2156,237 +2156,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2436,7 +2205,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) @@ -3456,1259 +3225,6 @@ end unreachable ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -4818,7 +3334,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $3 i32.const 1 @@ -4855,7 +3371,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 48 i32.const 46 @@ -4962,7 +3478,7 @@ local.get $7 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -5176,7 +3692,7 @@ f64.add local.set $16 local.get $16 - i32.trunc_f64_s + i32.trunc_sat_f64_s local.set $15 local.get $15 local.get $15 @@ -5962,7 +4478,7 @@ local.get $2 i32.const 2448 local.get $1 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.set $3 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index ad0ff8697a..aa676eb8b1 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -1421,182 +1421,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/number/I32#toString (param $0 i32) (result i32) (local $1 i32) @@ -1977,15 +1806,9 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill memory.size i32.const 16 i32.shl diff --git a/tests/compiler/resolve-unary.untouched.wat b/tests/compiler/resolve-unary.untouched.wat index 8d4ae758c6..a8c6609df6 100644 --- a/tests/compiler/resolve-unary.untouched.wat +++ b/tests/compiler/resolve-unary.untouched.wat @@ -2146,237 +2146,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2426,7 +2195,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) @@ -3089,14 +2858,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill memory.size i32.const 16 i32.shl diff --git a/tests/compiler/rt/finalize.optimized.wat b/tests/compiler/rt/finalize.optimized.wat index 8233aacacd..c0fb7a3099 100644 --- a/tests/compiler/rt/finalize.optimized.wat +++ b/tests/compiler/rt/finalize.optimized.wat @@ -1286,11 +1286,15 @@ i32.add i32.add global.set $~lib/rt/itcms/total - local.get $2 local.get $0 i32.const 20 i32.add local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $2 + local.get $0 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 diff --git a/tests/compiler/rt/finalize.untouched.wat b/tests/compiler/rt/finalize.untouched.wat index 8e8ab12838..2d499c8170 100644 --- a/tests/compiler/rt/finalize.untouched.wat +++ b/tests/compiler/rt/finalize.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) @@ -25,7 +25,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 464)) (global $~lib/memory/__data_end i32 (i32.const 500)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16884)) @@ -2086,237 +2085,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2366,7 +2134,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__collect diff --git a/tests/compiler/rt/flags.json b/tests/compiler/rt/flags.json index 452f164780..1bdd02b1be 100644 --- a/tests/compiler/rt/flags.json +++ b/tests/compiler/rt/flags.json @@ -1,7 +1,4 @@ { - "features": [ - "simd" - ], "asc_flags": [ ] } diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index 119ffdb6b3..aac5c067e5 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -1262,6 +1262,11 @@ local.get $1 i32.const 20 i32.add + local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $0 ) (func $start:rt/instanceof (local $0 i32) diff --git a/tests/compiler/rt/instanceof.untouched.wat b/tests/compiler/rt/instanceof.untouched.wat index 38e6c13efe..f9d6d6bcc6 100644 --- a/tests/compiler/rt/instanceof.untouched.wat +++ b/tests/compiler/rt/instanceof.untouched.wat @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $rt/instanceof/animal (mut i32) (i32.const 0)) (global $rt/instanceof/cat (mut i32) (i32.const 0)) (global $rt/instanceof/blackcat (mut i32) (i32.const 0)) @@ -2073,237 +2072,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2353,7 +2121,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/__instanceof (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/rt/runtime-incremental-export.optimized.wat b/tests/compiler/rt/runtime-incremental-export.optimized.wat index 6d050a93d9..d1611e10a5 100644 --- a/tests/compiler/rt/runtime-incremental-export.optimized.wat +++ b/tests/compiler/rt/runtime-incremental-export.optimized.wat @@ -1507,182 +1507,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/rt/itcms/__pin (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/rt/runtime-incremental-export.untouched.wat b/tests/compiler/rt/runtime-incremental-export.untouched.wat index 88a710db37..6b98a6fe6a 100644 --- a/tests/compiler/rt/runtime-incremental-export.untouched.wat +++ b/tests/compiler/rt/runtime-incremental-export.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 544)) (global $~lib/memory/__data_end i32 (i32.const 572)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16956)) @@ -2069,237 +2068,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2349,7 +2117,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__pin (param $0 i32) (result i32) diff --git a/tests/compiler/simd.untouched.wat b/tests/compiler/simd.untouched.wat deleted file mode 100644 index ed2aec3b8e..0000000000 --- a/tests/compiler/simd.untouched.wat +++ /dev/null @@ -1,2083 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\0e\00\00\00\01\00\00\00\01\00\00\00\0e\00\00\00s\00i\00m\00d\00.\00t\00s\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $~lib/ASC_FEATURE_SIMD i32 (i32.const 0)) - (export "memory" (memory $0)) - (start $start) - (func $simd/test_v128 (; 1 ;) (type $FUNCSIG$v) - nop - ) - (func $simd/test_i8x16 (; 2 ;) (type $FUNCSIG$v) - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 v128) - (local $4 v128) - (local $5 v128) - (local $6 v128) - v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x7f0f0e0d - local.set $0 - local.get $0 - v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x7f0f0e0d - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 60 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - i8x16.splat - local.set $1 - local.get $1 - v128.const i32x4 0x01010101 0x01010101 0x01010101 0x01010101 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 62 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i8x16.add - local.set $2 - local.get $2 - v128.const i32x4 0x05040302 0x09080706 0x0d0c0b0a 0x80100f0e - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 64 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i8x16.sub - local.get $0 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 65 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i8x16.mul - local.get $2 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 66 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i8x16.neg - v128.const i32x4 0xfcfdfeff 0xf8f9fafb 0xf4f5f6f7 0x81f1f2f3 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 67 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i8x16.extract_lane_s 0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 2 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 72 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i8x16.extract_lane_s 15 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -128 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 73 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i8x16.extract_lane_u 15 - i32.const 255 - i32.and - i32.const 128 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 74 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 17 - i8x16.replace_lane 15 - v128.const i32x4 0x05040302 0x09080706 0x0d0c0b0a 0x11100f0e - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 75 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - v8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32x4 0x04030201 0x08070605 0x01010101 0x01010101 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 80 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - i8x16.splat - i32.const 1 - i8x16.replace_lane 0 - local.set $3 - i32.const 0 - i8x16.splat - i32.const -1 - i8x16.replace_lane 0 - local.set $4 - local.get $4 - local.set $5 - local.get $4 - v128.not - local.set $6 - local.get $4 - local.get $3 - i8x16.eq - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 118 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i8x16.ne - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 119 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i8x16.lt_s - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 120 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $4 - i8x16.lt_u - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 121 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $4 - i8x16.le_s - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 122 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i8x16.le_u - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 123 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $4 - i8x16.gt_s - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 124 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i8x16.gt_u - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 125 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i8x16.ge_s - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 126 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $4 - i8x16.ge_u - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 127 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - ) - (func $simd/test_i16x8 (; 3 ;) (type $FUNCSIG$v) - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 v128) - (local $4 v128) - (local $5 v128) - (local $6 v128) - v128.const i32x4 0x00020001 0x00040003 0x00060005 0x7fff0007 - local.set $0 - local.get $0 - v128.const i32x4 0x00020001 0x00040003 0x00060005 0x7fff0007 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 132 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - i16x8.splat - local.set $1 - local.get $1 - v128.const i32x4 0x00010001 0x00010001 0x00010001 0x00010001 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 134 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i16x8.add - local.set $2 - local.get $2 - v128.const i32x4 0x00030002 0x00050004 0x00070006 0x80000008 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 136 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i16x8.sub - local.get $0 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 137 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i16x8.mul - local.get $2 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 138 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i16x8.neg - v128.const i32x4 0xfffeffff 0xfffcfffd 0xfffafffb 0x8001fff9 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 139 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i16x8.extract_lane_s 0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 2 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 144 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i16x8.extract_lane_s 7 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const -32768 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 145 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i16x8.extract_lane_u 7 - i32.const 65535 - i32.and - i32.const 32768 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 146 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 9 - i16x8.replace_lane 7 - v128.const i32x4 0x00030002 0x00050004 0x00070006 0x00090008 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 147 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - v8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32x4 0x00020001 0x00040003 0x00010001 0x00010001 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 152 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - i16x8.splat - i32.const 1 - i16x8.replace_lane 0 - local.set $3 - i32.const 0 - i16x8.splat - i32.const -1 - i16x8.replace_lane 0 - local.set $4 - local.get $4 - local.set $5 - local.get $4 - v128.not - local.set $6 - local.get $4 - local.get $3 - i16x8.eq - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 190 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i16x8.ne - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 191 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i16x8.lt_s - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 192 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $4 - i16x8.lt_u - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 193 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $4 - i16x8.le_s - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 194 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i16x8.le_u - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 195 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $4 - i16x8.gt_s - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 196 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i16x8.gt_u - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 197 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i16x8.ge_s - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 198 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $4 - i16x8.ge_u - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 199 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - ) - (func $simd/test_i32x4 (; 4 ;) (type $FUNCSIG$v) - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 v128) - (local $4 v128) - (local $5 v128) - (local $6 v128) - v128.const i32x4 0x00000001 0x00000002 0x00000003 0x7fffffff - local.set $0 - local.get $0 - v128.const i32x4 0x00000001 0x00000002 0x00000003 0x7fffffff - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 204 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - i32x4.splat - local.set $1 - local.get $1 - v128.const i32x4 0x00000001 0x00000001 0x00000001 0x00000001 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 206 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32x4.add - local.set $2 - local.get $2 - v128.const i32x4 0x00000002 0x00000003 0x00000004 0x80000000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 208 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i32x4.sub - local.get $0 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 209 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i32x4.mul - local.get $2 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 210 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32x4.neg - v128.const i32x4 0xffffffff 0xfffffffe 0xfffffffd 0x80000001 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 211 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32x4.extract_lane 0 - i32.const 2 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 216 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32x4.extract_lane 3 - i32.const -2147483648 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 217 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 5 - i32x4.replace_lane 3 - v128.const i32x4 0x00000002 0x00000003 0x00000004 0x00000005 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 218 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - v8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32x4 0x00000001 0x00000002 0x00000001 0x00000001 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 223 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - i32x4.splat - i32.const 1 - i32x4.replace_lane 0 - local.set $3 - i32.const 0 - i32x4.splat - i32.const -1 - i32x4.replace_lane 0 - local.set $4 - local.get $4 - local.set $5 - local.get $4 - v128.not - local.set $6 - local.get $4 - local.get $3 - i32x4.eq - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 237 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i32x4.ne - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 238 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i32x4.lt_s - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 239 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $4 - i32x4.lt_u - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 240 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $4 - i32x4.le_s - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 241 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i32x4.le_u - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 242 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $4 - i32x4.gt_s - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 243 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i32x4.gt_u - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 244 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - i32x4.ge_s - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 245 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $4 - i32x4.ge_u - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 246 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - ) - (func $simd/test_i64x2 (; 5 ;) (type $FUNCSIG$v) - (local $0 v128) - (local $1 v128) - (local $2 v128) - v128.const i32x4 0x00000001 0x00000000 0xffffffff 0x7fffffff - local.set $0 - local.get $0 - v128.const i32x4 0x00000001 0x00000000 0xffffffff 0x7fffffff - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 261 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i64.const 1 - i64x2.splat - local.set $1 - local.get $1 - v128.const i32x4 0x00000001 0x00000000 0x00000001 0x00000000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 263 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i64x2.add - local.set $2 - local.get $2 - v128.const i32x4 0x00000002 0x00000000 0x00000000 0x80000000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 265 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i64x2.sub - local.get $0 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 266 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i64x2.neg - v128.const i32x4 0xffffffff 0xffffffff 0x00000001 0x80000000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 267 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i64x2.extract_lane 0 - i64.const 2 - i64.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 272 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i64x2.extract_lane 1 - i64.const -9223372036854775808 - i64.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 273 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i64.const 3 - i64x2.replace_lane 1 - v128.const i32x4 0x00000002 0x00000000 0x00000003 0x00000000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 274 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - v8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32x4 0x00000001 0x00000000 0x00000001 0x00000000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 279 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - ) - (func $simd/test_f32x4 (; 6 ;) (type $FUNCSIG$v) - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 v128) - (local $4 v128) - (local $5 v128) - (local $6 v128) - (local $7 v128) - v128.const i32x4 0x3fc00000 0x40200000 0x40600000 0x40900000 - local.set $0 - local.get $0 - v128.const i32x4 0x3fc00000 0x40200000 0x40600000 0x40900000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 303 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - f32.const 1 - f32x4.splat - local.set $1 - local.get $1 - v128.const i32x4 0x3f800000 0x3f800000 0x3f800000 0x3f800000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 305 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - f32x4.add - local.set $2 - local.get $2 - v128.const i32x4 0x40200000 0x40600000 0x40900000 0x40b00000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 307 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - f32x4.sub - local.get $0 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 308 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - f32x4.mul - local.get $2 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 309 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $0 - f32x4.mul - local.set $3 - local.get $3 - local.get $0 - f32x4.div - local.get $0 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 311 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $0 - f32x4.mul - local.get $0 - i8x16.ne - i8x16.any_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 312 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32x4.neg - v128.const i32x4 0xbfc00000 0xc0200000 0xc0600000 0xc0900000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 313 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - f32x4.extract_lane 0 - f32.const 2.5 - f32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 314 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - f32x4.extract_lane 3 - f32.const 5.5 - f32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 315 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - f32.const 6.5 - f32x4.replace_lane 3 - v128.const i32x4 0x40200000 0x40600000 0x40900000 0x40d00000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 316 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - v8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32x4 0x3fc00000 0x40200000 0x3f800000 0x3f800000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 321 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - f32.const 0 - f32x4.splat - f32.const 1 - f32x4.replace_lane 0 - local.set $4 - f32.const 0 - f32x4.splat - f32.const -1 - f32x4.replace_lane 0 - local.set $5 - v128.const i32x4 0xffffffff 0x00000000 0x00000000 0x00000000 - local.set $6 - v128.const i32x4 0x00000000 0xffffffff 0xffffffff 0xffffffff - local.set $7 - local.get $5 - local.get $4 - f32x4.eq - local.get $7 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 330 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $4 - f32x4.ne - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 331 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $4 - f32x4.lt - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 332 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $5 - f32x4.le - local.get $7 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 333 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $5 - f32x4.gt - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 334 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $4 - f32x4.ge - local.get $7 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 335 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $4 - f32x4.min - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 336 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $4 - f32x4.max - local.get $4 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 337 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $5 - f32x4.abs - local.get $4 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 338 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - ) - (func $simd/test_f64x2 (; 7 ;) (type $FUNCSIG$v) - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 v128) - (local $4 v128) - (local $5 v128) - (local $6 v128) - (local $7 v128) - v128.const i32x4 0x00000000 0x3ff80000 0x00000000 0x40040000 - local.set $0 - local.get $0 - v128.const i32x4 0x00000000 0x3ff80000 0x00000000 0x40040000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 354 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - f64.const 1 - f64x2.splat - local.set $1 - local.get $1 - v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x3ff00000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 356 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - f64x2.add - local.set $2 - local.get $2 - v128.const i32x4 0x00000000 0x40040000 0x00000000 0x400c0000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 358 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - f64x2.sub - local.get $0 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 359 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - f64x2.mul - local.get $2 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 360 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $0 - f64x2.mul - local.set $3 - local.get $3 - local.get $0 - f64x2.div - local.get $0 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 362 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $0 - f64x2.mul - local.get $0 - i8x16.ne - i8x16.any_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 363 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64x2.neg - v128.const i32x4 0x00000000 0xbff80000 0x00000000 0xc0040000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 364 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - f64x2.extract_lane 0 - f64.const 2.5 - f64.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 365 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - f64x2.extract_lane 1 - f64.const 3.5 - f64.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 366 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - f64.const 4.5 - f64x2.replace_lane 1 - v128.const i32x4 0x00000000 0x40040000 0x00000000 0x40120000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 367 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - v8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32x4 0x00000000 0x3ff80000 0x00000000 0x3ff00000 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 372 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - f64.const 0 - f64x2.splat - f64.const 1 - f64x2.replace_lane 0 - local.set $4 - f64.const 0 - f64x2.splat - f64.const -1 - f64x2.replace_lane 0 - local.set $5 - v128.const i32x4 0xffffffff 0xffffffff 0x00000000 0x00000000 - local.set $6 - v128.const i32x4 0x00000000 0x00000000 0xffffffff 0xffffffff - local.set $7 - local.get $5 - local.get $4 - f64x2.eq - local.get $7 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 381 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $4 - f64x2.ne - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 382 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $4 - f64x2.lt - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 383 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $5 - f64x2.le - local.get $7 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 384 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $5 - f64x2.gt - local.get $6 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 385 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $4 - f64x2.ge - local.get $7 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 386 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $4 - f64x2.min - local.get $5 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 387 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $4 - f64x2.max - local.get $4 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 388 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $5 - f64x2.abs - local.get $4 - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 389 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - ) - (func $simd/test_v8x16 (; 8 ;) (type $FUNCSIG$v) - (local $0 v128) - (local $1 v128) - v128.const i32x4 0x03020100 0x07060504 0x0b0a0908 0x0f0e0d0c - local.set $0 - v128.const i32x4 0x13121110 0x17161514 0x1b1a1918 0x1f1e1d1c - local.set $1 - local.get $0 - local.get $1 - v8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 - v128.const i32x4 0x13021100 0x17061504 0x1b0a1908 0x1f0e1d0c - i8x16.eq - i8x16.all_true - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 406 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - ) - (func $start:simd (; 9 ;) (type $FUNCSIG$v) - call $simd/test_v128 - call $simd/test_i8x16 - call $simd/test_i16x8 - call $simd/test_i32x4 - call $simd/test_i64x2 - call $simd/test_f32x4 - call $simd/test_f64x2 - call $simd/test_v8x16 - ) - (func $start (; 10 ;) (type $FUNCSIG$v) - call $start:simd - ) - (func $null (; 11 ;) (type $FUNCSIG$v) - ) -) diff --git a/tests/compiler/std-wasi/console.json b/tests/compiler/std-wasi/console.json index 7d7fd4a682..b5784f1e69 100644 --- a/tests/compiler/std-wasi/console.json +++ b/tests/compiler/std-wasi/console.json @@ -6,8 +6,5 @@ "args": [], "env": {}, "returnOnExit": true - }, - "features": [ - "bigint-integration" - ] + } } diff --git a/tests/compiler/std-wasi/console.optimized.wat b/tests/compiler/std-wasi/console.optimized.wat index c2136b3dbc..48d34e3c4f 100644 --- a/tests/compiler/std-wasi/console.optimized.wat +++ b/tests/compiler/std-wasi/console.optimized.wat @@ -30,253 +30,130 @@ (global $~lib/memory/__stack_pointer (mut i32) (i32.const 24356)) (global $~started (mut i32) (i32.const 0)) (memory $0 1) - (data (i32.const 1036) "\1c") - (data (i32.const 1048) "\01\00\00\00\0c\00\00\00w\00h\00o\00o\00p\00s") - (data (i32.const 1068) "<") - (data (i32.const 1080) "\01\00\00\00$\00\00\00A\00s\00s\00e\00r\00t\00i\00o\00n\00 \00f\00a\00i\00l\00e\00d\00:\00 ") - (data (i32.const 1164) "<") - (data (i32.const 1176) "\01\00\00\00$\00\00\00U\00n\00p\00a\00i\00r\00e\00d\00 \00s\00u\00r\00r\00o\00g\00a\00t\00e") - (data (i32.const 1228) ",") - (data (i32.const 1240) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 1276) ",") - (data (i32.const 1288) "\01\00\00\00\0e\00\00\00S\00U\00C\00C\00E\00S\00S") - (data (i32.const 1324) "\1c") - (data (i32.const 1336) "\01\00\00\00\0c\00\00\00T\00O\00O\00B\00I\00G") - (data (i32.const 1356) "\1c") - (data (i32.const 1368) "\01\00\00\00\n\00\00\00A\00C\00C\00E\00S") - (data (i32.const 1388) ",") - (data (i32.const 1400) "\01\00\00\00\12\00\00\00A\00D\00D\00R\00I\00N\00U\00S\00E") - (data (i32.const 1436) ",") - (data (i32.const 1448) "\01\00\00\00\18\00\00\00A\00D\00D\00R\00N\00O\00T\00A\00V\00A\00I\00L") - (data (i32.const 1484) ",") - (data (i32.const 1496) "\01\00\00\00\16\00\00\00A\00F\00N\00O\00S\00U\00P\00P\00O\00R\00T") - (data (i32.const 1532) "\1c") - (data (i32.const 1544) "\01\00\00\00\n\00\00\00A\00G\00A\00I\00N") - (data (i32.const 1564) ",") - (data (i32.const 1576) "\01\00\00\00\0e\00\00\00A\00L\00R\00E\00A\00D\00Y") - (data (i32.const 1612) "\1c") - (data (i32.const 1624) "\01\00\00\00\08\00\00\00B\00A\00D\00F") - (data (i32.const 1644) "\1c") - (data (i32.const 1656) "\01\00\00\00\0c\00\00\00B\00A\00D\00M\00S\00G") - (data (i32.const 1676) "\1c") - (data (i32.const 1688) "\01\00\00\00\08\00\00\00B\00U\00S\00Y") - (data (i32.const 1708) ",") - (data (i32.const 1720) "\01\00\00\00\10\00\00\00C\00A\00N\00C\00E\00L\00E\00D") - (data (i32.const 1756) "\1c") - (data (i32.const 1768) "\01\00\00\00\n\00\00\00C\00H\00I\00L\00D") - (data (i32.const 1788) ",") - (data (i32.const 1800) "\01\00\00\00\16\00\00\00C\00O\00N\00N\00A\00B\00O\00R\00T\00E\00D") - (data (i32.const 1836) ",") - (data (i32.const 1848) "\01\00\00\00\16\00\00\00C\00O\00N\00N\00R\00E\00F\00U\00S\00E\00D") - (data (i32.const 1884) ",") - (data (i32.const 1896) "\01\00\00\00\12\00\00\00C\00O\00N\00N\00R\00E\00S\00E\00T") - (data (i32.const 1932) "\1c") - (data (i32.const 1944) "\01\00\00\00\0c\00\00\00D\00E\00A\00D\00L\00K") - (data (i32.const 1964) ",") - (data (i32.const 1976) "\01\00\00\00\16\00\00\00D\00E\00S\00T\00A\00D\00D\00R\00R\00E\00Q") - (data (i32.const 2012) "\1c") - (data (i32.const 2024) "\01\00\00\00\06\00\00\00D\00O\00M") - (data (i32.const 2044) "\1c") - (data (i32.const 2056) "\01\00\00\00\n\00\00\00D\00Q\00U\00O\00T") - (data (i32.const 2076) "\1c") - (data (i32.const 2088) "\01\00\00\00\n\00\00\00E\00X\00I\00S\00T") - (data (i32.const 2108) "\1c") - (data (i32.const 2120) "\01\00\00\00\n\00\00\00F\00A\00U\00L\00T") - (data (i32.const 2140) "\1c") - (data (i32.const 2152) "\01\00\00\00\08\00\00\00F\00B\00I\00G") - (data (i32.const 2172) ",") - (data (i32.const 2184) "\01\00\00\00\16\00\00\00H\00O\00S\00T\00U\00N\00R\00E\00A\00C\00H") - (data (i32.const 2220) "\1c") - (data (i32.const 2232) "\01\00\00\00\08\00\00\00I\00D\00R\00M") - (data (i32.const 2252) "\1c") - (data (i32.const 2264) "\01\00\00\00\n\00\00\00I\00L\00S\00E\00Q") - (data (i32.const 2284) ",") - (data (i32.const 2296) "\01\00\00\00\14\00\00\00I\00N\00P\00R\00O\00G\00R\00E\00S\00S") - (data (i32.const 2332) "\1c") - (data (i32.const 2344) "\01\00\00\00\08\00\00\00I\00N\00T\00R") - (data (i32.const 2364) "\1c") - (data (i32.const 2376) "\01\00\00\00\n\00\00\00I\00N\00V\00A\00L") - (data (i32.const 2396) "\1c") - (data (i32.const 2408) "\01\00\00\00\04\00\00\00I\00O") - (data (i32.const 2428) "\1c") - (data (i32.const 2440) "\01\00\00\00\0c\00\00\00I\00S\00C\00O\00N\00N") - (data (i32.const 2460) "\1c") - (data (i32.const 2472) "\01\00\00\00\n\00\00\00I\00S\00D\00I\00R") - (data (i32.const 2492) "\1c") - (data (i32.const 2504) "\01\00\00\00\08\00\00\00L\00O\00O\00P") - (data (i32.const 2524) "\1c") - (data (i32.const 2536) "\01\00\00\00\n\00\00\00M\00F\00I\00L\00E") - (data (i32.const 2556) "\1c") - (data (i32.const 2568) "\01\00\00\00\n\00\00\00M\00L\00I\00N\00K") - (data (i32.const 2588) ",") - (data (i32.const 2600) "\01\00\00\00\0e\00\00\00M\00S\00G\00S\00I\00Z\00E") - (data (i32.const 2636) ",") - (data (i32.const 2648) "\01\00\00\00\10\00\00\00M\00U\00L\00T\00I\00H\00O\00P") - (data (i32.const 2684) ",") - (data (i32.const 2696) "\01\00\00\00\16\00\00\00N\00A\00M\00E\00T\00O\00O\00L\00O\00N\00G") - (data (i32.const 2732) ",") - (data (i32.const 2744) "\01\00\00\00\0e\00\00\00N\00E\00T\00D\00O\00W\00N") - (data (i32.const 2780) ",") - (data (i32.const 2792) "\01\00\00\00\10\00\00\00N\00E\00T\00R\00E\00S\00E\00T") - (data (i32.const 2828) ",") - (data (i32.const 2840) "\01\00\00\00\14\00\00\00N\00E\00T\00U\00N\00R\00E\00A\00C\00H") - (data (i32.const 2876) "\1c") - (data (i32.const 2888) "\01\00\00\00\n\00\00\00N\00F\00I\00L\00E") - (data (i32.const 2908) "\1c") - (data (i32.const 2920) "\01\00\00\00\0c\00\00\00N\00O\00B\00U\00F\00S") - (data (i32.const 2940) "\1c") - (data (i32.const 2952) "\01\00\00\00\n\00\00\00N\00O\00D\00E\00V") - (data (i32.const 2972) "\1c") - (data (i32.const 2984) "\01\00\00\00\n\00\00\00N\00O\00E\00N\00T") - (data (i32.const 3004) "\1c") - (data (i32.const 3016) "\01\00\00\00\0c\00\00\00N\00O\00E\00X\00E\00C") - (data (i32.const 3036) "\1c") - (data (i32.const 3048) "\01\00\00\00\n\00\00\00N\00O\00L\00C\00K") - (data (i32.const 3068) "\1c") - (data (i32.const 3080) "\01\00\00\00\0c\00\00\00N\00O\00L\00I\00N\00K") - (data (i32.const 3100) "\1c") - (data (i32.const 3112) "\01\00\00\00\n\00\00\00N\00O\00M\00E\00M") - (data (i32.const 3132) "\1c") - (data (i32.const 3144) "\01\00\00\00\n\00\00\00N\00O\00M\00S\00G") - (data (i32.const 3164) ",") - (data (i32.const 3176) "\01\00\00\00\14\00\00\00N\00O\00P\00R\00O\00T\00O\00O\00P\00T") - (data (i32.const 3212) "\1c") - (data (i32.const 3224) "\01\00\00\00\n\00\00\00N\00O\00S\00P\00C") - (data (i32.const 3244) "\1c") - (data (i32.const 3256) "\01\00\00\00\n\00\00\00N\00O\00S\00Y\00S") - (data (i32.const 3276) ",") - (data (i32.const 3288) "\01\00\00\00\0e\00\00\00N\00O\00T\00C\00O\00N\00N") - (data (i32.const 3324) "\1c") - (data (i32.const 3336) "\01\00\00\00\0c\00\00\00N\00O\00T\00D\00I\00R") - (data (i32.const 3356) ",") - (data (i32.const 3368) "\01\00\00\00\10\00\00\00N\00O\00T\00E\00M\00P\00T\00Y") - (data (i32.const 3404) ",") - (data (i32.const 3416) "\01\00\00\00\1c\00\00\00N\00O\00T\00R\00E\00C\00O\00V\00E\00R\00A\00B\00L\00E") - (data (i32.const 3452) ",") - (data (i32.const 3464) "\01\00\00\00\0e\00\00\00N\00O\00T\00S\00O\00C\00K") - (data (i32.const 3500) "\1c") - (data (i32.const 3512) "\01\00\00\00\0c\00\00\00N\00O\00T\00S\00U\00P") - (data (i32.const 3532) "\1c") - (data (i32.const 3544) "\01\00\00\00\n\00\00\00N\00O\00T\00T\00Y") - (data (i32.const 3564) "\1c") - (data (i32.const 3576) "\01\00\00\00\08\00\00\00N\00X\00I\00O") - (data (i32.const 3596) ",") - (data (i32.const 3608) "\01\00\00\00\10\00\00\00O\00V\00E\00R\00F\00L\00O\00W") - (data (i32.const 3644) ",") - (data (i32.const 3656) "\01\00\00\00\12\00\00\00O\00W\00N\00E\00R\00D\00E\00A\00D") - (data (i32.const 3692) "\1c") - (data (i32.const 3704) "\01\00\00\00\08\00\00\00P\00E\00R\00M") - (data (i32.const 3724) "\1c") - (data (i32.const 3736) "\01\00\00\00\08\00\00\00P\00I\00P\00E") - (data (i32.const 3756) "\1c") - (data (i32.const 3768) "\01\00\00\00\n\00\00\00P\00R\00O\00T\00O") - (data (i32.const 3788) ",") - (data (i32.const 3800) "\01\00\00\00\1c\00\00\00P\00R\00O\00T\00O\00N\00O\00S\00U\00P\00P\00O\00R\00T") - (data (i32.const 3836) ",") - (data (i32.const 3848) "\01\00\00\00\12\00\00\00P\00R\00O\00T\00O\00T\00Y\00P\00E") - (data (i32.const 3884) "\1c") - (data (i32.const 3896) "\01\00\00\00\n\00\00\00R\00A\00N\00G\00E") - (data (i32.const 3916) "\1c") - (data (i32.const 3928) "\01\00\00\00\08\00\00\00R\00O\00F\00S") - (data (i32.const 3948) "\1c") - (data (i32.const 3960) "\01\00\00\00\n\00\00\00S\00P\00I\00P\00E") - (data (i32.const 3980) "\1c") - (data (i32.const 3992) "\01\00\00\00\08\00\00\00S\00R\00C\00H") - (data (i32.const 4012) "\1c") - (data (i32.const 4024) "\01\00\00\00\n\00\00\00S\00T\00A\00L\00E") - (data (i32.const 4044) ",") - (data (i32.const 4056) "\01\00\00\00\10\00\00\00T\00I\00M\00E\00D\00O\00U\00T") - (data (i32.const 4092) "\1c") - (data (i32.const 4104) "\01\00\00\00\0c\00\00\00T\00X\00T\00B\00S\00Y") - (data (i32.const 4124) "\1c") - (data (i32.const 4136) "\01\00\00\00\08\00\00\00X\00D\00E\00V") - (data (i32.const 4156) ",") - (data (i32.const 4168) "\01\00\00\00\14\00\00\00N\00O\00T\00C\00A\00P\00A\00B\00L\00E") - (data (i32.const 4204) ",") - (data (i32.const 4216) "\01\00\00\00\0e\00\00\00U\00N\00K\00N\00O\00W\00N") - (data (i32.const 4252) "<") - (data (i32.const 4264) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00p\00r\00o\00c\00e\00s\00s\00.\00t\00s") - (data (i32.const 4316) "<") - (data (i32.const 4328) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 4380) "<") - (data (i32.const 4392) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 4444) "\1c") - (data (i32.const 4456) "\01\00\00\00\02\00\00\00\n") - (data (i32.const 4476) "\1c") - (data (i32.const 4488) "\01\00\00\00\08\00\00\00p\00h\00e\00w") - (data (i32.const 4508) ",") - (data (i32.const 4520) "\01\00\00\00\12\00\00\00h\00e\00l\00l\00o\00 \00l\00o\00g") - (data (i32.const 4556) ",") - (data (i32.const 4568) "\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00d\00e\00b\00u\00g") - (data (i32.const 4604) ",") - (data (i32.const 4616) "\01\00\00\00\0e\00\00\00D\00e\00b\00u\00g\00:\00 ") - (data (i32.const 4652) ",") - (data (i32.const 4664) "\01\00\00\00\14\00\00\00h\00e\00l\00l\00o\00 \00i\00n\00f\00o") - (data (i32.const 4700) "\1c") - (data (i32.const 4712) "\01\00\00\00\0c\00\00\00I\00n\00f\00o\00:\00 ") - (data (i32.const 4732) ",") - (data (i32.const 4744) "\01\00\00\00\14\00\00\00h\00e\00l\00l\00o\00 \00w\00a\00r\00n") - (data (i32.const 4780) ",") - (data (i32.const 4792) "\01\00\00\00\12\00\00\00W\00a\00r\00n\00i\00n\00g\00:\00 ") - (data (i32.const 4828) ",") - (data (i32.const 4840) "\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00e\00r\00r\00o\00r") - (data (i32.const 4876) ",") - (data (i32.const 4888) "\01\00\00\00\0e\00\00\00E\00r\00r\00o\00r\00:\00 ") - (data (i32.const 4924) ",") - (data (i32.const 4936) "\01\00\00\00\12\00\00\00s\00o\00m\00e\00L\00a\00b\00e\00l") - (data (i32.const 4972) "<") - (data (i32.const 4984) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") - (data (i32.const 5100) "<") - (data (i32.const 5112) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") - (data (i32.const 5164) ",") - (data (i32.const 5176) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 5244) ",") - (data (i32.const 5256) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") - (data (i32.const 5292) "<") - (data (i32.const 5304) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 5356) "<") - (data (i32.const 5368) "\01\00\00\00 \00\00\00W\00a\00r\00n\00i\00n\00g\00:\00 \00L\00a\00b\00e\00l\00 \00\'") - (data (i32.const 5420) "\\") - (data (i32.const 5432) "\01\00\00\00H\00\00\00\'\00 \00a\00l\00r\00e\00a\00d\00y\00 \00e\00x\00i\00s\00t\00s\00 \00f\00o\00r\00 \00c\00o\00n\00s\00o\00l\00e\00.\00t\00i\00m\00e\00(\00)\00\n") - (data (i32.const 5516) "L") - (data (i32.const 5528) "\01\00\00\000\00\00\00W\00a\00r\00n\00i\00n\00g\00:\00 \00N\00o\00 \00s\00u\00c\00h\00 \00l\00a\00b\00e\00l\00 \00\'") - (data (i32.const 5596) "L") - (data (i32.const 5608) "\01\00\00\000\00\00\00\'\00 \00f\00o\00r\00 \00c\00o\00n\00s\00o\00l\00e\00.\00t\00i\00m\00e\00L\00o\00g\00(\00)\00\n") - (data (i32.const 5676) "<") - (data (i32.const 5688) "\01\00\00\00$\00\00\00K\00e\00y\00 \00d\00o\00e\00s\00 \00n\00o\00t\00 \00e\00x\00i\00s\00t") - (data (i32.const 5740) ",") - (data (i32.const 5752) "\01\00\00\00\16\00\00\00~\00l\00i\00b\00/\00m\00a\00p\00.\00t\00s") - (data (i32.const 5788) "|") - (data (i32.const 5800) "\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") - (data (i32.const 5916) "<") - (data (i32.const 5928) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") - (data (i32.const 5980) "\1c") - (data (i32.const 5992) "\01\00\00\00\02\00\00\000") + (data (i32.const 1036) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00w\00h\00o\00o\00p\00s") + (data (i32.const 1068) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00A\00s\00s\00e\00r\00t\00i\00o\00n\00 \00f\00a\00i\00l\00e\00d\00:\00 ") + (data (i32.const 1164) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00U\00n\00p\00a\00i\00r\00e\00d\00 \00s\00u\00r\00r\00o\00g\00a\00t\00e") + (data (i32.const 1228) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 1276) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00S\00U\00C\00C\00E\00S\00S") + (data (i32.const 1324) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00T\00O\00O\00B\00I\00G") + (data (i32.const 1356) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00A\00C\00C\00E\00S") + (data (i32.const 1388) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00A\00D\00D\00R\00I\00N\00U\00S\00E") + (data (i32.const 1436) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00A\00D\00D\00R\00N\00O\00T\00A\00V\00A\00I\00L") + (data (i32.const 1484) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00A\00F\00N\00O\00S\00U\00P\00P\00O\00R\00T") + (data (i32.const 1532) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00A\00G\00A\00I\00N") + (data (i32.const 1564) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00A\00L\00R\00E\00A\00D\00Y") + (data (i32.const 1612) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00B\00A\00D\00F") + (data (i32.const 1644) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00B\00A\00D\00M\00S\00G") + (data (i32.const 1676) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00B\00U\00S\00Y") + (data (i32.const 1708) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00C\00A\00N\00C\00E\00L\00E\00D") + (data (i32.const 1756) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00C\00H\00I\00L\00D") + (data (i32.const 1788) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00C\00O\00N\00N\00A\00B\00O\00R\00T\00E\00D") + (data (i32.const 1836) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00C\00O\00N\00N\00R\00E\00F\00U\00S\00E\00D") + (data (i32.const 1884) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00C\00O\00N\00N\00R\00E\00S\00E\00T") + (data (i32.const 1932) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00D\00E\00A\00D\00L\00K") + (data (i32.const 1964) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00D\00E\00S\00T\00A\00D\00D\00R\00R\00E\00Q") + (data (i32.const 2012) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00D\00O\00M") + (data (i32.const 2044) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00D\00Q\00U\00O\00T") + (data (i32.const 2076) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00E\00X\00I\00S\00T") + (data (i32.const 2108) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00F\00A\00U\00L\00T") + (data (i32.const 2140) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00F\00B\00I\00G") + (data (i32.const 2172) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00H\00O\00S\00T\00U\00N\00R\00E\00A\00C\00H") + (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00I\00D\00R\00M") + (data (i32.const 2252) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00I\00L\00S\00E\00Q") + (data (i32.const 2284) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00I\00N\00P\00R\00O\00G\00R\00E\00S\00S") + (data (i32.const 2332) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00I\00N\00T\00R") + (data (i32.const 2364) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00I\00N\00V\00A\00L") + (data (i32.const 2396) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00I\00O") + (data (i32.const 2428) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00I\00S\00C\00O\00N\00N") + (data (i32.const 2460) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00I\00S\00D\00I\00R") + (data (i32.const 2492) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00L\00O\00O\00P") + (data (i32.const 2524) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00M\00F\00I\00L\00E") + (data (i32.const 2556) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00M\00L\00I\00N\00K") + (data (i32.const 2588) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00M\00S\00G\00S\00I\00Z\00E") + (data (i32.const 2636) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00M\00U\00L\00T\00I\00H\00O\00P") + (data (i32.const 2684) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00N\00A\00M\00E\00T\00O\00O\00L\00O\00N\00G") + (data (i32.const 2732) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00N\00E\00T\00D\00O\00W\00N") + (data (i32.const 2780) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00N\00E\00T\00R\00E\00S\00E\00T") + (data (i32.const 2828) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00N\00E\00T\00U\00N\00R\00E\00A\00C\00H") + (data (i32.const 2876) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00F\00I\00L\00E") + (data (i32.const 2908) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00B\00U\00F\00S") + (data (i32.const 2940) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00D\00E\00V") + (data (i32.const 2972) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00E\00N\00T") + (data (i32.const 3004) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00E\00X\00E\00C") + (data (i32.const 3036) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00L\00C\00K") + (data (i32.const 3068) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00L\00I\00N\00K") + (data (i32.const 3100) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00M\00E\00M") + (data (i32.const 3132) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00M\00S\00G") + (data (i32.const 3164) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00N\00O\00P\00R\00O\00T\00O\00O\00P\00T") + (data (i32.const 3212) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00S\00P\00C") + (data (i32.const 3244) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00S\00Y\00S") + (data (i32.const 3276) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00N\00O\00T\00C\00O\00N\00N") + (data (i32.const 3324) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00T\00D\00I\00R") + (data (i32.const 3356) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00N\00O\00T\00E\00M\00P\00T\00Y") + (data (i32.const 3404) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00N\00O\00T\00R\00E\00C\00O\00V\00E\00R\00A\00B\00L\00E") + (data (i32.const 3452) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00N\00O\00T\00S\00O\00C\00K") + (data (i32.const 3500) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00T\00S\00U\00P") + (data (i32.const 3532) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00T\00T\00Y") + (data (i32.const 3564) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00N\00X\00I\00O") + (data (i32.const 3596) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00O\00V\00E\00R\00F\00L\00O\00W") + (data (i32.const 3644) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00O\00W\00N\00E\00R\00D\00E\00A\00D") + (data (i32.const 3692) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00P\00E\00R\00M") + (data (i32.const 3724) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00P\00I\00P\00E") + (data (i32.const 3756) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00P\00R\00O\00T\00O") + (data (i32.const 3788) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00P\00R\00O\00T\00O\00N\00O\00S\00U\00P\00P\00O\00R\00T") + (data (i32.const 3836) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00P\00R\00O\00T\00O\00T\00Y\00P\00E") + (data (i32.const 3884) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00R\00A\00N\00G\00E") + (data (i32.const 3916) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00R\00O\00F\00S") + (data (i32.const 3948) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00S\00P\00I\00P\00E") + (data (i32.const 3980) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00S\00R\00C\00H") + (data (i32.const 4012) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00S\00T\00A\00L\00E") + (data (i32.const 4044) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00T\00I\00M\00E\00D\00O\00U\00T") + (data (i32.const 4092) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00T\00X\00T\00B\00S\00Y") + (data (i32.const 4124) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00X\00D\00E\00V") + (data (i32.const 4156) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00N\00O\00T\00C\00A\00P\00A\00B\00L\00E") + (data (i32.const 4204) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00U\00N\00K\00N\00O\00W\00N") + (data (i32.const 4252) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00p\00r\00o\00c\00e\00s\00s\00.\00t\00s") + (data (i32.const 4316) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 4380) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 4444) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\n") + (data (i32.const 4476) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00p\00h\00e\00w") + (data (i32.const 4508) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00h\00e\00l\00l\00o\00 \00l\00o\00g") + (data (i32.const 4556) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00d\00e\00b\00u\00g") + (data (i32.const 4604) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00D\00e\00b\00u\00g\00:\00 ") + (data (i32.const 4652) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00h\00e\00l\00l\00o\00 \00i\00n\00f\00o") + (data (i32.const 4700) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00I\00n\00f\00o\00:\00 ") + (data (i32.const 4732) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00h\00e\00l\00l\00o\00 \00w\00a\00r\00n") + (data (i32.const 4780) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00W\00a\00r\00n\00i\00n\00g\00:\00 ") + (data (i32.const 4828) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00e\00r\00r\00o\00r") + (data (i32.const 4876) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00E\00r\00r\00o\00r\00:\00 ") + (data (i32.const 4924) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00s\00o\00m\00e\00L\00a\00b\00e\00l") + (data (i32.const 4972) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 5100) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data (i32.const 5164) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data (i32.const 5244) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") + (data (i32.const 5292) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 5356) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00W\00a\00r\00n\00i\00n\00g\00:\00 \00L\00a\00b\00e\00l\00 \00\'") + (data (i32.const 5420) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\00\'\00 \00a\00l\00r\00e\00a\00d\00y\00 \00e\00x\00i\00s\00t\00s\00 \00f\00o\00r\00 \00c\00o\00n\00s\00o\00l\00e\00.\00t\00i\00m\00e\00(\00)\00\n") + (data (i32.const 5516) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\000\00\00\00W\00a\00r\00n\00i\00n\00g\00:\00 \00N\00o\00 \00s\00u\00c\00h\00 \00l\00a\00b\00e\00l\00 \00\'") + (data (i32.const 5596) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\000\00\00\00\'\00 \00f\00o\00r\00 \00c\00o\00n\00s\00o\00l\00e\00.\00t\00i\00m\00e\00L\00o\00g\00(\00)\00\n") + (data (i32.const 5676) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00K\00e\00y\00 \00d\00o\00e\00s\00 \00n\00o\00t\00 \00e\00x\00i\00s\00t") + (data (i32.const 5740) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00~\00l\00i\00b\00/\00m\00a\00p\00.\00t\00s") + (data (i32.const 5788) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") + (data (i32.const 5916) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") + (data (i32.const 5980) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\000") (data (i32.const 6012) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 6412) "\1c\04") - (data (i32.const 6424) "\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") - (data (i32.const 7468) "\\") - (data (i32.const 7480) "\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") - (data (i32.const 7564) "\1c") - (data (i32.const 7576) "\01\00\00\00\04\00\00\00:\00 ") - (data (i32.const 7596) "\1c") - (data (i32.const 7608) "\01\00\00\00\06\00\00\00m\00s\00\n") - (data (i32.const 7628) "L") - (data (i32.const 7640) "\01\00\00\000\00\00\00\'\00 \00f\00o\00r\00 \00c\00o\00n\00s\00o\00l\00e\00.\00t\00i\00m\00e\00E\00n\00d\00(\00)\00\n") - (data (i32.const 7708) ",") - (data (i32.const 7720) "\01\00\00\00\14\00\00\00w\00r\00o\00n\00g\00L\00a\00b\00e\00l") - (data (i32.const 7756) ",") - (data (i32.const 7768) "\01\00\00\00\1c\00\00\00d\00u\00p\00l\00i\00c\00a\00t\00e\00L\00a\00b\00e\00l") - (data (i32.const 7804) "\1c") - (data (i32.const 7816) "\01\00\00\00\02\00\00\001") - (data (i32.const 7836) "\1c") - (data (i32.const 7848) "\01\00\00\00\04\00\00\001\002") - (data (i32.const 7868) "\1c") - (data (i32.const 7880) "\01\00\00\00\06\00\00\001\002\003") - (data (i32.const 7900) "\1c") - (data (i32.const 7912) "\01\00\00\00\08\00\00\001\002\003\004") - (data (i32.const 7936) "\04\00\00\00 \00\00\00\00\00\00\00 ") - (data (i32.const 7964) "\10\02\82") + (data (i32.const 6412) "\1c\04\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") + (data (i32.const 7468) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") + (data (i32.const 7564) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00:\00 ") + (data (i32.const 7596) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00m\00s\00\n") + (data (i32.const 7628) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\000\00\00\00\'\00 \00f\00o\00r\00 \00c\00o\00n\00s\00o\00l\00e\00.\00t\00i\00m\00e\00E\00n\00d\00(\00)\00\n") + (data (i32.const 7708) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00w\00r\00o\00n\00g\00L\00a\00b\00e\00l") + (data (i32.const 7756) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00d\00u\00p\00l\00i\00c\00a\00t\00e\00L\00a\00b\00e\00l") + (data (i32.const 7804) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\001") + (data (i32.const 7836) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\001\002") + (data (i32.const 7868) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\002\003") + (data (i32.const 7900) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\002\003\004") + (data (i32.const 7936) "\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\02\82") (export "memory" (memory $0)) (export "_start" (func $~start)) (func $~lib/string/String.UTF8.encodeUnsafe@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -2702,182 +2579,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std-wasi/console.untouched.wat b/tests/compiler/std-wasi/console.untouched.wat index 6d33e81c83..bc9b2076bc 100644 --- a/tests/compiler/std-wasi/console.untouched.wat +++ b/tests/compiler/std-wasi/console.untouched.wat @@ -40,9 +40,9 @@ (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0)) (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/console/timers (mut i32) (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/rt/__rtti_base i32 (i32.const 6912)) (global $~lib/memory/__data_end i32 (i32.const 6948)) @@ -3639,237 +3639,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -3919,7 +3688,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) diff --git a/tests/compiler/std-wasi/crypto.json b/tests/compiler/std-wasi/crypto.json index 7d7fd4a682..b5784f1e69 100644 --- a/tests/compiler/std-wasi/crypto.json +++ b/tests/compiler/std-wasi/crypto.json @@ -6,8 +6,5 @@ "args": [], "env": {}, "returnOnExit": true - }, - "features": [ - "bigint-integration" - ] + } } diff --git a/tests/compiler/std-wasi/crypto.optimized.wat b/tests/compiler/std-wasi/crypto.optimized.wat index 4dc8552597..2337f7ceda 100644 --- a/tests/compiler/std-wasi/crypto.optimized.wat +++ b/tests/compiler/std-wasi/crypto.optimized.wat @@ -3,9 +3,9 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -30,209 +30,108 @@ (global $~lib/memory/__stack_pointer (mut i32) (i32.const 23284)) (global $~started (mut i32) (i32.const 0)) (memory $0 1) - (data (i32.const 1036) "<") - (data (i32.const 1048) "\01\00\00\00$\00\00\00U\00n\00p\00a\00i\00r\00e\00d\00 \00s\00u\00r\00r\00o\00g\00a\00t\00e") - (data (i32.const 1100) ",") - (data (i32.const 1112) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 1148) ",") - (data (i32.const 1160) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") - (data (i32.const 1196) "<") - (data (i32.const 1208) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 1260) "<") - (data (i32.const 1272) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1324) "<") - (data (i32.const 1336) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") - (data (i32.const 1452) "<") - (data (i32.const 1464) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") - (data (i32.const 1516) ",") - (data (i32.const 1528) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 1596) "<") - (data (i32.const 1608) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 1660) "<") - (data (i32.const 1672) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1724) ",") - (data (i32.const 1736) "\01\00\00\00\0e\00\00\00S\00U\00C\00C\00E\00S\00S") - (data (i32.const 1772) "\1c") - (data (i32.const 1784) "\01\00\00\00\0c\00\00\00T\00O\00O\00B\00I\00G") - (data (i32.const 1804) "\1c") - (data (i32.const 1816) "\01\00\00\00\n\00\00\00A\00C\00C\00E\00S") - (data (i32.const 1836) ",") - (data (i32.const 1848) "\01\00\00\00\12\00\00\00A\00D\00D\00R\00I\00N\00U\00S\00E") - (data (i32.const 1884) ",") - (data (i32.const 1896) "\01\00\00\00\18\00\00\00A\00D\00D\00R\00N\00O\00T\00A\00V\00A\00I\00L") - (data (i32.const 1932) ",") - (data (i32.const 1944) "\01\00\00\00\16\00\00\00A\00F\00N\00O\00S\00U\00P\00P\00O\00R\00T") - (data (i32.const 1980) "\1c") - (data (i32.const 1992) "\01\00\00\00\n\00\00\00A\00G\00A\00I\00N") - (data (i32.const 2012) ",") - (data (i32.const 2024) "\01\00\00\00\0e\00\00\00A\00L\00R\00E\00A\00D\00Y") - (data (i32.const 2060) "\1c") - (data (i32.const 2072) "\01\00\00\00\08\00\00\00B\00A\00D\00F") - (data (i32.const 2092) "\1c") - (data (i32.const 2104) "\01\00\00\00\0c\00\00\00B\00A\00D\00M\00S\00G") - (data (i32.const 2124) "\1c") - (data (i32.const 2136) "\01\00\00\00\08\00\00\00B\00U\00S\00Y") - (data (i32.const 2156) ",") - (data (i32.const 2168) "\01\00\00\00\10\00\00\00C\00A\00N\00C\00E\00L\00E\00D") - (data (i32.const 2204) "\1c") - (data (i32.const 2216) "\01\00\00\00\n\00\00\00C\00H\00I\00L\00D") - (data (i32.const 2236) ",") - (data (i32.const 2248) "\01\00\00\00\16\00\00\00C\00O\00N\00N\00A\00B\00O\00R\00T\00E\00D") - (data (i32.const 2284) ",") - (data (i32.const 2296) "\01\00\00\00\16\00\00\00C\00O\00N\00N\00R\00E\00F\00U\00S\00E\00D") - (data (i32.const 2332) ",") - (data (i32.const 2344) "\01\00\00\00\12\00\00\00C\00O\00N\00N\00R\00E\00S\00E\00T") - (data (i32.const 2380) "\1c") - (data (i32.const 2392) "\01\00\00\00\0c\00\00\00D\00E\00A\00D\00L\00K") - (data (i32.const 2412) ",") - (data (i32.const 2424) "\01\00\00\00\16\00\00\00D\00E\00S\00T\00A\00D\00D\00R\00R\00E\00Q") - (data (i32.const 2460) "\1c") - (data (i32.const 2472) "\01\00\00\00\06\00\00\00D\00O\00M") - (data (i32.const 2492) "\1c") - (data (i32.const 2504) "\01\00\00\00\n\00\00\00D\00Q\00U\00O\00T") - (data (i32.const 2524) "\1c") - (data (i32.const 2536) "\01\00\00\00\n\00\00\00E\00X\00I\00S\00T") - (data (i32.const 2556) "\1c") - (data (i32.const 2568) "\01\00\00\00\n\00\00\00F\00A\00U\00L\00T") - (data (i32.const 2588) "\1c") - (data (i32.const 2600) "\01\00\00\00\08\00\00\00F\00B\00I\00G") - (data (i32.const 2620) ",") - (data (i32.const 2632) "\01\00\00\00\16\00\00\00H\00O\00S\00T\00U\00N\00R\00E\00A\00C\00H") - (data (i32.const 2668) "\1c") - (data (i32.const 2680) "\01\00\00\00\08\00\00\00I\00D\00R\00M") - (data (i32.const 2700) "\1c") - (data (i32.const 2712) "\01\00\00\00\n\00\00\00I\00L\00S\00E\00Q") - (data (i32.const 2732) ",") - (data (i32.const 2744) "\01\00\00\00\14\00\00\00I\00N\00P\00R\00O\00G\00R\00E\00S\00S") - (data (i32.const 2780) "\1c") - (data (i32.const 2792) "\01\00\00\00\08\00\00\00I\00N\00T\00R") - (data (i32.const 2812) "\1c") - (data (i32.const 2824) "\01\00\00\00\n\00\00\00I\00N\00V\00A\00L") - (data (i32.const 2844) "\1c") - (data (i32.const 2856) "\01\00\00\00\04\00\00\00I\00O") - (data (i32.const 2876) "\1c") - (data (i32.const 2888) "\01\00\00\00\0c\00\00\00I\00S\00C\00O\00N\00N") - (data (i32.const 2908) "\1c") - (data (i32.const 2920) "\01\00\00\00\n\00\00\00I\00S\00D\00I\00R") - (data (i32.const 2940) "\1c") - (data (i32.const 2952) "\01\00\00\00\08\00\00\00L\00O\00O\00P") - (data (i32.const 2972) "\1c") - (data (i32.const 2984) "\01\00\00\00\n\00\00\00M\00F\00I\00L\00E") - (data (i32.const 3004) "\1c") - (data (i32.const 3016) "\01\00\00\00\n\00\00\00M\00L\00I\00N\00K") - (data (i32.const 3036) ",") - (data (i32.const 3048) "\01\00\00\00\0e\00\00\00M\00S\00G\00S\00I\00Z\00E") - (data (i32.const 3084) ",") - (data (i32.const 3096) "\01\00\00\00\10\00\00\00M\00U\00L\00T\00I\00H\00O\00P") - (data (i32.const 3132) ",") - (data (i32.const 3144) "\01\00\00\00\16\00\00\00N\00A\00M\00E\00T\00O\00O\00L\00O\00N\00G") - (data (i32.const 3180) ",") - (data (i32.const 3192) "\01\00\00\00\0e\00\00\00N\00E\00T\00D\00O\00W\00N") - (data (i32.const 3228) ",") - (data (i32.const 3240) "\01\00\00\00\10\00\00\00N\00E\00T\00R\00E\00S\00E\00T") - (data (i32.const 3276) ",") - (data (i32.const 3288) "\01\00\00\00\14\00\00\00N\00E\00T\00U\00N\00R\00E\00A\00C\00H") - (data (i32.const 3324) "\1c") - (data (i32.const 3336) "\01\00\00\00\n\00\00\00N\00F\00I\00L\00E") - (data (i32.const 3356) "\1c") - (data (i32.const 3368) "\01\00\00\00\0c\00\00\00N\00O\00B\00U\00F\00S") - (data (i32.const 3388) "\1c") - (data (i32.const 3400) "\01\00\00\00\n\00\00\00N\00O\00D\00E\00V") - (data (i32.const 3420) "\1c") - (data (i32.const 3432) "\01\00\00\00\n\00\00\00N\00O\00E\00N\00T") - (data (i32.const 3452) "\1c") - (data (i32.const 3464) "\01\00\00\00\0c\00\00\00N\00O\00E\00X\00E\00C") - (data (i32.const 3484) "\1c") - (data (i32.const 3496) "\01\00\00\00\n\00\00\00N\00O\00L\00C\00K") - (data (i32.const 3516) "\1c") - (data (i32.const 3528) "\01\00\00\00\0c\00\00\00N\00O\00L\00I\00N\00K") - (data (i32.const 3548) "\1c") - (data (i32.const 3560) "\01\00\00\00\n\00\00\00N\00O\00M\00E\00M") - (data (i32.const 3580) "\1c") - (data (i32.const 3592) "\01\00\00\00\n\00\00\00N\00O\00M\00S\00G") - (data (i32.const 3612) ",") - (data (i32.const 3624) "\01\00\00\00\14\00\00\00N\00O\00P\00R\00O\00T\00O\00O\00P\00T") - (data (i32.const 3660) "\1c") - (data (i32.const 3672) "\01\00\00\00\n\00\00\00N\00O\00S\00P\00C") - (data (i32.const 3692) "\1c") - (data (i32.const 3704) "\01\00\00\00\n\00\00\00N\00O\00S\00Y\00S") - (data (i32.const 3724) ",") - (data (i32.const 3736) "\01\00\00\00\0e\00\00\00N\00O\00T\00C\00O\00N\00N") - (data (i32.const 3772) "\1c") - (data (i32.const 3784) "\01\00\00\00\0c\00\00\00N\00O\00T\00D\00I\00R") - (data (i32.const 3804) ",") - (data (i32.const 3816) "\01\00\00\00\10\00\00\00N\00O\00T\00E\00M\00P\00T\00Y") - (data (i32.const 3852) ",") - (data (i32.const 3864) "\01\00\00\00\1c\00\00\00N\00O\00T\00R\00E\00C\00O\00V\00E\00R\00A\00B\00L\00E") - (data (i32.const 3900) ",") - (data (i32.const 3912) "\01\00\00\00\0e\00\00\00N\00O\00T\00S\00O\00C\00K") - (data (i32.const 3948) "\1c") - (data (i32.const 3960) "\01\00\00\00\0c\00\00\00N\00O\00T\00S\00U\00P") - (data (i32.const 3980) "\1c") - (data (i32.const 3992) "\01\00\00\00\n\00\00\00N\00O\00T\00T\00Y") - (data (i32.const 4012) "\1c") - (data (i32.const 4024) "\01\00\00\00\08\00\00\00N\00X\00I\00O") - (data (i32.const 4044) ",") - (data (i32.const 4056) "\01\00\00\00\10\00\00\00O\00V\00E\00R\00F\00L\00O\00W") - (data (i32.const 4092) ",") - (data (i32.const 4104) "\01\00\00\00\12\00\00\00O\00W\00N\00E\00R\00D\00E\00A\00D") - (data (i32.const 4140) "\1c") - (data (i32.const 4152) "\01\00\00\00\08\00\00\00P\00E\00R\00M") - (data (i32.const 4172) "\1c") - (data (i32.const 4184) "\01\00\00\00\08\00\00\00P\00I\00P\00E") - (data (i32.const 4204) "\1c") - (data (i32.const 4216) "\01\00\00\00\n\00\00\00P\00R\00O\00T\00O") - (data (i32.const 4236) ",") - (data (i32.const 4248) "\01\00\00\00\1c\00\00\00P\00R\00O\00T\00O\00N\00O\00S\00U\00P\00P\00O\00R\00T") - (data (i32.const 4284) ",") - (data (i32.const 4296) "\01\00\00\00\12\00\00\00P\00R\00O\00T\00O\00T\00Y\00P\00E") - (data (i32.const 4332) "\1c") - (data (i32.const 4344) "\01\00\00\00\n\00\00\00R\00A\00N\00G\00E") - (data (i32.const 4364) "\1c") - (data (i32.const 4376) "\01\00\00\00\08\00\00\00R\00O\00F\00S") - (data (i32.const 4396) "\1c") - (data (i32.const 4408) "\01\00\00\00\n\00\00\00S\00P\00I\00P\00E") - (data (i32.const 4428) "\1c") - (data (i32.const 4440) "\01\00\00\00\08\00\00\00S\00R\00C\00H") - (data (i32.const 4460) "\1c") - (data (i32.const 4472) "\01\00\00\00\n\00\00\00S\00T\00A\00L\00E") - (data (i32.const 4492) ",") - (data (i32.const 4504) "\01\00\00\00\10\00\00\00T\00I\00M\00E\00D\00O\00U\00T") - (data (i32.const 4540) "\1c") - (data (i32.const 4552) "\01\00\00\00\0c\00\00\00T\00X\00T\00B\00S\00Y") - (data (i32.const 4572) "\1c") - (data (i32.const 4584) "\01\00\00\00\08\00\00\00X\00D\00E\00V") - (data (i32.const 4604) ",") - (data (i32.const 4616) "\01\00\00\00\14\00\00\00N\00O\00T\00C\00A\00P\00A\00B\00L\00E") - (data (i32.const 4652) ",") - (data (i32.const 4664) "\01\00\00\00\0e\00\00\00U\00N\00K\00N\00O\00W\00N") - (data (i32.const 4700) ",") - (data (i32.const 4712) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00c\00r\00y\00p\00t\00o\00.\00t\00s") - (data (i32.const 4748) "L") - (data (i32.const 4760) "\01\00\00\000\00\00\00c\00r\00y\00p\00t\00o\00.\00g\00e\00t\00R\00a\00n\00d\00o\00m\00V\00a\00l\00u\00e\00s\00:\00 ") - (data (i32.const 4828) "\1c") - (data (i32.const 4840) "\01") - (data (i32.const 4860) "|") - (data (i32.const 4872) "\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") - (data (i32.const 4988) "<") - (data (i32.const 5000) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") - (data (i32.const 5052) "\1c") - (data (i32.const 5064) "\01\00\00\00\02\00\00\000") + (data (i32.const 1036) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00U\00n\00p\00a\00i\00r\00e\00d\00 \00s\00u\00r\00r\00o\00g\00a\00t\00e") + (data (i32.const 1100) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 1148) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") + (data (i32.const 1196) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 1260) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 1324) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 1452) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data (i32.const 1516) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data (i32.const 1596) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 1660) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1724) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00S\00U\00C\00C\00E\00S\00S") + (data (i32.const 1772) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00T\00O\00O\00B\00I\00G") + (data (i32.const 1804) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00A\00C\00C\00E\00S") + (data (i32.const 1836) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00A\00D\00D\00R\00I\00N\00U\00S\00E") + (data (i32.const 1884) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00A\00D\00D\00R\00N\00O\00T\00A\00V\00A\00I\00L") + (data (i32.const 1932) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00A\00F\00N\00O\00S\00U\00P\00P\00O\00R\00T") + (data (i32.const 1980) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00A\00G\00A\00I\00N") + (data (i32.const 2012) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00A\00L\00R\00E\00A\00D\00Y") + (data (i32.const 2060) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00B\00A\00D\00F") + (data (i32.const 2092) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00B\00A\00D\00M\00S\00G") + (data (i32.const 2124) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00B\00U\00S\00Y") + (data (i32.const 2156) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00C\00A\00N\00C\00E\00L\00E\00D") + (data (i32.const 2204) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00C\00H\00I\00L\00D") + (data (i32.const 2236) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00C\00O\00N\00N\00A\00B\00O\00R\00T\00E\00D") + (data (i32.const 2284) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00C\00O\00N\00N\00R\00E\00F\00U\00S\00E\00D") + (data (i32.const 2332) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00C\00O\00N\00N\00R\00E\00S\00E\00T") + (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00D\00E\00A\00D\00L\00K") + (data (i32.const 2412) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00D\00E\00S\00T\00A\00D\00D\00R\00R\00E\00Q") + (data (i32.const 2460) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00D\00O\00M") + (data (i32.const 2492) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00D\00Q\00U\00O\00T") + (data (i32.const 2524) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00E\00X\00I\00S\00T") + (data (i32.const 2556) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00F\00A\00U\00L\00T") + (data (i32.const 2588) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00F\00B\00I\00G") + (data (i32.const 2620) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00H\00O\00S\00T\00U\00N\00R\00E\00A\00C\00H") + (data (i32.const 2668) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00I\00D\00R\00M") + (data (i32.const 2700) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00I\00L\00S\00E\00Q") + (data (i32.const 2732) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00I\00N\00P\00R\00O\00G\00R\00E\00S\00S") + (data (i32.const 2780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00I\00N\00T\00R") + (data (i32.const 2812) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00I\00N\00V\00A\00L") + (data (i32.const 2844) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00I\00O") + (data (i32.const 2876) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00I\00S\00C\00O\00N\00N") + (data (i32.const 2908) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00I\00S\00D\00I\00R") + (data (i32.const 2940) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00L\00O\00O\00P") + (data (i32.const 2972) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00M\00F\00I\00L\00E") + (data (i32.const 3004) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00M\00L\00I\00N\00K") + (data (i32.const 3036) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00M\00S\00G\00S\00I\00Z\00E") + (data (i32.const 3084) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00M\00U\00L\00T\00I\00H\00O\00P") + (data (i32.const 3132) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00N\00A\00M\00E\00T\00O\00O\00L\00O\00N\00G") + (data (i32.const 3180) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00N\00E\00T\00D\00O\00W\00N") + (data (i32.const 3228) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00N\00E\00T\00R\00E\00S\00E\00T") + (data (i32.const 3276) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00N\00E\00T\00U\00N\00R\00E\00A\00C\00H") + (data (i32.const 3324) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00F\00I\00L\00E") + (data (i32.const 3356) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00B\00U\00F\00S") + (data (i32.const 3388) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00D\00E\00V") + (data (i32.const 3420) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00E\00N\00T") + (data (i32.const 3452) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00E\00X\00E\00C") + (data (i32.const 3484) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00L\00C\00K") + (data (i32.const 3516) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00L\00I\00N\00K") + (data (i32.const 3548) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00M\00E\00M") + (data (i32.const 3580) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00M\00S\00G") + (data (i32.const 3612) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00N\00O\00P\00R\00O\00T\00O\00O\00P\00T") + (data (i32.const 3660) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00S\00P\00C") + (data (i32.const 3692) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00S\00Y\00S") + (data (i32.const 3724) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00N\00O\00T\00C\00O\00N\00N") + (data (i32.const 3772) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00T\00D\00I\00R") + (data (i32.const 3804) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00N\00O\00T\00E\00M\00P\00T\00Y") + (data (i32.const 3852) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00N\00O\00T\00R\00E\00C\00O\00V\00E\00R\00A\00B\00L\00E") + (data (i32.const 3900) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00N\00O\00T\00S\00O\00C\00K") + (data (i32.const 3948) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00T\00S\00U\00P") + (data (i32.const 3980) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00T\00T\00Y") + (data (i32.const 4012) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00N\00X\00I\00O") + (data (i32.const 4044) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00O\00V\00E\00R\00F\00L\00O\00W") + (data (i32.const 4092) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00O\00W\00N\00E\00R\00D\00E\00A\00D") + (data (i32.const 4140) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00P\00E\00R\00M") + (data (i32.const 4172) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00P\00I\00P\00E") + (data (i32.const 4204) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00P\00R\00O\00T\00O") + (data (i32.const 4236) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00P\00R\00O\00T\00O\00N\00O\00S\00U\00P\00P\00O\00R\00T") + (data (i32.const 4284) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00P\00R\00O\00T\00O\00T\00Y\00P\00E") + (data (i32.const 4332) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00R\00A\00N\00G\00E") + (data (i32.const 4364) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00R\00O\00F\00S") + (data (i32.const 4396) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00S\00P\00I\00P\00E") + (data (i32.const 4428) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00S\00R\00C\00H") + (data (i32.const 4460) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00S\00T\00A\00L\00E") + (data (i32.const 4492) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00T\00I\00M\00E\00D\00O\00U\00T") + (data (i32.const 4540) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00T\00X\00T\00B\00S\00Y") + (data (i32.const 4572) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00X\00D\00E\00V") + (data (i32.const 4604) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00N\00O\00T\00C\00A\00P\00A\00B\00L\00E") + (data (i32.const 4652) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00U\00N\00K\00N\00O\00W\00N") + (data (i32.const 4700) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00c\00r\00y\00p\00t\00o\00.\00t\00s") + (data (i32.const 4748) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\000\00\00\00c\00r\00y\00p\00t\00o\00.\00g\00e\00t\00R\00a\00n\00d\00o\00m\00V\00a\00l\00u\00e\00s\00:\00 ") + (data (i32.const 4828) "\1c\00\00\00\00\00\00\00\00\00\00\00\01") + (data (i32.const 4860) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") + (data (i32.const 4988) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") + (data (i32.const 5052) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\000") (data (i32.const 5084) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 5484) "\1c\04") - (data (i32.const 5496) "\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") - (data (i32.const 6540) "\\") - (data (i32.const 6552) "\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") - (data (i32.const 6636) "\1c") - (data (i32.const 6648) "\01\00\00\00\02\00\00\00,") - (data (i32.const 6700) "<") - (data (i32.const 6712) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00p\00r\00o\00c\00e\00s\00s\00.\00t\00s") - (data (i32.const 6764) "\1c") - (data (i32.const 6776) "\01\00\00\00\02\00\00\00\n") - (data (i32.const 6796) "<") - (data (i32.const 6808) "\01\00\00\00$\00\00\00s\00t\00d\00-\00w\00a\00s\00i\00/\00c\00r\00y\00p\00t\00o\00.\00t\00s") - (data (i32.const 6864) "\04\00\00\00 \00\00\00\00\00\00\00 ") - (data (i32.const 6892) "A\00\00\00\02") + (data (i32.const 5484) "\1c\04\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") + (data (i32.const 6540) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") + (data (i32.const 6636) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00,") + (data (i32.const 6700) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00p\00r\00o\00c\00e\00s\00s\00.\00t\00s") + (data (i32.const 6764) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\n") + (data (i32.const 6796) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00s\00t\00d\00-\00w\00a\00s\00i\00/\00c\00r\00y\00p\00t\00o\00.\00t\00s") + (data (i32.const 6864) "\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00A\00\00\00\02") (export "memory" (memory $0)) (export "_start" (func $~start)) (func $~lib/string/String.UTF8.encodeUnsafe@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -2139,182 +2038,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/bindings/wasi_snapshot_preview1/errnoToString (param $0 i32) (result i32) block $break|0 @@ -2835,879 +2563,6 @@ call $~lib/util/number/utoa32_dec_lut local.get $0 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/typedarray/Uint8Array#join (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -3899,7 +2754,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $2 local.get $4 i32.add @@ -4017,7 +2872,7 @@ local.get $3 i32.add local.get $2 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -4107,13 +2962,13 @@ local.get $1 i32.const 4768 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $2 i32.add local.get $0 local.get $3 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -4965,7 +3820,7 @@ i32.load offset=4 i32.add local.get $3 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/tests/compiler/std-wasi/crypto.untouched.wat b/tests/compiler/std-wasi/crypto.untouched.wat index f44474421a..ffc0365dcf 100644 --- a/tests/compiler/std-wasi/crypto.untouched.wat +++ b/tests/compiler/std-wasi/crypto.untouched.wat @@ -3,9 +3,9 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -31,10 +31,10 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $std-wasi/crypto/ab (mut i32) (i32.const 0)) (global $std-wasi/crypto/buf (mut i32) (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/process/process.stdout i32 (i32.const 1)) (global $~lib/bindings/wasi/tempbuf i32 (i32.const 5648)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) @@ -2680,237 +2680,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2960,7 +2729,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $0 i32) (result i32) @@ -4119,1259 +3888,6 @@ call $~lib/util/number/utoa32_dec_lut local.get $3 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/typedarray/Uint8Array#join (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 @@ -6588,7 +5104,7 @@ local.get $8 i32.add local.get $10 - call $~lib/memory/memory.copy + memory.copy local.get $11 local.set $12 global.get $~lib/memory/__stack_pointer @@ -6713,7 +5229,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -6817,13 +5333,13 @@ local.get $5 local.get $0 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.get $2 i32.add local.get $1 local.get $3 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.set $6 global.get $~lib/memory/__stack_pointer @@ -7043,7 +5559,7 @@ local.get $6 i32.const 0 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $7 local.set $9 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/std-wasi/process.json b/tests/compiler/std-wasi/process.json index d7d6e5057e..c7e46bd414 100644 --- a/tests/compiler/std-wasi/process.json +++ b/tests/compiler/std-wasi/process.json @@ -14,8 +14,5 @@ "THIRDENV": "thirdEnv" }, "returnOnExit": true - }, - "features": [ - "bigint-integration" - ] + } } diff --git a/tests/compiler/std-wasi/process.optimized.wat b/tests/compiler/std-wasi/process.optimized.wat index c0b7cbced6..2597da3922 100644 --- a/tests/compiler/std-wasi/process.optimized.wat +++ b/tests/compiler/std-wasi/process.optimized.wat @@ -1,7 +1,7 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) @@ -38,231 +38,119 @@ (global $~lib/memory/__stack_pointer (mut i32) (i32.const 23788)) (global $~started (mut i32) (i32.const 0)) (memory $0 1) - (data (i32.const 1036) ",") - (data (i32.const 1048) "\01\00\00\00\14\00\00\00=\00=\00 \00a\00r\00c\00h\00 \00=\00=") - (data (i32.const 1116) "<") - (data (i32.const 1128) "\01\00\00\00$\00\00\00U\00n\00p\00a\00i\00r\00e\00d\00 \00s\00u\00r\00r\00o\00g\00a\00t\00e") - (data (i32.const 1180) ",") - (data (i32.const 1192) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 1228) ",") - (data (i32.const 1240) "\01\00\00\00\0e\00\00\00S\00U\00C\00C\00E\00S\00S") - (data (i32.const 1276) "\1c") - (data (i32.const 1288) "\01\00\00\00\0c\00\00\00T\00O\00O\00B\00I\00G") - (data (i32.const 1308) "\1c") - (data (i32.const 1320) "\01\00\00\00\n\00\00\00A\00C\00C\00E\00S") - (data (i32.const 1340) ",") - (data (i32.const 1352) "\01\00\00\00\12\00\00\00A\00D\00D\00R\00I\00N\00U\00S\00E") - (data (i32.const 1388) ",") - (data (i32.const 1400) "\01\00\00\00\18\00\00\00A\00D\00D\00R\00N\00O\00T\00A\00V\00A\00I\00L") - (data (i32.const 1436) ",") - (data (i32.const 1448) "\01\00\00\00\16\00\00\00A\00F\00N\00O\00S\00U\00P\00P\00O\00R\00T") - (data (i32.const 1484) "\1c") - (data (i32.const 1496) "\01\00\00\00\n\00\00\00A\00G\00A\00I\00N") - (data (i32.const 1516) ",") - (data (i32.const 1528) "\01\00\00\00\0e\00\00\00A\00L\00R\00E\00A\00D\00Y") - (data (i32.const 1564) "\1c") - (data (i32.const 1576) "\01\00\00\00\08\00\00\00B\00A\00D\00F") - (data (i32.const 1596) "\1c") - (data (i32.const 1608) "\01\00\00\00\0c\00\00\00B\00A\00D\00M\00S\00G") - (data (i32.const 1628) "\1c") - (data (i32.const 1640) "\01\00\00\00\08\00\00\00B\00U\00S\00Y") - (data (i32.const 1660) ",") - (data (i32.const 1672) "\01\00\00\00\10\00\00\00C\00A\00N\00C\00E\00L\00E\00D") - (data (i32.const 1708) "\1c") - (data (i32.const 1720) "\01\00\00\00\n\00\00\00C\00H\00I\00L\00D") - (data (i32.const 1740) ",") - (data (i32.const 1752) "\01\00\00\00\16\00\00\00C\00O\00N\00N\00A\00B\00O\00R\00T\00E\00D") - (data (i32.const 1788) ",") - (data (i32.const 1800) "\01\00\00\00\16\00\00\00C\00O\00N\00N\00R\00E\00F\00U\00S\00E\00D") - (data (i32.const 1836) ",") - (data (i32.const 1848) "\01\00\00\00\12\00\00\00C\00O\00N\00N\00R\00E\00S\00E\00T") - (data (i32.const 1884) "\1c") - (data (i32.const 1896) "\01\00\00\00\0c\00\00\00D\00E\00A\00D\00L\00K") - (data (i32.const 1916) ",") - (data (i32.const 1928) "\01\00\00\00\16\00\00\00D\00E\00S\00T\00A\00D\00D\00R\00R\00E\00Q") - (data (i32.const 1964) "\1c") - (data (i32.const 1976) "\01\00\00\00\06\00\00\00D\00O\00M") - (data (i32.const 1996) "\1c") - (data (i32.const 2008) "\01\00\00\00\n\00\00\00D\00Q\00U\00O\00T") - (data (i32.const 2028) "\1c") - (data (i32.const 2040) "\01\00\00\00\n\00\00\00E\00X\00I\00S\00T") - (data (i32.const 2060) "\1c") - (data (i32.const 2072) "\01\00\00\00\n\00\00\00F\00A\00U\00L\00T") - (data (i32.const 2092) "\1c") - (data (i32.const 2104) "\01\00\00\00\08\00\00\00F\00B\00I\00G") - (data (i32.const 2124) ",") - (data (i32.const 2136) "\01\00\00\00\16\00\00\00H\00O\00S\00T\00U\00N\00R\00E\00A\00C\00H") - (data (i32.const 2172) "\1c") - (data (i32.const 2184) "\01\00\00\00\08\00\00\00I\00D\00R\00M") - (data (i32.const 2204) "\1c") - (data (i32.const 2216) "\01\00\00\00\n\00\00\00I\00L\00S\00E\00Q") - (data (i32.const 2236) ",") - (data (i32.const 2248) "\01\00\00\00\14\00\00\00I\00N\00P\00R\00O\00G\00R\00E\00S\00S") - (data (i32.const 2284) "\1c") - (data (i32.const 2296) "\01\00\00\00\08\00\00\00I\00N\00T\00R") - (data (i32.const 2316) "\1c") - (data (i32.const 2328) "\01\00\00\00\n\00\00\00I\00N\00V\00A\00L") - (data (i32.const 2348) "\1c") - (data (i32.const 2360) "\01\00\00\00\04\00\00\00I\00O") - (data (i32.const 2380) "\1c") - (data (i32.const 2392) "\01\00\00\00\0c\00\00\00I\00S\00C\00O\00N\00N") - (data (i32.const 2412) "\1c") - (data (i32.const 2424) "\01\00\00\00\n\00\00\00I\00S\00D\00I\00R") - (data (i32.const 2444) "\1c") - (data (i32.const 2456) "\01\00\00\00\08\00\00\00L\00O\00O\00P") - (data (i32.const 2476) "\1c") - (data (i32.const 2488) "\01\00\00\00\n\00\00\00M\00F\00I\00L\00E") - (data (i32.const 2508) "\1c") - (data (i32.const 2520) "\01\00\00\00\n\00\00\00M\00L\00I\00N\00K") - (data (i32.const 2540) ",") - (data (i32.const 2552) "\01\00\00\00\0e\00\00\00M\00S\00G\00S\00I\00Z\00E") - (data (i32.const 2588) ",") - (data (i32.const 2600) "\01\00\00\00\10\00\00\00M\00U\00L\00T\00I\00H\00O\00P") - (data (i32.const 2636) ",") - (data (i32.const 2648) "\01\00\00\00\16\00\00\00N\00A\00M\00E\00T\00O\00O\00L\00O\00N\00G") - (data (i32.const 2684) ",") - (data (i32.const 2696) "\01\00\00\00\0e\00\00\00N\00E\00T\00D\00O\00W\00N") - (data (i32.const 2732) ",") - (data (i32.const 2744) "\01\00\00\00\10\00\00\00N\00E\00T\00R\00E\00S\00E\00T") - (data (i32.const 2780) ",") - (data (i32.const 2792) "\01\00\00\00\14\00\00\00N\00E\00T\00U\00N\00R\00E\00A\00C\00H") - (data (i32.const 2828) "\1c") - (data (i32.const 2840) "\01\00\00\00\n\00\00\00N\00F\00I\00L\00E") - (data (i32.const 2860) "\1c") - (data (i32.const 2872) "\01\00\00\00\0c\00\00\00N\00O\00B\00U\00F\00S") - (data (i32.const 2892) "\1c") - (data (i32.const 2904) "\01\00\00\00\n\00\00\00N\00O\00D\00E\00V") - (data (i32.const 2924) "\1c") - (data (i32.const 2936) "\01\00\00\00\n\00\00\00N\00O\00E\00N\00T") - (data (i32.const 2956) "\1c") - (data (i32.const 2968) "\01\00\00\00\0c\00\00\00N\00O\00E\00X\00E\00C") - (data (i32.const 2988) "\1c") - (data (i32.const 3000) "\01\00\00\00\n\00\00\00N\00O\00L\00C\00K") - (data (i32.const 3020) "\1c") - (data (i32.const 3032) "\01\00\00\00\0c\00\00\00N\00O\00L\00I\00N\00K") - (data (i32.const 3052) "\1c") - (data (i32.const 3064) "\01\00\00\00\n\00\00\00N\00O\00M\00E\00M") - (data (i32.const 3084) "\1c") - (data (i32.const 3096) "\01\00\00\00\n\00\00\00N\00O\00M\00S\00G") - (data (i32.const 3116) ",") - (data (i32.const 3128) "\01\00\00\00\14\00\00\00N\00O\00P\00R\00O\00T\00O\00O\00P\00T") - (data (i32.const 3164) "\1c") - (data (i32.const 3176) "\01\00\00\00\n\00\00\00N\00O\00S\00P\00C") - (data (i32.const 3196) "\1c") - (data (i32.const 3208) "\01\00\00\00\n\00\00\00N\00O\00S\00Y\00S") - (data (i32.const 3228) ",") - (data (i32.const 3240) "\01\00\00\00\0e\00\00\00N\00O\00T\00C\00O\00N\00N") - (data (i32.const 3276) "\1c") - (data (i32.const 3288) "\01\00\00\00\0c\00\00\00N\00O\00T\00D\00I\00R") - (data (i32.const 3308) ",") - (data (i32.const 3320) "\01\00\00\00\10\00\00\00N\00O\00T\00E\00M\00P\00T\00Y") - (data (i32.const 3356) ",") - (data (i32.const 3368) "\01\00\00\00\1c\00\00\00N\00O\00T\00R\00E\00C\00O\00V\00E\00R\00A\00B\00L\00E") - (data (i32.const 3404) ",") - (data (i32.const 3416) "\01\00\00\00\0e\00\00\00N\00O\00T\00S\00O\00C\00K") - (data (i32.const 3452) "\1c") - (data (i32.const 3464) "\01\00\00\00\0c\00\00\00N\00O\00T\00S\00U\00P") - (data (i32.const 3484) "\1c") - (data (i32.const 3496) "\01\00\00\00\n\00\00\00N\00O\00T\00T\00Y") - (data (i32.const 3516) "\1c") - (data (i32.const 3528) "\01\00\00\00\08\00\00\00N\00X\00I\00O") - (data (i32.const 3548) ",") - (data (i32.const 3560) "\01\00\00\00\10\00\00\00O\00V\00E\00R\00F\00L\00O\00W") - (data (i32.const 3596) ",") - (data (i32.const 3608) "\01\00\00\00\12\00\00\00O\00W\00N\00E\00R\00D\00E\00A\00D") - (data (i32.const 3644) "\1c") - (data (i32.const 3656) "\01\00\00\00\08\00\00\00P\00E\00R\00M") - (data (i32.const 3676) "\1c") - (data (i32.const 3688) "\01\00\00\00\08\00\00\00P\00I\00P\00E") - (data (i32.const 3708) "\1c") - (data (i32.const 3720) "\01\00\00\00\n\00\00\00P\00R\00O\00T\00O") - (data (i32.const 3740) ",") - (data (i32.const 3752) "\01\00\00\00\1c\00\00\00P\00R\00O\00T\00O\00N\00O\00S\00U\00P\00P\00O\00R\00T") - (data (i32.const 3788) ",") - (data (i32.const 3800) "\01\00\00\00\12\00\00\00P\00R\00O\00T\00O\00T\00Y\00P\00E") - (data (i32.const 3836) "\1c") - (data (i32.const 3848) "\01\00\00\00\n\00\00\00R\00A\00N\00G\00E") - (data (i32.const 3868) "\1c") - (data (i32.const 3880) "\01\00\00\00\08\00\00\00R\00O\00F\00S") - (data (i32.const 3900) "\1c") - (data (i32.const 3912) "\01\00\00\00\n\00\00\00S\00P\00I\00P\00E") - (data (i32.const 3932) "\1c") - (data (i32.const 3944) "\01\00\00\00\08\00\00\00S\00R\00C\00H") - (data (i32.const 3964) "\1c") - (data (i32.const 3976) "\01\00\00\00\n\00\00\00S\00T\00A\00L\00E") - (data (i32.const 3996) ",") - (data (i32.const 4008) "\01\00\00\00\10\00\00\00T\00I\00M\00E\00D\00O\00U\00T") - (data (i32.const 4044) "\1c") - (data (i32.const 4056) "\01\00\00\00\0c\00\00\00T\00X\00T\00B\00S\00Y") - (data (i32.const 4076) "\1c") - (data (i32.const 4088) "\01\00\00\00\08\00\00\00X\00D\00E\00V") - (data (i32.const 4108) ",") - (data (i32.const 4120) "\01\00\00\00\14\00\00\00N\00O\00T\00C\00A\00P\00A\00B\00L\00E") - (data (i32.const 4156) ",") - (data (i32.const 4168) "\01\00\00\00\0e\00\00\00U\00N\00K\00N\00O\00W\00N") - (data (i32.const 4204) "<") - (data (i32.const 4216) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00p\00r\00o\00c\00e\00s\00s\00.\00t\00s") - (data (i32.const 4268) "<") - (data (i32.const 4280) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 4332) "<") - (data (i32.const 4344) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 4396) "\1c") - (data (i32.const 4408) "\01\00\00\00\02\00\00\00\n") - (data (i32.const 4428) "\1c") - (data (i32.const 4440) "\01\00\00\00\0c\00\00\00w\00a\00s\00m\003\002") - (data (i32.const 4460) ",") - (data (i32.const 4472) "\01\00\00\00\1c\00\00\00=\00=\00 \00p\00l\00a\00t\00f\00o\00r\00m\00 \00=\00=") - (data (i32.const 4508) "\1c") - (data (i32.const 4520) "\01\00\00\00\08\00\00\00w\00a\00s\00m") - (data (i32.const 4540) ",") - (data (i32.const 4552) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") - (data (i32.const 4588) ",") - (data (i32.const 4600) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 4636) "<") - (data (i32.const 4648) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") - (data (i32.const 4764) "<") - (data (i32.const 4776) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") - (data (i32.const 4828) ",") - (data (i32.const 4840) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 4908) ",") - (data (i32.const 4920) "\01\00\00\00\14\00\00\00=\00=\00 \00a\00r\00g\00v\00 \00=\00=") - (data (i32.const 4956) "|") - (data (i32.const 4968) "\01\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y") - (data (i32.const 5084) "<") - (data (i32.const 5096) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 5148) "\1c") - (data (i32.const 5160) "\01\00\00\00\02\00\00\00=") - (data (i32.const 5180) "\1c") - (data (i32.const 5192) "\01") - (data (i32.const 5212) ",") - (data (i32.const 5224) "\01\00\00\00\12\00\00\00=\00=\00 \00e\00n\00v\00 \00=\00=") - (data (i32.const 5260) "\1c") - (data (i32.const 5272) "\01\00\00\00\n\00\00\00k\00e\00y\00:\00 ") - (data (i32.const 5292) "\1c") - (data (i32.const 5304) "\01\00\00\00\n\00\00\00v\00a\00l\00:\00 ") - (data (i32.const 5324) "<") - (data (i32.const 5336) "\01\00\00\00$\00\00\00K\00e\00y\00 \00d\00o\00e\00s\00 \00n\00o\00t\00 \00e\00x\00i\00s\00t") - (data (i32.const 5388) ",") - (data (i32.const 5400) "\01\00\00\00\16\00\00\00~\00l\00i\00b\00/\00m\00a\00p\00.\00t\00s") - (data (i32.const 5436) ",") - (data (i32.const 5448) "\01\00\00\00\14\00\00\00=\00=\00 \00t\00i\00m\00e\00 \00=\00=") - (data (i32.const 5484) "|") - (data (i32.const 5496) "\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") - (data (i32.const 5612) "<") - (data (i32.const 5624) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") - (data (i32.const 5676) "\1c") - (data (i32.const 5688) "\01\00\00\00\02\00\00\000") + (data (i32.const 1036) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00=\00=\00 \00a\00r\00c\00h\00 \00=\00=") + (data (i32.const 1116) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00U\00n\00p\00a\00i\00r\00e\00d\00 \00s\00u\00r\00r\00o\00g\00a\00t\00e") + (data (i32.const 1180) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 1228) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00S\00U\00C\00C\00E\00S\00S") + (data (i32.const 1276) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00T\00O\00O\00B\00I\00G") + (data (i32.const 1308) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00A\00C\00C\00E\00S") + (data (i32.const 1340) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00A\00D\00D\00R\00I\00N\00U\00S\00E") + (data (i32.const 1388) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00A\00D\00D\00R\00N\00O\00T\00A\00V\00A\00I\00L") + (data (i32.const 1436) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00A\00F\00N\00O\00S\00U\00P\00P\00O\00R\00T") + (data (i32.const 1484) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00A\00G\00A\00I\00N") + (data (i32.const 1516) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00A\00L\00R\00E\00A\00D\00Y") + (data (i32.const 1564) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00B\00A\00D\00F") + (data (i32.const 1596) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00B\00A\00D\00M\00S\00G") + (data (i32.const 1628) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00B\00U\00S\00Y") + (data (i32.const 1660) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00C\00A\00N\00C\00E\00L\00E\00D") + (data (i32.const 1708) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00C\00H\00I\00L\00D") + (data (i32.const 1740) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00C\00O\00N\00N\00A\00B\00O\00R\00T\00E\00D") + (data (i32.const 1788) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00C\00O\00N\00N\00R\00E\00F\00U\00S\00E\00D") + (data (i32.const 1836) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00C\00O\00N\00N\00R\00E\00S\00E\00T") + (data (i32.const 1884) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00D\00E\00A\00D\00L\00K") + (data (i32.const 1916) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00D\00E\00S\00T\00A\00D\00D\00R\00R\00E\00Q") + (data (i32.const 1964) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00D\00O\00M") + (data (i32.const 1996) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00D\00Q\00U\00O\00T") + (data (i32.const 2028) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00E\00X\00I\00S\00T") + (data (i32.const 2060) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00F\00A\00U\00L\00T") + (data (i32.const 2092) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00F\00B\00I\00G") + (data (i32.const 2124) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00H\00O\00S\00T\00U\00N\00R\00E\00A\00C\00H") + (data (i32.const 2172) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00I\00D\00R\00M") + (data (i32.const 2204) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00I\00L\00S\00E\00Q") + (data (i32.const 2236) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00I\00N\00P\00R\00O\00G\00R\00E\00S\00S") + (data (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00I\00N\00T\00R") + (data (i32.const 2316) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00I\00N\00V\00A\00L") + (data (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00I\00O") + (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00I\00S\00C\00O\00N\00N") + (data (i32.const 2412) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00I\00S\00D\00I\00R") + (data (i32.const 2444) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00L\00O\00O\00P") + (data (i32.const 2476) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00M\00F\00I\00L\00E") + (data (i32.const 2508) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00M\00L\00I\00N\00K") + (data (i32.const 2540) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00M\00S\00G\00S\00I\00Z\00E") + (data (i32.const 2588) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00M\00U\00L\00T\00I\00H\00O\00P") + (data (i32.const 2636) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00N\00A\00M\00E\00T\00O\00O\00L\00O\00N\00G") + (data (i32.const 2684) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00N\00E\00T\00D\00O\00W\00N") + (data (i32.const 2732) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00N\00E\00T\00R\00E\00S\00E\00T") + (data (i32.const 2780) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00N\00E\00T\00U\00N\00R\00E\00A\00C\00H") + (data (i32.const 2828) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00F\00I\00L\00E") + (data (i32.const 2860) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00B\00U\00F\00S") + (data (i32.const 2892) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00D\00E\00V") + (data (i32.const 2924) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00E\00N\00T") + (data (i32.const 2956) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00E\00X\00E\00C") + (data (i32.const 2988) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00L\00C\00K") + (data (i32.const 3020) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00L\00I\00N\00K") + (data (i32.const 3052) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00M\00E\00M") + (data (i32.const 3084) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00M\00S\00G") + (data (i32.const 3116) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00N\00O\00P\00R\00O\00T\00O\00O\00P\00T") + (data (i32.const 3164) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00S\00P\00C") + (data (i32.const 3196) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00S\00Y\00S") + (data (i32.const 3228) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00N\00O\00T\00C\00O\00N\00N") + (data (i32.const 3276) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00T\00D\00I\00R") + (data (i32.const 3308) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00N\00O\00T\00E\00M\00P\00T\00Y") + (data (i32.const 3356) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00N\00O\00T\00R\00E\00C\00O\00V\00E\00R\00A\00B\00L\00E") + (data (i32.const 3404) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00N\00O\00T\00S\00O\00C\00K") + (data (i32.const 3452) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00N\00O\00T\00S\00U\00P") + (data (i32.const 3484) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00N\00O\00T\00T\00Y") + (data (i32.const 3516) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00N\00X\00I\00O") + (data (i32.const 3548) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00O\00V\00E\00R\00F\00L\00O\00W") + (data (i32.const 3596) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00O\00W\00N\00E\00R\00D\00E\00A\00D") + (data (i32.const 3644) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00P\00E\00R\00M") + (data (i32.const 3676) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00P\00I\00P\00E") + (data (i32.const 3708) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00P\00R\00O\00T\00O") + (data (i32.const 3740) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00P\00R\00O\00T\00O\00N\00O\00S\00U\00P\00P\00O\00R\00T") + (data (i32.const 3788) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00P\00R\00O\00T\00O\00T\00Y\00P\00E") + (data (i32.const 3836) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00R\00A\00N\00G\00E") + (data (i32.const 3868) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00R\00O\00F\00S") + (data (i32.const 3900) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00S\00P\00I\00P\00E") + (data (i32.const 3932) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00S\00R\00C\00H") + (data (i32.const 3964) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00S\00T\00A\00L\00E") + (data (i32.const 3996) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00T\00I\00M\00E\00D\00O\00U\00T") + (data (i32.const 4044) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00T\00X\00T\00B\00S\00Y") + (data (i32.const 4076) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00X\00D\00E\00V") + (data (i32.const 4108) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00N\00O\00T\00C\00A\00P\00A\00B\00L\00E") + (data (i32.const 4156) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00U\00N\00K\00N\00O\00W\00N") + (data (i32.const 4204) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00p\00r\00o\00c\00e\00s\00s\00.\00t\00s") + (data (i32.const 4268) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 4332) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 4396) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\n") + (data (i32.const 4428) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00w\00a\00s\00m\003\002") + (data (i32.const 4460) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00=\00=\00 \00p\00l\00a\00t\00f\00o\00r\00m\00 \00=\00=") + (data (i32.const 4508) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00w\00a\00s\00m") + (data (i32.const 4540) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") + (data (i32.const 4588) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 4636) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 4764) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data (i32.const 4828) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data (i32.const 4908) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00=\00=\00 \00a\00r\00g\00v\00 \00=\00=") + (data (i32.const 4956) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y") + (data (i32.const 5084) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 5148) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00=") + (data (i32.const 5180) "\1c\00\00\00\00\00\00\00\00\00\00\00\01") + (data (i32.const 5212) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00=\00=\00 \00e\00n\00v\00 \00=\00=") + (data (i32.const 5260) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00k\00e\00y\00:\00 ") + (data (i32.const 5292) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00a\00l\00:\00 ") + (data (i32.const 5324) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00K\00e\00y\00 \00d\00o\00e\00s\00 \00n\00o\00t\00 \00e\00x\00i\00s\00t") + (data (i32.const 5388) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00~\00l\00i\00b\00/\00m\00a\00p\00.\00t\00s") + (data (i32.const 5436) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00=\00=\00 \00t\00i\00m\00e\00 \00=\00=") + (data (i32.const 5484) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") + (data (i32.const 5612) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") + (data (i32.const 5676) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\000") (data (i32.const 5708) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 6108) "\1c\04") - (data (i32.const 6120) "\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") - (data (i32.const 7164) "\\") - (data (i32.const 7176) "\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") - (data (i32.const 7260) ",") - (data (i32.const 7272) "\01\00\00\00\18\00\00\00=\00=\00 \00h\00r\00t\00i\00m\00e\00 \00=\00=") - (data (i32.const 7308) ",") - (data (i32.const 7320) "\01\00\00\00\14\00\00\00=\00=\00 \00e\00x\00i\00t\00 \00=\00=") - (data (i32.const 7360) "\05\00\00\00 \00\00\00\00\00\00\00 ") - (data (i32.const 7388) "\02A\00\00\00\00\00\00\10A\82") + (data (i32.const 6108) "\1c\04\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") + (data (i32.const 7164) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") + (data (i32.const 7260) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00=\00=\00 \00h\00r\00t\00i\00m\00e\00 \00=\00=") + (data (i32.const 7308) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00=\00=\00 \00e\00x\00i\00t\00 \00=\00=") + (data (i32.const 7360) "\05\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02A\00\00\00\00\00\00\10A\82") (export "memory" (memory $0)) (export "_start" (func $~start)) (func $~lib/string/String.UTF8.encodeUnsafe@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -2718,1055 +2606,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end + local.tee $1 + i32.const 0 local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end + memory.fill + local.get $1 ) (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -3803,7 +2647,7 @@ local.get $1 i32.gt_u select - call $~lib/memory/memory.copy + memory.copy local.get $2 ) (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) @@ -6275,7 +5119,7 @@ local.get $4 i32.add local.get $3 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/tests/compiler/std-wasi/process.untouched.wat b/tests/compiler/std-wasi/process.untouched.wat index 81f1a8ac88..3b8c085871 100644 --- a/tests/compiler/std-wasi/process.untouched.wat +++ b/tests/compiler/std-wasi/process.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i64_i32_=>_i32 (func (param i64 i32) (result i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) @@ -43,10 +43,10 @@ (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0)) (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/process/process.argv (mut i32) (i32.const 0)) (global $std-wasi/process/argv (mut i32) (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) (global $~lib/process/process.env (mut i32) (i32.const 0)) (global $std-wasi/process/env (mut i32) (i32.const 0)) @@ -3637,237 +3637,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -3917,7 +3686,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) @@ -4012,1259 +3781,6 @@ local.get $1 i32.store offset=12 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -5307,7 +3823,7 @@ local.get $5 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy local.get $3 ) (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) @@ -8441,7 +6957,7 @@ local.get $8 i32.add local.get $10 - call $~lib/memory/memory.copy + memory.copy local.get $11 local.set $12 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 9aab5d7646..7a54e44aa8 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1587,182 +1587,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 3706c2da8b..919a120f91 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) @@ -28,7 +28,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $std/array-literal/dynamicArrayI8 (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayI32 (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayRef (mut i32) (i32.const 0)) @@ -2139,237 +2138,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2419,1262 +2187,9 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 @@ -3686,7 +2201,7 @@ local.get $3 local.get $2 local.get $0 - call $~lib/memory/memory.copy + memory.copy end local.get $3 ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 3c5903b3fa..5249f6908c 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -54,570 +54,290 @@ (global $~lib/memory/__stack_pointer (mut i32) (i32.const 32036)) (global $~started (mut i32) (i32.const 0)) (memory $0 1) - (data (i32.const 1036) ",") - (data (i32.const 1048) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") - (data (i32.const 1084) ",") - (data (i32.const 1096) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1132) "<") - (data (i32.const 1144) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1196) "<") - (data (i32.const 1208) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") - (data (i32.const 1324) "<") - (data (i32.const 1336) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") - (data (i32.const 1388) ",") - (data (i32.const 1400) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 1468) "<") - (data (i32.const 1480) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 1532) ",") - (data (i32.const 1544) "\01\00\00\00\18\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1580) "<") - (data (i32.const 1592) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 1644) "\1c") - (data (i32.const 1656) "\01\00\00\00\06\00\00\00a\00b\00c") - (data (i32.const 1676) "\1c") - (data (i32.const 1692) "\05\00\00\00\01\02\03\04\05") - (data (i32.const 1708) "\1c") - (data (i32.const 1724) "\05\00\00\00\01\01\01\04\05") - (data (i32.const 1740) "\1c") - (data (i32.const 1756) "\05") - (data (i32.const 1772) "\1c") - (data (i32.const 1788) "\05\00\00\00\01\01") - (data (i32.const 1804) "\1c") - (data (i32.const 1820) "\05\00\00\00\01\01\00\02\02") - (data (i32.const 1836) "\1c") - (data (i32.const 1852) "\05\00\00\00\01\01\00\02\02") - (data (i32.const 1868) ",") - (data (i32.const 1884) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1916) ",") - (data (i32.const 1932) "\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 1964) ",") - (data (i32.const 1980) "\14") - (data (i32.const 2012) ",") - (data (i32.const 2028) "\14\00\00\00\01\00\00\00\01") - (data (i32.const 2060) ",") - (data (i32.const 2076) "\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 2108) ",") - (data (i32.const 2124) "\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 2156) ",") - (data (i32.const 2168) "\01\00\00\00\1c\00\00\00A\00r\00r\00a\00y\00 \00i\00s\00 \00e\00m\00p\00t\00y") - (data (i32.const 2204) ",") - (data (i32.const 2220) "\10\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04") + (data (i32.const 1036) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") + (data (i32.const 1084) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1132) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 1196) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 1324) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data (i32.const 1388) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data (i32.const 1468) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 1532) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1580) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 1644) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00b\00c") + (data (i32.const 1676) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\01\02\03\04\05") + (data (i32.const 1708) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\01\01\01\04\05") + (data (i32.const 1740) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\05") + (data (i32.const 1772) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\01\01") + (data (i32.const 1804) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 1836) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 1868) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1916) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") + (data (i32.const 1964) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14") + (data (i32.const 2012) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\01") + (data (i32.const 2060) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 2108) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 2156) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00A\00r\00r\00a\00y\00 \00i\00s\00 \00e\00m\00p\00t\00y") + (data (i32.const 2204) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04") (data (i32.const 2252) "\1c") (data (i32.const 2284) "\1c") - (data (i32.const 2316) ",") - (data (i32.const 2332) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2364) ",") - (data (i32.const 2380) "\14\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2412) ",") - (data (i32.const 2428) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2460) ",") - (data (i32.const 2476) "\14\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05") - (data (i32.const 2508) ",") - (data (i32.const 2524) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2556) ",") - (data (i32.const 2572) "\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 2604) ",") - (data (i32.const 2620) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2652) ",") - (data (i32.const 2668) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2700) ",") - (data (i32.const 2716) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2748) ",") - (data (i32.const 2764) "\14\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2796) ",") - (data (i32.const 2812) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2844) ",") - (data (i32.const 2860) "\14\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2892) ",") - (data (i32.const 2908) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2940) ",") - (data (i32.const 2956) "\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 2988) ",") - (data (i32.const 3004) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 3036) ",") - (data (i32.const 3052) "\14\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 3084) ",") - (data (i32.const 3100) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 3132) ",") - (data (i32.const 3148) "\14\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 3180) ",") - (data (i32.const 3196) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 3228) ",") - (data (i32.const 3244) "\14\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 3276) ",") - (data (i32.const 3292) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 3324) ",") - (data (i32.const 3340) "\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 3372) ",") - (data (i32.const 3388) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 3420) ",") - (data (i32.const 3436) "\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 3468) ",") - (data (i32.const 3484) "\14\00\00\00\03\00\00\00\05\00\00\00\07\00\00\00\t\00\00\00\0b") - (data (i32.const 3516) "\1c") - (data (i32.const 3532) "\0c\00\00\00\07\00\00\00\t\00\00\00\0b") - (data (i32.const 3548) "\1c") - (data (i32.const 3564) "\08\00\00\00\07\00\00\00\t") - (data (i32.const 3580) ",") - (data (i32.const 3596) "\10\00\00\00\05\00\00\00\07\00\00\00\t\00\00\00\0b") - (data (i32.const 3628) "\1c") - (data (i32.const 3644) "\08\00\00\00\t\00\00\00\0b") - (data (i32.const 3660) "\1c") - (data (i32.const 3676) "\08\00\00\00\07\00\00\00\t") - (data (i32.const 3692) "\1c") - (data (i32.const 3708) "\08\00\00\00\07\00\00\00\t") - (data (i32.const 3724) "\1c") - (data (i32.const 3740) "\04\00\00\00\00\01\02\03") - (data (i32.const 3756) "\1c") - (data (i32.const 3772) "\08\00\00\00\00\01\02\03\04\05\06\07") - (data (i32.const 3788) ",") - (data (i32.const 3804) "\11\00\00\00\00\01\02\03\04\05\06\07\08\t\n\0b\0c\0d\0e\0f\10") - (data (i32.const 3836) ",") - (data (i32.const 3852) "\0e\00\00\00\00\00\01\00\02\00\03\00\04\00\05\00\06") - (data (i32.const 3884) ",") - (data (i32.const 3900) "\10\00\00\00\00\00\01\00\02\00\03\00\04\00\05\00\06\00\07") - (data (i32.const 3932) ",") - (data (i32.const 3948) "\12\00\00\00\00\00\01\00\02\00\03\00\04\00\05\00\06\00\07\00\08") - (data (i32.const 3980) "\1c") - (data (i32.const 3996) "\04\00\00\00\00\00\c0\7f") - (data (i32.const 4012) "\1c") - (data (i32.const 4028) "\08") - (data (i32.const 4038) "\f8\7f") - (data (i32.const 4044) ",") - (data (i32.const 4060) "\10\00\00\00\02\00\00\00\05\00\00\00\t\00\00\00\02") - (data (i32.const 4092) "\1c") - (data (i32.const 4108) "\04\00\00\00\00\00\c0\7f") - (data (i32.const 4124) "\1c") - (data (i32.const 4140) "\08") - (data (i32.const 4150) "\f8\7f") - (data (i32.const 4156) ",") - (data (i32.const 4172) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 4204) ",") - (data (i32.const 4220) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2316) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2364) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2412) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2460) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05") + (data (i32.const 2508) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2556) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") + (data (i32.const 2604) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2652) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2700) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2748) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2796) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2844) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2892) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2940) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") + (data (i32.const 2988) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 3036) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 3084) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 3132) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 3180) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 3228) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 3276) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 3324) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") + (data (i32.const 3372) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 3420) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") + (data (i32.const 3468) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\03\00\00\00\05\00\00\00\07\00\00\00\t\00\00\00\0b") + (data (i32.const 3516) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\07\00\00\00\t\00\00\00\0b") + (data (i32.const 3548) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\07\00\00\00\t") + (data (i32.const 3580) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\05\00\00\00\07\00\00\00\t\00\00\00\0b") + (data (i32.const 3628) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\t\00\00\00\0b") + (data (i32.const 3660) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\07\00\00\00\t") + (data (i32.const 3692) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\07\00\00\00\t") + (data (i32.const 3724) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\00\01\02\03") + (data (i32.const 3756) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\00\01\02\03\04\05\06\07") + (data (i32.const 3788) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\00\01\02\03\04\05\06\07\08\t\n\0b\0c\0d\0e\0f\10") + (data (i32.const 3836) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\00\00\01\00\02\00\03\00\04\00\05\00\06") + (data (i32.const 3884) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\00\00\01\00\02\00\03\00\04\00\05\00\06\00\07") + (data (i32.const 3932) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\00\00\01\00\02\00\03\00\04\00\05\00\06\00\07\00\08") + (data (i32.const 3980) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\00\00\c0\7f") + (data (i32.const 4012) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\00\00\f8\7f") + (data (i32.const 4044) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\02\00\00\00\05\00\00\00\t\00\00\00\02") + (data (i32.const 4092) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\00\00\c0\7f") + (data (i32.const 4124) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\00\00\f8\7f") + (data (i32.const 4156) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 4204) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") (data (i32.const 4252) "\1c") - (data (i32.const 4284) ",") - (data (i32.const 4300) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 4284) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") (data (i32.const 4332) "\1c") - (data (i32.const 4364) ",") - (data (i32.const 4380) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 4412) ",") - (data (i32.const 4428) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 4460) "\1c") - (data (i32.const 4476) "\0c\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 4492) "\1c") - (data (i32.const 4508) "\08\00\00\00\01\00\00\00\02") - (data (i32.const 4524) ",") - (data (i32.const 4540) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 4572) "\1c") - (data (i32.const 4588) "\08\00\00\00\03\00\00\00\04") - (data (i32.const 4604) "\1c") - (data (i32.const 4620) "\0c\00\00\00\01\00\00\00\02\00\00\00\05") - (data (i32.const 4636) ",") - (data (i32.const 4652) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 4684) "\1c") - (data (i32.const 4700) "\04\00\00\00\01") - (data (i32.const 4716) ",") - (data (i32.const 4732) "\10\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 4764) ",") - (data (i32.const 4780) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 4812) "\1c") - (data (i32.const 4828) "\04\00\00\00\05") - (data (i32.const 4844) ",") - (data (i32.const 4860) "\10\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04") - (data (i32.const 4892) ",") - (data (i32.const 4908) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 4940) "\1c") - (data (i32.const 4956) "\08\00\00\00\04\00\00\00\05") - (data (i32.const 4972) "\1c") - (data (i32.const 4988) "\0c\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 5004) ",") - (data (i32.const 5020) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 5052) "\1c") - (data (i32.const 5068) "\04\00\00\00\04") - (data (i32.const 5084) ",") - (data (i32.const 5100) "\10\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05") - (data (i32.const 5132) ",") - (data (i32.const 5148) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 5180) "\1c") - (data (i32.const 5196) "\04\00\00\00\01") - (data (i32.const 5212) ",") - (data (i32.const 5228) "\10\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 5260) ",") - (data (i32.const 5276) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 4364) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 4412) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 4460) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 4492) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\01\00\00\00\02") + (data (i32.const 4524) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 4572) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\03\00\00\00\04") + (data (i32.const 4604) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\05") + (data (i32.const 4636) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 4684) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\01") + (data (i32.const 4716) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 4764) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 4812) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05") + (data (i32.const 4844) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04") + (data (i32.const 4892) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 4940) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\04\00\00\00\05") + (data (i32.const 4972) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 5004) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 5052) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\04") + (data (i32.const 5084) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05") + (data (i32.const 5132) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 5180) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\01") + (data (i32.const 5212) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 5260) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") (data (i32.const 5308) "\1c") - (data (i32.const 5340) ",") - (data (i32.const 5356) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 5388) ",") - (data (i32.const 5404) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 5340) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 5388) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") (data (i32.const 5436) "\1c") - (data (i32.const 5468) ",") - (data (i32.const 5484) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 5516) ",") - (data (i32.const 5532) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 5468) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 5516) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") (data (i32.const 5564) "\1c") - (data (i32.const 5596) ",") - (data (i32.const 5612) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 5644) ",") - (data (i32.const 5660) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 5596) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 5644) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") (data (i32.const 5692) "\1c") - (data (i32.const 5724) ",") - (data (i32.const 5740) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 5772) ",") - (data (i32.const 5788) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 5724) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 5772) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") (data (i32.const 5820) "\1c") - (data (i32.const 5852) ",") - (data (i32.const 5868) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 5852) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") (data (i32.const 5900) "\1c") - (data (i32.const 5932) "|") - (data (i32.const 5944) "\01\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y") - (data (i32.const 6060) "<") - (data (i32.const 6072) "\01\00\00\00\1e\00\00\00u\00n\00e\00x\00p\00e\00c\00t\00e\00d\00 \00n\00u\00l\00l") - (data (i32.const 6124) "\1c") - (data (i32.const 6136) "\0d\00\00\00\08\00\00\00\01") - (data (i32.const 6156) "\1c") - (data (i32.const 6168) "\0d\00\00\00\08\00\00\00\02") - (data (i32.const 6188) "\1c") - (data (i32.const 6200) "\0d\00\00\00\08\00\00\00\03") - (data (i32.const 6220) "\1c") - (data (i32.const 6232) "\0d\00\00\00\08\00\00\00\04") - (data (i32.const 6252) "\1c") - (data (i32.const 6264) "\0d\00\00\00\08\00\00\00\05") - (data (i32.const 6284) "\1c") - (data (i32.const 6296) "\0d\00\00\00\08\00\00\00\06") - (data (i32.const 6316) ",") - (data (i32.const 6332) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 6364) "\1c") - (data (i32.const 6376) "\0d\00\00\00\08\00\00\00\07") - (data (i32.const 6396) "\1c") - (data (i32.const 6408) "\0d\00\00\00\08\00\00\00\08") - (data (i32.const 6428) "\1c") - (data (i32.const 6440) "\0d\00\00\00\08\00\00\00\t") - (data (i32.const 6460) "\1c") - (data (i32.const 6472) "\0d\00\00\00\08\00\00\00\n") - (data (i32.const 6492) "\1c") - (data (i32.const 6504) "\0d\00\00\00\08\00\00\00\0b") - (data (i32.const 6524) "\1c") - (data (i32.const 6536) "\0d\00\00\00\08\00\00\00\0c") - (data (i32.const 6556) "\1c") - (data (i32.const 6568) "\0d\00\00\00\08\00\00\00\0d") - (data (i32.const 6588) "\1c") - (data (i32.const 6600) "\0d\00\00\00\08\00\00\00\0e") - (data (i32.const 6620) "\1c") - (data (i32.const 6632) "\0d\00\00\00\08\00\00\00\0f") - (data (i32.const 6652) "\1c") - (data (i32.const 6664) "\0d\00\00\00\08\00\00\00\10") - (data (i32.const 6684) "\1c") - (data (i32.const 6696) "\0d\00\00\00\08\00\00\00\11") - (data (i32.const 6716) "\1c") - (data (i32.const 6728) "\0d\00\00\00\08\00\00\00\12") - (data (i32.const 6748) "\1c") - (data (i32.const 6760) "\0d\00\00\00\08\00\00\00\13") - (data (i32.const 6780) "\1c") - (data (i32.const 6792) "\0d\00\00\00\08\00\00\00\14") - (data (i32.const 6812) "\1c") - (data (i32.const 6824) "\0e\00\00\00\08\00\00\00\15") - (data (i32.const 6844) "\1c") - (data (i32.const 6856) "\0e\00\00\00\08\00\00\00\16") - (data (i32.const 6876) "\1c") - (data (i32.const 6888) "\0e\00\00\00\08\00\00\00\17") - (data (i32.const 6908) "\1c") - (data (i32.const 6920) "\0e\00\00\00\08\00\00\00\18") - (data (i32.const 6940) "\1c") - (data (i32.const 6952) "\0e\00\00\00\08\00\00\00\19") - (data (i32.const 6972) "\1c") - (data (i32.const 6984) "\0f\00\00\00\08\00\00\00\1a") - (data (i32.const 7004) "\1c") - (data (i32.const 7016) "\10\00\00\00\08\00\00\00\1b") - (data (i32.const 7036) "\1c") - (data (i32.const 7048) "\10\00\00\00\08\00\00\00\1c") - (data (i32.const 7068) "\1c") - (data (i32.const 7080) "\10\00\00\00\08\00\00\00\1d") - (data (i32.const 7100) "\1c") - (data (i32.const 7112) "\0d\00\00\00\08\00\00\00\1e") - (data (i32.const 7132) "\1c") - (data (i32.const 7144) "\0d\00\00\00\08\00\00\00\1f") - (data (i32.const 7164) "\1c") - (data (i32.const 7176) "\0d\00\00\00\08\00\00\00 ") - (data (i32.const 7196) "\1c") - (data (i32.const 7208) "\0d\00\00\00\08\00\00\00!") - (data (i32.const 7228) "\1c") - (data (i32.const 7240) "\11\00\00\00\08\00\00\00\"") - (data (i32.const 7260) "\1c") - (data (i32.const 7272) "\11\00\00\00\08\00\00\00#") - (data (i32.const 7292) "\1c") - (data (i32.const 7304) "\12\00\00\00\08\00\00\00$") - (data (i32.const 7324) "\1c") - (data (i32.const 7336) "\12\00\00\00\08\00\00\00%") - (data (i32.const 7356) "\1c") - (data (i32.const 7368) "\11\00\00\00\08\00\00\00&") - (data (i32.const 7388) "\1c") - (data (i32.const 7400) "\11\00\00\00\08\00\00\00\'") - (data (i32.const 7420) "\1c") - (data (i32.const 7432) "\11\00\00\00\08\00\00\00(") - (data (i32.const 7452) "\1c") - (data (i32.const 7464) "\11\00\00\00\08\00\00\00)") - (data (i32.const 7484) "\1c") - (data (i32.const 7496) "\11\00\00\00\08\00\00\00*") - (data (i32.const 7516) "\1c") - (data (i32.const 7528) "\12\00\00\00\08\00\00\00+") - (data (i32.const 7548) "\1c") - (data (i32.const 7560) "\12\00\00\00\08\00\00\00,") - (data (i32.const 7580) "\1c") - (data (i32.const 7592) "\11\00\00\00\08\00\00\00-") - (data (i32.const 7612) "\1c") - (data (i32.const 7624) "\11\00\00\00\08\00\00\00.") - (data (i32.const 7644) "\1c") - (data (i32.const 7656) "\11\00\00\00\08\00\00\00/") - (data (i32.const 7676) "\bc") - (data (i32.const 7688) "\01\00\00\00\ac\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?") - (data (i32.const 7868) "\1c") - (data (i32.const 7884) "\0c\00\00\00\00\00\00@\00\00\80\bf") - (data (i32.const 7900) "\1c") - (data (i32.const 7912) "\15\00\00\00\08\00\00\000") - (data (i32.const 7932) "\1c") - (data (i32.const 7948) "\0c\00\00\00\00\00\80\bf\00\00\00\00\00\00\00@") - (data (i32.const 7964) "<") - (data (i32.const 7980) " \00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 8028) "<") - (data (i32.const 8044) " \00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") - (data (i32.const 8092) "\\") - (data (i32.const 8108) "@") - (data (i32.const 8118) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") - (data (i32.const 8158) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 8188) "\1c") - (data (i32.const 8200) "\16\00\00\00\08\00\00\001") - (data (i32.const 8220) "\\") - (data (i32.const 8236) "@") - (data (i32.const 8246) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") - (data (i32.const 8278) "\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") - (data (i32.const 8316) ",") - (data (i32.const 8332) "\14\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") - (data (i32.const 8364) "\1c") - (data (i32.const 8376) "\17\00\00\00\08\00\00\002") - (data (i32.const 8396) ",") - (data (i32.const 8412) "\14\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") - (data (i32.const 8444) ",") - (data (i32.const 8460) "\14\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") - (data (i32.const 8492) "\1c") - (data (i32.const 8504) "\18\00\00\00\08\00\00\003") - (data (i32.const 8524) ",") - (data (i32.const 8540) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 5932) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y") + (data (i32.const 6060) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00u\00n\00e\00x\00p\00e\00c\00t\00e\00d\00 \00n\00u\00l\00l") + (data (i32.const 6124) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\01") + (data (i32.const 6156) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\02") + (data (i32.const 6188) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\03") + (data (i32.const 6220) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\04") + (data (i32.const 6252) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\05") + (data (i32.const 6284) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\06") + (data (i32.const 6316) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 6364) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\07") + (data (i32.const 6396) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\08") + (data (i32.const 6428) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\t") + (data (i32.const 6460) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\n") + (data (i32.const 6492) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\0b") + (data (i32.const 6524) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\0c") + (data (i32.const 6556) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\0d") + (data (i32.const 6588) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\0e") + (data (i32.const 6620) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\0f") + (data (i32.const 6652) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\10") + (data (i32.const 6684) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\11") + (data (i32.const 6716) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\12") + (data (i32.const 6748) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\13") + (data (i32.const 6780) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\14") + (data (i32.const 6812) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\15") + (data (i32.const 6844) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\16") + (data (i32.const 6876) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\17") + (data (i32.const 6908) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\18") + (data (i32.const 6940) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\19") + (data (i32.const 6972) "\1c\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\08\00\00\00\1a") + (data (i32.const 7004) "\1c\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\08\00\00\00\1b") + (data (i32.const 7036) "\1c\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\08\00\00\00\1c") + (data (i32.const 7068) "\1c\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\08\00\00\00\1d") + (data (i32.const 7100) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\1e") + (data (i32.const 7132) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\1f") + (data (i32.const 7164) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00 ") + (data (i32.const 7196) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00!") + (data (i32.const 7228) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00\"") + (data (i32.const 7260) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00#") + (data (i32.const 7292) "\1c\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\08\00\00\00$") + (data (i32.const 7324) "\1c\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\08\00\00\00%") + (data (i32.const 7356) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00&") + (data (i32.const 7388) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00\'") + (data (i32.const 7420) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00(") + (data (i32.const 7452) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00)") + (data (i32.const 7484) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00*") + (data (i32.const 7516) "\1c\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\08\00\00\00+") + (data (i32.const 7548) "\1c\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\08\00\00\00,") + (data (i32.const 7580) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00-") + (data (i32.const 7612) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00.") + (data (i32.const 7644) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00/") + (data (i32.const 7676) "\bc\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\ac\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?") + (data (i32.const 7868) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\00\00@\00\00\80\bf") + (data (i32.const 7900) "\1c\00\00\00\00\00\00\00\00\00\00\00\15\00\00\00\08\00\00\000") + (data (i32.const 7932) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\00\80\bf\00\00\00\00\00\00\00@") + (data (i32.const 7964) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") + (data (i32.const 8028) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") + (data (i32.const 8092) "\\\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00@\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") + (data (i32.const 8188) "\1c\00\00\00\00\00\00\00\00\00\00\00\16\00\00\00\08\00\00\001") + (data (i32.const 8220) "\\\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00@\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") + (data (i32.const 8316) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") + (data (i32.const 8364) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\002") + (data (i32.const 8396) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") + (data (i32.const 8444) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") + (data (i32.const 8492) "\1c\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\08\00\00\003") + (data (i32.const 8524) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") (data (i32.const 8572) "\1c") - (data (i32.const 8604) "\1c") - (data (i32.const 8620) "\04\00\00\00\01") - (data (i32.const 8636) "\1c") - (data (i32.const 8652) "\08\00\00\00\02\00\00\00\01") - (data (i32.const 8668) ",") - (data (i32.const 8684) "\10\00\00\00\03\00\00\00\02\00\00\00\01") - (data (i32.const 8716) ",") - (data (i32.const 8732) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 8764) "\1c") - (data (i32.const 8776) "\17\00\00\00\08\00\00\004") - (data (i32.const 8796) "\1c") - (data (i32.const 8812) "\04\00\00\00\01") - (data (i32.const 8828) "\1c") - (data (i32.const 8844) "\08\00\00\00\01\00\00\00\02") - (data (i32.const 8860) "\1c") - (data (i32.const 8872) "\19\00\00\00\08\00\00\005") - (data (i32.const 8892) "\1c") - (data (i32.const 8904) "\17\00\00\00\08\00\00\006") - (data (i32.const 8924) "\1c") - (data (i32.const 8936) "\17\00\00\00\08\00\00\007") - (data (i32.const 8956) "\1c") - (data (i32.const 8968) "\17\00\00\00\08\00\00\008") - (data (i32.const 8988) "\1c") - (data (i32.const 9000) "\17\00\00\00\08\00\00\009") - (data (i32.const 9020) "\1c") - (data (i32.const 9032) "\1b\00\00\00\08\00\00\00:") - (data (i32.const 9052) "\1c") - (data (i32.const 9064) "\1e\00\00\00\08\00\00\00;") - (data (i32.const 9084) "\1c") - (data (i32.const 9096) "\01\00\00\00\02\00\00\00a") - (data (i32.const 9116) "\1c") - (data (i32.const 9128) "\01\00\00\00\02\00\00\00b") - (data (i32.const 9148) "\1c") - (data (i32.const 9160) "\01\00\00\00\04\00\00\00a\00b") - (data (i32.const 9180) "\1c") - (data (i32.const 9192) "\01\00\00\00\04\00\00\00b\00a") - (data (i32.const 9212) "\1c") - (data (i32.const 9224) "\01") - (data (i32.const 9244) ",") - (data (i32.const 9260) "\1c\00\00\00\90#\00\00\b0#\00\00\90#\00\00\d0#\00\00\f0#\00\00\10$") - (data (i32.const 9292) ",") - (data (i32.const 9308) "\1c\00\00\00\10$\00\00\90#\00\00\90#\00\00\d0#\00\00\b0#\00\00\f0#") - (data (i32.const 9340) "\1c") - (data (i32.const 9352) " \00\00\00\08\00\00\00<") - (data (i32.const 9372) "\1c") - (data (i32.const 9384) "\"\00\00\00\08\00\00\00=") - (data (i32.const 9404) "\1c") - (data (i32.const 9420) "\02\00\00\00\01") - (data (i32.const 9436) "\1c") - (data (i32.const 9448) "\01\00\00\00\08\00\00\00t\00r\00u\00e") - (data (i32.const 9468) "\1c") - (data (i32.const 9480) "\01\00\00\00\n\00\00\00f\00a\00l\00s\00e") - (data (i32.const 9500) "\1c") - (data (i32.const 9512) "\01\00\00\00\02\00\00\00,") - (data (i32.const 9532) ",") - (data (i32.const 9544) "\01\00\00\00\14\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e") - (data (i32.const 9580) "\1c") - (data (i32.const 9596) "\0c\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 9612) "|") - (data (i32.const 9624) "\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") - (data (i32.const 9740) "<") - (data (i32.const 9752) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") - (data (i32.const 9804) "\1c") - (data (i32.const 9816) "\01\00\00\00\02\00\00\000") + (data (i32.const 8604) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\01") + (data (i32.const 8636) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\02\00\00\00\01") + (data (i32.const 8668) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\03\00\00\00\02\00\00\00\01") + (data (i32.const 8716) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 8764) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\004") + (data (i32.const 8796) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\01") + (data (i32.const 8828) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\01\00\00\00\02") + (data (i32.const 8860) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\005") + (data (i32.const 8892) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\006") + (data (i32.const 8924) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\007") + (data (i32.const 8956) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\008") + (data (i32.const 8988) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\009") + (data (i32.const 9020) "\1c\00\00\00\00\00\00\00\00\00\00\00\1b\00\00\00\08\00\00\00:") + (data (i32.const 9052) "\1c\00\00\00\00\00\00\00\00\00\00\00\1e\00\00\00\08\00\00\00;") + (data (i32.const 9084) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a") + (data (i32.const 9116) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00b") + (data (i32.const 9148) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00a\00b") + (data (i32.const 9180) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00b\00a") + (data (i32.const 9212) "\1c\00\00\00\00\00\00\00\00\00\00\00\01") + (data (i32.const 9244) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\1c\00\00\00\90#\00\00\b0#\00\00\90#\00\00\d0#\00\00\f0#\00\00\10$") + (data (i32.const 9292) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\1c\00\00\00\10$\00\00\90#\00\00\90#\00\00\d0#\00\00\b0#\00\00\f0#") + (data (i32.const 9340) "\1c\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\08\00\00\00<") + (data (i32.const 9372) "\1c\00\00\00\00\00\00\00\00\00\00\00\"\00\00\00\08\00\00\00=") + (data (i32.const 9404) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\01") + (data (i32.const 9436) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00t\00r\00u\00e") + (data (i32.const 9468) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00f\00a\00l\00s\00e") + (data (i32.const 9500) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00,") + (data (i32.const 9532) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e") + (data (i32.const 9580) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 9612) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") + (data (i32.const 9740) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") + (data (i32.const 9804) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\000") (data (i32.const 9836) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 10236) "\1c\04") - (data (i32.const 10248) "\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") - (data (i32.const 11292) "\\") - (data (i32.const 11304) "\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") - (data (i32.const 11388) "\1c") - (data (i32.const 11400) "\01\00\00\00\n\00\00\001\00-\002\00-\003") - (data (i32.const 11420) "\1c") - (data (i32.const 11436) "\0c\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 11452) "\1c") - (data (i32.const 11464) "\01\00\00\00\02\00\00\00-") - (data (i32.const 11484) "\1c") - (data (i32.const 11500) "\08\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 11516) "\1c") - (data (i32.const 11528) "\01\00\00\00\04\00\00\00_\00_") - (data (i32.const 11548) "L") - (data (i32.const 11560) "\01\00\00\000\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 11628) "L") - (data (i32.const 11644) "0") - (data (i32.const 11662) "\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") - (data (i32.const 11708) "\1c") - (data (i32.const 11720) "\01\00\00\00\04\00\00\00,\00 ") - (data (i32.const 11740) "\1c") - (data (i32.const 11752) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 11772) "\1c") - (data (i32.const 11784) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 11804) ",") - (data (i32.const 11816) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 11852) ",") - (data (i32.const 11864) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 10236) "\1c\04\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") + (data (i32.const 11292) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") + (data (i32.const 11388) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\001\00-\002\00-\003") + (data (i32.const 11420) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 11452) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00-") + (data (i32.const 11484) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 11516) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00_\00_") + (data (i32.const 11548) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\000\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008") + (data (i32.const 11628) "L\00\00\00\00\00\00\00\00\00\00\00\00\00\00\000\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") + (data (i32.const 11708) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00,\00 ") + (data (i32.const 11740) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000") + (data (i32.const 11772) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N") + (data (i32.const 11804) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 11852) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 11960) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\00\00\00[\00o\00b\00j\00e\00c\00t\00 \00O\00b\00j\00e\00c\00t\00]\00,\00[\00o\00b\00j\00e\00c\00t\00 \00O\00b\00j\00e\00c\00t\00]") + (data (i32.const 12876) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00P\00\00\000\00.\000\00,\00 \001\00.\000\00,\00 \00-\002\00.\000\00,\00 \00N\00a\00N\00,\00 \00-\00I\00n\00f\00i\00n\00i\00t\00y\00,\00 \00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 12988) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\001") + (data (i32.const 13020) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\10$\00\00\d02") + (data (i32.const 13052) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00[\00o\00b\00j\00e\00c\00t\00 \00O\00b\00j\00e\00c\00t\00]") + (data (i32.const 13116) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00@\00\00\00[\00o\00b\00j\00e\00c\00t\00 \00O\00b\00j\00e\00c\00t\00]\00,\00,\00[\00o\00b\00j\00e\00c\00t\00 \00O\00b\00j\00e\00c\00t\00]") + (data (i32.const 13212) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00>\00\00\00[\00o\00b\00j\00e\00c\00t\00 \00O\00b\00j\00e\00c\00t\00]\00,\00[\00o\00b\00j\00e\00c\00t\00 \00O\00b\00j\00e\00c\00t\00]") (data (i32.const 13308) "\1c") - (data (i32.const 13340) "\1c") - (data (i32.const 13356) "\04\00\00\00\01") - (data (i32.const 13372) "\1c") - (data (i32.const 13388) "\08\00\00\00\01\00\00\00\02") - (data (i32.const 13404) ",") - (data (i32.const 13420) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 13452) "\1c") - (data (i32.const 13464) "\01\00\00\00\06\00\00\001\00,\002") - (data (i32.const 13484) ",") - (data (i32.const 13496) "\01\00\00\00\0e\00\00\000\00,\001\00,\002\00,\003") - (data (i32.const 13532) "\1c") - (data (i32.const 13548) "\03\00\00\00\01\ff") - (data (i32.const 13564) "\1c") - (data (i32.const 13576) "\01\00\00\00\0c\00\00\001\00,\00-\001\00,\000") - (data (i32.const 13596) "\1c") - (data (i32.const 13612) "\06\00\00\00\01\00\ff\ff") - (data (i32.const 13628) ",") - (data (i32.const 13640) "\01\00\00\00\12\00\00\001\00,\006\005\005\003\005\00,\000") - (data (i32.const 13676) ",") - (data (i32.const 13692) "\18\00\00\00\01\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 13724) "L") - (data (i32.const 13736) "\01\00\00\000\00\00\001\00,\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005\00,\000") - (data (i32.const 13804) "<") - (data (i32.const 13820) " \00\00\00\ff\ff\ff\ff\ff\ff\ff\ff@Eu\c3*\9d\fb\ff\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\7f") - (data (i32.const 13868) "l") - (data (i32.const 13880) "\01\00\00\00T\00\00\00-\001\00,\00-\001\002\003\004\005\006\007\008\009\000\001\002\003\004\005\006\00,\000\00,\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007") - (data (i32.const 13980) ",") - (data (i32.const 13996) "\1c\00\00\00\10$\00\00\90#\00\00\90#\00\00\d0#\00\00\b0#\00\00\f0#") - (data (i32.const 14028) ",") - (data (i32.const 14040) "\01\00\00\00\1a\00\00\00,\00a\00,\00a\00,\00a\00b\00,\00b\00,\00b\00a\00,") - (data (i32.const 14076) "\1c") - (data (i32.const 14088) "\01\00\00\00\02\00\00\002") - (data (i32.const 14108) "\1c") - (data (i32.const 14120) "\01\00\00\00\02\00\00\004") - (data (i32.const 14140) ",") - (data (i32.const 14156) "\10\00\00\00\d02\00\00\107\00\00\00\00\00\0007") - (data (i32.const 14188) "\1c") - (data (i32.const 14200) "\01\00\00\00\0c\00\00\001\00,\002\00,\00,\004") - (data (i32.const 14220) "\1c") - (data (i32.const 14236) "\08\00\00\00\01\00\00\00\02") - (data (i32.const 14252) "\1c") - (data (i32.const 14268) "\08\00\00\00\03\00\00\00\04") - (data (i32.const 14284) ",") - (data (i32.const 14296) "\01\00\00\00\0e\00\00\001\00,\002\00,\003\00,\004") - (data (i32.const 14332) "\1c") - (data (i32.const 14348) "\02\00\00\00\01\02") - (data (i32.const 14364) "\1c") - (data (i32.const 14380) "\02\00\00\00\03\04") - (data (i32.const 14396) "\1c") - (data (i32.const 14412) "\04\00\00\00\01") - (data (i32.const 14428) "\1c") - (data (i32.const 14444) "\04") - (data (i32.const 14460) "\1c") - (data (i32.const 14476) "\0c\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 14492) "\1c") - (data (i32.const 14508) "\0c\00\00\00\04\00\00\00\05\00\00\00\06") - (data (i32.const 14524) "\1c") - (data (i32.const 14540) "\0c\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 14556) "\1c") - (data (i32.const 14568) "\01\00\00\00\06\00\00\00o\00n\00e") - (data (i32.const 14588) "\1c") - (data (i32.const 14604) "\04\00\00\00\f08") - (data (i32.const 14620) "\1c") - (data (i32.const 14632) "\01\00\00\00\06\00\00\00t\00w\00o") - (data (i32.const 14652) "\1c") - (data (i32.const 14664) "\01\00\00\00\n\00\00\00t\00h\00r\00e\00e") - (data (i32.const 14684) "\1c") - (data (i32.const 14700) "\0c\00\00\0009\00\00\00\00\00\00P9") - (data (i32.const 14716) "\1c") - (data (i32.const 14728) "\01\00\00\00\08\00\00\00f\00o\00u\00r") - (data (i32.const 14748) "\1c") - (data (i32.const 14760) "\01\00\00\00\08\00\00\00f\00i\00v\00e") - (data (i32.const 14780) "\1c") - (data (i32.const 14792) "\01\00\00\00\06\00\00\00s\00i\00x") - (data (i32.const 14812) "\1c") - (data (i32.const 14828) "\0c\00\00\00\909\00\00\b09\00\00\d09") - (data (i32.const 14844) "\1c") - (data (i32.const 14856) "\01\00\00\00\n\00\00\00s\00e\00v\00e\00n") - (data (i32.const 14876) "\1c") - (data (i32.const 14892) "\04\00\00\00\10:") - (data (i32.const 14908) "<") - (data (i32.const 14924) " \00\00\00\f08\00\0009\00\00\00\00\00\00P9\00\00\909\00\00\b09\00\00\d09\00\00\10:") + (data (i32.const 13340) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\01") + (data (i32.const 13372) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\01\00\00\00\02") + (data (i32.const 13404) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 13452) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\00,\002") + (data (i32.const 13484) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\000\00,\001\00,\002\00,\003") + (data (i32.const 13532) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\01\ff") + (data (i32.const 13564) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\001\00,\00-\001\00,\000") + (data (i32.const 13596) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\01\00\ff\ff") + (data (i32.const 13628) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\001\00,\006\005\005\003\005\00,\000") + (data (i32.const 13676) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\01\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 13724) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\000\00\00\001\00,\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005\00,\000") + (data (i32.const 13804) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\ff\ff\ff\ff\ff\ff\ff\ff@Eu\c3*\9d\fb\ff\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\7f") + (data (i32.const 13868) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00T\00\00\00-\001\00,\00-\001\002\003\004\005\006\007\008\009\000\001\002\003\004\005\006\00,\000\00,\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007") + (data (i32.const 13980) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\1c\00\00\00\10$\00\00\90#\00\00\90#\00\00\d0#\00\00\b0#\00\00\f0#") + (data (i32.const 14028) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00,\00a\00,\00a\00,\00a\00b\00,\00b\00,\00b\00a\00,") + (data (i32.const 14076) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\002") + (data (i32.const 14108) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\004") + (data (i32.const 14140) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\d02\00\00\107\00\00\00\00\00\0007") + (data (i32.const 14188) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\001\00,\002\00,\00,\004") + (data (i32.const 14220) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\01\00\00\00\02") + (data (i32.const 14252) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\03\00\00\00\04") + (data (i32.const 14284) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\001\00,\002\00,\003\00,\004") + (data (i32.const 14332) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\01\02") + (data (i32.const 14364) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\04") + (data (i32.const 14396) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\01") + (data (i32.const 14428) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04") + (data (i32.const 14460) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 14492) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\04\00\00\00\05\00\00\00\06") + (data (i32.const 14524) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\07\00\00\00\08\00\00\00\t") + (data (i32.const 14556) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00o\00n\00e") + (data (i32.const 14588) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\f08") + (data (i32.const 14620) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00t\00w\00o") + (data (i32.const 14652) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00t\00h\00r\00e\00e") + (data (i32.const 14684) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\0009\00\00\00\00\00\00P9") + (data (i32.const 14716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00f\00o\00u\00r") + (data (i32.const 14748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00f\00i\00v\00e") + (data (i32.const 14780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00s\00i\00x") + (data (i32.const 14812) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\909\00\00\b09\00\00\d09") + (data (i32.const 14844) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00s\00e\00v\00e\00n") + (data (i32.const 14876) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\10:") + (data (i32.const 14908) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\f08\00\0009\00\00\00\00\00\00P9\00\00\909\00\00\b09\00\00\d09\00\00\10:") (data (i32.const 14972) "\1c") (data (i32.const 15004) "\1c") - (data (i32.const 15036) "\1c") - (data (i32.const 15052) "\04\00\00\00\01") - (data (i32.const 15068) "\1c") - (data (i32.const 15084) "\04\00\00\00\02") - (data (i32.const 15100) "\1c") - (data (i32.const 15112) "+\00\00\00\08\00\00\00>") - (data (i32.const 15132) "<") - (data (i32.const 15144) "\01\00\00\00(\00\00\00I\00l\00l\00e\00g\00a\00l\00 \00g\00e\00n\00e\00r\00i\00c\00 \00t\00y\00p\00e") - (data (i32.const 15196) "\1c") - (data (i32.const 15208) "/\00\00\00\08\00\00\00?") - (data (i32.const 15228) "\1c") - (data (i32.const 15240) "\"\00\00\00\08\00\00\00@") - (data (i32.const 15264) "0\00\00\00 \00\00\00\00\00\00\00 ") - (data (i32.const 15292) "\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00A\00\00\00\02\00\00\00B\00\00\00\00\00\00\00\02\01\00\00\00\00\00\00\02A\00\00\00\00\00\00\82\00\00\00\00\00\00\00\02\19\00\00\00\00\00\00\02\1a\00\00\00\00\00\00\02a") - (data (i32.const 15420) " \00\00\00\00\00\00\00\02A") - (data (i32.const 15476) "\02A") - (data (i32.const 15492) " \00\00\00\00\00\00\00\02A") - (data (i32.const 15516) "\02a") - (data (i32.const 15532) "\02A") - (data (i32.const 15548) "B\00\00\00\00\00\00\00B\08\00\00\00\00\00\00\02\02\00\00\00\00\00\00\02\n\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A") - (data (i32.const 15620) "\02\01\00\00\07\00\00\00B\00\00\00\06\00\00\00\02A\00\00!") + (data (i32.const 15036) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\01") + (data (i32.const 15068) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\02") + (data (i32.const 15100) "\1c\00\00\00\00\00\00\00\00\00\00\00+\00\00\00\08\00\00\00>") + (data (i32.const 15132) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00I\00l\00l\00e\00g\00a\00l\00 \00g\00e\00n\00e\00r\00i\00c\00 \00t\00y\00p\00e") + (data (i32.const 15196) "\1c\00\00\00\00\00\00\00\00\00\00\00/\00\00\00\08\00\00\00?") + (data (i32.const 15228) "\1c\00\00\00\00\00\00\00\00\00\00\00\"\00\00\00\08\00\00\00@") + (data (i32.const 15264) "0\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\t\00\00\00\00\00\00 \00\00\00\00\00\00\00A\00\00\00\02\00\00\00B\00\00\00\00\00\00\00\02\01\00\00\00\00\00\00\02A\00\00\00\00\00\00\82\00\00\00\00\00\00\00\02\19\00\00\00\00\00\00\02\1a\00\00\00\00\00\00\02a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\02A\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02A\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\02A\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02A\00\00\00\00\00\00\00\00\00\00\00\00\00\00B\00\00\00\00\00\00\00B\08\00\00\00\00\00\00\02\02\00\00\00\00\00\00\02\n\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\01\00\00\07\00\00\00B\00\00\00\06\00\00\00\02A\00\00!") (table $0 65 funcref) (elem $0 (i32.const 1) $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|20 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|33 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|33 $start:std/array~anonymous|39 $start:std/array~anonymous|33 $start:std/array~anonymous|33 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|33 $start:std/array~anonymous|39 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $std/array/assertStableSortedForComplexObjects~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|48 $start:std/array~anonymous|51 $std/array/assertStableSortedForComplexObjects~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String|null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String|null>~anonymous|0 $start:std/array~anonymous|53 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String|null>~anonymous|0) (export "ArrayU32" (global $std/array/ArrayU32)) @@ -2099,1251 +1819,121 @@ end local.get $1 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $2 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - local.tee $4 - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - local.get $1 - i32.store8 offset=1 - local.get $0 - local.get $1 - i32.store8 offset=2 - local.get $4 - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $4 - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - local.get $1 - i32.store8 offset=3 - local.get $4 - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $4 - i32.add - local.tee $5 - local.get $1 - i32.const 255 - i32.and - i32.const 16843009 - i32.mul - local.tee $0 - i32.store - local.get $5 - local.get $2 - local.get $4 - i32.sub - i32.const -4 - i32.and - local.tee $2 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.get $0 - i32.store - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $5 - local.get $0 - i32.store offset=4 - local.get $5 - local.get $0 - i32.store offset=8 - local.get $1 - i32.const 12 - i32.sub - local.get $0 - i32.store - local.get $1 - i32.const 8 - i32.sub - local.get $0 - i32.store - local.get $2 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $5 - local.get $0 - i32.store offset=12 - local.get $5 - local.get $0 - i32.store offset=16 - local.get $5 - local.get $0 - i32.store offset=20 - local.get $5 - local.get $0 - i32.store offset=24 - local.get $1 - i32.const 28 - i32.sub - local.get $0 - i32.store - local.get $1 - i32.const 24 - i32.sub - local.get $0 - i32.store - local.get $1 - i32.const 20 - i32.sub - local.get $0 - i32.store - local.get $1 - i32.const 16 - i32.sub - local.get $0 - i32.store - local.get $5 - local.get $5 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $4 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.sub - local.set $2 - local.get $0 - i64.extend_i32_u - local.tee $3 - i64.const 32 - i64.shl - local.get $3 - i64.or - local.set $3 - loop $while-continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $3 - i64.store - local.get $1 - local.get $3 - i64.store offset=8 - local.get $1 - local.get $3 - i64.store offset=16 - local.get $1 - local.get $3 - i64.store offset=24 - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741804 - i32.ge_u - if - i32.const 1152 - i32.const 1216 - i32.const 260 - i32.const 31 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/itcms/total - global.get $~lib/rt/itcms/threshold - i32.ge_u - if - block $__inlined_func$~lib/rt/itcms/interrupt - i32.const 2048 - local.set $2 - loop $do-loop|0 - local.get $2 - call $~lib/rt/itcms/step - i32.sub - local.set $2 - global.get $~lib/rt/itcms/state - i32.eqz - if - global.get $~lib/rt/itcms/total - i64.extend_i32_u - i64.const 200 - i64.mul - i64.const 100 - i64.div_u - i32.wrap_i64 - i32.const 1024 - i32.add - global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt - end - local.get $2 - i32.const 0 - i32.gt_s - br_if $do-loop|0 - end - global.get $~lib/rt/itcms/total - local.tee $2 - global.get $~lib/rt/itcms/threshold - i32.sub - i32.const 1024 - i32.lt_u - i32.const 10 - i32.shl - local.get $2 - i32.add - global.set $~lib/rt/itcms/threshold - end - end - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/tlsf/allocateBlock - local.tee $2 - local.get $1 - i32.store offset=12 - local.get $2 - local.get $0 - i32.store offset=16 - global.get $~lib/rt/itcms/fromSpace - local.tee $1 - i32.load offset=8 - local.set $3 - local.get $2 - global.get $~lib/rt/itcms/white - local.get $1 - i32.or - i32.store offset=4 - local.get $2 - local.get $3 - i32.store offset=8 - local.get $3 - local.get $3 - i32.load offset=4 - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store offset=4 - local.get $1 - local.get $2 - i32.store offset=8 - global.get $~lib/rt/itcms/total - local.get $2 - i32.load - i32.const -4 - i32.and - i32.const 4 - i32.add - i32.add - global.set $~lib/rt/itcms/total - local.get $2 - i32.const 20 - i32.add - local.tee $1 - i32.const 0 - local.get $0 - call $~lib/memory/memory.fill - local.get $1 - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and + (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741804 + i32.ge_u if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 + i32.const 1152 + i32.const 1216 + i32.const 260 + i32.const 31 + call $~lib/builtins/abort + unreachable end - local.get $2 - i32.const 1 - i32.and + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.ge_u if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 + block $__inlined_func$~lib/rt/itcms/interrupt + i32.const 2048 + local.set $2 + loop $do-loop|0 + local.get $2 + call $~lib/rt/itcms/step + i32.sub + local.set $2 + global.get $~lib/rt/itcms/state + i32.eqz if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 + global.get $~lib/rt/itcms/total + i64.extend_i32_u + i64.const 200 + i64.mul + i64.const 100 + i64.div_u + i32.wrap_i64 + i32.const 1024 i32.add - i32.load8_u - i32.store8 - br $while-continue|5 + global.set $~lib/rt/itcms/threshold + br $__inlined_func$~lib/rt/itcms/interrupt end + local.get $2 + i32.const 0 + i32.gt_s + br_if $do-loop|0 end + global.get $~lib/rt/itcms/total + local.tee $2 + global.get $~lib/rt/itcms/threshold + i32.sub + i32.const 1024 + i32.lt_u + i32.const 10 + i32.shl + local.get $2 + i32.add + global.set $~lib/rt/itcms/threshold end end - ) - (func $~lib/array/Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT local.get $0 - i32.load offset=4 - local.set $5 + i32.const 16 + i32.add + call $~lib/rt/tlsf/allocateBlock + local.tee $2 + local.get $1 + i32.store offset=12 + local.get $2 local.get $0 - i32.load offset=12 - local.set $4 + i32.store offset=16 + global.get $~lib/rt/itcms/fromSpace + local.tee $1 + i32.load offset=8 + local.set $3 local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $2 - local.get $4 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $4 - local.get $2 - local.get $4 - i32.lt_s - select - end - local.tee $2 + global.get $~lib/rt/itcms/white + local.get $1 + i32.or + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $3 local.get $3 + i32.load offset=4 + i32.const 3 + i32.and + local.get $2 + i32.or + i32.store offset=4 + local.get $1 + local.get $2 + i32.store offset=8 + global.get $~lib/rt/itcms/total + local.get $2 + i32.load + i32.const -4 + i32.and + i32.const 4 + i32.add + i32.add + global.set $~lib/rt/itcms/total + local.get $2 + i32.const 20 + i32.add + local.tee $1 i32.const 0 - i32.lt_s - if (result i32) - local.get $3 - local.get $4 - i32.add - local.tee $3 - i32.const 0 - local.get $3 - i32.const 0 - i32.gt_s - select - else - local.get $3 - local.get $4 - local.get $3 - local.get $4 - i32.lt_s - select - end - local.tee $3 - i32.lt_s - if - local.get $2 - local.get $5 - i32.add - local.get $1 - local.get $3 - local.get $2 - i32.sub - call $~lib/memory/memory.fill - end local.get $0 + memory.fill + local.get $1 ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -3564,7 +2154,7 @@ local.get $3 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy end local.get $2 local.get $4 @@ -3814,7 +2404,7 @@ select i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 ) (func $std/array/isArraysEqual (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -3888,7 +2478,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $3 local.get $1 i32.store @@ -9152,13 +7742,13 @@ local.get $2 local.get $0 local.get $3 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.get $3 i32.add local.get $1 local.get $4 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -9471,7 +8061,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $5 i32.add @@ -9700,7 +8290,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $5 i32.add @@ -10261,7 +8851,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 @@ -10289,7 +8879,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 3014704 i32.store @@ -10412,7 +9002,7 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -10610,7 +9200,7 @@ f64.const 347 f64.add local.tee $1 - i32.trunc_f64_s + i32.trunc_sat_f64_s local.tee $8 local.get $1 local.get $8 @@ -10976,7 +9566,7 @@ local.get $0 i32.const 11904 local.get $1 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -11040,7 +9630,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $5 i32.add @@ -11895,7 +10485,7 @@ local.get $3 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $3 i32.add @@ -12390,7 +10980,7 @@ local.get $7 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $7 i32.add @@ -12632,7 +11222,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $5 i32.add @@ -14402,15 +12992,17 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 f64) - (local $5 i64) - (local $6 f32) - (local $7 i32) - (local $8 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + (local $7 f64) + (local $8 f32) (local $9 i32) (local $10 i32) (local $11 i32) (local $12 i32) + (local $13 i32) + (local $14 i32) global.get $~lib/memory/__stack_pointer i32.const 172 i32.sub @@ -14421,72 +13013,9 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 - local.get $0 - i64.const 0 - i64.store offset=32 - local.get $0 - i64.const 0 - i64.store offset=40 - local.get $0 - i64.const 0 - i64.store offset=48 - local.get $0 - i64.const 0 - i64.store offset=56 - local.get $0 - i64.const 0 - i64.store offset=64 - local.get $0 - i64.const 0 - i64.store offset=72 - local.get $0 - i64.const 0 - i64.store offset=80 - local.get $0 - i64.const 0 - i64.store offset=88 - local.get $0 - i64.const 0 - i64.store offset=96 - local.get $0 - i64.const 0 - i64.store offset=104 - local.get $0 - i64.const 0 - i64.store offset=112 - local.get $0 - i64.const 0 - i64.store offset=120 - local.get $0 - i64.const 0 - i64.store offset=128 - local.get $0 - i64.const 0 - i64.store offset=136 - local.get $0 - i64.const 0 - i64.store offset=144 - local.get $0 - i64.const 0 - i64.store offset=152 - local.get $0 - i64.const 0 - i64.store offset=160 - local.get $0 i32.const 0 - i32.store offset=168 + i32.const 172 + memory.fill memory.size i32.const 16 i32.shl @@ -14547,7 +13076,7 @@ local.tee $0 i32.store global.get $~lib/memory/__stack_pointer - local.tee $1 + local.tee $3 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -14581,20 +13110,20 @@ i32.const 1 i32.const 0 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $9 i32.store offset=4 local.get $0 - local.get $3 + local.get $9 i32.store - local.get $3 + local.get $9 if local.get $0 - local.get $3 + local.get $9 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $0 - local.get $3 + local.get $9 i32.store offset=4 local.get $0 i32.const 1 @@ -14603,7 +13132,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $3 local.get $0 i32.store global.get $~lib/memory/__stack_pointer @@ -14639,22 +13168,46 @@ local.tee $0 i32.store offset=4 local.get $0 + i32.load offset=4 + local.set $3 i32.const 1 + local.get $0 + i32.load offset=12 + local.tee $9 + local.get $9 i32.const 1 + i32.gt_s + select + local.tee $10 i32.const 3 - call $~lib/array/Array#fill - drop + local.get $9 + local.get $9 + i32.const 3 + i32.gt_s + select + local.tee $9 + i32.lt_s + if + local.get $3 + local.get $10 + i32.add + i32.const 1 + local.get $9 + local.get $10 + i32.sub + memory.fill + end i32.const 5 i32.const 0 i32.const 6 i32.const 1728 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 call $std/array/isArraysEqual i32.eqz if @@ -14666,22 +13219,41 @@ unreachable end local.get $0 + i32.load offset=4 + local.set $3 i32.const 0 + local.get $0 + i32.load offset=12 + local.tee $9 + local.get $9 i32.const 0 - i32.const 2147483647 - call $~lib/array/Array#fill - drop + i32.gt_s + select + local.set $10 + local.get $9 + local.get $10 + i32.gt_s + if + local.get $3 + local.get $10 + i32.add + i32.const 0 + local.get $9 + local.get $10 + i32.sub + memory.fill + end i32.const 5 i32.const 0 i32.const 6 i32.const 1760 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 call $std/array/isArraysEqual i32.eqz if @@ -14693,22 +13265,49 @@ unreachable end local.get $0 - i32.const 1 + i32.load offset=4 + local.set $3 i32.const 0 - i32.const -3 - call $~lib/array/Array#fill - drop + local.get $0 + i32.load offset=12 + local.tee $9 + local.get $9 + i32.const 0 + i32.gt_s + select + local.tee $10 + local.get $9 + i32.const 3 + i32.sub + local.tee $9 + i32.const 0 + local.get $9 + i32.const 0 + i32.gt_s + select + local.tee $9 + i32.lt_s + if + local.get $3 + local.get $10 + i32.add + i32.const 1 + local.get $9 + local.get $10 + i32.sub + memory.fill + end i32.const 5 i32.const 0 i32.const 6 i32.const 1792 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 call $std/array/isArraysEqual i32.eqz if @@ -14720,22 +13319,44 @@ unreachable end local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=12 + local.tee $9 i32.const 2 - i32.const -2 - i32.const 2147483647 - call $~lib/array/Array#fill - drop + i32.sub + local.tee $10 + i32.const 0 + local.get $10 + i32.const 0 + i32.gt_s + select + local.set $10 + local.get $9 + local.get $10 + i32.gt_s + if + local.get $3 + local.get $10 + i32.add + i32.const 2 + local.get $9 + local.get $10 + i32.sub + memory.fill + end i32.const 5 i32.const 0 i32.const 6 i32.const 1824 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 call $std/array/isArraysEqual i32.eqz if @@ -14747,22 +13368,46 @@ unreachable end local.get $0 - i32.const 0 + i32.load offset=4 + local.set $3 + i32.const 1 + local.get $0 + i32.load offset=12 + local.tee $9 + local.get $9 i32.const 1 + i32.gt_s + select + local.tee $10 i32.const 0 - call $~lib/array/Array#fill - drop + local.get $9 + local.get $9 + i32.const 0 + i32.gt_s + select + local.tee $9 + i32.lt_s + if + local.get $3 + local.get $10 + i32.add + i32.const 0 + local.get $9 + local.get $10 + i32.sub + memory.fill + end i32.const 5 i32.const 0 i32.const 6 i32.const 1856 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 call $std/array/isArraysEqual i32.eqz if @@ -14783,39 +13428,39 @@ i32.store offset=12 local.get $0 i32.load offset=4 - local.set $3 + local.set $9 i32.const 1 local.get $0 i32.load offset=12 - local.tee $7 - local.get $7 + local.tee $10 + local.get $10 i32.const 1 i32.gt_s select - local.set $1 + local.set $3 i32.const 3 - local.get $7 - local.get $7 + local.get $10 + local.get $10 i32.const 3 i32.gt_s select - local.set $7 + local.set $10 loop $for-loop|0 - local.get $1 - local.get $7 + local.get $3 + local.get $10 i32.lt_s if - local.get $1 + local.get $3 i32.const 2 i32.shl - local.get $3 + local.get $9 i32.add i32.const 1 i32.store - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|0 end end @@ -14824,12 +13469,12 @@ i32.const 7 i32.const 1936 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 call $std/array/isArraysEqual i32.eqz if @@ -14841,27 +13486,26 @@ unreachable end local.get $0 - local.tee $1 i32.load offset=4 - local.set $0 + local.set $9 i32.const 0 - local.get $1 + local.get $0 i32.load offset=12 - local.tee $7 - local.get $7 + local.tee $10 + local.get $10 i32.const 0 i32.gt_s select local.set $3 - loop $for-loop|01 + loop $for-loop|05 local.get $3 - local.get $7 + local.get $10 i32.lt_s if local.get $3 i32.const 2 i32.shl - local.get $0 + local.get $9 i32.add i32.const 0 i32.store @@ -14869,7 +13513,7 @@ i32.const 1 i32.add local.set $3 - br $for-loop|01 + br $for-loop|05 end end i32.const 5 @@ -14877,12 +13521,12 @@ i32.const 7 i32.const 1984 call $~lib/rt/__newArray - local.set $0 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $3 i32.store offset=8 - local.get $1 local.get $0 + local.get $3 call $std/array/isArraysEqual i32.eqz if @@ -14893,45 +13537,45 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=4 - local.set $3 + local.set $9 i32.const 0 - local.get $1 + local.get $0 i32.load offset=12 - local.tee $7 - local.get $7 + local.tee $10 + local.get $10 i32.const 0 i32.gt_s select - local.set $0 - local.get $7 + local.set $3 + local.get $10 i32.const 3 i32.sub - local.tee $7 + local.tee $10 i32.const 0 - local.get $7 + local.get $10 i32.const 0 i32.gt_s select - local.set $7 - loop $for-loop|03 - local.get $0 - local.get $7 + local.set $10 + loop $for-loop|07 + local.get $3 + local.get $10 i32.lt_s if - local.get $0 + local.get $3 i32.const 2 i32.shl - local.get $3 + local.get $9 i32.add i32.const 1 i32.store - local.get $0 + local.get $3 i32.const 1 i32.add - local.set $0 - br $for-loop|03 + local.set $3 + br $for-loop|07 end end i32.const 5 @@ -14939,12 +13583,12 @@ i32.const 7 i32.const 2032 call $~lib/rt/__newArray - local.set $0 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $3 i32.store offset=8 - local.get $1 local.get $0 + local.get $3 call $std/array/isArraysEqual i32.eqz if @@ -14955,12 +13599,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=4 - local.set $0 - local.get $1 + local.set $9 + local.get $0 i32.load offset=12 - local.tee $7 + local.tee $10 i32.const 2 i32.sub local.tee $3 @@ -14970,15 +13614,15 @@ i32.gt_s select local.set $3 - loop $for-loop|05 + loop $for-loop|09 local.get $3 - local.get $7 + local.get $10 i32.lt_s if local.get $3 i32.const 2 i32.shl - local.get $0 + local.get $9 i32.add i32.const 2 i32.store @@ -14986,7 +13630,7 @@ i32.const 1 i32.add local.set $3 - br $for-loop|05 + br $for-loop|09 end end i32.const 5 @@ -14994,12 +13638,12 @@ i32.const 7 i32.const 2080 call $~lib/rt/__newArray - local.set $0 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $3 i32.store offset=8 - local.get $1 local.get $0 + local.get $3 call $std/array/isArraysEqual i32.eqz if @@ -15010,42 +13654,42 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=4 - local.set $3 + local.set $9 i32.const 1 - local.get $1 + local.get $0 i32.load offset=12 - local.tee $7 - local.get $7 + local.tee $10 + local.get $10 i32.const 1 i32.gt_s select - local.set $0 + local.set $3 i32.const 0 - local.get $7 - local.get $7 + local.get $10 + local.get $10 i32.const 0 i32.gt_s select - local.set $7 - loop $for-loop|07 - local.get $0 - local.get $7 + local.set $10 + loop $for-loop|011 + local.get $3 + local.get $10 i32.lt_s if - local.get $0 + local.get $3 i32.const 2 i32.shl - local.get $3 + local.get $9 i32.add i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 1 i32.add - local.set $0 - br $for-loop|07 + local.set $3 + br $for-loop|011 end end i32.const 5 @@ -15053,12 +13697,12 @@ i32.const 7 i32.const 2128 call $~lib/rt/__newArray - local.set $0 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $3 i32.store offset=8 - local.get $1 local.get $0 + local.get $3 call $std/array/isArraysEqual i32.eqz if @@ -15431,34 +14075,34 @@ i32.const 8 i32.const 0 call $~lib/rt/__newArray - local.tee $1 + local.tee $3 i32.store offset=12 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.load offset=4 i32.store offset=16 - local.get $1 + local.get $3 i32.const 0 i32.const 0 call $std/array/Ref#constructor call $~lib/array/Array#__uset - local.get $1 + local.get $3 i32.const 1 i32.const 0 call $std/array/Ref#constructor call $~lib/array/Array#__uset local.get $0 - local.get $1 + local.get $3 i32.store offset=16 - local.get $1 + local.get $3 i32.const 0 i32.const 2 i32.const 0 call $~lib/array/ensureCapacity - local.get $1 + local.get $3 i32.const 0 i32.store offset=12 - local.get $1 + local.get $3 i32.load offset=12 if i32.const 0 @@ -15535,19 +14179,19 @@ i32.store offset=12 global.get $~lib/memory/__stack_pointer global.get $std/array/arr - local.tee $1 + local.tee $3 i32.store global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 local.get $0 call $~lib/array/Array#concat - local.tee $1 + local.tee $3 i32.store offset=16 global.get $~lib/memory/__stack_pointer global.get $std/array/arr - local.tee $3 + local.tee $9 i32.store - local.get $3 + local.get $9 call $std/array/internalCapacity i32.const 8 i32.ne @@ -15561,9 +14205,9 @@ end global.get $~lib/memory/__stack_pointer global.get $std/array/arr - local.tee $3 + local.tee $9 i32.store - local.get $3 + local.get $9 i32.load offset=12 i32.const 3 i32.ne @@ -15575,7 +14219,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.load offset=12 i32.const 3 i32.ne @@ -15592,19 +14236,19 @@ i32.const 3 i32.const 2272 call $~lib/rt/__newArray - local.set $3 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $9 i32.store offset=8 - local.get $1 local.get $3 + local.get $9 call $~lib/array/Array#concat drop global.get $~lib/memory/__stack_pointer global.get $std/array/arr - local.tee $3 + local.tee $9 i32.store - local.get $3 + local.get $9 call $std/array/internalCapacity i32.const 8 i32.ne @@ -15616,7 +14260,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -15629,7 +14273,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -15642,7 +14286,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -15664,21 +14308,21 @@ call $~lib/array/Array#push drop global.get $~lib/memory/__stack_pointer - local.tee $1 - global.get $std/array/arr local.tee $3 + global.get $std/array/arr + local.tee $9 i32.store - local.get $1 local.get $3 + local.get $9 local.get $0 call $~lib/array/Array#concat - local.tee $1 + local.tee $3 i32.store offset=16 global.get $~lib/memory/__stack_pointer global.get $std/array/arr - local.tee $3 + local.tee $9 i32.store - local.get $3 + local.get $9 call $std/array/internalCapacity i32.const 8 i32.ne @@ -15702,7 +14346,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.load offset=12 i32.const 5 i32.ne @@ -15714,7 +14358,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -15727,7 +14371,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -15740,7 +14384,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -15753,7 +14397,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -15766,7 +14410,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -15779,10 +14423,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 call $~lib/array/Array#pop drop - local.get $1 + local.get $3 i32.load offset=12 i32.const 4 i32.ne @@ -15813,17 +14457,17 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $1 - global.get $std/array/arr local.tee $3 + global.get $std/array/arr + local.tee $9 i32.store offset=8 - local.get $1 - local.get $0 local.get $3 + local.get $0 + local.get $9 call $~lib/array/Array#concat - local.tee $1 + local.tee $3 i32.store offset=16 - local.get $1 + local.get $3 i32.load offset=12 i32.const 3 i32.ne @@ -15867,12 +14511,12 @@ i32.const 3 i32.const 2384 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15906,12 +14550,12 @@ i32.const 3 i32.const 2480 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15945,12 +14589,12 @@ i32.const 3 i32.const 2576 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15984,12 +14628,12 @@ i32.const 3 i32.const 2672 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16023,12 +14667,12 @@ i32.const 3 i32.const 2768 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16062,12 +14706,12 @@ i32.const 3 i32.const 2864 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16101,12 +14745,12 @@ i32.const 3 i32.const 2960 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16140,12 +14784,12 @@ i32.const 3 i32.const 3056 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16179,12 +14823,12 @@ i32.const 3 i32.const 3152 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16218,12 +14862,12 @@ i32.const 3 i32.const 3248 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16257,12 +14901,12 @@ i32.const 3 i32.const 3344 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16296,12 +14940,12 @@ i32.const 3 i32.const 3440 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store offset=8 local.get $0 - local.get $1 + local.get $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16552,7 +15196,7 @@ i32.store local.get $0 i32.load offset=12 - local.tee $1 + local.tee $3 i32.const 0 i32.le_s if @@ -16565,27 +15209,27 @@ end local.get $0 i32.load offset=4 - local.tee $3 + local.tee $9 i32.load - local.get $3 - local.get $3 + local.get $9 + local.get $9 i32.const 4 i32.add - local.get $1 + local.get $3 i32.const 1 i32.sub - local.tee $1 + local.tee $3 i32.const 2 i32.shl - local.tee $8 - call $~lib/memory/memory.copy - local.get $3 - local.get $8 + local.tee $11 + memory.copy + local.get $9 + local.get $11 i32.add i32.const 0 i32.store local.get $0 - local.get $1 + local.get $3 i32.store offset=12 global.set $std/array/i global.get $std/array/i @@ -16813,19 +15457,19 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#slice - local.tee $1 + local.tee $3 i32.store offset=16 i32.const 3 i32.const 2 i32.const 3 i32.const 3536 call $~lib/rt/__newArray - local.set $3 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $9 i32.store offset=8 - local.get $1 local.get $3 + local.get $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16842,19 +15486,19 @@ i32.const 2 i32.const 4 call $~lib/array/Array#slice - local.tee $1 + local.tee $3 i32.store offset=16 i32.const 2 i32.const 2 i32.const 3 i32.const 3568 call $~lib/rt/__newArray - local.set $3 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $9 i32.store offset=8 - local.get $1 local.get $3 + local.get $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16871,19 +15515,19 @@ i32.const 1 i32.const 5 call $~lib/array/Array#slice - local.tee $1 + local.tee $3 i32.store offset=16 i32.const 4 i32.const 2 i32.const 3 i32.const 3600 call $~lib/rt/__newArray - local.set $3 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $9 i32.store offset=8 - local.get $1 local.get $3 + local.get $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16900,9 +15544,9 @@ i32.const 0 i32.const 2147483647 call $~lib/array/Array#slice - local.tee $1 + local.tee $3 i32.store offset=16 - local.get $1 + local.get $3 local.get $0 i32.const 0 call $std/array/isArraysEqual @@ -16920,19 +15564,19 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#slice - local.tee $1 + local.tee $3 i32.store offset=16 i32.const 2 i32.const 2 i32.const 3 i32.const 3648 call $~lib/rt/__newArray - local.set $3 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $9 i32.store offset=8 - local.get $1 local.get $3 + local.get $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16949,19 +15593,19 @@ i32.const 2 i32.const -1 call $~lib/array/Array#slice - local.tee $1 + local.tee $3 i32.store offset=16 i32.const 2 i32.const 2 i32.const 3 i32.const 3680 call $~lib/rt/__newArray - local.set $3 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $9 i32.store offset=8 - local.get $1 local.get $3 + local.get $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16978,19 +15622,19 @@ i32.const -3 i32.const -1 call $~lib/array/Array#slice - local.tee $1 + local.tee $3 i32.store offset=16 i32.const 2 i32.const 2 i32.const 3 i32.const 3712 call $~lib/rt/__newArray - local.set $3 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $9 i32.store offset=8 - local.get $1 local.get $3 + local.get $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17006,11 +15650,11 @@ i32.const -1 i32.const -3 call $~lib/array/Array#slice - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store - local.get $1 + local.get $3 i32.load offset=12 if i32.const 0 @@ -17044,49 +15688,49 @@ i32.store local.get $0 i32.load offset=4 - local.set $1 + local.set $3 local.get $0 i32.load offset=12 - local.tee $3 + local.tee $9 i32.const 1 i32.gt_u if i32.const 0 local.set $0 - local.get $3 + local.get $9 i32.const 1 i32.shr_u - local.set $7 - local.get $3 + local.set $10 + local.get $9 i32.const 1 i32.sub - local.set $3 + local.set $9 loop $while-continue|0 local.get $0 - local.get $7 + local.get $10 i32.lt_u if local.get $0 i32.const 2 i32.shl - local.get $1 + local.get $3 i32.add - local.tee $8 + local.tee $11 i32.load - local.set $9 - local.get $8 - local.get $3 + local.set $12 + local.get $11 + local.get $9 local.get $0 i32.sub i32.const 2 i32.shl - local.get $1 + local.get $3 i32.add - local.tee $8 + local.tee $11 i32.load i32.store - local.get $8 - local.get $9 + local.get $11 + local.get $12 i32.store local.get $0 i32.const 1 @@ -17201,29 +15845,29 @@ i32.const 6 i32.const 3744 call $~lib/rt/__newArray - local.set $1 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $3 i32.store - local.get $1 + local.get $3 i32.load offset=4 - local.get $1 + local.get $3 i32.load offset=12 call $~lib/util/bytes/REVERSE - local.get $1 + local.get $3 i32.store offset=16 - local.get $1 + local.get $3 i32.load offset=12 local.set $0 - loop $for-loop|08 + loop $for-loop|012 local.get $0 local.get $2 i32.gt_s if - local.get $1 + local.get $3 local.get $2 call $~lib/array/Array#__get - local.get $1 + local.get $3 i32.load offset=12 local.get $2 i32.sub @@ -17242,7 +15886,7 @@ i32.const 1 i32.add local.set $2 - br $for-loop|08 + br $for-loop|012 end end global.get $~lib/memory/__stack_pointer @@ -17251,31 +15895,31 @@ i32.const 6 i32.const 3776 call $~lib/rt/__newArray - local.set $1 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $2 i32.store - local.get $1 + local.get $2 i32.load offset=4 - local.get $1 + local.get $2 i32.load offset=12 call $~lib/util/bytes/REVERSE - local.get $1 + local.get $2 i32.store offset=4 i32.const 0 local.set $0 - local.get $1 + local.get $2 i32.load offset=12 - local.set $2 + local.set $3 loop $for-loop|1 local.get $0 - local.get $2 + local.get $3 i32.lt_s if - local.get $1 + local.get $2 local.get $0 call $~lib/array/Array#__get - local.get $1 + local.get $2 i32.load offset=12 local.get $0 i32.sub @@ -17303,20 +15947,20 @@ i32.const 6 i32.const 3808 call $~lib/rt/__newArray - local.set $1 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $2 i32.store - local.get $1 + local.get $2 i32.load offset=4 - local.get $1 + local.get $2 i32.load offset=12 call $~lib/util/bytes/REVERSE - local.get $1 + local.get $2 i32.store offset=12 i32.const 0 local.set $3 - local.get $1 + local.get $2 i32.load offset=12 local.set $0 loop $for-loop|2 @@ -17324,10 +15968,10 @@ local.get $3 i32.gt_s if - local.get $1 + local.get $2 local.get $3 call $~lib/array/Array#__get - local.get $1 + local.get $2 i32.load offset=12 local.get $3 i32.sub @@ -17355,16 +15999,14 @@ i32.const 9 i32.const 3856 call $~lib/rt/__newArray - local.set $1 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $2 i32.store - local.get $1 + local.get $2 call $~lib/array/Array#reverse local.tee $0 i32.store offset=20 - i32.const 0 - local.set $1 local.get $0 i32.load offset=12 local.set $2 @@ -19192,11 +17834,11 @@ local.get $1 i32.add f32.load - local.tee $6 + local.tee $8 f32.const nan:0x400000 f32.eq - local.get $6 - local.get $6 + local.get $8 + local.get $8 f32.ne i32.or br_if $__inlined_func$~lib/array/Array#includes @@ -19257,11 +17899,11 @@ local.get $1 i32.add f64.load - local.tee $4 + local.tee $7 f64.const nan:0x8000000000000 f64.eq - local.get $4 - local.get $4 + local.get $7 + local.get $7 f64.ne i32.or br_if $__inlined_func$~lib/array/Array#includes @@ -20425,11 +19067,11 @@ i32.const 0 i32.gt_s select - local.set $7 + local.set $9 local.get $2 i32.const 1 local.get $3 - local.get $7 + local.get $9 i32.sub local.tee $2 local.get $2 @@ -20447,41 +19089,41 @@ i32.const 12 i32.const 0 call $~lib/rt/__newArray - local.tee $8 + local.tee $10 i32.store - local.get $8 + local.get $10 i32.load offset=4 local.get $1 i32.load offset=4 - local.tee $9 - local.get $7 + local.tee $11 + local.get $9 i32.const 2 i32.shl i32.add - local.tee $10 + local.tee $12 local.get $2 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $3 local.get $2 - local.get $7 + local.get $9 i32.add - local.tee $7 + local.tee $9 i32.ne if - local.get $10 - local.get $7 + local.get $12 + local.get $9 i32.const 2 i32.shl - local.get $9 + local.get $11 i32.add local.get $3 - local.get $7 + local.get $9 i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $1 local.get $3 @@ -20492,9 +19134,9 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $10 i32.store offset=4 - local.get $8 + local.get $10 i32.load offset=12 i32.const 1 i32.ne @@ -20507,7 +19149,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $10 i32.const 0 call $~lib/array/Array#__get local.tee $0 @@ -22518,20 +21160,20 @@ i32.const 10 i32.const 0 call $~lib/rt/__newArray - local.tee $7 + local.tee $9 i32.store - local.get $7 + local.get $9 i32.load offset=4 - local.set $8 + local.set $10 i32.const 0 local.set $0 loop $for-loop|0197 local.get $3 local.get $2 i32.load offset=12 - local.tee $9 + local.tee $11 local.get $3 - local.get $9 + local.get $11 i32.lt_s select local.get $0 @@ -22540,18 +21182,18 @@ local.get $0 i32.const 2 i32.shl - local.tee $9 + local.tee $11 local.get $2 i32.load offset=4 i32.add i32.load - local.set $10 + local.set $12 i32.const 3 global.set $~argumentsLength - local.get $8 - local.get $9 - i32.add local.get $10 + local.get $11 + i32.add + local.get $12 local.get $0 local.get $2 i32.const 6992 @@ -22569,9 +21211,9 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $9 i32.store offset=12 - local.get $7 + local.get $9 i32.load offset=12 i32.const 4 i32.ne @@ -22583,10 +21225,10 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $9 i32.const 0 call $~lib/array/Array#__get - local.set $6 + local.set $8 global.get $~lib/memory/__stack_pointer global.get $std/array/arr local.tee $0 @@ -22595,7 +21237,7 @@ i32.const 0 call $~lib/array/Array#__get f32.convert_i32_s - local.get $6 + local.get $8 f32.ne if i32.const 0 @@ -22945,9 +21587,9 @@ local.get $3 local.get $1 i32.load offset=12 - local.tee $7 + local.tee $9 local.get $3 - local.get $7 + local.get $9 i32.lt_s select local.get $0 @@ -22960,11 +21602,11 @@ i32.shl i32.add i32.load - local.set $7 + local.set $9 i32.const 4 global.set $~argumentsLength local.get $2 - local.get $7 + local.get $9 local.get $0 local.get $1 i32.const 7248 @@ -23010,9 +21652,9 @@ local.get $3 local.get $1 i32.load offset=12 - local.tee $7 + local.tee $9 local.get $3 - local.get $7 + local.get $9 i32.lt_s select local.get $0 @@ -23025,11 +21667,11 @@ i32.shl i32.add i32.load - local.set $7 + local.set $9 i32.const 4 global.set $~argumentsLength local.get $2 - local.get $7 + local.get $9 local.get $0 local.get $1 i32.const 7280 @@ -23075,9 +21717,9 @@ local.get $3 local.get $1 i32.load offset=12 - local.tee $7 + local.tee $9 local.get $3 - local.get $7 + local.get $9 i32.lt_s select local.get $0 @@ -23090,11 +21732,11 @@ i32.shl i32.add i32.load - local.set $7 + local.set $9 i32.const 4 global.set $~argumentsLength local.get $2 - local.get $7 + local.get $9 local.get $0 local.get $1 i32.const 7312 @@ -23137,9 +21779,9 @@ local.get $3 local.get $1 i32.load offset=12 - local.tee $7 + local.tee $9 local.get $3 - local.get $7 + local.get $9 i32.lt_s select local.get $0 @@ -23152,11 +21794,11 @@ i32.shl i32.add i32.load - local.set $7 + local.set $9 i32.const 4 global.set $~argumentsLength local.get $2 - local.get $7 + local.get $9 local.get $0 local.get $1 i32.const 7344 @@ -23198,9 +21840,9 @@ local.get $3 local.get $1 i32.load offset=12 - local.tee $7 + local.tee $9 local.get $3 - local.get $7 + local.get $9 i32.lt_s select local.get $0 @@ -23213,11 +21855,11 @@ i32.shl i32.add i32.load - local.set $7 + local.set $9 i32.const 4 global.set $~argumentsLength local.get $2 - local.get $7 + local.get $9 local.get $0 local.get $1 i32.const 7376 @@ -23279,9 +21921,9 @@ local.get $3 local.get $1 i32.load offset=12 - local.tee $7 + local.tee $9 local.get $3 - local.get $7 + local.get $9 i32.lt_s select local.get $0 @@ -23294,11 +21936,11 @@ i32.shl i32.add i32.load - local.set $7 + local.set $9 i32.const 4 global.set $~argumentsLength local.get $2 - local.get $7 + local.get $9 local.get $0 local.get $1 i32.const 7408 @@ -23371,9 +22013,9 @@ local.get $3 local.get $1 i32.load offset=12 - local.tee $7 + local.tee $9 local.get $3 - local.get $7 + local.get $9 i32.lt_s select local.get $0 @@ -23386,11 +22028,11 @@ i32.shl i32.add i32.load - local.set $7 + local.set $9 i32.const 4 global.set $~argumentsLength local.get $2 - local.get $7 + local.get $9 local.get $0 local.get $1 i32.const 7440 @@ -23939,26 +22581,26 @@ i64.const -7046029254386353131 call $~lib/bindings/Math/random i64.reinterpret_f64 - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 i64.eqz select - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 i64.const 33 i64.shr_u i64.xor i64.const -49064778989728563 i64.mul - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 i64.const 33 i64.shr_u i64.xor i64.const -4265267296055464877 i64.mul - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 i64.const 33 i64.shr_u i64.xor @@ -23966,22 +22608,22 @@ global.get $~lib/math/random_state0_64 i64.const -1 i64.xor - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 i64.const 33 i64.shr_u i64.xor i64.const -49064778989728563 i64.mul - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 i64.const 33 i64.shr_u i64.xor i64.const -4265267296055464877 i64.mul - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 i64.const 33 i64.shr_u i64.xor @@ -24500,15 +23142,15 @@ local.get $0 local.get $1 call $~lib/array/Array#__get - local.tee $4 - local.get $4 + local.tee $7 + local.get $7 f64.ne if (result i32) local.get $2 local.get $1 call $~lib/array/Array#__get - local.tee $4 - local.get $4 + local.tee $7 + local.get $7 f64.ne else i32.const 0 @@ -24654,7 +23296,7 @@ i32.const 3 i32.const 8592 call $~lib/rt/__newArray - local.tee $1 + local.tee $2 i32.store offset=124 global.get $~lib/memory/__stack_pointer i32.const 1 @@ -24662,7 +23304,7 @@ i32.const 3 i32.const 8624 call $~lib/rt/__newArray - local.tee $2 + local.tee $3 i32.store offset=128 global.get $~lib/memory/__stack_pointer i32.const 2 @@ -24670,7 +23312,7 @@ i32.const 3 i32.const 8656 call $~lib/rt/__newArray - local.tee $3 + local.tee $9 i32.store offset=132 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -24678,7 +23320,7 @@ i32.const 3 i32.const 8688 call $~lib/rt/__newArray - local.tee $7 + local.tee $10 i32.store offset=136 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -24686,48 +23328,48 @@ i32.const 3 i32.const 8736 call $~lib/rt/__newArray - local.tee $8 + local.tee $11 i32.store offset=140 global.get $~lib/memory/__stack_pointer i32.const 64 call $std/array/createReverseOrderedArray - local.tee $9 + local.tee $12 i32.store offset=144 global.get $~lib/memory/__stack_pointer i32.const 128 call $std/array/createReverseOrderedArray - local.tee $10 + local.tee $13 i32.store offset=148 global.get $~lib/memory/__stack_pointer i32.const 1024 call $std/array/createReverseOrderedArray - local.tee $11 + local.tee $14 i32.store offset=152 global.get $~lib/memory/__stack_pointer i32.const 10000 call $std/array/createReverseOrderedArray - local.tee $12 + local.tee $0 i32.store offset=156 global.get $~lib/memory/__stack_pointer i32.const 512 call $std/array/createRandomOrderedArray - local.tee $0 + local.tee $1 i32.store offset=160 - local.get $1 - call $std/array/assertSortedDefault local.get $2 call $std/array/assertSortedDefault + local.get $3 + call $std/array/assertSortedDefault i32.const 1 i32.const 2 i32.const 3 i32.const 8816 call $~lib/rt/__newArray - local.set $1 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $2 i32.store offset=8 + local.get $3 local.get $2 - local.get $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -24739,19 +23381,19 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $9 call $std/array/assertSortedDefault i32.const 2 i32.const 2 i32.const 3 i32.const 8848 call $~lib/rt/__newArray - local.set $1 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $2 i32.store offset=8 - local.get $3 - local.get $1 + local.get $9 + local.get $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -24763,10 +23405,10 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $10 call $std/array/assertSortedDefault - local.get $7 - local.get $8 + local.get $10 + local.get $11 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -24778,10 +23420,10 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $12 call $std/array/assertSortedDefault - local.get $9 - local.get $8 + local.get $12 + local.get $11 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -24793,10 +23435,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $13 call $std/array/assertSortedDefault - local.get $10 - local.get $8 + local.get $13 + local.get $11 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -24808,10 +23450,10 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $14 call $std/array/assertSortedDefault + local.get $14 local.get $11 - local.get $8 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -24823,10 +23465,10 @@ call $~lib/builtins/abort unreachable end - local.get $12 + local.get $0 call $std/array/assertSortedDefault - local.get $12 - local.get $8 + local.get $0 + local.get $11 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -24838,10 +23480,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $std/array/assertSortedDefault - i32.const 0 - local.set $0 global.get $~lib/memory/__stack_pointer i32.const 24 i32.sub @@ -24851,20 +23491,15 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 + local.tee $0 + i32.const 0 + i32.const 24 + memory.fill + local.get $0 global.get $std/array/inputStabArr - local.tee $2 + local.tee $1 i32.store offset=8 - local.get $1 + local.get $0 i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer @@ -24873,75 +23508,75 @@ i32.lt_s br_if $folding-inner1 global.get $~lib/memory/__stack_pointer - local.tee $3 + local.tee $2 i32.const 0 i32.store i32.const 0 - local.get $2 + local.get $1 i32.load offset=12 - local.tee $7 - local.get $7 + local.tee $3 + local.get $3 i32.const 0 i32.gt_s select - local.set $8 + local.set $9 + local.get $2 local.get $3 - local.get $7 - local.get $8 + local.get $9 i32.sub - local.tee $3 + local.tee $2 i32.const 0 - local.get $3 + local.get $2 i32.const 0 i32.gt_s select - local.tee $3 + local.tee $2 i32.const 2 i32.const 20 i32.const 0 call $~lib/rt/__newArray - local.tee $7 + local.tee $10 i32.store - local.get $7 + local.get $10 i32.load offset=4 - local.set $9 - local.get $2 + local.set $3 + local.get $1 i32.load offset=4 - local.get $8 + local.get $9 i32.const 2 i32.shl i32.add - local.set $2 - local.get $3 + local.set $1 + local.get $2 i32.const 2 i32.shl - local.set $3 - loop $while-continue|011 - local.get $0 - local.get $3 - i32.lt_u + local.set $2 + loop $while-continue|015 + local.get $2 + local.get $5 + i32.gt_u if - local.get $0 - local.get $9 + local.get $3 + local.get $5 i32.add - local.get $0 - local.get $2 + local.get $1 + local.get $5 i32.add i32.load - local.tee $8 + local.tee $9 i32.store - local.get $8 + local.get $9 if - local.get $7 - local.get $8 + local.get $10 + local.get $9 i32.const 1 call $byn-split-outlined-A$~lib/rt/itcms/__link end - local.get $0 + local.get $5 i32.const 4 i32.add - local.set $0 - br $while-continue|011 + local.set $5 + br $while-continue|015 end end global.get $~lib/memory/__stack_pointer @@ -24949,64 +23584,62 @@ i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $10 i32.store global.get $~lib/memory/__stack_pointer i32.const 8880 i32.store offset=4 - local.get $7 + local.get $10 i32.load offset=4 - local.get $7 + local.get $10 i32.load offset=12 i32.const 8880 call $~lib/util/sort/SORT - local.get $1 - local.get $7 + local.get $0 + local.get $10 i32.store offset=12 i32.const 1 local.set $3 - i32.const 0 - local.set $0 global.get $~lib/memory/__stack_pointer global.get $std/array/inputStabArr - local.tee $1 + local.tee $0 i32.store - local.get $1 + local.get $0 i32.load offset=12 - local.set $1 - loop $for-loop|012 + local.set $0 + loop $for-loop|016 local.get $0 - local.get $1 - i32.lt_s + local.get $4 + i32.gt_s if block $for-break0 global.get $~lib/memory/__stack_pointer - local.get $7 - local.get $0 + local.get $10 + local.get $4 call $~lib/array/Array#__get - local.tee $2 + local.tee $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer global.get $std/array/outputStabArr - local.tee $8 + local.tee $2 i32.store global.get $~lib/memory/__stack_pointer - local.get $8 - local.get $0 + local.get $2 + local.get $4 call $~lib/array/Array#__get - local.tee $8 + local.tee $2 i32.store offset=20 - local.get $2 + local.get $1 i32.load - local.get $8 + local.get $2 i32.load i32.ne if (result i32) i32.const 1 else - local.get $2 + local.get $1 i32.load offset=4 - local.get $8 + local.get $2 i32.load offset=4 i32.ne end @@ -25015,11 +23648,11 @@ local.set $3 br $for-break0 end - local.get $0 + local.get $4 i32.const 1 i32.add - local.set $0 - br $for-loop|012 + local.set $4 + br $for-loop|016 end end end @@ -25236,20 +23869,20 @@ i32.const 2048 i32.const 0 call $~lib/rt/itcms/__new - local.tee $7 + local.tee $4 i32.store offset=4 local.get $2 - local.get $7 + local.get $4 i32.store - local.get $7 + local.get $4 if local.get $2 - local.get $7 + local.get $4 i32.const 0 call $byn-split-outlined-A$~lib/rt/itcms/__link end local.get $2 - local.get $7 + local.get $4 i32.store offset=4 local.get $2 i32.const 2048 @@ -25264,7 +23897,7 @@ local.get $1 local.get $2 i32.store - loop $for-loop|0314 + loop $for-loop|03 local.get $3 i32.const 512 i32.lt_s @@ -25307,7 +23940,7 @@ i32.const 1 i32.add local.set $3 - br $for-loop|0314 + br $for-loop|03 end end global.get $~lib/memory/__stack_pointer @@ -25405,10 +24038,10 @@ local.set $1 local.get $0 i32.load offset=12 - local.set $7 + local.set $4 loop $for-loop|048 local.get $1 - local.get $7 + local.get $4 i32.lt_s if local.get $0 @@ -25416,9 +24049,9 @@ i32.const 1 i32.sub call $~lib/array/Array#__get - local.set $8 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $5 i32.store local.get $0 local.get $1 @@ -25429,7 +24062,7 @@ i32.store offset=4 i32.const 2 global.set $~argumentsLength - local.get $8 + local.get $5 local.get $9 local.get $3 i32.load @@ -25521,19 +24154,19 @@ local.get $0 local.get $3 call $~lib/array/Array#__get - local.set $7 + local.set $4 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $4 i32.store local.get $2 local.get $3 call $~lib/array/Array#__get - local.set $8 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $5 i32.store offset=4 - local.get $7 - local.get $8 + local.get $4 + local.get $5 call $~lib/string/String.__eq i32.eqz if @@ -25567,7 +24200,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $7 + local.tee $4 i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -25583,7 +24216,7 @@ i32.const 0 i32.const 400 call $~lib/array/Array<~lib/string/String>#constructor - local.tee $8 + local.tee $5 i32.store i32.const 0 local.set $1 @@ -25595,7 +24228,7 @@ call $~lib/math/NativeMath.random f64.const 32 f64.mul - i32.trunc_f64_s + i32.trunc_sat_f64_s local.set $9 global.get $~lib/memory/__stack_pointer i32.const 12 @@ -25639,7 +24272,7 @@ f64.convert_i32_s f64.mul f64.floor - i32.trunc_f64_s + i32.trunc_sat_f64_s local.set $11 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -25710,7 +24343,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 - local.get $8 + local.get $5 local.get $1 local.get $0 call $~lib/array/Array<~lib/array/Array>#__set @@ -25725,8 +24358,8 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 - local.get $8 + local.get $4 + local.get $5 i32.store offset=156 i32.const 1 global.set $~argumentsLength @@ -25759,7 +24392,7 @@ i32.const 9392 i32.store end - local.get $8 + local.get $5 local.get $0 call $std/array/assertSorted<~lib/array/Array> global.get $~lib/memory/__stack_pointer @@ -25779,10 +24412,10 @@ i32.const 9520 i32.store offset=168 i32.const 0 - local.set $3 + local.set $2 local.get $0 i32.load offset=4 - local.set $2 + local.set $3 local.get $0 i32.load offset=12 local.set $0 @@ -25801,7 +24434,7 @@ local.get $0 i32.const 1 i32.sub - local.tee $7 + local.tee $4 i32.const 0 i32.lt_s if @@ -25813,12 +24446,12 @@ local.set $0 br $__inlined_func$~lib/util/string/joinBooleanArray end - local.get $7 + local.get $4 i32.eqz if i32.const 9456 i32.const 9488 - local.get $2 + local.get $3 i32.load8_u select local.set $0 @@ -25829,12 +24462,12 @@ br $__inlined_func$~lib/util/string/joinBooleanArray end global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $4 i32.const 9516 i32.load i32.const 1 i32.shr_u - local.tee $8 + local.tee $5 i32.const 5 i32.add i32.mul @@ -25850,8 +24483,8 @@ i32.const 0 local.set $0 loop $for-loop|149 - local.get $3 - local.get $7 + local.get $2 + local.get $4 i32.lt_s if local.get $2 @@ -25875,12 +24508,12 @@ local.get $11 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $11 i32.add local.set $0 - local.get $8 + local.get $5 if local.get $0 i32.const 1 @@ -25888,24 +24521,24 @@ local.get $1 i32.add i32.const 9520 - local.get $8 + local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 - local.get $8 + local.get $5 i32.add local.set $0 end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|149 end end - local.get $2 - local.get $7 + local.get $3 + local.get $4 i32.add i32.load8_u local.tee $2 @@ -25925,7 +24558,7 @@ local.get $3 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $9 local.get $0 local.get $3 @@ -26417,7 +25050,7 @@ local.get $0 i32.const 1 i32.sub - local.tee $7 + local.tee $4 i32.const 0 i32.lt_s if @@ -26429,7 +25062,7 @@ local.set $0 br $__inlined_func$~lib/util/string/joinIntegerArray end - local.get $7 + local.get $4 i32.eqz if local.get $3 @@ -26443,12 +25076,12 @@ br $__inlined_func$~lib/util/string/joinIntegerArray end global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $4 i32.const 9516 i32.load i32.const 1 i32.shr_u - local.tee $8 + local.tee $5 i32.const 11 i32.add i32.mul @@ -26465,7 +25098,7 @@ local.set $0 loop $for-loop|050 local.get $2 - local.get $7 + local.get $4 i32.lt_s if local.get $0 @@ -26481,7 +25114,7 @@ local.get $0 i32.add local.set $0 - local.get $8 + local.get $5 if local.get $0 i32.const 1 @@ -26489,12 +25122,12 @@ local.get $1 i32.add i32.const 9520 - local.get $8 + local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 - local.get $8 + local.get $5 i32.add local.set $0 end @@ -26512,7 +25145,7 @@ local.get $1 i32.add local.get $3 - local.get $7 + local.get $4 i32.add i32.load8_s call $~lib/util/number/itoa_buffered @@ -26608,7 +25241,7 @@ local.get $0 i32.const 1 i32.sub - local.tee $7 + local.tee $4 i32.const 0 i32.lt_s if @@ -26620,7 +25253,7 @@ local.set $0 br $__inlined_func$~lib/util/string/joinIntegerArray end - local.get $7 + local.get $4 i32.eqz if local.get $3 @@ -26634,12 +25267,12 @@ br $__inlined_func$~lib/util/string/joinIntegerArray end global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $4 i32.const 9516 i32.load i32.const 1 i32.shr_u - local.tee $8 + local.tee $5 i32.const 10 i32.add i32.mul @@ -26656,7 +25289,7 @@ local.set $0 loop $for-loop|051 local.get $2 - local.get $7 + local.get $4 i32.lt_s if local.get $0 @@ -26674,7 +25307,7 @@ local.get $0 i32.add local.set $0 - local.get $8 + local.get $5 if local.get $0 i32.const 1 @@ -26682,12 +25315,12 @@ local.get $1 i32.add i32.const 9520 - local.get $8 + local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 - local.get $8 + local.get $5 i32.add local.set $0 end @@ -26704,7 +25337,7 @@ i32.shl local.get $1 i32.add - local.get $7 + local.get $4 i32.const 1 i32.shl local.get $3 @@ -27031,7 +25664,7 @@ i32.load i32.const 1 i32.shr_u - local.set $7 + local.set $4 loop $for-loop|052 local.get $1 local.get $2 @@ -27044,24 +25677,24 @@ local.get $3 i32.add i32.load - local.tee $8 + local.tee $5 i32.store - local.get $8 + local.get $5 if global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $5 call $~lib/array/Array#toString - local.set $8 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $5 i32.store offset=8 local.get $0 - local.get $8 + local.get $5 call $~lib/string/String.__concat local.tee $0 i32.store offset=4 end - local.get $7 + local.get $4 if global.get $~lib/memory/__stack_pointer local.get $0 @@ -27245,7 +25878,7 @@ i32.load i32.const 1 i32.shr_u - local.set $7 + local.set $4 loop $for-loop|053 local.get $1 local.get $2 @@ -27258,24 +25891,24 @@ local.get $3 i32.add i32.load - local.tee $8 + local.tee $5 i32.store - local.get $8 + local.get $5 if global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $5 call $~lib/array/Array#toString - local.set $8 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $5 i32.store offset=8 local.get $0 - local.get $8 + local.get $5 call $~lib/string/String.__concat local.tee $0 i32.store offset=4 end - local.get $7 + local.get $4 if global.get $~lib/memory/__stack_pointer local.get $0 @@ -27467,7 +26100,7 @@ i32.load i32.const 1 i32.shr_u - local.set $7 + local.set $4 loop $for-loop|054 local.get $1 local.get $2 @@ -27480,24 +26113,24 @@ local.get $3 i32.add i32.load - local.tee $8 + local.tee $5 i32.store - local.get $8 + local.get $5 if global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $5 call $~lib/array/Array<~lib/array/Array>#toString - local.set $8 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $5 i32.store offset=8 local.get $0 - local.get $8 + local.get $5 call $~lib/string/String.__concat local.tee $0 i32.store offset=4 end - local.get $7 + local.get $4 if global.get $~lib/memory/__stack_pointer local.get $0 @@ -27718,7 +26351,7 @@ i64.store local.get $1 i32.load offset=4 - local.set $8 + local.set $5 local.get $1 i32.load offset=12 local.set $1 @@ -27734,7 +26367,7 @@ local.get $0 i32.const 2 i32.shl - local.get $8 + local.get $5 i32.add i32.load local.tee $2 @@ -27800,7 +26433,7 @@ local.get $0 i32.const 2 i32.shl - local.get $8 + local.get $5 i32.add i32.load local.tee $11 @@ -27815,7 +26448,7 @@ i32.const 2 i32.shl local.tee $11 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.get $11 i32.add @@ -28029,11 +26662,11 @@ i32.const 26 i32.const 0 call $~lib/rt/__newArray - local.tee $7 + local.tee $4 i32.store - local.get $7 + local.get $4 i32.load offset=4 - local.set $8 + local.set $5 i32.const 0 local.set $0 loop $for-loop|065 @@ -28071,14 +26704,14 @@ call_indirect $0 (type $i32_i32_i32_=>_i32) local.tee $9 i32.store offset=8 - local.get $8 + local.get $5 local.get $10 i32.add local.get $9 i32.store local.get $9 if - local.get $7 + local.get $4 local.get $9 i32.const 1 call $byn-split-outlined-A$~lib/rt/itcms/__link @@ -28095,9 +26728,9 @@ i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $4 i32.store - local.get $7 + local.get $4 call $~lib/array/Array<~lib/array/Array>#flat local.tee $0 i32.store offset=144 @@ -28473,7 +27106,7 @@ local.get $1 local.get $3 local.get $5 - call $~lib/memory/memory.copy + memory.copy end local.get $4 local.get $1 @@ -28604,7 +27237,7 @@ i32.const 2 i32.shl local.tee $0 - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $5 i32.add @@ -28613,7 +27246,7 @@ local.get $2 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -28713,7 +27346,7 @@ local.get $2 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -28803,7 +27436,7 @@ local.get $5 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $3 local.get $4 local.get $5 @@ -28822,7 +27455,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $0 local.get $3 @@ -28919,7 +27552,7 @@ local.get $3 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $4 local.get $3 local.get $5 @@ -28938,7 +27571,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $0 local.get $4 @@ -29442,7 +28075,7 @@ local.get $0 f64.convert_i32_s f64.mul - i32.trunc_f64_s + i32.trunc_sat_f64_s call $~lib/array/Array#__set local.get $1 i32.const 1 @@ -29647,7 +28280,7 @@ local.get $3 i32.add local.get $2 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -30009,7 +28642,7 @@ local.tee $7 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $7 i32.add @@ -30026,7 +28659,7 @@ local.get $3 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $3 i32.add @@ -30064,7 +28697,7 @@ i32.shr_u i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy end global.get $~lib/memory/__stack_pointer i32.const 12 @@ -30194,7 +28827,7 @@ i32.const 2 i32.shl local.tee $6 - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $6 i32.add @@ -31218,7 +29851,7 @@ i32.const 2 i32.shl local.tee $0 - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $5 i32.add @@ -31227,7 +29860,7 @@ local.get $4 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -31561,7 +30194,7 @@ i32.const 2 i32.shl local.tee $4 - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $4 i32.add @@ -31790,7 +30423,7 @@ local.get $2 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -31910,7 +30543,7 @@ local.get $5 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $3 local.get $4 local.get $5 @@ -31929,7 +30562,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $0 local.get $3 @@ -32633,6 +31266,8 @@ global.set $~lib/memory/__stack_pointer ) (func $export:~lib/array/Array#fill@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -32669,14 +31304,71 @@ local.set $3 end local.get $0 - local.get $1 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=12 + local.set $5 local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $5 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $5 + local.get $2 + local.get $5 + i32.lt_s + select + end + local.tee $2 local.get $3 - call $~lib/array/Array#fill + i32.const 0 + i32.lt_s + if (result i32) + local.get $3 + local.get $5 + i32.add + local.tee $3 + i32.const 0 + local.get $3 + i32.const 0 + i32.gt_s + select + else + local.get $3 + local.get $5 + local.get $3 + local.get $5 + i32.lt_s + select + end + local.tee $3 + i32.lt_s + if + local.get $2 + local.get $4 + i32.add + local.get $1 + local.get $3 + local.get $2 + i32.sub + memory.fill + end global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $0 ) (func $export:~lib/array/Array#includes@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -33051,14 +31743,14 @@ local.get $0 i32.load offset=4 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.get $5 i32.add local.get $1 i32.load offset=4 local.get $4 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -33202,7 +31894,7 @@ local.get $2 i32.gt_s select - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -33472,7 +32164,7 @@ i32.const 1 i32.sub local.tee $3 - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $3 i32.add @@ -33598,7 +32290,7 @@ local.get $2 i32.const 1 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $3 local.get $1 i32.store8 @@ -33720,7 +32412,7 @@ i32.load offset=4 i32.add local.get $2 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -33836,7 +32528,7 @@ i32.add local.tee $6 local.get $5 - call $~lib/memory/memory.copy + memory.copy local.get $3 local.get $4 local.get $5 @@ -33851,7 +32543,7 @@ local.get $3 local.get $4 i32.sub - call $~lib/memory/memory.copy + memory.copy end local.get $0 local.get $3 @@ -35324,6 +34016,7 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -35350,7 +34043,7 @@ i32.store local.get $0 i32.load offset=12 - local.tee $2 + local.tee $3 i32.const 0 i32.le_s if @@ -35362,33 +34055,34 @@ unreachable end global.get $~lib/memory/__stack_pointer + local.tee $4 local.get $0 i32.load offset=4 - local.tee $1 + local.tee $2 i32.load - local.tee $3 + local.tee $1 i32.store - local.get $1 - local.get $1 + local.get $2 + local.get $2 i32.const 4 i32.add - local.get $2 + local.get $3 i32.const 1 i32.sub - local.tee $2 + local.tee $3 i32.const 2 i32.shl - local.tee $4 - call $~lib/memory/memory.copy - local.get $1 - local.get $4 + local.tee $5 + memory.copy + local.get $2 + local.get $5 i32.add i32.const 0 i32.store local.get $0 - local.get $2 + local.get $3 i32.store offset=12 - global.get $~lib/memory/__stack_pointer + local.get $4 i32.const 4 i32.add global.set $~lib/memory/__stack_pointer @@ -35396,7 +34090,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $1 return end i32.const 32064 @@ -35550,7 +34244,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $3 local.get $1 i32.store @@ -35835,7 +34529,7 @@ local.get $5 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $3 local.get $4 local.get $5 @@ -35854,7 +34548,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $0 local.get $3 diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index d5b1f26677..6823d50d80 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -47,11 +47,11 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $std/array/arr (mut i32) (i32.const 0)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) (global $std/array/i (mut i32) (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) @@ -2341,1818 +2341,334 @@ local.get $1 i32.const 4 i32.add - local.get $2 - i32.add - local.set $5 - local.get $5 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const 1 - i32.const -1 - i32.xor - i32.and - call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.get $1 - local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - i32.load - i32.const 2 - i32.const -1 - i32.xor - i32.and - call $~lib/rt/common/BLOCK#set:mmInfo - end - ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 - i32.eqz - if - local.get $0 - local.get $2 - call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - i32.const 1 - drop - local.get $3 - i32.eqz - if - i32.const 0 - i32.const 464 - i32.const 496 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - i32.const 1 - drop - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 464 - i32.const 498 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 - call $~lib/rt/tlsf/prepareBlock - i32.const 0 - drop - local.get $3 - ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - ) - (func $~lib/rt/itcms/Object#set:rtId (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/rt/itcms/Object#set:rtSize (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=16 - ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741804 - i32.ge_u - if - i32.const 128 - i32.const 192 - i32.const 260 - i32.const 31 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/itcms/total - global.get $~lib/rt/itcms/threshold - i32.ge_u - if - call $~lib/rt/itcms/interrupt - end - i32.const 16 - local.get $0 - i32.add - call $~lib/rt/tlsf/__alloc - i32.const 4 - i32.sub - local.set $2 - local.get $2 - local.get $1 - call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 - call $~lib/rt/itcms/Object#set:rtSize - local.get $2 - global.get $~lib/rt/itcms/fromSpace - global.get $~lib/rt/itcms/white - call $~lib/rt/itcms/Object#linkTo - global.get $~lib/rt/itcms/total - local.get $2 - call $~lib/rt/itcms/Object#get:size - i32.add - global.set $~lib/rt/itcms/total - local.get $2 - i32.const 20 - i32.add - local.set $3 - local.get $3 - i32.const 0 - local.get $0 - call $~lib/memory/memory.fill - local.get $3 - ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.eqz - if - return - end - i32.const 1 - drop - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 192 - i32.const 294 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 20 - i32.sub - local.set $3 - local.get $3 - call $~lib/rt/itcms/Object#get:color - global.get $~lib/rt/itcms/white - i32.eq - if - local.get $0 - i32.const 20 - i32.sub - local.set $4 - local.get $4 - call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 - global.get $~lib/rt/itcms/white - i32.eqz - i32.eq - if - local.get $2 - if - local.get $4 - call $~lib/rt/itcms/Object#makeGray - else - local.get $3 - call $~lib/rt/itcms/Object#makeGray - end - else - local.get $5 - i32.const 3 - i32.eq - if (result i32) - global.get $~lib/rt/itcms/state - i32.const 1 - i32.eq - else - i32.const 0 - end - if - local.get $3 - call $~lib/rt/itcms/Object#makeGray - end - end - end - ) - (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/array/Array#set:dataStart (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/array/Array#set:byteLength (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=8 - ) - (func $~lib/array/Array#set:length_ (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/array/Array.isArray<~lib/array/Array|null> (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - ) - (func $std/array/Ref#set:v (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store - ) - (func $~lib/array/Array.isArray (param $0 i32) (result i32) - i32.const 0 - ) - (func $~lib/arraybuffer/ArrayBufferView#set:buffer (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/arraybuffer/ArrayBufferView#set:dataStart (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/arraybuffer/ArrayBufferView#set:byteLength (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=8 - ) - (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (param $0 i32) (result i32) - i32.const 0 - ) - (func $~lib/array/Array.isArray (param $0 i32) (result i32) - i32.const 0 - ) - (func $~lib/array/Array.isArray<~lib/string/String> (param $0 i32) (result i32) - i32.const 0 - ) - (func $~lib/array/Array.isArray<~lib/array/Array> (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 + local.get $2 + i32.add + local.set $5 local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 + local.get $4 + i32.const 4 + i32.sub i32.const 1 - i32.add - local.set $0 + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $0 local.get $5 + call $~lib/rt/tlsf/insertBlock + else local.get $1 - local.tee $5 + local.get $3 i32.const 1 - i32.add - local.set $1 + i32.const -1 + i32.xor + i32.and + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $1 + local.set $5 local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 + i32.const 4 i32.add - local.set $0 local.get $5 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add local.get $1 - local.tee $5 - i32.const 1 + local.set $5 + local.get $5 + i32.const 4 i32.add - local.set $1 local.get $5 - i32.load8_u - i32.store8 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + i32.load + i32.const 2 + i32.const -1 + i32.xor + i32.and + call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $1 + call $~lib/rt/tlsf/prepareSize + local.set $2 + local.get $0 + local.get $2 + call $~lib/rt/tlsf/searchBlock + local.set $3 + local.get $3 + i32.eqz + if + local.get $0 + local.get $2 + call $~lib/rt/tlsf/growMemory local.get $0 - local.set $5 - local.get $1 - local.set $4 local.get $2 + call $~lib/rt/tlsf/searchBlock local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 i32.const 1 - i32.lt_s drop - local.get $4 - local.get $5 - i32.sub local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u + i32.eqz if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 + i32.const 0 + i32.const 464 + i32.const 496 + i32.const 16 + call $~lib/builtins/abort + unreachable end - local.get $5 + end + i32.const 1 + drop + local.get $3 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 464 + i32.const 498 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $3 + call $~lib/rt/tlsf/removeBlock + local.get $0 + local.get $3 + local.get $2 + call $~lib/rt/tlsf/prepareBlock + i32.const 0 + drop + local.get $3 + ) + (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + ) + (func $~lib/rt/itcms/Object#set:rtId (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/rt/itcms/Object#set:rtSize (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=16 + ) + (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741804 + i32.ge_u + if + i32.const 128 + i32.const 192 + i32.const 260 + i32.const 31 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.ge_u + if + call $~lib/rt/itcms/interrupt + end + i32.const 16 + local.get $0 + i32.add + call $~lib/rt/tlsf/__alloc + i32.const 4 + i32.sub + local.set $2 + local.get $2 + local.get $1 + call $~lib/rt/itcms/Object#set:rtId + local.get $2 + local.get $0 + call $~lib/rt/itcms/Object#set:rtSize + local.get $2 + global.get $~lib/rt/itcms/fromSpace + global.get $~lib/rt/itcms/white + call $~lib/rt/itcms/Object#linkTo + global.get $~lib/rt/itcms/total + local.get $2 + call $~lib/rt/itcms/Object#get:size + i32.add + global.set $~lib/rt/itcms/total + local.get $2 + i32.const 20 + i32.add + local.set $3 + local.get $3 + i32.const 0 + local.get $0 + memory.fill + local.get $3 + ) + (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.eqz + if + return + end + i32.const 1 + drop + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 192 + i32.const 294 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 20 + i32.sub + local.set $3 + local.get $3 + call $~lib/rt/itcms/Object#get:color + global.get $~lib/rt/itcms/white + i32.eq + if + local.get $0 + i32.const 20 + i32.sub + local.set $4 local.get $4 - i32.lt_u + call $~lib/rt/itcms/Object#get:color + local.set $5 + local.get $5 + global.get $~lib/rt/itcms/white + i32.eqz + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq + local.get $2 if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + local.get $4 + call $~lib/rt/itcms/Object#makeGray + else local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end + call $~lib/rt/itcms/Object#makeGray end else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and local.get $5 - i32.const 7 - i32.and + i32.const 3 i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end + if (result i32) + global.get $~lib/rt/itcms/state + i32.const 1 + i32.eq + else + i32.const 0 end - loop $while-continue|5 + if local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end + call $~lib/rt/itcms/Object#makeGray end end end ) + (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.const 0 + call $~lib/rt/itcms/__link + ) + (func $~lib/array/Array#set:dataStart (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=4 + ) + (func $~lib/array/Array#set:byteLength (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=8 + ) + (func $~lib/array/Array#set:length_ (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array.isArray<~lib/array/Array|null> (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + ) + (func $std/array/Ref#set:v (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store + ) + (func $~lib/array/Array.isArray (param $0 i32) (result i32) + i32.const 0 + ) + (func $~lib/arraybuffer/ArrayBufferView#set:buffer (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.const 0 + call $~lib/rt/itcms/__link + ) + (func $~lib/arraybuffer/ArrayBufferView#set:dataStart (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=4 + ) + (func $~lib/arraybuffer/ArrayBufferView#set:byteLength (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=8 + ) + (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (param $0 i32) (result i32) + i32.const 0 + ) + (func $~lib/array/Array.isArray (param $0 i32) (result i32) + i32.const 0 + ) + (func $~lib/array/Array.isArray<~lib/string/String> (param $0 i32) (result i32) + i32.const 0 + ) + (func $~lib/array/Array.isArray<~lib/array/Array> (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + ) (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 @@ -4164,7 +2680,7 @@ local.get $3 local.get $2 local.get $0 - call $~lib/memory/memory.copy + memory.copy end local.get $3 ) @@ -4246,7 +2762,7 @@ local.get $3 local.get $2 i32.sub - call $~lib/memory/memory.fill + memory.fill end local.get $0 ) @@ -4564,7 +3080,7 @@ local.get $5 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy local.get $3 ) (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) @@ -4945,7 +3461,7 @@ local.get $11 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 ) (func $std/array/isArraysEqual (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -5029,7 +3545,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $3 local.get $1 i32.store @@ -5076,7 +3592,7 @@ local.get $4 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy i32.const 0 drop local.get $2 @@ -17168,7 +15684,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $3 i32.const 1 @@ -17205,7 +15721,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 48 i32.const 46 @@ -17312,7 +15828,7 @@ local.get $7 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -17526,7 +16042,7 @@ f64.add local.set $16 local.get $16 - i32.trunc_f64_s + i32.trunc_sat_f64_s local.set $15 local.get $15 local.get $15 @@ -19530,7 +18046,7 @@ local.get $11 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 ) (func $~lib/array/Array#pop (param $0 i32) (result i32) @@ -19649,7 +18165,7 @@ local.get $4 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy i32.const 0 drop local.get $2 @@ -19741,7 +18257,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $3 local.get $1 i32.store @@ -20447,7 +18963,7 @@ local.get $11 i32.const 0 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 ) (func $~lib/array/Array#pop (param $0 i32) (result i32) @@ -20566,7 +19082,7 @@ local.get $4 i32.const 0 i32.shl - call $~lib/memory/memory.copy + memory.copy i32.const 0 drop local.get $2 @@ -20658,7 +19174,7 @@ i32.sub i32.const 0 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $3 local.get $1 i32.store8 @@ -21893,7 +20409,7 @@ local.get $11 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 ) (func $~lib/array/Array<~lib/string/String>#unshift (param $0 i32) (param $1 i32) (result i32) @@ -21921,7 +20437,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $3 local.get $1 i32.store @@ -24180,14 +22696,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 + i32.const 0 + i32.const 24 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/array/inputStabArr local.set $7 @@ -25477,7 +23988,7 @@ local.set $4 local.get $4 f64.floor - i32.trunc_f64_s + i32.trunc_sat_f64_s call $~lib/string/String#charAt local.set $5 global.get $~lib/memory/__stack_pointer @@ -25535,7 +24046,7 @@ call $~lib/math/NativeMath.random f64.const 32 f64.mul - i32.trunc_f64_s + i32.trunc_sat_f64_s call $std/array/createRandomString local.set $4 global.get $~lib/memory/__stack_pointer @@ -27251,71 +25762,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=40 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=48 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=56 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=64 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=72 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=80 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=88 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=96 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=104 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=112 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=120 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=128 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=136 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=144 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=152 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=160 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=168 + i32.const 172 + memory.fill i32.const 0 i32.const 0 i32.eq @@ -37305,7 +35754,7 @@ local.get $0 i32.load offset=4 local.get $7 - call $~lib/memory/memory.copy + memory.copy local.get $6 local.get $7 i32.add @@ -37314,7 +35763,7 @@ local.get $3 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $5 local.set $8 global.get $~lib/memory/__stack_pointer @@ -37428,7 +35877,7 @@ local.get $3 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $6 local.set $9 global.get $~lib/memory/__stack_pointer @@ -37526,7 +35975,7 @@ local.get $2 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $2 i32.add @@ -37546,7 +35995,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $0 local.get $3 @@ -37650,7 +36099,7 @@ local.get $2 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $2 i32.add @@ -37670,7 +36119,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $0 local.get $3 @@ -37830,7 +36279,7 @@ local.get $2 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $2 i32.add @@ -37850,7 +36299,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $0 local.get $3 @@ -38453,7 +36902,7 @@ local.get $0 f64.convert_i32_s f64.mul - i32.trunc_f64_s + i32.trunc_sat_f64_s call $~lib/array/Array#__set local.get $2 i32.const 1 @@ -39288,13 +37737,13 @@ local.get $5 local.get $0 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.get $2 i32.add local.get $1 local.get $3 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.set $6 global.get $~lib/memory/__stack_pointer @@ -39483,7 +37932,7 @@ local.get $8 i32.add local.get $10 - call $~lib/memory/memory.copy + memory.copy local.get $11 local.set $12 global.get $~lib/memory/__stack_pointer @@ -39599,7 +38048,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -39615,7 +38064,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $4 i32.add @@ -39650,7 +38099,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -39962,7 +38411,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -40273,7 +38722,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -40401,7 +38850,7 @@ local.get $2 i32.const 10880 local.get $1 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.set $3 global.get $~lib/memory/__stack_pointer @@ -40517,7 +38966,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $7 local.get $4 i32.add @@ -40720,7 +39169,7 @@ local.get $11 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $11 i32.add @@ -40737,7 +39186,7 @@ local.get $9 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $9 i32.add @@ -40773,7 +39222,7 @@ call $~lib/string/String#get:length i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $10 local.set $12 @@ -40899,7 +39348,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -41069,7 +39518,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -41418,7 +39867,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -41796,7 +40245,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -41966,7 +40415,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -42154,7 +40603,7 @@ local.get $6 i32.load offset=4 local.get $11 - call $~lib/memory/memory.copy + memory.copy local.get $10 local.get $11 i32.add @@ -42311,7 +40760,7 @@ local.get $6 i32.load offset=4 local.get $11 - call $~lib/memory/memory.copy + memory.copy local.get $10 local.get $11 i32.add @@ -42550,7 +40999,7 @@ local.get $0 i32.load offset=4 local.get $7 - call $~lib/memory/memory.copy + memory.copy local.get $6 local.get $7 i32.add @@ -42559,7 +41008,7 @@ local.get $3 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $5 local.set $8 global.get $~lib/memory/__stack_pointer @@ -42753,7 +41202,7 @@ local.get $3 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $6 local.set $9 global.get $~lib/memory/__stack_pointer @@ -42851,7 +41300,7 @@ local.get $2 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $2 i32.add @@ -42871,7 +41320,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $0 local.get $3 @@ -43075,7 +41524,7 @@ local.get $0 i32.load offset=4 local.get $7 - call $~lib/memory/memory.copy + memory.copy local.get $6 local.get $7 i32.add @@ -43084,7 +41533,7 @@ local.get $3 i32.const 0 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $5 local.set $8 global.get $~lib/memory/__stack_pointer @@ -43278,7 +41727,7 @@ local.get $3 i32.const 0 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $6 local.set $9 global.get $~lib/memory/__stack_pointer @@ -43376,7 +41825,7 @@ local.get $2 i32.const 0 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $2 i32.add @@ -43396,7 +41845,7 @@ i32.sub i32.const 0 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $0 local.get $3 @@ -43841,7 +42290,7 @@ local.get $4 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy i32.const 1 drop local.get $2 @@ -44095,7 +42544,7 @@ local.get $2 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $2 i32.add @@ -44115,7 +42564,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $0 local.get $3 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 9370682b21..fbf97f2cbe 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -2,9 +2,9 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -1504,1229 +1504,180 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 + ) + (func $~lib/rt/__visit_members (param $0 i32) + block $folding-inner2 + block $folding-inner1 + block $invalid + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner1 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner1 $invalid + end + return + end + return + end + unreachable + end local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 + i32.load + local.tee $0 + if + local.get $0 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + return + end + local.get $0 + i32.load + local.tee $0 + if local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end + ) + (func $~start + call $start:std/arraybuffer + ) + (func $start:std/arraybuffer + (local $0 i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 1844 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $0 i32.const 0 - i32.store8 - local.get $3 - i32.const 3 + i32.const 20 + memory.fill + memory.size + i32.const 16 + i32.shl + i32.const 18228 i32.sub - i32.const 0 - i32.store8 + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 1284 + i32.const 1280 + i32.store + i32.const 1288 + i32.const 1280 + i32.store + i32.const 1280 + global.set $~lib/rt/itcms/pinSpace + i32.const 1316 + i32.const 1312 + i32.store + i32.const 1320 + i32.const 1312 + i32.store + i32.const 1312 + global.set $~lib/rt/itcms/toSpace + i32.const 1460 + i32.const 1456 + i32.store + i32.const 1464 + i32.const 1456 + i32.store + i32.const 1456 + global.set $~lib/rt/itcms/fromSpace local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 i32.const 4 i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1844 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer local.tee $1 i32.const 0 i32.store local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub + i32.const 8 i32.const 0 + call $~lib/rt/itcms/__new + local.tee $1 i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 local.get $1 - i32.const 0 - i32.store offset=4 + i32.store local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 + i32.const 20 i32.sub - i32.const 0 - i32.store - local.get $3 + i32.load offset=16 i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 4 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer local.get $1 i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 + i32.const 1073741820 + call $~lib/arraybuffer/ArrayBuffer#slice + local.tee $0 + i32.store offset=4 + local.get $0 i32.const 20 i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store + i32.load offset=16 + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 8 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 local.get $1 + i32.eq + if + i32.const 0 + i32.const 1568 + i32.const 9 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 + i32.const 1 + i32.const 1073741820 + call $~lib/arraybuffer/ArrayBuffer#slice + local.tee $0 + i32.store offset=4 local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) - (func $~lib/rt/__visit_members (param $0 i32) - block $folding-inner2 - block $folding-inner1 - block $invalid - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner1 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner1 $invalid - end - return - end - return - end - unreachable - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - ) - (func $~start - call $start:std/arraybuffer - ) - (func $start:std/arraybuffer - (local $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.sub - global.set $~lib/memory/__stack_pointer - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 1844 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=16 - memory.size - i32.const 16 - i32.shl - i32.const 18228 - i32.sub - i32.const 1 - i32.shr_u - global.set $~lib/rt/itcms/threshold - i32.const 1284 - i32.const 1280 - i32.store - i32.const 1288 - i32.const 1280 - i32.store - i32.const 1280 - global.set $~lib/rt/itcms/pinSpace - i32.const 1316 - i32.const 1312 - i32.store - i32.const 1320 - i32.const 1312 - i32.store - i32.const 1312 - global.set $~lib/rt/itcms/toSpace - i32.const 1460 - i32.const 1456 - i32.store - i32.const 1464 - i32.const 1456 - i32.store - i32.const 1456 - global.set $~lib/rt/itcms/fromSpace - local.get $0 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1844 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $1 - i32.const 0 - i32.store - local.get $1 - i32.const 8 - i32.const 0 - call $~lib/rt/itcms/__new - local.tee $1 - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - local.get $1 - i32.store - local.get $1 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 8 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 4 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.const 0 - i32.const 1073741820 - call $~lib/arraybuffer/ArrayBuffer#slice - local.tee $0 - i32.store offset=4 - local.get $0 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 8 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 8 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - i32.const 1568 - i32.const 9 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $1 - i32.const 1 - i32.const 1073741820 - call $~lib/arraybuffer/ArrayBuffer#slice - local.tee $0 - i32.store offset=4 - local.get $0 - i32.const 20 + i32.const 20 i32.sub i32.load offset=16 i32.const 7 @@ -2922,8 +1873,8 @@ call $~lib/rt/itcms/__new local.tee $2 i32.const 1632 - i32.const 8 - call $~lib/memory/memory.copy + i64.load align=1 + i64.store align=1 local.get $0 local.get $2 i32.store @@ -3198,7 +2149,7 @@ local.get $1 i32.add local.get $2 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 5a4246d53b..5a45fe2848 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -2,10 +2,10 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -24,7 +24,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 688)) @@ -2070,237 +2069,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2350,7 +2118,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $0 i32) (result i32) @@ -2359,1262 +2127,9 @@ i32.sub i32.load offset=16 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array|null> (param $0 i32) (result i32) - i32.const 1 - drop + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array|null> (param $0 i32) (result i32) + i32.const 1 + drop local.get $0 i32.const 0 i32.eq @@ -3854,7 +2369,7 @@ local.get $3 local.get $2 local.get $0 - call $~lib/memory/memory.copy + memory.copy end local.get $3 ) @@ -4271,14 +2786,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill memory.size i32.const 16 i32.shl @@ -4793,7 +3303,7 @@ local.get $1 i32.add local.get $6 - call $~lib/memory/memory.copy + memory.copy local.get $7 local.set $8 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 118ca81cc6..5a38fa8724 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1510,182 +1510,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/typedarray/Uint8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 2fedbdd27f..5a1c0bd17a 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -31,7 +31,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 720)) @@ -2077,237 +2076,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2357,7 +2125,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 923bcd9b13..8f122fe148 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_i32_i32_i32_=>_i64 (func (param i32 i32 i32 i32 i32 i32 i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -28,208 +28,108 @@ (global $~lib/memory/__stack_pointer (mut i32) (i32.const 23948)) (global $~started (mut i32) (i32.const 0)) (memory $0 1) - (data (i32.const 1036) ",") - (data (i32.const 1048) "\01\00\00\00\18\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00D\00a\00t\00e") - (data (i32.const 1084) ",") - (data (i32.const 1096) "\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00e\00.\00t\00s") - (data (i32.const 1132) ",") - (data (i32.const 1144) "\01\00\00\00\16\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s") - (data (i32.const 1180) "<") - (data (i32.const 1192) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1244) "<") - (data (i32.const 1256) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") - (data (i32.const 1372) "<") - (data (i32.const 1384) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") - (data (i32.const 1436) ",") - (data (i32.const 1448) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 1516) "<") - (data (i32.const 1528) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 1036) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00D\00a\00t\00e") + (data (i32.const 1084) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00e\00.\00t\00s") + (data (i32.const 1132) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s") + (data (i32.const 1180) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 1244) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 1372) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data (i32.const 1436) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data (i32.const 1516) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 1581) "\03\02\05\00\03\05\01\04\06\02\04") - (data (i32.const 1596) "\1c") - (data (i32.const 1608) "\01\00\00\00\02\00\00\00-") - (data (i32.const 1628) "\1c") - (data (i32.const 1640) "\01\00\00\00\02\00\00\00+") - (data (i32.const 1660) "|") - (data (i32.const 1672) "\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") - (data (i32.const 1788) "<") - (data (i32.const 1800) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") - (data (i32.const 1852) "\1c") - (data (i32.const 1864) "\01\00\00\00\02\00\00\000") + (data (i32.const 1596) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00-") + (data (i32.const 1628) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00+") + (data (i32.const 1660) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") + (data (i32.const 1788) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") + (data (i32.const 1852) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\000") (data (i32.const 1884) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 2284) "\1c\04") - (data (i32.const 2296) "\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") - (data (i32.const 3340) "\\") - (data (i32.const 3352) "\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") - (data (i32.const 3436) "\1c") - (data (i32.const 3448) "\01") - (data (i32.const 3468) "\1c") - (data (i32.const 3480) "\01\00\00\00\02\00\00\00T") - (data (i32.const 3500) "\1c") - (data (i32.const 3512) "\01\00\00\00\02\00\00\00:") - (data (i32.const 3532) "\1c") - (data (i32.const 3544) "\01\00\00\00\02\00\00\00.") - (data (i32.const 3564) "\1c") - (data (i32.const 3576) "\01\00\00\00\02\00\00\00Z") - (data (i32.const 3596) "L") - (data (i32.const 3608) "\01\00\00\000\00\00\000\000\000\000\00-\000\001\00-\000\001\00T\000\000\00:\000\000\00:\000\000\00.\000\000\000\00Z") - (data (i32.const 3676) "L") - (data (i32.const 3688) "\01\00\00\006\00\00\00-\000\000\000\000\000\001\00-\001\002\00-\003\001\00T\002\003\00:\005\009\00:\005\009\00.\009\009\009\00Z") - (data (i32.const 3756) "L") - (data (i32.const 3768) "\01\00\00\000\00\00\000\000\000\001\00-\000\004\00-\000\007\00T\002\003\00:\000\006\00:\004\000\00.\000\000\000\00Z") - (data (i32.const 3836) "L") - (data (i32.const 3848) "\01\00\00\000\00\00\002\000\000\009\00-\000\001\00-\000\006\00T\000\008\00:\004\000\00:\003\001\00.\000\002\000\00Z") - (data (i32.const 3916) "L") - (data (i32.const 3928) "\01\00\00\000\00\00\002\000\000\009\00-\000\001\00-\000\006\00T\000\008\00:\004\000\00:\003\001\00.\004\005\006\00Z") - (data (i32.const 3996) "L") - (data (i32.const 4008) "\01\00\00\006\00\00\00+\000\001\002\001\008\004\00-\000\004\00-\000\008\00T\001\003\00:\000\007\00:\001\001\00.\000\002\000\00Z") - (data (i32.const 4076) "L") - (data (i32.const 4088) "\01\00\00\000\00\00\009\009\009\009\00-\001\002\00-\003\001\00T\002\003\00:\005\009\00:\005\009\00.\009\009\009\00Z") - (data (i32.const 4156) "L") - (data (i32.const 4168) "\01\00\00\006\00\00\00+\000\001\000\000\000\000\00-\000\001\00-\000\001\00T\000\000\00:\000\000\00:\000\000\00.\000\000\000\00Z") - (data (i32.const 4236) "L") - (data (i32.const 4248) "\01\00\00\006\00\00\00-\000\000\000\000\002\002\00-\000\006\00-\001\006\00T\001\007\00:\001\003\00:\005\000\00.\007\007\004\00Z") - (data (i32.const 4316) "\1c") - (data (i32.const 4328) "\01\00\00\00\08\00\00\00S\00u\00n\00 ") - (data (i32.const 4348) "\1c") - (data (i32.const 4360) "\01\00\00\00\08\00\00\00M\00o\00n\00 ") - (data (i32.const 4380) "\1c") - (data (i32.const 4392) "\01\00\00\00\08\00\00\00T\00u\00e\00 ") - (data (i32.const 4412) "\1c") - (data (i32.const 4424) "\01\00\00\00\08\00\00\00W\00e\00d\00 ") - (data (i32.const 4444) "\1c") - (data (i32.const 4456) "\01\00\00\00\08\00\00\00T\00h\00u\00 ") - (data (i32.const 4476) "\1c") - (data (i32.const 4488) "\01\00\00\00\08\00\00\00F\00r\00i\00 ") - (data (i32.const 4508) "\1c") - (data (i32.const 4520) "\01\00\00\00\08\00\00\00S\00a\00t\00 ") - (data (i32.const 4540) ",") - (data (i32.const 4552) "\04\00\00\00\1c\00\00\00\f0\10\00\00\10\11\00\000\11\00\00P\11\00\00p\11\00\00\90\11\00\00\b0\11") - (data (i32.const 4588) "\1c") - (data (i32.const 4600) "\01\00\00\00\08\00\00\00J\00a\00n\00 ") - (data (i32.const 4620) "\1c") - (data (i32.const 4632) "\01\00\00\00\08\00\00\00F\00e\00b\00 ") - (data (i32.const 4652) "\1c") - (data (i32.const 4664) "\01\00\00\00\08\00\00\00M\00a\00r\00 ") - (data (i32.const 4684) "\1c") - (data (i32.const 4696) "\01\00\00\00\08\00\00\00A\00p\00r\00 ") - (data (i32.const 4716) "\1c") - (data (i32.const 4728) "\01\00\00\00\08\00\00\00M\00a\00y\00 ") - (data (i32.const 4748) "\1c") - (data (i32.const 4760) "\01\00\00\00\08\00\00\00J\00u\00n\00 ") - (data (i32.const 4780) "\1c") - (data (i32.const 4792) "\01\00\00\00\08\00\00\00J\00u\00l\00 ") - (data (i32.const 4812) "\1c") - (data (i32.const 4824) "\01\00\00\00\08\00\00\00A\00u\00g\00 ") - (data (i32.const 4844) "\1c") - (data (i32.const 4856) "\01\00\00\00\08\00\00\00S\00e\00p\00 ") - (data (i32.const 4876) "\1c") - (data (i32.const 4888) "\01\00\00\00\08\00\00\00O\00c\00t\00 ") - (data (i32.const 4908) "\1c") - (data (i32.const 4920) "\01\00\00\00\08\00\00\00N\00o\00v\00 ") - (data (i32.const 4940) "\1c") - (data (i32.const 4952) "\01\00\00\00\08\00\00\00D\00e\00c\00 ") - (data (i32.const 4972) "L") - (data (i32.const 4984) "\04\00\00\000\00\00\00\00\12\00\00 \12\00\00@\12\00\00`\12\00\00\80\12\00\00\a0\12\00\00\c0\12\00\00\e0\12\00\00\00\13\00\00 \13\00\00@\13\00\00`\13") - (data (i32.const 5052) "\1c") - (data (i32.const 5064) "\01\00\00\00\02\00\00\00 ") - (data (i32.const 5084) "<") - (data (i32.const 5096) "\01\00\00\00\1e\00\00\00W\00e\00d\00 \00J\00a\00n\00 \000\001\00 \000\000\002\000") - (data (i32.const 5148) "<") - (data (i32.const 5160) "\01\00\00\00\1e\00\00\00S\00u\00n\00 \00F\00e\00b\00 \000\002\00 \002\000\002\000") - (data (i32.const 5212) "<") - (data (i32.const 5224) "\01\00\00\00 \00\00\00T\00h\00u\00 \00J\00u\00l\00 \000\001\00 \00-\000\000\000\001") - (data (i32.const 5276) ",") - (data (i32.const 5288) "\01\00\00\00\10\00\00\000\000\00:\000\000\00:\000\000") - (data (i32.const 5324) ",") - (data (i32.const 5336) "\01\00\00\00\10\00\00\002\003\00:\005\009\00:\005\009") - (data (i32.const 5372) "\1c") - (data (i32.const 5384) "\01\00\00\00\n\00\00\00S\00u\00n\00,\00 ") - (data (i32.const 5404) "\1c") - (data (i32.const 5416) "\01\00\00\00\n\00\00\00M\00o\00n\00,\00 ") - (data (i32.const 5436) "\1c") - (data (i32.const 5448) "\01\00\00\00\n\00\00\00T\00u\00e\00,\00 ") - (data (i32.const 5468) "\1c") - (data (i32.const 5480) "\01\00\00\00\n\00\00\00W\00e\00d\00,\00 ") - (data (i32.const 5500) "\1c") - (data (i32.const 5512) "\01\00\00\00\n\00\00\00T\00h\00u\00,\00 ") - (data (i32.const 5532) "\1c") - (data (i32.const 5544) "\01\00\00\00\n\00\00\00F\00r\00i\00,\00 ") - (data (i32.const 5564) "\1c") - (data (i32.const 5576) "\01\00\00\00\n\00\00\00S\00a\00t\00,\00 ") - (data (i32.const 5596) ",") - (data (i32.const 5608) "\04\00\00\00\1c\00\00\00\10\15\00\000\15\00\00P\15\00\00p\15\00\00\90\15\00\00\b0\15\00\00\d0\15") - (data (i32.const 5644) "\1c") - (data (i32.const 5656) "\01\00\00\00\n\00\00\00 \00J\00a\00n\00 ") - (data (i32.const 5676) "\1c") - (data (i32.const 5688) "\01\00\00\00\n\00\00\00 \00F\00e\00b\00 ") - (data (i32.const 5708) "\1c") - (data (i32.const 5720) "\01\00\00\00\n\00\00\00 \00M\00a\00r\00 ") - (data (i32.const 5740) "\1c") - (data (i32.const 5752) "\01\00\00\00\n\00\00\00 \00A\00p\00r\00 ") - (data (i32.const 5772) "\1c") - (data (i32.const 5784) "\01\00\00\00\n\00\00\00 \00M\00a\00y\00 ") - (data (i32.const 5804) "\1c") - (data (i32.const 5816) "\01\00\00\00\n\00\00\00 \00J\00u\00n\00 ") - (data (i32.const 5836) "\1c") - (data (i32.const 5848) "\01\00\00\00\n\00\00\00 \00J\00u\00l\00 ") - (data (i32.const 5868) "\1c") - (data (i32.const 5880) "\01\00\00\00\n\00\00\00 \00A\00u\00g\00 ") - (data (i32.const 5900) "\1c") - (data (i32.const 5912) "\01\00\00\00\n\00\00\00 \00S\00e\00p\00 ") - (data (i32.const 5932) "\1c") - (data (i32.const 5944) "\01\00\00\00\n\00\00\00 \00O\00c\00t\00 ") - (data (i32.const 5964) "\1c") - (data (i32.const 5976) "\01\00\00\00\n\00\00\00 \00N\00o\00v\00 ") - (data (i32.const 5996) "\1c") - (data (i32.const 6008) "\01\00\00\00\n\00\00\00 \00D\00e\00c\00 ") - (data (i32.const 6028) "L") - (data (i32.const 6040) "\04\00\00\000\00\00\00 \16\00\00@\16\00\00`\16\00\00\80\16\00\00\a0\16\00\00\c0\16\00\00\e0\16\00\00\00\17\00\00 \17\00\00@\17\00\00`\17\00\00\80\17") - (data (i32.const 6108) "\1c") - (data (i32.const 6120) "\01\00\00\00\08\00\00\00 \00G\00M\00T") - (data (i32.const 6140) "L") - (data (i32.const 6152) "\01\00\00\00:\00\00\00W\00e\00d\00,\00 \000\001\00 \00J\00a\00n\00 \000\000\002\000\00 \000\000\00:\000\000\00:\000\000\00 \00G\00M\00T") - (data (i32.const 6220) "L") - (data (i32.const 6232) "\01\00\00\00:\00\00\00M\00o\00n\00,\00 \000\003\00 \00F\00e\00b\00 \002\000\002\000\00 \001\004\00:\005\003\00:\003\003\00 \00G\00M\00T") - (data (i32.const 6300) "L") - (data (i32.const 6312) "\01\00\00\00<\00\00\00T\00h\00u\00,\00 \000\001\00 \00J\00u\00l\00 \00-\000\000\000\001\00 \000\000\00:\000\000\00:\000\000\00 \00G\00M\00T") - (data (i32.const 6380) ",") - (data (i32.const 6392) "\01\00\00\00\14\00\00\001\009\007\006\00-\000\002\00-\000\002") - (data (i32.const 6428) ",") - (data (i32.const 6440) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") - (data (i32.const 6476) ",") - (data (i32.const 6488) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 6524) "|") - (data (i32.const 6536) "\01\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y") - (data (i32.const 6652) ",") - (data (i32.const 6664) "\01\00\00\00\10\00\00\001\009\007\006\00-\002\00-\002") - (data (i32.const 6700) ",") - (data (i32.const 6712) "\01\00\00\00\14\00\00\002\003\004\005\00-\001\001\00-\000\004") - (data (i32.const 6748) "<") - (data (i32.const 6760) "\01\00\00\00&\00\00\001\009\007\006\00-\000\002\00-\000\002\00T\001\002\00:\003\004\00:\005\006") - (data (i32.const 6812) "L") - (data (i32.const 6824) "\01\00\00\00.\00\00\001\009\007\006\00-\000\002\00-\000\002\00T\001\002\00:\003\004\00:\005\006\00.\004\005\006") - (data (i32.const 6892) "L") - (data (i32.const 6904) "\01\00\00\000\00\00\001\009\007\006\00-\000\002\00-\000\002\00T\001\002\00:\003\004\00:\005\006\00.\004\005\006\00Z") - (data (i32.const 6972) "\1c") - (data (i32.const 6984) "\01\00\00\00\08\00\00\000\000\000\000") - (data (i32.const 7004) "\1c") - (data (i32.const 7016) "\01\00\00\00\08\00\00\000\000\000\001") - (data (i32.const 7036) "\1c") - (data (i32.const 7048) "\01\00\00\00\08\00\00\001\009\007\006") - (data (i32.const 7068) ",") - (data (i32.const 7080) "\01\00\00\00\0e\00\00\001\009\007\006\00-\000\002") - (data (i32.const 7116) "<") - (data (i32.const 7128) "\01\00\00\00 \00\00\001\009\007\006\00-\000\002\00-\000\002\00T\001\002\00:\003\004") - (data (i32.const 7180) "L") - (data (i32.const 7192) "\01\00\00\006\00\00\00-\002\007\001\008\002\001\00-\000\004\00-\002\000\00T\000\000\00:\000\000\00:\000\000\00.\000\000\000\00Z") - (data (i32.const 7260) "L") - (data (i32.const 7272) "\01\00\00\006\00\00\00+\002\007\005\007\006\000\00-\000\009\00-\001\003\00T\000\000\00:\000\000\00:\000\000\00.\000\000\000\00Z") - (data (i32.const 7340) "L") - (data (i32.const 7352) "\01\00\00\006\00\00\00+\002\007\005\007\006\000\00-\000\009\00-\001\002\00T\002\003\00:\005\009\00:\005\009\00.\009\009\009\00Z") - (data (i32.const 7420) "L") - (data (i32.const 7432) "\01\00\00\006\00\00\00-\002\007\001\008\002\001\00-\000\004\00-\002\000\00T\000\000\00:\000\000\00:\000\000\00.\000\000\001\00Z") - (data (i32.const 7504) "\07\00\00\00 \00\00\00\00\00\00\00 ") - (data (i32.const 7532) " \00\00\00\00\00\00\00\04A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t") + (data (i32.const 2284) "\1c\04\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") + (data (i32.const 3340) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") + (data (i32.const 3436) "\1c\00\00\00\00\00\00\00\00\00\00\00\01") + (data (i32.const 3468) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00T") + (data (i32.const 3500) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00:") + (data (i32.const 3532) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00.") + (data (i32.const 3564) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00Z") + (data (i32.const 3596) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\000\00\00\000\000\000\000\00-\000\001\00-\000\001\00T\000\000\00:\000\000\00:\000\000\00.\000\000\000\00Z") + (data (i32.const 3676) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\006\00\00\00-\000\000\000\000\000\001\00-\001\002\00-\003\001\00T\002\003\00:\005\009\00:\005\009\00.\009\009\009\00Z") + (data (i32.const 3756) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\000\00\00\000\000\000\001\00-\000\004\00-\000\007\00T\002\003\00:\000\006\00:\004\000\00.\000\000\000\00Z") + (data (i32.const 3836) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\000\00\00\002\000\000\009\00-\000\001\00-\000\006\00T\000\008\00:\004\000\00:\003\001\00.\000\002\000\00Z") + (data (i32.const 3916) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\000\00\00\002\000\000\009\00-\000\001\00-\000\006\00T\000\008\00:\004\000\00:\003\001\00.\004\005\006\00Z") + (data (i32.const 3996) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\006\00\00\00+\000\001\002\001\008\004\00-\000\004\00-\000\008\00T\001\003\00:\000\007\00:\001\001\00.\000\002\000\00Z") + (data (i32.const 4076) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\000\00\00\009\009\009\009\00-\001\002\00-\003\001\00T\002\003\00:\005\009\00:\005\009\00.\009\009\009\00Z") + (data (i32.const 4156) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\006\00\00\00+\000\001\000\000\000\000\00-\000\001\00-\000\001\00T\000\000\00:\000\000\00:\000\000\00.\000\000\000\00Z") + (data (i32.const 4236) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\006\00\00\00-\000\000\000\000\002\002\00-\000\006\00-\001\006\00T\001\007\00:\001\003\00:\005\000\00.\007\007\004\00Z") + (data (i32.const 4316) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00S\00u\00n\00 ") + (data (i32.const 4348) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00M\00o\00n\00 ") + (data (i32.const 4380) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00T\00u\00e\00 ") + (data (i32.const 4412) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00W\00e\00d\00 ") + (data (i32.const 4444) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00T\00h\00u\00 ") + (data (i32.const 4476) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00F\00r\00i\00 ") + (data (i32.const 4508) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00S\00a\00t\00 ") + (data (i32.const 4540) ",\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\1c\00\00\00\f0\10\00\00\10\11\00\000\11\00\00P\11\00\00p\11\00\00\90\11\00\00\b0\11") + (data (i32.const 4588) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00J\00a\00n\00 ") + (data (i32.const 4620) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00F\00e\00b\00 ") + (data (i32.const 4652) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00M\00a\00r\00 ") + (data (i32.const 4684) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00A\00p\00r\00 ") + (data (i32.const 4716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00M\00a\00y\00 ") + (data (i32.const 4748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00J\00u\00n\00 ") + (data (i32.const 4780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00J\00u\00l\00 ") + (data (i32.const 4812) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00A\00u\00g\00 ") + (data (i32.const 4844) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00S\00e\00p\00 ") + (data (i32.const 4876) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00O\00c\00t\00 ") + (data (i32.const 4908) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00N\00o\00v\00 ") + (data (i32.const 4940) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00D\00e\00c\00 ") + (data (i32.const 4972) "L\00\00\00\00\00\00\00\00\00\00\00\04\00\00\000\00\00\00\00\12\00\00 \12\00\00@\12\00\00`\12\00\00\80\12\00\00\a0\12\00\00\c0\12\00\00\e0\12\00\00\00\13\00\00 \13\00\00@\13\00\00`\13") + (data (i32.const 5052) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00 ") + (data (i32.const 5084) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00W\00e\00d\00 \00J\00a\00n\00 \000\001\00 \000\000\002\000") + (data (i32.const 5148) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00S\00u\00n\00 \00F\00e\00b\00 \000\002\00 \002\000\002\000") + (data (i32.const 5212) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00T\00h\00u\00 \00J\00u\00l\00 \000\001\00 \00-\000\000\000\001") + (data (i32.const 5276) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\000\000\00:\000\000\00:\000\000") + (data (i32.const 5324) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\002\003\00:\005\009\00:\005\009") + (data (i32.const 5372) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00S\00u\00n\00,\00 ") + (data (i32.const 5404) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00M\00o\00n\00,\00 ") + (data (i32.const 5436) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00T\00u\00e\00,\00 ") + (data (i32.const 5468) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00W\00e\00d\00,\00 ") + (data (i32.const 5500) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00T\00h\00u\00,\00 ") + (data (i32.const 5532) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00F\00r\00i\00,\00 ") + (data (i32.const 5564) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00S\00a\00t\00,\00 ") + (data (i32.const 5596) ",\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\1c\00\00\00\10\15\00\000\15\00\00P\15\00\00p\15\00\00\90\15\00\00\b0\15\00\00\d0\15") + (data (i32.const 5644) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00 \00J\00a\00n\00 ") + (data (i32.const 5676) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00 \00F\00e\00b\00 ") + (data (i32.const 5708) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00 \00M\00a\00r\00 ") + (data (i32.const 5740) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00 \00A\00p\00r\00 ") + (data (i32.const 5772) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00 \00M\00a\00y\00 ") + (data (i32.const 5804) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00 \00J\00u\00n\00 ") + (data (i32.const 5836) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00 \00J\00u\00l\00 ") + (data (i32.const 5868) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00 \00A\00u\00g\00 ") + (data (i32.const 5900) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00 \00S\00e\00p\00 ") + (data (i32.const 5932) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00 \00O\00c\00t\00 ") + (data (i32.const 5964) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00 \00N\00o\00v\00 ") + (data (i32.const 5996) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00 \00D\00e\00c\00 ") + (data (i32.const 6028) "L\00\00\00\00\00\00\00\00\00\00\00\04\00\00\000\00\00\00 \16\00\00@\16\00\00`\16\00\00\80\16\00\00\a0\16\00\00\c0\16\00\00\e0\16\00\00\00\17\00\00 \17\00\00@\17\00\00`\17\00\00\80\17") + (data (i32.const 6108) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00 \00G\00M\00T") + (data (i32.const 6140) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00:\00\00\00W\00e\00d\00,\00 \000\001\00 \00J\00a\00n\00 \000\000\002\000\00 \000\000\00:\000\000\00:\000\000\00 \00G\00M\00T") + (data (i32.const 6220) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00:\00\00\00M\00o\00n\00,\00 \000\003\00 \00F\00e\00b\00 \002\000\002\000\00 \001\004\00:\005\003\00:\003\003\00 \00G\00M\00T") + (data (i32.const 6300) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00<\00\00\00T\00h\00u\00,\00 \000\001\00 \00J\00u\00l\00 \00-\000\000\000\001\00 \000\000\00:\000\000\00:\000\000\00 \00G\00M\00T") + (data (i32.const 6380) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\001\009\007\006\00-\000\002\00-\000\002") + (data (i32.const 6428) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") + (data (i32.const 6476) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 6524) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y") + (data (i32.const 6652) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\001\009\007\006\00-\002\00-\002") + (data (i32.const 6700) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\002\003\004\005\00-\001\001\00-\000\004") + (data (i32.const 6748) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\001\009\007\006\00-\000\002\00-\000\002\00T\001\002\00:\003\004\00:\005\006") + (data (i32.const 6812) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00.\00\00\001\009\007\006\00-\000\002\00-\000\002\00T\001\002\00:\003\004\00:\005\006\00.\004\005\006") + (data (i32.const 6892) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\000\00\00\001\009\007\006\00-\000\002\00-\000\002\00T\001\002\00:\003\004\00:\005\006\00.\004\005\006\00Z") + (data (i32.const 6972) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\000\000\000\000") + (data (i32.const 7004) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\000\000\000\001") + (data (i32.const 7036) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\009\007\006") + (data (i32.const 7068) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\001\009\007\006\00-\000\002") + (data (i32.const 7116) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\001\009\007\006\00-\000\002\00-\000\002\00T\001\002\00:\003\004") + (data (i32.const 7180) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\006\00\00\00-\002\007\001\008\002\001\00-\000\004\00-\002\000\00T\000\000\00:\000\000\00:\000\000\00.\000\000\000\00Z") + (data (i32.const 7260) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\006\00\00\00+\002\007\005\007\006\000\00-\000\009\00-\001\003\00T\000\000\00:\000\000\00:\000\000\00.\000\000\000\00Z") + (data (i32.const 7340) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\006\00\00\00+\002\007\005\007\006\000\00-\000\009\00-\001\002\00T\002\003\00:\005\009\00:\005\009\00.\009\009\009\00Z") + (data (i32.const 7420) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\006\00\00\00-\002\007\001\008\002\001\00-\000\004\00-\002\000\00T\000\000\00:\000\000\00:\000\000\00.\000\000\001\00Z") + (data (i32.const 7504) "\07\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\04A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\t") (export "memory" (memory $0)) (export "_start" (func $~start)) (func $~lib/date/epochMillis (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (result i64) @@ -1870,182 +1770,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/date/Date#setTime (param $0 i32) (param $1 i64) local.get $1 @@ -2631,926 +2360,53 @@ i32.load i32.store local.get $0 - i32.const 100 - i32.div_u - local.set $0 - end - local.get $0 - i32.const 10 - i32.ge_u - if - local.get $2 - i32.const 2 - i32.sub - i32.const 1 - i32.shl - local.get $1 - i32.add - local.get $0 - i32.const 2 - i32.shl - i32.const 1884 - i32.add - i32.load - i32.store - else - local.get $2 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - local.get $1 - i32.add - local.get $0 - i32.const 48 - i32.add - i32.store16 - end - local.get $3 - if - local.get $1 - i32.const 45 - i32.store16 - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - end - local.get $1 - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 + i32.const 100 + i32.div_u + local.set $0 end local.get $0 - local.get $1 - i32.lt_u + i32.const 10 + i32.ge_u if + local.get $2 + i32.const 2 + i32.sub + i32.const 1 + i32.shl local.get $1 - i32.const 7 - i32.and + i32.add local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end + i32.const 2 + i32.shl + i32.const 1884 + i32.add + i32.load + i32.store else + local.get $2 + i32.const 1 + i32.sub + i32.const 1 + i32.shl local.get $1 - i32.const 7 - i32.and + i32.add local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end + i32.const 48 + i32.add + i32.store16 + end + local.get $3 + if + local.get $1 + i32.const 45 + i32.store16 end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer end + local.get $1 ) (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -3614,13 +2470,13 @@ local.get $2 local.get $0 local.get $3 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.get $3 i32.add local.get $1 local.get $4 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -3908,7 +2764,7 @@ local.get $7 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy end local.get $2 local.get $3 @@ -4348,48 +3204,9 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $1 - i64.const 0 - i64.store offset=32 - local.get $1 - i64.const 0 - i64.store offset=40 - local.get $1 - i64.const 0 - i64.store offset=48 - local.get $1 - i64.const 0 - i64.store offset=56 - local.get $1 - i64.const 0 - i64.store offset=64 - local.get $1 - i64.const 0 - i64.store offset=72 - local.get $1 - i64.const 0 - i64.store offset=80 - local.get $1 - i64.const 0 - i64.store offset=88 - local.get $1 - i64.const 0 - i64.store offset=96 - local.get $1 - i64.const 0 - i64.store offset=104 + i32.const 0 + i32.const 112 + memory.fill local.get $0 i32.load local.tee $1 @@ -4745,30 +3562,16 @@ end global.get $~lib/memory/__stack_pointer local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $1 - i64.const 0 - i64.store offset=32 - local.get $1 i32.const 0 - i32.store offset=40 + i32.const 44 + memory.fill i32.const 28 i32.const 4 call $~lib/rt/itcms/__new local.tee $3 i32.const 4560 i32.const 28 - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $3 i32.store @@ -4779,7 +3582,7 @@ local.tee $2 i32.const 4992 i32.const 48 - call $~lib/memory/memory.copy + memory.copy local.get $2 i32.store offset=4 local.get $0 @@ -4969,21 +3772,9 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $2 - i64.const 0 - i64.store - local.get $2 - i64.const 0 - i64.store offset=8 - local.get $2 - i64.const 0 - i64.store offset=16 - local.get $2 - i64.const 0 - i64.store offset=24 - local.get $2 - i64.const 0 - i64.store offset=32 + i32.const 0 + i32.const 40 + memory.fill i64.const 86400000 i64.const 0 local.get $0 @@ -5136,48 +3927,16 @@ end global.get $~lib/memory/__stack_pointer local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $1 - i64.const 0 - i64.store offset=32 - local.get $1 - i64.const 0 - i64.store offset=40 - local.get $1 - i64.const 0 - i64.store offset=48 - local.get $1 - i64.const 0 - i64.store offset=56 - local.get $1 - i64.const 0 - i64.store offset=64 - local.get $1 - i64.const 0 - i64.store offset=72 - local.get $1 - i64.const 0 - i64.store offset=80 - local.get $1 - i64.const 0 - i64.store offset=88 + i32.const 0 + i32.const 96 + memory.fill i32.const 28 i32.const 4 call $~lib/rt/itcms/__new local.tee $3 i32.const 5616 i32.const 28 - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $3 i32.store @@ -5188,7 +3947,7 @@ local.tee $4 i32.const 6048 i32.const 48 - call $~lib/memory/memory.copy + memory.copy local.get $4 i32.store offset=4 local.get $0 @@ -5523,15 +4282,9 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $4 - i64.const 0 - i64.store - local.get $4 - i64.const 0 - i64.store offset=8 - local.get $4 - i64.const 0 - i64.store offset=16 + i32.const 0 + i32.const 24 + memory.fill block $folding-inner2 block $folding-inner1 local.get $1 @@ -5691,7 +4444,7 @@ local.get $0 i32.add local.get $9 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.get $7 call $~lib/array/Array<~lib/string/String>#push @@ -5748,7 +4501,7 @@ local.get $0 i32.add local.get $1 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.get $3 call $~lib/array/Array<~lib/string/String>#push @@ -5808,18 +4561,9 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 i32.const 0 - i32.store offset=24 + i32.const 28 + memory.fill local.get $0 i32.const 20 i32.sub @@ -6049,21 +4793,9 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 - local.get $0 i32.const 0 - i32.store offset=32 + i32.const 36 + memory.fill block $folding-inner0 i32.const 1970 i32.const 1 @@ -9431,7 +8163,7 @@ i32.add i32.const 1872 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.get $3 i32.add @@ -9444,19 +8176,19 @@ i32.add i32.const 1872 local.get $1 - call $~lib/memory/memory.copy + memory.copy else local.get $5 i32.const 1872 local.get $6 - call $~lib/memory/memory.copy + memory.copy end local.get $5 local.get $6 i32.add local.get $0 local.get $4 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -9571,7 +8303,7 @@ local.get $4 i32.add local.get $3 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 1c4fc071e4..2eaa891b49 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_i32_i32_i32_i32_=>_i64 (func (param i32 i32 i32 i32 i32 i32 i32) (result i64))) @@ -2421,237 +2421,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2701,7 +2470,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/date/Date#set:epochMillis (param $0 i32) (param $1 i64) @@ -3597,1291 +3366,38 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) + (func $~lib/memory/memory.repeat (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + i32.const 0 + local.set $4 + local.get $2 + local.get $3 + i32.mul + local.set $5 loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 + local.get $4 local.get $5 + i32.lt_u + local.set $6 + local.get $6 if local.get $0 - local.tee $6 - i32.const 1 + local.get $4 i32.add - local.set $0 - local.get $6 local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 local.get $2 - i32.const 1 - i32.sub - local.set $2 + memory.copy + local.get $4 + local.get $2 + i32.add + local.set $4 br $while-continue|0 end end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) - (func $~lib/memory/memory.repeat (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 0 - local.set $4 - local.get $2 - local.get $3 - i32.mul - local.set $5 - loop $while-continue|0 - local.get $4 - local.get $5 - i32.lt_u - local.set $6 - local.get $6 - if - local.get $0 - local.get $4 - i32.add - local.get $1 - local.get $2 - call $~lib/memory/memory.copy - local.get $4 - local.get $2 - i32.add - local.set $4 - br $while-continue|0 - end - end - ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) + ) + (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String#concat @@ -5044,7 +3560,7 @@ local.get $3 local.get $2 local.get $0 - call $~lib/memory/memory.copy + memory.copy end local.get $3 ) @@ -5253,7 +3769,7 @@ local.get $5 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy local.get $3 ) (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) @@ -6005,47 +4521,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=40 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=48 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=56 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=64 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=72 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=80 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=88 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=96 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=104 + i32.const 0 + i32.const 112 + memory.fill local.get $0 i32.load local.set $2 @@ -6399,23 +4877,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=40 + i32.const 44 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 28 i32.const 4 @@ -6567,20 +5031,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 + i32.const 0 + i32.const 40 + memory.fill local.get $0 call $~lib/date/Date#getUTCHours i32.const 10 @@ -6702,41 +5155,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=40 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=48 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=56 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=64 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=72 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=80 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=88 + i32.const 0 + i32.const 96 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 28 i32.const 4 @@ -7020,14 +5441,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 + i32.const 0 + i32.const 24 + memory.fill local.get $2 i32.eqz if @@ -7251,7 +5667,7 @@ local.get $3 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $10 local.get $7 call $~lib/array/Array<~lib/string/String>#push @@ -7331,7 +5747,7 @@ local.get $14 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $10 local.get $4 call $~lib/array/Array<~lib/string/String>#push @@ -7379,17 +5795,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=24 + i32.const 28 + memory.fill local.get $0 call $~lib/string/String#get:length i32.eqz @@ -7642,20 +6050,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=32 + i32.const 36 + memory.fill i32.const 1970 local.set $2 i32.const 0 @@ -11051,19 +9448,19 @@ i32.add local.get $2 local.get $10 - call $~lib/memory/memory.copy + memory.copy else local.get $7 local.get $2 local.get $6 - call $~lib/memory/memory.copy + memory.copy end local.get $7 local.get $6 i32.add local.get $0 local.get $3 - call $~lib/memory/memory.copy + memory.copy local.get $7 local.set $11 global.get $~lib/memory/__stack_pointer @@ -11122,13 +9519,13 @@ local.get $5 local.get $0 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.get $2 i32.add local.get $1 local.get $3 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.set $6 global.get $~lib/memory/__stack_pointer @@ -11261,7 +9658,7 @@ local.get $8 i32.add local.get $10 - call $~lib/memory/memory.copy + memory.copy local.get $11 local.set $12 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 87c52f91c2..c8ebcfb15a 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1518,182 +1518,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) @@ -1946,984 +1775,116 @@ local.get $0 i32.load offset=4 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) + (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end local.get $0 - i32.const 3 - i32.and - i32.eqz + i32.load offset=8 + local.tee $5 + local.get $2 + i32.shr_u + local.get $1 + i32.lt_u if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end + i32.const 1073741820 local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - i32.load offset=8 - local.tee $4 - local.get $2 - i32.shr_u - local.get $1 - i32.lt_u - if - i32.const 1073741820 - local.get $2 - i32.shr_u - local.get $1 - i32.lt_u + i32.shr_u + local.get $1 + i32.lt_u if i32.const 1456 i32.const 1728 i32.const 19 i32.const 48 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 8 - local.get $1 - i32.const 8 - i32.gt_u - select - local.get $2 - i32.shl - local.set $5 - local.get $0 - i32.load - local.tee $2 - block $__inlined_func$~lib/rt/itcms/__renew (result i32) - local.get $3 - if - local.get $4 - i32.const 1 - i32.shl - local.tee $1 - i32.const 1073741820 - local.get $1 - i32.const 1073741820 - i32.lt_u - select - local.tee $1 - local.get $5 - local.get $1 - local.get $5 - i32.gt_u - select - local.set $5 - end + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load + local.set $4 + local.get $1 + i32.const 8 + local.get $1 + i32.const 8 + i32.gt_u + select + local.get $2 + i32.shl + local.set $1 + local.get $3 + if + local.get $5 + i32.const 1 + i32.shl + local.tee $2 + i32.const 1073741820 + local.get $2 + i32.const 1073741820 + i32.lt_u + select + local.tee $2 + local.get $1 + local.get $1 local.get $2 + i32.lt_u + select + local.set $1 + end + block $__inlined_func$~lib/rt/itcms/__renew + local.get $4 i32.const 20 i32.sub - local.tee $1 + local.tee $3 i32.load i32.const -4 i32.and i32.const 16 i32.sub - local.get $5 + local.get $1 i32.ge_u if + local.get $3 local.get $1 - local.get $5 i32.store offset=16 - local.get $2 + local.get $4 + local.set $2 br $__inlined_func$~lib/rt/itcms/__renew end - local.get $5 local.get $1 + local.get $3 i32.load offset=12 call $~lib/rt/itcms/__new - local.set $6 - local.get $5 + local.tee $2 + local.get $4 local.get $1 + local.get $3 i32.load offset=16 - local.tee $1 + local.tee $3 local.get $1 - local.get $5 - i32.gt_u + local.get $3 + i32.lt_u select - local.set $7 - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.get $6 - local.tee $3 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.get $3 - i32.sub - local.get $7 - i32.sub - i32.const 0 - local.get $7 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $3 - local.get $2 - local.get $7 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $2 - local.get $3 - i32.gt_u - if - local.get $2 - i32.const 7 - i32.and - local.get $3 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $3 - i32.const 7 - i32.and - if - local.get $7 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $7 - i32.const 1 - i32.sub - local.set $7 - local.get $3 - local.tee $4 - i32.const 1 - i32.add - local.set $3 - local.get $2 - local.tee $1 - i32.const 1 - i32.add - local.set $2 - local.get $4 - local.get $1 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $7 - i32.const 8 - i32.ge_u - if - local.get $3 - local.get $2 - i64.load - i64.store - local.get $7 - i32.const 8 - i32.sub - local.set $7 - local.get $3 - i32.const 8 - i32.add - local.set $3 - local.get $2 - i32.const 8 - i32.add - local.set $2 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $7 - if - local.get $3 - local.tee $4 - i32.const 1 - i32.add - local.set $3 - local.get $2 - local.tee $1 - i32.const 1 - i32.add - local.set $2 - local.get $4 - local.get $1 - i32.load8_u - i32.store8 - local.get $7 - i32.const 1 - i32.sub - local.set $7 - br $while-continue|2 - end - end - else - local.get $2 - i32.const 7 - i32.and - local.get $3 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $3 - local.get $7 - i32.add - i32.const 7 - i32.and - if - local.get $7 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $7 - i32.const 1 - i32.sub - local.tee $7 - local.get $3 - i32.add - local.get $2 - local.get $7 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $7 - i32.const 8 - i32.ge_u - if - local.get $7 - i32.const 8 - i32.sub - local.tee $7 - local.get $3 - i32.add - local.get $2 - local.get $7 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $7 - if - local.get $7 - i32.const 1 - i32.sub - local.tee $7 - local.get $3 - i32.add - local.get $2 - local.get $7 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - local.get $6 + memory.copy end - local.tee $1 + local.get $2 + local.get $4 i32.ne if local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 - local.get $1 + local.get $2 if local.get $0 - local.get $1 + local.get $2 call $byn-split-outlined-A$~lib/rt/itcms/__link end end local.get $0 - local.get $5 + local.get $1 i32.store offset=8 end ) @@ -3381,14 +2342,9 @@ br_if $folding-inner1 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 4 i32.sub @@ -5543,14 +4499,9 @@ br_if $folding-inner1 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 4 i32.sub @@ -7754,14 +6705,9 @@ br_if $folding-inner1 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 4 i32.sub @@ -9920,14 +8866,9 @@ br_if $folding-inner1 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 4 i32.sub @@ -11917,14 +10858,9 @@ br_if $folding-inner0 global.get $~lib/memory/__stack_pointer local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $1 call $~lib/map/Map#constructor local.tee $2 @@ -13517,14 +12453,9 @@ br_if $folding-inner1 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 4 i32.sub @@ -15824,14 +14755,9 @@ br_if $folding-inner1 global.get $~lib/memory/__stack_pointer local.tee $3 - i64.const 0 - i64.store - local.get $3 - i64.const 0 - i64.store offset=8 - local.get $3 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $3 i32.const 4 i32.sub @@ -17378,14 +16304,9 @@ br_if $folding-inner1 global.get $~lib/memory/__stack_pointer local.tee $3 - i64.const 0 - i64.store - local.get $3 - i64.const 0 - i64.store offset=8 - local.get $3 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $3 i32.const 4 i32.sub @@ -18815,14 +17736,9 @@ br_if $folding-inner1 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 4 i32.sub @@ -18966,7 +17882,7 @@ local.get $10 local.get $3 local.get $3 - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.const 10 i32.add call $~lib/map/Map#set @@ -19051,7 +17967,7 @@ local.get $3 call $~lib/map/Map#get local.get $3 - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.const 10 i32.add i32.ne @@ -19170,7 +18086,7 @@ local.get $3 call $~lib/map/Map#get local.get $3 - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.const 10 i32.add i32.ne @@ -19185,7 +18101,7 @@ local.get $10 local.get $3 local.get $3 - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.const 20 i32.add call $~lib/map/Map#set @@ -19270,7 +18186,7 @@ local.get $3 call $~lib/map/Map#get local.get $3 - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.const 20 i32.add i32.ne @@ -20181,7 +19097,7 @@ local.get $3 call $~lib/map/Map#get local.get $3 - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.const 20 i32.add i32.ne @@ -20377,7 +19293,7 @@ local.get $10 local.get $3 local.get $3 - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.const 10 i32.add call $~lib/map/Map#set @@ -21113,14 +20029,9 @@ br_if $folding-inner1 global.get $~lib/memory/__stack_pointer local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $1 i32.const 4 i32.sub @@ -21199,7 +20110,7 @@ local.get $18 local.get $6 local.get $6 - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.const 10 i32.add call $~lib/map/Map#set @@ -21219,7 +20130,7 @@ local.get $6 call $~lib/map/Map#get local.get $6 - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.const 10 i32.add i32.ne @@ -21273,7 +20184,7 @@ local.get $6 call $~lib/map/Map#get local.get $6 - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.const 10 i32.add i32.ne @@ -21288,7 +20199,7 @@ local.get $18 local.get $6 local.get $6 - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.const 20 i32.add call $~lib/map/Map#set @@ -21308,7 +20219,7 @@ local.get $6 call $~lib/map/Map#get local.get $6 - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.const 20 i32.add i32.ne @@ -22049,7 +20960,7 @@ local.get $6 call $~lib/map/Map#get local.get $6 - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.const 20 i32.add i32.ne @@ -22115,7 +21026,7 @@ local.get $18 local.get $6 local.get $6 - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.const 10 i32.add call $~lib/map/Map#set diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index c24430bc52..d0e678ecfc 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -3,9 +3,9 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_=>_none (func (param i32 i64))) @@ -44,7 +44,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/rt/__rtti_base i32 (i32.const 736)) (global $~lib/memory/__data_end i32 (i32.const 996)) @@ -2090,237 +2089,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2370,7 +2138,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) @@ -2655,1410 +2423,157 @@ local.tee $3 i32.store local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 - i32.store offset=4 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=16 - i32.const 12 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 - if - local.get $6 - local.set $10 - local.get $10 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $8 - local.set $11 - local.get $10 - i32.load8_s - local.set $12 - local.get $11 - local.get $12 - call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 - i32.load offset=4 - call $~lib/map/MapEntry#set:value - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i32.and - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 12 - i32.add - local.set $8 - end - local.get $6 - i32.const 12 - i32.add - local.set $6 - br $while-continue|0 - end - end - local.get $0 - local.get $3 - call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 - call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 - call $~lib/map/Map#set:entries - local.get $0 - local.get $4 - call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 - i32.load offset=20 - call $~lib/map/Map#set:entriesOffset - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - local.set $2 - local.get $2 - i32.eqz - if - i32.const 592 - i32.const 656 - i32.const 105 - i32.const 17 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.load offset=4 - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=20 - ) - (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.const 0 - call $~lib/rt/itcms/__link - ) - (func $~lib/array/Array#set:dataStart (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/array/Array#set:byteLength (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=8 - ) - (func $~lib/array/Array#set:length_ (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 + i32.const 8 + i32.mul + i32.const 3 + i32.div_s + local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 0 + local.get $4 + i32.const 12 + i32.mul + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $5 + i32.store offset=4 + local.get $0 + i32.load offset=8 + local.set $6 + local.get $6 + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + i32.add + local.set $7 + local.get $5 + local.set $8 + loop $while-continue|0 + local.get $6 + local.get $7 + i32.ne + local.set $9 + local.get $9 + if + local.get $6 + local.set $10 + local.get $10 + i32.load offset=8 + i32.const 1 i32.and - i32.eq + i32.eqz if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 + local.get $8 + local.set $11 + local.get $10 + i32.load8_s + local.set $12 + local.get $11 + local.get $12 + call $~lib/map/MapEntry#set:key + local.get $11 + local.get $10 + i32.load offset=4 + call $~lib/map/MapEntry#set:value + local.get $12 + call $~lib/util/hash/HASH + local.get $1 + i32.and + local.set $13 local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end + local.get $13 + i32.const 4 + i32.mul + i32.add + local.set $14 + local.get $11 + local.get $14 + i32.load + call $~lib/map/MapEntry#set:taggedNext + local.get $14 + local.get $8 + i32.store + local.get $8 + i32.const 12 + i32.add + local.set $8 end + local.get $6 + i32.const 12 + i32.add + local.set $6 + br $while-continue|0 end end + local.get $0 + local.get $3 + call $~lib/map/Map#set:buckets + local.get $0 + local.get $1 + call $~lib/map/Map#set:bucketsMask + local.get $0 + local.get $5 + call $~lib/map/Map#set:entries + local.get $0 + local.get $4 + call $~lib/map/Map#set:entriesCapacity + local.get $0 + local.get $0 + i32.load offset=20 + call $~lib/map/Map#set:entriesOffset + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + local.set $2 + local.get $2 + i32.eqz + if + i32.const 592 + i32.const 656 + i32.const 105 + i32.const 17 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load offset=4 + ) + (func $~lib/map/Map#get:size (param $0 i32) (result i32) + local.get $0 + i32.load offset=20 + ) + (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.const 0 + call $~lib/rt/itcms/__link + ) + (func $~lib/array/Array#set:dataStart (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=4 + ) + (func $~lib/array/Array#set:byteLength (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=8 + ) + (func $~lib/array/Array#set:length_ (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=12 ) (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -4102,7 +2617,7 @@ local.get $5 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy local.get $3 ) (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) @@ -5061,14 +3576,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor @@ -6354,14 +4864,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor @@ -7655,14 +6160,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor @@ -8948,14 +7448,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor @@ -9582,14 +8077,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor @@ -10856,14 +9346,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor @@ -12147,14 +10632,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor @@ -13446,14 +11926,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor @@ -14729,14 +13204,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor @@ -14768,7 +13238,7 @@ local.get $1 i32.const 10 local.get $1 - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.add call $~lib/map/Map#set drop @@ -14789,7 +13259,7 @@ call $~lib/map/Map#get i32.const 10 local.get $1 - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.add i32.eq i32.eqz @@ -14847,7 +13317,7 @@ call $~lib/map/Map#get i32.const 10 local.get $1 - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.add i32.eq i32.eqz @@ -14863,7 +13333,7 @@ local.get $1 i32.const 20 local.get $1 - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.add call $~lib/map/Map#set drop @@ -14884,7 +13354,7 @@ call $~lib/map/Map#get i32.const 20 local.get $1 - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.add i32.eq i32.eqz @@ -15054,7 +13524,7 @@ call $~lib/map/Map#get i32.const 20 local.get $1 - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.add i32.eq i32.eqz @@ -15129,7 +13599,7 @@ local.get $1 i32.const 10 local.get $1 - i32.trunc_f32_s + i32.trunc_sat_f32_s i32.add call $~lib/map/Map#set drop @@ -16029,14 +14499,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor @@ -16068,7 +14533,7 @@ local.get $1 i32.const 10 local.get $1 - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.add call $~lib/map/Map#set drop @@ -16089,7 +14554,7 @@ call $~lib/map/Map#get i32.const 10 local.get $1 - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.add i32.eq i32.eqz @@ -16147,7 +14612,7 @@ call $~lib/map/Map#get i32.const 10 local.get $1 - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.add i32.eq i32.eqz @@ -16163,7 +14628,7 @@ local.get $1 i32.const 20 local.get $1 - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.add call $~lib/map/Map#set drop @@ -16184,7 +14649,7 @@ call $~lib/map/Map#get i32.const 20 local.get $1 - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.add i32.eq i32.eqz @@ -16354,7 +14819,7 @@ call $~lib/map/Map#get i32.const 20 local.get $1 - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.add i32.eq i32.eqz @@ -16429,7 +14894,7 @@ local.get $1 i32.const 10 local.get $1 - i32.trunc_f64_s + i32.trunc_sat_f64_s i32.add call $~lib/map/Map#set drop diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index c715a96557..1648bc4f65 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -135,85 +135,7 @@ (data (i32.const 11762) "+n\07\'\be\bf<\00\f0*,4*=\00\00\00\00\00\00\f2?") (data (i32.const 11794) "+n\07\'\be\bf<\00\f0*,4*=\00\00\00\00\00\e0\f1?") (data (i32.const 11825) "\c0[\8fT^\bc\bf\06\be_XW\0c\1d\bd\00\00\00\00\00\c0\f1?") - (data (i32.const 11857) "\e0J:m\92\ba\bf\c8\aa[\e859%=\00\00\00\00\00\c0\f1?") - (data (i32.const 11889) "\e0J:m\92\ba\bf\c8\aa[\e859%=\00\00\00\00\00\a0\f1?") - (data (i32.const 11921) "\a01\d6E\c3\b8\bfhV/M)|\13=\00\00\00\00\00\a0\f1?") - (data (i32.const 11953) "\a01\d6E\c3\b8\bfhV/M)|\13=\00\00\00\00\00\80\f1?") - (data (i32.const 11985) "`\e5\8a\d2\f0\b6\bf\das3\c97\97&\bd\00\00\00\00\00`\f1?") - (data (i32.const 12017) " \06?\07\1b\b5\bfW^\c6a[\02\1f=\00\00\00\00\00`\f1?") - (data (i32.const 12049) " \06?\07\1b\b5\bfW^\c6a[\02\1f=\00\00\00\00\00@\f1?") - (data (i32.const 12081) "\e0\1b\96\d7A\b3\bf\df\13\f9\cc\da^,=\00\00\00\00\00@\f1?") - (data (i32.const 12113) "\e0\1b\96\d7A\b3\bf\df\13\f9\cc\da^,=\00\00\00\00\00 \f1?") - (data (i32.const 12145) "\80\a3\ee6e\b1\bf\t\a3\8fv^|\14=\00\00\00\00\00\00\f1?") - (data (i32.const 12177) "\80\11\c00\n\af\bf\91\8e6\83\9eY-=\00\00\00\00\00\00\f1?") - (data (i32.const 12209) "\80\11\c00\n\af\bf\91\8e6\83\9eY-=\00\00\00\00\00\e0\f0?") - (data (i32.const 12241) "\80\19q\ddB\ab\bfLp\d6\e5z\82\1c=\00\00\00\00\00\e0\f0?") - (data (i32.const 12273) "\80\19q\ddB\ab\bfLp\d6\e5z\82\1c=\00\00\00\00\00\c0\f0?") - (data (i32.const 12305) "\c02\f6Xt\a7\bf\ee\a1\f24F\fc,\bd\00\00\00\00\00\c0\f0?") - (data (i32.const 12337) "\c02\f6Xt\a7\bf\ee\a1\f24F\fc,\bd\00\00\00\00\00\a0\f0?") - (data (i32.const 12369) "\c0\fe\b9\87\9e\a3\bf\aa\fe&\f5\b7\02\f5<\00\00\00\00\00\a0\f0?") - (data (i32.const 12401) "\c0\fe\b9\87\9e\a3\bf\aa\fe&\f5\b7\02\f5<\00\00\00\00\00\80\f0?") - (data (i32.const 12434) "x\0e\9b\82\9f\bf\e4\t~|&\80)\bd\00\00\00\00\00\80\f0?") - (data (i32.const 12466) "x\0e\9b\82\9f\bf\e4\t~|&\80)\bd\00\00\00\00\00`\f0?") - (data (i32.const 12497) "\80\d5\07\1b\b9\97\bf9\a6\fa\93T\8d(\bd\00\00\00\00\00@\f0?") - (data (i32.const 12530) "\fc\b0\a8\c0\8f\bf\9c\a6\d3\f6|\1e\df\bc\00\00\00\00\00@\f0?") - (data (i32.const 12562) "\fc\b0\a8\c0\8f\bf\9c\a6\d3\f6|\1e\df\bc\00\00\00\00\00 \f0?") - (data (i32.const 12594) "\10k*\e0\7f\bf\e4@\da\0d?\e2\19\bd\00\00\00\00\00 \f0?") - (data (i32.const 12626) "\10k*\e0\7f\bf\e4@\da\0d?\e2\19\bd\00\00\00\00\00\00\f0?") - (data (i32.const 12678) "\f0?") - (data (i32.const 12709) "\c0\ef?") - (data (i32.const 12722) "\89u\15\10\80?\e8+\9d\99k\c7\10\bd\00\00\00\00\00\80\ef?") - (data (i32.const 12753) "\80\93XV \90?\d2\f7\e2\06[\dc#\bd\00\00\00\00\00@\ef?") - (data (i32.const 12786) "\c9(%I\98?4\0cZ2\ba\a0*\bd\00\00\00\00\00\00\ef?") - (data (i32.const 12817) "@\e7\89]A\a0?S\d7\f1\\\c0\11\01=\00\00\00\00\00\c0\ee?") - (data (i32.const 12850) ".\d4\aef\a4?(\fd\bdus\16,\bd\00\00\00\00\00\80\ee?") - (data (i32.const 12881) "\c0\9f\14\aa\94\a8?}&Z\d0\95y\19\bd\00\00\00\00\00@\ee?") - (data (i32.const 12913) "\c0\dd\cds\cb\ac?\07(\d8G\f2h\1a\bd\00\00\00\00\00 \ee?") - (data (i32.const 12945) "\c0\06\c01\ea\ae?{;\c9O>\11\0e\bd\00\00\00\00\00\e0\ed?") - (data (i32.const 12977) "`F\d1;\97\b1?\9b\9e\0dV]2%\bd\00\00\00\00\00\a0\ed?") - (data (i32.const 13009) "\e0\d1\a7\f5\bd\b3?\d7N\db\a5^\c8,=\00\00\00\00\00`\ed?") - (data (i32.const 13041) "\a0\97MZ\e9\b5?\1e\1d]<\06i,\bd\00\00\00\00\00@\ed?") - (data (i32.const 13073) "\c0\ea\n\d3\00\b7?2\ed\9d\a9\8d\1e\ec<\00\00\00\00\00\00\ed?") - (data (i32.const 13105) "@Y]^3\b9?\daG\bd:\\\11#=\00\00\00\00\00\c0\ec?") - (data (i32.const 13137) "`\ad\8d\c8j\bb?\e5h\f7+\80\90\13\bd\00\00\00\00\00\a0\ec?") - (data (i32.const 13169) "@\bc\01X\88\bc?\d3\acZ\c6\d1F&=\00\00\00\00\00`\ec?") - (data (i32.const 13201) " \n\839\c7\be?\e0E\e6\afh\c0-\bd\00\00\00\00\00@\ec?") - (data (i32.const 13233) "\e0\db9\91\e8\bf?\fd\n\a1O\d64%\bd\00\00\00\00\00\00\ec?") - (data (i32.const 13265) "\e0\'\82\8e\17\c1?\f2\07-\cex\ef!=\00\00\00\00\00\e0\eb?") - (data (i32.const 13297) "\f0#~+\aa\c1?4\998D\8e\a7,=\00\00\00\00\00\a0\eb?") - (data (i32.const 13329) "\80\86\0ca\d1\c2?\a1\b4\81\cbl\9d\03=\00\00\00\00\00\80\eb?") - (data (i32.const 13361) "\90\15\b0\fce\c3?\89rK#\a8/\c6<\00\00\00\00\00@\eb?") - (data (i32.const 13393) "\b03\83=\91\c4?x\b6\fdTy\83%=\00\00\00\00\00 \eb?") - (data (i32.const 13425) "\b0\a1\e4\e5\'\c5?\c7}i\e5\e83&=\00\00\00\00\00\e0\ea?") - (data (i32.const 13457) "\10\8c\beNW\c6?x.<,\8b\cf\19=\00\00\00\00\00\c0\ea?") - (data (i32.const 13489) "pu\8b\12\f0\c6?\e1!\9c\e5\8d\11%\bd\00\00\00\00\00\a0\ea?") - (data (i32.const 13521) "PD\85\8d\89\c7?\05C\91p\10f\1c\bd\00\00\00\00\00`\ea?") - (data (i32.const 13554) "9\eb\af\be\c8?\d1,\e9\aaT=\07\bd\00\00\00\00\00@\ea?") - (data (i32.const 13586) "\f7\dcZZ\c9?o\ff\a0X(\f2\07=\00\00\00\00\00\00\ea?") - (data (i32.const 13617) "\e0\8a<\ed\93\ca?i!VPCr(\bd\00\00\00\00\00\e0\e9?") - (data (i32.const 13649) "\d0[W\d81\cb?\aa\e1\acN\8d5\0c\bd\00\00\00\00\00\c0\e9?") - (data (i32.const 13681) "\e0;8\87\d0\cb?\b6\12TY\c4K-\bd\00\00\00\00\00\a0\e9?") - (data (i32.const 13713) "\10\f0\c6\fbo\cc?\d2+\96\c5r\ec\f1\bc\00\00\00\00\00`\e9?") - (data (i32.const 13745) "\90\d4\b0=\b1\cd?5\b0\15\f7*\ff*\bd\00\00\00\00\00@\e9?") - (data (i32.const 13777) "\10\e7\ff\0eS\ce?0\f4A`\'\12\c2<\00\00\00\00\00 \e9?") - (data (i32.const 13810) "\dd\e4\ad\f5\ce?\11\8e\bbe\15!\ca\bc\00\00\00\00\00\00\e9?") - (data (i32.const 13841) "\b0\b3l\1c\99\cf?0\df\0c\ca\ec\cb\1b=\00\00\00\00\00\c0\e8?") - (data (i32.const 13873) "XM`8q\d0?\91N\ed\16\db\9c\f8<\00\00\00\00\00\a0\e8?") - (data (i32.const 13905) "`ag-\c4\d0?\e9\ea<\16\8b\18\'=\00\00\00\00\00\80\e8?") - (data (i32.const 13937) "\e8\'\82\8e\17\d1?\1c\f0\a5c\0e!,\bd\00\00\00\00\00`\e8?") - (data (i32.const 13969) "\f8\ac\cb\\k\d1?\81\16\a5\f7\cd\9a+=\00\00\00\00\00@\e8?") - (data (i32.const 14001) "hZc\99\bf\d1?\b7\bdGQ\ed\a6,=\00\00\00\00\00 \e8?") - (data (i32.const 14033) "\b8\0emE\14\d2?\ea\baF\ba\de\87\n=\00\00\00\00\00\e0\e7?") - (data (i32.const 14065) "\90\dc|\f0\be\d2?\f4\04PJ\fa\9c*=\00\00\00\00\00\c0\e7?") - (data (i32.const 14097) "`\d3\e1\f1\14\d3?\b8\11\0e\bd\00\00\00\00\00\e0\ed?\00\00\00\00\00\00\00\00\00`F\d1;\97\b1?\9b\9e\0dV]2%\bd\00\00\00\00\00\a0\ed?\00\00\00\00\00\00\00\00\00\e0\d1\a7\f5\bd\b3?\d7N\db\a5^\c8,=\00\00\00\00\00`\ed?\00\00\00\00\00\00\00\00\00\a0\97MZ\e9\b5?\1e\1d]<\06i,\bd\00\00\00\00\00@\ed?\00\00\00\00\00\00\00\00\00\c0\ea\n\d3\00\b7?2\ed\9d\a9\8d\1e\ec<\00\00\00\00\00\00\ed?\00\00\00\00\00\00\00\00\00@Y]^3\b9?\daG\bd:\\\11#=\00\00\00\00\00\c0\ec?\00\00\00\00\00\00\00\00\00`\ad\8d\c8j\bb?\e5h\f7+\80\90\13\bd\00\00\00\00\00\a0\ec?\00\00\00\00\00\00\00\00\00@\bc\01X\88\bc?\d3\acZ\c6\d1F&=\00\00\00\00\00`\ec?\00\00\00\00\00\00\00\00\00 \n\839\c7\be?\e0E\e6\afh\c0-\bd\00\00\00\00\00@\ec?\00\00\00\00\00\00\00\00\00\e0\db9\91\e8\bf?\fd\n\a1O\d64%\bd\00\00\00\00\00\00\ec?\00\00\00\00\00\00\00\00\00\e0\'\82\8e\17\c1?\f2\07-\cex\ef!=\00\00\00\00\00\e0\eb?\00\00\00\00\00\00\00\00\00\f0#~+\aa\c1?4\998D\8e\a7,=\00\00\00\00\00\a0\eb?\00\00\00\00\00\00\00\00\00\80\86\0ca\d1\c2?\a1\b4\81\cbl\9d\03=\00\00\00\00\00\80\eb?\00\00\00\00\00\00\00\00\00\90\15\b0\fce\c3?\89rK#\a8/\c6<\00\00\00\00\00@\eb?\00\00\00\00\00\00\00\00\00\b03\83=\91\c4?x\b6\fdTy\83%=\00\00\00\00\00 \eb?\00\00\00\00\00\00\00\00\00\b0\a1\e4\e5\'\c5?\c7}i\e5\e83&=\00\00\00\00\00\e0\ea?\00\00\00\00\00\00\00\00\00\10\8c\beNW\c6?x.<,\8b\cf\19=\00\00\00\00\00\c0\ea?\00\00\00\00\00\00\00\00\00pu\8b\12\f0\c6?\e1!\9c\e5\8d\11%\bd\00\00\00\00\00\a0\ea?\00\00\00\00\00\00\00\00\00PD\85\8d\89\c7?\05C\91p\10f\1c\bd\00\00\00\00\00`\ea?\00\00\00\00\00\00\00\00\00\009\eb\af\be\c8?\d1,\e9\aaT=\07\bd\00\00\00\00\00@\ea?\00\00\00\00\00\00\00\00\00\00\f7\dcZZ\c9?o\ff\a0X(\f2\07=\00\00\00\00\00\00\ea?\00\00\00\00\00\00\00\00\00\e0\8a<\ed\93\ca?i!VPCr(\bd\00\00\00\00\00\e0\e9?\00\00\00\00\00\00\00\00\00\d0[W\d81\cb?\aa\e1\acN\8d5\0c\bd\00\00\00\00\00\c0\e9?\00\00\00\00\00\00\00\00\00\e0;8\87\d0\cb?\b6\12TY\c4K-\bd\00\00\00\00\00\a0\e9?\00\00\00\00\00\00\00\00\00\10\f0\c6\fbo\cc?\d2+\96\c5r\ec\f1\bc\00\00\00\00\00`\e9?\00\00\00\00\00\00\00\00\00\90\d4\b0=\b1\cd?5\b0\15\f7*\ff*\bd\00\00\00\00\00@\e9?\00\00\00\00\00\00\00\00\00\10\e7\ff\0eS\ce?0\f4A`\'\12\c2<\00\00\00\00\00 \e9?\00\00\00\00\00\00\00\00\00\00\dd\e4\ad\f5\ce?\11\8e\bbe\15!\ca\bc\00\00\00\00\00\00\e9?\00\00\00\00\00\00\00\00\00\b0\b3l\1c\99\cf?0\df\0c\ca\ec\cb\1b=\00\00\00\00\00\c0\e8?\00\00\00\00\00\00\00\00\00XM`8q\d0?\91N\ed\16\db\9c\f8<\00\00\00\00\00\a0\e8?\00\00\00\00\00\00\00\00\00`ag-\c4\d0?\e9\ea<\16\8b\18\'=\00\00\00\00\00\80\e8?\00\00\00\00\00\00\00\00\00\e8\'\82\8e\17\d1?\1c\f0\a5c\0e!,\bd\00\00\00\00\00`\e8?\00\00\00\00\00\00\00\00\00\f8\ac\cb\\k\d1?\81\16\a5\f7\cd\9a+=\00\00\00\00\00@\e8?\00\00\00\00\00\00\00\00\00hZc\99\bf\d1?\b7\bdGQ\ed\a6,=\00\00\00\00\00 \e8?\00\00\00\00\00\00\00\00\00\b8\0emE\14\d2?\ea\baF\ba\de\87\n=\00\00\00\00\00\e0\e7?\00\00\00\00\00\00\00\00\00\90\dc|\f0\be\d2?\f4\04PJ\fa\9c*=\00\00\00\00\00\c0\e7?\00\00\00\00\00\00\00\00\00`\d3\e1\f1\14\d3?\b8_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) @@ -26,7 +26,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) (global $~lib/memory/__data_end i32 (i32.const 452)) @@ -2076,237 +2075,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2356,7 +2124,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $start:std/new diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index bb99260091..5cab11726a 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -1284,40 +1284,8 @@ i32.const 20 i32.add local.tee $0 - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 0 - i32.store8 offset=3 - local.get $1 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 + i64.const 0 + i64.store align=1 local.get $0 ) (func $~lib/math/ipow32 (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index a0400e1cae..295fb217ce 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $std/operator-overloading/a1 (mut i32) (i32.const 0)) (global $std/operator-overloading/a2 (mut i32) (i32.const 0)) (global $std/operator-overloading/a (mut i32) (i32.const 0)) @@ -41,6 +40,7 @@ (global $std/operator-overloading/f (mut i32) (i32.const 0)) (global $std/operator-overloading/p1 (mut i32) (i32.const 0)) (global $std/operator-overloading/p2 (mut i32) (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $std/operator-overloading/p (mut i32) (i32.const 0)) (global $std/operator-overloading/n1 (mut i32) (i32.const 0)) (global $std/operator-overloading/n2 (mut i32) (i32.const 0)) @@ -2130,237 +2130,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2410,7 +2179,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $std/operator-overloading/Tester#set:x (param $0 i32) (param $1 i32) diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index 99064b315b..5f3f73f38b 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -1,7 +1,6 @@ (module (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $std/pointer/one (mut i32) (i32.const 0)) (global $std/pointer/two (mut i32) (i32.const 0)) @@ -13,697 +12,9 @@ (data (i32.const 1048) "\01\00\00\00\1c\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s") (export "memory" (memory $0)) (start $~start) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 8 - local.set $5 - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $5 - select - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $5 - i32.const 1 - i32.sub - local.set $5 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $5 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $5 - i32.const 16 - i32.sub - local.set $5 - br $while-continue|1 - end - end - local.get $5 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $5 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $5 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $5 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $5 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $5 - i32.const 3 - i32.sub - local.set $5 - loop $while-continue|3 - local.get $5 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $2 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $3 - i32.const 8 - i32.shl - local.get $2 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $2 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $4 - i32.const 8 - i32.shl - local.get $2 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $5 - i32.const 16 - i32.sub - local.set $5 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $2 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 2 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $5 - i32.const 2 - i32.sub - local.set $5 - loop $while-continue|4 - local.get $5 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $2 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $3 - i32.const 16 - i32.shl - local.get $2 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $2 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $4 - i32.const 16 - i32.shl - local.get $2 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $5 - i32.const 16 - i32.sub - local.set $5 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $5 - i32.const 1 - i32.sub - local.set $5 - loop $while-continue|5 - local.get $5 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $2 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $3 - i32.const 24 - i32.shl - local.get $2 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $2 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $4 - i32.const 24 - i32.shl - local.get $2 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $5 - i32.const 16 - i32.sub - local.set $5 - br $while-continue|5 - end - end - end - end - local.get $5 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $2 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $2 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $5 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $2 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $2 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $5 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $2 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $2 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $5 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $2 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 2 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $5 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) (func $start:std/pointer (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) i32.const 8 global.set $std/pointer/one i32.const 24 @@ -863,228 +174,18 @@ unreachable end global.get $std/pointer/one - local.set $1 + local.set $0 global.get $std/pointer/two - local.tee $0 + local.tee $1 if - block $~lib/util/memory/memmove|inlined.0 - i32.const 8 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.sub - i32.const 8 - i32.sub - i32.const -16 - i32.le_u - if - local.get $1 - local.get $0 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.gt_u - if - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $1 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.tee $2 - i32.const 1 - i32.add - local.set $1 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $1 - local.get $0 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $1 - local.tee $2 - i32.const 1 - i32.add - local.set $1 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $1 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $1 - i32.add - local.get $0 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $1 - i32.add - local.get $0 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $1 - i32.add - local.get $0 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - else - local.get $1 - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.add - local.tee $0 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 local.get $0 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 local.get $1 - i32.const 0 - i32.store8 offset=3 + i64.load align=1 + i64.store align=1 + else local.get $0 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 + i64.const 0 + i64.store align=1 end global.get $std/pointer/one global.get $std/pointer/two diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index a05e0b0065..ca5a7e04ff 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -1,5 +1,4 @@ (module - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -9,7 +8,6 @@ (global $std/pointer/add (mut i32) (i32.const 0)) (global $std/pointer/sub (mut i32) (i32.const 0)) (global $std/pointer/nextOne (mut i32) (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $std/pointer/buf (mut i32) (i32.const 0)) (global $~lib/memory/__data_end i32 (i32.const 60)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16444)) @@ -30,1490 +28,6 @@ local.get $1 i32.store offset=4 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $start:std/pointer (local $0 i32) (local $1 i32) @@ -1813,12 +327,12 @@ local.get $2 i32.const 0 i32.const 8 - call $~lib/memory/memory.fill + memory.fill else local.get $2 local.get $0 i32.const 8 - call $~lib/memory/memory.copy + memory.copy end global.get $std/pointer/one local.set $1 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index ed9d7e7711..0bbd81280f 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1511,182 +1511,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) @@ -2000,984 +1829,116 @@ i32.store end ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) + (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 + local.get $0 + i32.load offset=8 + local.tee $5 + local.get $2 + i32.shr_u + local.get $1 + i32.lt_u + if + i32.const 1073741820 local.get $2 + i32.shr_u + local.get $1 + i32.lt_u + if + i32.const 1456 + i32.const 1616 + i32.const 19 + i32.const 48 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load + local.set $4 + local.get $1 + i32.const 8 + local.get $1 + i32.const 8 + i32.gt_u select + local.get $2 + i32.shl + local.set $1 + local.get $3 if - local.get $0 - local.tee $3 + local.get $5 i32.const 1 - i32.add - local.set $0 + i32.shl + local.tee $2 + i32.const 1073741820 + local.get $2 + i32.const 1073741820 + i32.lt_u + select + local.tee $2 local.get $1 - local.tee $4 - i32.const 1 - i32.add + local.get $1 + local.get $2 + i32.lt_u + select local.set $1 - local.get $3 + end + block $__inlined_func$~lib/rt/itcms/__renew local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 + i32.const 20 i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 + local.tee $3 + i32.load + i32.const -4 + i32.and i32.const 16 + i32.sub + local.get $1 i32.ge_u if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 + local.get $3 local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub + i32.store offset=16 + local.get $4 local.set $2 - br $while-continue|1 + br $__inlined_func$~lib/rt/itcms/__renew end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - i32.load offset=8 - local.tee $4 - local.get $2 - i32.shr_u - local.get $1 - i32.lt_u - if - i32.const 1073741820 - local.get $2 - i32.shr_u - local.get $1 - i32.lt_u - if - i32.const 1456 - i32.const 1616 - i32.const 19 - i32.const 48 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 8 - local.get $1 - i32.const 8 - i32.gt_u - select - local.get $2 - i32.shl - local.set $5 - local.get $0 - i32.load - local.tee $2 - block $__inlined_func$~lib/rt/itcms/__renew (result i32) - local.get $3 - if - local.get $4 - i32.const 1 - i32.shl - local.tee $1 - i32.const 1073741820 - local.get $1 - i32.const 1073741820 - i32.lt_u - select - local.tee $1 - local.get $5 - local.get $1 - local.get $5 - i32.gt_u - select - local.set $5 - end - local.get $2 - i32.const 20 - i32.sub - local.tee $1 - i32.load - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.get $5 - i32.ge_u - if - local.get $1 - local.get $5 - i32.store offset=16 - local.get $2 - br $__inlined_func$~lib/rt/itcms/__renew - end - local.get $5 local.get $1 + local.get $3 i32.load offset=12 call $~lib/rt/itcms/__new - local.set $6 - local.get $5 + local.tee $2 + local.get $4 local.get $1 + local.get $3 i32.load offset=16 - local.tee $1 + local.tee $3 local.get $1 - local.get $5 - i32.gt_u + local.get $3 + i32.lt_u select - local.set $7 - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.get $6 - local.tee $3 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.get $3 - i32.sub - local.get $7 - i32.sub - i32.const 0 - local.get $7 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $3 - local.get $2 - local.get $7 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $2 - local.get $3 - i32.gt_u - if - local.get $2 - i32.const 7 - i32.and - local.get $3 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $3 - i32.const 7 - i32.and - if - local.get $7 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $7 - i32.const 1 - i32.sub - local.set $7 - local.get $3 - local.tee $4 - i32.const 1 - i32.add - local.set $3 - local.get $2 - local.tee $1 - i32.const 1 - i32.add - local.set $2 - local.get $4 - local.get $1 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $7 - i32.const 8 - i32.ge_u - if - local.get $3 - local.get $2 - i64.load - i64.store - local.get $7 - i32.const 8 - i32.sub - local.set $7 - local.get $3 - i32.const 8 - i32.add - local.set $3 - local.get $2 - i32.const 8 - i32.add - local.set $2 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $7 - if - local.get $3 - local.tee $4 - i32.const 1 - i32.add - local.set $3 - local.get $2 - local.tee $1 - i32.const 1 - i32.add - local.set $2 - local.get $4 - local.get $1 - i32.load8_u - i32.store8 - local.get $7 - i32.const 1 - i32.sub - local.set $7 - br $while-continue|2 - end - end - else - local.get $2 - i32.const 7 - i32.and - local.get $3 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $3 - local.get $7 - i32.add - i32.const 7 - i32.and - if - local.get $7 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $7 - i32.const 1 - i32.sub - local.tee $7 - local.get $3 - i32.add - local.get $2 - local.get $7 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $7 - i32.const 8 - i32.ge_u - if - local.get $7 - i32.const 8 - i32.sub - local.tee $7 - local.get $3 - i32.add - local.get $2 - local.get $7 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $7 - if - local.get $7 - i32.const 1 - i32.sub - local.tee $7 - local.get $3 - i32.add - local.get $2 - local.get $7 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - local.get $6 + memory.copy end - local.tee $1 + local.get $2 + local.get $4 i32.ne if local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 - local.get $1 + local.get $2 if local.get $0 - local.get $1 + local.get $2 call $byn-split-outlined-A$~lib/rt/itcms/__link end end local.get $0 - local.get $5 + local.get $1 i32.store offset=8 end ) diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index c29b88c6a5..e8f1838a4a 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -2,9 +2,9 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) @@ -41,7 +41,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/rt/__rtti_base i32 (i32.const 624)) (global $~lib/memory/__data_end i32 (i32.const 812)) @@ -2085,237 +2084,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2365,7 +2133,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) @@ -2861,1259 +2629,6 @@ local.get $1 i32.store offset=12 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -4156,7 +2671,7 @@ local.get $5 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy local.get $3 ) (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) diff --git a/tests/compiler/std/simd.json b/tests/compiler/std/simd.json deleted file mode 100644 index 1bdd02b1be..0000000000 --- a/tests/compiler/std/simd.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "asc_flags": [ - ] -} diff --git a/tests/compiler/std/simd.optimized.wat b/tests/compiler/std/simd.optimized.wat deleted file mode 100644 index 23da3862e2..0000000000 --- a/tests/compiler/std/simd.optimized.wat +++ /dev/null @@ -1,4 +0,0 @@ -(module - (memory $0 0) - (export "memory" (memory $0)) -) diff --git a/tests/compiler/std/simd.ts b/tests/compiler/std/simd.ts deleted file mode 100644 index a7e8e5eabf..0000000000 --- a/tests/compiler/std/simd.ts +++ /dev/null @@ -1,31 +0,0 @@ -// hint: asc tests/compiler/std/simd --enable simd - -@final -class I8x16 { - - @inline static from(vec: v128): I8x16 { - return changetype(vec); - } - - // TODO: not possible due to arguments becoming locals, no longer being compile-time constants - // @inline constructor( - // a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8 - // ) { - // return changetype(i8x16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)); - // } - private constructor() { unreachable(); } - - @inline @operator("+") - add(vec: I8x16): I8x16 { - return changetype(v128.add(changetype(this), changetype(vec))); - } -} - -function test_I8x16(): void { - var a = I8x16.from(i8x16(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)); - var c = a + a; -} - -if (ASC_FEATURE_SIMD) { - test_I8x16(); -} diff --git a/tests/compiler/std/simd.untouched.wat b/tests/compiler/std/simd.untouched.wat deleted file mode 100644 index b0823775ca..0000000000 --- a/tests/compiler/std/simd.untouched.wat +++ /dev/null @@ -1,19 +0,0 @@ -(module - (type $none_=>_none (func)) - (global $~lib/native/ASC_FEATURE_SIMD i32 (i32.const 0)) - (global $~lib/memory/__data_end i32 (i32.const 8)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16392)) - (global $~lib/memory/__heap_base i32 (i32.const 16392)) - (memory $0 0) - (table $0 1 funcref) - (elem $0 (i32.const 1)) - (export "memory" (memory $0)) - (start $~start) - (func $start:std/simd - i32.const 0 - drop - ) - (func $~start - call $start:std/simd - ) -) diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 929f1279c5..d39c917b03 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -2,11 +2,11 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_=>_f32 (func (param i32) (result f32))) (type $i32_=>_f64 (func (param i32) (result f64))) @@ -1249,1439 +1249,398 @@ end end ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - loop $while-continue|0 + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + local.get $0 + i32.load offset=8 + local.tee $2 + local.get $1 + i32.shr_u + i32.eqz + if + i32.const 1073741820 local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select + i32.shr_u + i32.eqz if - local.get $0 - local.tee $3 + i32.const 1584 + i32.const 1536 + i32.const 19 + i32.const 48 + call $~lib/builtins/abort + unreachable + end + block $__inlined_func$~lib/rt/itcms/__renew + local.get $2 i32.const 1 - i32.add - local.set $0 + i32.shl + local.tee $2 + i32.const 1073741820 + local.get $2 + i32.const 1073741820 + i32.lt_u + select + local.tee $2 + i32.const 8 + local.get $1 + i32.shl + local.tee $1 local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 local.get $2 - i32.const 1 + i32.lt_u + select + local.tee $3 + local.get $0 + i32.load + local.tee $2 + i32.const 20 i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 + local.tee $6 + i32.load + i32.const -4 + i32.and i32.const 16 + i32.sub + i32.le_u + if + local.get $6 + local.get $3 + i32.store offset=16 + local.get $2 + local.set $1 + br $__inlined_func$~lib/rt/itcms/__renew + end + local.get $6 + i32.load offset=12 + local.set $7 + local.get $3 + i32.const 1073741804 i32.ge_u if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 + i32.const 1632 + i32.const 1696 + i32.const 260 + i32.const 31 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.ge_u + if + block $__inlined_func$~lib/rt/itcms/interrupt + i32.const 2048 + local.set $1 + loop $do-loop|0 + local.get $1 + call $~lib/rt/itcms/step + i32.sub + local.set $1 + global.get $~lib/rt/itcms/state + i32.eqz + if + global.get $~lib/rt/itcms/total + i64.extend_i32_u + i64.const 200 + i64.mul + i64.const 100 + i64.div_u + i32.wrap_i64 + i32.const 1024 + i32.add + global.set $~lib/rt/itcms/threshold + br $__inlined_func$~lib/rt/itcms/interrupt + end + local.get $1 + i32.const 0 + i32.gt_s + br_if $do-loop|0 + end + global.get $~lib/rt/itcms/total + local.tee $1 + local.get $1 + global.get $~lib/rt/itcms/threshold + i32.sub + i32.const 1024 + i32.lt_u + i32.const 10 + i32.shl + i32.add + global.set $~lib/rt/itcms/threshold + end + end + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.set $4 + local.get $3 + i32.const 16 + i32.add + local.tee $1 + i32.const 1073741820 + i32.gt_u + if + i32.const 1632 + i32.const 1904 + i32.const 458 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 12 + local.get $1 + i32.const 19 + i32.add + i32.const -16 + i32.and + i32.const 4 + i32.sub + local.get $1 + i32.const 12 + i32.le_u + select + local.tee $8 + call $~lib/rt/tlsf/searchBlock + local.tee $1 + i32.eqz + if + memory.size + local.tee $1 + i32.const 4 + local.get $4 + i32.load offset=1568 local.get $1 i32.const 16 + i32.shl + i32.const 4 + i32.sub + i32.ne + i32.shl + i32.const 1 + i32.const 27 + local.get $8 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + local.get $8 i32.add - local.set $1 - local.get $0 - i32.const 16 + local.get $8 + local.get $8 + i32.const 536870910 + i32.lt_u + select i32.add - local.set $0 - local.get $2 + i32.const 65535 + i32.add + i32.const -65536 + i32.and i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 + i32.shr_u + local.tee $5 + local.get $1 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $4 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + local.get $4 + local.get $8 + call $~lib/rt/tlsf/searchBlock + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 1904 + i32.const 496 + i32.const 16 + call $~lib/builtins/abort + unreachable + end end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 local.get $1 i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 + i32.const -4 + i32.and + local.get $8 + i32.lt_u + if + i32.const 0 + i32.const 1904 + i32.const 498 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $4 local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 + call $~lib/rt/tlsf/removeBlock local.get $1 i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 + local.set $5 + local.get $8 i32.const 4 i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - i32.const 20 - i32.sub - local.tee $5 - i32.load - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.get $1 - i32.ge_u - if - local.get $5 - local.get $1 - i32.store offset=16 - local.get $0 - return - end - local.get $5 - i32.load offset=12 - local.set $4 - local.get $1 - i32.const 1073741804 - i32.ge_u - if - i32.const 1632 - i32.const 1696 - i32.const 260 - i32.const 31 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/itcms/total - global.get $~lib/rt/itcms/threshold - i32.ge_u - if - block $__inlined_func$~lib/rt/itcms/interrupt - i32.const 2048 - local.set $2 - loop $do-loop|0 - local.get $2 - call $~lib/rt/itcms/step - i32.sub - local.set $2 - global.get $~lib/rt/itcms/state - i32.eqz - if - global.get $~lib/rt/itcms/total - i64.extend_i32_u - i64.const 200 - i64.mul - i64.const 100 - i64.div_u - i32.wrap_i64 - i32.const 1024 - i32.add - global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt - end - local.get $2 - i32.const 0 - i32.gt_s - br_if $do-loop|0 - end - global.get $~lib/rt/itcms/total - local.tee $2 - local.get $2 - global.get $~lib/rt/itcms/threshold - i32.sub - i32.const 1024 - i32.lt_u - i32.const 10 - i32.shl - i32.add - global.set $~lib/rt/itcms/threshold - end - end - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.set $6 - local.get $1 - i32.const 16 - i32.add - local.tee $2 - i32.const 1073741820 - i32.gt_u - if - i32.const 1632 - i32.const 1904 - i32.const 458 - i32.const 29 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 12 - local.get $2 - i32.const 19 - i32.add - i32.const -16 - i32.and - i32.const 4 - i32.sub - local.get $2 - i32.const 12 - i32.le_u - select - local.tee $7 - call $~lib/rt/tlsf/searchBlock - local.tee $2 - i32.eqz - if - memory.size - local.tee $2 - i32.const 4 - local.get $6 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 4 - i32.sub - i32.ne - i32.shl - i32.const 1 - i32.const 27 - local.get $7 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - local.get $7 - i32.add - local.get $7 - local.get $7 - i32.const 536870910 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $3 - local.get $2 - local.get $3 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $3 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $6 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - local.get $6 - local.get $7 - call $~lib/rt/tlsf/searchBlock - local.tee $2 - i32.eqz - if - i32.const 0 - i32.const 1904 - i32.const 496 + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1904 + i32.const 357 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const -4 + i32.and + local.get $8 + i32.sub + local.tee $9 i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - local.get $2 - i32.load - i32.const -4 - i32.and - local.get $7 - i32.lt_u - if - i32.const 0 - i32.const 1904 - i32.const 498 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $6 - local.get $2 - call $~lib/rt/tlsf/removeBlock - local.get $2 - i32.load - local.set $3 - local.get $7 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1904 - i32.const 357 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $7 - i32.sub - local.tee $8 - i32.const 16 - i32.ge_u - if - local.get $2 - local.get $3 - i32.const 2 - i32.and - local.get $7 - i32.or - i32.store - local.get $7 - local.get $2 - i32.const 4 - i32.add - i32.add - local.tee $3 - local.get $8 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $6 - local.get $3 - call $~lib/rt/tlsf/insertBlock - else - local.get $2 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $2 - i32.const 4 - i32.add - local.get $2 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $3 - local.get $3 - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $2 - local.get $4 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=16 - global.get $~lib/rt/itcms/fromSpace - local.tee $3 - i32.load offset=8 - local.set $4 - local.get $2 - global.get $~lib/rt/itcms/white - local.get $3 - i32.or - i32.store offset=4 - local.get $2 - local.get $4 - i32.store offset=8 - local.get $4 - local.get $4 - i32.load offset=4 - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store offset=4 - local.get $3 - local.get $2 - i32.store offset=8 - global.get $~lib/rt/itcms/total - local.get $2 - i32.load - i32.const -4 - i32.and - i32.const 4 - i32.add - i32.add - global.set $~lib/rt/itcms/total - local.get $2 - i32.const 20 - i32.add - local.tee $4 - local.set $2 - block $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $2 - i32.const 0 - i32.store8 - local.get $1 - local.get $2 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $2 - i32.const 0 - i32.store8 offset=1 - local.get $2 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $2 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $2 - i32.const 0 - local.get $2 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $2 - i32.const 0 - i32.store - local.get $2 - local.get $1 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $3 - i32.add - local.tee $6 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $2 - i32.const 0 - i32.store offset=4 - local.get $2 - i32.const 0 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $6 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $2 - i32.const 0 - i32.store offset=12 - local.get $2 - i32.const 0 - i32.store offset=16 - local.get $2 - i32.const 0 - i32.store offset=20 - local.get $2 - i32.const 0 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $6 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $6 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $6 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $2 - local.get $2 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $6 - i32.add - local.set $2 - local.get $3 - local.get $6 - i32.sub - local.set $3 - loop $while-continue|0 - local.get $3 - i32.const 32 i32.ge_u if - local.get $2 - i64.const 0 - i64.store - local.get $2 - i64.const 0 - i64.store offset=8 - local.get $2 - i64.const 0 - i64.store offset=16 - local.get $2 - i64.const 0 - i64.store offset=24 - local.get $3 - i32.const 32 + local.get $1 + local.get $5 + i32.const 2 + i32.and + local.get $8 + i32.or + i32.store + local.get $8 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $5 + local.get $9 + i32.const 4 i32.sub - local.set $3 - local.get $2 - i32.const 32 + i32.const 1 + i32.or + i32.store + local.get $4 + local.get $5 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $5 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and i32.add - local.set $2 - br $while-continue|0 + local.tee $4 + local.get $4 + i32.load + i32.const -3 + i32.and + i32.store end - end - end - local.get $1 - local.get $5 - i32.load offset=16 - local.tee $2 - local.get $1 - local.get $2 - i32.lt_u - select - local.set $5 - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $4 - local.tee $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.sub - local.get $5 - i32.sub - i32.const 0 - local.get $5 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if local.get $1 - local.get $0 + local.get $7 + i32.store offset=12 + local.get $1 + local.get $3 + i32.store offset=16 + global.get $~lib/rt/itcms/fromSpace + local.tee $4 + i32.load offset=8 + local.set $5 + local.get $1 + global.get $~lib/rt/itcms/white + local.get $4 + i32.or + i32.store offset=4 + local.get $1 local.get $5 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.gt_u - if - local.get $0 - i32.const 7 + i32.store offset=8 + local.get $5 + local.get $5 + i32.load offset=4 + i32.const 3 i32.and local.get $1 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|00 - local.get $1 - i32.const 7 - i32.and - if - local.get $5 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $5 - i32.const 1 - i32.sub - local.set $5 - local.get $1 - local.tee $2 - i32.const 1 - i32.add - local.set $1 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|00 - end - end - loop $while-continue|1 - local.get $5 - i32.const 8 - i32.ge_u - if - local.get $1 - local.get $0 - i64.load - i64.store - local.get $5 - i32.const 8 - i32.sub - local.set $5 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $5 - if - local.get $1 - local.tee $2 - i32.const 1 - i32.add - local.set $1 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $5 - i32.const 1 - i32.sub - local.set $5 - br $while-continue|2 - end - end - else - local.get $0 - i32.const 7 - i32.and + i32.or + i32.store offset=4 + local.get $4 + local.get $1 + i32.store offset=8 + global.get $~lib/rt/itcms/total local.get $1 - i32.const 7 + i32.load + i32.const -4 i32.and - i32.eq - if - loop $while-continue|3 - local.get $1 - local.get $5 - i32.add - i32.const 7 - i32.and - if - local.get $5 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $5 - i32.const 1 - i32.sub - local.tee $5 - i32.add - local.get $0 - local.get $5 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $5 - i32.const 8 - i32.ge_u - if - local.get $1 - local.get $5 - i32.const 8 - i32.sub - local.tee $5 - i32.add - local.get $0 - local.get $5 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $5 - if - local.get $1 - local.get $5 - i32.const 1 - i32.sub - local.tee $5 - i32.add - local.get $0 - local.get $5 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - local.get $4 - ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load offset=8 - local.tee $2 - local.get $1 - i32.shr_u - i32.eqz - if - i32.const 1073741820 - local.get $1 - i32.shr_u - i32.eqz - if - i32.const 1584 - i32.const 1536 - i32.const 19 - i32.const 48 - call $~lib/builtins/abort - unreachable + i32.const 4 + i32.add + i32.add + global.set $~lib/rt/itcms/total + local.get $1 + i32.const 20 + i32.add + local.tee $1 + i32.const 0 + local.get $3 + memory.fill + local.get $1 + local.get $2 + local.get $3 + local.get $6 + i32.load offset=16 + local.tee $4 + local.get $3 + local.get $4 + i32.lt_u + select + memory.copy end - local.get $0 - i32.load - local.tee $3 - local.get $2 - i32.const 1 - i32.shl - local.tee $2 - i32.const 1073741820 - local.get $2 - i32.const 1073741820 - i32.lt_u - select - local.tee $2 - i32.const 8 - local.get $1 - i32.shl - local.tee $1 local.get $1 local.get $2 - i32.lt_u - select - local.tee $1 - call $~lib/rt/itcms/__renew - local.tee $2 - local.get $3 i32.ne if local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $2 + local.get $1 i32.store offset=4 - local.get $2 + local.get $1 if local.get $0 i32.eqz @@ -2694,10 +1653,10 @@ unreachable end global.get $~lib/rt/itcms/white - local.get $2 + local.get $1 i32.const 20 i32.sub - local.tee $2 + local.tee $1 i32.load offset=4 i32.const 3 i32.and @@ -2709,23 +1668,23 @@ i32.load offset=4 i32.const 3 i32.and - local.tee $3 + local.tee $2 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $1 call $~lib/rt/itcms/Object#makeGray else global.get $~lib/rt/itcms/state i32.const 1 i32.eq - local.get $3 + local.get $2 i32.const 3 i32.eq i32.and if - local.get $2 + local.get $1 call $~lib/rt/itcms/Object#makeGray end end @@ -2733,7 +1692,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.store offset=8 end ) diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 7992554ea2..c501b73f02 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -1,9 +1,9 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) @@ -33,7 +33,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/rt/__rtti_base i32 (i32.const 928)) (global $~lib/memory/__data_end i32 (i32.const 988)) @@ -2114,237 +2113,6 @@ local.get $1 i32.store offset=12 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2394,1262 +2162,9 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -3692,7 +2207,7 @@ local.get $5 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 816743a585..d6de2f879b 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -28,135 +28,71 @@ (global $std/staticarray/maxVal (mut i32) (i32.const 0)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 20252)) (memory $0 1) - (data (i32.const 1036) "\1c") - (data (i32.const 1048) "\03\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 1068) "<") - (data (i32.const 1080) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") - (data (i32.const 1132) "<") - (data (i32.const 1144) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00s\00t\00a\00t\00i\00c\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1196) "<") - (data (i32.const 1208) "\01\00\00\00$\00\00\00s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1260) "\1c") - (data (i32.const 1272) "\03\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 1292) "\1c") - (data (i32.const 1304) "\03\00\00\00\0c\00\00\00\05\00\00\00\06\00\00\00\07") - (data (i32.const 1324) "<") - (data (i32.const 1336) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1388) "<") - (data (i32.const 1400) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") - (data (i32.const 1516) ",") - (data (i32.const 1528) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 1596) "<") - (data (i32.const 1608) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 1660) ",") - (data (i32.const 1672) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") - (data (i32.const 1708) ",") - (data (i32.const 1724) "\18\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05") - (data (i32.const 1756) ",") - (data (i32.const 1768) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1036) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 1068) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data (i32.const 1132) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00s\00t\00a\00t\00i\00c\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1196) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1260) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 1292) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\0c\00\00\00\05\00\00\00\06\00\00\00\07") + (data (i32.const 1324) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 1388) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 1516) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data (i32.const 1596) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 1660) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") + (data (i32.const 1708) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05") + (data (i32.const 1756) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 1804) "\1c") - (data (i32.const 1836) "\1c") - (data (i32.const 1848) "\03\00\00\00\08\00\00\00\01\00\00\00\02") - (data (i32.const 1868) "\1c") - (data (i32.const 1880) "\03\00\00\00\04\00\00\00\01") - (data (i32.const 1900) "\1c") - (data (i32.const 1912) "\03") - (data (i32.const 1932) "\1c") - (data (i32.const 1944) "\01\00\00\00\06\00\00\00a\00n\00t") - (data (i32.const 1964) "\1c") - (data (i32.const 1976) "\01\00\00\00\n\00\00\00b\00i\00s\00o\00n") - (data (i32.const 1996) "\1c") - (data (i32.const 2008) "\01\00\00\00\n\00\00\00c\00a\00m\00e\00l") - (data (i32.const 2028) "\1c") - (data (i32.const 2040) "\01\00\00\00\08\00\00\00d\00u\00c\00k") - (data (i32.const 2060) ",") - (data (i32.const 2072) "\01\00\00\00\10\00\00\00e\00l\00e\00p\00h\00a\00n\00t") - (data (i32.const 2108) ",") - (data (i32.const 2120) "\08\00\00\00\14\00\00\00\a0\07\00\00\c0\07\00\00\e0\07\00\00\00\08\00\00 \08") - (data (i32.const 2156) "|") - (data (i32.const 2168) "\01\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y") - (data (i32.const 2284) ",") - (data (i32.const 2296) "\08\00\00\00\14\00\00\00\a0\07\00\00\c0\07\00\00\e0\07\00\00\00\08\00\00 \08") + (data (i32.const 1836) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\08\00\00\00\01\00\00\00\02") + (data (i32.const 1868) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00\01") + (data (i32.const 1900) "\1c\00\00\00\00\00\00\00\00\00\00\00\03") + (data (i32.const 1932) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00n\00t") + (data (i32.const 1964) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00b\00i\00s\00o\00n") + (data (i32.const 1996) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00c\00a\00m\00e\00l") + (data (i32.const 2028) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00d\00u\00c\00k") + (data (i32.const 2060) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00e\00l\00e\00p\00h\00a\00n\00t") + (data (i32.const 2108) ",\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\14\00\00\00\a0\07\00\00\c0\07\00\00\e0\07\00\00\00\08\00\00 \08") + (data (i32.const 2156) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y") + (data (i32.const 2284) ",\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\14\00\00\00\a0\07\00\00\c0\07\00\00\e0\07\00\00\00\08\00\00 \08") (data (i32.const 2332) "\1c") - (data (i32.const 2364) "\1c") - (data (i32.const 2376) "\01\00\00\00\06\00\00\00f\00o\00o") - (data (i32.const 2396) "\1c") - (data (i32.const 2412) "\04\00\00\00P\t") - (data (i32.const 2428) ",") - (data (i32.const 2440) "\08\00\00\00\14\00\00\00\a0\07\00\00\c0\07\00\00\e0\07\00\00\00\08\00\00 \08") - (data (i32.const 2476) "\1c") - (data (i32.const 2488) "\n\00\00\00\08") - (data (i32.const 2502) "\f8\7f") - (data (i32.const 2508) "\1c") - (data (i32.const 2520) "\0b\00\00\00\04\00\00\00\00\00\c0\7f") - (data (i32.const 2540) "\1c") - (data (i32.const 2552) "\03\00\00\00\0c\00\00\00\02\00\00\00\t\00\00\00\t") - (data (i32.const 2572) ",") - (data (i32.const 2584) "\03\00\00\00\10\00\00\00\02\00\00\00\05\00\00\00\t\00\00\00\02") - (data (i32.const 2620) "\1c") - (data (i32.const 2632) "\01\00\00\00\08\00\00\00F\00i\00r\00e") - (data (i32.const 2652) "\1c") - (data (i32.const 2664) "\01\00\00\00\06\00\00\00A\00i\00r") - (data (i32.const 2684) "\1c") - (data (i32.const 2696) "\01\00\00\00\n\00\00\00W\00a\00t\00e\00r") - (data (i32.const 2716) "\1c") - (data (i32.const 2728) "\08\00\00\00\0c\00\00\00P\n\00\00p\n\00\00\90\n") - (data (i32.const 2748) "\1c") - (data (i32.const 2760) "\01") - (data (i32.const 2780) "\1c") - (data (i32.const 2792) "\01\00\00\00\02\00\00\00,") - (data (i32.const 2812) ",") - (data (i32.const 2824) "\01\00\00\00\1c\00\00\00F\00i\00r\00e\00,\00A\00i\00r\00,\00W\00a\00t\00e\00r") - (data (i32.const 2860) ",") - (data (i32.const 2872) "\01\00\00\00\18\00\00\00F\00i\00r\00e\00A\00i\00r\00W\00a\00t\00e\00r") - (data (i32.const 2908) "\1c") - (data (i32.const 2920) "\01\00\00\00\02\00\00\00-") - (data (i32.const 2940) ",") - (data (i32.const 2952) "\01\00\00\00\1c\00\00\00F\00i\00r\00e\00-\00A\00i\00r\00-\00W\00a\00t\00e\00r") - (data (i32.const 2988) "\1c") - (data (i32.const 3000) "\01\00\00\00\06\00\00\00 \00+\00 ") - (data (i32.const 3020) "<") - (data (i32.const 3032) "\01\00\00\00$\00\00\00F\00i\00r\00e\00 \00+\00 \00A\00i\00r\00 \00+\00 \00W\00a\00t\00e\00r") - (data (i32.const 3084) "\1c") - (data (i32.const 3096) "\03\00\00\00\08") - (data (i32.const 3116) "\1c") - (data (i32.const 3128) "\03\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 3148) ",") - (data (i32.const 3160) "\03\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 3196) "\1c") - (data (i32.const 3208) "\03\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 3228) "\1c") - (data (i32.const 3240) "\0c\00\00\00\08\00\00\00\01") - (data (i32.const 3260) "\1c") - (data (i32.const 3272) "\0d\00\00\00\08\00\00\00\02") - (data (i32.const 3292) "\1c") - (data (i32.const 3304) "\0e\00\00\00\08\00\00\00\03") - (data (i32.const 3324) "\1c") - (data (i32.const 3336) "\0f\00\00\00\08\00\00\00\04") - (data (i32.const 3356) "\1c") - (data (i32.const 3368) "\0f\00\00\00\08\00\00\00\05") - (data (i32.const 3388) "\1c") - (data (i32.const 3400) "\0e\00\00\00\08\00\00\00\06") - (data (i32.const 3420) "\1c") - (data (i32.const 3432) "\0e\00\00\00\08\00\00\00\07") - (data (i32.const 3452) "\1c") - (data (i32.const 3464) "\0e\00\00\00\08\00\00\00\08") - (data (i32.const 3484) "\1c") - (data (i32.const 3496) "\0e\00\00\00\08\00\00\00\t") - (data (i32.const 3516) "\1c") - (data (i32.const 3528) "\0e\00\00\00\08\00\00\00\n") - (data (i32.const 3548) "\1c") - (data (i32.const 3560) "\0e\00\00\00\08\00\00\00\0b") - (data (i32.const 3580) "\1c") - (data (i32.const 3592) "\0e\00\00\00\08\00\00\00\0c") - (data (i32.const 3612) "\1c") - (data (i32.const 3624) "\0e\00\00\00\08\00\00\00\0d") - (data (i32.const 3644) ",") - (data (i32.const 3656) "\03\00\00\00\10\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01") - (data (i32.const 3692) "\1c") - (data (i32.const 3704) "\10\00\00\00\08\00\00\00\0e") - (data (i32.const 3728) "\11\00\00\00 \00\00\00\00\00\00\00 ") - (data (i32.const 3756) "$\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\04A\00\00\00\00\00\00\02\t\00\00\00\00\00\00\02\01\00\00\00\00\00\00\04A\00\00\00\00\00\00\02A\00\00\00\00\00\00$\1a\00\00\00\00\00\00$\19") + (data (i32.const 2364) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00f\00o\00o") + (data (i32.const 2396) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00P\t") + (data (i32.const 2428) ",\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\14\00\00\00\a0\07\00\00\c0\07\00\00\e0\07\00\00\00\08\00\00 \08") + (data (i32.const 2476) "\1c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\08\00\00\00\00\00\00\00\00\00\f8\7f") + (data (i32.const 2508) "\1c\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\04\00\00\00\00\00\c0\7f") + (data (i32.const 2540) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\0c\00\00\00\02\00\00\00\t\00\00\00\t") + (data (i32.const 2572) ",\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\10\00\00\00\02\00\00\00\05\00\00\00\t\00\00\00\02") + (data (i32.const 2620) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00F\00i\00r\00e") + (data (i32.const 2652) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00A\00i\00r") + (data (i32.const 2684) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00W\00a\00t\00e\00r") + (data (i32.const 2716) "\1c\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\0c\00\00\00P\n\00\00p\n\00\00\90\n") + (data (i32.const 2748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01") + (data (i32.const 2780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00,") + (data (i32.const 2812) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00F\00i\00r\00e\00,\00A\00i\00r\00,\00W\00a\00t\00e\00r") + (data (i32.const 2860) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00F\00i\00r\00e\00A\00i\00r\00W\00a\00t\00e\00r") + (data (i32.const 2908) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00-") + (data (i32.const 2940) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00F\00i\00r\00e\00-\00A\00i\00r\00-\00W\00a\00t\00e\00r") + (data (i32.const 2988) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00 \00+\00 ") + (data (i32.const 3020) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00F\00i\00r\00e\00 \00+\00 \00A\00i\00r\00 \00+\00 \00W\00a\00t\00e\00r") + (data (i32.const 3084) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\08") + (data (i32.const 3116) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 3148) ",\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 3196) "\1c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 3228) "\1c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\08\00\00\00\01") + (data (i32.const 3260) "\1c\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\08\00\00\00\02") + (data (i32.const 3292) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\03") + (data (i32.const 3324) "\1c\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\08\00\00\00\04") + (data (i32.const 3356) "\1c\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\08\00\00\00\05") + (data (i32.const 3388) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\06") + (data (i32.const 3420) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\07") + (data (i32.const 3452) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\08") + (data (i32.const 3484) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\t") + (data (i32.const 3516) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\n") + (data (i32.const 3548) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\0b") + (data (i32.const 3580) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\0c") + (data (i32.const 3612) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\0d") + (data (i32.const 3644) ",\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\10\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01") + (data (i32.const 3692) "\1c\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\08\00\00\00\0e") + (data (i32.const 3728) "\11\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00$\t\00\00\00\00\00\00 \00\00\00\00\00\00\00\04A\00\00\00\00\00\00\02\t\00\00\00\00\00\00\02\01\00\00\00\00\00\00\04A\00\00\00\00\00\00\02A\00\00\00\00\00\00$\1a\00\00\00\00\00\00$\19") (table $0 15 funcref) (elem $0 (i32.const 1) $start:std/staticarray~anonymous|0 $start:std/staticarray~anonymous|1 $start:std/staticarray~anonymous|2 $start:std/staticarray~anonymous|3 $start:std/staticarray~anonymous|3 $start:std/staticarray~anonymous|5 $start:std/staticarray~anonymous|6 $start:std/staticarray~anonymous|7 $start:std/staticarray~anonymous|8 $start:std/staticarray~anonymous|5 $start:std/staticarray~anonymous|6 $start:std/staticarray~anonymous|5 $start:std/staticarray~anonymous|6 $~lib/util/sort/COMPARATOR~anonymous|0) (export "memory" (memory $0)) @@ -1693,1055 +1629,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/staticarray/StaticArray#__uset (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 @@ -4000,17 +2892,9 @@ br_if $folding-inner0 global.get $~lib/memory/__stack_pointer local.tee $6 - i64.const 0 - i64.store - local.get $6 - i64.const 0 - i64.store offset=8 - local.get $6 - i64.const 0 - i64.store offset=16 - local.get $6 - i64.const 0 - i64.store offset=24 + i32.const 0 + i32.const 32 + memory.fill local.get $6 i32.const 1056 i32.store @@ -4171,7 +3055,7 @@ local.tee $6 i32.const 1312 i32.const 12 - call $~lib/memory/memory.copy + memory.copy local.get $6 global.set $std/staticarray/arr3 global.get $~lib/memory/__stack_pointer @@ -4275,7 +3159,7 @@ local.tee $6 i32.const 1312 i32.const 12 - call $~lib/memory/memory.copy + memory.copy local.get $6 global.set $std/staticarray/arr3 global.get $~lib/memory/__stack_pointer @@ -4475,8 +3359,8 @@ call $~lib/rt/itcms/__new local.tee $2 i32.const 1856 - i32.const 8 - call $~lib/memory/memory.copy + i64.load align=1 + i64.store align=1 local.get $2 i32.store offset=4 global.get $~lib/memory/__stack_pointer @@ -4485,8 +3369,8 @@ call $~lib/rt/itcms/__new local.tee $6 i32.const 1888 - i32.const 4 - call $~lib/memory/memory.copy + i32.load align=1 + i32.store align=1 global.get $~lib/memory/__stack_pointer local.get $6 i32.store offset=12 @@ -4518,7 +3402,7 @@ local.tee $6 i32.const 1920 i32.const 0 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer local.get $6 i32.store offset=12 @@ -4555,7 +3439,7 @@ local.tee $2 i32.const 2128 i32.const 20 - call $~lib/memory/memory.copy + memory.copy local.get $2 i32.store offset=8 global.get $~lib/memory/__stack_pointer @@ -4897,7 +3781,7 @@ local.tee $1 i32.const 2304 i32.const 20 - call $~lib/memory/memory.copy + memory.copy local.get $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer @@ -4971,7 +3855,7 @@ local.tee $1 i32.const 2448 i32.const 20 - call $~lib/memory/memory.copy + memory.copy local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer @@ -5044,8 +3928,8 @@ call $~lib/rt/itcms/__new local.tee $0 i32.const 2496 - i32.const 8 - call $~lib/memory/memory.copy + i64.load align=1 + i64.store align=1 global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -5107,8 +3991,8 @@ call $~lib/rt/itcms/__new local.tee $0 i32.const 2528 - i32.const 4 - call $~lib/memory/memory.copy + i32.load align=1 + i32.store align=1 global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -5171,7 +4055,7 @@ local.tee $2 i32.const 2560 i32.const 12 - call $~lib/memory/memory.copy + memory.copy local.get $2 i32.store offset=16 i32.const 0 @@ -5452,8 +4336,8 @@ call $~lib/rt/itcms/__new local.tee $2 i32.const 2592 - i32.const 16 - call $~lib/memory/memory.copy + v128.load align=1 + v128.store align=1 local.get $2 i32.store offset=16 i32.const 1 @@ -5793,7 +4677,7 @@ local.tee $1 i32.const 2736 i32.const 12 - call $~lib/memory/memory.copy + memory.copy local.get $1 i32.store offset=16 global.get $~lib/memory/__stack_pointer @@ -5986,8 +4870,8 @@ call $~lib/rt/itcms/__new local.tee $1 i32.const 3104 - i32.const 8 - call $~lib/memory/memory.copy + i64.load align=1 + i64.store align=1 local.get $1 i32.store offset=16 i32.const 1 @@ -6053,7 +4937,7 @@ local.tee $1 i32.const 3136 i32.const 12 - call $~lib/memory/memory.copy + memory.copy local.get $1 i32.store offset=16 local.get $1 @@ -6157,7 +5041,7 @@ local.tee $1 i32.const 3168 i32.const 20 - call $~lib/memory/memory.copy + memory.copy local.get $1 i32.store offset=16 local.get $1 @@ -6205,7 +5089,7 @@ select i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $1 i32.const 0 call $~lib/staticarray/StaticArray#__get @@ -6278,7 +5162,7 @@ local.tee $7 i32.const 3216 i32.const 12 - call $~lib/memory/memory.copy + memory.copy local.get $7 i32.store offset=16 global.get $~lib/memory/__stack_pointer @@ -6575,7 +5459,7 @@ local.get $13 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy end local.get $0 local.get $1 @@ -7205,8 +6089,8 @@ call $~lib/rt/itcms/__new local.tee $1 i32.const 3664 - i32.const 16 - call $~lib/memory/memory.copy + v128.load align=1 + v128.store align=1 local.get $1 i32.store offset=28 i32.const 0 @@ -7417,7 +6301,7 @@ local.get $3 local.get $2 local.get $4 - call $~lib/memory/memory.copy + memory.copy end local.get $5 local.get $3 @@ -7486,7 +6370,7 @@ local.get $0 i32.load offset=4 local.get $2 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -7558,7 +6442,7 @@ i32.const 2 i32.shl local.tee $0 - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $4 i32.add @@ -7566,7 +6450,7 @@ local.get $2 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -8048,7 +6932,7 @@ local.tee $7 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $7 i32.add @@ -8065,7 +6949,7 @@ local.get $3 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $3 i32.add @@ -8103,7 +6987,7 @@ i32.shr_u i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy end global.get $~lib/memory/__stack_pointer i32.const 12 diff --git a/tests/compiler/std/staticarray.untouched.wat b/tests/compiler/std/staticarray.untouched.wat index edfcb42f55..51d352d47e 100644 --- a/tests/compiler/std/staticarray.untouched.wat +++ b/tests/compiler/std/staticarray.untouched.wat @@ -31,11 +31,11 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $std/staticarray/arr3 (mut i32) (i32.const 0)) (global $std/staticarray/arr4 (mut i32) (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $std/staticarray/maxVal (mut i32) (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) @@ -2118,1621 +2118,137 @@ (local $3 i32) local.get $1 call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 - i32.eqz - if - local.get $0 - local.get $2 - call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - i32.const 1 - drop - local.get $3 - i32.eqz - if - i32.const 0 - i32.const 592 - i32.const 496 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - i32.const 1 - drop - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 592 - i32.const 498 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 - call $~lib/rt/tlsf/prepareBlock - i32.const 0 - drop - local.get $3 - ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - ) - (func $~lib/rt/itcms/Object#set:rtId (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/rt/itcms/Object#set:rtSize (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=16 - ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741804 - i32.ge_u - if - i32.const 320 - i32.const 384 - i32.const 260 - i32.const 31 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/itcms/total - global.get $~lib/rt/itcms/threshold - i32.ge_u - if - call $~lib/rt/itcms/interrupt - end - i32.const 16 - local.get $0 - i32.add - call $~lib/rt/tlsf/__alloc - i32.const 4 - i32.sub - local.set $2 - local.get $2 - local.get $1 - call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 - call $~lib/rt/itcms/Object#set:rtSize - local.get $2 - global.get $~lib/rt/itcms/fromSpace - global.get $~lib/rt/itcms/white - call $~lib/rt/itcms/Object#linkTo - global.get $~lib/rt/itcms/total - local.get $2 - call $~lib/rt/itcms/Object#get:size - i32.add - global.set $~lib/rt/itcms/total - local.get $2 - i32.const 20 - i32.add - local.set $3 - local.get $3 - i32.const 0 - local.get $0 - call $~lib/memory/memory.fill - local.get $3 - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.set $2 + local.get $0 + local.get $2 + call $~lib/rt/tlsf/searchBlock + local.set $3 + local.get $3 + i32.eqz + if + local.get $0 + local.get $2 + call $~lib/rt/tlsf/growMemory local.get $0 - local.set $5 - local.get $1 - local.set $4 local.get $2 + call $~lib/rt/tlsf/searchBlock local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 i32.const 1 - i32.lt_s drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + i32.eqz if i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end + i32.const 592 + i32.const 496 + i32.const 16 + call $~lib/builtins/abort + unreachable end end + i32.const 1 + drop + local.get $3 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 592 + i32.const 498 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $3 + call $~lib/rt/tlsf/removeBlock + local.get $0 + local.get $3 + local.get $2 + call $~lib/rt/tlsf/prepareBlock + i32.const 0 + drop + local.get $3 + ) + (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + ) + (func $~lib/rt/itcms/Object#set:rtId (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/rt/itcms/Object#set:rtSize (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=16 + ) + (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741804 + i32.ge_u + if + i32.const 320 + i32.const 384 + i32.const 260 + i32.const 31 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.ge_u + if + call $~lib/rt/itcms/interrupt + end + i32.const 16 + local.get $0 + i32.add + call $~lib/rt/tlsf/__alloc + i32.const 4 + i32.sub + local.set $2 + local.get $2 + local.get $1 + call $~lib/rt/itcms/Object#set:rtId + local.get $2 + local.get $0 + call $~lib/rt/itcms/Object#set:rtSize + local.get $2 + global.get $~lib/rt/itcms/fromSpace + global.get $~lib/rt/itcms/white + call $~lib/rt/itcms/Object#linkTo + global.get $~lib/rt/itcms/total + local.get $2 + call $~lib/rt/itcms/Object#get:size + i32.add + global.set $~lib/rt/itcms/total + local.get $2 + i32.const 20 + i32.add + local.set $3 + local.get $3 + i32.const 0 + local.get $0 + memory.fill + local.get $3 ) (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -3745,7 +2261,7 @@ local.get $3 local.get $2 local.get $0 - call $~lib/memory/memory.copy + memory.copy end local.get $3 ) @@ -4686,7 +3202,7 @@ local.get $11 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 ) (func $start:std/staticarray~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -4791,7 +3307,7 @@ local.get $5 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy local.get $3 ) (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) @@ -6758,17 +5274,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 + i32.const 0 + i32.const 32 + memory.fill global.get $std/staticarray/arr1 local.set $5 global.get $~lib/memory/__stack_pointer @@ -8864,7 +7372,7 @@ local.get $0 i32.load offset=4 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $3 local.set $4 global.get $~lib/memory/__stack_pointer @@ -8936,7 +7444,7 @@ local.get $6 local.get $0 local.get $7 - call $~lib/memory/memory.copy + memory.copy local.get $6 local.get $7 i32.add @@ -8944,7 +7452,7 @@ local.get $3 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $5 local.set $8 global.get $~lib/memory/__stack_pointer @@ -9442,7 +7950,7 @@ local.get $11 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $11 i32.add @@ -9459,7 +7967,7 @@ local.get $9 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $9 i32.add @@ -9495,7 +8003,7 @@ call $~lib/string/String#get:length i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $10 local.set $12 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 1942f1c16d..0aa19a8242 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1,9 +1,9 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -25,461 +25,182 @@ (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 37476)) (memory $0 1) - (data (i32.const 1036) "\1c") - (data (i32.const 1048) "\01") - (data (i32.const 1068) "<") - (data (i32.const 1080) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1132) "<") - (data (i32.const 1144) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") - (data (i32.const 1260) "<") - (data (i32.const 1272) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") - (data (i32.const 1324) ",") - (data (i32.const 1336) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 1404) "<") - (data (i32.const 1416) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 1468) "L\03") - (data (i32.const 1480) "\03\00\00\000\03\00\00\df\00S\00S\00\00\00I\01\bc\02N\00\00\00\f0\01J\00\0c\03\00\00\90\03\99\03\08\03\01\03\b0\03\a5\03\08\03\01\03\87\055\05R\05\00\00\96\1eH\001\03\00\00\97\1eT\00\08\03\00\00\98\1eW\00\n\03\00\00\99\1eY\00\n\03\00\00\9a\1eA\00\be\02\00\00P\1f\a5\03\13\03\00\00R\1f\a5\03\13\03\00\03T\1f\a5\03\13\03\01\03V\1f\a5\03\13\03B\03\80\1f\08\1f\99\03\00\00\81\1f\t\1f\99\03\00\00\82\1f\n\1f\99\03\00\00\83\1f\0b\1f\99\03\00\00\84\1f\0c\1f\99\03\00\00\85\1f\0d\1f\99\03\00\00\86\1f\0e\1f\99\03\00\00\87\1f\0f\1f\99\03\00\00\88\1f\08\1f\99\03\00\00\89\1f\t\1f\99\03\00\00\8a\1f\n\1f\99\03\00\00\8b\1f\0b\1f\99\03\00\00\8c\1f\0c\1f\99\03\00\00\8d\1f\0d\1f\99\03\00\00\8e\1f\0e\1f\99\03\00\00\8f\1f\0f\1f\99\03\00\00\90\1f(\1f\99\03\00\00\91\1f)\1f\99\03\00\00\92\1f*\1f\99\03\00\00\93\1f+\1f\99\03\00\00\94\1f,\1f\99\03\00\00\95\1f-\1f\99\03\00\00\96\1f.\1f\99\03\00\00\97\1f/\1f\99\03\00\00\98\1f(\1f\99\03\00\00\99\1f)\1f\99\03\00\00\9a\1f*\1f\99\03\00\00\9b\1f+\1f\99\03\00\00\9c\1f,\1f\99\03\00\00\9d\1f-\1f\99\03\00\00\9e\1f.\1f\99\03\00\00\9f\1f/\1f\99\03\00\00\a0\1fh\1f\99\03\00\00\a1\1fi\1f\99\03\00\00\a2\1fj\1f\99\03\00\00\a3\1fk\1f\99\03\00\00\a4\1fl\1f\99\03\00\00\a5\1fm\1f\99\03\00\00\a6\1fn\1f\99\03\00\00\a7\1fo\1f\99\03\00\00\a8\1fh\1f\99\03\00\00\a9\1fi\1f\99\03\00\00\aa\1fj\1f\99\03\00\00\ab\1fk\1f\99\03\00\00\ac\1fl\1f\99\03\00\00\ad\1fm\1f\99\03\00\00\ae\1fn\1f\99\03\00\00\af\1fo\1f\99\03\00\00\b2\1f\ba\1f\99\03\00\00\b3\1f\91\03\99\03\00\00\b4\1f\86\03\99\03\00\00\b6\1f\91\03B\03\00\00\b7\1f\91\03B\03\99\03\bc\1f\91\03\99\03\00\00\c2\1f\ca\1f\99\03\00\00\c3\1f\97\03\99\03\00\00\c4\1f\89\03\99\03\00\00\c6\1f\97\03B\03\00\00\c7\1f\97\03B\03\99\03\cc\1f\97\03\99\03\00\00\d2\1f\99\03\08\03\00\03\d3\1f\99\03\08\03\01\03\d6\1f\99\03B\03\00\00\d7\1f\99\03\08\03B\03\e2\1f\a5\03\08\03\00\03\e3\1f\a5\03\08\03\01\03\e4\1f\a1\03\13\03\00\00\e6\1f\a5\03B\03\00\00\e7\1f\a5\03\08\03B\03\f2\1f\fa\1f\99\03\00\00\f3\1f\a9\03\99\03\00\00\f4\1f\8f\03\99\03\00\00\f6\1f\a9\03B\03\00\00\f7\1f\a9\03B\03\99\03\fc\1f\a9\03\99\03\00\00\00\fbF\00F\00\00\00\01\fbF\00I\00\00\00\02\fbF\00L\00\00\00\03\fbF\00F\00I\00\04\fbF\00F\00L\00\05\fbS\00T\00\00\00\06\fbS\00T\00\00\00\13\fbD\05F\05\00\00\14\fbD\055\05\00\00\15\fbD\05;\05\00\00\16\fbN\05F\05\00\00\17\fbD\05=\05") + (data (i32.const 1036) "\1c\00\00\00\00\00\00\00\00\00\00\00\01") + (data (i32.const 1068) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 1132) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 1260) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data (i32.const 1324) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data (i32.const 1404) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 1468) "L\03\00\00\00\00\00\00\00\00\00\00\03\00\00\000\03\00\00\df\00S\00S\00\00\00I\01\bc\02N\00\00\00\f0\01J\00\0c\03\00\00\90\03\99\03\08\03\01\03\b0\03\a5\03\08\03\01\03\87\055\05R\05\00\00\96\1eH\001\03\00\00\97\1eT\00\08\03\00\00\98\1eW\00\n\03\00\00\99\1eY\00\n\03\00\00\9a\1eA\00\be\02\00\00P\1f\a5\03\13\03\00\00R\1f\a5\03\13\03\00\03T\1f\a5\03\13\03\01\03V\1f\a5\03\13\03B\03\80\1f\08\1f\99\03\00\00\81\1f\t\1f\99\03\00\00\82\1f\n\1f\99\03\00\00\83\1f\0b\1f\99\03\00\00\84\1f\0c\1f\99\03\00\00\85\1f\0d\1f\99\03\00\00\86\1f\0e\1f\99\03\00\00\87\1f\0f\1f\99\03\00\00\88\1f\08\1f\99\03\00\00\89\1f\t\1f\99\03\00\00\8a\1f\n\1f\99\03\00\00\8b\1f\0b\1f\99\03\00\00\8c\1f\0c\1f\99\03\00\00\8d\1f\0d\1f\99\03\00\00\8e\1f\0e\1f\99\03\00\00\8f\1f\0f\1f\99\03\00\00\90\1f(\1f\99\03\00\00\91\1f)\1f\99\03\00\00\92\1f*\1f\99\03\00\00\93\1f+\1f\99\03\00\00\94\1f,\1f\99\03\00\00\95\1f-\1f\99\03\00\00\96\1f.\1f\99\03\00\00\97\1f/\1f\99\03\00\00\98\1f(\1f\99\03\00\00\99\1f)\1f\99\03\00\00\9a\1f*\1f\99\03\00\00\9b\1f+\1f\99\03\00\00\9c\1f,\1f\99\03\00\00\9d\1f-\1f\99\03\00\00\9e\1f.\1f\99\03\00\00\9f\1f/\1f\99\03\00\00\a0\1fh\1f\99\03\00\00\a1\1fi\1f\99\03\00\00\a2\1fj\1f\99\03\00\00\a3\1fk\1f\99\03\00\00\a4\1fl\1f\99\03\00\00\a5\1fm\1f\99\03\00\00\a6\1fn\1f\99\03\00\00\a7\1fo\1f\99\03\00\00\a8\1fh\1f\99\03\00\00\a9\1fi\1f\99\03\00\00\aa\1fj\1f\99\03\00\00\ab\1fk\1f\99\03\00\00\ac\1fl\1f\99\03\00\00\ad\1fm\1f\99\03\00\00\ae\1fn\1f\99\03\00\00\af\1fo\1f\99\03\00\00\b2\1f\ba\1f\99\03\00\00\b3\1f\91\03\99\03\00\00\b4\1f\86\03\99\03\00\00\b6\1f\91\03B\03\00\00\b7\1f\91\03B\03\99\03\bc\1f\91\03\99\03\00\00\c2\1f\ca\1f\99\03\00\00\c3\1f\97\03\99\03\00\00\c4\1f\89\03\99\03\00\00\c6\1f\97\03B\03\00\00\c7\1f\97\03B\03\99\03\cc\1f\97\03\99\03\00\00\d2\1f\99\03\08\03\00\03\d3\1f\99\03\08\03\01\03\d6\1f\99\03B\03\00\00\d7\1f\99\03\08\03B\03\e2\1f\a5\03\08\03\00\03\e3\1f\a5\03\08\03\01\03\e4\1f\a1\03\13\03\00\00\e6\1f\a5\03B\03\00\00\e7\1f\a5\03\08\03B\03\f2\1f\fa\1f\99\03\00\00\f3\1f\a9\03\99\03\00\00\f4\1f\8f\03\99\03\00\00\f6\1f\a9\03B\03\00\00\f7\1f\a9\03B\03\99\03\fc\1f\a9\03\99\03\00\00\00\fbF\00F\00\00\00\01\fbF\00I\00\00\00\02\fbF\00L\00\00\00\03\fbF\00F\00I\00\04\fbF\00F\00L\00\05\fbS\00T\00\00\00\06\fbS\00T\00\00\00\13\fbD\05F\05\00\00\14\fbD\055\05\00\00\15\fbD\05;\05\00\00\16\fbN\05F\05\00\00\17\fbD\05=\05") (data (i32.const 2317) "\01\02\03\04\05\06\07\08\t\n\0b\0c\0d\0e\0f\10\11\12\13\14\15\16\17\18\19\1a\1b\1c\1d\1e\1f !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~\7f") - (data (i32.const 2444) "\07\08\t\n\0b\0c\06\06\06\06\06\06\06\06\06\06\0d\06\06\0e\06\06\06\06\06\06\06\06\0f\10\11\12\06\13\06\06\06\06\06\06\06\06\06\06\14\15\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\16\17\06\06\06\18\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\19\06\06\06\06\1a\06\06\06\06\06\06\06\1b\06\06\06\06\06\06\06\06\06\06\06\1c\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\1d\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\1e\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06") - (data (i32.const 3067) "$++++++++\01\00TVVVVVVVV") - (data (i32.const 3106) "\18\00\00\00+++++++\07++[VVVVVVVJVV\051P1P1P1P1P1P1P1P$Py1P1P18P1P1P1P1P1P1P1PN1\02N\0d\0dN\03N\00$n\00N1&nQN$PN9\14\81\1b\1d\1dS1P1P\0d1P1P1P\1bS$P1\02\\{\\{\\{\\{\\{\14y\\{\\{\\-+I\03H\03x\\{\14\00\96\n\01+(\06\06\00*\06**+\07\bb\b5+\1e\00+\07+++\01++++++++++++++++++++++++++++++++\01+++++++++++++++++++++++*+++++++++++++\cdF\cd+\00%+\07\01\06\01UVVVVVUVV\02$\81\81\81\81\81\15\81\81\81\00\00+\00\b2\d1\b2\d1\b2\d1\b2\d1\00\00\cd\cc\01\00\d7\d7\d7\d7\d7\83\81\81\81\81\81\81\81\81\81\81\ac\ac\ac\ac\ac\ac\ac\ac\ac\ac\1c\00\00\00\00\001P1P1P1P1P1\02\00\001P1P1P1P1P1P1P1P1PN1P1PN1P1P1P1P1P1P1P1\02\87\a6\87\a6\87\a6\87\a6\87\a6\87\a6\87\a6\87\a6*++++++++++++\00\00\00TVVVVVVVVVVVV") - (data (i32.const 3615) "TVVVVVVVVVVVV\0c\00\0c*+++++++++++++\07*\01") - (data (i32.const 3701) "*++++++++++++++++++++++++++VVl\81\15\00++++++++++++++++++++++++++++++++++++++++++\07l\03A++VVVVVVVVVVVVVV,V+++++++++++++++++++++\01") - (data (i32.const 3860) "\0cl\00\00\00\00\00\06") - (data (i32.const 3906) "\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%Vz\9e&\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06\01++OVV,+\7fVV9++UVV++OVV,+\7fVV\817u[{\\++OVV\02\ac\04\00\009++UVV++OVV,++VV2\13\81W\00o\81~\c9\d7~-\81\81\0e~9\7foW\00\81\81~\15\00~\03++++++++++++\07+$+\97+++++++++*+++++VVVVV\80\81\81\81\819\bb*++++++++++++++++++++++++++++++++++++++++\01\81\81\81\81\81\81\81\81\81\81\81\81\81\81\81\c9\ac\ac\ac\ac\ac\ac\ac\ac\ac\ac\ac\ac\ac\ac\ac\d0\0d\00N1\02\b4\c1\c1\d7\d7$P1P1P1P1P1P1P1P1P1P1P1P1P1P1P1P1P\d7\d7S\c1G\d4\d7\d7\d7\05++++++++++++\07\01\00\01") - (data (i32.const 4357) "N1P1P1P1P1P1P1P\0d\00\00\00\00\00$P1P1P1P1P") - (data (i32.const 4422) "+++++++++++y\\{\\{O{\\{\\{\\{\\{\\{\\{\\{\\{\\{\\-++y\14\\{\\-y*\\\'\\{\\{\\{\a4\00\n\b4\\{\\{O\03x8+++++++++++++O-++\01") - (data (i32.const 4535) "H") - (data (i32.const 4545) "*++++++++++++++++++++++++++") - (data (i32.const 4605) "++++++++\07\00HVVVVVVVV\02") - (data (i32.const 4680) "+++++++++++++UVVVVVVVVVVVV\0e") - (data (i32.const 4738) "$+++++++++++\07\00VVVVVVVVVVVV") - (data (i32.const 4808) "$++++++++++++++++\07\00\00\00\00VVVVVVVVVVVVVVVVV") - (data (i32.const 4905) "*++++++++++VVVVVVVVVV\0e") - (data (i32.const 4959) "*++++++++++VVVVVVVVVV\0e") - (data (i32.const 5024) "+++++++++++UVVVVVVVVVV\0e") + (data (i32.const 2444) "\07\08\t\n\0b\0c\06\06\06\06\06\06\06\06\06\06\0d\06\06\0e\06\06\06\06\06\06\06\06\0f\10\11\12\06\13\06\06\06\06\06\06\06\06\06\06\14\15\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\16\17\06\06\06\18\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\19\06\06\06\06\1a\06\06\06\06\06\06\06\1b\06\06\06\06\06\06\06\06\06\06\06\1c\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\1d\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\1e\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00$++++++++\01\00TVVVVVVVV\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00+++++++\07++[VVVVVVVJVV\051P1P1P1P1P1P1P1P$Py1P1P18P1P1P1P1P1P1P1PN1\02N\0d\0dN\03N\00$n\00N1&nQN$PN9\14\81\1b\1d\1dS1P1P\0d1P1P1P\1bS$P1\02\\{\\{\\{\\{\\{\14y\\{\\{\\-+I\03H\03x\\{\14\00\96\n\01+(\06\06\00*\06**+\07\bb\b5+\1e\00+\07+++\01++++++++++++++++++++++++++++++++\01+++++++++++++++++++++++*+++++++++++++\cdF\cd+\00%+\07\01\06\01UVVVVVUVV\02$\81\81\81\81\81\15\81\81\81\00\00+\00\b2\d1\b2\d1\b2\d1\b2\d1\00\00\cd\cc\01\00\d7\d7\d7\d7\d7\83\81\81\81\81\81\81\81\81\81\81\ac\ac\ac\ac\ac\ac\ac\ac\ac\ac\1c\00\00\00\00\001P1P1P1P1P1\02\00\001P1P1P1P1P1P1P1P1PN1P1PN1P1P1P1P1P1P1P1\02\87\a6\87\a6\87\a6\87\a6\87\a6\87\a6\87\a6\87\a6*++++++++++++\00\00\00TVVVVVVVVVVVV\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00TVVVVVVVVVVVV\0c\00\0c*+++++++++++++\07*\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00*++++++++++++++++++++++++++VVl\81\15\00++++++++++++++++++++++++++++++++++++++++++\07l\03A++VVVVVVVVVVVVVV,V+++++++++++++++++++++\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0cl\00\00\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%Vz\9e&\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06%\06\01++OVV,+\7fVV9++UVV++OVV,+\7fVV\817u[{\\++OVV\02\ac\04\00\009++UVV++OVV,++VV2\13\81W\00o\81~\c9\d7~-\81\81\0e~9\7foW\00\81\81~\15\00~\03++++++++++++\07+$+\97+++++++++*+++++VVVVV\80\81\81\81\819\bb*++++++++++++++++++++++++++++++++++++++++\01\81\81\81\81\81\81\81\81\81\81\81\81\81\81\81\c9\ac\ac\ac\ac\ac\ac\ac\ac\ac\ac\ac\ac\ac\ac\ac\d0\0d\00N1\02\b4\c1\c1\d7\d7$P1P1P1P1P1P1P1P1P1P1P1P1P1P1P1P1P\d7\d7S\c1G\d4\d7\d7\d7\05++++++++++++\07\01\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00N1P1P1P1P1P1P1P\0d\00\00\00\00\00$P1P1P1P1P\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00+++++++++++y\\{\\{O{\\{\\{\\{\\{\\{\\{\\{\\{\\{\\-++y\14\\{\\-y*\\\'\\{\\{\\{\a4\00\n\b4\\{\\{O\03x8+++++++++++++O-++\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00H\00\00\00\00\00\00\00\00\00*++++++++++++++++++++++++++\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00++++++++\07\00HVVVVVVVV\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00+++++++++++++UVVVVVVVVVVVV\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00$+++++++++++\07\00VVVVVVVVVVVV\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00$++++++++++++++++\07\00\00\00\00VVVVVVVVVVVVVVVVV\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00*++++++++++VVVVVVVVVV\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00*++++++++++VVVVVVVVVV\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00+++++++++++UVVVVVVVVVV\0e") (data (i32.const 5113) "\08\00\00V\01\00\009") (data (i32.const 5128) "\01 \00\00\00\e0\ff\ff\00\bf\1d\00\00\e7\02\00\00y\00\00\02$\00\00\01\01\00\00\00\ff\ff\ff\00\00\00\00\01\02\00\00\00\fe\ff\ff\019\ff\ff\00\18\ff\ff\01\87\ff\ff\00\d4\fe\ff\00\c3\00\00\01\d2\00\00\01\ce\00\00\01\cd\00\00\01O\00\00\01\ca\00\00\01\cb\00\00\01\cf\00\00\00a\00\00\01\d3\00\00\01\d1\00\00\00\a3\00\00\01\d5\00\00\00\82\00\00\01\d6\00\00\01\da\00\00\01\d9\00\00\01\db\00\00\008\00\00\03\00\00\00\00\b1\ff\ff\01\9f\ff\ff\01\c8\ff\ff\02($\00\00\00\00\00\01\01\00\00\00\ff\ff\ff\003\ff\ff\00&\ff\ff\01~\ff\ff\01+*\00\01]\ff\ff\01(*\00\00?*\00\01=\ff\ff\01E\00\00\01G\00\00\00\1f*\00\00\1c*\00\00\1e*\00\00.\ff\ff\002\ff\ff\006\ff\ff\005\ff\ff\00O\a5\00\00K\a5\00\001\ff\ff\00(\a5\00\00D\a5\00\00/\ff\ff\00-\ff\ff\00\f7)\00\00A\a5\00\00\fd)\00\00+\ff\ff\00*\ff\ff\00\e7)\00\00C\a5\00\00*\a5\00\00\bb\ff\ff\00\'\ff\ff\00\b9\ff\ff\00%\ff\ff\00\15\a5\00\00\12\a5\00\02$L\00\00\00\00\00\01 \00\00\00\e0\ff\ff\01\01\00\00\00\ff\ff\ff\00T\00\00\01t\00\00\01&\00\00\01%\00\00\01@\00\00\01?\00\00\00\da\ff\ff\00\db\ff\ff\00\e1\ff\ff\00\c0\ff\ff\00\c1\ff\ff\01\08\00\00\00\c2\ff\ff\00\c7\ff\ff\00\d1\ff\ff\00\ca\ff\ff\00\f8\ff\ff\00\aa\ff\ff\00\b0\ff\ff\00\07\00\00\00\8c\ff\ff\01\c4\ff\ff\00\a0\ff\ff\01\f9\ff\ff\02\1ap\00\01\01\00\00\00\ff\ff\ff\01 \00\00\00\e0\ff\ff\01P\00\00\01\0f\00\00\00\f1\ff\ff\00\00\00\00\010\00\00\00\d0\ff\ff\01\01\00\00\00\ff\ff\ff\00\00\00\00\00\c0\0b\00\01`\1c\00\00\00\00\00\01\d0\97\00\01\08\00\00\00\f8\ff\ff\02\05\8a\00\00\00\00\00\01@\f4\ff\00\9e\e7\ff\00\c2\89\00\00\db\e7\ff\00\92\e7\ff\00\93\e7\ff\00\9c\e7\ff\00\9d\e7\ff\00\a4\e7\ff\00\00\00\00\008\8a\00\00\04\8a\00\00\e6\0e\00\01\01\00\00\00\ff\ff\ff\00\00\00\00\00\c5\ff\ff\01A\e2\ff\02\1d\8f\00\00\08\00\00\01\f8\ff\ff\00\00\00\00\00V\00\00\01\aa\ff\ff\00J\00\00\00d\00\00\00\80\00\00\00p\00\00\00~\00\00\00\t\00\00\01\b6\ff\ff\01\f7\ff\ff\00\db\e3\ff\01\9c\ff\ff\01\90\ff\ff\01\80\ff\ff\01\82\ff\ff\02\05\ac\00\00\00\00\00\01\10\00\00\00\f0\ff\ff\01\1c\00\00\01\01\00\00\01\a3\e2\ff\01A\df\ff\01\ba\df\ff\00\e4\ff\ff\02\0b\b1\00\01\01\00\00\00\ff\ff\ff\010\00\00\00\d0\ff\ff\00\00\00\00\01\t\d6\ff\01\1a\f1\ff\01\19\d6\ff\00\d5\d5\ff\00\d8\d5\ff\01\e4\d5\ff\01\03\d6\ff\01\e1\d5\ff\01\e2\d5\ff\01\c1\d5\ff\00\00\00\00\00\a0\e3\ff\00\00\00\00\01\01\00\00\00\ff\ff\ff\02\0c\bc\00\00\00\00\00\01\01\00\00\00\ff\ff\ff\01\bcZ\ff\01\a0\03\00\01\fcu\ff\01\d8Z\ff\000\00\00\01\b1Z\ff\01\b5Z\ff\01\bfZ\ff\01\eeZ\ff\01\d6Z\ff\01\ebZ\ff\01\d0\ff\ff\01\bdZ\ff\01\c8u\ff\00\00\00\00\000h\ff\00`\fc\ff\00\00\00\00\01 \00\00\00\e0\ff\ff\00\00\00\00\01(\00\00\00\d8\ff\ff\00\00\00\00\01@\00\00\00\c0\ff\ff\00\00\00\00\01 \00\00\00\e0\ff\ff\00\00\00\00\01 \00\00\00\e0\ff\ff\00\00\00\00\01\"\00\00\00\de\ff\ff") - (data (i32.const 6085) "\06\'Qow") - (data (i32.const 6100) "|\00\00\7f\00\00\00\00\00\00\00\00\83\8e\92\97\00\aa") - (data (i32.const 6128) "\b4\c4") - (data (i32.const 6250) "\c6\c9\00\00\00\db") - (data (i32.const 6339) "\de\00\00\00\00\e1\00\00\00\00\00\00\00\e4") - (data (i32.const 6364) "\e7") - (data (i32.const 6450) "\ea") - (data (i32.const 6573) "\ed") + (data (i32.const 6085) "\06\'Qow\00\00\00\00\00\00\00\00\00\00|\00\00\7f\00\00\00\00\00\00\00\00\83\8e\92\97\00\aa\00\00\00\00\00\00\00\00\00\00\b4\c4\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\c6\c9\00\00\00\db\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\de\00\00\00\00\e1\00\00\00\00\00\00\00\e4\00\00\00\00\00\00\00\00\00\00\00\e7\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ea\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ed") (data (i32.const 6596) "0\0c1\0dx\0e\7f\0f\80\10\81\11\86\12\89\13\8a\13\8e\14\8f\15\90\16\93\13\94\17\95\18\96\19\97\1a\9a\1b\9c\19\9d\1c\9e\1d\9f\1e\a6\1f\a9\1f\ae\1f\b1 \b2 \b7!\bf\"\c5#\c8#\cb#\dd$\f2#\f6%\f7& -:.=/>0?1@1C2D3E4P5Q6R7S8T9Y:[;\\e?f@hAiBj@kClDoBqErFuG}H\82I\87J\89K\8aL\8bL\8cM\92N\9dO\9ePEW{\1d|\1d}\1d\7fX\86Y\88Z\89Z\8aZ\8c[\8e\\\8f\\\ac]\ad^\ae^\af^\c2_\cc`\cda\cea\cfb\d0c\d1d\d5e\d6f\d7g\f0h\f1i\f2j\f3k\f4l\f5m\f9n\fd-\fe-\ff-PiQiRiSiTiUiViWiXiYiZi[i\\i]i^i_i\82\00\83\00\84\00\85\00\86\00\87\00\88\00\89\00\c0u\cfv\80\89\81\8a\82\8b\85\8c\86\8dp\9dq\9dv\9ew\9ex\9fy\9fz\a0{\a0|\a1}\a1\b3\a2\ba\a3\bb\a3\bc\a4\be\a5\c3\a2\cc\a4\da\a6\db\a6\e5j\ea\a7\eb\a7\ecn\f3\a2\f8\a8\f9\a8\fa\a9\fb\a9\fc\a4&\b0*\b1+\b2N\b3\84\08b\bac\bbd\bce\bdf\bem\bfn\c0o\c1p\c2~\c3\7f\c3}\cf\8d\d0\94\d1\ab\d2\ac\d3\ad\d4\b0\d5\b1\d6\b2\d7\c4\d8\c5\d9\c6\da") - (data (i32.const 7004) "L") - (data (i32.const 7016) "\01\00\00\002\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00c\00a\00s\00e\00m\00a\00p\00p\00i\00n\00g\00.\00t\00s") + (data (i32.const 7004) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\002\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00c\00a\00s\00e\00m\00a\00p\00p\00i\00n\00g\00.\00t\00s") (data (i32.const 7085) "\01\02\03\04\05\06\07\08\t\n\0b\0c\0d\0e\0f\10\11\12\13\14\15\16\17\18\19\1a\1b\1c\1d\1e\1f !\"#$%&\'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\7f") - (data (i32.const 7212) "\12\10\13\14\15\16\17\18\19\1a\1b\1c\1d\1e\1f !\10\10\"\10\10\10#$%&\'()\10*+\10\10\10\10\10\10\10\10\10\10\10,-.\10/\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\100\10\10\101\10234567\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\108\10\109:\10;<=\10\10\10\10\10\10>\10\10?@ABCDEFGHIJKL\10MNO\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10P\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10QR\10\10\10S\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10T\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10UV\10\10\10\10\10\10\10W\10\10\10\10\10XYZ\10\10\10\10\10[\\\10\10\10\10\10\10\10\10\10]\10\10\10\10\10\10\10\10\10\10\10\10") - (data (i32.const 7756) "\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\80@\00\04\00\00\00@\01\00\00\00\00\00\00\00\00\a1\90\01") - (data (i32.const 7842) "\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff0\04\b0") - (data (i32.const 7900) "\f8\03") - (data (i32.const 7927) "\82\00\00\00\00\00\00\fe\ff\ff\ff\ff\bf\b6\00\00\00\00\00\10\00?\00\ff\17\00\00\00\00\01\f8\ff\ff\00\00\01") - (data (i32.const 7974) "\c0\bf\ff=\00\00\00\80\02\00\00\00\ff\ff\ff\07") - (data (i32.const 8000) "\c0\ff\01\00\00\00\00\00\00\f8?$\00\00\c0\ff\ff?\00\00\00\00\00\0e") - (data (i32.const 8038) "\f8\ff\ff\ff\ff\ff\07\00\00\00\00\00\00\14\fe!\fe\00\0c\00\02\00\02\00\00\00\00\00\00\10\1e \00\00\0c\00\00@\06\00\00\00\00\00\00\10\869\02\00\00\00#\00\06\00\00\00\00\00\00\10\be!\00\00\0c\00\00\fc\02\00\00\00\00\00\00\90\1e `\00\0c\00\00\00\04\00\00\00\00\00\00\00\01 \00\00\00\00\00\00\11\00\00\00\00\00\00\c0\c1=`\00\0c\00\00\00\02\00\00\00\00\00\00\90@0\00\00\0c\00\00\00\03\00\00\00\00\00\00\18\1e \00\00\0c\00\00\00\02\00\00\00\00\00\00\00\00\04\\") - (data (i32.const 8210) "\f2\07\c0\7f") - (data (i32.const 8226) "\f2\1f@?") - (data (i32.const 8239) "\03\00\00\a0\02\00\00\00\00\00\00\fe\7f\df\e0\ff\fe\ff\ff\ff\1f@") - (data (i32.const 8273) "\e0\fdf\00\00\00\c3\01\00\1e\00d \00 ") - (data (i32.const 8299) "\10") - (data (i32.const 8311) "\e0") - (data (i32.const 8334) "\1c\00\00\00\1c\00\00\00\0c\00\00\00\0c\00\00\00\00\00\00\00\b0?@\fe\8f \00\00\00\00\00x\00\00\00\00\00\00\08\00\00\00\00\00\00\00`\00\00\00\00\02") - (data (i32.const 8400) "\87\01\04\0e") - (data (i32.const 8430) "\80\t\00\00\00\00\00\00@\7f\e5\1f\f8\9f\00\00\00\00\80\00\ff\ff\01\00\00\00\00\00\00\00\0f\00\00\00\00\00\d0\17\04\00\00\00\00\f8\0f\00\03\00\00\00<;\00\00\00\00\00\00@\a3\03\00\00\00\00\00\00\f0\cf\00\00\00\00\00\00\00\00?") - (data (i32.const 8518) "\f7\ff\fd!\10\03\00\00\00\00\00\f0\ff\ff\ff\ff\ff\ff\ff\07\00\01\00\00\00\f8\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\fb") - (data (i32.const 8579) "\a0\03\e0\00\e0\00\e0\00`\00\f8\00\03\90|\00\00\00\00\00\00\df\ff\02\80\00\00\ff\1f\00\00\00\00\00\00\ff\ff\ff\ff\01") - (data (i32.const 8635) "0") - (data (i32.const 8649) "\80\03") - (data (i32.const 8665) "\80\00\80") - (data (i32.const 8680) "\ff\ff\ff\ff\00\00\00\00\00\80") - (data (i32.const 8716) " \00\00\00\00<>\08") - (data (i32.const 8735) "~") - (data (i32.const 8747) "p\00\00 ") - (data (i32.const 8811) "?\00\10") - (data (i32.const 8825) "\80\f7\bf\00\00\00\f0") - (data (i32.const 8842) "\03\00\ff\ff\ff\ff\03") - (data (i32.const 8858) "\01\00\00\07") - (data (i32.const 8875) "\03D\08\00\00`\10") - (data (i32.const 8900) "0\00\00\00\ff\ff\03\80\00\00\00\00\c0?\00\00\80\ff\03\00\00\00\00\00\07\00\00\00\00\00\c83\00\80\00\00`\00\00\00\00\00\00\00\00~f\00\08\10\00\00\00\00\01\10\00\00\00\00\00\00\9d\c1\02\00\00 \000X") - (data (i32.const 8983) "\f8\00\0e") - (data (i32.const 9000) " !\00\00\00\00\00@") - (data (i32.const 9026) "\fc\ff\03\00\00\00\00\00\00\00\ff\ff\08\00\ff\ff\00\00\00\00$") - (data (i32.const 9067) "\80\80@\00\04\00\00\00@\01\00\00\00\00\00\01\00\00\00\00\c0\00\00\00\00\00\00\00\00\08\00\00\0e") - (data (i32.const 9131) " ") - (data (i32.const 9160) "\01") - (data (i32.const 9178) "\c0\07") - (data (i32.const 9196) "n\f0\00\00\00\00\00\87") - (data (i32.const 9224) "`\00\00\00\00\00\00\00\f0") - (data (i32.const 9281) "\18") - (data (i32.const 9300) "\c0\ff\01") - (data (i32.const 9324) "\02\00\00\00\00\00\00\ff\7f\00\00\00\00\00\00\80\03\00\00\00\00\00x&\00 \00\00\00\00\00\00\07\00\00\00\80\ef\1f\00\00\00\00\00\00\00\08\00\03\00\00\00\00\00\c0\7f\00\9e") - (data (i32.const 9393) "\80\d3@") - (data (i32.const 9415) "\80\f8\07\00\00\03\00\00\00\00\00\00\18\01\00\00\00\c0\1f\1f") - (data (i32.const 9459) "\ff\\\00\00@") - (data (i32.const 9474) "\f8\85\0d") - (data (i32.const 9506) "<\b0\01\00\000") - (data (i32.const 9522) "\f8\a7\01") - (data (i32.const 9537) "(\bf") - (data (i32.const 9551) "\e0\bc\0f") - (data (i32.const 9585) "\80\ff\06") - (data (i32.const 9619) "X\08") - (data (i32.const 9638) "\f0\0c\01\00\00\00\fe\07\00\00\00\00\f8y\80\00~\0e\00\00\00\00\00\fc\7f\03") - (data (i32.const 9682) "\7f\bf") - (data (i32.const 9694) "\fc\ff\ff\fcm") - (data (i32.const 9714) "~\b4\bf") - (data (i32.const 9726) "\a3") - (data (i32.const 9770) "\18\00\00\00\00\00\00\00\ff\01") - (data (i32.const 9834) "\1f\00\00\00\00\00\00\00\7f\00\0f") - (data (i32.const 9877) "\80\00\00\00\00\00\00\00\80\ff\ff\00\00\00\00\00\00\00\00\1b") - (data (i32.const 9919) "`\0f") - (data (i32.const 9944) "\80\03\f8\ff\e7\0f\00\00\00<") - (data (i32.const 9972) "\1c") - (data (i32.const 9996) "\ff\ff\ff\ff\ff\ff\7f\f8\ff\ff\ff\ff\ff\1f \00\10\00\00\f8\fe\ff") - (data (i32.const 10028) "\7f\ff\ff\f9\db\07") - (data (i32.const 10066) "\ff?") - (data (i32.const 10121) "\f0") - (data (i32.const 10150) "\7f") - (data (i32.const 10164) "\f0\0f") - (data (i32.const 10219) "\f8") - (data (i32.const 10220) "\12\13\14\15\16\17\10\10\10\10\10\10\10\10\10\10\18\10\10\19\10\10\10\10\10\10\10\10\1a\1b\11\1c\1d\1e\10\10\1f\10\10\10\10\10\10\10 !\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\"#\10\10\10$\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10%\10\10\10&\10\10\10\10\'\10\10\10\10\10\10\10(\10\10\10\10\10\10\10\10\10\10\10)\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10*\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10+,-.\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10/\10\10\10\10\10\10\100\10\10\10\10\10\10\10\10\10\10\10\10\10\10") - (data (i32.const 10764) "\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\00\00\00\00\fe\ff\ff\07\fe\ff\ff\07\00\00\00\00\00\04 \04\ff\ff\7f\ff\ff\ff\7f\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\f7\f0\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ef\ff\ff\ff\ff\01\03\00\00\00\1f") - (data (i32.const 10900) " \00\00\00\00\00\cf\bc@\d7\ff\ff\fb\ff\ff\ff\ff\ff\ff\ff\ff\ff\bf\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\03\fc\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\fe\ff\ff\ff\7f\00\ff\ff\ff\ff\ff\01") - (data (i32.const 11008) "\ff\ff\ff\ff\bf \ff\ff\ff\ff\ff\e7") - (data (i32.const 11040) "\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff??") - (data (i32.const 11068) "\ff\01\ff\ff\ff\ff\ff\e7\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\00\00\00\00\ff\ff??\ff\ff\ff\ff??\ff\aa\ff\ff\ff?\ff\ff\ff\ff\ff\ff\df_\dc\1f\cf\0f\ff\1f\dc\1f") - (data (i32.const 11162) "\02\80\00\00\ff\1f") - (data (i32.const 11180) "\84\fc/>P\bd\1f\f2\e0C\00\00\ff\ff\ff\ff\18") - (data (i32.const 11234) "\c0\ff\ff\ff\ff\ff\ff\03\00\00\ff\ff\ff\ff\ff\7f\ff\ff\ff\ff\ff\7f\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\1fx\0c\00\ff\ff\ff\ff\bf ") - (data (i32.const 11316) "\ff\ff\ff\ff\ff?\00\00\ff\ff\ff?") - (data (i32.const 11344) "\fc\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ffx\ff\ff\ff\ff\ff\ff\fc\07\00\00\00\00`\07\00\00\00\00\00\00\ff\ff\ff\ff\ff\f7\ff\01\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\00\00\00\00\7f\00\f8") - (data (i32.const 11440) "\fe\ff\ff\07\fe\ff\ff\07") - (data (i32.const 11468) "\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 11490) "\ff\ff\ff\ff\0f\ff\ff\ff\ff\0f") - (data (i32.const 11516) "\ff\ff\ff\ff\ff\ff\07\00\ff\ff\ff\ff\ff\ff\07") - (data (i32.const 11552) "\ff\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 11572) "\ff\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 11596) "\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\df\ff\ff\ff\ff\ff\ff\ff\ff\dfd\de\ff\eb\ef\ff\ff\ff\ff\ff\ff\ff\bf\e7\df\df\ff\ff\ff{_\fc\fd\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff?\ff\ff\ff\fd\ff\ff\f7\ff\ff\ff\f7\ff\ff\df\ff\ff\ff\df\ff\ff\7f\ff\ff\ff\7f\ff\ff\ff\fd\ff\ff\ff\fd\ff\ff\f7\0f\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\0f") - (data (i32.const 11762) "\ff\ff\ff\03\ff\ff\ff\03\ff\ff\ff\03") - (data (i32.const 11788) ",") - (data (i32.const 11800) "\01\00\00\00\16\00\00\000\009\00_\00A\00Z\00 \00a\00z\00.\00!\00\n") - (data (i32.const 11836) ",") - (data (i32.const 11848) "\01\00\00\00\16\00\00\000\009\00_\00A\00Z\00 \00A\00Z\00.\00!\00\n") - (data (i32.const 11884) ",") - (data (i32.const 11896) "\01\00\00\00\16\00\00\000\009\00_\00A\00Z\00 \00a\00z\00.\00!\00\t") - (data (i32.const 11932) ",") - (data (i32.const 11944) "\01\00\00\00\16\00\00\000\009\00_\00a\00z\00 \00a\00z\00.\00!\00\t") - (data (i32.const 11980) "\\") - (data (i32.const 11992) "\01\00\00\00J\00\00\00D\00e\00r\00 \00W\00e\00c\00h\00s\00e\00l\00 \00a\00l\00l\00e\00i\00n\00 \00i\00s\00t\00 \00d\00a\00s\00 \00B\00e\00s\00t\00\e4\00n\00d\00i\00g\00e") - (data (i32.const 12076) "\\") - (data (i32.const 12088) "\01\00\00\00J\00\00\00D\00E\00R\00 \00W\00E\00C\00H\00S\00E\00L\00 \00A\00L\00L\00E\00I\00N\00 \00I\00S\00T\00 \00D\00A\00S\00 \00B\00E\00S\00T\00\c4\00N\00D\00I\00G\00E") - (data (i32.const 12172) "\\") - (data (i32.const 12184) "\01\00\00\00J\00\00\00d\00e\00r\00 \00w\00e\00c\00h\00s\00e\00l\00 \00a\00l\00l\00e\00i\00n\00 \00i\00s\00t\00 \00d\00a\00s\00 \00b\00e\00s\00t\00\e4\00n\00d\00i\00g\00e") - (data (i32.const 12268) "<") - (data (i32.const 12280) "\01\00\00\00$\00\00\00@\00 \00\14 \00\14\04@\04C\043\04 \00G\045\04;\04>\042\045\04:\040\04!") - (data (i32.const 12332) "<") - (data (i32.const 12344) "\01\00\00\00$\00\00\00@\00 \00\14 \00\14\04 \04#\04\13\04 \00\'\04\15\04\1b\04\1e\04\12\04\15\04\1a\04\10\04!") - (data (i32.const 12396) "<") - (data (i32.const 12408) "\01\00\00\00$\00\00\00@\00 \00\14 \004\04@\04C\043\04 \00G\045\04;\04>\042\045\04:\040\04!") - (data (i32.const 12460) "\\") - (data (i32.const 12472) "\01\00\00\00D\00\00\00.\" \00E\00\c5\"d\00a\00 \00=\00 \00Q\00,\00 \00n\00 \00\92! \00\1e\",\00 \00\11\" \00f\00(\00i\00)\00 \00=\00 \00\0f\" \00g\00(\00i\00)") - (data (i32.const 12556) "\\") - (data (i32.const 12568) "\01\00\00\00D\00\00\00.\" \00E\00\c5\"D\00A\00 \00=\00 \00Q\00,\00 \00N\00 \00\92! \00\1e\",\00 \00\11\" \00F\00(\00I\00)\00 \00=\00 \00\0f\" \00G\00(\00I\00)") - (data (i32.const 12652) "\\") - (data (i32.const 12664) "\01\00\00\00D\00\00\00.\" \00e\00\c5\"d\00a\00 \00=\00 \00q\00,\00 \00n\00 \00\92! \00\1e\",\00 \00\11\" \00f\00(\00i\00)\00 \00=\00 \00\0f\" \00g\00(\00i\00)") - (data (i32.const 12748) "\\") - (data (i32.const 12760) "\01\00\00\00H\00\00\00\f0\00i\00 \001\01n\00t\00Y\02\c8\02n\00\e6\00\83\02Y\02n\00Y\02l\00 \00f\00Y\02\c8\02n\00[\02t\001\01k\00 \00Y\02s\00o\00\8a\02s\00i\00\c8\02e\001\01\83\02n") - (data (i32.const 12844) "\\") - (data (i32.const 12856) "\01\00\00\00H\00\00\00\d0\00I\00 \00I\00N\00T\00\8f\01\c8\02N\00\c6\00\a9\01\8f\01N\00\8f\01L\00 \00F\00\8f\01\c8\02N\00\90\01T\00I\00K\00 \00\8f\01S\00O\00\b1\01S\00I\00\c8\02E\00I\00\a9\01N") - (data (i32.const 12940) "\\") - (data (i32.const 12952) "\01\00\00\00H\00\00\00\f0\00i\00 \00i\00n\00t\00Y\02\c8\02n\00\e6\00\83\02Y\02n\00Y\02l\00 \00f\00Y\02\c8\02n\00[\02t\00i\00k\00 \00Y\02s\00o\00\8a\02s\00i\00\c8\02e\00i\00\83\02n") - (data (i32.const 13036) "L") - (data (i32.const 13048) "\01\00\00\00.\00\00\00\a3\03r\1f \00\b3\03\bd\03\c9\03\c1\03\af\03\b6\03\c9\03 \00\00\1f\c0\03x\1f \00\c4\03t\1f\bd\03 \00\ba\03\cc\03\c8\03\b7\03") - (data (i32.const 13116) "L") - (data (i32.const 13128) "\01\00\00\00.\00\00\00\a3\03\c8\1f \00\93\03\9d\03\a9\03\a1\03\8a\03\96\03\a9\03 \00\08\1f\a0\03\f8\1f \00\a4\03\ca\1f\9d\03 \00\9a\03\8c\03\a8\03\97\03") - (data (i32.const 13196) "L") - (data (i32.const 13208) "\01\00\00\000\00\00\00\c4\03\bf\03\e6\1f \00\c3\03\c0\03\b1\03\b8\03\b9\03\bf\03\e6\1f \00\c4\03t\1f\bd\03 \00\c4\03\c1\03\bf\03\bc\03\b5\03\c1\03\ae\03,") - (data (i32.const 13276) "L") - (data (i32.const 13288) "\01\00\00\004\00\00\00\a4\03\9f\03\a5\03B\03 \00\a3\03\a0\03\91\03\98\03\99\03\9f\03\a5\03B\03 \00\a4\03\ca\1f\9d\03 \00\a4\03\a1\03\9f\03\9c\03\95\03\a1\03\89\03,") - (data (i32.const 13356) "<") - (data (i32.const 13368) "\01\00\00\00,\00\00\00\c3\03r\1f \00\b3\03\bd\03\c9\03\c1\03\af\03\b6\03\c9\03 \00\00\1f\c0\03x\1f \00\c4\03t\1f\bd\03 \00D\1f\c8\03\b7\03") - (data (i32.const 13420) "<") - (data (i32.const 13432) "\01\00\00\00,\00\00\00\a3\03\c8\1f \00\93\03\9d\03\a9\03\a1\03\8a\03\96\03\a9\03 \00\08\1f\a0\03\f8\1f \00\a4\03\ca\1f\9d\03 \00L\1f\a8\03\97\03") - (data (i32.const 13484) "L") - (data (i32.const 13496) "\01\00\00\002\00\00\00\c0\03\bf\03z\1f \00\bc\03r\1f \00\b2\03\af\03\b1\03 \00\bc\03\b5\03\c4\03\c1\03\ac\03\b5\03\b9\03 \00\c4\03t\1f \00\b3\03\c6\1f.") - (data (i32.const 13564) "L") - (data (i32.const 13576) "\01\00\00\004\00\00\00\a0\03\9f\03\ea\1f \00\9c\03\c8\1f \00\92\03\8a\03\91\03 \00\9c\03\95\03\a4\03\a1\03\86\03\95\03\99\03 \00\a4\03\ca\1f \00\93\03\97\03B\03.") - (data (i32.const 13644) "L") - (data (i32.const 13656) "\01\00\00\00.\00\00\00\91\03\c0\03\bf\1f \00\c4\03p\1f \00\ba\03\cc\03\ba\03\ba\03\b1\03\bb\03\b1\03 \00\b2\03\b3\03\b1\03\bb\03\bc\03\ad\03\bd\03\b7\03") - (data (i32.const 13724) "L") - (data (i32.const 13736) "\01\00\00\00.\00\00\00\91\03\a0\03\bf\1f \00\a4\03\ba\1f \00\9a\03\8c\03\9a\03\9a\03\91\03\9b\03\91\03 \00\92\03\93\03\91\03\9b\03\9c\03\88\03\9d\03\97\03") - (data (i32.const 13804) "<") - (data (i32.const 13816) "\01\00\00\00(\00\00\00\c4\03\f6\1f\bd\03 \00\fe\1f\95\03\bb\03\bb\03\ae\03\bd\03\c9\03\bd\03 \00\c4\03p\1f \001\1f\b5\03\c1\03\ac\03") - (data (i32.const 13868) "<") - (data (i32.const 13880) "\01\00\00\00*\00\00\00\a4\03\a9\03B\03\9d\03 \00\fe\1f\95\03\9b\03\9b\03\89\03\9d\03\a9\03\9d\03 \00\a4\03\ba\1f \009\1f\95\03\a1\03\86\03") - (data (i32.const 13932) "L") - (data (i32.const 13944) "\01\00\00\002\00\00\00\ba\03\b1\03v\1f \00\c3\03p\1f\bd\03 \00\c0\03\c1\03\f6\1f\c4\03\b1\03 \00\00\1f\bd\03\b4\03\c1\03\b5\03\b9\03\c9\03\bc\03\ad\03\bd\03\b7\03") - (data (i32.const 14012) "L") - (data (i32.const 14024) "\01\00\00\004\00\00\00\9a\03\91\03\da\1f \00\a3\03\ba\1f\9d\03 \00\a0\03\a1\03\a9\03B\03\a4\03\91\03 \00\08\1f\9d\03\94\03\a1\03\95\03\99\03\a9\03\9c\03\88\03\9d\03\97\03") - (data (i32.const 14092) "L") - (data (i32.const 14104) "\01\00\00\006\00\00\00\c7\03\b1\03\d6\1f\c1\03\b5\03,\00 \00f\1f \00\c7\03\b1\03\d6\1f\c1\03\b5\03,\00 \00\bf\1f\95\03\bb\03\b5\03\c5\03\b8\03\b5\03\c1\03\b9\03\ac\03!") - (data (i32.const 14172) "L") - (data (i32.const 14184) "\01\00\00\00:\00\00\00\a7\03\91\03\99\03B\03\a1\03\95\03,\00 \00n\1f \00\a7\03\91\03\99\03B\03\a1\03\95\03,\00 \00\bf\1f\95\03\9b\03\95\03\a5\03\98\03\95\03\a1\03\99\03\86\03!") - (data (i32.const 14252) "\9c") - (data (i32.const 14264) "\01\00\00\00\80\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00 \00/\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") - (data (i32.const 14412) "\9c") - (data (i32.const 14424) "\01\00\00\00\80\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00 \00/\000\001\002\003\004\005\006\007\008\009\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z") - (data (i32.const 14572) "\9c") - (data (i32.const 14584) "\01\00\00\00\80\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\00 \00/\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") - (data (i32.const 14732) "\1c") - (data (i32.const 14744) "\01\00\00\00\02\00\00\00\df") - (data (i32.const 14764) "\1c") - (data (i32.const 14776) "\01\00\00\00\04\00\00\00S\00S") - (data (i32.const 14796) "\1c") - (data (i32.const 14808) "\01\00\00\00\02\00\00\000\01") - (data (i32.const 14828) "\1c") - (data (i32.const 14840) "\01\00\00\00\04\00\00\00i\00\07\03") - (data (i32.const 14860) "\cc") - (data (i32.const 14872) "\01\00\00\00\ae\00\00\00\a3\00\a9\00\b5\00\c0\00\c6\00\d6\00\de\00\df\00\e9\00\f6\00\ff\00\13 \14 \18 \1c \1d \1e \" & 0 \"!S\01`\01x\01~\01\ac \00\91\03\92\03\93\03\94\03\a9\03\b1\03\b2\03\b3\03\b4\03\c9\03 \00\10\04\11\04\12\04\13\04\14\040\041\042\043\044\04\00\"\02\"\08\"\1d!\'\"*\"a\"\1e\" \00\91!\97!\a8!\bb!\e3! \00\10%<%T%X%\91%\ba%:&@& \00\01\fb\fd\ff@$\82 \1f\02\1e\e5\04\84\1eP\02\d0\02N#\d0\051\05\d0\10") - (data (i32.const 15068) "\cc") - (data (i32.const 15080) "\01\00\00\00\b2\00\00\00\a3\00\a9\00\9c\03\c0\00\c6\00\d6\00\de\00S\00S\00\c9\00\d6\00x\01\13 \14 \18 \1c \1d \1e \" & 0 \"!R\01`\01x\01}\01\ac \00\91\03\92\03\93\03\94\03\a9\03\91\03\92\03\93\03\94\03\a9\03 \00\10\04\11\04\12\04\13\04\14\04\10\04\11\04\12\04\13\04\14\04\00\"\02\"\08\"\1d!\'\"*\"a\"\1e\" \00\91!\97!\a8!\bb!\e3! \00\10%<%T%X%\91%\ba%:&@& \00F\00I\00\fd\ff@$\82 (\1f\02\1e\e4\04\84\1eo,\d0\02N#\d0\051\05\90\1c") - (data (i32.const 15276) "\1c") - (data (i32.const 15288) "\01\00\00\00\04\00\00\00s\00s") - (data (i32.const 15308) "\1c") - (data (i32.const 15320) "\01\00\00\00\02\00\00\00\01\fb") - (data (i32.const 15340) "\1c") - (data (i32.const 15352) "\01\00\00\00\04\00\00\00f\00i") - (data (i32.const 15372) "\cc") - (data (i32.const 15384) "\01\00\00\00\b8\00\00\00A\d8\0e\df \00A\d81\df \00A\d8y\df \00C\d8S\dc \00C\d8x\dc \00C\d8\96\dc \00C\d8\cf\dc \00C\d8\d5\dc \00C\d8\15\dd \00C\d8|\dd \00C\d8\7f\dd \00C\d8\0e\de \00C\d8\0f\de \00C\d8w\de \00C\d8\9d\de \00C\d8\a2\de \00C\d8\d7\de \00C\d8\f9\de \00C\d8\fa\de \00C\d8-\df \00C\d8.\df \00C\d8L\df \00C\d8\b4\df \00C\d8\bc\df \00C\d8\ea\df \00D\d8\\\dc \00D\d8o\dc \00D\d8u\dc \00D\d8v\dc \00D\d8{\dc \00D\d8\c1\dc") - (data (i32.const 15580) ",") - (data (i32.const 15592) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 15628) "\1c") - (data (i32.const 15640) "\01\00\00\00\04\00\00\00\00\d8\00\dc") - (data (i32.const 15660) "\1c") - (data (i32.const 15672) "\01\00\00\00\02\00\00\00\88\1f") - (data (i32.const 15692) "\1c") - (data (i32.const 15704) "\01\00\00\00\02\00\00\00\80\1f") - (data (i32.const 15724) "\1c") - (data (i32.const 15736) "\01\00\00\00\02\00\00\00\8f\1f") - (data (i32.const 15756) "\1c") - (data (i32.const 15768) "\01\00\00\00\02\00\00\00\87\1f") - (data (i32.const 15788) "\1c") - (data (i32.const 15800) "\01\00\00\00\02\00\00\00\fc\1f") - (data (i32.const 15820) "\1c") - (data (i32.const 15832) "\01\00\00\00\02\00\00\00\f3\1f") - (data (i32.const 15852) "\1c") - (data (i32.const 15864) "\01\00\00\00\02\00\00\00\a3\03") - (data (i32.const 15884) "\1c") - (data (i32.const 15896) "\01\00\00\00\02\00\00\00\c3\03") - (data (i32.const 15916) "\1c") - (data (i32.const 15928) "\01\00\00\00\04\00\00\00 \00\a3\03") - (data (i32.const 15948) "\1c") - (data (i32.const 15960) "\01\00\00\00\04\00\00\00 \00\c3\03") - (data (i32.const 15980) "\1c") - (data (i32.const 15992) "\01\00\00\00\04\00\00\00\a3\03 ") - (data (i32.const 16012) "\1c") - (data (i32.const 16024) "\01\00\00\00\04\00\00\00\c3\03 ") - (data (i32.const 16044) "\1c") - (data (i32.const 16056) "\01\00\00\00\06\00\00\00 \00\a3\03 ") - (data (i32.const 16076) "\1c") - (data (i32.const 16088) "\01\00\00\00\06\00\00\00 \00\c3\03 ") - (data (i32.const 16108) "\1c") - (data (i32.const 16120) "\01\00\00\00\06\00\00\00a\00\a3\03 ") - (data (i32.const 16140) "\1c") - (data (i32.const 16152) "\01\00\00\00\06\00\00\00a\00\c2\03 ") - (data (i32.const 16172) "\1c") - (data (i32.const 16184) "\01\00\00\00\06\00\00\00a\00\a3\03\n") - (data (i32.const 16204) "\1c") - (data (i32.const 16216) "\01\00\00\00\06\00\00\00a\00\c2\03\n") - (data (i32.const 16236) "\1c") - (data (i32.const 16248) "\01\00\00\00\04\00\00\00a\00\a3\03") - (data (i32.const 16268) "\1c") - (data (i32.const 16280) "\01\00\00\00\04\00\00\00a\00\c2\03") - (data (i32.const 16300) "\1c") - (data (i32.const 16312) "\01\00\00\00\06\00\00\00a\00\a3\03b") - (data (i32.const 16332) "\1c") - (data (i32.const 16344) "\01\00\00\00\06\00\00\00a\00\c3\03b") - (data (i32.const 16364) "\1c") - (data (i32.const 16376) "\01\00\00\00\06\00\00\00\a3\03\a3\03 ") - (data (i32.const 16396) "\1c") - (data (i32.const 16408) "\01\00\00\00\06\00\00\00\c3\03\c2\03 ") - (data (i32.const 16428) "\1c") - (data (i32.const 16440) "\01\00\00\00\06\00\00\001\00\a3\03 ") - (data (i32.const 16460) "\1c") - (data (i32.const 16472) "\01\00\00\00\06\00\00\001\00\c3\03 ") - (data (i32.const 16492) "\1c") - (data (i32.const 16504) "\01\00\00\00\06\00\00\00;\00\a3\03 ") - (data (i32.const 16524) "\1c") - (data (i32.const 16536) "\01\00\00\00\06\00\00\00;\00\c3\03 ") - (data (i32.const 16556) "\1c") - (data (i32.const 16568) "\01\00\00\00\06\00\00\00\01\03\a3\03 ") - (data (i32.const 16588) "\1c") - (data (i32.const 16600) "\01\00\00\00\06\00\00\00\01\03\c3\03 ") - (data (i32.const 16620) "\1c") - (data (i32.const 16632) "\01\00\00\00\n\00\00\00\a3\03\01\03\a3\03\01\03 ") - (data (i32.const 16652) "\1c") - (data (i32.const 16664) "\01\00\00\00\n\00\00\00\c3\03\01\03\c2\03\01\03 ") - (data (i32.const 16684) "\1c") - (data (i32.const 16696) "\01\00\00\00\06\00\00\00\a3\03\a3\03-") - (data (i32.const 16716) "\1c") - (data (i32.const 16728) "\01\00\00\00\06\00\00\00\c3\03\c2\03-") - (data (i32.const 16748) "\1c") - (data (i32.const 16760) "\01\00\00\00\n\00\00\00\a3\03\01\03\a3\03\01\03-") - (data (i32.const 16780) "\1c") - (data (i32.const 16792) "\01\00\00\00\n\00\00\00\c3\03\01\03\c2\03\01\03-") - (data (i32.const 16812) "\1c") - (data (i32.const 16824) "\01\00\00\00\n\00\00\00\a3\03\01\03\a3\03\01\03*s") - (data (i32.const 16844) "\1c") - (data (i32.const 16856) "\01\00\00\00\n\00\00\00\c3\03\01\03\c2\03\01\03*s") - (data (i32.const 16876) "\1c") - (data (i32.const 16888) "\01\00\00\00\06\00\00\005\d8\a2\dc\a3\03") - (data (i32.const 16908) "\1c") - (data (i32.const 16920) "\01\00\00\00\06\00\00\005\d8\a2\dc\c2\03") - (data (i32.const 16940) "\1c") - (data (i32.const 16952) "\01\00\00\00\06\00\00\00A\00.\00\a3\03") - (data (i32.const 16972) "\1c") - (data (i32.const 16984) "\01\00\00\00\06\00\00\00a\00.\00\c2\03") - (data (i32.const 17004) "\1c") - (data (i32.const 17016) "\01\00\00\00\06\00\00\00A\00\ad\00\a3\03") - (data (i32.const 17036) "\1c") - (data (i32.const 17048) "\01\00\00\00\06\00\00\00a\00\ad\00\c2\03") - (data (i32.const 17068) "\1c") - (data (i32.const 17080) "\01\00\00\00\08\00\00\00A\004\d8B\de\a3\03") - (data (i32.const 17100) "\1c") - (data (i32.const 17112) "\01\00\00\00\08\00\00\00a\004\d8B\de\c2\03") - (data (i32.const 17132) "\1c") - (data (i32.const 17144) "\01\00\00\00\04\00\00\00E\03\a3\03") - (data (i32.const 17164) "\1c") - (data (i32.const 17176) "\01\00\00\00\04\00\00\00E\03\c3\03") - (data (i32.const 17196) "\1c") - (data (i32.const 17208) "\01\00\00\00\06\00\00\00\91\03E\03\a3\03") - (data (i32.const 17228) "\1c") - (data (i32.const 17240) "\01\00\00\00\06\00\00\00\b1\03E\03\c2\03") - (data (i32.const 17260) "\1c") - (data (i32.const 17272) "\01\00\00\00\06\00\00\00A\00\a3\03B") - (data (i32.const 17292) "\1c") - (data (i32.const 17304) "\01\00\00\00\08\00\00\00A\00\a3\035\d8\a2\dc") - (data (i32.const 17324) "\1c") - (data (i32.const 17336) "\01\00\00\00\08\00\00\00a\00\c3\035\d8\a2\dc") - (data (i32.const 17356) "\1c") - (data (i32.const 17368) "\01\00\00\00\08\00\00\00A\00\a3\03.\00b") - (data (i32.const 17388) "\1c") - (data (i32.const 17400) "\01\00\00\00\08\00\00\00a\00\c3\03.\00b") - (data (i32.const 17420) "\1c") - (data (i32.const 17432) "\01\00\00\00\08\00\00\00A\00\a3\03\ad\00B") - (data (i32.const 17452) "\1c") - (data (i32.const 17464) "\01\00\00\00\08\00\00\00a\00\c3\03\ad\00b") - (data (i32.const 17484) "\1c") - (data (i32.const 17496) "\01\00\00\00\n\00\00\00A\00\a3\034\d8B\deB") - (data (i32.const 17516) "\1c") - (data (i32.const 17528) "\01\00\00\00\n\00\00\00a\00\c3\034\d8B\deb") - (data (i32.const 17548) "\1c") - (data (i32.const 17560) "\01\00\00\00\06\00\00\00A\00\a3\03E\03") - (data (i32.const 17580) "\1c") - (data (i32.const 17592) "\01\00\00\00\06\00\00\00a\00\c2\03E\03") - (data (i32.const 17612) "\1c") - (data (i32.const 17624) "\01\00\00\00\08\00\00\00A\00\a3\03E\03\91\03") - (data (i32.const 17644) "\1c") - (data (i32.const 17656) "\01\00\00\00\08\00\00\00a\00\c3\03E\03\b1\03") - (data (i32.const 17676) "\1c") - (data (i32.const 17688) "\01\00\00\00\06\00\00\00A\00\0e\18\a3\03") - (data (i32.const 17708) "\1c") - (data (i32.const 17720) "\01\00\00\00\06\00\00\00a\00\0e\18\c2\03") - (data (i32.const 17740) "\1c") - (data (i32.const 17752) "\01\00\00\00\08\00\00\00A\00\0e\18\a3\03B") - (data (i32.const 17772) "\1c") - (data (i32.const 17784) "\01\00\00\00\08\00\00\00a\00\0e\18\c3\03b") - (data (i32.const 17804) "\1c") - (data (i32.const 17816) "\01\00\00\00\06\00\00\00A\00\a3\03\0e\18") - (data (i32.const 17836) "\1c") - (data (i32.const 17848) "\01\00\00\00\06\00\00\00a\00\c2\03\0e\18") - (data (i32.const 17868) "\1c") - (data (i32.const 17880) "\01\00\00\00\08\00\00\00A\00\a3\03\0e\18B") - (data (i32.const 17900) "\1c") - (data (i32.const 17912) "\01\00\00\00\08\00\00\00a\00\c3\03\0e\18b") - (data (i32.const 17932) "\1c") - (data (i32.const 17944) "\01\00\00\00\08\00\00\00A\00\0e\18\a3\03\0e\18") - (data (i32.const 17964) "\1c") - (data (i32.const 17976) "\01\00\00\00\08\00\00\00a\00\0e\18\c2\03\0e\18") - (data (i32.const 17996) "\1c") - (data (i32.const 18008) "\01\00\00\00\n\00\00\00A\00\0e\18\a3\03\0e\18B") - (data (i32.const 18028) "\1c") - (data (i32.const 18040) "\01\00\00\00\n\00\00\00a\00\0e\18\c3\03\0e\18b") - (data (i32.const 18060) "\1c") - (data (i32.const 18072) "\01\00\00\00\02\00\00\00\00\fb") - (data (i32.const 18092) "\1c") - (data (i32.const 18104) "\01\00\00\00\04\00\00\00F\00F") - (data (i32.const 18124) "\1c") - (data (i32.const 18136) "\01\00\00\00\04\00\00\00F\00I") - (data (i32.const 18156) "\1c") - (data (i32.const 18168) "\01\00\00\00\02\00\00\00\02\fb") - (data (i32.const 18188) "\1c") - (data (i32.const 18200) "\01\00\00\00\04\00\00\00F\00L") - (data (i32.const 18220) "\1c") - (data (i32.const 18232) "\01\00\00\00\02\00\00\00\03\fb") - (data (i32.const 18252) "\1c") - (data (i32.const 18264) "\01\00\00\00\06\00\00\00F\00F\00I") - (data (i32.const 18284) "\1c") - (data (i32.const 18296) "\01\00\00\00\02\00\00\00\04\fb") - (data (i32.const 18316) "\1c") - (data (i32.const 18328) "\01\00\00\00\06\00\00\00F\00F\00L") - (data (i32.const 18348) "\1c") - (data (i32.const 18360) "\01\00\00\00\02\00\00\00\05\fb") - (data (i32.const 18380) "\1c") - (data (i32.const 18392) "\01\00\00\00\04\00\00\00S\00T") - (data (i32.const 18412) "\1c") - (data (i32.const 18424) "\01\00\00\00\02\00\00\00\06\fb") - (data (i32.const 18444) "\1c") - (data (i32.const 18456) "\01\00\00\00\02\00\00\00\f0\01") - (data (i32.const 18476) "\1c") - (data (i32.const 18488) "\01\00\00\00\04\00\00\00J\00\0c\03") - (data (i32.const 18508) "\1c") - (data (i32.const 18520) "\01\00\00\00\02\00\00\00\96\1e") - (data (i32.const 18540) "\1c") - (data (i32.const 18552) "\01\00\00\00\04\00\00\00H\001\03") - (data (i32.const 18572) "\1c") - (data (i32.const 18584) "\01\00\00\00\02\00\00\00\97\1e") - (data (i32.const 18604) "\1c") - (data (i32.const 18616) "\01\00\00\00\04\00\00\00T\00\08\03") - (data (i32.const 18636) "\1c") - (data (i32.const 18648) "\01\00\00\00\02\00\00\00\98\1e") - (data (i32.const 18668) "\1c") - (data (i32.const 18680) "\01\00\00\00\04\00\00\00W\00\n\03") - (data (i32.const 18700) "\1c") - (data (i32.const 18712) "\01\00\00\00\02\00\00\00\99\1e") - (data (i32.const 18732) "\1c") - (data (i32.const 18744) "\01\00\00\00\04\00\00\00Y\00\n\03") - (data (i32.const 18764) "\1c") - (data (i32.const 18776) "\01\00\00\00\02\00\00\00\9a\1e") - (data (i32.const 18796) "\1c") - (data (i32.const 18808) "\01\00\00\00\04\00\00\00A\00\be\02") - (data (i32.const 18828) "\\") - (data (i32.const 18840) "\01\00\00\00@\00\00\00o\00r\00i\00g\00L\00o\00w\00e\00r\00C\00o\00d\00e\00 \00!\00=\00 \00e\00x\00p\00e\00c\00t\00L\00o\00w\00e\00r\00C\00o\00d\00e") - (data (i32.const 18924) "<") - (data (i32.const 18936) "\01\00\00\00\"\00\00\00 \00o\00r\00i\00g\00L\00o\00w\00e\00r\00C\00o\00d\00e\00 \00=\00 ") - (data (i32.const 18988) "|") - (data (i32.const 19000) "\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") - (data (i32.const 19116) "<") - (data (i32.const 19128) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") - (data (i32.const 19180) "\1c") - (data (i32.const 19192) "\01\00\00\00\02\00\00\000") + (data (i32.const 7212) "\12\10\13\14\15\16\17\18\19\1a\1b\1c\1d\1e\1f !\10\10\"\10\10\10#$%&\'()\10*+\10\10\10\10\10\10\10\10\10\10\10,-.\10/\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\100\10\10\101\10234567\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\108\10\109:\10;<=\10\10\10\10\10\10>\10\10?@ABCDEFGHIJKL\10MNO\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10P\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10QR\10\10\10S\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10T\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10UV\10\10\10\10\10\10\10W\10\10\10\10\10XYZ\10\10\10\10\10[\\\10\10\10\10\10\10\10\10\10]\10\10\10\10\10\10\10\10\10\10\10\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\80@\00\04\00\00\00@\01\00\00\00\00\00\00\00\00\a1\90\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff0\04\b0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f8\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\82\00\00\00\00\00\00\fe\ff\ff\ff\ff\bf\b6\00\00\00\00\00\10\00?\00\ff\17\00\00\00\00\01\f8\ff\ff\00\00\01\00\00\00\00\00\00\00\00\00\00\00\c0\bf\ff=\00\00\00\80\02\00\00\00\ff\ff\ff\07\00\00\00\00\00\00\00\00\00\00\c0\ff\01\00\00\00\00\00\00\f8?$\00\00\c0\ff\ff?\00\00\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f8\ff\ff\ff\ff\ff\07\00\00\00\00\00\00\14\fe!\fe\00\0c\00\02\00\02\00\00\00\00\00\00\10\1e \00\00\0c\00\00@\06\00\00\00\00\00\00\10\869\02\00\00\00#\00\06\00\00\00\00\00\00\10\be!\00\00\0c\00\00\fc\02\00\00\00\00\00\00\90\1e `\00\0c\00\00\00\04\00\00\00\00\00\00\00\01 \00\00\00\00\00\00\11\00\00\00\00\00\00\c0\c1=`\00\0c\00\00\00\02\00\00\00\00\00\00\90@0\00\00\0c\00\00\00\03\00\00\00\00\00\00\18\1e \00\00\0c\00\00\00\02\00\00\00\00\00\00\00\00\04\\\00\00\00\00\00\00\00\00\00\00\00\f2\07\c0\7f\00\00\00\00\00\00\00\00\00\00\00\00\f2\1f@?\00\00\00\00\00\00\00\00\00\03\00\00\a0\02\00\00\00\00\00\00\fe\7f\df\e0\ff\fe\ff\ff\ff\1f@\00\00\00\00\00\00\00\00\00\00\00\00\e0\fdf\00\00\00\c3\01\00\1e\00d \00 \00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\e0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\1c\00\00\00\1c\00\00\00\0c\00\00\00\0c\00\00\00\00\00\00\00\b0?@\fe\8f \00\00\00\00\00x\00\00\00\00\00\00\08\00\00\00\00\00\00\00`\00\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\87\01\04\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\t\00\00\00\00\00\00@\7f\e5\1f\f8\9f\00\00\00\00\80\00\ff\ff\01\00\00\00\00\00\00\00\0f\00\00\00\00\00\d0\17\04\00\00\00\00\f8\0f\00\03\00\00\00<;\00\00\00\00\00\00@\a3\03\00\00\00\00\00\00\f0\cf\00\00\00\00\00\00\00\00?\00\00\00\00\00\00\00\00\00\00\f7\ff\fd!\10\03\00\00\00\00\00\f0\ff\ff\ff\ff\ff\ff\ff\07\00\01\00\00\00\f8\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\fb\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\a0\03\e0\00\e0\00\e0\00`\00\f8\00\03\90|\00\00\00\00\00\00\df\ff\02\80\00\00\ff\1f\00\00\00\00\00\00\ff\ff\ff\ff\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\000\00\00\00\00\00\00\00\00\00\00\00\00\00\80\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\80\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\00\00\00\00\00\80\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00<>\08\00\00\00\00\00\00\00\00\00\00\00~\00\00\00\00\00\00\00\00\00\00\00p\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00?\00\10\00\00\00\00\00\00\00\00\00\00\00\80\f7\bf\00\00\00\f0\00\00\00\00\00\00\00\00\00\00\03\00\ff\ff\ff\ff\03\00\00\00\00\00\00\00\00\00\01\00\00\07\00\00\00\00\00\00\00\00\00\00\00\00\00\03D\08\00\00`\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\000\00\00\00\ff\ff\03\80\00\00\00\00\c0?\00\00\80\ff\03\00\00\00\00\00\07\00\00\00\00\00\c83\00\80\00\00`\00\00\00\00\00\00\00\00~f\00\08\10\00\00\00\00\01\10\00\00\00\00\00\00\9d\c1\02\00\00 \000X\00\00\00\00\00\00\00\00\00\00\00\00\f8\00\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00 !\00\00\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\fc\ff\03\00\00\00\00\00\00\00\ff\ff\08\00\ff\ff\00\00\00\00$\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\80@\00\04\00\00\00@\01\00\00\00\00\00\01\00\00\00\00\c0\00\00\00\00\00\00\00\00\08\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\c0\07\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00n\f0\00\00\00\00\00\87\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00`\00\00\00\00\00\00\00\f0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\c0\ff\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\00\00\00\ff\7f\00\00\00\00\00\00\80\03\00\00\00\00\00x&\00 \00\00\00\00\00\00\07\00\00\00\80\ef\1f\00\00\00\00\00\00\00\08\00\03\00\00\00\00\00\c0\7f\00\9e\00\00\00\00\00\00\00\00\00\00\00\80\d3@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\f8\07\00\00\03\00\00\00\00\00\00\18\01\00\00\00\c0\1f\1f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\\\00\00@\00\00\00\00\00\00\00\00\00\00\f8\85\0d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00<\b0\01\00\000\00\00\00\00\00\00\00\00\00\00\f8\a7\01\00\00\00\00\00\00\00\00\00\00\00\00(\bf\00\00\00\00\00\00\00\00\00\00\00\00\e0\bc\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\ff\06\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00X\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\0c\01\00\00\00\fe\07\00\00\00\00\f8y\80\00~\0e\00\00\00\00\00\fc\7f\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\7f\bf\00\00\00\00\00\00\00\00\00\00\fc\ff\ff\fcm\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00~\b4\bf\00\00\00\00\00\00\00\00\00\a3\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\00\00\00\00\ff\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\1f\00\00\00\00\00\00\00\7f\00\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\00\00\00\00\00\00\80\ff\ff\00\00\00\00\00\00\00\00\1b\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00`\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\03\f8\ff\e7\0f\00\00\00<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\7f\f8\ff\ff\ff\ff\ff\1f \00\10\00\00\f8\fe\ff\00\00\00\00\00\00\00\00\00\00\7f\ff\ff\f9\db\07\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f8") + (data (i32.const 10220) "\12\13\14\15\16\17\10\10\10\10\10\10\10\10\10\10\18\10\10\19\10\10\10\10\10\10\10\10\1a\1b\11\1c\1d\1e\10\10\1f\10\10\10\10\10\10\10 !\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\"#\10\10\10$\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10%\10\10\10&\10\10\10\10\'\10\10\10\10\10\10\10(\10\10\10\10\10\10\10\10\10\10\10)\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10*\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10+,-.\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10/\10\10\10\10\10\10\100\10\10\10\10\10\10\10\10\10\10\10\10\10\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\00\00\00\00\fe\ff\ff\07\fe\ff\ff\07\00\00\00\00\00\04 \04\ff\ff\7f\ff\ff\ff\7f\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\f7\f0\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ef\ff\ff\ff\ff\01\03\00\00\00\1f\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\cf\bc@\d7\ff\ff\fb\ff\ff\ff\ff\ff\ff\ff\ff\ff\bf\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\03\fc\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\fe\ff\ff\ff\7f\00\ff\ff\ff\ff\ff\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\bf \ff\ff\ff\ff\ff\e7\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff??\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\01\ff\ff\ff\ff\ff\e7\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\00\00\00\00\ff\ff??\ff\ff\ff\ff??\ff\aa\ff\ff\ff?\ff\ff\ff\ff\ff\ff\df_\dc\1f\cf\0f\ff\1f\dc\1f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\80\00\00\ff\1f\00\00\00\00\00\00\00\00\00\00\00\00\84\fc/>P\bd\1f\f2\e0C\00\00\ff\ff\ff\ff\18\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\c0\ff\ff\ff\ff\ff\ff\03\00\00\ff\ff\ff\ff\ff\7f\ff\ff\ff\ff\ff\7f\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\1fx\0c\00\ff\ff\ff\ff\bf \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff?\00\00\ff\ff\ff?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\fc\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ffx\ff\ff\ff\ff\ff\ff\fc\07\00\00\00\00`\07\00\00\00\00\00\00\ff\ff\ff\ff\ff\f7\ff\01\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\00\00\00\00\7f\00\f8\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\fe\ff\ff\07\fe\ff\ff\07\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\0f\ff\ff\ff\ff\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\07\00\ff\ff\ff\ff\ff\ff\07\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\df\ff\ff\ff\ff\ff\ff\ff\ff\dfd\de\ff\eb\ef\ff\ff\ff\ff\ff\ff\ff\bf\e7\df\df\ff\ff\ff{_\fc\fd\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff?\ff\ff\ff\fd\ff\ff\f7\ff\ff\ff\f7\ff\ff\df\ff\ff\ff\df\ff\ff\7f\ff\ff\ff\7f\ff\ff\ff\fd\ff\ff\ff\fd\ff\ff\f7\0f\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\03\ff\ff\ff\03\ff\ff\ff\03") + (data (i32.const 11788) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\000\009\00_\00A\00Z\00 \00a\00z\00.\00!\00\n") + (data (i32.const 11836) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\000\009\00_\00A\00Z\00 \00A\00Z\00.\00!\00\n") + (data (i32.const 11884) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\000\009\00_\00A\00Z\00 \00a\00z\00.\00!\00\t") + (data (i32.const 11932) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\000\009\00_\00a\00z\00 \00a\00z\00.\00!\00\t") + (data (i32.const 11980) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00J\00\00\00D\00e\00r\00 \00W\00e\00c\00h\00s\00e\00l\00 \00a\00l\00l\00e\00i\00n\00 \00i\00s\00t\00 \00d\00a\00s\00 \00B\00e\00s\00t\00\e4\00n\00d\00i\00g\00e") + (data (i32.const 12076) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00J\00\00\00D\00E\00R\00 \00W\00E\00C\00H\00S\00E\00L\00 \00A\00L\00L\00E\00I\00N\00 \00I\00S\00T\00 \00D\00A\00S\00 \00B\00E\00S\00T\00\c4\00N\00D\00I\00G\00E") + (data (i32.const 12172) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00J\00\00\00d\00e\00r\00 \00w\00e\00c\00h\00s\00e\00l\00 \00a\00l\00l\00e\00i\00n\00 \00i\00s\00t\00 \00d\00a\00s\00 \00b\00e\00s\00t\00\e4\00n\00d\00i\00g\00e") + (data (i32.const 12268) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00@\00 \00\14 \00\14\04@\04C\043\04 \00G\045\04;\04>\042\045\04:\040\04!") + (data (i32.const 12332) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00@\00 \00\14 \00\14\04 \04#\04\13\04 \00\'\04\15\04\1b\04\1e\04\12\04\15\04\1a\04\10\04!") + (data (i32.const 12396) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00@\00 \00\14 \004\04@\04C\043\04 \00G\045\04;\04>\042\045\04:\040\04!") + (data (i32.const 12460) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00D\00\00\00.\" \00E\00\c5\"d\00a\00 \00=\00 \00Q\00,\00 \00n\00 \00\92! \00\1e\",\00 \00\11\" \00f\00(\00i\00)\00 \00=\00 \00\0f\" \00g\00(\00i\00)") + (data (i32.const 12556) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00D\00\00\00.\" \00E\00\c5\"D\00A\00 \00=\00 \00Q\00,\00 \00N\00 \00\92! \00\1e\",\00 \00\11\" \00F\00(\00I\00)\00 \00=\00 \00\0f\" \00G\00(\00I\00)") + (data (i32.const 12652) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00D\00\00\00.\" \00e\00\c5\"d\00a\00 \00=\00 \00q\00,\00 \00n\00 \00\92! \00\1e\",\00 \00\11\" \00f\00(\00i\00)\00 \00=\00 \00\0f\" \00g\00(\00i\00)") + (data (i32.const 12748) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\00\f0\00i\00 \001\01n\00t\00Y\02\c8\02n\00\e6\00\83\02Y\02n\00Y\02l\00 \00f\00Y\02\c8\02n\00[\02t\001\01k\00 \00Y\02s\00o\00\8a\02s\00i\00\c8\02e\001\01\83\02n") + (data (i32.const 12844) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\00\d0\00I\00 \00I\00N\00T\00\8f\01\c8\02N\00\c6\00\a9\01\8f\01N\00\8f\01L\00 \00F\00\8f\01\c8\02N\00\90\01T\00I\00K\00 \00\8f\01S\00O\00\b1\01S\00I\00\c8\02E\00I\00\a9\01N") + (data (i32.const 12940) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\00\f0\00i\00 \00i\00n\00t\00Y\02\c8\02n\00\e6\00\83\02Y\02n\00Y\02l\00 \00f\00Y\02\c8\02n\00[\02t\00i\00k\00 \00Y\02s\00o\00\8a\02s\00i\00\c8\02e\00i\00\83\02n") + (data (i32.const 13036) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00.\00\00\00\a3\03r\1f \00\b3\03\bd\03\c9\03\c1\03\af\03\b6\03\c9\03 \00\00\1f\c0\03x\1f \00\c4\03t\1f\bd\03 \00\ba\03\cc\03\c8\03\b7\03") + (data (i32.const 13116) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00.\00\00\00\a3\03\c8\1f \00\93\03\9d\03\a9\03\a1\03\8a\03\96\03\a9\03 \00\08\1f\a0\03\f8\1f \00\a4\03\ca\1f\9d\03 \00\9a\03\8c\03\a8\03\97\03") + (data (i32.const 13196) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\000\00\00\00\c4\03\bf\03\e6\1f \00\c3\03\c0\03\b1\03\b8\03\b9\03\bf\03\e6\1f \00\c4\03t\1f\bd\03 \00\c4\03\c1\03\bf\03\bc\03\b5\03\c1\03\ae\03,") + (data (i32.const 13276) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\004\00\00\00\a4\03\9f\03\a5\03B\03 \00\a3\03\a0\03\91\03\98\03\99\03\9f\03\a5\03B\03 \00\a4\03\ca\1f\9d\03 \00\a4\03\a1\03\9f\03\9c\03\95\03\a1\03\89\03,") + (data (i32.const 13356) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00,\00\00\00\c3\03r\1f \00\b3\03\bd\03\c9\03\c1\03\af\03\b6\03\c9\03 \00\00\1f\c0\03x\1f \00\c4\03t\1f\bd\03 \00D\1f\c8\03\b7\03") + (data (i32.const 13420) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00,\00\00\00\a3\03\c8\1f \00\93\03\9d\03\a9\03\a1\03\8a\03\96\03\a9\03 \00\08\1f\a0\03\f8\1f \00\a4\03\ca\1f\9d\03 \00L\1f\a8\03\97\03") + (data (i32.const 13484) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\002\00\00\00\c0\03\bf\03z\1f \00\bc\03r\1f \00\b2\03\af\03\b1\03 \00\bc\03\b5\03\c4\03\c1\03\ac\03\b5\03\b9\03 \00\c4\03t\1f \00\b3\03\c6\1f.") + (data (i32.const 13564) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\004\00\00\00\a0\03\9f\03\ea\1f \00\9c\03\c8\1f \00\92\03\8a\03\91\03 \00\9c\03\95\03\a4\03\a1\03\86\03\95\03\99\03 \00\a4\03\ca\1f \00\93\03\97\03B\03.") + (data (i32.const 13644) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00.\00\00\00\91\03\c0\03\bf\1f \00\c4\03p\1f \00\ba\03\cc\03\ba\03\ba\03\b1\03\bb\03\b1\03 \00\b2\03\b3\03\b1\03\bb\03\bc\03\ad\03\bd\03\b7\03") + (data (i32.const 13724) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00.\00\00\00\91\03\a0\03\bf\1f \00\a4\03\ba\1f \00\9a\03\8c\03\9a\03\9a\03\91\03\9b\03\91\03 \00\92\03\93\03\91\03\9b\03\9c\03\88\03\9d\03\97\03") + (data (i32.const 13804) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00\c4\03\f6\1f\bd\03 \00\fe\1f\95\03\bb\03\bb\03\ae\03\bd\03\c9\03\bd\03 \00\c4\03p\1f \001\1f\b5\03\c1\03\ac\03") + (data (i32.const 13868) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00*\00\00\00\a4\03\a9\03B\03\9d\03 \00\fe\1f\95\03\9b\03\9b\03\89\03\9d\03\a9\03\9d\03 \00\a4\03\ba\1f \009\1f\95\03\a1\03\86\03") + (data (i32.const 13932) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\002\00\00\00\ba\03\b1\03v\1f \00\c3\03p\1f\bd\03 \00\c0\03\c1\03\f6\1f\c4\03\b1\03 \00\00\1f\bd\03\b4\03\c1\03\b5\03\b9\03\c9\03\bc\03\ad\03\bd\03\b7\03") + (data (i32.const 14012) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\004\00\00\00\9a\03\91\03\da\1f \00\a3\03\ba\1f\9d\03 \00\a0\03\a1\03\a9\03B\03\a4\03\91\03 \00\08\1f\9d\03\94\03\a1\03\95\03\99\03\a9\03\9c\03\88\03\9d\03\97\03") + (data (i32.const 14092) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\006\00\00\00\c7\03\b1\03\d6\1f\c1\03\b5\03,\00 \00f\1f \00\c7\03\b1\03\d6\1f\c1\03\b5\03,\00 \00\bf\1f\95\03\bb\03\b5\03\c5\03\b8\03\b5\03\c1\03\b9\03\ac\03!") + (data (i32.const 14172) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00:\00\00\00\a7\03\91\03\99\03B\03\a1\03\95\03,\00 \00n\1f \00\a7\03\91\03\99\03B\03\a1\03\95\03,\00 \00\bf\1f\95\03\9b\03\95\03\a5\03\98\03\95\03\a1\03\99\03\86\03!") + (data (i32.const 14252) "\9c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\80\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00 \00/\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") + (data (i32.const 14412) "\9c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\80\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00 \00/\000\001\002\003\004\005\006\007\008\009\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z") + (data (i32.const 14572) "\9c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\80\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\00 \00/\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") + (data (i32.const 14732) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\df") + (data (i32.const 14764) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00S\00S") + (data (i32.const 14796) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\000\01") + (data (i32.const 14828) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00i\00\07\03") + (data (i32.const 14860) "\cc\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\ae\00\00\00\a3\00\a9\00\b5\00\c0\00\c6\00\d6\00\de\00\df\00\e9\00\f6\00\ff\00\13 \14 \18 \1c \1d \1e \" & 0 \"!S\01`\01x\01~\01\ac \00\91\03\92\03\93\03\94\03\a9\03\b1\03\b2\03\b3\03\b4\03\c9\03 \00\10\04\11\04\12\04\13\04\14\040\041\042\043\044\04\00\"\02\"\08\"\1d!\'\"*\"a\"\1e\" \00\91!\97!\a8!\bb!\e3! \00\10%<%T%X%\91%\ba%:&@& \00\01\fb\fd\ff@$\82 \1f\02\1e\e5\04\84\1eP\02\d0\02N#\d0\051\05\d0\10") + (data (i32.const 15068) "\cc\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\b2\00\00\00\a3\00\a9\00\9c\03\c0\00\c6\00\d6\00\de\00S\00S\00\c9\00\d6\00x\01\13 \14 \18 \1c \1d \1e \" & 0 \"!R\01`\01x\01}\01\ac \00\91\03\92\03\93\03\94\03\a9\03\91\03\92\03\93\03\94\03\a9\03 \00\10\04\11\04\12\04\13\04\14\04\10\04\11\04\12\04\13\04\14\04\00\"\02\"\08\"\1d!\'\"*\"a\"\1e\" \00\91!\97!\a8!\bb!\e3! \00\10%<%T%X%\91%\ba%:&@& \00F\00I\00\fd\ff@$\82 (\1f\02\1e\e4\04\84\1eo,\d0\02N#\d0\051\05\90\1c") + (data (i32.const 15276) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00s\00s") + (data (i32.const 15308) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\01\fb") + (data (i32.const 15340) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00f\00i") + (data (i32.const 15372) "\cc\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\b8\00\00\00A\d8\0e\df \00A\d81\df \00A\d8y\df \00C\d8S\dc \00C\d8x\dc \00C\d8\96\dc \00C\d8\cf\dc \00C\d8\d5\dc \00C\d8\15\dd \00C\d8|\dd \00C\d8\7f\dd \00C\d8\0e\de \00C\d8\0f\de \00C\d8w\de \00C\d8\9d\de \00C\d8\a2\de \00C\d8\d7\de \00C\d8\f9\de \00C\d8\fa\de \00C\d8-\df \00C\d8.\df \00C\d8L\df \00C\d8\b4\df \00C\d8\bc\df \00C\d8\ea\df \00D\d8\\\dc \00D\d8o\dc \00D\d8u\dc \00D\d8v\dc \00D\d8{\dc \00D\d8\c1\dc") + (data (i32.const 15580) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 15628) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\00\d8\00\dc") + (data (i32.const 15660) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\88\1f") + (data (i32.const 15692) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\80\1f") + (data (i32.const 15724) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\8f\1f") + (data (i32.const 15756) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\87\1f") + (data (i32.const 15788) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fc\1f") + (data (i32.const 15820) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\f3\1f") + (data (i32.const 15852) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\a3\03") + (data (i32.const 15884) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\c3\03") + (data (i32.const 15916) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00 \00\a3\03") + (data (i32.const 15948) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00 \00\c3\03") + (data (i32.const 15980) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\a3\03 ") + (data (i32.const 16012) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\c3\03 ") + (data (i32.const 16044) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00 \00\a3\03 ") + (data (i32.const 16076) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00 \00\c3\03 ") + (data (i32.const 16108) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00\a3\03 ") + (data (i32.const 16140) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00\c2\03 ") + (data (i32.const 16172) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00\a3\03\n") + (data (i32.const 16204) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00\c2\03\n") + (data (i32.const 16236) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00a\00\a3\03") + (data (i32.const 16268) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00a\00\c2\03") + (data (i32.const 16300) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00\a3\03b") + (data (i32.const 16332) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00\c3\03b") + (data (i32.const 16364) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00\a3\03\a3\03 ") + (data (i32.const 16396) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00\c3\03\c2\03 ") + (data (i32.const 16428) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\00\a3\03 ") + (data (i32.const 16460) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\00\c3\03 ") + (data (i32.const 16492) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00;\00\a3\03 ") + (data (i32.const 16524) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00;\00\c3\03 ") + (data (i32.const 16556) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00\01\03\a3\03 ") + (data (i32.const 16588) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00\01\03\c3\03 ") + (data (i32.const 16620) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00\a3\03\01\03\a3\03\01\03 ") + (data (i32.const 16652) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00\c3\03\01\03\c2\03\01\03 ") + (data (i32.const 16684) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00\a3\03\a3\03-") + (data (i32.const 16716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00\c3\03\c2\03-") + (data (i32.const 16748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00\a3\03\01\03\a3\03\01\03-") + (data (i32.const 16780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00\c3\03\01\03\c2\03\01\03-") + (data (i32.const 16812) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00\a3\03\01\03\a3\03\01\03*s") + (data (i32.const 16844) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00\c3\03\01\03\c2\03\01\03*s") + (data (i32.const 16876) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\005\d8\a2\dc\a3\03") + (data (i32.const 16908) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\005\d8\a2\dc\c2\03") + (data (i32.const 16940) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00A\00.\00\a3\03") + (data (i32.const 16972) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00.\00\c2\03") + (data (i32.const 17004) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00A\00\ad\00\a3\03") + (data (i32.const 17036) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00\ad\00\c2\03") + (data (i32.const 17068) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00A\004\d8B\de\a3\03") + (data (i32.const 17100) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\004\d8B\de\c2\03") + (data (i32.const 17132) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00E\03\a3\03") + (data (i32.const 17164) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00E\03\c3\03") + (data (i32.const 17196) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00\91\03E\03\a3\03") + (data (i32.const 17228) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00\b1\03E\03\c2\03") + (data (i32.const 17260) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00A\00\a3\03B") + (data (i32.const 17292) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00A\00\a3\035\d8\a2\dc") + (data (i32.const 17324) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00\c3\035\d8\a2\dc") + (data (i32.const 17356) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00A\00\a3\03.\00b") + (data (i32.const 17388) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00\c3\03.\00b") + (data (i32.const 17420) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00A\00\a3\03\ad\00B") + (data (i32.const 17452) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00\c3\03\ad\00b") + (data (i32.const 17484) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00A\00\a3\034\d8B\deB") + (data (i32.const 17516) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00\c3\034\d8B\deb") + (data (i32.const 17548) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00A\00\a3\03E\03") + (data (i32.const 17580) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00\c2\03E\03") + (data (i32.const 17612) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00A\00\a3\03E\03\91\03") + (data (i32.const 17644) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00\c3\03E\03\b1\03") + (data (i32.const 17676) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00A\00\0e\18\a3\03") + (data (i32.const 17708) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00\0e\18\c2\03") + (data (i32.const 17740) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00A\00\0e\18\a3\03B") + (data (i32.const 17772) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00\0e\18\c3\03b") + (data (i32.const 17804) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00A\00\a3\03\0e\18") + (data (i32.const 17836) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00\c2\03\0e\18") + (data (i32.const 17868) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00A\00\a3\03\0e\18B") + (data (i32.const 17900) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00\c3\03\0e\18b") + (data (i32.const 17932) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00A\00\0e\18\a3\03\0e\18") + (data (i32.const 17964) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00\0e\18\c2\03\0e\18") + (data (i32.const 17996) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00A\00\0e\18\a3\03\0e\18B") + (data (i32.const 18028) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00\0e\18\c3\03\0e\18b") + (data (i32.const 18060) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\00\fb") + (data (i32.const 18092) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00F\00F") + (data (i32.const 18124) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00F\00I") + (data (i32.const 18156) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\02\fb") + (data (i32.const 18188) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00F\00L") + (data (i32.const 18220) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\fb") + (data (i32.const 18252) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00F\00F\00I") + (data (i32.const 18284) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\04\fb") + (data (i32.const 18316) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00F\00F\00L") + (data (i32.const 18348) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\05\fb") + (data (i32.const 18380) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00S\00T") + (data (i32.const 18412) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\06\fb") + (data (i32.const 18444) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\f0\01") + (data (i32.const 18476) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00J\00\0c\03") + (data (i32.const 18508) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\96\1e") + (data (i32.const 18540) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00H\001\03") + (data (i32.const 18572) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\97\1e") + (data (i32.const 18604) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00T\00\08\03") + (data (i32.const 18636) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\98\1e") + (data (i32.const 18668) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00W\00\n\03") + (data (i32.const 18700) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\99\1e") + (data (i32.const 18732) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00Y\00\n\03") + (data (i32.const 18764) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\9a\1e") + (data (i32.const 18796) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00A\00\be\02") + (data (i32.const 18828) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00@\00\00\00o\00r\00i\00g\00L\00o\00w\00e\00r\00C\00o\00d\00e\00 \00!\00=\00 \00e\00x\00p\00e\00c\00t\00L\00o\00w\00e\00r\00C\00o\00d\00e") + (data (i32.const 18924) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\"\00\00\00 \00o\00r\00i\00g\00L\00o\00w\00e\00r\00C\00o\00d\00e\00 \00=\00 ") + (data (i32.const 18988) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") + (data (i32.const 19116) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") + (data (i32.const 19180) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\000") (data (i32.const 19212) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 19612) "\1c\04") - (data (i32.const 19624) "\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") - (data (i32.const 20668) "\\") - (data (i32.const 20680) "\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") - (data (i32.const 20764) "<") - (data (i32.const 20776) "\01\00\00\00&\00\00\00 \00e\00x\00p\00e\00c\00t\00L\00o\00w\00e\00r\00C\00o\00d\00e\00 \00=\00 ") - (data (i32.const 20828) "\\") - (data (i32.const 20840) "\01\00\00\00@\00\00\00o\00r\00i\00g\00U\00p\00p\00e\00r\00C\00o\00d\00e\00 \00!\00=\00 \00e\00x\00p\00e\00c\00t\00U\00p\00p\00e\00r\00C\00o\00d\00e") - (data (i32.const 20924) "<") - (data (i32.const 20936) "\01\00\00\00\"\00\00\00 \00o\00r\00i\00g\00U\00p\00p\00e\00r\00C\00o\00d\00e\00 \00=\00 ") - (data (i32.const 20988) "<") - (data (i32.const 21000) "\01\00\00\00&\00\00\00 \00e\00x\00p\00e\00c\00t\00U\00p\00p\00e\00r\00C\00o\00d\00e\00 \00=\00 ") - (data (i32.const 21056) "\04\00\00\00 \00\00\00\00\00\00\00 ") - (data (i32.const 21084) "\a4") + (data (i32.const 19612) "\1c\04\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") + (data (i32.const 20668) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") + (data (i32.const 20764) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00 \00e\00x\00p\00e\00c\00t\00L\00o\00w\00e\00r\00C\00o\00d\00e\00 \00=\00 ") + (data (i32.const 20828) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00@\00\00\00o\00r\00i\00g\00U\00p\00p\00e\00r\00C\00o\00d\00e\00 \00!\00=\00 \00e\00x\00p\00e\00c\00t\00U\00p\00p\00e\00r\00C\00o\00d\00e") + (data (i32.const 20924) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\"\00\00\00 \00o\00r\00i\00g\00U\00p\00p\00e\00r\00C\00o\00d\00e\00 \00=\00 ") + (data (i32.const 20988) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00 \00e\00x\00p\00e\00c\00t\00U\00p\00p\00e\00r\00C\00o\00d\00e\00 \00=\00 ") + (data (i32.const 21056) "\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\a4") (export "memory" (memory $0)) (start $~start) (func $~lib/rt/itcms/visitRoots @@ -1814,182 +1535,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/util/casemap/casemap (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2144,964 +1694,91 @@ local.get $0 i32.add ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 20 + i32.sub + local.tee $3 + i32.load + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.get $1 + i32.ge_u + if + local.get $3 + local.get $1 + i32.store offset=16 + local.get $0 + return + end + local.get $1 + local.get $3 + i32.load offset=12 + call $~lib/rt/itcms/__new + local.tee $2 + local.get $0 + local.get $1 + local.get $3 + i32.load offset=16 + local.tee $0 + local.get $0 + local.get $1 + i32.gt_u + select + memory.copy + local.get $2 + ) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $1 + i32.const 0 + local.get $0 + select + i32.eqz + if i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end + return end local.get $0 - i32.const 3 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + local.tee $3 + local.get $1 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.ne + if + i32.const 0 + return + end + local.get $0 + local.tee $2 + i32.const 7 + i32.and + local.get $1 + i32.const 7 i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 20 - i32.sub - local.tee $3 - i32.load - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.get $1 - i32.ge_u - if - local.get $3 - local.get $1 - i32.store offset=16 - local.get $0 - return - end - local.get $1 - local.get $3 - i32.load offset=12 - call $~lib/rt/itcms/__new - local.tee $2 - local.get $0 - local.get $1 - local.get $3 - i32.load offset=16 - local.tee $0 - local.get $0 - local.get $1 - i32.gt_u - select - call $~lib/memory/memory.copy - local.get $2 - ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - local.get $1 - i32.const 0 - local.get $0 - select - i32.eqz - if - i32.const 0 - return - end - local.get $0 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - local.tee $3 - local.get $1 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.tee $2 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or + i32.or i32.eqz local.get $3 local.tee $0 @@ -3609,13 +2286,13 @@ local.get $2 local.get $0 local.get $3 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.get $3 i32.add local.get $1 local.get $4 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -4011,17 +2688,9 @@ end global.get $~lib/memory/__stack_pointer local.tee $5 - i64.const 0 - i64.store - local.get $5 - i64.const 0 - i64.store offset=8 - local.get $5 - i64.const 0 - i64.store offset=16 - local.get $5 i32.const 0 - i32.store offset=24 + i32.const 28 + memory.fill memory.size i32.const 16 i32.shl diff --git a/tests/compiler/std/string-casemapping.untouched.wat b/tests/compiler/std/string-casemapping.untouched.wat index 8772d5afc4..d6d4617b3d 100644 --- a/tests/compiler/std/string-casemapping.untouched.wat +++ b/tests/compiler/std/string-casemapping.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i64_i32_=>_i32 (func (param i64 i32) (result i32))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -32,8 +32,8 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/util/casemap/SPECIALS_UPPER i32 (i32.const 464)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/rt/__rtti_base i32 (i32.const 20032)) (global $~lib/memory/__data_end i32 (i32.const 20068)) @@ -2251,237 +2251,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2531,7 +2300,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/staticarray/StaticArray#get:length (param $0 i32) (result i32) @@ -2732,1278 +2501,25 @@ end local.get $2 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end local.get $0 + i32.const 20 + i32.sub + local.set $2 + local.get $1 + local.get $2 + i32.load i32.const 3 + i32.const -1 + i32.xor i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.const 20 - i32.sub - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.sub - i32.le_u + i32.const 16 + i32.sub + i32.le_u if local.get $2 local.get $1 @@ -4027,7 +2543,7 @@ local.get $5 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy local.get $3 ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) @@ -5354,17 +3870,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=24 + i32.const 28 + memory.fill memory.size i32.const 16 i32.shl @@ -8901,13 +7409,13 @@ local.get $5 local.get $0 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.get $2 i32.add local.get $1 local.get $3 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.set $6 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 8b868db56c..2960233f9c 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -1,11 +1,11 @@ (module (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -1401,1132 +1401,88 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $1 + i32.const 0 + local.get $0 + select + i32.eqz + if i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end + return end local.get $0 - i32.const 3 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + local.tee $3 + local.get $1 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.ne + if + i32.const 0 + return + end + local.get $0 + local.tee $2 + i32.const 7 + i32.and + local.get $1 + i32.const 7 i32.and + i32.or i32.eqz + local.get $3 + local.tee $0 + i32.const 4 + i32.ge_u + i32.and if - loop $while-continue|1 + loop $do-loop|0 local.get $2 - i32.const 16 - i32.ge_u + i64.load + local.get $1 + i64.load + i64.eq if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 + local.get $2 + i32.const 8 + i32.add + local.set $2 local.get $1 - i32.const 16 + i32.const 8 i32.add local.set $1 local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 + i32.const 4 i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - local.get $1 - i32.const 0 - local.get $0 - select - i32.eqz - if - i32.const 0 - return - end - local.get $0 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - local.tee $3 - local.get $1 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.tee $2 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - local.get $3 - local.tee $0 - i32.const 4 - i32.ge_u - i32.and - if - loop $do-loop|0 - local.get $2 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $2 - i32.const 8 - i32.add - local.set $2 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.sub - local.tee $0 - i32.const 4 - i32.ge_u - br_if $do-loop|0 + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-loop|0 end end end @@ -3456,17 +2412,9 @@ br_if $folding-inner0 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 i32.const 0 - i32.store offset=24 + i32.const 28 + memory.fill local.get $0 i32.const 1056 i32.store @@ -4502,7 +3450,7 @@ i32.shr_u i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -4542,7 +3490,7 @@ local.get $2 local.get $0 local.get $1 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -5035,7 +3983,7 @@ local.get $2 i32.gt_u select - call $~lib/memory/memory.copy + memory.copy local.get $1 local.set $0 end diff --git a/tests/compiler/std/string-encoding.untouched.wat b/tests/compiler/std/string-encoding.untouched.wat index c2ace80b13..1ff3642a48 100644 --- a/tests/compiler/std/string-encoding.untouched.wat +++ b/tests/compiler/std/string-encoding.untouched.wat @@ -4,8 +4,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -2089,237 +2089,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2369,7 +2138,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) @@ -2380,1301 +2149,48 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/string/String.UTF16.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) + local.get $1 + i32.const 1 + i32.shl + local.set $3 + local.get $2 + local.get $0 + local.get $3 + memory.copy + local.get $3 + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $0 i32) (result i32) + local.get $0 + i32.const 20 + i32.sub + i32.load offset=16 + ) + (func $~lib/string/String.UTF16.decode (param $0 i32) (result i32) + local.get $0 + local.get $0 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + call $~lib/string/String.UTF16.decodeUnsafe + ) + (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end + (local $7 i32) + (local $8 i32) + (local $9 i32) local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) - (func $~lib/string/String.UTF16.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $1 - i32.const 1 - i32.shl - local.set $3 - local.get $2 - local.get $0 - local.get $3 - call $~lib/memory/memory.copy - local.get $3 - ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $0 i32) (result i32) - local.get $0 - i32.const 20 - i32.sub - i32.load offset=16 - ) - (func $~lib/string/String.UTF16.decode (param $0 i32) (result i32) - local.get $0 - local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - call $~lib/string/String.UTF16.decodeUnsafe - ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $5 - local.get $2 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.set $6 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $6 i32.const 0 i32.const 2 i32.lt_s @@ -4222,7 +2738,7 @@ local.get $5 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy local.get $3 ) (func $~lib/string/String.UTF8.decode (param $0 i32) (param $1 i32) (result i32) @@ -5535,17 +4051,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=24 + i32.const 28 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/string-encoding/str local.set $5 @@ -6163,7 +4671,7 @@ local.get $2 local.get $0 local.get $1 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.set $3 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index bf7c1909ce..e208eab2ac 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -2,14 +2,14 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $f64_=>_i32 (func (param f64) (result i32))) (type $i64_i32_=>_i32 (func (param i64 i32) (result i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (type $none_=>_i64 (func (result i64))) @@ -40,905 +40,458 @@ (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 42268)) (memory $0 1) - (data (i32.const 1036) "<") - (data (i32.const 1048) "\01\00\00\00 \00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g") - (data (i32.const 1100) ",") - (data (i32.const 1112) "\01\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 1148) "\1c") - (data (i32.const 1160) "\01\00\00\00\02\00\00\00\df") - (data (i32.const 1180) "\1c") - (data (i32.const 1192) "\01\00\00\00\04\00\00\00\df\00\df") - (data (i32.const 1212) "\1c") - (data (i32.const 1224) "\01\00\00\00\06\00\00\00\df\00a\00b") - (data (i32.const 1244) "<") - (data (i32.const 1256) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") - (data (i32.const 1308) ",") - (data (i32.const 1320) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 1356) "<") - (data (i32.const 1368) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1420) "<") - (data (i32.const 1432) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") - (data (i32.const 1548) ",") - (data (i32.const 1560) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 1628) "<") - (data (i32.const 1640) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 1692) "\1c") - (data (i32.const 1704) "\01") - (data (i32.const 1724) "\1c") - (data (i32.const 1736) "\01\00\00\00\02\00\00\00h") - (data (i32.const 1756) "\1c") - (data (i32.const 1768) "\01\00\00\00\02") - (data (i32.const 1788) "\1c") - (data (i32.const 1800) "\01\00\00\00\02\00\00\00a") - (data (i32.const 1820) "\1c") - (data (i32.const 1832) "\01\00\00\00\02\00\00\00@") - (data (i32.const 1852) "\1c") - (data (i32.const 1864) "\01\00\00\00\02\00\00\006") - (data (i32.const 1884) "\1c") - (data (i32.const 1896) "\01\00\00\00\04\00\00\00\00\d8\00\df") - (data (i32.const 1916) "\1c") - (data (i32.const 1932) "\08\00\00\00\00\00\00\006") - (data (i32.const 1948) "\1c") - (data (i32.const 1960) "\01\00\00\00\04\00\00\00\00\006") - (data (i32.const 1980) "\1c") - (data (i32.const 1996) "\0c\00\00\00A\00\00\00B\00\00\00C") - (data (i32.const 2012) "\1c") - (data (i32.const 2024) "\01\00\00\00\06\00\00\00A\00B\00C") - (data (i32.const 2044) ",") - (data (i32.const 2060) "\14\00\00\004\d8\00\00\06\df\00\00a\00\00\004\d8\00\00\07\df") - (data (i32.const 2092) "\1c") - (data (i32.const 2104) "\01\00\00\00\n\00\00\004\d8\06\dfa\004\d8\07\df") - (data (i32.const 2124) "\1c") - (data (i32.const 2136) "\01\00\00\00\04\00\00\004\d8\06\df") - (data (i32.const 2156) "\1c") - (data (i32.const 2168) "\01\00\00\00\04\00\00\00h\00i") - (data (i32.const 2188) "\1c") - (data (i32.const 2200) "\01\00\00\00\0c\00\00\00s\00t\00r\00i\00n\00g") - (data (i32.const 2220) "\1c") - (data (i32.const 2232) "\01\00\00\00\06\00\00\00I\00\'\00m") - (data (i32.const 2252) "\1c") - (data (i32.const 2264) "\01\00\00\00\02\00\00\00 ") - (data (i32.const 2284) "\1c") - (data (i32.const 2296) "\01\00\00\00\06\00\00\00 \00 \00 ") - (data (i32.const 2316) "\1c") - (data (i32.const 2328) "\01\00\00\00\06\00\00\00a\00b\00c") - (data (i32.const 2348) "\1c") - (data (i32.const 2360) "\01\00\00\00\n\00\00\00 \00 \00a\00b\00c") - (data (i32.const 2380) "\1c") - (data (i32.const 2392) "\01\00\00\00\06\00\00\001\002\003") - (data (i32.const 2412) "\1c") - (data (i32.const 2424) "\01\00\00\00\0c\00\00\001\002\003\00a\00b\00c") - (data (i32.const 2444) ",") - (data (i32.const 2456) "\01\00\00\00\10\00\00\001\002\003\001\002\00a\00b\00c") - (data (i32.const 2492) "\1c") - (data (i32.const 2504) "\01\00\00\00\n\00\00\00a\00b\00c\00 \00 ") - (data (i32.const 2524) "\1c") - (data (i32.const 2536) "\01\00\00\00\0c\00\00\00a\00b\00c\00a\00b\00c") - (data (i32.const 2556) ",") - (data (i32.const 2568) "\01\00\00\00\10\00\00\00a\00b\00c\00a\00b\00c\00a\00b") - (data (i32.const 2604) "\1c") - (data (i32.const 2616) "\01\00\00\00\02\00\00\00,") - (data (i32.const 2636) "\1c") - (data (i32.const 2648) "\01\00\00\00\02\00\00\00x") - (data (i32.const 2668) "\1c") - (data (i32.const 2680) "\01\00\00\00\06\00\00\00,\00 \00I") - (data (i32.const 2700) "\1c") - (data (i32.const 2712) "\01\00\00\00\02\00\00\00g") - (data (i32.const 2732) "\1c") - (data (i32.const 2744) "\01\00\00\00\02\00\00\00i") - (data (i32.const 2764) "\1c") - (data (i32.const 2776) "\01\00\00\00\08\00\00\00n\00u\00l\00l") - (data (i32.const 2796) "\1c") - (data (i32.const 2808) "\01\00\00\00\06\00\00\00a\00b\00d") - (data (i32.const 2828) "\1c") - (data (i32.const 2840) "\01\00\00\00\08\00\00\00a\00b\00c\00d") - (data (i32.const 2860) "\1c") - (data (i32.const 2872) "\01\00\00\00\08\00\00\00a\00b\00 \00c") - (data (i32.const 2892) ",") - (data (i32.const 2904) "\01\00\00\00\16\00\00\00 \00\n\00\t\00\0d\00a\00b\00c\00 \00\t\00\0d\00 ") - (data (i32.const 2940) ",") - (data (i32.const 2952) "\01\00\00\00\0e\00\00\00a\00b\00c\00 \00\t\00\0d\00 ") - (data (i32.const 2988) ",") - (data (i32.const 3000) "\01\00\00\00\0e\00\00\00 \00\n\00\t\00\0d\00a\00b\00c") - (data (i32.const 3036) "\1c") - (data (i32.const 3048) "\01\00\00\00\02\00\00\000") - (data (i32.const 3068) "\1c") - (data (i32.const 3080) "\01\00\00\00\06\00\00\000\000\000") - (data (i32.const 3100) "\1c") - (data (i32.const 3112) "\01\00\00\00\02\00\00\001") - (data (i32.const 3132) "\1c") - (data (i32.const 3144) "\01\00\00\00\08\00\00\000\000\000\001") - (data (i32.const 3164) "\1c") - (data (i32.const 3176) "\01\00\00\00\n\00\00\000\00b\001\000\001") - (data (i32.const 3196) "\1c") - (data (i32.const 3208) "\01\00\00\00\n\00\00\000\00o\007\000\007") - (data (i32.const 3228) "\1c") - (data (i32.const 3240) "\01\00\00\00\n\00\00\000\00x\00f\000\00f") - (data (i32.const 3260) "\1c") - (data (i32.const 3272) "\01\00\00\00\n\00\00\000\00X\00F\000\00F") - (data (i32.const 3292) "\1c") - (data (i32.const 3304) "\01\00\00\00\06\00\00\000\001\001") - (data (i32.const 3324) "\1c") - (data (i32.const 3336) "\01\00\00\00\08\00\00\000\00x\001\00g") - (data (i32.const 3356) "\1c") - (data (i32.const 3368) "\01\00\00\00\08\00\00\00-\001\002\003") - (data (i32.const 3388) "\1c") - (data (i32.const 3400) "\01\00\00\00\08\00\00\00+\001\002\003") - (data (i32.const 3420) "\1c") - (data (i32.const 3432) "\01\00\00\00\n\00\00\00-\001\002\00.\003") - (data (i32.const 3452) "\1c") - (data (i32.const 3464) "\01\00\00\00\06\00\00\000\00x\000") - (data (i32.const 3484) "\1c") - (data (i32.const 3496) "\01\00\00\00\08\00\00\000\00b\001\001") - (data (i32.const 3516) "\1c") - (data (i32.const 3528) "\01\00\00\00\04\00\00\00\n\001") - (data (i32.const 3548) "\1c") - (data (i32.const 3560) "\01\00\00\00\04\00\00\00( 1") - (data (i32.const 3580) "\1c") - (data (i32.const 3592) "\01\00\00\00\04\00\00\00) 1") - (data (i32.const 3612) "\1c") - (data (i32.const 3624) "\01\00\00\00\04\00\00\00-\000") - (data (i32.const 3644) ",") - (data (i32.const 3656) "\01\00\00\00\10\00\00\000\00X\00A\00B\00C\00D\00E\00F") - (data (i32.const 3692) "\1c") - (data (i32.const 3704) "\01\00\00\00\0c\00\00\00A\00B\00C\00D\00E\00F") - (data (i32.const 3724) "<") - (data (i32.const 3736) "\01\00\00\00(\00\00\003\006\008\009\003\004\008\008\001\004\007\004\001\009\001\000\003\002\003\002") - (data (i32.const 3788) "L") - (data (i32.const 3800) "\01\00\00\004\00\00\00-\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000") - (data (i32.const 3868) "<") - (data (i32.const 3880) "\01\00\00\00,\00\00\000\00x\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000") - (data (i32.const 3932) "\1c") - (data (i32.const 3944) "\01\00\00\00\06\00\00\001\00=\d8%\dd") - (data (i32.const 3964) ",") - (data (i32.const 3976) "\01\00\00\00\0e\00\00\002\00b\00a\00d\00n\00u\00m") - (data (i32.const 4012) "\1c") - (data (i32.const 4024) "\01\00\00\00\08\00\00\00 \00\t\00\n\001") - (data (i32.const 4044) ",") - (data (i32.const 4056) "\01\00\00\00\0e\00\00\00 \00\t\00\n\000\00x\000\002") - (data (i32.const 4092) "\1c") - (data (i32.const 4104) "\01\00\00\00\02\00\00\00-") - (data (i32.const 4124) "\1c") - (data (i32.const 4136) "\01\00\00\00\02\00\00\00+") - (data (i32.const 4156) "\1c") - (data (i32.const 4168) "\01\00\00\00\04\00\00\00=\d8%\dd") - (data (i32.const 4188) "\1c") - (data (i32.const 4200) "\01\00\00\00\0c\00\00\00b\00a\00d\00n\00u\00m") - (data (i32.const 4220) ",") - (data (i32.const 4232) "\01\00\00\00\14\00\00\000\00x\007\00F\00F\00F\00F\00F\00F\00F") - (data (i32.const 4268) "<") - (data (i32.const 4280) "\01\00\00\00$\00\00\000\00x\007\00F\00F\00F\00F\00F\00F\00F\00F\00F\00F\00F\00F\00F\00F\00F") + (data (i32.const 1036) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g") + (data (i32.const 1100) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 1148) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\df") + (data (i32.const 1180) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\df\00\df") + (data (i32.const 1212) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00\df\00a\00b") + (data (i32.const 1244) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data (i32.const 1308) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 1356) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 1420) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 1548) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data (i32.const 1628) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 1692) "\1c\00\00\00\00\00\00\00\00\00\00\00\01") + (data (i32.const 1724) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00h") + (data (i32.const 1756) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02") + (data (i32.const 1788) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a") + (data (i32.const 1820) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00@") + (data (i32.const 1852) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\006") + (data (i32.const 1884) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\00\d8\00\df") + (data (i32.const 1916) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\00\00\00\006") + (data (i32.const 1948) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\00\006") + (data (i32.const 1980) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00A\00\00\00B\00\00\00C") + (data (i32.const 2012) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00A\00B\00C") + (data (i32.const 2044) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\004\d8\00\00\06\df\00\00a\00\00\004\d8\00\00\07\df") + (data (i32.const 2092) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\004\d8\06\dfa\004\d8\07\df") + (data (i32.const 2124) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\004\d8\06\df") + (data (i32.const 2156) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00h\00i") + (data (i32.const 2188) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00s\00t\00r\00i\00n\00g") + (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00I\00\'\00m") + (data (i32.const 2252) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00 ") + (data (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00 \00 \00 ") + (data (i32.const 2316) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00b\00c") + (data (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00 \00 \00a\00b\00c") + (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\002\003") + (data (i32.const 2412) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\001\002\003\00a\00b\00c") + (data (i32.const 2444) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\001\002\003\001\002\00a\00b\00c") + (data (i32.const 2492) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00b\00c\00 \00 ") + (data (i32.const 2524) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00a\00b\00c\00a\00b\00c") + (data (i32.const 2556) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00a\00b\00c\00a\00b\00c\00a\00b") + (data (i32.const 2604) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00,") + (data (i32.const 2636) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00x") + (data (i32.const 2668) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00,\00 \00I") + (data (i32.const 2700) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00g") + (data (i32.const 2732) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00i") + (data (i32.const 2764) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00n\00u\00l\00l") + (data (i32.const 2796) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00b\00d") + (data (i32.const 2828) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00b\00c\00d") + (data (i32.const 2860) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00b\00 \00c") + (data (i32.const 2892) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00 \00\n\00\t\00\0d\00a\00b\00c\00 \00\t\00\0d\00 ") + (data (i32.const 2940) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00a\00b\00c\00 \00\t\00\0d\00 ") + (data (i32.const 2988) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00 \00\n\00\t\00\0d\00a\00b\00c") + (data (i32.const 3036) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\000") + (data (i32.const 3068) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\000\000") + (data (i32.const 3100) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\001") + (data (i32.const 3132) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\000\000\000\001") + (data (i32.const 3164) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\000\00b\001\000\001") + (data (i32.const 3196) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\000\00o\007\000\007") + (data (i32.const 3228) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\000\00x\00f\000\00f") + (data (i32.const 3260) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\000\00X\00F\000\00F") + (data (i32.const 3292) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\001\001") + (data (i32.const 3324) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\000\00x\001\00g") + (data (i32.const 3356) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00-\001\002\003") + (data (i32.const 3388) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00+\001\002\003") + (data (i32.const 3420) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00-\001\002\00.\003") + (data (i32.const 3452) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00x\000") + (data (i32.const 3484) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\000\00b\001\001") + (data (i32.const 3516) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\n\001") + (data (i32.const 3548) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00( 1") + (data (i32.const 3580) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00) 1") + (data (i32.const 3612) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00-\000") + (data (i32.const 3644) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\000\00X\00A\00B\00C\00D\00E\00F") + (data (i32.const 3692) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00A\00B\00C\00D\00E\00F") + (data (i32.const 3724) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\003\006\008\009\003\004\008\008\001\004\007\004\001\009\001\000\003\002\003\002") + (data (i32.const 3788) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\004\00\00\00-\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000") + (data (i32.const 3868) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00,\00\00\000\00x\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000") + (data (i32.const 3932) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\00=\d8%\dd") + (data (i32.const 3964) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\002\00b\00a\00d\00n\00u\00m") + (data (i32.const 4012) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00 \00\t\00\n\001") + (data (i32.const 4044) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00 \00\t\00\n\000\00x\000\002") + (data (i32.const 4092) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00-") + (data (i32.const 4124) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00+") + (data (i32.const 4156) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00=\d8%\dd") + (data (i32.const 4188) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00b\00a\00d\00n\00u\00m") + (data (i32.const 4220) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\000\00x\007\00F\00F\00F\00F\00F\00F\00F") + (data (i32.const 4268) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\000\00x\007\00F\00F\00F\00F\00F\00F\00F\00F\00F\00F\00F\00F\00F\00F\00F") (data (i32.const 4342) "\f0?\00\00\00\00\00\00$@\00\00\00\00\00\00Y@\00\00\00\00\00@\8f@\00\00\00\00\00\88\c3@\00\00\00\00\00j\f8@\00\00\00\00\80\84.A\00\00\00\00\d0\12cA\00\00\00\00\84\d7\97A\00\00\00\00e\cd\cdA\00\00\00 _\a0\02B\00\00\00\e8vH7B\00\00\00\a2\94\1amB\00\00@\e5\9c0\a2B\00\00\90\1e\c4\bc\d6B\00\004&\f5k\0cC\00\80\e07y\c3AC\00\a0\d8\85W4vC\00\c8Ngm\c1\abC\00=\91`\e4X\e1C@\8c\b5x\1d\af\15DP\ef\e2\d6\e4\1aKD\92\d5M\06\cf\f0\80D") - (data (i32.const 4524) "\1c") - (data (i32.const 4536) "\01\00\00\00\04\00\00\001\00.") - (data (i32.const 4556) "\1c") - (data (i32.const 4568) "\01\00\00\00\08\00\00\001\00.\000\000") - (data (i32.const 4588) "\1c") - (data (i32.const 4600) "\01\00\00\00\08\00\00\001\00e\00-\005") - (data (i32.const 4620) "\1c") - (data (i32.const 4632) "\01\00\00\00\n\00\00\00-\001\00e\00-\005") - (data (i32.const 4652) ",") - (data (i32.const 4664) "\01\00\00\00\10\00\00\00-\000\00.\003\00e\00-\002\002") - (data (i32.const 4700) ",") - (data (i32.const 4712) "\01\00\00\00\0e\00\00\000\00.\003\00e\00+\002\002") - (data (i32.const 4748) "\1c") - (data (i32.const 4760) "\01\00\00\00\08\00\00\001\00e\00-\001") - (data (i32.const 4780) "\1c") - (data (i32.const 4792) "\01\00\00\00\0c\00\00\000\00.\001\00e\00-\000") - (data (i32.const 4812) "\1c") - (data (i32.const 4824) "\01\00\00\00\06\00\00\000\00.\001") - (data (i32.const 4844) "\1c") - (data (i32.const 4856) "\01\00\00\00\06\00\00\00.\002\005") - (data (i32.const 4876) "\1c") - (data (i32.const 4888) "\01\00\00\00\0c\00\00\001\00.\00e\00+\003\00a") - (data (i32.const 4908) ",") - (data (i32.const 4920) "\01\00\00\00\0e\00\00\001\00.\000\00e\00-\001\000") - (data (i32.const 4956) ",") - (data (i32.const 4968) "\01\00\00\00\0e\00\00\001\00.\000\00e\00-\003\000") - (data (i32.const 5004) ",") - (data (i32.const 5016) "\01\00\00\00\10\00\00\001\00.\000\00e\00-\003\002\003") - (data (i32.const 5052) ",") - (data (i32.const 5064) "\01\00\00\00\10\00\00\001\00.\000\00e\00-\003\002\004") - (data (i32.const 5100) "\1c") - (data (i32.const 5112) "\01\00\00\00\0c\00\00\001\00e\00+\003\000\008") - (data (i32.const 5132) "\1c") - (data (i32.const 5144) "\01\00\00\00\0c\00\00\001\00e\00+\003\000\009") - (data (i32.const 5164) ",") - (data (i32.const 5176) "\01\00\00\00\10\00\00\001\00.\000\00e\00-\001\00_\000") - (data (i32.const 5212) ",") - (data (i32.const 5224) "\01\00\00\00\12\00\00\001\00.\000\00e\00-\001\000\00_\000") - (data (i32.const 5260) ",") - (data (i32.const 5272) "\01\00\00\00\10\00\00\001\00.\000\00e\00+\001\00_\000") - (data (i32.const 5308) "\1c") - (data (i32.const 5320) "\01\00\00\00\06\00\00\001\00_\000") - (data (i32.const 5340) "\1c") - (data (i32.const 5352) "\01\00\00\00\06\00\00\001\00_\001") - (data (i32.const 5372) ",") - (data (i32.const 5384) "\01\00\00\00\14\00\00\001\000\00.\000\000\00_\000\001\00e\002") - (data (i32.const 5420) ",") - (data (i32.const 5432) "\01\00\00\00\16\00\00\001\002\003\004\005\006\007\008\009\00_\004") - (data (i32.const 5468) ",") - (data (i32.const 5480) "\01\00\00\00\18\00\00\001\00_\000\001\002\003\004\005\006\007\008\009") - (data (i32.const 5516) "\1c") - (data (i32.const 5528) "\01\00\00\00\n\00\00\001\00e\00-\006\000") - (data (i32.const 5548) "\1c") - (data (i32.const 5560) "\01\00\00\00\08\00\00\001\00e\006\000") - (data (i32.const 5580) "\1c") - (data (i32.const 5592) "\01\00\00\00\0c\00\00\001\002\003\00.\004\00e") - (data (i32.const 5612) ",") - (data (i32.const 5624) "\01\00\00\00\0e\00\00\00-\00.\000\000\000\000\000") - (data (i32.const 5660) "\1c") - (data (i32.const 5672) "\01\00\00\00\04\00\00\001\00x") - (data (i32.const 5692) ",") - (data (i32.const 5704) "\01\00\00\00\18\00\00\00-\001\001\00e\00-\001\00s\00t\00r\00i\00n\00g") - (data (i32.const 5740) ",") - (data (i32.const 5752) "\01\00\00\00\14\00\00\000\001\00e\001\00s\00t\00r\00i\00n\00g") - (data (i32.const 5788) ",") - (data (i32.const 5800) "\01\00\00\00\12\00\00\000\001\000\00s\00t\00r\00i\00n\00g") - (data (i32.const 5836) ",") - (data (i32.const 5848) "\01\00\00\00\0e\00\00\00+\00.\002\002\00e\00-\001") - (data (i32.const 5884) "\1c") - (data (i32.const 5896) "\01\00\00\00\n\00\00\001\001\00.\00s\001") - (data (i32.const 5916) "\1c") - (data (i32.const 5928) "\01\00\00\00\06\00\00\000\00x\005") - (data (i32.const 5948) "\1c") - (data (i32.const 5960) "\01\00\00\00\06\00\00\000\00x\00D") - (data (i32.const 5980) "\1c") - (data (i32.const 5992) "\01\00\00\00\08\00\00\00\0b\001\00.\001") - (data (i32.const 6012) "\1c") - (data (i32.const 6024) "\01\00\00\00\0c\00\00\00\0b\00\0b\00-\001\00.\001") - (data (i32.const 6044) "\1c") - (data (i32.const 6056) "\01\00\00\00\0c\00\00\00\0c\00\0c\00-\001\00.\001") - (data (i32.const 6076) "\1c") - (data (i32.const 6088) "\01\00\00\00\0c\00\00\00( ( -\001\00.\001") - (data (i32.const 6108) "\1c") - (data (i32.const 6120) "\01\00\00\00\0c\00\00\00) ) -\001\00.\001") - (data (i32.const 6140) "\1c") - (data (i32.const 6152) "\01\00\00\00\n\00\00\000\000\000\000\000") - (data (i32.const 6172) "\1c") - (data (i32.const 6184) "\01\00\00\00\n\00\00\000\000\000\000\00a") - (data (i32.const 6204) "\1c") - (data (i32.const 6216) "\01\00\00\00\n\00\00\000\000\000\000\001") - (data (i32.const 6236) "\1c") - (data (i32.const 6248) "\01\00\00\00\n\00\00\000\000\00.\000\000") - (data (i32.const 6268) "\1c") - (data (i32.const 6280) "\01\00\00\00\n\00\00\000\000\00.\000\00a") - (data (i32.const 6300) "\1c") - (data (i32.const 6312) "\01\00\00\00\08\00\00\001\00e\001\00e") - (data (i32.const 6332) ",") - (data (i32.const 6344) "\01\00\00\00\0e\00\00\001\00e\00+\000\000\000\001") - (data (i32.const 6380) "\1c") - (data (i32.const 6392) "\01\00\00\00\0c\00\00\000\00e\00+\001\000\000") - (data (i32.const 6412) "\1c") - (data (i32.const 6424) "\01\00\00\00\n\00\00\001\00.\00-\001\00.") - (data (i32.const 6444) "\1c") - (data (i32.const 6456) "\01\00\00\00\0c\00\00\001\00e\00-\001\00.\002") - (data (i32.const 6476) "\1c") - (data (i32.const 6488) "\01\00\00\00\06\00\00\001\00e\00x") - (data (i32.const 6508) "\1c") - (data (i32.const 6520) "\01\00\00\00\08\00\00\001\00e\001\00x") - (data (i32.const 6540) "\1c") - (data (i32.const 6552) "\01\00\00\00\08\00\00\001\00e\00-\00x") - (data (i32.const 6572) "\1c") - (data (i32.const 6584) "\01\00\00\00\n\00\00\001\00e\00-\001\00x") - (data (i32.const 6604) ",") - (data (i32.const 6616) "\01\00\00\00\0e\00\00\000\00.\001\00e\00-\001\00x") - (data (i32.const 6652) "\1c") - (data (i32.const 6664) "\01\00\00\00\06\00\00\000\000\00.") - (data (i32.const 6684) "\1c") - (data (i32.const 6696) "\01\00\00\00\06\00\00\00.\000\000") - (data (i32.const 6716) "\1c") - (data (i32.const 6728) "\01\00\00\00\06\00\00\00.\000\00.") - (data (i32.const 6748) "\1c") - (data (i32.const 6760) "\01\00\00\00\06\00\00\00.\001\00.") - (data (i32.const 6780) "\1c") - (data (i32.const 6792) "\01\00\00\00\06\00\00\000\00.\00.") - (data (i32.const 6812) "\1c") - (data (i32.const 6824) "\01\00\00\00\06\00\00\000\00.\00a") - (data (i32.const 6844) "\1c") - (data (i32.const 6856) "\01\00\00\00\08\00\00\001\00.\00.\001") - (data (i32.const 6876) "\1c") - (data (i32.const 6888) "\01\00\00\00\n\00\00\000\00.\001\00.\001") - (data (i32.const 6908) "\1c") - (data (i32.const 6920) "\01\00\00\00\08\00\00\000\00.\00 \001") - (data (i32.const 6940) "\1c") - (data (i32.const 6952) "\01\00\00\00\08\00\00\00+\000\00.\000") - (data (i32.const 6972) "\1c") - (data (i32.const 6984) "\01\00\00\00\08\00\00\00-\000\00.\000") - (data (i32.const 7004) "\1c") - (data (i32.const 7016) "\01\00\00\00\04\00\00\00+\000") - (data (i32.const 7036) "\1c") - (data (i32.const 7048) "\01\00\00\00\06\00\00\00-\00-\000") - (data (i32.const 7068) "\1c") - (data (i32.const 7080) "\01\00\00\00\06\00\00\00+\00+\000") - (data (i32.const 7100) "\1c") - (data (i32.const 7112) "\01\00\00\00\04\00\00\00.\00a") - (data (i32.const 7132) "\1c") - (data (i32.const 7144) "\01\00\00\00\06\00\00\00.\00.\000") - (data (i32.const 7164) "\1c") - (data (i32.const 7176) "\01\00\00\00\02\00\00\00.") - (data (i32.const 7196) "\1c") - (data (i32.const 7208) "\01\00\00\00\04\00\00\00.\00.") - (data (i32.const 7228) "\1c") - (data (i32.const 7240) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 7260) "\1c") - (data (i32.const 7272) "\01\00\00\00\02\00\00\00\0b") - (data (i32.const 7292) "\1c") - (data (i32.const 7304) "\01\00\00\00\02\00\00\00\0e\18") - (data (i32.const 7324) "\1c") - (data (i32.const 7336) "\01\00\00\00\08\00\00\00\0e\181\00.\001") - (data (i32.const 7356) "\1c") - (data (i32.const 7368) "\01\00\00\00\n\00\00\00\0e\18\0e\181\00.\001") - (data (i32.const 7388) "\1c") - (data (i32.const 7400) "\01\00\00\00\02\00\00\00\0c") - (data (i32.const 7420) "\1c") - (data (i32.const 7432) "\01\00\00\00\08\00\00\00t\00r\00u\00e") - (data (i32.const 7452) "\1c") - (data (i32.const 7464) "\01\00\00\00\n\00\00\00f\00a\00l\00s\00e") - (data (i32.const 7484) "\1c") - (data (i32.const 7496) "\01\00\00\00\08\00\00\001\00e\002\002") - (data (i32.const 7516) "\1c") - (data (i32.const 7528) "\01\00\00\00\n\00\00\001\00e\00-\002\002") - (data (i32.const 7548) "\1c") - (data (i32.const 7560) "\01\00\00\00\08\00\00\001\00e\002\003") - (data (i32.const 7580) "\1c") - (data (i32.const 7592) "\01\00\00\00\n\00\00\001\00e\00-\002\003") - (data (i32.const 7612) "\1c") - (data (i32.const 7624) "\01\00\00\00\08\00\00\001\00e\003\007") - (data (i32.const 7644) "\1c") - (data (i32.const 7656) "\01\00\00\00\n\00\00\001\00e\00-\003\007") - (data (i32.const 7676) "\1c") - (data (i32.const 7688) "\01\00\00\00\08\00\00\001\00e\003\008") - (data (i32.const 7708) "\1c") - (data (i32.const 7720) "\01\00\00\00\n\00\00\001\00e\00-\003\008") - (data (i32.const 7740) "<") - (data (i32.const 7752) "\01\00\00\00*\00\00\002\00.\002\002\000\004\004\006\000\004\009\002\005\000\003\001\003\00e\00-\001\006") - (data (i32.const 7804) "L") - (data (i32.const 7816) "\01\00\00\00.\00\00\001\00.\007\009\007\006\009\003\001\003\004\008\006\002\003\001\005\007\00e\00+\003\000\008") - (data (i32.const 7884) "\1c") - (data (i32.const 7896) "\01\00\00\00\0c\00\00\005\00e\00-\003\002\004") - (data (i32.const 7916) ",") - (data (i32.const 7928) "\01\00\00\00\1a\00\00\000\00.\000\000\000\000\000\001\00e\00+\003\001\004") - (data (i32.const 7964) "\8c") - (data (i32.const 7976) "\01\00\00\00|\00\00\000\00.\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\00e\00+\005\006") - (data (i32.const 8108) ",") - (data (i32.const 8120) "\01\00\00\00\0e\00\00\00+\001\00E\00-\003\002\005") - (data (i32.const 8156) ",") - (data (i32.const 8168) "\01\00\00\00\0e\00\00\00+\001\00E\00+\003\000\009") - (data (i32.const 8204) ",") - (data (i32.const 8216) "\01\00\00\00\0e\00\00\00-\001\00E\00-\003\002\005") - (data (i32.const 8252) ",") - (data (i32.const 8264) "\01\00\00\00\0e\00\00\00-\001\00E\00+\003\000\009") - (data (i32.const 8300) ",") - (data (i32.const 8312) "\01\00\00\00\14\00\00\001\00e\00-\001\000\000\000\000\000\000") - (data (i32.const 8348) ",") - (data (i32.const 8360) "\01\00\00\00\14\00\00\001\00e\00+\001\000\000\000\000\000\000") - (data (i32.const 8396) "\1c") - (data (i32.const 8408) "\01\00\00\00\0c\00\00\001\00.\00e\003\006\000") - (data (i32.const 8428) ",") - (data (i32.const 8440) "\01\00\00\00\12\00\00\00 \00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 8476) ",") - (data (i32.const 8488) "\01\00\00\00\12\00\00\00+\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 8524) ",") - (data (i32.const 8536) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 8572) ",") - (data (i32.const 8584) "\01\00\00\00\12\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00x") - (data (i32.const 8620) ",") - (data (i32.const 8632) "\01\00\00\00\14\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00+\001") - (data (i32.const 8668) "\1c") - (data (i32.const 8680) "\01\00\00\00\08\00\00\00I\00n\00f\00i") - (data (i32.const 8700) ",") - (data (i32.const 8712) "\01\00\00\00\10\00\00\00+\00I\00n\00f\00i\00n\00i\00t") - (data (i32.const 8748) ",") - (data (i32.const 8760) "\01\00\00\00\10\00\00\00i\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 8796) "\bc") - (data (i32.const 8808) "\01\00\00\00\aa\00\00\00.\002\004\007\000\003\002\008\002\002\009\002\000\006\002\003\002\007\002\000\008\008\002\008\004\003\009\006\004\003\004\001\001\000\006\008\006\001\008\002\005\002\009\009\000\001\003\000\007\001\006\002\003\008\002\002\001\002\007\009\002\008\004\001\002\005\000\003\003\007\007\005\003\006\003\005\001\000\004\003\00e\00-\003\002\003") - (data (i32.const 8988) "\bc") - (data (i32.const 9000) "\01\00\00\00\aa\00\00\00.\007\004\001\000\009\008\004\006\008\007\006\001\008\006\009\008\001\006\002\006\004\008\005\003\001\008\009\003\000\002\003\003\002\000\005\008\005\004\007\005\008\009\007\000\003\009\002\001\004\008\007\001\004\006\006\003\008\003\007\008\005\002\003\007\005\001\000\001\003\002\006\000\009\000\005\003\001\003\002\00e\00-\003\002\003") - (data (i32.const 9180) "\bc") - (data (i32.const 9192) "\01\00\00\00\aa\00\00\00.\002\002\002\005\000\007\003\008\005\008\005\000\007\002\000\001\006\003\000\001\002\003\000\005\005\006\003\007\009\005\005\006\007\006\001\005\002\005\000\003\006\001\002\004\001\004\005\007\003\000\001\008\000\001\003\000\008\003\002\002\008\007\002\004\000\004\009\005\008\006\006\004\007\006\000\006\007\006\000\00e\00-\003\000\007") - (data (i32.const 9372) "\9c") - (data (i32.const 9384) "\01\00\00\00\88\00\00\001\007\009\007\006\009\003\001\003\004\008\006\002\003\001\005\008\000\007\009\003\007\002\008\009\007\001\004\000\005\003\000\003\004\001\005\000\007\009\009\003\004\001\003\002\007\001\000\000\003\007\008\002\006\009\003\006\001\007\003\007\007\008\009\008\000\004\004") - (data (i32.const 9532) "\9c") - (data (i32.const 9544) "\01\00\00\00\88\00\00\004\009\006\008\002\009\002\007\006\004\007\005\000\009\004\006\006\004\009\000\001\007\009\007\007\005\008\007\002\000\007\000\009\006\003\003\000\002\008\006\004\001\006\006\009\002\008\008\007\009\001\000\009\004\006\005\005\005\005\004\007\008\005\001\009\004\000\004") - (data (i32.const 9692) "\9c") - (data (i32.const 9704) "\01\00\00\00\88\00\00\000\002\006\003\000\006\005\007\004\008\008\006\007\001\005\000\005\008\002\000\006\008\001\009\000\008\009\000\002\000\000\000\007\000\008\003\008\003\006\007\006\002\007\003\008\005\004\008\004\005\008\001\007\007\001\001\005\003\001\007\006\004\004\007\005\007\003\000") - (data (i32.const 9852) "\9c") - (data (i32.const 9864) "\01\00\00\00\88\00\00\002\007\000\000\006\009\008\005\005\005\007\001\003\006\006\009\005\009\006\002\002\008\004\002\009\001\004\008\001\009\008\006\000\008\003\004\009\003\006\004\007\005\002\009\002\007\001\009\000\007\004\001\006\008\004\004\004\003\006\005\005\001\000\007\000\004\003\004") - (data (i32.const 10012) "\9c") - (data (i32.const 10024) "\01\00\00\00\88\00\00\002\007\001\001\005\005\009\006\009\009\005\000\008\000\009\003\000\004\002\008\008\000\001\007\007\009\000\004\001\007\004\004\009\007\007\009\001\00.\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009") - (data (i32.const 10172) "l") - (data (i32.const 10184) "\01\00\00\00\\\00\00\000\00.\009\007\005\003\005\003\001\008\008\008\007\009\009\005\000\002\006\001\003\008\000\007\001\003\005\002\007\006\001\004\007\001\006\004\004\000\004\003\009\00e\00-\001\000\003") - (data (i32.const 10284) "l") - (data (i32.const 10296) "\01\00\00\00X\00\00\00.\005\009\006\001\008\006\000\003\004\008\001\003\001\008\000\007\000\009\001\008\006\001\000\000\002\002\006\006\004\005\003\009\004\001\009\005\000\004\002\008\00e\000\000") - (data (i32.const 10396) "l") - (data (i32.const 10408) "\01\00\00\00X\00\00\001\00.\008\001\005\000\001\003\001\006\009\002\001\008\000\003\008\007\002\009\008\008\007\004\006\000\008\009\008\007\003\003\005\002\006\009\005\007\004\004\002\00e\00-\001") - (data (i32.const 10508) "l") - (data (i32.const 10520) "\01\00\00\00X\00\00\004\002\00.\000\007\000\008\002\003\005\007\005\003\004\004\005\003\006\000\000\006\008\001\006\001\008\006\008\005\006\008\002\002\005\007\005\009\000\007\007\002\00e\00-\002") - (data (i32.const 10620) "l") - (data (i32.const 10632) "\01\00\00\00X\00\00\006\006\005\00.\004\006\008\006\003\000\006\005\001\006\002\006\001\004\005\006\003\002\008\009\007\003\002\002\005\005\007\009\008\003\003\004\007\000\008\001\006\00e\00-\003") - (data (i32.const 10732) "l") - (data (i32.const 10744) "\01\00\00\00X\00\00\006\001\000\001\00.\008\005\002\009\002\002\009\007\000\008\006\008\006\002\001\007\008\006\006\009\000\004\009\005\004\008\005\004\004\009\008\003\001\007\005\003\00e\00-\004") - (data (i32.const 10844) "l") - (data (i32.const 10856) "\01\00\00\00X\00\00\007\006\009\006\006\00.\009\005\002\000\008\002\003\006\009\006\008\000\007\007\008\004\009\004\006\004\003\004\008\008\007\005\004\007\001\001\005\008\005\004\009\00e\00-\005") - (data (i32.const 10956) "l") - (data (i32.const 10968) "\01\00\00\00X\00\00\002\005\000\005\000\006\00.\005\003\002\002\002\002\008\006\008\002\004\009\006\001\003\002\006\000\004\008\000\007\002\002\002\009\002\003\007\000\002\003\000\004\00e\00-\006") - (data (i32.const 11068) "l") - (data (i32.const 11080) "\01\00\00\00X\00\00\002\007\004\000\000\003\007\00.\002\003\000\002\002\008\000\000\005\003\002\005\008\005\002\004\002\004\006\009\007\006\009\008\003\003\001\001\007\007\003\007\007\00e\00-\007") - (data (i32.const 11180) "l") - (data (i32.const 11192) "\01\00\00\00X\00\00\002\000\007\002\003\000\009\003\00.\005\000\000\004\009\007\004\002\006\004\005\009\004\001\005\002\009\002\006\008\007\001\005\004\002\008\003\002\004\004\009\000\00e\00-\008") - (data (i32.const 11292) "l") - (data (i32.const 11304) "\01\00\00\00X\00\00\000\00.\007\009\000\000\002\008\000\002\003\008\000\008\001\006\000\004\009\005\006\002\002\006\000\001\001\000\004\007\004\006\000\002\003\008\007\004\008\009\001\002\00e\001") - (data (i32.const 11404) "l") - (data (i32.const 11416) "\01\00\00\00X\00\00\000\00.\009\008\002\002\008\006\000\006\005\003\007\003\007\002\009\006\008\004\008\001\009\000\005\005\008\004\004\008\007\006\000\004\006\005\008\006\003\005\009\007\00e\002") - (data (i32.const 11516) "l") - (data (i32.const 11528) "\01\00\00\00X\00\00\000\00.\007\004\006\008\009\004\009\007\002\003\001\009\000\003\007\000\008\000\009\004\000\005\005\007\000\005\006\000\001\006\000\004\000\005\003\002\004\008\006\009\00e\003") - (data (i32.const 11628) "l") - (data (i32.const 11640) "\01\00\00\00X\00\00\000\00.\001\006\003\000\002\006\008\003\002\000\002\008\002\007\002\008\004\007\005\009\008\000\004\005\009\008\004\004\002\007\001\000\003\001\007\005\001\006\006\005\00e\004") - (data (i32.const 11740) "l") - (data (i32.const 11752) "\01\00\00\00X\00\00\000\00.\004\006\003\007\001\006\008\006\002\009\007\001\009\001\007\000\006\009\005\001\000\009\009\001\008\007\006\009\006\004\005\004\009\002\000\002\002\000\008\008\00e\005") - (data (i32.const 11852) "l") - (data (i32.const 11864) "\01\00\00\00X\00\00\000\00.\006\005\003\007\008\000\005\009\004\004\004\009\007\007\001\001\005\005\004\002\000\009\004\006\001\006\008\006\004\001\005\008\007\002\000\006\007\005\002\003\00e\006") - (data (i32.const 11964) "l") - (data (i32.const 11976) "\01\00\00\00X\00\00\000\00.\002\003\004\006\003\002\004\003\005\006\005\000\002\004\003\007\000\004\005\002\001\002\002\003\000\007\001\003\009\006\000\004\005\007\006\007\006\005\003\001\00e\006") - (data (i32.const 12076) "l") - (data (i32.const 12088) "\01\00\00\00X\00\00\000\00.\009\007\000\009\004\008\001\007\001\006\004\002\000\000\004\008\003\004\001\008\009\007\002\005\008\009\008\000\004\005\004\002\009\008\002\000\005\002\007\008\00e\008") - (data (i32.const 12188) "l") - (data (i32.const 12200) "\01\00\00\00X\00\00\000\00.\004\009\009\006\009\000\008\005\002\002\000\005\001\008\007\004\001\001\000\007\007\009\009\008\002\003\005\004\009\003\002\004\009\009\004\009\009\006\000\002\00e\009") - (data (i32.const 12300) "l") - (data (i32.const 12312) "\01\00\00\00Z\00\00\000\00.\007\009\002\005\002\000\001\002\000\000\005\005\007\002\004\005\008\006\001\009\004\004\000\001\001\002\006\007\000\004\001\007\008\007\005\000\005\001\004\009\00e\002\002") - (data (i32.const 12412) "l") - (data (i32.const 12424) "\01\00\00\00Z\00\00\000\00.\006\000\009\006\005\006\004\005\008\005\009\008\003\001\007\007\004\000\008\009\003\004\003\005\002\005\007\000\002\001\003\003\007\007\004\007\005\007\003\009\00e\003\000") - (data (i32.const 12524) "l") - (data (i32.const 12536) "\01\00\00\00Z\00\00\000\00.\004\008\000\000\004\001\006\001\001\007\004\007\007\000\002\008\007\008\007\008\007\004\003\006\000\002\000\005\000\002\003\005\004\009\004\009\007\001\002\008\00e\006\007") - (data (i32.const 12636) "l") - (data (i32.const 12648) "\01\00\00\00\\\00\00\000\00.\008\005\002\004\008\002\009\000\007\009\008\001\007\009\006\008\002\002\004\008\003\000\003\003\007\009\003\001\000\005\002\007\008\001\006\004\001\004\008\003\00e\001\000\005") - (data (i32.const 12748) "l") - (data (i32.const 12760) "\01\00\00\00\\\00\00\000\00.\000\003\002\007\001\002\003\009\002\009\001\007\000\009\007\008\002\001\001\005\004\004\007\000\006\009\003\007\002\007\004\008\009\005\006\000\008\004\002\005\00e\002\006\009") - (data (i32.const 12860) "\1c") - (data (i32.const 12872) "\01\00\00\00\06\00\00\00 \00\t\00\n") - (data (i32.const 12892) "\1c") - (data (i32.const 12904) "\01\00\00\00\0c\00\00\00 \00\t\00\n\00\0d\00.\001") - (data (i32.const 12924) "\1c") - (data (i32.const 12936) "\01\00\00\00\02\00\00\00b") - (data (i32.const 12956) "\1c") - (data (i32.const 12968) "\01\00\00\00\04\00\00\00a\00b") - (data (i32.const 12988) "\1c") - (data (i32.const 13000) "\01\00\00\00\08\00\00\00k\00e\00y\001") - (data (i32.const 13020) "\1c") - (data (i32.const 13032) "\01\00\00\00\08\00\00\00k\00e\00y\002") - (data (i32.const 13052) "\1c") - (data (i32.const 13064) "\01\00\00\00\06\00\00\00k\00e\001") - (data (i32.const 13084) "\1c") - (data (i32.const 13096) "\01\00\00\00\06\00\00\00k\00e\002") - (data (i32.const 13116) "\1c") - (data (i32.const 13128) "\01\00\00\00\n\00\00\00k\00e\00y\001\002") - (data (i32.const 13148) "\1c") - (data (i32.const 13160) "\01\00\00\00\n\00\00\00k\00e\00y\001\001") - (data (i32.const 13180) ",") - (data (i32.const 13192) "\01\00\00\00\0e\00\00\00\a40\ed0\cf0\cb0\db0\d80\c80") - (data (i32.const 13228) ",") - (data (i32.const 13240) "\01\00\00\00\0e\00\00\00\a60\f00\ce0\aa0\af0\e40\de0") - (data (i32.const 13276) ",") - (data (i32.const 13288) "\01\00\00\00\16\00\00\00D\00\19 f\00h\00u\00a\00s\00c\00a\00i\00l") - (data (i32.const 13324) ",") - (data (i32.const 13336) "\01\00\00\00\14\00\00\00D\00\19 \1f\1eu\00a\00s\00c\00a\00i\00l") - (data (i32.const 13372) "\1c") - (data (i32.const 13384) "\01\00\00\00\04\00\00\00b\00a") - (data (i32.const 13404) "\1c") - (data (i32.const 13416) "\01\00\00\00\04\00\00\00a\00a") - (data (i32.const 13436) "\1c") - (data (i32.const 13448) "\01\00\00\00\04\00\00\001\000") - (data (i32.const 13468) "\1c") - (data (i32.const 13480) "\01\00\00\00\04\00\00\001\001") - (data (i32.const 13500) "\1c") - (data (i32.const 13512) "\01\00\00\00\06\00\00\001\000\001") - (data (i32.const 13532) "\1c") - (data (i32.const 13544) "\01\00\00\00\06\00\00\001\002\002") - (data (i32.const 13564) "\1c") - (data (i32.const 13576) "\01\00\00\00\08\00\00\001\002\003\004") - (data (i32.const 13596) "\1c") - (data (i32.const 13608) "\01\00\00\00\08\00\00\001\002\003\003") - (data (i32.const 13628) ",") - (data (i32.const 13640) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") - (data (i32.const 13676) "\1c") - (data (i32.const 13688) "\01\00\00\00\06\00\00\00a\00a\00a") - (data (i32.const 13708) ",") - (data (i32.const 13720) "\01\00\00\00\10\00\00\00a\00b\00a\00b\00a\00b\00a\00b") - (data (i32.const 13756) "\1c") - (data (i32.const 13768) "\01\00\00\00\n\00\00\00a\00a\00a\00a\00a") - (data (i32.const 13788) "\1c") - (data (i32.const 13800) "\01\00\00\00\0c\00\00\00a\00a\00a\00a\00a\00a") - (data (i32.const 13820) ",") - (data (i32.const 13832) "\01\00\00\00\0e\00\00\00a\00a\00a\00a\00a\00a\00a") - (data (i32.const 13868) "\1c") - (data (i32.const 13880) "\01\00\00\00\n\00\00\00a\00-\00b\00-\00c") - (data (i32.const 13900) "\1c") - (data (i32.const 13912) "\01\00\00\00\n\00\00\00a\00+\00b\00-\00c") - (data (i32.const 13932) "\1c") - (data (i32.const 13944) "\01\00\00\00\08\00\00\00+\00a\00b\00c") - (data (i32.const 13964) "\1c") - (data (i32.const 13976) "\01\00\00\00\08\00\00\00\n\00a\00b\00c") - (data (i32.const 13996) "\1c") - (data (i32.const 14008) "\01\00\00\00\02\00\00\00\n") - (data (i32.const 14028) "\1c") - (data (i32.const 14040) "\01\00\00\00\02\00\00\00c") - (data (i32.const 14060) "\1c") - (data (i32.const 14072) "\01\00\00\00\04\00\00\00+\00+") - (data (i32.const 14092) "\1c") - (data (i32.const 14104) "\01\00\00\00\08\00\00\00a\00b\00+\00+") - (data (i32.const 14124) ",") - (data (i32.const 14136) "\01\00\00\00\12\00\00\00a\00b\00c\00a\00b\00c\00a\00b\00c") - (data (i32.const 14172) "\1c") - (data (i32.const 14184) "\01\00\00\00\06\00\00\00+\00+\00+") - (data (i32.const 14204) ",") - (data (i32.const 14216) "\01\00\00\00\0e\00\00\00a\00b\00c\00a\00b\00c\00a") - (data (i32.const 14252) ",") - (data (i32.const 14264) "\01\00\00\00\1a\00\00\00+\00+\00+\00b\00c\00+\00+\00+\00b\00c\00+\00+\00+") - (data (i32.const 14300) "\1c") - (data (i32.const 14312) "\01\00\00\00\0c\00\00\00+\00+\00c\00+\00+\00c") - (data (i32.const 14332) "\1c") - (data (i32.const 14344) "\01\00\00\00\08\00\00\00c\00c\00c\00c") - (data (i32.const 14364) "\1c") - (data (i32.const 14376) "\01\00\00\00\04\00\00\00c\00c") - (data (i32.const 14396) "\1c") - (data (i32.const 14408) "\01\00\00\00\08\00\00\00+\00+\00+\00+") - (data (i32.const 14428) "\1c") - (data (i32.const 14440) "\01\00\00\00\02\00\00\00e") - (data (i32.const 14460) "\1c") - (data (i32.const 14472) "\01\00\00\00\04\00\00\00b\00c") - (data (i32.const 14492) "\1c") - (data (i32.const 14504) "\01\00\00\00\04\00\00\00a\00+") - (data (i32.const 14524) "\1c") - (data (i32.const 14536) "\01\00\00\00\n\00\00\00a\00+\00b\00+\00c") - (data (i32.const 14556) ",") - (data (i32.const 14568) "\01\00\00\00\0e\00\00\00+\00a\00+\00b\00+\00c\00+") - (data (i32.const 14604) "\1c") - (data (i32.const 14616) "\01\00\00\00\n\00\00\00a\00b\00c\00d\00e") - (data (i32.const 14636) "\1c") - (data (i32.const 14648) "\01\00\00\00\06\00\00\00-\00-\00-") - (data (i32.const 14668) ",") - (data (i32.const 14680) "\01\00\00\00\0e\00\00\00-\00-\00-\00b\00c\00d\00e") - (data (i32.const 14716) "\1c") - (data (i32.const 14728) "\01\00\00\00\n\00\00\00-\00-\00-\00-\00-") - (data (i32.const 14748) "\1c") - (data (i32.const 14760) "\01\00\00\00\08\00\00\00-\00-\00-\00-") - (data (i32.const 14780) ",") - (data (i32.const 14792) "\01\00\00\00\18\00\00\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-") - (data (i32.const 14828) "\1c") - (data (i32.const 14840) "\01\00\00\00\08\00\00\00-\00-\00-\00a") - (data (i32.const 14860) ",") - (data (i32.const 14872) "\01\00\00\00\1c\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n") - (data (i32.const 14908) "\1c") - (data (i32.const 14920) "\01\00\00\00\02\00\00\00n") - (data (i32.const 14940) "\1c") - (data (i32.const 14952) "\01\00\00\00\n\00\00\00j\00k\00l\00m\00n") - (data (i32.const 14972) "\1c") - (data (i32.const 14984) "\01\00\00\00\n\00\00\00c\00d\00e\00f\00g") - (data (i32.const 15004) "\1c") - (data (i32.const 15016) "\01\00\00\00\n\00\00\00d\00e\00f\00g\00h") - (data (i32.const 15036) ",") - (data (i32.const 15048) "\01\00\00\00\1a\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m") - (data (i32.const 15084) ",") - (data (i32.const 15096) "\01\00\00\00\0e\00\00\00c\00d\00e\00f\00g\00h\00i") - (data (i32.const 15132) "\1c") - (data (i32.const 15144) "\01\00\00\00\06\00\00\00e\00f\00g") - (data (i32.const 15164) "\1c") - (data (i32.const 15176) "\01\00\00\00\08\00\00\00e\00f\00g\00h") - (data (i32.const 15196) "\1c") - (data (i32.const 15208) "\01\00\00\00\02\00\00\00d") - (data (i32.const 15228) ",") - (data (i32.const 15240) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 15276) "|") - (data (i32.const 15288) "\01\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y") - (data (i32.const 15404) "\1c") - (data (i32.const 15416) "\01\00\00\00\n\00\00\00a\00,\00b\00,\00c") - (data (i32.const 15436) ",") - (data (i32.const 15448) "\01\00\00\00\0e\00\00\00a\00,\00 \00b\00,\00 \00c") - (data (i32.const 15484) "\1c") - (data (i32.const 15496) "\01\00\00\00\04\00\00\00,\00 ") - (data (i32.const 15516) "\1c") - (data (i32.const 15528) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00,\00c") - (data (i32.const 15548) "\1c") - (data (i32.const 15560) "\01\00\00\00\0c\00\00\00,\00a\00,\00b\00,\00c") - (data (i32.const 15580) "\1c") - (data (i32.const 15592) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00c\00,") - (data (i32.const 15612) "|") - (data (i32.const 15624) "\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") - (data (i32.const 15740) "<") - (data (i32.const 15752) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") + (data (i32.const 4524) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\001\00.") + (data (i32.const 4556) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\00.\000\000") + (data (i32.const 4588) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\00e\00-\005") + (data (i32.const 4620) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00-\001\00e\00-\005") + (data (i32.const 4652) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00-\000\00.\003\00e\00-\002\002") + (data (i32.const 4700) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\000\00.\003\00e\00+\002\002") + (data (i32.const 4748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\00e\00-\001") + (data (i32.const 4780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\000\00.\001\00e\00-\000") + (data (i32.const 4812) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\001") + (data (i32.const 4844) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00.\002\005") + (data (i32.const 4876) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\001\00.\00e\00+\003\00a") + (data (i32.const 4908) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\001\00.\000\00e\00-\001\000") + (data (i32.const 4956) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\001\00.\000\00e\00-\003\000") + (data (i32.const 5004) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\001\00.\000\00e\00-\003\002\003") + (data (i32.const 5052) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\001\00.\000\00e\00-\003\002\004") + (data (i32.const 5100) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\001\00e\00+\003\000\008") + (data (i32.const 5132) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\001\00e\00+\003\000\009") + (data (i32.const 5164) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\001\00.\000\00e\00-\001\00_\000") + (data (i32.const 5212) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\001\00.\000\00e\00-\001\000\00_\000") + (data (i32.const 5260) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\001\00.\000\00e\00+\001\00_\000") + (data (i32.const 5308) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\00_\000") + (data (i32.const 5340) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\00_\001") + (data (i32.const 5372) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\001\000\00.\000\000\00_\000\001\00e\002") + (data (i32.const 5420) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\001\002\003\004\005\006\007\008\009\00_\004") + (data (i32.const 5468) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\001\00_\000\001\002\003\004\005\006\007\008\009") + (data (i32.const 5516) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\001\00e\00-\006\000") + (data (i32.const 5548) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\00e\006\000") + (data (i32.const 5580) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\001\002\003\00.\004\00e") + (data (i32.const 5612) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00-\00.\000\000\000\000\000") + (data (i32.const 5660) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\001\00x") + (data (i32.const 5692) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00-\001\001\00e\00-\001\00s\00t\00r\00i\00n\00g") + (data (i32.const 5740) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\000\001\00e\001\00s\00t\00r\00i\00n\00g") + (data (i32.const 5788) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\000\001\000\00s\00t\00r\00i\00n\00g") + (data (i32.const 5836) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00+\00.\002\002\00e\00-\001") + (data (i32.const 5884) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\001\001\00.\00s\001") + (data (i32.const 5916) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00x\005") + (data (i32.const 5948) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00x\00D") + (data (i32.const 5980) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00\0b\001\00.\001") + (data (i32.const 6012) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00\0b\00\0b\00-\001\00.\001") + (data (i32.const 6044) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00\0c\00\0c\00-\001\00.\001") + (data (i32.const 6076) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00( ( -\001\00.\001") + (data (i32.const 6108) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00) ) -\001\00.\001") + (data (i32.const 6140) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\000\000\000\000\000") + (data (i32.const 6172) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\000\000\000\000\00a") + (data (i32.const 6204) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\000\000\000\000\001") + (data (i32.const 6236) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\000\000\00.\000\000") + (data (i32.const 6268) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\000\000\00.\000\00a") + (data (i32.const 6300) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\00e\001\00e") + (data (i32.const 6332) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\001\00e\00+\000\000\000\001") + (data (i32.const 6380) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\000\00e\00+\001\000\000") + (data (i32.const 6412) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\001\00.\00-\001\00.") + (data (i32.const 6444) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\001\00e\00-\001\00.\002") + (data (i32.const 6476) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\00e\00x") + (data (i32.const 6508) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\00e\001\00x") + (data (i32.const 6540) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\00e\00-\00x") + (data (i32.const 6572) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\001\00e\00-\001\00x") + (data (i32.const 6604) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\000\00.\001\00e\00-\001\00x") + (data (i32.const 6652) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\000\00.") + (data (i32.const 6684) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00.\000\000") + (data (i32.const 6716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00.\000\00.") + (data (i32.const 6748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00.\001\00.") + (data (i32.const 6780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\00.") + (data (i32.const 6812) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\00a") + (data (i32.const 6844) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\00.\00.\001") + (data (i32.const 6876) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\000\00.\001\00.\001") + (data (i32.const 6908) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\000\00.\00 \001") + (data (i32.const 6940) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00+\000\00.\000") + (data (i32.const 6972) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00-\000\00.\000") + (data (i32.const 7004) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00+\000") + (data (i32.const 7036) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00-\00-\000") + (data (i32.const 7068) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00+\00+\000") + (data (i32.const 7100) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00.\00a") + (data (i32.const 7132) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00.\00.\000") + (data (i32.const 7164) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00.") + (data (i32.const 7196) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00.\00.") + (data (i32.const 7228) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N") + (data (i32.const 7260) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\0b") + (data (i32.const 7292) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\0e\18") + (data (i32.const 7324) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00\0e\181\00.\001") + (data (i32.const 7356) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00\0e\18\0e\181\00.\001") + (data (i32.const 7388) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\0c") + (data (i32.const 7420) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00t\00r\00u\00e") + (data (i32.const 7452) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00f\00a\00l\00s\00e") + (data (i32.const 7484) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\00e\002\002") + (data (i32.const 7516) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\001\00e\00-\002\002") + (data (i32.const 7548) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\00e\002\003") + (data (i32.const 7580) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\001\00e\00-\002\003") + (data (i32.const 7612) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\00e\003\007") + (data (i32.const 7644) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\001\00e\00-\003\007") + (data (i32.const 7676) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\00e\003\008") + (data (i32.const 7708) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\001\00e\00-\003\008") + (data (i32.const 7740) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00*\00\00\002\00.\002\002\000\004\004\006\000\004\009\002\005\000\003\001\003\00e\00-\001\006") + (data (i32.const 7804) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00.\00\00\001\00.\007\009\007\006\009\003\001\003\004\008\006\002\003\001\005\007\00e\00+\003\000\008") + (data (i32.const 7884) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\005\00e\00-\003\002\004") + (data (i32.const 7916) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\000\00.\000\000\000\000\000\001\00e\00+\003\001\004") + (data (i32.const 7964) "\8c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00|\00\00\000\00.\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\00e\00+\005\006") + (data (i32.const 8108) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00+\001\00E\00-\003\002\005") + (data (i32.const 8156) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00+\001\00E\00+\003\000\009") + (data (i32.const 8204) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00-\001\00E\00-\003\002\005") + (data (i32.const 8252) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00-\001\00E\00+\003\000\009") + (data (i32.const 8300) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\001\00e\00-\001\000\000\000\000\000\000") + (data (i32.const 8348) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\001\00e\00+\001\000\000\000\000\000\000") + (data (i32.const 8396) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\001\00.\00e\003\006\000") + (data (i32.const 8428) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00 \00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 8476) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00+\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 8524) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 8572) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00x") + (data (i32.const 8620) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00+\001") + (data (i32.const 8668) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00I\00n\00f\00i") + (data (i32.const 8700) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00+\00I\00n\00f\00i\00n\00i\00t") + (data (i32.const 8748) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00i\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 8796) "\bc\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\aa\00\00\00.\002\004\007\000\003\002\008\002\002\009\002\000\006\002\003\002\007\002\000\008\008\002\008\004\003\009\006\004\003\004\001\001\000\006\008\006\001\008\002\005\002\009\009\000\001\003\000\007\001\006\002\003\008\002\002\001\002\007\009\002\008\004\001\002\005\000\003\003\007\007\005\003\006\003\005\001\000\004\003\00e\00-\003\002\003") + (data (i32.const 8988) "\bc\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\aa\00\00\00.\007\004\001\000\009\008\004\006\008\007\006\001\008\006\009\008\001\006\002\006\004\008\005\003\001\008\009\003\000\002\003\003\002\000\005\008\005\004\007\005\008\009\007\000\003\009\002\001\004\008\007\001\004\006\006\003\008\003\007\008\005\002\003\007\005\001\000\001\003\002\006\000\009\000\005\003\001\003\002\00e\00-\003\002\003") + (data (i32.const 9180) "\bc\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\aa\00\00\00.\002\002\002\005\000\007\003\008\005\008\005\000\007\002\000\001\006\003\000\001\002\003\000\005\005\006\003\007\009\005\005\006\007\006\001\005\002\005\000\003\006\001\002\004\001\004\005\007\003\000\001\008\000\001\003\000\008\003\002\002\008\007\002\004\000\004\009\005\008\006\006\004\007\006\000\006\007\006\000\00e\00-\003\000\007") + (data (i32.const 9372) "\9c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\88\00\00\001\007\009\007\006\009\003\001\003\004\008\006\002\003\001\005\008\000\007\009\003\007\002\008\009\007\001\004\000\005\003\000\003\004\001\005\000\007\009\009\003\004\001\003\002\007\001\000\000\003\007\008\002\006\009\003\006\001\007\003\007\007\008\009\008\000\004\004") + (data (i32.const 9532) "\9c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\88\00\00\004\009\006\008\002\009\002\007\006\004\007\005\000\009\004\006\006\004\009\000\001\007\009\007\007\005\008\007\002\000\007\000\009\006\003\003\000\002\008\006\004\001\006\006\009\002\008\008\007\009\001\000\009\004\006\005\005\005\005\004\007\008\005\001\009\004\000\004") + (data (i32.const 9692) "\9c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\88\00\00\000\002\006\003\000\006\005\007\004\008\008\006\007\001\005\000\005\008\002\000\006\008\001\009\000\008\009\000\002\000\000\000\007\000\008\003\008\003\006\007\006\002\007\003\008\005\004\008\004\005\008\001\007\007\001\001\005\003\001\007\006\004\004\007\005\007\003\000") + (data (i32.const 9852) "\9c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\88\00\00\002\007\000\000\006\009\008\005\005\005\007\001\003\006\006\009\005\009\006\002\002\008\004\002\009\001\004\008\001\009\008\006\000\008\003\004\009\003\006\004\007\005\002\009\002\007\001\009\000\007\004\001\006\008\004\004\004\003\006\005\005\001\000\007\000\004\003\004") + (data (i32.const 10012) "\9c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\88\00\00\002\007\001\001\005\005\009\006\009\009\005\000\008\000\009\003\000\004\002\008\008\000\001\007\007\009\000\004\001\007\004\004\009\007\007\009\001\00.\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009\009") + (data (i32.const 10172) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\\\00\00\000\00.\009\007\005\003\005\003\001\008\008\008\007\009\009\005\000\002\006\001\003\008\000\007\001\003\005\002\007\006\001\004\007\001\006\004\004\000\004\003\009\00e\00-\001\000\003") + (data (i32.const 10284) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\00.\005\009\006\001\008\006\000\003\004\008\001\003\001\008\000\007\000\009\001\008\006\001\000\000\002\002\006\006\004\005\003\009\004\001\009\005\000\004\002\008\00e\000\000") + (data (i32.const 10396) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\001\00.\008\001\005\000\001\003\001\006\009\002\001\008\000\003\008\007\002\009\008\008\007\004\006\000\008\009\008\007\003\003\005\002\006\009\005\007\004\004\002\00e\00-\001") + (data (i32.const 10508) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\004\002\00.\000\007\000\008\002\003\005\007\005\003\004\004\005\003\006\000\000\006\008\001\006\001\008\006\008\005\006\008\002\002\005\007\005\009\000\007\007\002\00e\00-\002") + (data (i32.const 10620) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\006\006\005\00.\004\006\008\006\003\000\006\005\001\006\002\006\001\004\005\006\003\002\008\009\007\003\002\002\005\005\007\009\008\003\003\004\007\000\008\001\006\00e\00-\003") + (data (i32.const 10732) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\006\001\000\001\00.\008\005\002\009\002\002\009\007\000\008\006\008\006\002\001\007\008\006\006\009\000\004\009\005\004\008\005\004\004\009\008\003\001\007\005\003\00e\00-\004") + (data (i32.const 10844) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\007\006\009\006\006\00.\009\005\002\000\008\002\003\006\009\006\008\000\007\007\008\004\009\004\006\004\003\004\008\008\007\005\004\007\001\001\005\008\005\004\009\00e\00-\005") + (data (i32.const 10956) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\002\005\000\005\000\006\00.\005\003\002\002\002\002\008\006\008\002\004\009\006\001\003\002\006\000\004\008\000\007\002\002\002\009\002\003\007\000\002\003\000\004\00e\00-\006") + (data (i32.const 11068) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\002\007\004\000\000\003\007\00.\002\003\000\002\002\008\000\000\005\003\002\005\008\005\002\004\002\004\006\009\007\006\009\008\003\003\001\001\007\007\003\007\007\00e\00-\007") + (data (i32.const 11180) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\002\000\007\002\003\000\009\003\00.\005\000\000\004\009\007\004\002\006\004\005\009\004\001\005\002\009\002\006\008\007\001\005\004\002\008\003\002\004\004\009\000\00e\00-\008") + (data (i32.const 11292) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\000\00.\007\009\000\000\002\008\000\002\003\008\000\008\001\006\000\004\009\005\006\002\002\006\000\001\001\000\004\007\004\006\000\002\003\008\007\004\008\009\001\002\00e\001") + (data (i32.const 11404) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\000\00.\009\008\002\002\008\006\000\006\005\003\007\003\007\002\009\006\008\004\008\001\009\000\005\005\008\004\004\008\007\006\000\004\006\005\008\006\003\005\009\007\00e\002") + (data (i32.const 11516) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\000\00.\007\004\006\008\009\004\009\007\002\003\001\009\000\003\007\000\008\000\009\004\000\005\005\007\000\005\006\000\001\006\000\004\000\005\003\002\004\008\006\009\00e\003") + (data (i32.const 11628) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\000\00.\001\006\003\000\002\006\008\003\002\000\002\008\002\007\002\008\004\007\005\009\008\000\004\005\009\008\004\004\002\007\001\000\003\001\007\005\001\006\006\005\00e\004") + (data (i32.const 11740) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\000\00.\004\006\003\007\001\006\008\006\002\009\007\001\009\001\007\000\006\009\005\001\000\009\009\001\008\007\006\009\006\004\005\004\009\002\000\002\002\000\008\008\00e\005") + (data (i32.const 11852) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\000\00.\006\005\003\007\008\000\005\009\004\004\004\009\007\007\001\001\005\005\004\002\000\009\004\006\001\006\008\006\004\001\005\008\007\002\000\006\007\005\002\003\00e\006") + (data (i32.const 11964) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\000\00.\002\003\004\006\003\002\004\003\005\006\005\000\002\004\003\007\000\004\005\002\001\002\002\003\000\007\001\003\009\006\000\004\005\007\006\007\006\005\003\001\00e\006") + (data (i32.const 12076) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\000\00.\009\007\000\009\004\008\001\007\001\006\004\002\000\000\004\008\003\004\001\008\009\007\002\005\008\009\008\000\004\005\004\002\009\008\002\000\005\002\007\008\00e\008") + (data (i32.const 12188) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00X\00\00\000\00.\004\009\009\006\009\000\008\005\002\002\000\005\001\008\007\004\001\001\000\007\007\009\009\008\002\003\005\004\009\003\002\004\009\009\004\009\009\006\000\002\00e\009") + (data (i32.const 12300) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00Z\00\00\000\00.\007\009\002\005\002\000\001\002\000\000\005\005\007\002\004\005\008\006\001\009\004\004\000\001\001\002\006\007\000\004\001\007\008\007\005\000\005\001\004\009\00e\002\002") + (data (i32.const 12412) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00Z\00\00\000\00.\006\000\009\006\005\006\004\005\008\005\009\008\003\001\007\007\004\000\008\009\003\004\003\005\002\005\007\000\002\001\003\003\007\007\004\007\005\007\003\009\00e\003\000") + (data (i32.const 12524) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00Z\00\00\000\00.\004\008\000\000\004\001\006\001\001\007\004\007\007\000\002\008\007\008\007\008\007\004\003\006\000\002\000\005\000\002\003\005\004\009\004\009\007\001\002\008\00e\006\007") + (data (i32.const 12636) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\\\00\00\000\00.\008\005\002\004\008\002\009\000\007\009\008\001\007\009\006\008\002\002\004\008\003\000\003\003\007\009\003\001\000\005\002\007\008\001\006\004\001\004\008\003\00e\001\000\005") + (data (i32.const 12748) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\\\00\00\000\00.\000\003\002\007\001\002\003\009\002\009\001\007\000\009\007\008\002\001\001\005\004\004\007\000\006\009\003\007\002\007\004\008\009\005\006\000\008\004\002\005\00e\002\006\009") + (data (i32.const 12860) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00 \00\t\00\n") + (data (i32.const 12892) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00 \00\t\00\n\00\0d\00.\001") + (data (i32.const 12924) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00b") + (data (i32.const 12956) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00a\00b") + (data (i32.const 12988) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00k\00e\00y\001") + (data (i32.const 13020) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00k\00e\00y\002") + (data (i32.const 13052) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00k\00e\001") + (data (i32.const 13084) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00k\00e\002") + (data (i32.const 13116) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00k\00e\00y\001\002") + (data (i32.const 13148) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00k\00e\00y\001\001") + (data (i32.const 13180) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00\a40\ed0\cf0\cb0\db0\d80\c80") + (data (i32.const 13228) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00\a60\f00\ce0\aa0\af0\e40\de0") + (data (i32.const 13276) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00D\00\19 f\00h\00u\00a\00s\00c\00a\00i\00l") + (data (i32.const 13324) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00D\00\19 \1f\1eu\00a\00s\00c\00a\00i\00l") + (data (i32.const 13372) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00b\00a") + (data (i32.const 13404) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00a\00a") + (data (i32.const 13436) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\001\000") + (data (i32.const 13468) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\001\001") + (data (i32.const 13500) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\000\001") + (data (i32.const 13532) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\002\002") + (data (i32.const 13564) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\002\003\004") + (data (i32.const 13596) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\002\003\003") + (data (i32.const 13628) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") + (data (i32.const 13676) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00a\00a") + (data (i32.const 13708) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00a\00b\00a\00b\00a\00b\00a\00b") + (data (i32.const 13756) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00a\00a\00a\00a") + (data (i32.const 13788) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00a\00a\00a\00a\00a\00a") + (data (i32.const 13820) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00a\00a\00a\00a\00a\00a\00a") + (data (i32.const 13868) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00-\00b\00-\00c") + (data (i32.const 13900) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00+\00b\00-\00c") + (data (i32.const 13932) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00+\00a\00b\00c") + (data (i32.const 13964) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00\n\00a\00b\00c") + (data (i32.const 13996) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\n") + (data (i32.const 14028) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00c") + (data (i32.const 14060) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00+\00+") + (data (i32.const 14092) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00b\00+\00+") + (data (i32.const 14124) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00a\00b\00c\00a\00b\00c\00a\00b\00c") + (data (i32.const 14172) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00+\00+\00+") + (data (i32.const 14204) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00a\00b\00c\00a\00b\00c\00a") + (data (i32.const 14252) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00+\00+\00+\00b\00c\00+\00+\00+\00b\00c\00+\00+\00+") + (data (i32.const 14300) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00+\00+\00c\00+\00+\00c") + (data (i32.const 14332) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00c\00c\00c\00c") + (data (i32.const 14364) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00c\00c") + (data (i32.const 14396) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00+\00+\00+\00+") + (data (i32.const 14428) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00e") + (data (i32.const 14460) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00b\00c") + (data (i32.const 14492) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00a\00+") + (data (i32.const 14524) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00+\00b\00+\00c") + (data (i32.const 14556) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00+\00a\00+\00b\00+\00c\00+") + (data (i32.const 14604) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00b\00c\00d\00e") + (data (i32.const 14636) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00-\00-\00-") + (data (i32.const 14668) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00-\00-\00-\00b\00c\00d\00e") + (data (i32.const 14716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00-\00-\00-\00-\00-") + (data (i32.const 14748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00-\00-\00-\00-") + (data (i32.const 14780) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-") + (data (i32.const 14828) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00-\00-\00-\00a") + (data (i32.const 14860) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n") + (data (i32.const 14908) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00n") + (data (i32.const 14940) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00j\00k\00l\00m\00n") + (data (i32.const 14972) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00c\00d\00e\00f\00g") + (data (i32.const 15004) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00d\00e\00f\00g\00h") + (data (i32.const 15036) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m") + (data (i32.const 15084) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00c\00d\00e\00f\00g\00h\00i") + (data (i32.const 15132) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00e\00f\00g") + (data (i32.const 15164) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00e\00f\00g\00h") + (data (i32.const 15196) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00d") + (data (i32.const 15228) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 15276) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y") + (data (i32.const 15404) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00,\00b\00,\00c") + (data (i32.const 15436) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00a\00,\00 \00b\00,\00 \00c") + (data (i32.const 15484) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00,\00 ") + (data (i32.const 15516) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00a\00,\00b\00,\00,\00c") + (data (i32.const 15548) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00,\00a\00,\00b\00,\00c") + (data (i32.const 15580) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00a\00,\00b\00,\00c\00,") + (data (i32.const 15612) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") + (data (i32.const 15740) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") (data (i32.const 15804) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 16204) "\1c\04") - (data (i32.const 16216) "\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") - (data (i32.const 17260) "\\") - (data (i32.const 17272) "\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") - (data (i32.const 17356) "\1c") - (data (i32.const 17368) "\01\00\00\00\02\00\00\008") - (data (i32.const 17388) "\1c") - (data (i32.const 17400) "\01\00\00\00\04\00\00\001\002") - (data (i32.const 17420) "\1c") - (data (i32.const 17432) "\01\00\00\00\n\00\00\00-\001\000\000\000") - (data (i32.const 17452) "\1c") - (data (i32.const 17464) "\01\00\00\00\n\00\00\001\002\003\004\005") - (data (i32.const 17484) "\1c") - (data (i32.const 17496) "\01\00\00\00\0c\00\00\001\002\003\004\005\006") - (data (i32.const 17516) ",") - (data (i32.const 17528) "\01\00\00\00\0e\00\00\001\001\001\001\001\001\001") - (data (i32.const 17564) ",") - (data (i32.const 17576) "\01\00\00\00\0e\00\00\001\002\003\004\005\006\007") - (data (i32.const 17612) ",") - (data (i32.const 17624) "\01\00\00\00\10\00\00\001\002\003\004\005\006\007\008") - (data (i32.const 17660) ",") - (data (i32.const 17672) "\01\00\00\00\12\00\00\001\002\003\004\005\006\007\008\009") - (data (i32.const 17708) ",") - (data (i32.const 17720) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\006") - (data (i32.const 17756) ",") - (data (i32.const 17768) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\007") - (data (i32.const 17804) ",") - (data (i32.const 17816) "\01\00\00\00\16\00\00\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 17852) "\1c") - (data (i32.const 17864) "\01\00\00\00\04\00\00\00-\001") - (data (i32.const 17884) "\1c") - (data (i32.const 17896) "\01\00\00\00\08\00\00\001\000\000\000") - (data (i32.const 17916) ",") - (data (i32.const 17928) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 17964) ",") - (data (i32.const 17976) "\01\00\00\00\14\00\00\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 18012) "\1c") - (data (i32.const 18024) "\01\00\00\00\04\00\00\007\00b") - (data (i32.const 18044) "\1c") - (data (i32.const 18056) "\01\00\00\00\06\00\00\004\00d\002") - (data (i32.const 18076) "\1c") - (data (i32.const 18088) "\01\00\00\00\08\00\00\003\000\003\009") - (data (i32.const 18108) "\1c") - (data (i32.const 18120) "\01\00\00\00\n\00\00\001\00e\002\004\000") - (data (i32.const 18140) "\1c") - (data (i32.const 18152) "\01\00\00\00\0c\00\00\001\000\00f\004\004\007") - (data (i32.const 18172) "\1c") - (data (i32.const 18184) "\01\00\00\00\0c\00\00\001\002\00d\006\008\007") - (data (i32.const 18204) "\1c") - (data (i32.const 18216) "\01\00\00\00\0c\00\00\00b\00c\006\001\004\00e") - (data (i32.const 18236) ",") - (data (i32.const 18248) "\01\00\00\00\0e\00\00\007\005\00b\00c\00d\001\005") - (data (i32.const 18284) ",") - (data (i32.const 18296) "\01\00\00\00\10\00\00\007\00f\00f\00f\00f\00f\00f\00e") - (data (i32.const 18332) ",") - (data (i32.const 18344) "\01\00\00\00\10\00\00\007\00f\00f\00f\00f\00f\00f\00f") - (data (i32.const 18380) ",") - (data (i32.const 18392) "\01\00\00\00\10\00\00\008\000\000\000\000\000\000\000") - (data (i32.const 18428) ",") - (data (i32.const 18440) "\01\00\00\00\10\00\00\00f\00f\00f\00f\00f\00f\00f\00f") - (data (i32.const 18476) ",") - (data (i32.const 18488) "\01\00\00\00\12\00\00\00-\007\00f\00f\00f\00f\00f\00f\00f") - (data (i32.const 18524) ",") - (data (i32.const 18536) "\01\00\00\00\10\00\00\00-\00f\00f\00f\00f\00f\00f\00f") - (data (i32.const 18572) ",") - (data (i32.const 18584) "\01\00\00\00\12\00\00\00-\008\000\000\000\000\000\000\000") - (data (i32.const 18620) "\1c") - (data (i32.const 18632) "\01\00\00\00\06\00\00\001\001\001") - (data (i32.const 18652) "\1c") - (data (i32.const 18664) "\01\00\00\00\08\00\00\001\001\001\000") - (data (i32.const 18684) "\1c") - (data (i32.const 18696) "\01\00\00\00\n\00\00\001\001\001\000\001") - (data (i32.const 18716) "\1c") - (data (i32.const 18728) "\01\00\00\00\0c\00\00\001\001\001\000\001\001") - (data (i32.const 18748) ",") - (data (i32.const 18760) "\01\00\00\00\18\00\00\001\001\001\001\001\001\001\001\001\001\001\001") - (data (i32.const 18796) "L") - (data (i32.const 18808) "\01\00\00\002\00\00\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001") - (data (i32.const 18876) "\\") - (data (i32.const 18888) "\01\00\00\00@\00\00\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\000\001\000\000") - (data (i32.const 18972) "\\") - (data (i32.const 18984) "\01\00\00\00@\00\00\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\000\000") - (data (i32.const 19068) "\\") - (data (i32.const 19080) "\01\00\00\00@\00\00\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\000") - (data (i32.const 19164) "\\") - (data (i32.const 19176) "\01\00\00\00@\00\00\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001") - (data (i32.const 19260) ",") - (data (i32.const 19272) "\01\00\00\00\18\00\00\00-\001\001\001\001\001\001\001\001\001\001\001") - (data (i32.const 19308) "<") - (data (i32.const 19320) "\01\00\00\00*\00\00\001\000\002\000\000\002\000\002\002\002\000\001\002\002\001\001\001\001\002\001\000") - (data (i32.const 19372) "<") - (data (i32.const 19384) "\01\00\00\00 \00\00\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003") - (data (i32.const 19436) ",") - (data (i32.const 19448) "\01\00\00\00\1c\00\00\003\002\002\004\004\000\000\002\004\002\003\001\004\000") - (data (i32.const 19484) ",") - (data (i32.const 19496) "\01\00\00\00\16\00\00\003\007\007\007\007\007\007\007\007\007\007") - (data (i32.const 19532) ",") - (data (i32.const 19544) "\01\00\00\00\14\00\00\001\009\000\004\004\004\000\005\005\003") - (data (i32.const 19580) ",") - (data (i32.const 19592) "\01\00\00\00\12\00\00\001\00a\002\000\00d\00c\00d\008\000") - (data (i32.const 19628) ",") - (data (i32.const 19640) "\01\00\00\00\10\00\00\00a\007\00f\00f\00d\00a\009\000") - (data (i32.const 19676) ",") - (data (i32.const 19688) "\01\00\00\00\10\00\00\002\008\001\00d\005\005\00i\003") - (data (i32.const 19724) ",") - (data (i32.const 19736) "\01\00\00\00\0e\00\00\00b\002\008\00j\00p\00d\00l") - (data (i32.const 19772) ",") - (data (i32.const 19784) "\01\00\00\00\0e\00\00\003\00v\00v\00v\00v\00v\00v") - (data (i32.const 19820) ",") - (data (i32.const 19832) "\01\00\00\00\0e\00\00\001\00z\001\004\001\00z\003") - (data (i32.const 19868) ",") - (data (i32.const 19880) "\01\00\00\00\10\00\00\009\009\009\009\009\009\009\009") - (data (i32.const 19916) ",") - (data (i32.const 19928) "\01\00\00\00\12\00\00\001\000\000\000\000\000\000\000\000") - (data (i32.const 19964) ",") - (data (i32.const 19976) "\01\00\00\00\14\00\00\004\002\009\004\009\006\007\002\009\007") - (data (i32.const 20012) ",") - (data (i32.const 20024) "\01\00\00\00\16\00\00\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 20060) ",") - (data (i32.const 20072) "\01\00\00\00\18\00\00\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 20108) ",") - (data (i32.const 20120) "\01\00\00\00\1a\00\00\008\006\008\007\001\009\004\007\006\007\003\005\000") - (data (i32.const 20156) ",") - (data (i32.const 20168) "\01\00\00\00\1c\00\00\008\006\008\007\001\009\004\007\006\007\003\005\000\001") - (data (i32.const 20204) "<") - (data (i32.const 20216) "\01\00\00\00\1e\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 20268) "<") - (data (i32.const 20280) "\01\00\00\00 \00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 20332) "<") - (data (i32.const 20344) "\01\00\00\00\"\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 20396) "<") - (data (i32.const 20408) "\01\00\00\00$\00\00\001\002\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 20460) "<") - (data (i32.const 20472) "\01\00\00\00&\00\00\001\002\003\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 20524) "<") - (data (i32.const 20536) "\01\00\00\00(\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005") - (data (i32.const 20588) "\1c") - (data (i32.const 20600) "\01\00\00\00\n\00\00\00-\001\002\003\004") - (data (i32.const 20620) ",") - (data (i32.const 20632) "\01\00\00\00\16\00\00\00-\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 20668) ",") - (data (i32.const 20680) "\01\00\00\00\18\00\00\00-\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 20716) ",") - (data (i32.const 20728) "\01\00\00\00\1a\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 20764) "<") - (data (i32.const 20776) "\01\00\00\00 \00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 20828) "<") - (data (i32.const 20840) "\01\00\00\00$\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 20892) "<") - (data (i32.const 20904) "\01\00\00\00&\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007") - (data (i32.const 20956) "<") - (data (i32.const 20968) "\01\00\00\00(\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008") - (data (i32.const 21020) ",") - (data (i32.const 21032) "\01\00\00\00\12\00\00\001\00f\00f\00f\00f\00f\00f\00f\00f") - (data (i32.const 21068) ",") - (data (i32.const 21080) "\01\00\00\00\16\00\00\005\006\007\008\009\00a\00b\00c\00d\00e\001") - (data (i32.const 21116) ",") - (data (i32.const 21128) "\01\00\00\00\18\00\00\004\005\006\007\008\009\00a\00b\00c\00d\00e\001") - (data (i32.const 21164) ",") - (data (i32.const 21176) "\01\00\00\00\1a\00\00\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f") - (data (i32.const 21212) ",") - (data (i32.const 21224) "\01\00\00\00\1c\00\00\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f") - (data (i32.const 21260) "<") - (data (i32.const 21272) "\01\00\00\00\1e\00\00\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f") - (data (i32.const 21324) "<") - (data (i32.const 21336) "\01\00\00\00 \00\00\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\000") - (data (i32.const 21388) "<") - (data (i32.const 21400) "\01\00\00\00 \00\00\007\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f") - (data (i32.const 21452) "<") - (data (i32.const 21464) "\01\00\00\00 \00\00\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f") - (data (i32.const 21516) "<") - (data (i32.const 21528) "\01\00\00\00\"\00\00\00-\007\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f") - (data (i32.const 21580) "<") - (data (i32.const 21592) "\01\00\00\00\"\00\00\00-\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000") - (data (i32.const 21644) "|") - (data (i32.const 21656) "\01\00\00\00b\00\00\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001") - (data (i32.const 21772) "\9c") - (data (i32.const 21784) "\01\00\00\00\80\00\00\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001") - (data (i32.const 21932) "\\") - (data (i32.const 21944) "\01\00\00\00D\00\00\00-\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001") - (data (i32.const 22028) "l") - (data (i32.const 22040) "\01\00\00\00R\00\00\001\001\001\001\002\002\002\000\000\002\002\001\002\002\001\002\000\001\000\001\002\001\001\000\002\000\001\002\000\002\001\000\002\001\000\002\001\001\002\002\000") - (data (i32.const 22140) "\\") - (data (i32.const 22152) "\01\00\00\00@\00\00\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003") - (data (i32.const 22236) "L") - (data (i32.const 22248) "\01\00\00\008\00\00\002\002\001\004\002\002\000\003\000\003\001\001\004\004\000\000\004\002\004\001\002\001\001\002\002\004\003\000") - (data (i32.const 22316) "<") - (data (i32.const 22328) "\01\00\00\00,\00\00\001\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007") - (data (i32.const 22380) "<") - (data (i32.const 22392) "\01\00\00\00&\00\00\003\003\005\005\000\000\005\001\006\00a\004\002\009\000\007\001\002\008\004") - (data (i32.const 22444) "<") - (data (i32.const 22456) "\01\00\00\00\"\00\00\002\00c\001\00d\005\006\00b\006\004\008\00c\006\00c\00d\001\001\000") - (data (i32.const 22508) "<") - (data (i32.const 22520) "\01\00\00\00 \00\00\006\007\009\007\009\00g\006\000\00f\005\004\002\008\000\001\000") - (data (i32.const 22572) "<") - (data (i32.const 22584) "\01\00\00\00\1e\00\00\005\00e\008\00g\004\00g\00g\00g\007\00g\005\006\00d\00i\00f") - (data (i32.const 22636) ",") - (data (i32.const 22648) "\01\00\00\00\1c\00\00\004\00e\00o\008\00h\00f\00a\00m\006\00f\00l\00l\00m\00o") - (data (i32.const 22684) ",") - (data (i32.const 22696) "\01\00\00\00\1a\00\00\00f\00v\00v\00v\00v\00v\00v\00v\00v\00v\00v\00v\00v") - (data (i32.const 22732) ",") - (data (i32.const 22744) "\01\00\00\00\1a\00\00\003\00w\005\00e\001\001\002\006\004\00s\00g\00s\00f") - (data (i32.const 22780) "\1c") - (data (i32.const 22792) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 22812) ",") - (data (i32.const 22824) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 16204) "\1c\04\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") + (data (i32.const 17260) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") + (data (i32.const 17356) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\008") + (data (i32.const 17388) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\001\002") + (data (i32.const 17420) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00-\001\000\000\000") + (data (i32.const 17452) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\001\002\003\004\005") + (data (i32.const 17484) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\001\002\003\004\005\006") + (data (i32.const 17516) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\001\001\001\001\001\001\001") + (data (i32.const 17564) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\001\002\003\004\005\006\007") + (data (i32.const 17612) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\001\002\003\004\005\006\007\008") + (data (i32.const 17660) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\001\002\003\004\005\006\007\008\009") + (data (i32.const 17708) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\006") + (data (i32.const 17756) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\007") + (data (i32.const 17804) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00-\002\001\004\007\004\008\003\006\004\008") + (data (i32.const 17852) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00-\001") + (data (i32.const 17884) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\000\000\000") + (data (i32.const 17916) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\008") + (data (i32.const 17964) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\004\002\009\004\009\006\007\002\009\005") + (data (i32.const 18012) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\007\00b") + (data (i32.const 18044) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\004\00d\002") + (data (i32.const 18076) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\003\000\003\009") + (data (i32.const 18108) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\001\00e\002\004\000") + (data (i32.const 18140) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\001\000\00f\004\004\007") + (data (i32.const 18172) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\001\002\00d\006\008\007") + (data (i32.const 18204) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00b\00c\006\001\004\00e") + (data (i32.const 18236) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\007\005\00b\00c\00d\001\005") + (data (i32.const 18284) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\007\00f\00f\00f\00f\00f\00f\00e") + (data (i32.const 18332) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\007\00f\00f\00f\00f\00f\00f\00f") + (data (i32.const 18380) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\008\000\000\000\000\000\000\000") + (data (i32.const 18428) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00f\00f\00f\00f\00f\00f\00f\00f") + (data (i32.const 18476) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\007\00f\00f\00f\00f\00f\00f\00f") + (data (i32.const 18524) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00-\00f\00f\00f\00f\00f\00f\00f") + (data (i32.const 18572) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\008\000\000\000\000\000\000\000") + (data (i32.const 18620) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\001\001") + (data (i32.const 18652) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\001\001\000") + (data (i32.const 18684) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\001\001\001\000\001") + (data (i32.const 18716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\001\001\001\000\001\001") + (data (i32.const 18748) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\001\001\001\001\001\001\001\001\001\001\001\001") + (data (i32.const 18796) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\002\00\00\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001") + (data (i32.const 18876) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00@\00\00\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\000\001\000\000") + (data (i32.const 18972) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00@\00\00\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\000\000") + (data (i32.const 19068) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00@\00\00\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\000") + (data (i32.const 19164) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00@\00\00\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001") + (data (i32.const 19260) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00-\001\001\001\001\001\001\001\001\001\001\001") + (data (i32.const 19308) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00*\00\00\001\000\002\000\000\002\000\002\002\002\000\001\002\002\001\001\001\001\002\001\000") + (data (i32.const 19372) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003") + (data (i32.const 19436) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\003\002\002\004\004\000\000\002\004\002\003\001\004\000") + (data (i32.const 19484) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\003\007\007\007\007\007\007\007\007\007\007") + (data (i32.const 19532) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\001\009\000\004\004\004\000\005\005\003") + (data (i32.const 19580) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\001\00a\002\000\00d\00c\00d\008\000") + (data (i32.const 19628) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00a\007\00f\00f\00d\00a\009\000") + (data (i32.const 19676) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\002\008\001\00d\005\005\00i\003") + (data (i32.const 19724) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00b\002\008\00j\00p\00d\00l") + (data (i32.const 19772) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\003\00v\00v\00v\00v\00v\00v") + (data (i32.const 19820) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\001\00z\001\004\001\00z\003") + (data (i32.const 19868) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\009\009\009\009\009\009\009\009") + (data (i32.const 19916) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\001\000\000\000\000\000\000\000\000") + (data (i32.const 19964) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\004\002\009\004\009\006\007\002\009\007") + (data (i32.const 20012) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\006\008\007\001\009\004\007\006\007\003\005") + (data (i32.const 20060) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\008\006\008\007\001\009\004\007\006\007\003\005") + (data (i32.const 20108) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\008\006\008\007\001\009\004\007\006\007\003\005\000") + (data (i32.const 20156) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\008\006\008\007\001\009\004\007\006\007\003\005\000\001") + (data (i32.const 20204) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") + (data (i32.const 20268) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") + (data (i32.const 20332) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\"\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") + (data (i32.const 20396) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\001\002\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") + (data (i32.const 20460) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\001\002\003\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") + (data (i32.const 20524) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005") + (data (i32.const 20588) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00-\001\002\003\004") + (data (i32.const 20620) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00-\004\002\009\004\009\006\007\002\009\005") + (data (i32.const 20668) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00-\006\008\007\001\009\004\007\006\007\003\005") + (data (i32.const 20716) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005") + (data (i32.const 20764) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") + (data (i32.const 20828) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") + (data (i32.const 20892) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007") + (data (i32.const 20956) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008") + (data (i32.const 21020) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\001\00f\00f\00f\00f\00f\00f\00f\00f") + (data (i32.const 21068) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\005\006\007\008\009\00a\00b\00c\00d\00e\001") + (data (i32.const 21116) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\004\005\006\007\008\009\00a\00b\00c\00d\00e\001") + (data (i32.const 21164) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f") + (data (i32.const 21212) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f") + (data (i32.const 21260) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f") + (data (i32.const 21324) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\000") + (data (i32.const 21388) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\007\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f") + (data (i32.const 21452) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f") + (data (i32.const 21516) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\"\00\00\00-\007\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f\00f") + (data (i32.const 21580) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\"\00\00\00-\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000") + (data (i32.const 21644) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00b\00\00\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001") + (data (i32.const 21772) "\9c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\80\00\00\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001") + (data (i32.const 21932) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00D\00\00\00-\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001") + (data (i32.const 22028) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00R\00\00\001\001\001\001\002\002\002\000\000\002\002\001\002\002\001\002\000\001\000\001\002\001\001\000\002\000\001\002\000\002\001\000\002\001\000\002\001\001\002\002\000") + (data (i32.const 22140) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00@\00\00\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003") + (data (i32.const 22236) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\008\00\00\002\002\001\004\002\002\000\003\000\003\001\001\004\004\000\000\004\002\004\001\002\001\001\002\002\004\003\000") + (data (i32.const 22316) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00,\00\00\001\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007") + (data (i32.const 22380) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\003\003\005\005\000\000\005\001\006\00a\004\002\009\000\007\001\002\008\004") + (data (i32.const 22444) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\"\00\00\002\00c\001\00d\005\006\00b\006\004\008\00c\006\00c\00d\001\001\000") + (data (i32.const 22508) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\006\007\009\007\009\00g\006\000\00f\005\004\002\008\000\001\000") + (data (i32.const 22572) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\005\00e\008\00g\004\00g\00g\00g\007\00g\005\006\00d\00i\00f") + (data (i32.const 22636) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\004\00e\00o\008\00h\00f\00a\00m\006\00f\00l\00l\00m\00o") + (data (i32.const 22684) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00f\00v\00v\00v\00v\00v\00v\00v\00v\00v\00v\00v\00v") + (data (i32.const 22732) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\003\00w\005\00e\001\001\002\006\004\00s\00g\00s\00f") + (data (i32.const 22780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000") + (data (i32.const 22812) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 22920) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8#push (param $0 i32) (param $1 i32) @@ -6794,7 +5278,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 @@ -6822,7 +5306,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 3014704 i32.store @@ -6945,7 +5429,7 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -7143,7 +5627,7 @@ f64.const 347 f64.add local.tee $0 - i32.trunc_f64_s + i32.trunc_sat_f64_s local.tee $7 local.get $0 local.get $7 @@ -7409,15 +5893,9 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $5 - i64.const 0 - i64.store - local.get $5 - i64.const 0 - i64.store offset=8 - local.get $5 - i64.const 0 - i64.store offset=16 + i32.const 0 + i32.const 24 + memory.fill block $folding-inner2 block $folding-inner1 block $folding-inner0 @@ -7595,7 +6073,7 @@ local.get $0 i32.add local.get $10 - call $~lib/memory/memory.copy + memory.copy local.get $6 local.get $7 call $~lib/array/Array<~lib/string/String>#push @@ -7652,7 +6130,7 @@ local.get $0 i32.add local.get $1 - call $~lib/memory/memory.copy + memory.copy local.get $6 local.get $2 call $~lib/array/Array<~lib/string/String>#push @@ -7713,24 +6191,9 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 - local.get $0 - i64.const 0 - i64.store offset=32 - local.get $0 i32.const 0 - i32.store offset=40 + i32.const 44 + memory.fill global.get $std/string/str i32.const 1056 i32.ne @@ -21615,7 +20078,7 @@ local.get $3 local.get $2 local.get $4 - call $~lib/memory/memory.copy + memory.copy end local.get $5 local.get $3 @@ -21797,6 +20260,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -21833,7 +20297,7 @@ i32.shr_u i32.const 1 i32.shl - local.tee $4 + local.tee $5 local.get $1 i32.const 1 i32.shl @@ -21852,60 +20316,74 @@ local.get $1 i32.const 1 call $~lib/rt/itcms/__new - local.tee $5 + local.tee $7 i32.store local.get $3 local.get $1 - local.get $4 + local.get $5 i32.sub - local.tee $6 + local.tee $8 i32.lt_u if + local.get $8 local.get $3 - local.get $6 + local.get $8 i32.const 2 i32.sub local.get $3 i32.div_u - local.tee $1 i32.mul - local.set $7 - local.get $5 - local.get $2 - local.get $3 - local.get $1 - call $~lib/memory/memory.repeat - local.get $5 + local.tee $6 + i32.sub + local.set $1 + loop $while-continue|0 + local.get $4 + local.get $6 + i32.lt_u + if + local.get $4 + local.get $7 + i32.add + local.get $2 + local.get $3 + memory.copy + local.get $3 + local.get $4 + i32.add + local.set $4 + br $while-continue|0 + end + end + local.get $6 local.get $7 i32.add local.get $2 - local.get $6 - local.get $7 - i32.sub - call $~lib/memory/memory.copy + local.get $1 + memory.copy else - local.get $5 + local.get $7 local.get $2 - local.get $6 - call $~lib/memory/memory.copy + local.get $8 + memory.copy end - local.get $5 - local.get $6 + local.get $7 + local.get $8 i32.add local.get $0 - local.get $4 - call $~lib/memory/memory.copy + local.get $5 + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $5 + local.get $7 ) (func $~lib/string/String#padEnd (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) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -21946,7 +20424,7 @@ local.get $1 i32.const 1 i32.shl - local.tee $5 + local.tee $1 i32.gt_u i32.or if @@ -21958,60 +20436,78 @@ return end global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $1 i32.const 1 call $~lib/rt/itcms/__new - local.tee $1 + local.tee $6 i32.store - local.get $1 + local.get $6 local.get $0 local.get $4 - call $~lib/memory/memory.copy + memory.copy local.get $3 - local.get $5 + local.get $1 local.get $4 i32.sub - local.tee $5 + local.tee $0 i32.lt_u if + local.get $0 local.get $3 - local.get $5 + local.get $0 i32.const 2 i32.sub local.get $3 i32.div_u - local.tee $0 i32.mul - local.set $6 - local.get $1 + local.tee $5 + i32.sub + local.set $7 local.get $4 + local.get $6 i32.add - local.tee $4 - local.get $2 - local.get $3 - local.get $0 - call $~lib/memory/memory.repeat + local.set $1 + i32.const 0 + local.set $0 + loop $while-continue|0 + local.get $0 + local.get $5 + i32.lt_u + if + local.get $0 + local.get $1 + i32.add + local.get $2 + local.get $3 + memory.copy + local.get $0 + local.get $3 + i32.add + local.set $0 + br $while-continue|0 + end + end + local.get $5 local.get $4 local.get $6 i32.add + i32.add local.get $2 - local.get $5 - local.get $6 - i32.sub - call $~lib/memory/memory.copy + local.get $7 + memory.copy else - local.get $1 local.get $4 + local.get $6 i32.add local.get $2 - local.get $5 - call $~lib/memory/memory.copy + local.get $0 + memory.copy end global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 + local.get $6 ) (func $~lib/string/String#trimStart (param $0 i32) (result i32) (local $1 i32) @@ -22161,7 +20657,7 @@ local.get $1 i32.add local.get $2 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -22313,7 +20809,7 @@ local.get $2 local.get $0 local.get $1 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -22560,7 +21056,7 @@ local.get $2 i32.add local.get $1 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -22627,13 +21123,13 @@ local.get $4 local.get $0 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.get $4 i32.add local.get $1 local.get $3 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -22643,6 +21139,7 @@ (func $~lib/string/String#repeat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -22670,7 +21167,7 @@ i32.load offset=16 i32.const 1 i32.shr_u - local.tee $2 + local.tee $4 i64.extend_i32_s local.get $1 i64.extend_i32_s @@ -22686,7 +21183,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 0 local.get $1 select @@ -22712,7 +21209,7 @@ end global.get $~lib/memory/__stack_pointer local.get $1 - local.get $2 + local.get $4 i32.mul i32.const 1 i32.shl @@ -22720,13 +21217,31 @@ call $~lib/rt/itcms/__new local.tee $3 i32.store - local.get $3 - local.get $0 - local.get $2 + local.get $1 + local.get $4 i32.const 1 i32.shl - local.get $1 - call $~lib/memory/memory.repeat + local.tee $4 + i32.mul + local.set $1 + loop $while-continue|0 + local.get $1 + local.get $2 + i32.gt_u + if + local.get $2 + local.get $3 + i32.add + local.get $0 + local.get $4 + memory.copy + local.get $2 + local.get $4 + i32.add + local.set $2 + br $while-continue|0 + end + end global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -22828,7 +21343,7 @@ i32.const 1 i32.shl local.tee $7 - call $~lib/memory/memory.copy + memory.copy local.get $4 local.get $7 i32.add @@ -22836,7 +21351,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $5 i32.add @@ -22856,7 +21371,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -22963,7 +21478,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $4 local.set $1 loop $for-loop|0 @@ -22995,7 +21510,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $4 i32.add @@ -23025,7 +21540,7 @@ local.get $5 local.get $0 local.get $3 - call $~lib/memory/memory.copy + memory.copy loop $while-continue|1 local.get $0 local.get $1 @@ -23044,7 +21559,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $3 local.get $8 i32.add @@ -23123,7 +21638,7 @@ local.get $6 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $6 local.get $9 i32.add @@ -23136,7 +21651,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $4 local.get $6 i32.add @@ -23186,7 +21701,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $5 local.get $1 @@ -23325,7 +21840,7 @@ local.get $0 i32.add local.get $2 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -23414,7 +21929,7 @@ local.get $0 i32.add local.get $2 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -23529,7 +22044,7 @@ local.get $4 i32.add local.get $3 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -24933,7 +23448,7 @@ local.get $2 i32.const 22864 local.get $1 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 90e904784b..ff6e71e2ad 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -3,9 +3,9 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (type $i64_i32_=>_i32 (func (param i64 i32) (result i32))) @@ -2786,237 +2786,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -3066,7 +2835,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/string/String#at (param $0 i32) (param $1 i32) (result i32) @@ -3087,1310 +2856,57 @@ local.get $1 local.get $2 i32.ge_u - if - i32.const 240 - i32.const 304 - i32.const 57 - i32.const 31 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - i32.const 1 - call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.store16 - local.get $3 - ) - (func $~lib/string/String.__not (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $0 - call $~lib/string/String#get:length - i32.eqz - end - ) - (func $~lib/string/String.fromCharCode@varargs (param $0 i32) (param $1 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const -1 - local.set $1 - end - local.get $0 - local.get $1 - call $~lib/string/String.fromCharCode - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 + if + i32.const 240 + i32.const 304 + i32.const 57 + i32.const 31 + call $~lib/builtins/abort + unreachable end - local.get $2 + i32.const 2 i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 + call $~lib/rt/itcms/__new + local.set $3 + local.get $3 + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.store16 + local.get $3 + ) + (func $~lib/string/String.__not (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.eq + if (result i32) i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 + else + local.get $0 + call $~lib/string/String#get:length + i32.eqz end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end + (func $~lib/string/String.fromCharCode@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange end + unreachable end + i32.const -1 + local.set $1 end + local.get $0 + local.get $1 + call $~lib/string/String.fromCharCode ) (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -4403,7 +2919,7 @@ local.get $3 local.get $2 local.get $0 - call $~lib/memory/memory.copy + memory.copy end local.get $3 ) @@ -4669,7 +3185,7 @@ i32.add local.get $1 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $4 local.get $2 i32.add @@ -6830,7 +5346,7 @@ f64.convert_i64_u f64.mul f64.nearest - i64.trunc_f64_u + i64.trunc_sat_f64_u i64.add local.set $19 local.get $20 @@ -6876,7 +5392,7 @@ local.get $23 f64.convert_i64_u f64.div - i64.trunc_f64_u + i64.trunc_sat_f64_u i64.add local.set $19 local.get $20 @@ -7239,7 +5755,7 @@ local.get $5 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy local.get $3 ) (func $~lib/array/Array<~lib/string/String>#__uset (param $0 i32) (param $1 i32) (param $2 i32) @@ -8595,7 +7111,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $3 i32.const 1 @@ -8632,7 +7148,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 48 i32.const 46 @@ -8739,7 +7255,7 @@ local.get $7 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -8953,7 +7469,7 @@ f64.add local.set $16 local.get $16 - i32.trunc_f64_s + i32.trunc_sat_f64_s local.set $15 local.get $15 local.get $15 @@ -9470,14 +7986,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 + i32.const 0 + i32.const 24 + memory.fill local.get $2 i32.eqz if @@ -9701,7 +8212,7 @@ local.get $3 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $10 local.get $7 call $~lib/array/Array<~lib/string/String>#push @@ -9781,7 +8292,7 @@ local.get $14 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $10 local.get $4 call $~lib/array/Array<~lib/string/String>#push @@ -9817,23 +8328,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=40 + i32.const 44 + memory.fill global.get $std/string/str i32.const 32 i32.eq @@ -25535,19 +24032,19 @@ i32.add local.get $2 local.get $10 - call $~lib/memory/memory.copy + memory.copy else local.get $7 local.get $2 local.get $6 - call $~lib/memory/memory.copy + memory.copy end local.get $7 local.get $6 i32.add local.get $0 local.get $3 - call $~lib/memory/memory.copy + memory.copy local.get $7 local.set $11 global.get $~lib/memory/__stack_pointer @@ -25620,7 +24117,7 @@ local.get $7 local.get $0 local.get $3 - call $~lib/memory/memory.copy + memory.copy local.get $6 local.get $5 i32.gt_u @@ -25653,14 +24150,14 @@ i32.add local.get $2 local.get $10 - call $~lib/memory/memory.copy + memory.copy else local.get $7 local.get $3 i32.add local.get $2 local.get $6 - call $~lib/memory/memory.copy + memory.copy end local.get $7 local.set $11 @@ -25753,7 +24250,7 @@ local.get $2 i32.add local.get $1 - call $~lib/memory/memory.copy + memory.copy local.get $4 local.set $5 global.get $~lib/memory/__stack_pointer @@ -25840,7 +24337,7 @@ local.get $4 local.get $0 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $4 local.set $5 global.get $~lib/memory/__stack_pointer @@ -25967,7 +24464,7 @@ local.get $4 i32.add local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.set $6 global.get $~lib/memory/__stack_pointer @@ -26026,13 +24523,13 @@ local.get $5 local.get $0 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.get $2 i32.add local.get $1 local.get $3 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.set $6 global.get $~lib/memory/__stack_pointer @@ -26219,7 +24716,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.const 1 @@ -26229,7 +24726,7 @@ local.get $6 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 local.get $6 @@ -26249,7 +24746,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.set $9 global.get $~lib/memory/__stack_pointer @@ -26359,7 +24856,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $5 local.set $7 i32.const 0 @@ -26397,7 +24894,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $7 local.get $5 i32.add @@ -26439,7 +24936,7 @@ local.get $6 local.get $0 local.get $7 - call $~lib/memory/memory.copy + memory.copy loop $while-continue|1 local.get $0 local.get $1 @@ -26460,7 +24957,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $12 local.get $4 i32.add @@ -26544,7 +25041,7 @@ local.get $7 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $14 local.get $7 i32.add @@ -26558,7 +25055,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $14 local.get $5 i32.add @@ -26610,7 +25107,7 @@ local.get $6 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $6 local.get $14 @@ -26747,7 +25244,7 @@ local.get $3 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $6 local.set $7 global.get $~lib/memory/__stack_pointer @@ -26842,7 +25339,7 @@ i32.shl i32.add local.get $8 - call $~lib/memory/memory.copy + memory.copy local.get $9 local.set $10 global.get $~lib/memory/__stack_pointer @@ -26975,7 +25472,7 @@ local.get $8 i32.add local.get $10 - call $~lib/memory/memory.copy + memory.copy local.get $11 local.set $12 global.get $~lib/memory/__stack_pointer @@ -27805,7 +26302,7 @@ local.get $2 i32.const 21840 local.get $1 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.set $3 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 6e10d28cdd..cb473fc034 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,10 +1,10 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -1595,182 +1595,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 ) (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) (local $1 i32) @@ -2163,879 +1992,6 @@ local.get $0 i32.load offset=4 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -3098,13 +2054,13 @@ local.get $2 local.get $0 local.get $3 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.get $3 i32.add local.get $1 local.get $4 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 5fedea1f5c..d80839b0dd 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -3,9 +3,9 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) @@ -28,9 +28,9 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/symbol/idToString (mut i32) (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $std/symbol/sym3 (mut i32) (i32.const 0)) (global $std/symbol/sym4 (mut i32) (i32.const 0)) (global $std/symbol/key1 (mut i32) (i32.const 0)) @@ -2122,237 +2122,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2402,7 +2171,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) @@ -3444,1259 +3213,6 @@ local.get $2 i32.load offset=4 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 @@ -6131,13 +4647,13 @@ local.get $5 local.get $0 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.get $2 i32.add local.get $1 local.get $3 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.set $6 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 8b6fd219e1..96bccba5ca 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -21,7 +21,6 @@ (type $f64_f64_i32_i32_=>_f64 (func (param f64 f64 i32 i32) (result f64))) (type $i64_i32_i32_=>_i64 (func (param i64 i32 i32) (result i64))) (type $i64_i32_i32_=>_none (func (param i64 i32 i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) @@ -31,6 +30,7 @@ (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $f32_i32_i32_=>_none (func (param f32 i32 i32))) (type $f64_i32_i32_=>_none (func (param f64 i32 i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) @@ -61,616 +61,307 @@ (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 33012)) (memory $0 1) - (data (i32.const 1036) ",") - (data (i32.const 1048) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") - (data (i32.const 1084) "<") - (data (i32.const 1096) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 1148) "<") - (data (i32.const 1160) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1212) "<") - (data (i32.const 1224) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") - (data (i32.const 1340) "<") - (data (i32.const 1352) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") - (data (i32.const 1404) ",") - (data (i32.const 1416) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 1484) "<") - (data (i32.const 1496) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 1548) "<") - (data (i32.const 1560) "\01\00\00\00\"\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1612) "<") - (data (i32.const 1624) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1676) "\1c") - (data (i32.const 1688) "\0e\00\00\00\08\00\00\00\01") - (data (i32.const 1708) "\1c") - (data (i32.const 1724) "\05\00\00\00\01\01\01\04\05") - (data (i32.const 1740) ",") - (data (i32.const 1752) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1788) "\1c") - (data (i32.const 1804) "\05") - (data (i32.const 1820) "\1c") - (data (i32.const 1836) "\05\00\00\00\01\01") - (data (i32.const 1852) "\1c") - (data (i32.const 1868) "\05\00\00\00\01\01\00\02\02") - (data (i32.const 1884) "\1c") - (data (i32.const 1900) "\05\00\00\00\01\01\00\02\02") - (data (i32.const 1916) "\1c") - (data (i32.const 1932) "\03") - (data (i32.const 1948) "\1c") - (data (i32.const 1964) "\05\00\00\00\01\00\00\00\02") - (data (i32.const 1980) ",") - (data (i32.const 1996) "\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 2028) ",") - (data (i32.const 2044) "\14") - (data (i32.const 2076) ",") - (data (i32.const 2092) "\14\00\00\00\01\00\00\00\01") - (data (i32.const 2124) ",") - (data (i32.const 2140) "\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 2172) ",") - (data (i32.const 2188) "\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 2220) "\1c") - (data (i32.const 2236) "\0c") - (data (i32.const 2252) ",") - (data (i32.const 2268) "\14\00\00\00\01") - (data (i32.const 2288) "\02") - (data (i32.const 2300) ",") - (data (i32.const 2316) "\14\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2348) ",") - (data (i32.const 2364) "\14\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05") - (data (i32.const 2396) ",") - (data (i32.const 2412) "\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 2444) ",") - (data (i32.const 2460) "\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2492) ",") - (data (i32.const 2508) "\14\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2540) ",") - (data (i32.const 2556) "\14\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2588) ",") - (data (i32.const 2604) "\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 2636) ",") - (data (i32.const 2652) "\14\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2684) ",") - (data (i32.const 2700) "\14\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2732) ",") - (data (i32.const 2748) "\14\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2780) ",") - (data (i32.const 2796) "\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 2828) ",") - (data (i32.const 2844) "\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 2876) "\1c") - (data (i32.const 2888) "\11\00\00\00\08\00\00\00\02") - (data (i32.const 2908) "\1c") - (data (i32.const 2920) "\12\00\00\00\08\00\00\00\03") - (data (i32.const 2940) "\1c") - (data (i32.const 2952) "\13\00\00\00\08\00\00\00\04") - (data (i32.const 2972) "\1c") - (data (i32.const 2984) "\14\00\00\00\08\00\00\00\05") - (data (i32.const 3004) "\1c") - (data (i32.const 3016) "\15\00\00\00\08\00\00\00\06") - (data (i32.const 3036) "\1c") - (data (i32.const 3048) "\16\00\00\00\08\00\00\00\07") - (data (i32.const 3068) "\1c") - (data (i32.const 3080) "\17\00\00\00\08\00\00\00\08") - (data (i32.const 3100) "\1c") - (data (i32.const 3112) "\18\00\00\00\08\00\00\00\t") - (data (i32.const 3132) "\1c") - (data (i32.const 3144) "\19\00\00\00\08\00\00\00\n") - (data (i32.const 3164) "\1c") - (data (i32.const 3176) "\1a\00\00\00\08\00\00\00\0b") - (data (i32.const 3196) "\1c") - (data (i32.const 3208) "\1b\00\00\00\08\00\00\00\0c") - (data (i32.const 3228) "\1c") - (data (i32.const 3240) "\11\00\00\00\08\00\00\00\0d") - (data (i32.const 3260) "\1c") - (data (i32.const 3272) "\12\00\00\00\08\00\00\00\0e") - (data (i32.const 3292) "\1c") - (data (i32.const 3304) "\13\00\00\00\08\00\00\00\0f") - (data (i32.const 3324) "\1c") - (data (i32.const 3336) "\14\00\00\00\08\00\00\00\10") - (data (i32.const 3356) "\1c") - (data (i32.const 3368) "\15\00\00\00\08\00\00\00\11") - (data (i32.const 3388) "\1c") - (data (i32.const 3400) "\16\00\00\00\08\00\00\00\12") - (data (i32.const 3420) "\1c") - (data (i32.const 3432) "\17\00\00\00\08\00\00\00\13") - (data (i32.const 3452) "\1c") - (data (i32.const 3464) "\18\00\00\00\08\00\00\00\14") - (data (i32.const 3484) "\1c") - (data (i32.const 3496) "\19\00\00\00\08\00\00\00\15") - (data (i32.const 3516) "\1c") - (data (i32.const 3528) "\1a\00\00\00\08\00\00\00\16") - (data (i32.const 3548) "\1c") - (data (i32.const 3560) "\1b\00\00\00\08\00\00\00\17") - (data (i32.const 3580) "\1c") - (data (i32.const 3592) "\1c\00\00\00\08\00\00\00\18") - (data (i32.const 3612) "\1c") - (data (i32.const 3624) "\1d\00\00\00\08\00\00\00\19") - (data (i32.const 3644) "\1c") - (data (i32.const 3656) "\1e\00\00\00\08\00\00\00\1a") - (data (i32.const 3676) "\1c") - (data (i32.const 3688) "\1f\00\00\00\08\00\00\00\1b") - (data (i32.const 3708) "\1c") - (data (i32.const 3720) " \00\00\00\08\00\00\00\1c") - (data (i32.const 3740) "\1c") - (data (i32.const 3752) "!\00\00\00\08\00\00\00\1d") - (data (i32.const 3772) "\1c") - (data (i32.const 3784) "\"\00\00\00\08\00\00\00\1e") - (data (i32.const 3804) "\1c") - (data (i32.const 3816) "#\00\00\00\08\00\00\00\1f") - (data (i32.const 3836) "\1c") - (data (i32.const 3848) "$\00\00\00\08\00\00\00 ") - (data (i32.const 3868) "\1c") - (data (i32.const 3880) "%\00\00\00\08\00\00\00!") - (data (i32.const 3900) "\1c") - (data (i32.const 3912) "&\00\00\00\08\00\00\00\"") - (data (i32.const 3932) "\1c") - (data (i32.const 3944) "\'\00\00\00\08\00\00\00#") - (data (i32.const 3964) "\1c") - (data (i32.const 3976) "(\00\00\00\08\00\00\00$") - (data (i32.const 3996) "\1c") - (data (i32.const 4008) ")\00\00\00\08\00\00\00%") - (data (i32.const 4028) "\1c") - (data (i32.const 4040) "*\00\00\00\08\00\00\00&") - (data (i32.const 4060) "\1c") - (data (i32.const 4072) "+\00\00\00\08\00\00\00\'") - (data (i32.const 4092) "\1c") - (data (i32.const 4104) ",\00\00\00\08\00\00\00(") - (data (i32.const 4124) "\1c") - (data (i32.const 4136) "-\00\00\00\08\00\00\00)") - (data (i32.const 4156) "\1c") - (data (i32.const 4168) ".\00\00\00\08\00\00\00*") - (data (i32.const 4188) "\1c") - (data (i32.const 4200) "/\00\00\00\08\00\00\00+") - (data (i32.const 4220) "\1c") - (data (i32.const 4232) "0\00\00\00\08\00\00\00,") - (data (i32.const 4252) "\1c") - (data (i32.const 4264) "1\00\00\00\08\00\00\00-") - (data (i32.const 4284) "\1c") - (data (i32.const 4296) "\'\00\00\00\08\00\00\00.") - (data (i32.const 4316) "\1c") - (data (i32.const 4328) "\'\00\00\00\08\00\00\00/") - (data (i32.const 4348) "\1c") - (data (i32.const 4360) "(\00\00\00\08\00\00\000") - (data (i32.const 4380) "\1c") - (data (i32.const 4392) "(\00\00\00\08\00\00\001") - (data (i32.const 4412) "\1c") - (data (i32.const 4424) ")\00\00\00\08\00\00\002") - (data (i32.const 4444) "\1c") - (data (i32.const 4456) ")\00\00\00\08\00\00\003") - (data (i32.const 4476) "\1c") - (data (i32.const 4488) "*\00\00\00\08\00\00\004") - (data (i32.const 4508) "\1c") - (data (i32.const 4520) "*\00\00\00\08\00\00\005") - (data (i32.const 4540) "\1c") - (data (i32.const 4552) "+\00\00\00\08\00\00\006") - (data (i32.const 4572) "\1c") - (data (i32.const 4584) "+\00\00\00\08\00\00\007") - (data (i32.const 4604) "\1c") - (data (i32.const 4616) ",\00\00\00\08\00\00\008") - (data (i32.const 4636) "\1c") - (data (i32.const 4648) ",\00\00\00\08\00\00\009") - (data (i32.const 4668) "\1c") - (data (i32.const 4680) "-\00\00\00\08\00\00\00:") - (data (i32.const 4700) "\1c") - (data (i32.const 4712) "-\00\00\00\08\00\00\00;") - (data (i32.const 4732) "\1c") - (data (i32.const 4744) ".\00\00\00\08\00\00\00<") - (data (i32.const 4764) "\1c") - (data (i32.const 4776) ".\00\00\00\08\00\00\00=") - (data (i32.const 4796) "\1c") - (data (i32.const 4808) "/\00\00\00\08\00\00\00>") - (data (i32.const 4828) "\1c") - (data (i32.const 4840) "/\00\00\00\08\00\00\00?") - (data (i32.const 4860) "\1c") - (data (i32.const 4872) "0\00\00\00\08\00\00\00@") - (data (i32.const 4892) "\1c") - (data (i32.const 4904) "0\00\00\00\08\00\00\00A") - (data (i32.const 4924) "\1c") - (data (i32.const 4936) "1\00\00\00\08\00\00\00B") - (data (i32.const 4956) "\1c") - (data (i32.const 4968) "1\00\00\00\08\00\00\00C") - (data (i32.const 4988) "\1c") - (data (i32.const 5000) "\'\00\00\00\08\00\00\00D") - (data (i32.const 5020) "\1c") - (data (i32.const 5032) "\'\00\00\00\08\00\00\00E") - (data (i32.const 5052) "\1c") - (data (i32.const 5064) "(\00\00\00\08\00\00\00F") - (data (i32.const 5084) "\1c") - (data (i32.const 5096) "(\00\00\00\08\00\00\00G") - (data (i32.const 5116) "\1c") - (data (i32.const 5128) ")\00\00\00\08\00\00\00H") - (data (i32.const 5148) "\1c") - (data (i32.const 5160) ")\00\00\00\08\00\00\00I") - (data (i32.const 5180) "\1c") - (data (i32.const 5192) "*\00\00\00\08\00\00\00J") - (data (i32.const 5212) "\1c") - (data (i32.const 5224) "*\00\00\00\08\00\00\00K") - (data (i32.const 5244) "\1c") - (data (i32.const 5256) "+\00\00\00\08\00\00\00L") - (data (i32.const 5276) "\1c") - (data (i32.const 5288) "+\00\00\00\08\00\00\00M") - (data (i32.const 5308) "\1c") - (data (i32.const 5320) ",\00\00\00\08\00\00\00N") - (data (i32.const 5340) "\1c") - (data (i32.const 5352) ",\00\00\00\08\00\00\00O") - (data (i32.const 5372) "\1c") - (data (i32.const 5384) "-\00\00\00\08\00\00\00P") - (data (i32.const 5404) "\1c") - (data (i32.const 5416) "-\00\00\00\08\00\00\00Q") - (data (i32.const 5436) "\1c") - (data (i32.const 5448) ".\00\00\00\08\00\00\00R") - (data (i32.const 5468) "\1c") - (data (i32.const 5480) ".\00\00\00\08\00\00\00S") - (data (i32.const 5500) "\1c") - (data (i32.const 5512) "/\00\00\00\08\00\00\00T") - (data (i32.const 5532) "\1c") - (data (i32.const 5544) "/\00\00\00\08\00\00\00U") - (data (i32.const 5564) "\1c") - (data (i32.const 5576) "0\00\00\00\08\00\00\00V") - (data (i32.const 5596) "\1c") - (data (i32.const 5608) "0\00\00\00\08\00\00\00W") - (data (i32.const 5628) "\1c") - (data (i32.const 5640) "1\00\00\00\08\00\00\00X") - (data (i32.const 5660) "\1c") - (data (i32.const 5672) "1\00\00\00\08\00\00\00Y") - (data (i32.const 5692) "\1c") - (data (i32.const 5704) "\'\00\00\00\08\00\00\00Z") - (data (i32.const 5724) "\1c") - (data (i32.const 5736) "\'\00\00\00\08\00\00\00[") - (data (i32.const 5756) "\1c") - (data (i32.const 5768) "(\00\00\00\08\00\00\00\\") - (data (i32.const 5788) "\1c") - (data (i32.const 5800) "(\00\00\00\08\00\00\00]") - (data (i32.const 5820) "\1c") - (data (i32.const 5832) ")\00\00\00\08\00\00\00^") - (data (i32.const 5852) "\1c") - (data (i32.const 5864) ")\00\00\00\08\00\00\00_") - (data (i32.const 5884) "\1c") - (data (i32.const 5896) "*\00\00\00\08\00\00\00`") - (data (i32.const 5916) "\1c") - (data (i32.const 5928) "*\00\00\00\08\00\00\00a") - (data (i32.const 5948) "\1c") - (data (i32.const 5960) "+\00\00\00\08\00\00\00b") - (data (i32.const 5980) "\1c") - (data (i32.const 5992) "+\00\00\00\08\00\00\00c") - (data (i32.const 6012) "\1c") - (data (i32.const 6024) ",\00\00\00\08\00\00\00d") - (data (i32.const 6044) "\1c") - (data (i32.const 6056) ",\00\00\00\08\00\00\00e") - (data (i32.const 6076) "\1c") - (data (i32.const 6088) "-\00\00\00\08\00\00\00f") - (data (i32.const 6108) "\1c") - (data (i32.const 6120) "-\00\00\00\08\00\00\00g") - (data (i32.const 6140) "\1c") - (data (i32.const 6152) ".\00\00\00\08\00\00\00h") - (data (i32.const 6172) "\1c") - (data (i32.const 6184) ".\00\00\00\08\00\00\00i") - (data (i32.const 6204) "\1c") - (data (i32.const 6216) "/\00\00\00\08\00\00\00j") - (data (i32.const 6236) "\1c") - (data (i32.const 6248) "/\00\00\00\08\00\00\00k") - (data (i32.const 6268) "\1c") - (data (i32.const 6280) "0\00\00\00\08\00\00\00l") - (data (i32.const 6300) "\1c") - (data (i32.const 6312) "0\00\00\00\08\00\00\00m") - (data (i32.const 6332) "\1c") - (data (i32.const 6344) "1\00\00\00\08\00\00\00n") - (data (i32.const 6364) "\1c") - (data (i32.const 6376) "1\00\00\00\08\00\00\00o") - (data (i32.const 6396) "\1c") - (data (i32.const 6408) "\'\00\00\00\08\00\00\00p") - (data (i32.const 6428) "\1c") - (data (i32.const 6440) "\'\00\00\00\08\00\00\00q") - (data (i32.const 6460) "\1c") - (data (i32.const 6472) "(\00\00\00\08\00\00\00r") - (data (i32.const 6492) "\1c") - (data (i32.const 6504) "(\00\00\00\08\00\00\00s") - (data (i32.const 6524) "\1c") - (data (i32.const 6536) ")\00\00\00\08\00\00\00t") - (data (i32.const 6556) "\1c") - (data (i32.const 6568) ")\00\00\00\08\00\00\00u") - (data (i32.const 6588) "\1c") - (data (i32.const 6600) "*\00\00\00\08\00\00\00v") - (data (i32.const 6620) "\1c") - (data (i32.const 6632) "*\00\00\00\08\00\00\00w") - (data (i32.const 6652) "\1c") - (data (i32.const 6664) "+\00\00\00\08\00\00\00x") - (data (i32.const 6684) "\1c") - (data (i32.const 6696) "+\00\00\00\08\00\00\00y") - (data (i32.const 6716) "\1c") - (data (i32.const 6728) ",\00\00\00\08\00\00\00z") - (data (i32.const 6748) "\1c") - (data (i32.const 6760) ",\00\00\00\08\00\00\00{") - (data (i32.const 6780) "\1c") - (data (i32.const 6792) "-\00\00\00\08\00\00\00|") - (data (i32.const 6812) "\1c") - (data (i32.const 6824) "-\00\00\00\08\00\00\00}") - (data (i32.const 6844) "\1c") - (data (i32.const 6856) ".\00\00\00\08\00\00\00~") - (data (i32.const 6876) "\1c") - (data (i32.const 6888) ".\00\00\00\08\00\00\00\7f") - (data (i32.const 6908) "\1c") - (data (i32.const 6920) "/\00\00\00\08\00\00\00\80") - (data (i32.const 6940) "\1c") - (data (i32.const 6952) "/\00\00\00\08\00\00\00\81") - (data (i32.const 6972) "\1c") - (data (i32.const 6984) "0\00\00\00\08\00\00\00\82") - (data (i32.const 7004) "\1c") - (data (i32.const 7016) "0\00\00\00\08\00\00\00\83") - (data (i32.const 7036) "\1c") - (data (i32.const 7048) "1\00\00\00\08\00\00\00\84") - (data (i32.const 7068) "\1c") - (data (i32.const 7080) "1\00\00\00\08\00\00\00\85") - (data (i32.const 7100) "\1c") - (data (i32.const 7116) "\0c\00\00\00\n\00\00\00\0c\00\00\00\0e") - (data (i32.const 7132) ",") - (data (i32.const 7144) "\10\00\00\00\10\00\00\00\d0\1b\00\00\d0\1b\00\00\0c\00\00\00\03") - (data (i32.const 7180) "\1c") - (data (i32.const 7192) "2\00\00\00\08\00\00\00\86") - (data (i32.const 7212) "\1c") - (data (i32.const 7224) "3\00\00\00\08\00\00\00\87") - (data (i32.const 7244) "\1c") - (data (i32.const 7256) "4\00\00\00\08\00\00\00\88") - (data (i32.const 7276) "\1c") - (data (i32.const 7288) "5\00\00\00\08\00\00\00\89") - (data (i32.const 7308) "\1c") - (data (i32.const 7320) "6\00\00\00\08\00\00\00\8a") - (data (i32.const 7340) "\1c") - (data (i32.const 7352) "7\00\00\00\08\00\00\00\8b") - (data (i32.const 7372) "\1c") - (data (i32.const 7384) "8\00\00\00\08\00\00\00\8c") - (data (i32.const 7404) "\1c") - (data (i32.const 7416) "9\00\00\00\08\00\00\00\8d") - (data (i32.const 7436) "\1c") - (data (i32.const 7448) ":\00\00\00\08\00\00\00\8e") - (data (i32.const 7468) "\1c") - (data (i32.const 7480) ";\00\00\00\08\00\00\00\8f") - (data (i32.const 7500) "\1c") - (data (i32.const 7512) "<\00\00\00\08\00\00\00\90") - (data (i32.const 7532) "<") - (data (i32.const 7548) "$\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 7596) ",") - (data (i32.const 7608) "\10\00\00\00\10\00\00\00\80\1d\00\00\80\1d\00\00$\00\00\00\t") - (data (i32.const 7644) "<") - (data (i32.const 7660) ",\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00\n") - (data (i32.const 7708) ",") - (data (i32.const 7720) "\10\00\00\00\10\00\00\00\f0\1d\00\00\f0\1d\00\00,\00\00\00\0b") - (data (i32.const 7756) "\1c") - (data (i32.const 7768) "\01") - (data (i32.const 7788) "|") - (data (i32.const 7800) "\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") - (data (i32.const 7916) "<") - (data (i32.const 7928) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") - (data (i32.const 7980) "\1c") - (data (i32.const 7992) "\01\00\00\00\02\00\00\000") + (data (i32.const 1036) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") + (data (i32.const 1084) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 1148) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 1212) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 1340) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data (i32.const 1404) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data (i32.const 1484) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 1548) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\"\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1612) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1676) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\01") + (data (i32.const 1708) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\01\01\01\04\05") + (data (i32.const 1740) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1788) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\05") + (data (i32.const 1820) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\01\01") + (data (i32.const 1852) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 1884) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 1916) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\03") + (data (i32.const 1948) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\01\00\00\00\02") + (data (i32.const 1980) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") + (data (i32.const 2028) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14") + (data (i32.const 2076) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\01") + (data (i32.const 2124) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 2172) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c") + (data (i32.const 2252) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02") + (data (i32.const 2300) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2348) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05") + (data (i32.const 2396) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") + (data (i32.const 2444) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2492) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2540) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2588) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") + (data (i32.const 2636) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2684) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2732) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2780) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") + (data (i32.const 2828) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") + (data (i32.const 2876) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00\02") + (data (i32.const 2908) "\1c\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\08\00\00\00\03") + (data (i32.const 2940) "\1c\00\00\00\00\00\00\00\00\00\00\00\13\00\00\00\08\00\00\00\04") + (data (i32.const 2972) "\1c\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\08\00\00\00\05") + (data (i32.const 3004) "\1c\00\00\00\00\00\00\00\00\00\00\00\15\00\00\00\08\00\00\00\06") + (data (i32.const 3036) "\1c\00\00\00\00\00\00\00\00\00\00\00\16\00\00\00\08\00\00\00\07") + (data (i32.const 3068) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\08") + (data (i32.const 3100) "\1c\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\08\00\00\00\t") + (data (i32.const 3132) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\00\n") + (data (i32.const 3164) "\1c\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\08\00\00\00\0b") + (data (i32.const 3196) "\1c\00\00\00\00\00\00\00\00\00\00\00\1b\00\00\00\08\00\00\00\0c") + (data (i32.const 3228) "\1c\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\08\00\00\00\0d") + (data (i32.const 3260) "\1c\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\08\00\00\00\0e") + (data (i32.const 3292) "\1c\00\00\00\00\00\00\00\00\00\00\00\13\00\00\00\08\00\00\00\0f") + (data (i32.const 3324) "\1c\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\08\00\00\00\10") + (data (i32.const 3356) "\1c\00\00\00\00\00\00\00\00\00\00\00\15\00\00\00\08\00\00\00\11") + (data (i32.const 3388) "\1c\00\00\00\00\00\00\00\00\00\00\00\16\00\00\00\08\00\00\00\12") + (data (i32.const 3420) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\13") + (data (i32.const 3452) "\1c\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\08\00\00\00\14") + (data (i32.const 3484) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\00\15") + (data (i32.const 3516) "\1c\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\08\00\00\00\16") + (data (i32.const 3548) "\1c\00\00\00\00\00\00\00\00\00\00\00\1b\00\00\00\08\00\00\00\17") + (data (i32.const 3580) "\1c\00\00\00\00\00\00\00\00\00\00\00\1c\00\00\00\08\00\00\00\18") + (data (i32.const 3612) "\1c\00\00\00\00\00\00\00\00\00\00\00\1d\00\00\00\08\00\00\00\19") + (data (i32.const 3644) "\1c\00\00\00\00\00\00\00\00\00\00\00\1e\00\00\00\08\00\00\00\1a") + (data (i32.const 3676) "\1c\00\00\00\00\00\00\00\00\00\00\00\1f\00\00\00\08\00\00\00\1b") + (data (i32.const 3708) "\1c\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\08\00\00\00\1c") + (data (i32.const 3740) "\1c\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\08\00\00\00\1d") + (data (i32.const 3772) "\1c\00\00\00\00\00\00\00\00\00\00\00\"\00\00\00\08\00\00\00\1e") + (data (i32.const 3804) "\1c\00\00\00\00\00\00\00\00\00\00\00#\00\00\00\08\00\00\00\1f") + (data (i32.const 3836) "\1c\00\00\00\00\00\00\00\00\00\00\00$\00\00\00\08\00\00\00 ") + (data (i32.const 3868) "\1c\00\00\00\00\00\00\00\00\00\00\00%\00\00\00\08\00\00\00!") + (data (i32.const 3900) "\1c\00\00\00\00\00\00\00\00\00\00\00&\00\00\00\08\00\00\00\"") + (data (i32.const 3932) "\1c\00\00\00\00\00\00\00\00\00\00\00\'\00\00\00\08\00\00\00#") + (data (i32.const 3964) "\1c\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\08\00\00\00$") + (data (i32.const 3996) "\1c\00\00\00\00\00\00\00\00\00\00\00)\00\00\00\08\00\00\00%") + (data (i32.const 4028) "\1c\00\00\00\00\00\00\00\00\00\00\00*\00\00\00\08\00\00\00&") + (data (i32.const 4060) "\1c\00\00\00\00\00\00\00\00\00\00\00+\00\00\00\08\00\00\00\'") + (data (i32.const 4092) "\1c\00\00\00\00\00\00\00\00\00\00\00,\00\00\00\08\00\00\00(") + (data (i32.const 4124) "\1c\00\00\00\00\00\00\00\00\00\00\00-\00\00\00\08\00\00\00)") + (data (i32.const 4156) "\1c\00\00\00\00\00\00\00\00\00\00\00.\00\00\00\08\00\00\00*") + (data (i32.const 4188) "\1c\00\00\00\00\00\00\00\00\00\00\00/\00\00\00\08\00\00\00+") + (data (i32.const 4220) "\1c\00\00\00\00\00\00\00\00\00\00\000\00\00\00\08\00\00\00,") + (data (i32.const 4252) "\1c\00\00\00\00\00\00\00\00\00\00\001\00\00\00\08\00\00\00-") + (data (i32.const 4284) "\1c\00\00\00\00\00\00\00\00\00\00\00\'\00\00\00\08\00\00\00.") + (data (i32.const 4316) "\1c\00\00\00\00\00\00\00\00\00\00\00\'\00\00\00\08\00\00\00/") + (data (i32.const 4348) "\1c\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\08\00\00\000") + (data (i32.const 4380) "\1c\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\08\00\00\001") + (data (i32.const 4412) "\1c\00\00\00\00\00\00\00\00\00\00\00)\00\00\00\08\00\00\002") + (data (i32.const 4444) "\1c\00\00\00\00\00\00\00\00\00\00\00)\00\00\00\08\00\00\003") + (data (i32.const 4476) "\1c\00\00\00\00\00\00\00\00\00\00\00*\00\00\00\08\00\00\004") + (data (i32.const 4508) "\1c\00\00\00\00\00\00\00\00\00\00\00*\00\00\00\08\00\00\005") + (data (i32.const 4540) "\1c\00\00\00\00\00\00\00\00\00\00\00+\00\00\00\08\00\00\006") + (data (i32.const 4572) "\1c\00\00\00\00\00\00\00\00\00\00\00+\00\00\00\08\00\00\007") + (data (i32.const 4604) "\1c\00\00\00\00\00\00\00\00\00\00\00,\00\00\00\08\00\00\008") + (data (i32.const 4636) "\1c\00\00\00\00\00\00\00\00\00\00\00,\00\00\00\08\00\00\009") + (data (i32.const 4668) "\1c\00\00\00\00\00\00\00\00\00\00\00-\00\00\00\08\00\00\00:") + (data (i32.const 4700) "\1c\00\00\00\00\00\00\00\00\00\00\00-\00\00\00\08\00\00\00;") + (data (i32.const 4732) "\1c\00\00\00\00\00\00\00\00\00\00\00.\00\00\00\08\00\00\00<") + (data (i32.const 4764) "\1c\00\00\00\00\00\00\00\00\00\00\00.\00\00\00\08\00\00\00=") + (data (i32.const 4796) "\1c\00\00\00\00\00\00\00\00\00\00\00/\00\00\00\08\00\00\00>") + (data (i32.const 4828) "\1c\00\00\00\00\00\00\00\00\00\00\00/\00\00\00\08\00\00\00?") + (data (i32.const 4860) "\1c\00\00\00\00\00\00\00\00\00\00\000\00\00\00\08\00\00\00@") + (data (i32.const 4892) "\1c\00\00\00\00\00\00\00\00\00\00\000\00\00\00\08\00\00\00A") + (data (i32.const 4924) "\1c\00\00\00\00\00\00\00\00\00\00\001\00\00\00\08\00\00\00B") + (data (i32.const 4956) "\1c\00\00\00\00\00\00\00\00\00\00\001\00\00\00\08\00\00\00C") + (data (i32.const 4988) "\1c\00\00\00\00\00\00\00\00\00\00\00\'\00\00\00\08\00\00\00D") + (data (i32.const 5020) "\1c\00\00\00\00\00\00\00\00\00\00\00\'\00\00\00\08\00\00\00E") + (data (i32.const 5052) "\1c\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\08\00\00\00F") + (data (i32.const 5084) "\1c\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\08\00\00\00G") + (data (i32.const 5116) "\1c\00\00\00\00\00\00\00\00\00\00\00)\00\00\00\08\00\00\00H") + (data (i32.const 5148) "\1c\00\00\00\00\00\00\00\00\00\00\00)\00\00\00\08\00\00\00I") + (data (i32.const 5180) "\1c\00\00\00\00\00\00\00\00\00\00\00*\00\00\00\08\00\00\00J") + (data (i32.const 5212) "\1c\00\00\00\00\00\00\00\00\00\00\00*\00\00\00\08\00\00\00K") + (data (i32.const 5244) "\1c\00\00\00\00\00\00\00\00\00\00\00+\00\00\00\08\00\00\00L") + (data (i32.const 5276) "\1c\00\00\00\00\00\00\00\00\00\00\00+\00\00\00\08\00\00\00M") + (data (i32.const 5308) "\1c\00\00\00\00\00\00\00\00\00\00\00,\00\00\00\08\00\00\00N") + (data (i32.const 5340) "\1c\00\00\00\00\00\00\00\00\00\00\00,\00\00\00\08\00\00\00O") + (data (i32.const 5372) "\1c\00\00\00\00\00\00\00\00\00\00\00-\00\00\00\08\00\00\00P") + (data (i32.const 5404) "\1c\00\00\00\00\00\00\00\00\00\00\00-\00\00\00\08\00\00\00Q") + (data (i32.const 5436) "\1c\00\00\00\00\00\00\00\00\00\00\00.\00\00\00\08\00\00\00R") + (data (i32.const 5468) "\1c\00\00\00\00\00\00\00\00\00\00\00.\00\00\00\08\00\00\00S") + (data (i32.const 5500) "\1c\00\00\00\00\00\00\00\00\00\00\00/\00\00\00\08\00\00\00T") + (data (i32.const 5532) "\1c\00\00\00\00\00\00\00\00\00\00\00/\00\00\00\08\00\00\00U") + (data (i32.const 5564) "\1c\00\00\00\00\00\00\00\00\00\00\000\00\00\00\08\00\00\00V") + (data (i32.const 5596) "\1c\00\00\00\00\00\00\00\00\00\00\000\00\00\00\08\00\00\00W") + (data (i32.const 5628) "\1c\00\00\00\00\00\00\00\00\00\00\001\00\00\00\08\00\00\00X") + (data (i32.const 5660) "\1c\00\00\00\00\00\00\00\00\00\00\001\00\00\00\08\00\00\00Y") + (data (i32.const 5692) "\1c\00\00\00\00\00\00\00\00\00\00\00\'\00\00\00\08\00\00\00Z") + (data (i32.const 5724) "\1c\00\00\00\00\00\00\00\00\00\00\00\'\00\00\00\08\00\00\00[") + (data (i32.const 5756) "\1c\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\08\00\00\00\\") + (data (i32.const 5788) "\1c\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\08\00\00\00]") + (data (i32.const 5820) "\1c\00\00\00\00\00\00\00\00\00\00\00)\00\00\00\08\00\00\00^") + (data (i32.const 5852) "\1c\00\00\00\00\00\00\00\00\00\00\00)\00\00\00\08\00\00\00_") + (data (i32.const 5884) "\1c\00\00\00\00\00\00\00\00\00\00\00*\00\00\00\08\00\00\00`") + (data (i32.const 5916) "\1c\00\00\00\00\00\00\00\00\00\00\00*\00\00\00\08\00\00\00a") + (data (i32.const 5948) "\1c\00\00\00\00\00\00\00\00\00\00\00+\00\00\00\08\00\00\00b") + (data (i32.const 5980) "\1c\00\00\00\00\00\00\00\00\00\00\00+\00\00\00\08\00\00\00c") + (data (i32.const 6012) "\1c\00\00\00\00\00\00\00\00\00\00\00,\00\00\00\08\00\00\00d") + (data (i32.const 6044) "\1c\00\00\00\00\00\00\00\00\00\00\00,\00\00\00\08\00\00\00e") + (data (i32.const 6076) "\1c\00\00\00\00\00\00\00\00\00\00\00-\00\00\00\08\00\00\00f") + (data (i32.const 6108) "\1c\00\00\00\00\00\00\00\00\00\00\00-\00\00\00\08\00\00\00g") + (data (i32.const 6140) "\1c\00\00\00\00\00\00\00\00\00\00\00.\00\00\00\08\00\00\00h") + (data (i32.const 6172) "\1c\00\00\00\00\00\00\00\00\00\00\00.\00\00\00\08\00\00\00i") + (data (i32.const 6204) "\1c\00\00\00\00\00\00\00\00\00\00\00/\00\00\00\08\00\00\00j") + (data (i32.const 6236) "\1c\00\00\00\00\00\00\00\00\00\00\00/\00\00\00\08\00\00\00k") + (data (i32.const 6268) "\1c\00\00\00\00\00\00\00\00\00\00\000\00\00\00\08\00\00\00l") + (data (i32.const 6300) "\1c\00\00\00\00\00\00\00\00\00\00\000\00\00\00\08\00\00\00m") + (data (i32.const 6332) "\1c\00\00\00\00\00\00\00\00\00\00\001\00\00\00\08\00\00\00n") + (data (i32.const 6364) "\1c\00\00\00\00\00\00\00\00\00\00\001\00\00\00\08\00\00\00o") + (data (i32.const 6396) "\1c\00\00\00\00\00\00\00\00\00\00\00\'\00\00\00\08\00\00\00p") + (data (i32.const 6428) "\1c\00\00\00\00\00\00\00\00\00\00\00\'\00\00\00\08\00\00\00q") + (data (i32.const 6460) "\1c\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\08\00\00\00r") + (data (i32.const 6492) "\1c\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\08\00\00\00s") + (data (i32.const 6524) "\1c\00\00\00\00\00\00\00\00\00\00\00)\00\00\00\08\00\00\00t") + (data (i32.const 6556) "\1c\00\00\00\00\00\00\00\00\00\00\00)\00\00\00\08\00\00\00u") + (data (i32.const 6588) "\1c\00\00\00\00\00\00\00\00\00\00\00*\00\00\00\08\00\00\00v") + (data (i32.const 6620) "\1c\00\00\00\00\00\00\00\00\00\00\00*\00\00\00\08\00\00\00w") + (data (i32.const 6652) "\1c\00\00\00\00\00\00\00\00\00\00\00+\00\00\00\08\00\00\00x") + (data (i32.const 6684) "\1c\00\00\00\00\00\00\00\00\00\00\00+\00\00\00\08\00\00\00y") + (data (i32.const 6716) "\1c\00\00\00\00\00\00\00\00\00\00\00,\00\00\00\08\00\00\00z") + (data (i32.const 6748) "\1c\00\00\00\00\00\00\00\00\00\00\00,\00\00\00\08\00\00\00{") + (data (i32.const 6780) "\1c\00\00\00\00\00\00\00\00\00\00\00-\00\00\00\08\00\00\00|") + (data (i32.const 6812) "\1c\00\00\00\00\00\00\00\00\00\00\00-\00\00\00\08\00\00\00}") + (data (i32.const 6844) "\1c\00\00\00\00\00\00\00\00\00\00\00.\00\00\00\08\00\00\00~") + (data (i32.const 6876) "\1c\00\00\00\00\00\00\00\00\00\00\00.\00\00\00\08\00\00\00\7f") + (data (i32.const 6908) "\1c\00\00\00\00\00\00\00\00\00\00\00/\00\00\00\08\00\00\00\80") + (data (i32.const 6940) "\1c\00\00\00\00\00\00\00\00\00\00\00/\00\00\00\08\00\00\00\81") + (data (i32.const 6972) "\1c\00\00\00\00\00\00\00\00\00\00\000\00\00\00\08\00\00\00\82") + (data (i32.const 7004) "\1c\00\00\00\00\00\00\00\00\00\00\000\00\00\00\08\00\00\00\83") + (data (i32.const 7036) "\1c\00\00\00\00\00\00\00\00\00\00\001\00\00\00\08\00\00\00\84") + (data (i32.const 7068) "\1c\00\00\00\00\00\00\00\00\00\00\001\00\00\00\08\00\00\00\85") + (data (i32.const 7100) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\n\00\00\00\0c\00\00\00\0e") + (data (i32.const 7132) ",\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\10\00\00\00\d0\1b\00\00\d0\1b\00\00\0c\00\00\00\03") + (data (i32.const 7180) "\1c\00\00\00\00\00\00\00\00\00\00\002\00\00\00\08\00\00\00\86") + (data (i32.const 7212) "\1c\00\00\00\00\00\00\00\00\00\00\003\00\00\00\08\00\00\00\87") + (data (i32.const 7244) "\1c\00\00\00\00\00\00\00\00\00\00\004\00\00\00\08\00\00\00\88") + (data (i32.const 7276) "\1c\00\00\00\00\00\00\00\00\00\00\005\00\00\00\08\00\00\00\89") + (data (i32.const 7308) "\1c\00\00\00\00\00\00\00\00\00\00\006\00\00\00\08\00\00\00\8a") + (data (i32.const 7340) "\1c\00\00\00\00\00\00\00\00\00\00\007\00\00\00\08\00\00\00\8b") + (data (i32.const 7372) "\1c\00\00\00\00\00\00\00\00\00\00\008\00\00\00\08\00\00\00\8c") + (data (i32.const 7404) "\1c\00\00\00\00\00\00\00\00\00\00\009\00\00\00\08\00\00\00\8d") + (data (i32.const 7436) "\1c\00\00\00\00\00\00\00\00\00\00\00:\00\00\00\08\00\00\00\8e") + (data (i32.const 7468) "\1c\00\00\00\00\00\00\00\00\00\00\00;\00\00\00\08\00\00\00\8f") + (data (i32.const 7500) "\1c\00\00\00\00\00\00\00\00\00\00\00<\00\00\00\08\00\00\00\90") + (data (i32.const 7532) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00$\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") + (data (i32.const 7596) ",\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\10\00\00\00\80\1d\00\00\80\1d\00\00$\00\00\00\t") + (data (i32.const 7644) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00,\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00\n") + (data (i32.const 7708) ",\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\10\00\00\00\f0\1d\00\00\f0\1d\00\00,\00\00\00\0b") + (data (i32.const 7756) "\1c\00\00\00\00\00\00\00\00\00\00\00\01") + (data (i32.const 7788) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") + (data (i32.const 7916) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") + (data (i32.const 7980) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\000") (data (i32.const 8012) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 8412) "\1c\04") - (data (i32.const 8424) "\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") - (data (i32.const 9468) "\\") - (data (i32.const 9480) "\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") - (data (i32.const 9564) "\1c") - (data (i32.const 9576) "\01\00\00\00\02\00\00\00,") - (data (i32.const 9596) ",") - (data (i32.const 9608) "\01\00\00\00\12\00\00\001\00,\002\00,\003\00,\004\00,\005") - (data (i32.const 9644) "\1c") - (data (i32.const 9656) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 9676) "\1c") - (data (i32.const 9688) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 9708) ",") - (data (i32.const 9720) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 9756) ",") - (data (i32.const 9768) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 8412) "\1c\04\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") + (data (i32.const 9468) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") + (data (i32.const 9564) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00,") + (data (i32.const 9596) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\001\00,\002\00,\003\00,\004\00,\005") + (data (i32.const 9644) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000") + (data (i32.const 9676) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N") + (data (i32.const 9708) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 9756) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 9864) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\00\00\00\10\00\00\00\80+\00\00\80+\00\00\18\00\00\00\03") - (data (i32.const 11212) "\1c") - (data (i32.const 11228) "\03\00\00\00\92\91\90") - (data (i32.const 11244) ",") - (data (i32.const 11256) "\0f\00\00\00\10\00\00\00\e0+\00\00\e0+\00\00\03\00\00\00\03") - (data (i32.const 11292) "\1c") - (data (i32.const 11308) "\n\00\00\00\01\02\03") - (data (i32.const 11324) ",") - (data (i32.const 11336) "\01\00\00\00\12\00\00\00I\00n\00t\008\00A\00r\00r\00a\00y") - (data (i32.const 11372) "\1c") - (data (i32.const 11388) "\n\00\00\00\01\02\03\04\05\06") - (data (i32.const 11404) "\1c") - (data (i32.const 11420) "\n\00\00\00\01\02\03\04\05\06\07\08\t") - (data (i32.const 11436) "\1c") - (data (i32.const 11452) "\n\00\00\00\01\02\00\00\00\06\07\08\t") - (data (i32.const 11468) "\1c") - (data (i32.const 11484) "\n\00\00\00defg\e8\e9\ea\92\91\90") - (data (i32.const 11500) "\1c") - (data (i32.const 11516) "\n\00\00\00\01\02\03") - (data (i32.const 11532) ",") - (data (i32.const 11544) "\01\00\00\00\14\00\00\00U\00i\00n\00t\008\00A\00r\00r\00a\00y") - (data (i32.const 11580) "\1c") - (data (i32.const 11596) "\n\00\00\00\01\02\03\04\05\06") - (data (i32.const 11612) "\1c") - (data (i32.const 11628) "\n\00\00\00\01\02\03\04\05\06\07\08\t") - (data (i32.const 11644) "\1c") - (data (i32.const 11660) "\n\00\00\00\01\02\00\00\00\06\07\08\t") - (data (i32.const 11676) "\1c") - (data (i32.const 11692) "\n\00\00\00defg\e8\e9\ea\92\91\90") - (data (i32.const 11708) "\1c") - (data (i32.const 11724) "\n\00\00\00\01\02\03") - (data (i32.const 11740) "<") - (data (i32.const 11752) "\01\00\00\00\"\00\00\00U\00i\00n\00t\008\00C\00l\00a\00m\00p\00e\00d\00A\00r\00r\00a\00y") - (data (i32.const 11804) "\1c") - (data (i32.const 11820) "\n\00\00\00\01\02\03\04\05\06") - (data (i32.const 11836) "\1c") - (data (i32.const 11852) "\n\00\00\00\01\02\03\04\05\06\07\08\t") - (data (i32.const 11868) "\1c") - (data (i32.const 11884) "\n\00\00\00\01\02\00\00\00\06\07\08\t") - (data (i32.const 11900) "\1c") - (data (i32.const 11916) "\n\00\00\00defg\ff\ff\ff") - (data (i32.const 11932) ",") - (data (i32.const 11948) "\14\00\00\00\01\00\02\00\03") - (data (i32.const 11980) ",") - (data (i32.const 11992) "\01\00\00\00\14\00\00\00I\00n\00t\001\006\00A\00r\00r\00a\00y") - (data (i32.const 12028) ",") - (data (i32.const 12044) "\14\00\00\00\01\00\02\00\03\00\04\00\05\00\06") - (data (i32.const 12076) ",") - (data (i32.const 12092) "\14\00\00\00\01\00\02\00\03\00\04\00\05\00\06\00\07\00\08\00\t") - (data (i32.const 12124) ",") - (data (i32.const 12140) "\14\00\00\00\01\00\02\00\00\00\00\00\00\00\06\00\07\00\08\00\t") - (data (i32.const 12172) ",") - (data (i32.const 12188) "\14\00\00\00d\00e\00f\00g\00\e8\03\e9\03\ea\03\92\ff\91\ff\90\ff") - (data (i32.const 12220) ",") - (data (i32.const 12236) "\14\00\00\00\01\00\02\00\03") - (data (i32.const 12268) ",") - (data (i32.const 12280) "\01\00\00\00\16\00\00\00U\00i\00n\00t\001\006\00A\00r\00r\00a\00y") - (data (i32.const 12316) ",") - (data (i32.const 12332) "\14\00\00\00\01\00\02\00\03\00\04\00\05\00\06") - (data (i32.const 12364) ",") - (data (i32.const 12380) "\14\00\00\00\01\00\02\00\03\00\04\00\05\00\06\00\07\00\08\00\t") - (data (i32.const 12412) ",") - (data (i32.const 12428) "\14\00\00\00\01\00\02\00\00\00\00\00\00\00\06\00\07\00\08\00\t") - (data (i32.const 12460) ",") - (data (i32.const 12476) "\14\00\00\00d\00e\00f\00g\00\e8\03\e9\03\ea\03\92\ff\91\ff\90\ff") - (data (i32.const 12508) "<") - (data (i32.const 12524) "(\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 12572) ",") - (data (i32.const 12584) "\01\00\00\00\14\00\00\00I\00n\00t\003\002\00A\00r\00r\00a\00y") - (data (i32.const 12620) "<") - (data (i32.const 12636) "(\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06") - (data (i32.const 12684) "<") - (data (i32.const 12700) "(\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 12748) "<") - (data (i32.const 12764) "(\00\00\00\01\00\00\00\02") - (data (i32.const 12788) "\06\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 12812) "<") - (data (i32.const 12828) "(\00\00\00d\00\00\00e\00\00\00f\00\00\00g\00\00\00\e8\03\00\00\e9\03\00\00\ea\03\00\00\92\ff\ff\ff\91\ff\ff\ff\90\ff\ff\ff") - (data (i32.const 12876) "<") - (data (i32.const 12892) "(\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 12940) ",") - (data (i32.const 12952) "\01\00\00\00\16\00\00\00U\00i\00n\00t\003\002\00A\00r\00r\00a\00y") - (data (i32.const 12988) "<") - (data (i32.const 13004) "(\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06") - (data (i32.const 13052) "<") - (data (i32.const 13068) "(\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 13116) "<") - (data (i32.const 13132) "(\00\00\00\01\00\00\00\02") - (data (i32.const 13156) "\06\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 13180) "<") - (data (i32.const 13196) "(\00\00\00d\00\00\00e\00\00\00f\00\00\00g\00\00\00\e8\03\00\00\e9\03\00\00\ea\03\00\00\92\ff\ff\ff\91\ff\ff\ff\90\ff\ff\ff") - (data (i32.const 13244) "l") - (data (i32.const 13260) "P\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\03") - (data (i32.const 13356) ",") - (data (i32.const 13368) "\01\00\00\00\14\00\00\00I\00n\00t\006\004\00A\00r\00r\00a\00y") - (data (i32.const 13404) "l") - (data (i32.const 13420) "P\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\06") - (data (i32.const 13516) "l") - (data (i32.const 13532) "P\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\06\00\00\00\00\00\00\00\07\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\t") - (data (i32.const 13628) "l") - (data (i32.const 13644) "P\00\00\00\01\00\00\00\00\00\00\00\02") - (data (i32.const 13688) "\06\00\00\00\00\00\00\00\07\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\t") - (data (i32.const 13740) "l") - (data (i32.const 13756) "P\00\00\00d\00\00\00\00\00\00\00e\00\00\00\00\00\00\00f\00\00\00\00\00\00\00g\00\00\00\00\00\00\00\e8\03\00\00\00\00\00\00\e9\03\00\00\00\00\00\00\ea\03\00\00\00\00\00\00\92\ff\ff\ff\ff\ff\ff\ff\91\ff\ff\ff\ff\ff\ff\ff\90\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 13852) "l") - (data (i32.const 13868) "P\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\03") - (data (i32.const 13964) ",") - (data (i32.const 13976) "\01\00\00\00\16\00\00\00U\00i\00n\00t\006\004\00A\00r\00r\00a\00y") - (data (i32.const 14012) "l") - (data (i32.const 14028) "P\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\06") - (data (i32.const 14124) "l") - (data (i32.const 14140) "P\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\06\00\00\00\00\00\00\00\07\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\t") - (data (i32.const 14236) "l") - (data (i32.const 14252) "P\00\00\00\01\00\00\00\00\00\00\00\02") - (data (i32.const 14296) "\06\00\00\00\00\00\00\00\07\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\t") - (data (i32.const 14348) "l") - (data (i32.const 14364) "P\00\00\00d\00\00\00\00\00\00\00e\00\00\00\00\00\00\00f\00\00\00\00\00\00\00g\00\00\00\00\00\00\00\e8\03\00\00\00\00\00\00\e9\03\00\00\00\00\00\00\ea\03\00\00\00\00\00\00\92\ff\ff\ff\ff\ff\ff\ff\91\ff\ff\ff\ff\ff\ff\ff\90\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 14460) "<") - (data (i32.const 14476) "(\00\00\00\00\00\80?\00\00\00@\00\00@@") - (data (i32.const 14524) ",") - (data (i32.const 14536) "\01\00\00\00\18\00\00\00F\00l\00o\00a\00t\003\002\00A\00r\00r\00a\00y") - (data (i32.const 14572) "<") - (data (i32.const 14588) "(\00\00\00\00\00\80?\00\00\00@\00\00@@\00\00\80@\00\00\a0@\00\00\c0@") - (data (i32.const 14636) "<") - (data (i32.const 14652) "(\00\00\00\00\00\80?\00\00\00@\00\00@@\00\00\80@\00\00\a0@\00\00\c0@\00\00\e0@\00\00\00A\00\00\10A") - (data (i32.const 14700) "<") - (data (i32.const 14716) "(\00\00\00\00\00\c8B\00\00\caB\00\00\ccB\00\00\ceB\00\00zD\00@zD\00\80zD\00\00\dc\c2\00\00\de\c2\00\00\e0\c2") - (data (i32.const 14764) "l") - (data (i32.const 14780) "P") - (data (i32.const 14790) "\f0?\00\00\00\00\00\00\00@\00\00\00\00\00\00\08@") - (data (i32.const 14876) ",") - (data (i32.const 14888) "\01\00\00\00\18\00\00\00F\00l\00o\00a\00t\006\004\00A\00r\00r\00a\00y") - (data (i32.const 14924) "l") - (data (i32.const 14940) "P") - (data (i32.const 14950) "\f0?\00\00\00\00\00\00\00@\00\00\00\00\00\00\08@\00\00\00\00\00\00\10@\00\00\00\00\00\00\14@\00\00\00\00\00\00\18@") - (data (i32.const 15036) "l") - (data (i32.const 15052) "P") - (data (i32.const 15062) "\f0?\00\00\00\00\00\00\00@\00\00\00\00\00\00\08@\00\00\00\00\00\00\10@\00\00\00\00\00\00\14@\00\00\00\00\00\00\18@\00\00\00\00\00\00\1c@\00\00\00\00\00\00 @\00\00\00\00\00\00\"@") - (data (i32.const 15148) "l") - (data (i32.const 15164) "P") - (data (i32.const 15174) "Y@\00\00\00\00\00@Y@\00\00\00\00\00\80Y@\00\00\00\00\00\c0Y@\00\00\00\00\00@\8f@\00\00\00\00\00H\8f@\00\00\00\00\00P\8f@\00\00\00\00\00\80[\c0\00\00\00\00\00\c0[\c0\00\00\00\00\00\00\\\c0") - (data (i32.const 15260) "\1c") - (data (i32.const 15276) "\n\00\00\00\00\ff\00\00\00d\n\ff\ff") - (data (i32.const 15292) "\1c") - (data (i32.const 15308) "\n\00\00\00\01\ffd\ff\00\00d\n\ff") - (data (i32.const 15324) "\1c") - (data (i32.const 15336) "E\00\00\00\08\00\00\00\91") - (data (i32.const 15356) "\1c") - (data (i32.const 15368) "E\00\00\00\08\00\00\00\92") - (data (i32.const 15388) "\1c") - (data (i32.const 15400) "F\00\00\00\08\00\00\00\93") - (data (i32.const 15420) "\1c") - (data (i32.const 15432) "F\00\00\00\08\00\00\00\94") - (data (i32.const 15452) "\1c") - (data (i32.const 15464) "F\00\00\00\08\00\00\00\95") - (data (i32.const 15484) "\1c") - (data (i32.const 15496) "F\00\00\00\08\00\00\00\96") - (data (i32.const 15516) "\1c") - (data (i32.const 15528) "G\00\00\00\08\00\00\00\97") - (data (i32.const 15548) "\1c") - (data (i32.const 15560) "G\00\00\00\08\00\00\00\98") - (data (i32.const 15580) "\1c") - (data (i32.const 15592) "H\00\00\00\08\00\00\00\99") - (data (i32.const 15612) "\1c") - (data (i32.const 15624) "H\00\00\00\08\00\00\00\9a") - (data (i32.const 15644) "\1c") - (data (i32.const 15656) "I\00\00\00\08\00\00\00\9b") - (data (i32.const 15676) "\1c") - (data (i32.const 15688) "I\00\00\00\08\00\00\00\9c") - (data (i32.const 15708) "\1c") - (data (i32.const 15720) "J\00\00\00\08\00\00\00\9d") - (data (i32.const 15740) "\1c") - (data (i32.const 15752) "J\00\00\00\08\00\00\00\9e") - (data (i32.const 15772) "\1c") - (data (i32.const 15784) "K\00\00\00\08\00\00\00\9f") - (data (i32.const 15804) "\1c") - (data (i32.const 15816) "K\00\00\00\08\00\00\00\a0") - (data (i32.const 15836) "\1c") - (data (i32.const 15848) "L\00\00\00\08\00\00\00\a1") - (data (i32.const 15868) "\1c") - (data (i32.const 15880) "L\00\00\00\08\00\00\00\a2") - (data (i32.const 15900) "\1c") - (data (i32.const 15912) "M\00\00\00\08\00\00\00\a3") - (data (i32.const 15932) "\1c") - (data (i32.const 15944) "M\00\00\00\08\00\00\00\a4") - (data (i32.const 15964) "\1c") - (data (i32.const 15976) "\0e\00\00\00\08\00\00\00\a5") - (data (i32.const 16000) "N\00\00\00 \00\00\00\00\00\00\00 ") - (data (i32.const 16028) "A\08\00\00\02\00\00\00A\00\00\00\02\00\00\00A\00\00\00\02\00\00\00\81\08\00\00\02\00\00\00\81\00\00\00\02\00\00\00\01\t\00\00\02\00\00\00\01\01\00\00\02\00\00\00\01\n\00\00\02\00\00\00\01\02\00\00\02\00\00\00\01\19\00\00\02\00\00\00\01\1a\00\00\02") - (data (i32.const 16124) "B\08\00\00\00\00\00\00\02\t") - (data (i32.const 16492) "\02\19\00\00\00\00\00\00\02\1a\00\00\00\00\00\00B\00\00\00\00\00\00\00\82\08\00\00\00\00\00\00\82\00\00\00\00\00\00\00\02\01\00\00\00\00\00\00\02\n\00\00\00\00\00\00\02\02") + (data (i32.const 10780) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\001\00.\000\00,\002\00.\000\00,\003\00.\000\00,\004\00.\000\00,\005\00.\000") + (data (i32.const 10844) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00,\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00\n") + (data (i32.const 10908) ",\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\10\00\00\00p*\00\00p*\00\00,\00\00\00\0b") + (data (i32.const 10956) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 10988) ",\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\10\00\00\00\e0*\00\00\e0*\00\00\0c\00\00\00\03") + (data (i32.const 11036) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\00\80@\00\00\a0@\00\00\c0@") + (data (i32.const 11068) ",\00\00\00\00\00\00\00\00\00\00\00=\00\00\00\10\00\00\000+\00\000+\00\00\0c\00\00\00\03") + (data (i32.const 11116) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff") + (data (i32.const 11164) ",\00\00\00\00\00\00\00\00\00\00\00>\00\00\00\10\00\00\00\80+\00\00\80+\00\00\18\00\00\00\03") + (data (i32.const 11212) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\92\91\90") + (data (i32.const 11244) ",\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\10\00\00\00\e0+\00\00\e0+\00\00\03\00\00\00\03") + (data (i32.const 11292) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\01\02\03") + (data (i32.const 11324) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00I\00n\00t\008\00A\00r\00r\00a\00y") + (data (i32.const 11372) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\01\02\03\04\05\06") + (data (i32.const 11404) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\01\02\03\04\05\06\07\08\t") + (data (i32.const 11436) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\01\02\00\00\00\06\07\08\t") + (data (i32.const 11468) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00defg\e8\e9\ea\92\91\90") + (data (i32.const 11500) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\01\02\03") + (data (i32.const 11532) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00U\00i\00n\00t\008\00A\00r\00r\00a\00y") + (data (i32.const 11580) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\01\02\03\04\05\06") + (data (i32.const 11612) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\01\02\03\04\05\06\07\08\t") + (data (i32.const 11644) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\01\02\00\00\00\06\07\08\t") + (data (i32.const 11676) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00defg\e8\e9\ea\92\91\90") + (data (i32.const 11708) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\01\02\03") + (data (i32.const 11740) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\"\00\00\00U\00i\00n\00t\008\00C\00l\00a\00m\00p\00e\00d\00A\00r\00r\00a\00y") + (data (i32.const 11804) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\01\02\03\04\05\06") + (data (i32.const 11836) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\01\02\03\04\05\06\07\08\t") + (data (i32.const 11868) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\01\02\00\00\00\06\07\08\t") + (data (i32.const 11900) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00defg\ff\ff\ff") + (data (i32.const 11932) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\02\00\03") + (data (i32.const 11980) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00I\00n\00t\001\006\00A\00r\00r\00a\00y") + (data (i32.const 12028) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\02\00\03\00\04\00\05\00\06") + (data (i32.const 12076) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\02\00\03\00\04\00\05\00\06\00\07\00\08\00\t") + (data (i32.const 12124) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\02\00\00\00\00\00\00\00\06\00\07\00\08\00\t") + (data (i32.const 12172) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00d\00e\00f\00g\00\e8\03\e9\03\ea\03\92\ff\91\ff\90\ff") + (data (i32.const 12220) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\02\00\03") + (data (i32.const 12268) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00U\00i\00n\00t\001\006\00A\00r\00r\00a\00y") + (data (i32.const 12316) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\02\00\03\00\04\00\05\00\06") + (data (i32.const 12364) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\02\00\03\00\04\00\05\00\06\00\07\00\08\00\t") + (data (i32.const 12412) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\01\00\02\00\00\00\00\00\00\00\06\00\07\00\08\00\t") + (data (i32.const 12460) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00d\00e\00f\00g\00\e8\03\e9\03\ea\03\92\ff\91\ff\90\ff") + (data (i32.const 12508) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 12572) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00I\00n\00t\003\002\00A\00r\00r\00a\00y") + (data (i32.const 12620) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06") + (data (i32.const 12684) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") + (data (i32.const 12748) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") + (data (i32.const 12812) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\00\00\00d\00\00\00e\00\00\00f\00\00\00g\00\00\00\e8\03\00\00\e9\03\00\00\ea\03\00\00\92\ff\ff\ff\91\ff\ff\ff\90\ff\ff\ff") + (data (i32.const 12876) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 12940) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00U\00i\00n\00t\003\002\00A\00r\00r\00a\00y") + (data (i32.const 12988) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06") + (data (i32.const 13052) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") + (data (i32.const 13116) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") + (data (i32.const 13180) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\00\00\00d\00\00\00e\00\00\00f\00\00\00g\00\00\00\e8\03\00\00\e9\03\00\00\ea\03\00\00\92\ff\ff\ff\91\ff\ff\ff\90\ff\ff\ff") + (data (i32.const 13244) "l\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00P\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\03") + (data (i32.const 13356) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00I\00n\00t\006\004\00A\00r\00r\00a\00y") + (data (i32.const 13404) "l\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00P\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\06") + (data (i32.const 13516) "l\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00P\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\06\00\00\00\00\00\00\00\07\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\t") + (data (i32.const 13628) "l\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00P\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\00\00\00\00\07\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\t") + (data (i32.const 13740) "l\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00P\00\00\00d\00\00\00\00\00\00\00e\00\00\00\00\00\00\00f\00\00\00\00\00\00\00g\00\00\00\00\00\00\00\e8\03\00\00\00\00\00\00\e9\03\00\00\00\00\00\00\ea\03\00\00\00\00\00\00\92\ff\ff\ff\ff\ff\ff\ff\91\ff\ff\ff\ff\ff\ff\ff\90\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 13852) "l\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00P\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\03") + (data (i32.const 13964) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00U\00i\00n\00t\006\004\00A\00r\00r\00a\00y") + (data (i32.const 14012) "l\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00P\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\06") + (data (i32.const 14124) "l\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00P\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\06\00\00\00\00\00\00\00\07\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\t") + (data (i32.const 14236) "l\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00P\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\06\00\00\00\00\00\00\00\07\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\t") + (data (i32.const 14348) "l\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00P\00\00\00d\00\00\00\00\00\00\00e\00\00\00\00\00\00\00f\00\00\00\00\00\00\00g\00\00\00\00\00\00\00\e8\03\00\00\00\00\00\00\e9\03\00\00\00\00\00\00\ea\03\00\00\00\00\00\00\92\ff\ff\ff\ff\ff\ff\ff\91\ff\ff\ff\ff\ff\ff\ff\90\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 14460) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\00\00\80?\00\00\00@\00\00@@") + (data (i32.const 14524) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00F\00l\00o\00a\00t\003\002\00A\00r\00r\00a\00y") + (data (i32.const 14572) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\00\00\80?\00\00\00@\00\00@@\00\00\80@\00\00\a0@\00\00\c0@") + (data (i32.const 14636) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\00\00\80?\00\00\00@\00\00@@\00\00\80@\00\00\a0@\00\00\c0@\00\00\e0@\00\00\00A\00\00\10A") + (data (i32.const 14700) "<\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\00\00\c8B\00\00\caB\00\00\ccB\00\00\ceB\00\00zD\00@zD\00\80zD\00\00\dc\c2\00\00\de\c2\00\00\e0\c2") + (data (i32.const 14764) "l\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00P\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00@\00\00\00\00\00\00\08@") + (data (i32.const 14876) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00F\00l\00o\00a\00t\006\004\00A\00r\00r\00a\00y") + (data (i32.const 14924) "l\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00P\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00@\00\00\00\00\00\00\08@\00\00\00\00\00\00\10@\00\00\00\00\00\00\14@\00\00\00\00\00\00\18@") + (data (i32.const 15036) "l\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00P\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00@\00\00\00\00\00\00\08@\00\00\00\00\00\00\10@\00\00\00\00\00\00\14@\00\00\00\00\00\00\18@\00\00\00\00\00\00\1c@\00\00\00\00\00\00 @\00\00\00\00\00\00\"@") + (data (i32.const 15148) "l\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00P\00\00\00\00\00\00\00\00\00Y@\00\00\00\00\00@Y@\00\00\00\00\00\80Y@\00\00\00\00\00\c0Y@\00\00\00\00\00@\8f@\00\00\00\00\00H\8f@\00\00\00\00\00P\8f@\00\00\00\00\00\80[\c0\00\00\00\00\00\c0[\c0\00\00\00\00\00\00\\\c0") + (data (i32.const 15260) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\00\ff\00\00\00d\n\ff\ff") + (data (i32.const 15292) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\01\ffd\ff\00\00d\n\ff") + (data (i32.const 15324) "\1c\00\00\00\00\00\00\00\00\00\00\00E\00\00\00\08\00\00\00\91") + (data (i32.const 15356) "\1c\00\00\00\00\00\00\00\00\00\00\00E\00\00\00\08\00\00\00\92") + (data (i32.const 15388) "\1c\00\00\00\00\00\00\00\00\00\00\00F\00\00\00\08\00\00\00\93") + (data (i32.const 15420) "\1c\00\00\00\00\00\00\00\00\00\00\00F\00\00\00\08\00\00\00\94") + (data (i32.const 15452) "\1c\00\00\00\00\00\00\00\00\00\00\00F\00\00\00\08\00\00\00\95") + (data (i32.const 15484) "\1c\00\00\00\00\00\00\00\00\00\00\00F\00\00\00\08\00\00\00\96") + (data (i32.const 15516) "\1c\00\00\00\00\00\00\00\00\00\00\00G\00\00\00\08\00\00\00\97") + (data (i32.const 15548) "\1c\00\00\00\00\00\00\00\00\00\00\00G\00\00\00\08\00\00\00\98") + (data (i32.const 15580) "\1c\00\00\00\00\00\00\00\00\00\00\00H\00\00\00\08\00\00\00\99") + (data (i32.const 15612) "\1c\00\00\00\00\00\00\00\00\00\00\00H\00\00\00\08\00\00\00\9a") + (data (i32.const 15644) "\1c\00\00\00\00\00\00\00\00\00\00\00I\00\00\00\08\00\00\00\9b") + (data (i32.const 15676) "\1c\00\00\00\00\00\00\00\00\00\00\00I\00\00\00\08\00\00\00\9c") + (data (i32.const 15708) "\1c\00\00\00\00\00\00\00\00\00\00\00J\00\00\00\08\00\00\00\9d") + (data (i32.const 15740) "\1c\00\00\00\00\00\00\00\00\00\00\00J\00\00\00\08\00\00\00\9e") + (data (i32.const 15772) "\1c\00\00\00\00\00\00\00\00\00\00\00K\00\00\00\08\00\00\00\9f") + (data (i32.const 15804) "\1c\00\00\00\00\00\00\00\00\00\00\00K\00\00\00\08\00\00\00\a0") + (data (i32.const 15836) "\1c\00\00\00\00\00\00\00\00\00\00\00L\00\00\00\08\00\00\00\a1") + (data (i32.const 15868) "\1c\00\00\00\00\00\00\00\00\00\00\00L\00\00\00\08\00\00\00\a2") + (data (i32.const 15900) "\1c\00\00\00\00\00\00\00\00\00\00\00M\00\00\00\08\00\00\00\a3") + (data (i32.const 15932) "\1c\00\00\00\00\00\00\00\00\00\00\00M\00\00\00\08\00\00\00\a4") + (data (i32.const 15964) "\1c\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\08\00\00\00\a5") + (data (i32.const 16000) "N\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00A\08\00\00\02\00\00\00A\00\00\00\02\00\00\00A\00\00\00\02\00\00\00\81\08\00\00\02\00\00\00\81\00\00\00\02\00\00\00\01\t\00\00\02\00\00\00\01\01\00\00\02\00\00\00\01\n\00\00\02\00\00\00\01\02\00\00\02\00\00\00\01\19\00\00\02\00\00\00\01\1a\00\00\02\00\00\00\00\00\00\00\00\00\00\00B\08\00\00\00\00\00\00\02\t\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\19\00\00\00\00\00\00\02\1a\00\00\00\00\00\00B\00\00\00\00\00\00\00\82\08\00\00\00\00\00\00\82\00\00\00\00\00\00\00\02\01\00\00\00\00\00\00\02\n\00\00\00\00\00\00\02\02") (table $0 166 funcref) (elem $0 (i32.const 1) $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testArraySort<~lib/typedarray/Int8Array,i8>~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testArraySort<~lib/typedarray/Uint8Array,u8>~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testArraySort<~lib/typedarray/Uint8Array,u8>~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testArraySort<~lib/typedarray/Int16Array,i16>~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testArraySort<~lib/typedarray/Uint16Array,u16>~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testArraySort<~lib/typedarray/Int32Array,i32>~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testArraySort<~lib/typedarray/Uint32Array,u32>~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testArraySort<~lib/typedarray/Int64Array,i64>~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testArraySort<~lib/typedarray/Uint64Array,u64>~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testArraySort<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySort<~lib/typedarray/Float64Array,f64>~anonymous|0) (export "memory" (memory $0)) @@ -2054,197 +1745,6 @@ end local.get $1 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $2 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - local.tee $4 - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - local.get $1 - i32.store8 offset=1 - local.get $0 - local.get $1 - i32.store8 offset=2 - local.get $4 - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $4 - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - local.get $1 - i32.store8 offset=3 - local.get $4 - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $4 - i32.add - local.tee $5 - local.get $1 - i32.const 255 - i32.and - i32.const 16843009 - i32.mul - local.tee $0 - i32.store - local.get $5 - local.get $2 - local.get $4 - i32.sub - i32.const -4 - i32.and - local.tee $2 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.get $0 - i32.store - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $5 - local.get $0 - i32.store offset=4 - local.get $5 - local.get $0 - i32.store offset=8 - local.get $1 - i32.const 12 - i32.sub - local.get $0 - i32.store - local.get $1 - i32.const 8 - i32.sub - local.get $0 - i32.store - local.get $2 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $5 - local.get $0 - i32.store offset=12 - local.get $5 - local.get $0 - i32.store offset=16 - local.get $5 - local.get $0 - i32.store offset=20 - local.get $5 - local.get $0 - i32.store offset=24 - local.get $1 - i32.const 28 - i32.sub - local.get $0 - i32.store - local.get $1 - i32.const 24 - i32.sub - local.get $0 - i32.store - local.get $1 - i32.const 20 - i32.sub - local.get $0 - i32.store - local.get $1 - i32.const 16 - i32.sub - local.get $0 - i32.store - local.get $5 - local.get $5 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $4 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.sub - local.set $2 - local.get $0 - i64.extend_i32_u - local.tee $3 - i64.const 32 - i64.shl - local.get $3 - i64.or - local.set $3 - loop $while-continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $3 - i64.store - local.get $1 - local.get $3 - i64.store offset=8 - local.get $1 - local.get $3 - i64.store offset=16 - local.get $1 - local.get $3 - i64.store offset=24 - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2358,7 +1858,7 @@ local.tee $1 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $1 ) (func $std/typedarray/testInstantiate (param $0 i32) @@ -2380,23 +1880,9 @@ end global.get $~lib/memory/__stack_pointer local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $1 - i64.const 0 - i64.store offset=32 - local.get $1 i32.const 0 - i32.store offset=40 + i32.const 44 + memory.fill local.get $1 local.get $0 call $~lib/typedarray/Int8Array#constructor @@ -3899,20 +3385,195 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/typedarray/Int8Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=8 + local.get $1 + i32.le_u + if + i32.const 1360 + i32.const 1632 + i32.const 25 + i32.const 45 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32.load offset=4 + i32.add + i32.load8_s + ) + (func $std/typedarray/isInt8ArrayEqual (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) (local $4 i32) local.get $0 + i32.load offset=8 + local.get $1 + i32.load offset=12 + i32.ne + if + i32.const 0 + return + end + local.get $0 + i32.load offset=8 + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Int8Array#__get + local.set $4 + local.get $1 + i32.load offset=12 + local.get $2 + i32.le_u + if + i32.const 1360 + i32.const 1760 + i32.const 114 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.load offset=4 + i32.add + i32.load8_s + local.get $4 + i32.ne + if + i32.const 0 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 + ) + (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=12 + local.get $1 + i32.le_u + if + i32.const 1360 + i32.const 1760 + i32.const 114 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $0 i32.load offset=4 - local.set $4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $std/typedarray/isInt32ArrayEqual (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=12 local.get $0 i32.load offset=8 - local.set $0 + i32.const 2 + i32.shr_u + i32.ne + if + i32.const 0 + return + end + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Int32Array#__get + local.get $1 + local.get $2 + call $~lib/array/Array#__get + i32.ne + if + i32.const 0 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 + ) + (func $~lib/typedarray/Int32Array#copyWithin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + local.get $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $4 + local.get $3 + local.get $4 + i32.lt_s + select + local.set $5 + local.get $0 + i32.load offset=4 + local.tee $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $4 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $4 + local.get $1 + local.get $4 + i32.lt_s + select + end + local.tee $1 + i32.const 2 + i32.shl + i32.add local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $0 local.get $2 + local.get $4 i32.add local.tee $2 i32.const 0 @@ -3922,1222 +3583,110 @@ select else local.get $2 - local.get $0 - local.get $0 + local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select end local.tee $2 + i32.const 2 + i32.shl local.get $3 + i32.add + local.get $5 i32.const 0 i32.lt_s if (result i32) - local.get $0 - local.get $3 + local.get $4 + local.get $5 i32.add - local.tee $0 + local.tee $3 i32.const 0 - local.get $0 + local.get $3 i32.const 0 i32.gt_s select else - local.get $3 - local.get $0 - local.get $0 - local.get $3 + local.get $5 + local.get $4 + local.get $4 + local.get $5 i32.gt_s select end - local.tee $0 - i32.lt_s + local.get $2 + i32.sub + local.tee $2 + local.get $4 + local.get $1 + i32.sub + local.tee $1 + local.get $1 + local.get $2 + i32.gt_s + select + i32.const 2 + i32.shl + memory.copy + local.get $0 + ) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + local.get $0 + local.get $1 + i32.add + ) + (func $~lib/typedarray/Uint8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + i32.load offset=8 + local.get $1 + i32.le_u if - local.get $2 - local.get $4 - i32.add - local.get $1 - local.get $0 - local.get $2 - i32.sub - call $~lib/memory/memory.fill + i32.const 1360 + i32.const 1632 + i32.const 177 + i32.const 45 + call $~lib/builtins/abort + unreachable end + local.get $1 + local.get $0 + i32.load offset=4 + i32.add + local.get $2 + i32.store8 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end + (func $~lib/typedarray/Int16Array#__set (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.get $1 + i32.le_u + if + i32.const 1360 + i32.const 1632 + i32.const 459 + i32.const 64 + call $~lib/builtins/abort + unreachable end local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) - (func $~lib/typedarray/Int8Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=8 - local.get $1 - i32.le_u - if - i32.const 1360 - i32.const 1632 - i32.const 25 - i32.const 45 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i32.load offset=4 - i32.add - i32.load8_s - ) - (func $std/typedarray/isInt8ArrayEqual (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=8 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - return - end - local.get $0 - i32.load offset=8 - local.set $3 - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/typedarray/Int8Array#__get - local.set $4 - local.get $1 - i32.load offset=12 - local.get $2 - i32.le_u - if - i32.const 1360 - i32.const 1760 - i32.const 114 - i32.const 42 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i32.load offset=4 - i32.add - i32.load8_s - local.get $4 - i32.ne - if - i32.const 0 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=12 - local.get $1 - i32.le_u - if - i32.const 1360 - i32.const 1760 - i32.const 114 - i32.const 42 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - ) - (func $std/typedarray/isInt32ArrayEqual (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=12 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.ne - if - i32.const 0 - return - end - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $3 - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/typedarray/Int32Array#__get - local.get $1 - local.get $2 - call $~lib/array/Array#__get - i32.ne - if - i32.const 0 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - ) - (func $~lib/typedarray/Int32Array#copyWithin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - local.get $3 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $4 - local.get $3 - local.get $4 - i32.lt_s - select - local.set $5 - local.get $0 - i32.load offset=4 - local.tee $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $4 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $4 - local.get $1 - local.get $4 - i32.lt_s - select - end - local.tee $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $2 - local.get $4 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $4 - local.get $2 - local.get $4 - i32.lt_s - select - end - local.tee $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - local.get $5 - i32.const 0 - i32.lt_s - if (result i32) - local.get $4 - local.get $5 - i32.add - local.tee $3 - i32.const 0 - local.get $3 - i32.const 0 - i32.gt_s - select - else - local.get $5 - local.get $4 - local.get $4 - local.get $5 - i32.gt_s - select - end - local.get $2 - i32.sub - local.tee $2 - local.get $4 - local.get $1 - i32.sub - local.tee $1 - local.get $1 - local.get $2 - i32.gt_s - select - i32.const 2 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 - i32.add - ) - (func $~lib/typedarray/Uint8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - i32.load offset=8 - local.get $1 - i32.le_u - if - i32.const 1360 - i32.const 1632 - i32.const 177 - i32.const 45 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i32.load offset=4 - i32.add - local.get $2 - i32.store8 - ) - (func $~lib/typedarray/Int16Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.get $1 - i32.le_u - if - i32.const 1360 - i32.const 1632 - i32.const 459 - i32.const 64 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $2 - i32.store16 - ) - (func $~lib/typedarray/Uint16Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.get $1 - i32.le_u + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.store16 + ) + (func $~lib/typedarray/Uint16Array#__set (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.get $1 + i32.le_u if i32.const 1360 i32.const 1632 @@ -5835,7 +4384,7 @@ local.get $1 i32.gt_u select - call $~lib/memory/memory.copy + memory.copy local.get $2 ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -23553,7 +22102,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $4 i32.add @@ -23900,7 +22449,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $4 i32.add @@ -24154,7 +22703,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $4 i32.add @@ -24390,7 +22939,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $4 i32.add @@ -24641,7 +23190,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $4 i32.add @@ -24870,7 +23419,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $4 i32.add @@ -25232,535 +23781,74 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 8000 - br $__inlined_func$~lib/util/number/itoa64 - end - i64.const 0 - local.get $2 - i64.sub - local.get $2 - local.get $2 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.tee $1 - select - local.tee $2 - i64.const 4294967295 - i64.le_u - if - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.wrap_i64 - local.tee $3 - i32.const 100000 - i32.lt_u - if (result i32) - local.get $3 - i32.const 100 - i32.lt_u - if (result i32) - local.get $3 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add - else - local.get $3 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $3 - i32.const 1000 - i32.ge_u - i32.add - end - else - local.get $3 - i32.const 10000000 - i32.lt_u - if (result i32) - local.get $3 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add - else - local.get $3 - i32.const 1000000000 - i32.ge_u - i32.const 8 - i32.add - local.get $3 - i32.const 100000000 - i32.ge_u - i32.add - end - end - local.get $1 - i32.add - local.tee $4 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - local.get $0 - local.get $3 - local.get $4 - call $~lib/util/number/utoa32_dec_lut - else - global.get $~lib/memory/__stack_pointer - local.get $2 - i64.const 1000000000000000 - i64.lt_u - if (result i32) - local.get $2 - i64.const 1000000000000 - i64.lt_u - if (result i32) - local.get $2 - i64.const 100000000000 - i64.ge_u - i32.const 10 - i32.add - local.get $2 - i64.const 10000000000 - i64.ge_u - i32.add - else - local.get $2 - i64.const 100000000000000 - i64.ge_u - i32.const 13 - i32.add - local.get $2 - i64.const 10000000000000 - i64.ge_u - i32.add - end - else - local.get $2 - i64.const 100000000000000000 - i64.lt_u - if (result i32) - local.get $2 - i64.const 10000000000000000 - i64.ge_u - i32.const 16 - i32.add - else - local.get $2 - i64.const -8446744073709551616 - i64.ge_u - i32.const 18 - i32.add - local.get $2 - i64.const 1000000000000000000 - i64.ge_u - i32.add - end - end - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - local.get $0 - local.get $2 - local.get $3 - call $~lib/util/number/utoa64_dec_lut - end - local.get $1 - if - local.get $0 - i32.const 45 - i32.store16 - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - end - local.set $0 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray - end - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.const 9580 - i32.load - i32.const 1 - i32.shr_u - local.tee $7 - i32.const 21 - i32.add - i32.mul - i32.const 21 - i32.add - local.tee $4 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/itcms/__new - local.tee $1 - i32.store - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $6 - i32.lt_s - if - local.get $0 - i32.const 1 - i32.shl - local.get $1 - i32.add - local.get $3 - i32.const 3 - i32.shl - local.get $5 - i32.add - i64.load - call $~lib/util/number/itoa_buffered - local.get $0 - i32.add - local.set $0 - local.get $7 - if - local.get $0 - i32.const 1 - i32.shl - local.get $1 - i32.add - i32.const 9584 - local.get $7 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - local.get $7 - i32.add - local.set $0 - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $4 - local.get $0 - i32.const 1 - i32.shl - local.get $1 - i32.add - local.get $6 - i32.const 3 - i32.shl - local.get $5 - i32.add - i64.load - call $~lib/util/number/itoa_buffered - local.get $0 - i32.add - local.tee $0 - i32.gt_s - if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.set $0 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - local.set $0 - end - local.get $0 - return - end - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - ) - (func $~lib/util/number/itoa_buffered (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i64.const 10 - i64.lt_u - if - local.get $0 - local.get $1 - i64.const 48 - i64.or - i64.store16 - i32.const 1 - return - end - local.get $1 - i64.const 4294967295 - i64.le_u - if - local.get $1 - i32.wrap_i64 - local.tee $2 - i32.const 100000 - i32.lt_u - if (result i32) - local.get $2 - i32.const 100 - i32.lt_u - if (result i32) - local.get $2 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add - else - local.get $2 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $2 - i32.const 1000 - i32.ge_u - i32.add - end - else - local.get $2 - i32.const 10000000 - i32.lt_u - if (result i32) - local.get $2 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add - else - local.get $2 - i32.const 1000000000 - i32.ge_u - i32.const 8 - i32.add - local.get $2 - i32.const 100000000 - i32.ge_u - i32.add - end - end - local.set $3 - local.get $0 - local.get $2 - local.get $3 - call $~lib/util/number/utoa32_dec_lut - else - local.get $0 - local.get $1 - local.get $1 - i64.const 1000000000000000 - i64.lt_u - if (result i32) - local.get $1 - i64.const 1000000000000 - i64.lt_u - if (result i32) - local.get $1 - i64.const 100000000000 - i64.ge_u - i32.const 10 - i32.add - local.get $1 - i64.const 10000000000 - i64.ge_u - i32.add - else - local.get $1 - i64.const 100000000000000 - i64.ge_u - i32.const 13 - i32.add - local.get $1 - i64.const 10000000000000 - i64.ge_u - i32.add - end - else - local.get $1 - i64.const 100000000000000000 - i64.lt_u - if (result i32) - local.get $1 - i64.const 10000000000000000 - i64.ge_u - i32.const 16 - i32.add - else - local.get $1 - i64.const -8446744073709551616 - i64.ge_u - i32.const 18 - i32.add - local.get $1 - i64.const 1000000000000000000 - i64.ge_u - i32.add - end - end - local.tee $3 - call $~lib/util/number/utoa64_dec_lut - end - local.get $3 - ) - (func $~lib/typedarray/Uint64Array#join (param $0 i32) (result i32) - (local $1 i32) - (local $2 i64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - i32.load offset=4 - local.set $7 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $0 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - block $__inlined_func$~lib/util/string/joinIntegerArray - local.get $0 - i32.const 1 - i32.sub - local.tee $6 - i32.const 0 - i32.lt_s - if - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 7776 - local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray - end - local.get $6 - i32.eqz - if - block $__inlined_func$~lib/util/number/utoa64 (result i32) - local.get $7 - i64.load - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $2 - i64.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - i32.const 8000 - br $__inlined_func$~lib/util/number/utoa64 + br $__inlined_func$~lib/util/number/itoa64 end + i64.const 0 + local.get $2 + i64.sub + local.get $2 local.get $2 + i64.const 63 + i64.shr_u + i32.wrap_i64 + local.tee $1 + select + local.tee $2 i64.const 4294967295 i64.le_u if global.get $~lib/memory/__stack_pointer local.get $2 i32.wrap_i64 - local.tee $1 + local.tee $3 i32.const 100000 i32.lt_u if (result i32) - local.get $1 + local.get $3 i32.const 100 i32.lt_u if (result i32) - local.get $1 + local.get $3 i32.const 10 i32.ge_u i32.const 1 i32.add else - local.get $1 + local.get $3 i32.const 10000 i32.ge_u i32.const 3 i32.add - local.get $1 + local.get $3 i32.const 1000 i32.ge_u i32.add end else - local.get $1 + local.get $3 i32.const 10000000 i32.lt_u if (result i32) - local.get $1 + local.get $3 i32.const 1000000 i32.ge_u i32.const 6 i32.add else - local.get $1 + local.get $3 i32.const 1000000000 i32.ge_u i32.const 8 i32.add - local.get $1 + local.get $3 i32.const 100000000 i32.ge_u i32.add end end - local.tee $3 + local.get $1 + i32.add + local.tee $4 i32.const 1 i32.shl i32.const 1 @@ -25768,8 +23856,8 @@ local.tee $0 i32.store local.get $0 - local.get $1 local.get $3 + local.get $4 call $~lib/util/number/utoa32_dec_lut else global.get $~lib/memory/__stack_pointer @@ -25823,7 +23911,9 @@ i32.add end end - local.tee $1 + local.get $1 + i32.add + local.tee $3 i32.const 1 i32.shl i32.const 1 @@ -25832,9 +23922,15 @@ i32.store local.get $0 local.get $2 - local.get $1 + local.get $3 call $~lib/util/number/utoa64_dec_lut end + local.get $1 + if + local.get $0 + i32.const 45 + i32.store16 + end global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -25846,7 +23942,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray + br $__inlined_func$~lib/util/string/joinIntegerArray end global.get $~lib/memory/__stack_pointer local.get $6 @@ -25854,13 +23950,13 @@ i32.load i32.const 1 i32.shr_u - local.tee $3 - i32.const 20 + local.tee $7 + i32.const 21 i32.add i32.mul - i32.const 20 + i32.const 21 i32.add - local.tee $5 + local.tee $4 i32.const 1 i32.shl i32.const 1 @@ -25870,7 +23966,7 @@ i32.const 0 local.set $0 loop $for-loop|0 - local.get $4 + local.get $3 local.get $6 i32.lt_s if @@ -25879,17 +23975,17 @@ i32.shl local.get $1 i32.add - local.get $4 + local.get $3 i32.const 3 i32.shl - local.get $7 + local.get $5 i32.add i64.load - call $~lib/util/number/itoa_buffered + call $~lib/util/number/itoa_buffered local.get $0 i32.add local.set $0 - local.get $3 + local.get $7 if local.get $0 i32.const 1 @@ -25897,2468 +23993,2084 @@ local.get $1 i32.add i32.const 9584 - local.get $3 + local.get $7 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 - local.get $3 + local.get $7 i32.add local.set $0 end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $5 - local.get $0 - i32.const 1 - i32.shl - local.get $1 - i32.add - local.get $6 - i32.const 3 - i32.shl - local.get $7 - i32.add - i64.load - call $~lib/util/number/itoa_buffered - local.get $0 - i32.add - local.tee $0 - i32.gt_s - if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.set $0 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - local.set $0 - end - local.get $0 - return - end - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i32) (param $4 i64) (param $5 i32) (result i32) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i64) - local.get $2 - local.get $1 - i64.sub - local.set $12 - local.get $2 - i64.const 1 - i32.const 0 - local.get $3 - i32.sub - local.tee $10 - i64.extend_i32_s - local.tee $1 - i64.shl - local.tee $13 - i64.const 1 - i64.sub - local.tee $11 - i64.and - local.set $7 - local.get $2 - local.get $1 - i64.shr_u - i32.wrap_i64 - local.tee $3 - i32.const 100000 - i32.lt_u - if (result i32) - local.get $3 - i32.const 100 - i32.lt_u - if (result i32) - local.get $3 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add - else - local.get $3 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $3 - i32.const 1000 - i32.ge_u - i32.add - end - else - local.get $3 - i32.const 10000000 - i32.lt_u - if (result i32) - local.get $3 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add - else - local.get $3 - i32.const 1000000000 - i32.ge_u - i32.const 8 - i32.add - local.get $3 - i32.const 100000000 - i32.ge_u - i32.add - end - end - local.set $9 - loop $while-continue|0 - local.get $9 - i32.const 0 - i32.gt_s - if - block $break|1 - block $case10|1 - block $case9|1 - block $case8|1 - block $case7|1 - block $case6|1 - block $case5|1 - block $case4|1 - block $case3|1 - block $case2|1 - block $case1|1 - block $case0|1 - local.get $9 - i32.const 1 - i32.sub - br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case0|1 $case10|1 - end - local.get $3 - i32.const 1000000000 - i32.div_u - local.set $6 - local.get $3 - i32.const 1000000000 - i32.rem_u - local.set $3 - br $break|1 - end - local.get $3 - i32.const 100000000 - i32.div_u - local.set $6 - local.get $3 - i32.const 100000000 - i32.rem_u - local.set $3 - br $break|1 - end - local.get $3 - i32.const 10000000 - i32.div_u - local.set $6 - local.get $3 - i32.const 10000000 - i32.rem_u - local.set $3 - br $break|1 - end - local.get $3 - i32.const 1000000 - i32.div_u - local.set $6 - local.get $3 - i32.const 1000000 - i32.rem_u - local.set $3 - br $break|1 - end - local.get $3 - i32.const 100000 - i32.div_u - local.set $6 - local.get $3 - i32.const 100000 - i32.rem_u - local.set $3 - br $break|1 - end - local.get $3 - i32.const 10000 - i32.div_u - local.set $6 - local.get $3 - i32.const 10000 - i32.rem_u - local.set $3 - br $break|1 - end - local.get $3 - i32.const 1000 - i32.div_u - local.set $6 - local.get $3 - i32.const 1000 - i32.rem_u - local.set $3 - br $break|1 - end - local.get $3 - i32.const 100 - i32.div_u - local.set $6 - local.get $3 - i32.const 100 - i32.rem_u - local.set $3 - br $break|1 - end - local.get $3 - i32.const 10 - i32.div_u - local.set $6 - local.get $3 - i32.const 10 - i32.rem_u - local.set $3 - br $break|1 - end - local.get $3 - local.set $6 - i32.const 0 - local.set $3 - br $break|1 - end - i32.const 0 - local.set $6 - end - local.get $5 - local.get $6 - i32.or - if - local.get $5 - local.tee $8 - i32.const 1 - i32.add - local.set $5 - local.get $8 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $6 - i32.const 65535 - i32.and - i32.const 48 - i32.add - i32.store16 - end - local.get $9 - i32.const 1 - i32.sub - local.set $9 - local.get $4 - local.get $7 - local.get $3 - i64.extend_i32_u - local.get $10 - i64.extend_i32_s - i64.shl - i64.add - local.tee $1 - i64.ge_u - if - local.get $9 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $9 - i32.const 2 - i32.shl - i32.const 10736 - i32.add - i64.load32_u - local.get $10 - i64.extend_i32_s - i64.shl - local.set $2 - local.get $5 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - local.get $0 - i32.add - local.tee $0 - i32.load16_u - local.set $9 - loop $while-continue|3 - local.get $1 - local.get $12 - i64.lt_u - local.get $2 - local.get $4 - local.get $1 - i64.sub - i64.le_u - i32.and - if (result i32) - local.get $12 - local.get $1 - i64.sub - local.get $1 - local.get $2 - i64.add - local.tee $7 - local.get $12 - i64.sub - i64.gt_u - local.get $7 - local.get $12 - i64.lt_u - i32.or - else - i32.const 0 - end - if - local.get $9 - i32.const 1 - i32.sub - local.set $9 - local.get $1 - local.get $2 - i64.add - local.set $1 - br $while-continue|3 - end - end - local.get $0 - local.get $9 - i32.store16 - local.get $5 - return - end - br $while-continue|0 - end - end - loop $while-continue|4 (result i32) - local.get $4 - i64.const 10 - i64.mul - local.set $4 - local.get $7 - i64.const 10 - i64.mul - local.tee $1 - local.get $10 - i64.extend_i32_s - i64.shr_u - local.tee $2 - local.get $5 - i64.extend_i32_s - i64.or - i64.const 0 - i64.ne - if - local.get $5 - local.tee $3 - i32.const 1 - i32.add - local.set $5 - local.get $3 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $2 - i32.wrap_i64 - i32.const 65535 - i32.and - i32.const 48 - i32.add - i32.store16 - end - local.get $9 - i32.const 1 - i32.sub - local.set $9 - local.get $1 - local.get $11 - i64.and - local.tee $7 - local.get $4 - i64.ge_u - br_if $while-continue|4 - local.get $9 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $7 - local.set $1 - i32.const 0 - local.get $9 - i32.sub - i32.const 2 - i32.shl - i32.const 10736 - i32.add - i64.load32_u - local.get $12 - i64.mul - local.set $2 - local.get $5 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - local.get $0 - i32.add - local.tee $0 - i32.load16_u - local.set $9 - loop $while-continue|6 - local.get $1 - local.get $2 - i64.lt_u - local.get $13 + local.set $3 + br $for-loop|0 + end + end local.get $4 + local.get $0 + i32.const 1 + i32.shl local.get $1 - i64.sub - i64.le_u - i32.and - if (result i32) - local.get $2 - local.get $1 - i64.sub - local.get $1 - local.get $13 - i64.add - local.tee $7 - local.get $2 - i64.sub - i64.gt_u - local.get $2 - local.get $7 - i64.gt_u - i32.or - else - i32.const 0 - end + i32.add + local.get $6 + i32.const 3 + i32.shl + local.get $5 + i32.add + i64.load + call $~lib/util/number/itoa_buffered + local.get $0 + i32.add + local.tee $0 + i32.gt_s if - local.get $9 - i32.const 1 - i32.sub - local.set $9 local.get $1 - local.get $13 - i64.add - local.set $1 - br $while-continue|6 + local.get $0 + call $~lib/string/String#substring + local.set $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + br $__inlined_func$~lib/util/string/joinIntegerArray end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + local.set $0 end local.get $0 - local.get $9 - i32.store16 - local.get $5 + return end + i32.const 33040 + i32.const 33088 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_buffered (param $0 i32) (param $1 i64) (result i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - local.get $2 - i32.eqz + local.get $1 + i64.const 10 + i64.lt_u if - local.get $1 - i32.const 1 - i32.shl local.get $0 - i32.add - i32.const 3145774 - i32.store local.get $1 - i32.const 2 - i32.add + i64.const 48 + i64.or + i64.store16 + i32.const 1 return end local.get $1 - local.get $2 - i32.add - local.tee $3 - i32.const 21 - i32.le_s - local.get $1 - local.get $3 - i32.le_s - i32.and - if (result i32) - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $1 + i64.const 4294967295 + i64.le_u + if + local.get $1 + i32.wrap_i64 + local.tee $2 + i32.const 100000 + i32.lt_u + if (result i32) + local.get $2 + i32.const 100 + i32.lt_u + if (result i32) + local.get $2 + i32.const 10 + i32.ge_u i32.const 1 - i32.shl - local.get $0 i32.add - i32.const 48 - i32.store16 - local.get $1 - i32.const 1 + else + local.get $2 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $2 + i32.const 1000 + i32.ge_u + i32.add + end + else + local.get $2 + i32.const 10000000 + i32.lt_u + if (result i32) + local.get $2 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + else + local.get $2 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $2 + i32.const 100000000 + i32.ge_u i32.add - local.set $1 - br $for-loop|0 end end - local.get $3 - i32.const 1 - i32.shl + local.set $3 local.get $0 - i32.add - i32.const 3145774 - i32.store + local.get $2 local.get $3 - i32.const 2 - i32.add + call $~lib/util/number/utoa32_dec_lut else - local.get $3 - i32.const 21 - i32.le_s - local.get $3 - i32.const 0 - i32.gt_s - i32.and + local.get $0 + local.get $1 + local.get $1 + i64.const 1000000000000000 + i64.lt_u if (result i32) - local.get $3 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.tee $0 - i32.const 2 - i32.add - local.get $0 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 local.get $1 - i32.const 1 - i32.add - else - local.get $3 - i32.const 0 - i32.le_s - local.get $3 - i32.const -6 - i32.gt_s - i32.and + i64.const 1000000000000 + i64.lt_u if (result i32) - i32.const 2 - local.get $3 - i32.sub - local.tee $3 - i32.const 1 - i32.shl - local.get $0 + local.get $1 + i64.const 100000000000 + i64.ge_u + i32.const 10 i32.add - local.get $0 local.get $1 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 3014704 - i32.store - i32.const 2 - local.set $2 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $2 - i32.const 1 - i32.shl - local.get $0 - i32.add - i32.const 48 - i32.store16 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end + i64.const 10000000000 + i64.ge_u + i32.add + else local.get $1 - local.get $3 + i64.const 100000000000000 + i64.ge_u + i32.const 13 + i32.add + local.get $1 + i64.const 10000000000000 + i64.ge_u + i32.add + end + else + local.get $1 + i64.const 100000000000000000 + i64.lt_u + if (result i32) + local.get $1 + i64.const 10000000000000000 + i64.ge_u + i32.const 16 i32.add else local.get $1 - i32.const 1 - i32.eq - if - local.get $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 + i64.const -8446744073709551616 + i64.ge_u + i32.const 18 + i32.add + local.get $1 + i64.const 1000000000000000000 + i64.ge_u + i32.add + end + end + local.tee $3 + call $~lib/util/number/utoa64_dec_lut + end + local.get $3 + ) + (func $~lib/typedarray/Uint64Array#join (param $0 i32) (result i32) + (local $1 i32) + (local $2 i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $0 + i32.load offset=4 + local.set $7 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + block $__inlined_func$~lib/util/string/joinIntegerArray + local.get $0 + i32.const 1 + i32.sub + local.tee $6 + i32.const 0 + i32.lt_s + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 7776 + local.set $0 + br $__inlined_func$~lib/util/string/joinIntegerArray + end + local.get $6 + i32.eqz + if + block $__inlined_func$~lib/util/number/utoa64 (result i32) + local.get $7 + i64.load + local.set $2 + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.add - local.tee $2 - local.get $3 - i32.const 1 i32.sub - local.tee $0 - i32.const 0 + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 i32.lt_s - local.tee $3 + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $2 + i64.eqz if - i32.const 0 - local.get $0 - i32.sub - local.set $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 8000 + br $__inlined_func$~lib/util/number/utoa64 end - local.get $0 - local.get $0 - i32.const 100000 - i32.lt_u - if (result i32) - local.get $0 - i32.const 100 + local.get $2 + i64.const 4294967295 + i64.le_u + if + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.wrap_i64 + local.tee $1 + i32.const 100000 i32.lt_u if (result i32) - local.get $0 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add + local.get $1 + i32.const 100 + i32.lt_u + if (result i32) + local.get $1 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + else + local.get $1 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $1 + i32.const 1000 + i32.ge_u + i32.add + end else - local.get $0 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $0 - i32.const 1000 - i32.ge_u - i32.add + local.get $1 + i32.const 10000000 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + else + local.get $1 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $1 + i32.const 100000000 + i32.ge_u + i32.add + end end - else + local.tee $3 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store local.get $0 - i32.const 10000000 - i32.lt_u + local.get $1 + local.get $3 + call $~lib/util/number/utoa32_dec_lut + else + global.get $~lib/memory/__stack_pointer + local.get $2 + i64.const 1000000000000000 + i64.lt_u if (result i32) - local.get $0 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add + local.get $2 + i64.const 1000000000000 + i64.lt_u + if (result i32) + local.get $2 + i64.const 100000000000 + i64.ge_u + i32.const 10 + i32.add + local.get $2 + i64.const 10000000000 + i64.ge_u + i32.add + else + local.get $2 + i64.const 100000000000000 + i64.ge_u + i32.const 13 + i32.add + local.get $2 + i64.const 10000000000000 + i64.ge_u + i32.add + end else - local.get $0 - i32.const 1000000000 - i32.ge_u - i32.const 8 - i32.add - local.get $0 - i32.const 100000000 - i32.ge_u - i32.add + local.get $2 + i64.const 100000000000000000 + i64.lt_u + if (result i32) + local.get $2 + i64.const 10000000000000000 + i64.ge_u + i32.const 16 + i32.add + else + local.get $2 + i64.const -8446744073709551616 + i64.ge_u + i32.const 18 + i32.add + local.get $2 + i64.const 1000000000000000000 + i64.ge_u + i32.add + end end + local.tee $1 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + local.get $0 + local.get $2 + local.get $1 + call $~lib/util/number/utoa64_dec_lut end - i32.const 1 - i32.add - local.tee $1 - call $~lib/util/number/utoa32_dec_lut - local.get $2 - i32.const 45 - i32.const 43 - local.get $3 - select - i32.store16 - else - local.get $0 + global.get $~lib/memory/__stack_pointer i32.const 4 i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + end + local.set $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + br $__inlined_func$~lib/util/string/joinIntegerArray + end + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.const 9580 + i32.load + i32.const 1 + i32.shr_u + local.tee $3 + i32.const 20 + i32.add + i32.mul + i32.const 20 + i32.add + local.tee $5 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/itcms/__new + local.tee $1 + i32.store + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $4 + local.get $6 + i32.lt_s + if local.get $0 - i32.const 2 - i32.add - local.get $1 i32.const 1 i32.shl - local.tee $2 - i32.const 2 - i32.sub - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - local.get $2 + local.get $1 i32.add - local.tee $0 - i32.const 101 - i32.store16 offset=2 + local.get $4 + i32.const 3 + i32.shl + local.get $7 + i32.add + i64.load + call $~lib/util/number/itoa_buffered local.get $0 - i32.const 4 i32.add - local.tee $4 + local.set $0 local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $2 if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - i32.const 100000 - i32.lt_u - if (result i32) local.get $0 - i32.const 100 - i32.lt_u - if (result i32) - local.get $0 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add - else - local.get $0 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $0 - i32.const 1000 - i32.ge_u - i32.add - end - else + i32.const 1 + i32.shl + local.get $1 + i32.add + i32.const 9584 + local.get $3 + i32.const 1 + i32.shl + memory.copy local.get $0 - i32.const 10000000 - i32.lt_u - if (result i32) - local.get $0 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add - else - local.get $0 - i32.const 1000000000 - i32.ge_u - i32.const 8 - i32.add - local.get $0 - i32.const 100000000 - i32.ge_u - i32.add - end + local.get $3 + i32.add + local.set $0 end - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa32_dec_lut local.get $4 - i32.const 45 - i32.const 43 - local.get $2 - select - i32.store16 - local.get $0 - local.get $1 + i32.const 1 i32.add - local.set $1 + local.set $4 + br $for-loop|0 end + end + local.get $5 + local.get $0 + i32.const 1 + i32.shl + local.get $1 + i32.add + local.get $6 + i32.const 3 + i32.shl + local.get $7 + i32.add + i64.load + call $~lib/util/number/itoa_buffered + local.get $0 + i32.add + local.tee $0 + i32.gt_s + if local.get $1 - i32.const 2 + local.get $0 + call $~lib/string/String#substring + local.set $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.add + global.set $~lib/memory/__stack_pointer + br $__inlined_func$~lib/util/string/joinIntegerArray end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + local.set $0 end + local.get $0 + return end + i32.const 33040 + i32.const 33088 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - (local $7 i32) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i32) (param $4 i64) (param $5 i32) (result i32) + (local $6 i32) + (local $7 i64) (local $8 i32) (local $9 i32) - (local $10 i64) + (local $10 i32) (local $11 i64) (local $12 i64) (local $13 i64) - (local $14 i64) - (local $15 i64) - local.get $1 - f64.const 0 - f64.lt - local.tee $3 - if (result f64) - local.get $0 - i32.const 45 - i32.store16 - local.get $1 - f64.neg - else - local.get $1 - end - i64.reinterpret_f64 - local.tee $2 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.tee $7 - i32.const 1 - local.get $7 - select - i32.const 1075 - i32.sub - local.tee $8 - i32.const 1 - i32.sub - local.get $2 - i64.const 4503599627370495 - i64.and - local.get $7 - i32.const 0 - i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - i64.add - local.tee $2 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.tee $4 - i64.clz - i32.wrap_i64 - local.tee $7 - i32.sub - local.set $9 - local.get $4 - local.get $7 - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_plus local.get $2 - local.get $2 - i64.const 4503599627370496 - i64.eq - i32.const 1 - i32.add - local.tee $7 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $8 - local.get $7 - i32.sub - local.get $9 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $9 - global.set $~lib/util/number/_exp - i32.const 348 - i32.const -61 - global.get $~lib/util/number/_exp - local.tee $7 - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.tee $1 - i32.trunc_f64_s - local.tee $8 local.get $1 - local.get $8 - f64.convert_i32_s - f64.ne - i32.add - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.tee $8 - i32.const 3 - i32.shl - local.tee $9 - i32.sub - global.set $~lib/util/number/_K - local.get $9 - i32.const 9864 - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - local.get $8 - i32.const 1 - i32.shl - i32.const 10560 - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $2 - local.get $2 - i64.clz - i64.shl - local.tee $2 - i64.const 4294967295 - i64.and - local.set $5 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $4 - global.get $~lib/util/number/_frc_pow - local.tee $10 - i64.const 4294967295 - i64.and - local.tee $11 - i64.mul - local.get $5 - local.get $11 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.set $12 - global.get $~lib/util/number/_frc_plus - local.tee $2 - i64.const 4294967295 - i64.and - local.set $13 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $6 - local.get $11 - i64.mul - local.get $11 - local.get $13 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.set $14 - global.get $~lib/util/number/_frc_minus - local.tee $15 - i64.const 4294967295 - i64.and - local.set $2 - local.get $15 - i64.const 32 - i64.shr_u - local.tee $15 - local.get $11 - i64.mul - local.get $2 - local.get $11 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.set $11 - local.get $6 - local.get $10 - i64.const 32 - i64.shr_u - local.tee $10 - i64.mul - local.get $14 - i64.const 32 - i64.shr_u - i64.add - local.get $10 - local.get $13 - i64.mul - local.get $14 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.sub - local.set $6 - local.get $3 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $0 - local.get $4 - local.get $10 - i64.mul - local.get $12 - i64.const 32 - i64.shr_u - i64.add - local.get $5 - local.get $10 - i64.mul - local.get $12 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - local.get $6 - global.get $~lib/util/number/_exp_pow - local.get $7 - i32.add - i32.const -64 - i32.sub - local.get $6 - local.get $10 - local.get $15 - i64.mul - local.get $11 - i64.const 32 - i64.shr_u - i64.add - local.get $2 - local.get $10 - i64.mul - local.get $11 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.add i64.sub - local.get $3 - call $~lib/util/number/genDigits - local.get $3 - i32.sub - global.get $~lib/util/number/_K - call $~lib/util/number/prettify - local.get $3 - i32.add - ) - (func $~lib/util/number/dtoa_buffered (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - local.get $1 - f64.const 0 - f64.eq - if - local.get $0 - i32.const 48 - i32.store16 - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - i32.const 48 - i32.store16 offset=4 - i32.const 3 - return - end - local.get $1 + local.set $12 + local.get $2 + i64.const 1 + i32.const 0 + local.get $3 + i32.sub + local.tee $10 + i64.extend_i32_s + local.tee $1 + i64.shl + local.tee $13 + i64.const 1 + i64.sub + local.tee $11 + i64.and + local.set $7 + local.get $2 local.get $1 - f64.sub - f64.const 0 - f64.ne - if - local.get $1 - local.get $1 - f64.ne - if - local.get $0 - i32.const 78 - i32.store16 - local.get $0 - i32.const 97 - i32.store16 offset=2 - local.get $0 - i32.const 78 - i32.store16 offset=4 + i64.shr_u + i32.wrap_i64 + local.tee $3 + i32.const 100000 + i32.lt_u + if (result i32) + local.get $3 + i32.const 100 + i32.lt_u + if (result i32) + local.get $3 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + else + local.get $3 + i32.const 10000 + i32.ge_u i32.const 3 - return + i32.add + local.get $3 + i32.const 1000 + i32.ge_u + i32.add + end + else + local.get $3 + i32.const 10000000 + i32.lt_u + if (result i32) + local.get $3 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add else - local.get $1 - f64.const 0 - f64.lt - local.tee $2 + local.get $3 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $3 + i32.const 100000000 + i32.ge_u + i32.add + end + end + local.set $9 + loop $while-continue|0 + local.get $9 + i32.const 0 + i32.gt_s + if + block $break|1 + block $case10|1 + block $case9|1 + block $case8|1 + block $case7|1 + block $case6|1 + block $case5|1 + block $case4|1 + block $case3|1 + block $case2|1 + block $case1|1 + block $case0|1 + local.get $9 + i32.const 1 + i32.sub + br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case0|1 $case10|1 + end + local.get $3 + i32.const 1000000000 + i32.div_u + local.set $6 + local.get $3 + i32.const 1000000000 + i32.rem_u + local.set $3 + br $break|1 + end + local.get $3 + i32.const 100000000 + i32.div_u + local.set $6 + local.get $3 + i32.const 100000000 + i32.rem_u + local.set $3 + br $break|1 + end + local.get $3 + i32.const 10000000 + i32.div_u + local.set $6 + local.get $3 + i32.const 10000000 + i32.rem_u + local.set $3 + br $break|1 + end + local.get $3 + i32.const 1000000 + i32.div_u + local.set $6 + local.get $3 + i32.const 1000000 + i32.rem_u + local.set $3 + br $break|1 + end + local.get $3 + i32.const 100000 + i32.div_u + local.set $6 + local.get $3 + i32.const 100000 + i32.rem_u + local.set $3 + br $break|1 + end + local.get $3 + i32.const 10000 + i32.div_u + local.set $6 + local.get $3 + i32.const 10000 + i32.rem_u + local.set $3 + br $break|1 + end + local.get $3 + i32.const 1000 + i32.div_u + local.set $6 + local.get $3 + i32.const 1000 + i32.rem_u + local.set $3 + br $break|1 + end + local.get $3 + i32.const 100 + i32.div_u + local.set $6 + local.get $3 + i32.const 100 + i32.rem_u + local.set $3 + br $break|1 + end + local.get $3 + i32.const 10 + i32.div_u + local.set $6 + local.get $3 + i32.const 10 + i32.rem_u + local.set $3 + br $break|1 + end + local.get $3 + local.set $6 + i32.const 0 + local.set $3 + br $break|1 + end + i32.const 0 + local.set $6 + end + local.get $5 + local.get $6 + i32.or if + local.get $5 + local.tee $8 + i32.const 1 + i32.add + local.set $5 + local.get $8 + i32.const 1 + i32.shl local.get $0 - i32.const 45 + i32.add + local.get $6 + i32.const 65535 + i32.and + i32.const 48 + i32.add i32.store16 - local.get $0 + end + local.get $9 + i32.const 1 + i32.sub + local.set $9 + local.get $4 + local.get $7 + local.get $3 + i64.extend_i32_u + local.get $10 + i64.extend_i32_s + i64.shl + i64.add + local.tee $1 + i64.ge_u + if + local.get $9 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $9 i32.const 2 + i32.shl + i32.const 10736 i32.add - local.set $0 + i64.load32_u + local.get $10 + i64.extend_i32_s + i64.shl + local.set $2 + local.get $5 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + local.get $0 + i32.add + local.tee $0 + i32.load16_u + local.set $9 + loop $while-continue|3 + local.get $1 + local.get $12 + i64.lt_u + local.get $2 + local.get $4 + local.get $1 + i64.sub + i64.le_u + i32.and + if (result i32) + local.get $12 + local.get $1 + i64.sub + local.get $1 + local.get $2 + i64.add + local.tee $7 + local.get $12 + i64.sub + i64.gt_u + local.get $7 + local.get $12 + i64.lt_u + i32.or + else + i32.const 0 + end + if + local.get $9 + i32.const 1 + i32.sub + local.set $9 + local.get $1 + local.get $2 + i64.add + local.set $1 + br $while-continue|3 + end + end + local.get $0 + local.get $9 + i32.store16 + local.get $5 + return end - local.get $0 - i64.const 29555310648492105 - i64.store - local.get $0 - i64.const 34058970405077102 - i64.store offset=8 - local.get $2 - i32.const 8 - i32.add - return + br $while-continue|0 end - unreachable - end - local.get $0 - local.get $1 - call $~lib/util/number/dtoa_core - ) - (func $~lib/typedarray/Float32Array#join (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $0 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable end - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - block $__inlined_func$~lib/util/string/joinFloatArray - local.get $0 - i32.const 1 - i32.sub + loop $while-continue|4 (result i32) + local.get $4 + i64.const 10 + i64.mul + local.set $4 + local.get $7 + i64.const 10 + i64.mul + local.tee $1 + local.get $10 + i64.extend_i32_s + i64.shr_u local.tee $2 - i32.const 0 - i32.lt_s + local.get $5 + i64.extend_i32_s + i64.or + i64.const 0 + i64.ne if - global.get $~lib/memory/__stack_pointer - i32.const 4 + local.get $5 + local.tee $3 + i32.const 1 i32.add - global.set $~lib/memory/__stack_pointer - i32.const 7776 - local.set $0 - br $__inlined_func$~lib/util/string/joinFloatArray - end - local.get $2 - i32.eqz - if + local.set $5 local.get $3 - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa - local.set $0 - global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 1 + i32.shl + local.get $0 i32.add - global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinFloatArray + local.get $2 + i32.wrap_i64 + i32.const 65535 + i32.and + i32.const 48 + i32.add + i32.store16 end - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.const 9580 - i32.load + local.get $9 i32.const 1 - i32.shr_u - local.tee $4 - i32.const 28 + i32.sub + local.set $9 + local.get $1 + local.get $11 + i64.and + local.tee $7 + local.get $4 + i64.ge_u + br_if $while-continue|4 + local.get $9 + global.get $~lib/util/number/_K i32.add - i32.mul - i32.const 28 + global.set $~lib/util/number/_K + local.get $7 + local.set $1 + i32.const 0 + local.get $9 + i32.sub + i32.const 2 + i32.shl + i32.const 10736 i32.add - local.tee $6 + i64.load32_u + local.get $12 + i64.mul + local.set $2 + local.get $5 i32.const 1 - i32.shl + i32.sub i32.const 1 - call $~lib/rt/itcms/__new - local.tee $1 + i32.shl + local.get $0 + i32.add + local.tee $0 + i32.load16_u + local.set $9 + loop $while-continue|6 + local.get $1 + local.get $2 + i64.lt_u + local.get $13 + local.get $4 + local.get $1 + i64.sub + i64.le_u + i32.and + if (result i32) + local.get $2 + local.get $1 + i64.sub + local.get $1 + local.get $13 + i64.add + local.tee $7 + local.get $2 + i64.sub + i64.gt_u + local.get $2 + local.get $7 + i64.gt_u + i32.or + else + i32.const 0 + end + if + local.get $9 + i32.const 1 + i32.sub + local.set $9 + local.get $1 + local.get $13 + i64.add + local.set $1 + br $while-continue|6 + end + end + local.get $0 + local.get $9 + i32.store16 + local.get $5 + end + ) + (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $2 + i32.eqz + if + local.get $1 + i32.const 1 + i32.shl + local.get $0 + i32.add + i32.const 3145774 i32.store - i32.const 0 - local.set $0 + local.get $1 + i32.const 2 + i32.add + return + end + local.get $1 + local.get $2 + i32.add + local.tee $3 + i32.const 21 + i32.le_s + local.get $1 + local.get $3 + i32.le_s + i32.and + if (result i32) loop $for-loop|0 - local.get $2 - local.get $5 - i32.gt_s + local.get $1 + local.get $3 + i32.lt_s if - local.get $0 - i32.const 1 - i32.shl local.get $1 - i32.add - local.get $5 - i32.const 2 + i32.const 1 i32.shl - local.get $3 - i32.add - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa_buffered local.get $0 i32.add - local.set $0 - local.get $4 - if - local.get $0 - i32.const 1 - i32.shl - local.get $1 - i32.add - i32.const 9584 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - local.get $4 - i32.add - local.set $0 - end - local.get $5 + i32.const 48 + i32.store16 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|0 end end - local.get $6 - local.get $0 + local.get $3 i32.const 1 i32.shl - local.get $1 + local.get $0 i32.add - local.get $2 - i32.const 2 - i32.shl + i32.const 3145774 + i32.store local.get $3 + i32.const 2 i32.add - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa_buffered - local.get $0 - i32.add - local.tee $0 + else + local.get $3 + i32.const 21 + i32.le_s + local.get $3 + i32.const 0 i32.gt_s - if - local.get $1 + i32.and + if (result i32) + local.get $3 + i32.const 1 + i32.shl local.get $0 - call $~lib/string/String#substring - local.set $0 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinFloatArray - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - local.set $0 - end - local.get $0 - ) - (func $~lib/typedarray/Float64Array#join (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $0 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - block $__inlined_func$~lib/util/string/joinFloatArray - local.get $0 - i32.const 1 - i32.sub - local.tee $2 - i32.const 0 - i32.lt_s - if - global.get $~lib/memory/__stack_pointer - i32.const 4 i32.add - global.set $~lib/memory/__stack_pointer - i32.const 7776 - local.set $0 - br $__inlined_func$~lib/util/string/joinFloatArray - end - local.get $2 - i32.eqz - if - local.get $3 - f64.load - call $~lib/util/number/dtoa - local.set $0 - global.get $~lib/memory/__stack_pointer - i32.const 4 + local.tee $0 + i32.const 2 i32.add - global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinFloatArray - end - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.const 9580 - i32.load - i32.const 1 - i32.shr_u - local.tee $4 - i32.const 28 - i32.add - i32.mul - i32.const 28 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/itcms/__new - local.tee $1 - i32.store - i32.const 0 - local.set $0 - loop $for-loop|0 + local.get $0 + i32.const 0 local.get $2 - local.get $5 + i32.sub + i32.const 1 + i32.shl + memory.copy + local.get $0 + i32.const 46 + i32.store16 + local.get $1 + i32.const 1 + i32.add + else + local.get $3 + i32.const 0 + i32.le_s + local.get $3 + i32.const -6 i32.gt_s - if - local.get $0 + i32.and + if (result i32) + i32.const 2 + local.get $3 + i32.sub + local.tee $3 i32.const 1 i32.shl - local.get $1 + local.get $0 i32.add - local.get $5 - i32.const 3 + local.get $0 + local.get $1 + i32.const 1 i32.shl - local.get $3 - i32.add - f64.load - call $~lib/util/number/dtoa_buffered + memory.copy local.get $0 + i32.const 3014704 + i32.store + i32.const 2 + local.set $2 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $2 + i32.const 1 + i32.shl + local.get $0 + i32.add + i32.const 48 + i32.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $1 + local.get $3 i32.add - local.set $0 - local.get $4 + else + local.get $1 + i32.const 1 + i32.eq if local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.tee $2 + local.get $3 + i32.const 1 + i32.sub + local.tee $0 + i32.const 0 + i32.lt_s + local.tee $3 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end + local.get $0 + local.get $0 + i32.const 100000 + i32.lt_u + if (result i32) + local.get $0 + i32.const 100 + i32.lt_u + if (result i32) + local.get $0 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + else + local.get $0 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $0 + i32.const 1000 + i32.ge_u + i32.add + end + else + local.get $0 + i32.const 10000000 + i32.lt_u + if (result i32) + local.get $0 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + else + local.get $0 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $0 + i32.const 100000000 + i32.ge_u + i32.add + end + end i32.const 1 - i32.shl - local.get $1 i32.add - i32.const 9584 - local.get $4 + local.tee $1 + call $~lib/util/number/utoa32_dec_lut + local.get $2 + i32.const 45 + i32.const 43 + local.get $3 + select + i32.store16 + else + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + local.tee $2 + i32.const 2 + i32.sub + memory.copy local.get $0 - local.get $4 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $2 i32.add - local.set $0 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $0 - i32.const 1 - i32.shl - local.get $1 - i32.add - local.get $2 - i32.const 3 - i32.shl - local.get $3 - i32.add - f64.load - call $~lib/util/number/dtoa_buffered - local.get $0 - i32.add - local.tee $0 - i32.gt_s - if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.set $0 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinFloatArray - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 - local.set $0 - end - local.get $0 - ) - (func $~lib/typedarray/Uint8Array.wrap@varargs (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~argumentsLength + local.tee $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.tee $4 + local.get $3 i32.const 1 i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - i32.const -1 - local.set $2 - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable + local.tee $0 + i32.const 0 + i32.lt_s + local.tee $2 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end + local.get $0 + local.get $0 + i32.const 100000 + i32.lt_u + if (result i32) + local.get $0 + i32.const 100 + i32.lt_u + if (result i32) + local.get $0 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + else + local.get $0 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $0 + i32.const 1000 + i32.ge_u + i32.add + end + else + local.get $0 + i32.const 10000000 + i32.lt_u + if (result i32) + local.get $0 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + else + local.get $0 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $0 + i32.const 100000000 + i32.ge_u + i32.add + end + end + i32.const 1 + i32.add + local.tee $0 + call $~lib/util/number/utoa32_dec_lut + local.get $4 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $0 + local.get $1 + i32.add + local.set $1 + end + local.get $1 + i32.const 2 + i32.add + end + end end - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + ) + (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) + (local $2 i64) + (local $3 i32) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i64) + (local $11 i64) + (local $12 i64) + (local $13 i64) + (local $14 i64) + (local $15 i64) local.get $1 - local.get $0 - i32.const 20 - i32.sub - i32.load offset=16 + f64.const 0 + f64.lt local.tee $3 - i32.gt_u - if - i32.const 1360 - i32.const 1632 - i32.const 1870 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - i32.const -1 - i32.eq - if (result i32) - local.get $3 - local.get $1 - i32.sub - else - i32.const 1056 - i32.const 1632 - i32.const 1879 - i32.const 7 - call $~lib/builtins/abort - unreachable - end - local.set $2 + if (result f64) + local.get $0 + i32.const 45 + i32.store16 + local.get $1 + f64.neg else - local.get $3 local.get $1 - local.get $2 - i32.add - i32.lt_s - if - i32.const 1056 - i32.const 1632 - i32.const 1884 - i32.const 7 - call $~lib/builtins/abort - unreachable - end end - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.const 4 - call $~lib/rt/itcms/__new - local.tee $3 - i32.store - local.get $3 - local.get $0 - i32.store - local.get $0 - if - local.get $3 - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $3 + i64.reinterpret_f64 + local.tee $2 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $7 + i32.const 1 + local.get $7 + select + i32.const 1075 + i32.sub + local.tee $8 + i32.const 1 + i32.sub local.get $2 - i32.store offset=8 - local.get $3 - local.get $0 - local.get $1 - i32.add - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 4 + i64.const 4503599627370495 + i64.and + local.get $7 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + i64.add + local.tee $2 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.tee $4 + i64.clz + i32.wrap_i64 + local.tee $7 + i32.sub + local.set $9 + local.get $4 + local.get $7 + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_plus + local.get $2 + local.get $2 + i64.const 4503599627370496 + i64.eq + i32.const 1 i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 11020 - i32.load - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $2 - i32.const 11012 - i32.load - local.set $3 - i32.const 11020 - i32.load - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.gt_s - if - local.get $1 - local.get $2 - i32.add - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load offset=8 + local.tee $7 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $8 + local.get $7 + i32.sub + local.get $9 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $9 + global.set $~lib/util/number/_exp + i32.const 348 + i32.const -61 + global.get $~lib/util/number/_exp + local.tee $7 + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.tee $1 + i32.trunc_sat_f64_s + local.tee $8 local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add - i32.lt_s - if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 6 + local.get $8 + f64.convert_i32_s + f64.ne i32.add - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 i32.const 3 - i32.shr_u - local.set $1 - loop $for-loop|0 - local.get $1 - local.get $2 - i32.gt_s - if - local.get $0 - local.get $2 - i32.add - local.get $2 - i32.const 3 - i32.shl - local.get $3 - i32.add - i64.load - i64.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) - local.get $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/memory/memory.copy - ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load offset=8 - local.get $1 - i32.load offset=8 + i32.shr_s i32.const 1 - i32.shr_u - i32.const 4 i32.add - i32.lt_s - if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 4 + local.tee $8 + i32.const 3 + i32.shl + local.tee $9 + i32.sub + global.set $~lib/util/number/_K + local.get $9 + i32.const 9864 i32.add - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 + i64.load + global.set $~lib/util/number/_frc_pow + local.get $8 i32.const 1 - i32.shr_u - local.set $1 - loop $for-loop|0 - local.get $1 - local.get $2 - i32.gt_s - if - local.get $0 - local.get $2 - i32.add - local.get $2 - i32.const 1 - i32.shl - local.get $3 - i32.add - i32.load16_s - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) + i32.shl + i32.const 10560 + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + local.get $2 + local.get $2 + i64.clz + i64.shl + local.tee $2 + i64.const 4294967295 + i64.and + local.set $5 + local.get $2 + i64.const 32 + i64.shr_u + local.tee $4 + global.get $~lib/util/number/_frc_pow + local.tee $10 + i64.const 4294967295 + i64.and + local.tee $11 + i64.mul + local.get $5 + local.get $11 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $12 + global.get $~lib/util/number/_frc_plus + local.tee $2 + i64.const 4294967295 + i64.and + local.set $13 + local.get $2 + i64.const 32 + i64.shr_u + local.tee $6 + local.get $11 + i64.mul + local.get $11 + local.get $13 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $14 + global.get $~lib/util/number/_frc_minus + local.tee $15 + i64.const 4294967295 + i64.and + local.set $2 + local.get $15 + i64.const 32 + i64.shr_u + local.tee $15 + local.get $11 + i64.mul + local.get $2 + local.get $11 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $11 + local.get $6 + local.get $10 + i64.const 32 + i64.shr_u + local.tee $10 + i64.mul + local.get $14 + i64.const 32 + i64.shr_u + i64.add + local.get $10 + local.get $13 + i64.mul + local.get $14 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + i64.const 1 + i64.sub + local.set $6 + local.get $3 + i32.const 1 + i32.shl local.get $0 - i32.load offset=8 - i32.const 11276 - i32.load - i32.const 7 i32.add - i32.lt_s - if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 - call $~lib/builtins/abort - unreachable - end local.get $0 - i32.load offset=4 - i32.const 7 + local.get $4 + local.get $10 + i64.mul + local.get $12 + i64.const 32 + i64.shr_u + i64.add + local.get $5 + local.get $10 + i64.mul + local.get $12 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + local.get $6 + global.get $~lib/util/number/_exp_pow + local.get $7 + i32.add + i32.const -64 + i32.sub + local.get $6 + local.get $10 + local.get $15 + i64.mul + local.get $11 + i64.const 32 + i64.shr_u + i64.add + local.get $2 + local.get $10 + i64.mul + local.get $11 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + i64.const 1 + i64.add + i64.sub + local.get $3 + call $~lib/util/number/genDigits + local.get $3 + i32.sub + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.get $3 i32.add - i32.const 11268 - i32.load - i32.const 11272 - i32.load - call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 1360 - i32.const 1632 - i32.const 1908 - i32.const 19 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - local.get $2 + (func $~lib/util/number/dtoa_buffered (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.add - i32.lt_s + f64.const 0 + f64.eq if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 48 + i32.store16 + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + i32.const 48 + i32.store16 offset=4 + i32.const 3 + return end - local.get $2 - local.get $0 - i32.load offset=4 - i32.add - local.set $2 local.get $1 - i32.load offset=4 - local.set $5 local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 - loop $for-loop|0 + f64.sub + f64.const 0 + f64.ne + if local.get $1 - local.get $3 - i32.gt_s + local.get $1 + f64.ne if - local.get $2 - local.get $3 - i32.add - local.get $3 + local.get $0 + i32.const 78 + i32.store16 + local.get $0 + i32.const 97 + i32.store16 offset=2 + local.get $0 + i32.const 78 + i32.store16 offset=4 i32.const 3 - i32.shl - local.get $5 - i32.add - i64.load - local.tee $4 - i32.wrap_i64 - local.tee $0 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i64.extend_i32_s - local.get $4 - i32.const 255 + return + else + local.get $1 + f64.const 0 + f64.lt + local.tee $2 + if + local.get $0 + i32.const 45 + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end local.get $0 - i32.sub - i32.const 31 - i32.shr_s - i64.extend_i32_s - i64.or - i64.and - i64.store8 - local.get $3 - i32.const 1 + i64.const 29555310648492105 + i64.store + local.get $0 + i64.const 34058970405077102 + i64.store offset=8 + local.get $2 + i32.const 8 i32.add - local.set $3 - br $for-loop|0 + return end - end - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 1360 - i32.const 1632 - i32.const 1908 - i32.const 19 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - local.get $2 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.add - i32.lt_s - if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 - call $~lib/builtins/abort unreachable end - local.get $2 local.get $0 - i32.load offset=4 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $4 local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $1 - loop $for-loop|0 - local.get $1 - local.get $3 - i32.gt_s - if - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.shl - local.get $4 - i32.add - i32.load16_s - local.tee $0 - i32.const 255 - local.get $0 - i32.sub - i32.const 31 - i32.shr_s - i32.or - local.get $0 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.and - i32.store8 - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end + call $~lib/util/number/dtoa_core ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/Float32Array#join (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 11020 - i32.load + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u - i32.gt_s + local.set $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 + i32.const 33040 + i32.const 33088 + i32.const 1 + i32.const 1 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - local.set $2 - i32.const 11012 - i32.load - local.set $3 - i32.const 11020 - i32.load - local.set $0 - loop $for-loop|0 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + block $__inlined_func$~lib/util/string/joinFloatArray local.get $0 - local.get $1 - i32.gt_s + i32.const 1 + i32.sub + local.tee $2 + i32.const 0 + i32.lt_s if - local.get $1 - i32.const 1 - i32.shl - local.get $2 - i32.add - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load - i32.store16 - local.get $1 - i32.const 1 + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.add - local.set $1 - br $for-loop|0 + global.set $~lib/memory/__stack_pointer + i32.const 7776 + local.set $0 + br $__inlined_func$~lib/util/string/joinFloatArray end - end - ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 12 - i32.add - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 - loop $for-loop|0 - local.get $1 local.get $2 - i32.gt_s + i32.eqz if - local.get $2 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $2 - i32.const 3 - i32.shl local.get $3 + f32.load + f64.promote_f32 + call $~lib/util/number/dtoa + local.set $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.add - i64.load - i64.store16 + global.set $~lib/memory/__stack_pointer + br $__inlined_func$~lib/util/string/joinFloatArray + end + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.const 9580 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 + i32.const 28 + i32.add + i32.mul + i32.const 28 + i32.add + local.tee $6 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/itcms/__new + local.tee $1 + i32.store + i32.const 0 + local.set $0 + loop $for-loop|0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + local.get $5 + i32.gt_s + if + local.get $0 + i32.const 1 + i32.shl + local.get $1 + i32.add + local.get $5 + i32.const 2 + i32.shl + local.get $3 + i32.add + f32.load + f64.promote_f32 + call $~lib/util/number/dtoa_buffered + local.get $0 + i32.add + local.set $0 + local.get $4 + if + local.get $0 + i32.const 1 + i32.shl + local.get $1 + i32.add + i32.const 9584 + local.get $4 + i32.const 1 + i32.shl + memory.copy + local.get $0 + local.get $4 + i32.add + local.set $0 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end end - end - ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - local.set $1 - loop $for-loop|0 + local.get $6 + local.get $0 + i32.const 1 + i32.shl local.get $1 + i32.add local.get $2 + i32.const 2 + i32.shl + local.get $3 + i32.add + f32.load + f64.promote_f32 + call $~lib/util/number/dtoa_buffered + local.get $0 + i32.add + local.tee $0 i32.gt_s if - local.get $2 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $2 - local.get $3 - i32.add - i32.load8_u - i32.store16 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 - i32.add - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 - call $~lib/builtins/abort - unreachable + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.set $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + br $__inlined_func$~lib/util/string/joinFloatArray + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + local.set $0 end local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/Float64Array#join (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 11276 - i32.load - i32.const 7 - i32.add + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u - i32.gt_s + local.set $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 + i32.const 33040 + i32.const 33088 + i32.const 1 + i32.const 1 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - i32.const 14 - i32.add - local.set $2 - i32.const 11268 - i32.load - local.set $3 - i32.const 11276 - i32.load - local.set $0 - loop $for-loop|0 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + block $__inlined_func$~lib/util/string/joinFloatArray local.get $0 - local.get $1 - i32.gt_s + i32.const 1 + i32.sub + local.tee $2 + i32.const 0 + i32.lt_s if - local.get $1 - i32.const 1 - i32.shl - local.get $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.add - local.get $1 + global.set $~lib/memory/__stack_pointer + i32.const 7776 + local.set $0 + br $__inlined_func$~lib/util/string/joinFloatArray + end + local.get $2 + i32.eqz + if local.get $3 + f64.load + call $~lib/util/number/dtoa + local.set $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.add - i32.load8_s - i32.store16 + global.set $~lib/memory/__stack_pointer + br $__inlined_func$~lib/util/string/joinFloatArray + end + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.const 9580 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 + i32.const 28 + i32.add + i32.mul + i32.const 28 + i32.add + local.tee $6 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/itcms/__new + local.tee $1 + i32.store + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $2 + local.get $5 + i32.gt_s + if + local.get $0 + i32.const 1 + i32.shl + local.get $1 + i32.add + local.get $5 + i32.const 3 + i32.shl + local.get $3 + i32.add + f64.load + call $~lib/util/number/dtoa_buffered + local.get $0 + i32.add + local.set $0 + local.get $4 + if + local.get $0 + i32.const 1 + i32.shl + local.get $1 + i32.add + i32.const 9584 + local.get $4 + i32.const 1 + i32.shl + memory.copy + local.get $0 + local.get $4 + i32.add + local.set $0 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end + end + local.get $6 + local.get $0 + i32.const 1 + i32.shl + local.get $1 + i32.add + local.get $2 + i32.const 3 + i32.shl + local.get $3 + i32.add + f64.load + call $~lib/util/number/dtoa_buffered + local.get $0 + i32.add + local.tee $0 + i32.gt_s + if local.get $1 - i32.const 1 + local.get $0 + call $~lib/string/String#substring + local.set $0 + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.add - local.set $1 - br $for-loop|0 + global.set $~lib/memory/__stack_pointer + br $__inlined_func$~lib/util/string/joinFloatArray end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + local.set $0 end + local.get $0 ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) - local.get $2 - i32.const 0 + (func $~lib/typedarray/Uint8Array.wrap@varargs (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + i32.const -1 + local.set $2 + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 i32.lt_s if - i32.const 1360 - i32.const 1632 - i32.const 1908 - i32.const 19 + i32.const 33040 + i32.const 33088 + i32.const 1 + i32.const 1 call $~lib/builtins/abort unreachable end - local.get $2 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store local.get $1 - i32.load offset=12 - i32.add local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s + i32.const 20 + i32.sub + i32.load offset=16 + local.tee $3 + i32.gt_u if i32.const 1360 i32.const 1632 - i32.const 1909 - i32.const 47 + i32.const 1870 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/memory/memory.copy - ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s + i32.const 0 + i32.lt_s if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 - loop $for-loop|0 - local.get $1 local.get $2 - i32.gt_s - if - local.get $2 - i32.const 2 - i32.shl - local.get $0 - i32.add - local.get $2 - i32.const 3 - i32.shl + i32.const -1 + i32.eq + if (result i32) local.get $3 - i32.add - i64.load - i64.store32 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + local.get $1 + i32.sub + else + i32.const 1056 + i32.const 1632 + i32.const 1879 + i32.const 7 + call $~lib/builtins/abort + unreachable end - end - ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - local.set $1 - loop $for-loop|0 + local.set $2 + else + local.get $3 local.get $1 local.get $2 - i32.gt_s + i32.add + i32.lt_s if - local.get $2 - i32.const 2 - i32.shl - local.get $0 - i32.add - local.get $2 - local.get $3 - i32.add - i32.load8_u - i32.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.const 1056 + i32.const 1632 + i32.const 1884 + i32.const 7 + call $~lib/builtins/abort + unreachable end end - ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u + global.get $~lib/memory/__stack_pointer + i32.const 12 i32.const 4 - i32.add + call $~lib/rt/itcms/__new + local.tee $3 + i32.store + local.get $3 + local.get $0 + i32.store local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s if - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 - call $~lib/builtins/abort - unreachable + local.get $3 + local.get $0 + call $byn-split-outlined-A$~lib/rt/itcms/__link end + local.get $3 + local.get $2 + i32.store offset=8 + local.get $3 local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $1 - loop $for-loop|0 - local.get $1 - local.get $2 - i32.gt_s - if - local.get $2 - i32.const 2 - i32.shl - local.get $0 - i32.add - local.get $2 - i32.const 1 - i32.shl - local.get $3 - i32.add - i32.load16_s - i32.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end + i32.add + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 11276 + i32.const 11020 i32.load - i32.const 7 - i32.add local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u i32.gt_s if i32.const 1360 @@ -28370,13 +26082,11 @@ end local.get $0 i32.load offset=4 - i32.const 28 - i32.add local.set $2 - i32.const 11268 + i32.const 11012 i32.load local.set $3 - i32.const 11276 + i32.const 11020 i32.load local.set $0 loop $for-loop|0 @@ -28385,15 +26095,15 @@ i32.gt_s if local.get $1 - i32.const 2 - i32.shl local.get $2 i32.add local.get $1 + i32.const 2 + i32.shl local.get $3 i32.add - i32.load8_s - i32.store + i32.load + i32.store8 local.get $1 i32.const 1 i32.add @@ -28402,17 +26112,18 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - i32.const 11020 - i32.load local.get $0 i32.load offset=8 + local.get $1 + i32.load offset=8 i32.const 3 i32.shr_u - i32.gt_s + i32.const 6 + i32.add + i32.lt_s if i32.const 1360 i32.const 1632 @@ -28423,49 +26134,45 @@ end local.get $0 i32.load offset=4 - local.set $2 - i32.const 11012 - i32.load - local.set $3 - i32.const 11020 - i32.load + i32.const 6 + i32.add local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $1 loop $for-loop|0 - local.get $0 local.get $1 + local.get $2 i32.gt_s if - local.get $1 - i32.const 3 - i32.shl + local.get $0 local.get $2 i32.add - local.get $1 - i32.const 2 + local.get $2 + i32.const 3 i32.shl local.get $3 i32.add - i64.load32_s - i64.store - local.get $1 + i64.load + i64.store8 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s if i32.const 1360 @@ -28477,24 +26184,24 @@ end local.get $0 i32.load offset=4 - i32.const 48 - i32.add local.get $1 i32.load offset=4 local.get $1 i32.load offset=8 - call $~lib/memory/memory.copy + memory.copy ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - local.get $1 - i32.load offset=8 local.get $0 i32.load offset=8 - i32.const 3 + local.get $1 + i32.load offset=8 + i32.const 1 i32.shr_u - i32.gt_s + i32.const 4 + i32.add + i32.lt_s if i32.const 1360 i32.const 1632 @@ -28505,28 +26212,32 @@ end local.get $0 i32.load offset=4 + i32.const 4 + i32.add local.set $0 local.get $1 i32.load offset=4 local.set $3 local.get $1 i32.load offset=8 + i32.const 1 + i32.shr_u local.set $1 loop $for-loop|0 local.get $1 local.get $2 i32.gt_s if - local.get $2 - i32.const 3 - i32.shl local.get $0 + local.get $2 i32.add local.get $2 + i32.const 1 + i32.shl local.get $3 i32.add - i64.load8_u - i64.store + i32.load16_s + i32.store8 local.get $2 i32.const 1 i32.add @@ -28535,20 +26246,56 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) + local.get $0 i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 + i32.const 11276 + i32.load + i32.const 7 + i32.add + i32.lt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 7 i32.add + i32.const 11268 + i32.load + i32.const 11272 + i32.load + memory.copy + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i64) + (local $5 i32) + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1908 + i32.const 19 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=8 + local.get $2 + local.get $1 + i32.load offset=8 i32.const 3 i32.shr_u - i32.gt_s + i32.add + i32.lt_s if i32.const 1360 i32.const 1632 @@ -28557,57 +26304,82 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $0 i32.load offset=4 - i32.const 32 i32.add - local.set $0 + local.set $2 local.get $1 i32.load offset=4 - local.set $3 + local.set $5 local.get $1 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u local.set $1 loop $for-loop|0 local.get $1 - local.get $2 + local.get $3 i32.gt_s if local.get $2 + local.get $3 + i32.add + local.get $3 i32.const 3 i32.shl - local.get $0 + local.get $5 i32.add - local.get $2 - i32.const 1 - i32.shl + i64.load + local.tee $4 + i32.wrap_i64 + local.tee $0 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i64.extend_i32_s + local.get $4 + i32.const 255 + local.get $0 + i32.sub + i32.const 31 + i32.shr_s + i64.extend_i32_s + i64.or + i64.and + i64.store8 local.get $3 - i32.add - i64.load16_s - i64.store - local.get $2 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - i32.const 11276 - i32.load - i32.const 7 - i32.add + (local $4 i32) + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1908 + i32.const 19 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=8 - i32.const 3 + local.get $2 + local.get $1 + i32.load offset=8 + i32.const 1 i32.shr_u - i32.gt_s + i32.add + i32.lt_s if i32.const 1360 i32.const 1632 @@ -28616,821 +26388,818 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $0 i32.load offset=4 - i32.const 56 i32.add local.set $2 - i32.const 11268 - i32.load - local.set $3 - i32.const 11276 - i32.load - local.set $0 + local.get $1 + i32.load offset=4 + local.set $4 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 loop $for-loop|0 - local.get $0 local.get $1 + local.get $3 i32.gt_s if - local.get $1 - i32.const 3 - i32.shl local.get $2 - i32.add - local.get $1 local.get $3 i32.add - i64.load8_s - i64.store - local.get $1 + local.get $3 i32.const 1 + i32.shl + local.get $4 i32.add - local.set $1 - br $for-loop|0 - end - end - ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $3 - local.get $2 - local.get $1 - i32.sub - i32.const 1 - i32.add - local.tee $5 - local.get $3 - i32.sub - i32.const 1 - i32.and - i32.sub - local.get $5 - i32.const 1 - i32.and - local.get $3 - select - local.get $1 - i32.add - local.set $7 - loop $for-loop|0 - local.get $2 - local.get $7 - i32.ge_s - if + i32.load16_s + local.tee $0 + i32.const 255 local.get $0 - local.get $7 - i32.add - local.tee $3 - i32.load8_s offset=1 - local.tee $6 - local.set $5 - local.get $3 - i32.load8_s - local.set $3 - i32.const 2 - global.set $~argumentsLength - local.get $3 - local.get $6 - local.get $4 - i32.load - call_indirect $0 (type $i32_i32_=>_i32) - i32.const 0 - i32.le_s - if - local.get $3 - local.set $5 - local.get $6 - local.set $3 - end - local.get $7 - i32.const 1 i32.sub - local.set $6 - loop $while-continue|1 - local.get $1 - local.get $6 - i32.le_s - if - block $while-break|1 - local.get $0 - local.get $6 - i32.add - i32.load8_s - local.set $8 - i32.const 2 - global.set $~argumentsLength - local.get $8 - local.get $3 - local.get $4 - i32.load - call_indirect $0 (type $i32_i32_=>_i32) - i32.const 0 - i32.le_s - br_if $while-break|1 - local.get $0 - local.get $6 - i32.add - local.get $8 - i32.store8 offset=2 - local.get $6 - i32.const 1 - i32.sub - local.set $6 - br $while-continue|1 - end - end - end + i32.const 31 + i32.shr_s + i32.or local.get $0 - local.get $6 - i32.add + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.and + i32.store8 local.get $3 - i32.store8 offset=2 - loop $while-continue|2 - local.get $1 - local.get $6 - i32.le_s - if - block $while-break|2 - local.get $0 - local.get $6 - i32.add - i32.load8_s - local.set $3 - i32.const 2 - global.set $~argumentsLength - local.get $3 - local.get $5 - local.get $4 - i32.load - call_indirect $0 (type $i32_i32_=>_i32) - i32.const 0 - i32.le_s - br_if $while-break|2 - local.get $0 - local.get $6 - i32.add - local.get $3 - i32.store8 offset=1 - local.get $6 - i32.const 1 - i32.sub - local.set $6 - br $while-continue|2 - end - end - end - local.get $0 - local.get $6 - i32.add - local.get $5 - i32.store8 offset=1 - local.get $7 - i32.const 2 + i32.const 1 i32.add - local.set $7 + local.set $3 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - local.get $2 - i32.eq - if - local.get $1 - return - end - local.get $0 - local.get $1 - i32.add - i32.load8_s + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 11020 + i32.load local.get $0 - local.get $1 + i32.load offset=8 i32.const 1 - i32.add - local.tee $4 - i32.add - i32.load8_s - i32.const 2 - global.set $~argumentsLength - local.get $3 - i32.load - call_indirect $0 (type $i32_i32_=>_i32) - i32.const 0 + i32.shr_u i32.gt_s if - loop $while-continue|0 - local.get $2 - local.get $4 - i32.gt_s - if (result i32) - local.get $0 - local.get $4 - i32.add - local.tee $5 - i32.load8_s offset=1 - local.get $5 - i32.load8_s - i32.const 2 - global.set $~argumentsLength - local.get $3 - i32.load - call_indirect $0 (type $i32_i32_=>_i32) - i32.const 31 - i32.shr_u - else - i32.const 0 - end - if - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $while-continue|0 - end - end - local.get $4 - local.set $2 - loop $while-continue|1 + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 11012 + i32.load + local.set $3 + i32.const 11020 + i32.load + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.gt_s + if local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.load8_s - local.set $5 - local.get $3 - local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.load8_s - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $5 - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|1 - end - end - else - loop $while-continue|2 - local.get $2 - local.get $4 - i32.gt_s - if (result i32) - local.get $0 - local.get $4 - i32.add - local.tee $1 - i32.load8_s offset=1 - local.get $1 - i32.load8_s - i32.const 2 - global.set $~argumentsLength - local.get $3 - i32.load - call_indirect $0 (type $i32_i32_=>_i32) - i32.const 0 - i32.ge_s - else - i32.const 0 - end - if - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $while-continue|2 - end + i32.const 1 + i32.shl + local.get $2 + i32.add + local.get $1 + i32.const 2 + i32.shl + local.get $3 + i32.add + i32.load + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 end end - local.get $4 ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $3 - local.get $2 - i32.const 1 - i32.sub - local.tee $6 + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 6 i32.add - local.set $7 - local.get $6 + local.get $0 + i32.load offset=8 i32.const 1 + i32.shr_u + i32.gt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 12 i32.add - local.set $2 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $1 loop $for-loop|0 local.get $1 local.get $2 - i32.lt_s + i32.gt_s if - local.get $4 local.get $2 i32.const 1 - i32.sub - local.tee $2 - i32.add + i32.shl local.get $0 + i32.add + local.get $2 + i32.const 3 + i32.shl + local.get $3 + i32.add + i64.load + i64.store16 local.get $2 + i32.const 1 i32.add - i32.load8_s - i32.store8 + local.set $2 br $for-loop|0 end end - loop $for-loop|1 - local.get $3 - local.get $6 + ) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + local.set $1 + loop $for-loop|0 + local.get $1 + local.get $2 i32.gt_s if - local.get $7 - local.get $6 - i32.sub - local.get $4 - i32.add + local.get $2 + i32.const 1 + i32.shl local.get $0 - local.get $6 i32.add - i32.load8_s offset=1 - i32.store8 - local.get $6 + local.get $2 + local.get $3 + i32.add + i32.load8_u + i32.store16 + local.get $2 i32.const 1 i32.add - local.set $6 - br $for-loop|1 + local.set $2 + br $for-loop|0 end end - loop $for-loop|2 + ) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 8 + i32.add + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + memory.copy + ) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 11276 + i32.load + i32.const 7 + i32.add + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 14 + i32.add + local.set $2 + i32.const 11268 + i32.load + local.set $3 + i32.const 11276 + i32.load + local.set $0 + loop $for-loop|0 + local.get $0 local.get $1 - local.get $3 - i32.le_s + i32.gt_s if - local.get $4 - local.get $6 - i32.add - i32.load8_s - local.set $8 + local.get $1 + i32.const 1 + i32.shl local.get $2 - local.get $4 + i32.add + local.get $1 + local.get $3 i32.add i32.load8_s - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $8 - local.get $7 - local.get $5 - i32.load - call_indirect $0 (type $i32_i32_=>_i32) - i32.const 0 - i32.lt_s - if - local.get $0 - local.get $1 - i32.add - local.get $8 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.set $6 - else - local.get $0 - local.get $1 - i32.add - local.get $7 - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - end + i32.store16 local.get $1 i32.const 1 i32.add local.set $1 - br $for-loop|2 + br $for-loop|0 end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1908 + i32.const 19 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.load offset=12 + i32.add + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + memory.copy + ) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i64) local.get $1 - i32.const 48 - i32.le_s + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 6 + i32.add + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s if + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 24 + i32.add + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $1 + loop $for-loop|0 local.get $1 - i32.const 1 - i32.le_s + local.get $2 + i32.gt_s if - return - end - block $break|0 - block $case1|0 - local.get $1 - i32.const 3 - i32.ne - if - local.get $1 - i32.const 2 - i32.eq - br_if $case1|0 - br $break|0 - end - local.get $0 - i32.load8_s - local.set $5 - local.get $0 - i32.load8_s offset=1 - local.set $3 - i32.const 2 - global.set $~argumentsLength - local.get $0 - local.get $3 - local.get $5 - local.get $5 - local.get $3 - local.get $2 - i32.load - call_indirect $0 (type $i32_i32_=>_i32) - i32.const 0 - i32.gt_s - local.tee $1 - select - i32.store8 - local.get $0 - i32.load8_s offset=2 - local.set $4 - i32.const 2 - global.set $~argumentsLength - local.get $5 - local.get $3 - local.get $1 - select - local.tee $3 - local.get $4 - local.get $2 - i32.load - call_indirect $0 (type $i32_i32_=>_i32) - i32.const 0 - i32.gt_s - local.set $1 - local.get $0 - local.get $4 - local.get $3 - local.get $1 - select - i32.store8 offset=1 - local.get $0 - local.get $3 - local.get $4 - local.get $1 - select - i32.store8 offset=2 - end - local.get $0 - i32.load8_s - local.set $4 - local.get $0 - i32.load8_s offset=1 - local.set $3 + local.get $2 i32.const 2 - global.set $~argumentsLength + i32.shl local.get $0 - local.get $3 - local.get $4 - local.get $4 - local.get $3 + i32.add local.get $2 - i32.load - call_indirect $0 (type $i32_i32_=>_i32) - i32.const 0 - i32.gt_s - local.tee $1 - select - i32.store8 - local.get $0 - local.get $4 + i32.const 3 + i32.shl local.get $3 - local.get $1 - select - i32.store8 offset=1 - return + i32.add + i64.load + i64.store32 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - local.get $0 - i32.const 0 - local.get $1 - i32.const 1 - i32.sub - i32.const 0 - local.get $2 - call $~lib/util/sort/insertionSort - return end - i32.const 33 + ) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) local.get $1 - i32.clz - i32.sub - local.tee $8 + i32.load offset=8 + local.get $0 + i32.load offset=8 i32.const 2 - i32.shl - local.tee $7 - i32.const 1 - i32.shl - local.set $5 - global.get $~lib/rt/tlsf/ROOT - i32.eqz + i32.shr_u + i32.gt_s if - call $~lib/rt/tlsf/initialize + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable end - global.get $~lib/rt/tlsf/ROOT - local.get $5 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $10 - local.get $7 - i32.add - local.set $11 - loop $for-loop|1 - local.get $6 - local.get $8 - i32.lt_u + local.get $0 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + local.set $1 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.gt_s if - local.get $6 + local.get $2 i32.const 2 i32.shl - local.get $10 + local.get $0 i32.add - i32.const -1 + local.get $2 + local.get $3 + i32.add + i32.load8_u i32.store - local.get $6 + local.get $2 i32.const 1 i32.add - local.set $6 - br $for-loop|1 + local.set $2 + br $for-loop|0 end end - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT + ) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) local.get $1 - call $~lib/rt/tlsf/allocateBlock + i32.load offset=8 + i32.const 1 + i32.shr_u i32.const 4 i32.add - local.set $12 local.get $0 - i32.const 0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 16 + i32.add + local.set $0 local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 i32.const 1 - i32.sub - local.tee $9 - local.get $2 - call $~lib/util/sort/extendRunRight - local.tee $7 - i32.const 1 - i32.add - local.tee $1 - i32.const 32 - i32.lt_s - if - local.get $0 - i32.const 0 - local.get $9 - i32.const 31 - local.get $9 - i32.const 31 - i32.lt_s - select - local.tee $7 + i32.shr_u + local.set $1 + loop $for-loop|0 local.get $1 local.get $2 - call $~lib/util/sort/insertionSort - end - loop $while-continue|2 - local.get $7 - local.get $9 - i32.lt_s + i32.gt_s if + local.get $2 + i32.const 2 + i32.shl local.get $0 - local.get $7 - i32.const 1 i32.add - local.tee $5 - local.get $9 local.get $2 - call $~lib/util/sort/extendRunRight - local.tee $6 - local.get $5 - i32.sub i32.const 1 - i32.add - local.tee $8 - i32.const 32 - i32.lt_s - if - local.get $0 - local.get $5 - local.get $9 - local.get $5 - i32.const 31 - i32.add - local.tee $1 - local.get $1 - local.get $9 - i32.gt_s - select - local.tee $6 - local.get $8 - local.get $2 - call $~lib/util/sort/insertionSort - end + i32.shl local.get $3 - local.get $5 - i32.add - i64.extend_i32_u - i64.const 30 - i64.shl - local.get $9 - i32.const 1 - i32.add - i64.extend_i32_u - local.tee $13 - i64.div_u - local.get $5 - local.get $6 i32.add + i32.load16_s + i32.store + local.get $2 i32.const 1 i32.add - i64.extend_i32_u - i64.const 30 - i64.shl - local.get $13 - i64.div_u - i64.xor - i32.wrap_i64 - i32.clz - local.set $1 - loop $for-loop|3 - local.get $1 - local.get $4 - i32.lt_u - if - local.get $4 - i32.const 2 - i32.shl - local.get $10 - i32.add - i32.load - local.tee $8 - i32.const -1 - i32.ne - if - local.get $0 - local.get $8 - local.get $11 - local.get $4 - i32.const 2 - i32.shl - local.tee $3 - i32.add - i32.load - i32.const 1 - i32.add - local.get $7 - local.get $12 - local.get $2 - call $~lib/util/sort/mergeRuns - local.get $3 - local.get $10 - i32.add - i32.const -1 - i32.store - local.get $8 - local.set $3 - end - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $for-loop|3 - end - end - local.get $10 + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 11276 + i32.load + i32.const 7 + i32.add + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 28 + i32.add + local.set $2 + i32.const 11268 + i32.load + local.set $3 + i32.const 11276 + i32.load + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.gt_s + if local.get $1 i32.const 2 i32.shl - local.tee $4 + local.get $2 i32.add + local.get $1 local.get $3 - i32.store - local.get $4 - local.get $11 i32.add - local.get $7 + i32.load8_s i32.store - local.get $5 - local.set $3 - local.get $6 - local.set $7 local.get $1 - local.set $4 - br $while-continue|2 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 end end - loop $for-loop|4 - local.get $4 + ) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 11020 + i32.load + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 11012 + i32.load + local.set $3 + i32.const 11020 + i32.load + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.gt_s if - local.get $4 + local.get $1 + i32.const 3 + i32.shl + local.get $2 + i32.add + local.get $1 i32.const 2 i32.shl - local.get $10 + local.get $3 i32.add - i32.load - local.tee $1 - i32.const -1 - i32.ne - if - local.get $0 - local.get $1 - local.get $4 - i32.const 2 - i32.shl - local.get $11 - i32.add - i32.load - i32.const 1 - i32.add - local.get $9 - local.get $12 - local.get $2 - call $~lib/util/sort/mergeRuns - end - local.get $4 + i64.load32_s + i64.store + local.get $1 i32.const 1 - i32.sub - local.set $4 - br $for-loop|4 + i32.add + local.set $1 + br $for-loop|0 end end - local.get $12 - call $~lib/rt/tlsf/__free - local.get $10 - call $~lib/rt/tlsf/__free ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 6 + i32.add local.get $0 - i32.extend8_s + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 48 + i32.add local.get $1 - i32.extend8_s - i32.sub + i32.load offset=4 + local.get $1 + i32.load offset=8 + memory.copy ) - (func $std/typedarray/testArraySort<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) local.get $1 - i32.extend8_s - local.tee $1 + i32.load offset=8 local.get $0 - i32.extend8_s - local.tee $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + local.set $1 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.gt_s + if + local.get $2 + i32.const 3 + i32.shl + local.get $0 + i32.add + local.get $2 + local.get $3 + i32.add + i64.load8_u + i64.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s + if + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end local.get $0 + i32.load offset=4 + i32.const 32 + i32.add + local.set $0 local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.gt_s + if + local.get $2 + i32.const 3 + i32.shl + local.get $0 + i32.add + local.get $2 + i32.const 1 + i32.shl + local.get $3 + i32.add + i64.load16_s + i64.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 11276 + i32.load + i32.const 7 + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s - i32.sub + if + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 56 + i32.add + local.set $2 + i32.const 11268 + i32.load + local.set $3 + i32.const 11276 + i32.load + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.gt_s + if + local.get $1 + i32.const 3 + i32.shl + local.get $2 + i32.add + local.get $1 + local.get $3 + i32.add + i64.load8_s + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -29464,11 +27233,11 @@ local.get $7 i32.add local.tee $3 - i32.load8_u offset=1 + i32.load8_s offset=1 local.tee $6 local.set $5 local.get $3 - i32.load8_u + i32.load8_s local.set $3 i32.const 2 global.set $~argumentsLength @@ -29498,7 +27267,7 @@ local.get $0 local.get $6 i32.add - i32.load8_u + i32.load8_s local.set $8 i32.const 2 global.set $~argumentsLength @@ -29537,7 +27306,7 @@ local.get $0 local.get $6 i32.add - i32.load8_u + i32.load8_s local.set $3 i32.const 2 global.set $~argumentsLength @@ -29575,7 +27344,7 @@ end end ) - (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -29589,14 +27358,14 @@ local.get $0 local.get $1 i32.add - i32.load8_u + i32.load8_s local.get $0 local.get $1 i32.const 1 i32.add local.tee $4 i32.add - i32.load8_u + i32.load8_s i32.const 2 global.set $~argumentsLength local.get $3 @@ -29614,9 +27383,9 @@ local.get $4 i32.add local.tee $5 - i32.load8_u offset=1 + i32.load8_s offset=1 local.get $5 - i32.load8_u + i32.load8_s i32.const 2 global.set $~argumentsLength local.get $3 @@ -29646,14 +27415,14 @@ local.get $1 i32.add local.tee $3 - i32.load8_u + i32.load8_s local.set $5 local.get $3 local.get $0 local.get $2 i32.add local.tee $3 - i32.load8_u + i32.load8_s i32.store8 local.get $1 i32.const 1 @@ -29679,9 +27448,9 @@ local.get $4 i32.add local.tee $1 - i32.load8_u offset=1 + i32.load8_s offset=1 local.get $1 - i32.load8_u + i32.load8_s i32.const 2 global.set $~argumentsLength local.get $3 @@ -29703,7 +27472,7 @@ end local.get $4 ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -29732,7 +27501,7 @@ local.get $0 local.get $2 i32.add - i32.load8_u + i32.load8_s i32.store8 br $for-loop|0 end @@ -29750,7 +27519,7 @@ local.get $0 local.get $6 i32.add - i32.load8_u offset=1 + i32.load8_s offset=1 i32.store8 local.get $6 i32.const 1 @@ -29767,12 +27536,12 @@ local.get $4 local.get $6 i32.add - i32.load8_u + i32.load8_s local.set $8 local.get $2 local.get $4 i32.add - i32.load8_u + i32.load8_s local.set $7 i32.const 2 global.set $~argumentsLength @@ -29812,7 +27581,7 @@ end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -29847,10 +27616,10 @@ br $break|0 end local.get $0 - i32.load8_u + i32.load8_s local.set $5 local.get $0 - i32.load8_u offset=1 + i32.load8_s offset=1 local.set $3 i32.const 2 global.set $~argumentsLength @@ -29868,7 +27637,7 @@ select i32.store8 local.get $0 - i32.load8_u offset=2 + i32.load8_s offset=2 local.set $4 i32.const 2 global.set $~argumentsLength @@ -29898,10 +27667,10 @@ i32.store8 offset=2 end local.get $0 - i32.load8_u + i32.load8_s local.set $4 local.get $0 - i32.load8_u offset=1 + i32.load8_s offset=1 local.set $3 i32.const 2 global.set $~argumentsLength @@ -29933,7 +27702,7 @@ i32.sub i32.const 0 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort return end i32.const 33 @@ -29998,7 +27767,7 @@ i32.sub local.tee $9 local.get $2 - call $~lib/util/sort/extendRunRight + call $~lib/util/sort/extendRunRight local.tee $7 i32.const 1 i32.add @@ -30017,7 +27786,7 @@ local.tee $7 local.get $1 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end loop $while-continue|2 local.get $7 @@ -30031,7 +27800,7 @@ local.tee $5 local.get $9 local.get $2 - call $~lib/util/sort/extendRunRight + call $~lib/util/sort/extendRunRight local.tee $6 local.get $5 i32.sub @@ -30055,7 +27824,7 @@ local.tee $6 local.get $8 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end local.get $3 local.get $5 @@ -30112,7 +27881,7 @@ local.get $7 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns local.get $3 local.get $10 i32.add @@ -30176,7 +27945,7 @@ local.get $9 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns end local.get $4 i32.const 1 @@ -30190,37 +27959,27 @@ local.get $10 call $~lib/rt/tlsf/__free ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - local.tee $0 - local.get $1 - i32.const 255 - i32.and - local.tee $1 - i32.gt_u + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) local.get $0 + i32.extend8_s local.get $1 - i32.lt_u + i32.extend8_s i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArraySort<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) local.get $1 - i32.const 255 - i32.and + i32.extend8_s local.tee $1 local.get $0 - i32.const 255 - i32.and + i32.extend8_s local.tee $0 - i32.gt_u + i32.gt_s local.get $0 local.get $1 - i32.gt_u + i32.gt_s i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -30250,17 +28009,15 @@ local.get $7 i32.ge_s if - local.get $7 - i32.const 1 - i32.shl local.get $0 + local.get $7 i32.add local.tee $3 - i32.load16_s offset=2 + i32.load8_u offset=1 local.tee $6 local.set $5 local.get $3 - i32.load16_s + i32.load8_u local.set $3 i32.const 2 global.set $~argumentsLength @@ -30287,12 +28044,10 @@ i32.le_s if block $while-break|1 - local.get $6 - i32.const 1 - i32.shl local.get $0 + local.get $6 i32.add - i32.load16_s + i32.load8_u local.set $8 i32.const 2 global.set $~argumentsLength @@ -30304,13 +28059,11 @@ i32.const 0 i32.le_s br_if $while-break|1 - local.get $6 - i32.const 1 - i32.shl local.get $0 + local.get $6 i32.add local.get $8 - i32.store16 offset=4 + i32.store8 offset=2 local.get $6 i32.const 1 i32.sub @@ -30319,25 +28072,21 @@ end end end - local.get $6 - i32.const 1 - i32.shl local.get $0 + local.get $6 i32.add local.get $3 - i32.store16 offset=4 + i32.store8 offset=2 loop $while-continue|2 local.get $1 local.get $6 i32.le_s if block $while-break|2 - local.get $6 - i32.const 1 - i32.shl local.get $0 + local.get $6 i32.add - i32.load16_s + i32.load8_u local.set $3 i32.const 2 global.set $~argumentsLength @@ -30349,13 +28098,11 @@ i32.const 0 i32.le_s br_if $while-break|2 - local.get $6 - i32.const 1 - i32.shl local.get $0 + local.get $6 i32.add local.get $3 - i32.store16 offset=2 + i32.store8 offset=1 local.get $6 i32.const 1 i32.sub @@ -30364,13 +28111,11 @@ end end end - local.get $6 - i32.const 1 - i32.shl local.get $0 + local.get $6 i32.add local.get $5 - i32.store16 offset=2 + i32.store8 offset=1 local.get $7 i32.const 2 i32.add @@ -30379,7 +28124,7 @@ end end ) - (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -30390,21 +28135,17 @@ local.get $1 return end - local.get $1 - i32.const 1 - i32.shl local.get $0 + local.get $1 i32.add - i32.load16_s + i32.load8_u + local.get $0 local.get $1 i32.const 1 i32.add local.tee $4 - i32.const 1 - i32.shl - local.get $0 i32.add - i32.load16_s + i32.load8_u i32.const 2 global.set $~argumentsLength local.get $3 @@ -30418,15 +28159,13 @@ local.get $4 i32.gt_s if (result i32) - local.get $4 - i32.const 1 - i32.shl local.get $0 + local.get $4 i32.add local.tee $5 - i32.load16_s offset=2 + i32.load8_u offset=1 local.get $5 - i32.load16_s + i32.load8_u i32.const 2 global.set $~argumentsLength local.get $3 @@ -30452,30 +28191,26 @@ local.get $2 i32.lt_s if - local.get $1 - i32.const 1 - i32.shl local.get $0 + local.get $1 i32.add local.tee $3 - i32.load16_s + i32.load8_u local.set $5 local.get $3 - local.get $2 - i32.const 1 - i32.shl local.get $0 + local.get $2 i32.add local.tee $3 - i32.load16_s - i32.store16 + i32.load8_u + i32.store8 local.get $1 i32.const 1 i32.add local.set $1 local.get $3 local.get $5 - i32.store16 + i32.store8 local.get $2 i32.const 1 i32.sub @@ -30489,15 +28224,13 @@ local.get $4 i32.gt_s if (result i32) - local.get $4 - i32.const 1 - i32.shl local.get $0 + local.get $4 i32.add local.tee $1 - i32.load16_s offset=2 + i32.load8_u offset=1 local.get $1 - i32.load16_s + i32.load8_u i32.const 2 global.set $~argumentsLength local.get $3 @@ -30519,7 +28252,7 @@ end local.get $4 ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -30544,15 +28277,12 @@ i32.const 1 i32.sub local.tee $2 - i32.const 1 - i32.shl - local.tee $8 i32.add local.get $0 - local.get $8 + local.get $2 i32.add - i32.load16_s - i32.store16 + i32.load8_u + i32.store8 br $for-loop|0 end end @@ -30564,17 +28294,13 @@ local.get $7 local.get $6 i32.sub - i32.const 1 - i32.shl local.get $4 i32.add - local.get $6 - i32.const 1 - i32.shl local.get $0 + local.get $6 i32.add - i32.load16_s offset=2 - i32.store16 + i32.load8_u offset=1 + i32.store8 local.get $6 i32.const 1 i32.add @@ -30587,49 +28313,41 @@ local.get $3 i32.le_s if - local.get $6 - i32.const 1 - i32.shl local.get $4 + local.get $6 i32.add - i32.load16_s - local.set $7 + i32.load8_u + local.set $8 local.get $2 - i32.const 1 - i32.shl local.get $4 i32.add - i32.load16_s - local.set $8 + i32.load8_u + local.set $7 i32.const 2 global.set $~argumentsLength - local.get $7 local.get $8 + local.get $7 local.get $5 i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $1 - i32.const 1 - i32.shl local.get $0 + local.get $1 i32.add - local.get $7 - i32.store16 + local.get $8 + i32.store8 local.get $6 i32.const 1 i32.sub local.set $6 else - local.get $1 - i32.const 1 - i32.shl local.get $0 + local.get $1 i32.add - local.get $8 - i32.store16 + local.get $7 + i32.store8 local.get $2 i32.const 1 i32.add @@ -30643,7 +28361,7 @@ end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -30678,10 +28396,10 @@ br $break|0 end local.get $0 - i32.load16_s + i32.load8_u local.set $5 local.get $0 - i32.load16_s offset=2 + i32.load8_u offset=1 local.set $3 i32.const 2 global.set $~argumentsLength @@ -30697,9 +28415,9 @@ i32.gt_s local.tee $1 select - i32.store16 + i32.store8 local.get $0 - i32.load16_s offset=4 + i32.load8_u offset=2 local.set $4 i32.const 2 global.set $~argumentsLength @@ -30720,19 +28438,19 @@ local.get $3 local.get $1 select - i32.store16 offset=2 + i32.store8 offset=1 local.get $0 local.get $3 local.get $4 local.get $1 select - i32.store16 offset=4 + i32.store8 offset=2 end local.get $0 - i32.load16_s + i32.load8_u local.set $4 local.get $0 - i32.load16_s offset=2 + i32.load8_u offset=1 local.set $3 i32.const 2 global.set $~argumentsLength @@ -30748,13 +28466,13 @@ i32.gt_s local.tee $1 select - i32.store16 + i32.store8 local.get $0 local.get $4 local.get $3 local.get $1 select - i32.store16 offset=2 + i32.store8 offset=1 return end local.get $0 @@ -30764,7 +28482,7 @@ i32.sub i32.const 0 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort return end i32.const 33 @@ -30818,8 +28536,6 @@ end global.get $~lib/rt/tlsf/ROOT local.get $1 - i32.const 1 - i32.shl call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -30831,7 +28547,7 @@ i32.sub local.tee $9 local.get $2 - call $~lib/util/sort/extendRunRight + call $~lib/util/sort/extendRunRight local.tee $7 i32.const 1 i32.add @@ -30850,7 +28566,7 @@ local.tee $7 local.get $1 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end loop $while-continue|2 local.get $7 @@ -30864,7 +28580,7 @@ local.tee $5 local.get $9 local.get $2 - call $~lib/util/sort/extendRunRight + call $~lib/util/sort/extendRunRight local.tee $6 local.get $5 i32.sub @@ -30888,7 +28604,7 @@ local.tee $6 local.get $8 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end local.get $3 local.get $5 @@ -30945,7 +28661,7 @@ local.get $7 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns local.get $3 local.get $10 i32.add @@ -31009,7 +28725,7 @@ local.get $9 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns end local.get $4 i32.const 1 @@ -31023,27 +28739,37 @@ local.get $10 call $~lib/rt/tlsf/__free ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.extend16_s + i32.const 255 + i32.and + local.tee $0 local.get $1 - i32.extend16_s + i32.const 255 + i32.and + local.tee $1 + i32.gt_u + local.get $0 + local.get $1 + i32.lt_u i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArraySort<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) local.get $1 - i32.extend16_s + i32.const 255 + i32.and local.tee $1 local.get $0 - i32.extend16_s + i32.const 255 + i32.and local.tee $0 - i32.gt_s + i32.gt_u local.get $0 local.get $1 - i32.gt_s + i32.gt_u i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -31079,11 +28805,11 @@ local.get $0 i32.add local.tee $3 - i32.load16_u offset=2 + i32.load16_s offset=2 local.tee $6 local.set $5 local.get $3 - i32.load16_u + i32.load16_s local.set $3 i32.const 2 global.set $~argumentsLength @@ -31115,7 +28841,7 @@ i32.shl local.get $0 i32.add - i32.load16_u + i32.load16_s local.set $8 i32.const 2 global.set $~argumentsLength @@ -31160,7 +28886,7 @@ i32.shl local.get $0 i32.add - i32.load16_u + i32.load16_s local.set $3 i32.const 2 global.set $~argumentsLength @@ -31202,7 +28928,7 @@ end end ) - (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -31218,7 +28944,7 @@ i32.shl local.get $0 i32.add - i32.load16_u + i32.load16_s local.get $1 i32.const 1 i32.add @@ -31227,7 +28953,7 @@ i32.shl local.get $0 i32.add - i32.load16_u + i32.load16_s i32.const 2 global.set $~argumentsLength local.get $3 @@ -31247,9 +28973,9 @@ local.get $0 i32.add local.tee $5 - i32.load16_u offset=2 + i32.load16_s offset=2 local.get $5 - i32.load16_u + i32.load16_s i32.const 2 global.set $~argumentsLength local.get $3 @@ -31281,7 +29007,7 @@ local.get $0 i32.add local.tee $3 - i32.load16_u + i32.load16_s local.set $5 local.get $3 local.get $2 @@ -31290,7 +29016,7 @@ local.get $0 i32.add local.tee $3 - i32.load16_u + i32.load16_s i32.store16 local.get $1 i32.const 1 @@ -31318,9 +29044,9 @@ local.get $0 i32.add local.tee $1 - i32.load16_u offset=2 + i32.load16_s offset=2 local.get $1 - i32.load16_u + i32.load16_s i32.const 2 global.set $~argumentsLength local.get $3 @@ -31342,7 +29068,7 @@ end local.get $4 ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -31374,7 +29100,7 @@ local.get $0 local.get $8 i32.add - i32.load16_u + i32.load16_s i32.store16 br $for-loop|0 end @@ -31396,7 +29122,7 @@ i32.shl local.get $0 i32.add - i32.load16_u offset=2 + i32.load16_s offset=2 i32.store16 local.get $6 i32.const 1 @@ -31415,14 +29141,14 @@ i32.shl local.get $4 i32.add - i32.load16_u + i32.load16_s local.set $7 local.get $2 i32.const 1 i32.shl local.get $4 i32.add - i32.load16_u + i32.load16_s local.set $8 i32.const 2 global.set $~argumentsLength @@ -31466,7 +29192,7 @@ end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -31501,10 +29227,10 @@ br $break|0 end local.get $0 - i32.load16_u + i32.load16_s local.set $5 local.get $0 - i32.load16_u offset=2 + i32.load16_s offset=2 local.set $3 i32.const 2 global.set $~argumentsLength @@ -31522,7 +29248,7 @@ select i32.store16 local.get $0 - i32.load16_u offset=4 + i32.load16_s offset=4 local.set $4 i32.const 2 global.set $~argumentsLength @@ -31552,10 +29278,10 @@ i32.store16 offset=4 end local.get $0 - i32.load16_u + i32.load16_s local.set $4 local.get $0 - i32.load16_u offset=2 + i32.load16_s offset=2 local.set $3 i32.const 2 global.set $~argumentsLength @@ -31587,7 +29313,7 @@ i32.sub i32.const 0 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort return end i32.const 33 @@ -31654,7 +29380,7 @@ i32.sub local.tee $9 local.get $2 - call $~lib/util/sort/extendRunRight + call $~lib/util/sort/extendRunRight local.tee $7 i32.const 1 i32.add @@ -31673,7 +29399,7 @@ local.tee $7 local.get $1 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end loop $while-continue|2 local.get $7 @@ -31687,7 +29413,7 @@ local.tee $5 local.get $9 local.get $2 - call $~lib/util/sort/extendRunRight + call $~lib/util/sort/extendRunRight local.tee $6 local.get $5 i32.sub @@ -31711,7 +29437,7 @@ local.tee $6 local.get $8 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end local.get $3 local.get $5 @@ -31768,7 +29494,7 @@ local.get $7 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns local.get $3 local.get $10 i32.add @@ -31832,7 +29558,7 @@ local.get $9 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns end local.get $4 i32.const 1 @@ -31846,37 +29572,27 @@ local.get $10 call $~lib/rt/tlsf/__free ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 65535 - i32.and - local.tee $0 - local.get $1 - i32.const 65535 - i32.and - local.tee $1 - i32.gt_u + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) local.get $0 + i32.extend16_s local.get $1 - i32.lt_u + i32.extend16_s i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArraySort<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) local.get $1 - i32.const 65535 - i32.and + i32.extend16_s local.tee $1 local.get $0 - i32.const 65535 - i32.and + i32.extend16_s local.tee $0 - i32.gt_u + i32.gt_s local.get $0 local.get $1 - i32.gt_u + i32.gt_s i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -31907,16 +29623,16 @@ i32.ge_s if local.get $7 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add local.tee $3 - i32.load offset=4 + i32.load16_u offset=2 local.tee $6 local.set $5 local.get $3 - i32.load + i32.load16_u local.set $3 i32.const 2 global.set $~argumentsLength @@ -31944,11 +29660,11 @@ if block $while-break|1 local.get $6 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add - i32.load + i32.load16_u local.set $8 i32.const 2 global.set $~argumentsLength @@ -31961,12 +29677,12 @@ i32.le_s br_if $while-break|1 local.get $6 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add local.get $8 - i32.store offset=8 + i32.store16 offset=4 local.get $6 i32.const 1 i32.sub @@ -31976,12 +29692,12 @@ end end local.get $6 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add local.get $3 - i32.store offset=8 + i32.store16 offset=4 loop $while-continue|2 local.get $1 local.get $6 @@ -31989,11 +29705,11 @@ if block $while-break|2 local.get $6 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add - i32.load + i32.load16_u local.set $3 i32.const 2 global.set $~argumentsLength @@ -32006,12 +29722,12 @@ i32.le_s br_if $while-break|2 local.get $6 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add local.get $3 - i32.store offset=4 + i32.store16 offset=2 local.get $6 i32.const 1 i32.sub @@ -32021,12 +29737,12 @@ end end local.get $6 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add local.get $5 - i32.store offset=4 + i32.store16 offset=2 local.get $7 i32.const 2 i32.add @@ -32035,7 +29751,7 @@ end end ) - (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -32047,20 +29763,20 @@ return end local.get $1 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add - i32.load + i32.load16_u local.get $1 i32.const 1 i32.add local.tee $4 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add - i32.load + i32.load16_u i32.const 2 global.set $~argumentsLength local.get $3 @@ -32075,14 +29791,14 @@ i32.gt_s if (result i32) local.get $4 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add local.tee $5 - i32.load offset=4 + i32.load16_u offset=2 local.get $5 - i32.load + i32.load16_u i32.const 2 global.set $~argumentsLength local.get $3 @@ -32109,29 +29825,29 @@ i32.lt_s if local.get $1 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add local.tee $3 - i32.load + i32.load16_u local.set $5 local.get $3 local.get $2 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add local.tee $3 - i32.load - i32.store + i32.load16_u + i32.store16 local.get $1 i32.const 1 i32.add local.set $1 local.get $3 local.get $5 - i32.store + i32.store16 local.get $2 i32.const 1 i32.sub @@ -32146,14 +29862,14 @@ i32.gt_s if (result i32) local.get $4 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add local.tee $1 - i32.load offset=4 + i32.load16_u offset=2 local.get $1 - i32.load + i32.load16_u i32.const 2 global.set $~argumentsLength local.get $3 @@ -32175,7 +29891,7 @@ end local.get $4 ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -32200,15 +29916,15 @@ i32.const 1 i32.sub local.tee $2 - i32.const 2 + i32.const 1 i32.shl local.tee $8 i32.add local.get $0 local.get $8 i32.add - i32.load - i32.store + i32.load16_u + i32.store16 br $for-loop|0 end end @@ -32220,17 +29936,17 @@ local.get $7 local.get $6 i32.sub - i32.const 2 + i32.const 1 i32.shl local.get $4 i32.add local.get $6 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add - i32.load offset=4 - i32.store + i32.load16_u offset=2 + i32.store16 local.get $6 i32.const 1 i32.add @@ -32244,18 +29960,18 @@ i32.le_s if local.get $6 - i32.const 2 + i32.const 1 i32.shl local.get $4 i32.add - i32.load + i32.load16_u local.set $7 local.get $2 - i32.const 2 + i32.const 1 i32.shl local.get $4 i32.add - i32.load + i32.load16_u local.set $8 i32.const 2 global.set $~argumentsLength @@ -32268,24 +29984,24 @@ i32.lt_s if local.get $1 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add local.get $7 - i32.store + i32.store16 local.get $6 i32.const 1 i32.sub local.set $6 else local.get $1 - i32.const 2 + i32.const 1 i32.shl local.get $0 i32.add local.get $8 - i32.store + i32.store16 local.get $2 i32.const 1 i32.add @@ -32299,7 +30015,7 @@ end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -32334,10 +30050,10 @@ br $break|0 end local.get $0 - i32.load + i32.load16_u local.set $5 local.get $0 - i32.load offset=4 + i32.load16_u offset=2 local.set $3 i32.const 2 global.set $~argumentsLength @@ -32353,9 +30069,9 @@ i32.gt_s local.tee $1 select - i32.store + i32.store16 local.get $0 - i32.load offset=8 + i32.load16_u offset=4 local.set $4 i32.const 2 global.set $~argumentsLength @@ -32376,19 +30092,19 @@ local.get $3 local.get $1 select - i32.store offset=4 + i32.store16 offset=2 local.get $0 local.get $3 local.get $4 local.get $1 select - i32.store offset=8 + i32.store16 offset=4 end local.get $0 - i32.load + i32.load16_u local.set $4 local.get $0 - i32.load offset=4 + i32.load16_u offset=2 local.set $3 i32.const 2 global.set $~argumentsLength @@ -32404,13 +30120,13 @@ i32.gt_s local.tee $1 select - i32.store + i32.store16 local.get $0 local.get $4 local.get $3 local.get $1 select - i32.store offset=4 + i32.store16 offset=2 return end local.get $0 @@ -32420,7 +30136,7 @@ i32.sub i32.const 0 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort return end i32.const 33 @@ -32474,7 +30190,7 @@ end global.get $~lib/rt/tlsf/ROOT local.get $1 - i32.const 2 + i32.const 1 i32.shl call $~lib/rt/tlsf/allocateBlock i32.const 4 @@ -32487,7 +30203,7 @@ i32.sub local.tee $9 local.get $2 - call $~lib/util/sort/extendRunRight + call $~lib/util/sort/extendRunRight local.tee $7 i32.const 1 i32.add @@ -32506,7 +30222,7 @@ local.tee $7 local.get $1 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end loop $while-continue|2 local.get $7 @@ -32520,7 +30236,7 @@ local.tee $5 local.get $9 local.get $2 - call $~lib/util/sort/extendRunRight + call $~lib/util/sort/extendRunRight local.tee $6 local.get $5 i32.sub @@ -32544,7 +30260,7 @@ local.tee $6 local.get $8 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end local.get $3 local.get $5 @@ -32601,7 +30317,7 @@ local.get $7 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns local.get $3 local.get $10 i32.add @@ -32665,7 +30381,7 @@ local.get $9 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns end local.get $4 i32.const 1 @@ -32679,21 +30395,37 @@ local.get $10 call $~lib/rt/tlsf/__free ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) local.get $0 + i32.const 65535 + i32.and + local.tee $0 local.get $1 + i32.const 65535 + i32.and + local.tee $1 + i32.gt_u + local.get $0 + local.get $1 + i32.lt_u i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySort<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) local.get $1 - i32.lt_s + i32.const 65535 + i32.and + local.tee $1 + local.get $0 + i32.const 65535 + i32.and + local.tee $0 + i32.gt_u local.get $0 local.get $1 - i32.gt_s + i32.gt_u i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -32852,7 +30584,7 @@ end end ) - (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -32992,7 +30724,7 @@ end local.get $4 ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -33116,7 +30848,7 @@ end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -33237,7 +30969,7 @@ i32.sub i32.const 0 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort return end i32.const 33 @@ -33304,7 +31036,7 @@ i32.sub local.tee $9 local.get $2 - call $~lib/util/sort/extendRunRight + call $~lib/util/sort/extendRunRight local.tee $7 i32.const 1 i32.add @@ -33323,7 +31055,7 @@ local.tee $7 local.get $1 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end loop $while-continue|2 local.get $7 @@ -33337,7 +31069,7 @@ local.tee $5 local.get $9 local.get $2 - call $~lib/util/sort/extendRunRight + call $~lib/util/sort/extendRunRight local.tee $6 local.get $5 i32.sub @@ -33361,7 +31093,7 @@ local.tee $6 local.get $8 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end local.get $3 local.get $5 @@ -33418,7 +31150,7 @@ local.get $7 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns local.get $3 local.get $10 i32.add @@ -33482,7 +31214,7 @@ local.get $9 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns end local.get $4 i32.const 1 @@ -33496,42 +31228,38 @@ local.get $10 call $~lib/rt/tlsf/__free ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.gt_u + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - i32.lt_u i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArraySort<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - i32.lt_u + i32.lt_s local.get $0 local.get $1 - i32.gt_u + i32.gt_s i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i64) - (local $6 i64) + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (local $5 i32) + (local $6 i32) (local $7 i32) - (local $8 i64) + (local $8 i32) local.get $3 local.get $2 local.get $1 i32.sub i32.const 1 i32.add - local.tee $7 + local.tee $5 local.get $3 i32.sub i32.const 1 i32.and i32.sub - local.get $7 + local.get $5 i32.const 1 i32.and local.get $3 @@ -33545,126 +31273,126 @@ i32.ge_s if local.get $7 - i32.const 3 + i32.const 2 i32.shl local.get $0 i32.add local.tee $3 - i64.load offset=8 - local.tee $8 - local.set $6 - local.get $3 - i64.load + i32.load offset=4 + local.tee $6 local.set $5 + local.get $3 + i32.load + local.set $3 i32.const 2 global.set $~argumentsLength - local.get $5 - local.get $8 + local.get $3 + local.get $6 local.get $4 i32.load - call_indirect $0 (type $i64_i64_=>_i32) + call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $5 - local.set $6 - local.get $8 + local.get $3 local.set $5 + local.get $6 + local.set $3 end local.get $7 i32.const 1 i32.sub - local.set $3 + local.set $6 loop $while-continue|1 local.get $1 - local.get $3 + local.get $6 i32.le_s if block $while-break|1 - local.get $3 - i32.const 3 + local.get $6 + i32.const 2 i32.shl local.get $0 i32.add - i64.load + i32.load local.set $8 i32.const 2 global.set $~argumentsLength local.get $8 - local.get $5 + local.get $3 local.get $4 i32.load - call_indirect $0 (type $i64_i64_=>_i32) + call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s br_if $while-break|1 - local.get $3 - i32.const 3 + local.get $6 + i32.const 2 i32.shl local.get $0 i32.add local.get $8 - i64.store offset=16 - local.get $3 + i32.store offset=8 + local.get $6 i32.const 1 i32.sub - local.set $3 + local.set $6 br $while-continue|1 end end end - local.get $3 - i32.const 3 + local.get $6 + i32.const 2 i32.shl local.get $0 i32.add - local.get $5 - i64.store offset=16 + local.get $3 + i32.store offset=8 loop $while-continue|2 local.get $1 - local.get $3 + local.get $6 i32.le_s if block $while-break|2 - local.get $3 - i32.const 3 + local.get $6 + i32.const 2 i32.shl local.get $0 i32.add - i64.load - local.set $5 + i32.load + local.set $3 i32.const 2 global.set $~argumentsLength + local.get $3 local.get $5 - local.get $6 local.get $4 i32.load - call_indirect $0 (type $i64_i64_=>_i32) + call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s br_if $while-break|2 - local.get $3 - i32.const 3 + local.get $6 + i32.const 2 i32.shl local.get $0 i32.add - local.get $5 - i64.store offset=8 local.get $3 + i32.store offset=4 + local.get $6 i32.const 1 i32.sub - local.set $3 + local.set $6 br $while-continue|2 end end end - local.get $3 - i32.const 3 + local.get $6 + i32.const 2 i32.shl local.get $0 i32.add - local.get $6 - i64.store offset=8 + local.get $5 + i32.store offset=4 local.get $7 i32.const 2 i32.add @@ -33673,11 +31401,10 @@ end end ) - (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) - (local $5 i64) + (local $5 i32) (local $6 i32) - (local $7 i64) local.get $1 local.get $2 i32.eq @@ -33686,25 +31413,25 @@ return end local.get $1 - i32.const 3 + i32.const 2 i32.shl local.get $0 i32.add - i64.load + i32.load local.get $1 i32.const 1 i32.add local.tee $4 - i32.const 3 + i32.const 2 i32.shl local.get $0 i32.add - i64.load + i32.load i32.const 2 global.set $~argumentsLength local.get $3 i32.load - call_indirect $0 (type $i64_i64_=>_i32) + call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if @@ -33714,19 +31441,19 @@ i32.gt_s if (result i32) local.get $4 - i32.const 3 + i32.const 2 i32.shl local.get $0 i32.add - local.tee $6 - i64.load offset=8 - local.get $6 - i64.load + local.tee $5 + i32.load offset=4 + local.get $5 + i32.load i32.const 2 global.set $~argumentsLength local.get $3 i32.load - call_indirect $0 (type $i64_i64_=>_i32) + call_indirect $0 (type $i32_i32_=>_i32) i32.const 31 i32.shr_u else @@ -33748,29 +31475,29 @@ i32.lt_s if local.get $1 - i32.const 3 + i32.const 2 i32.shl local.get $0 i32.add local.tee $3 - i64.load + i32.load local.set $5 local.get $3 local.get $2 - i32.const 3 + i32.const 2 i32.shl local.get $0 i32.add local.tee $3 - i64.load - i64.store + i32.load + i32.store local.get $1 i32.const 1 i32.add local.set $1 local.get $3 local.get $5 - i64.store + i32.store local.get $2 i32.const 1 i32.sub @@ -33785,19 +31512,19 @@ i32.gt_s if (result i32) local.get $4 - i32.const 3 + i32.const 2 i32.shl local.get $0 i32.add local.tee $1 - i64.load offset=8 + i32.load offset=4 local.get $1 - i64.load + i32.load i32.const 2 global.set $~argumentsLength local.get $3 i32.load - call_indirect $0 (type $i64_i64_=>_i32) + call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.ge_s else @@ -33814,19 +31541,17 @@ end local.get $4 ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (local $6 i32) - (local $7 i64) - (local $8 i64) - (local $9 i32) - (local $10 i32) + (local $7 i32) + (local $8 i32) local.get $3 local.get $2 i32.const 1 i32.sub local.tee $6 i32.add - local.set $9 + local.set $7 local.get $6 i32.const 1 i32.add @@ -33841,15 +31566,15 @@ i32.const 1 i32.sub local.tee $2 - i32.const 3 + i32.const 2 i32.shl - local.tee $10 + local.tee $8 i32.add local.get $0 - local.get $10 + local.get $8 i32.add - i64.load - i64.store + i32.load + i32.store br $for-loop|0 end end @@ -33858,20 +31583,20 @@ local.get $6 i32.gt_s if - local.get $9 + local.get $7 local.get $6 i32.sub - i32.const 3 + i32.const 2 i32.shl local.get $4 i32.add local.get $6 - i32.const 3 + i32.const 2 i32.shl local.get $0 i32.add - i64.load offset=8 - i64.store + i32.load offset=4 + i32.store local.get $6 i32.const 1 i32.add @@ -33885,18 +31610,18 @@ i32.le_s if local.get $6 - i32.const 3 + i32.const 2 i32.shl local.get $4 i32.add - i64.load + i32.load local.set $7 local.get $2 - i32.const 3 + i32.const 2 i32.shl local.get $4 i32.add - i64.load + i32.load local.set $8 i32.const 2 global.set $~argumentsLength @@ -33904,29 +31629,29 @@ local.get $8 local.get $5 i32.load - call_indirect $0 (type $i64_i64_=>_i32) + call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if local.get $1 - i32.const 3 + i32.const 2 i32.shl local.get $0 i32.add local.get $7 - i64.store + i32.store local.get $6 i32.const 1 i32.sub local.set $6 else local.get $1 - i32.const 3 + i32.const 2 i32.shl local.get $0 i32.add local.get $8 - i64.store + i32.store local.get $2 i32.const 1 i32.add @@ -33940,20 +31665,18 @@ end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i64) + (local $8 i32) (local $9 i32) (local $10 i32) (local $11 i32) (local $12 i32) (local $13 i64) - (local $14 i64) - (local $15 i32) local.get $1 i32.const 48 i32.le_s @@ -33977,83 +31700,83 @@ br $break|0 end local.get $0 - i64.load - local.set $13 + i32.load + local.set $5 local.get $0 - i64.load offset=8 - local.set $14 + i32.load offset=4 + local.set $3 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $14 - local.get $13 - local.get $13 - local.get $14 + local.get $3 + local.get $5 + local.get $5 + local.get $3 local.get $2 i32.load - call_indirect $0 (type $i64_i64_=>_i32) + call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s local.tee $1 select - i64.store + i32.store local.get $0 - i64.load offset=16 - local.set $8 + i32.load offset=8 + local.set $4 i32.const 2 global.set $~argumentsLength - local.get $13 - local.get $14 + local.get $5 + local.get $3 local.get $1 select - local.tee $13 - local.get $8 + local.tee $3 + local.get $4 local.get $2 i32.load - call_indirect $0 (type $i64_i64_=>_i32) + call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s local.set $1 local.get $0 - local.get $8 - local.get $13 + local.get $4 + local.get $3 local.get $1 select - i64.store offset=8 + i32.store offset=4 local.get $0 - local.get $13 - local.get $8 + local.get $3 + local.get $4 local.get $1 select - i64.store offset=16 + i32.store offset=8 end local.get $0 - i64.load - local.set $8 + i32.load + local.set $4 local.get $0 - i64.load offset=8 - local.set $13 + i32.load offset=4 + local.set $3 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $13 - local.get $8 - local.get $8 - local.get $13 + local.get $3 + local.get $4 + local.get $4 + local.get $3 local.get $2 i32.load - call_indirect $0 (type $i64_i64_=>_i32) + call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s local.tee $1 select - i64.store + i32.store local.get $0 - local.get $8 - local.get $13 + local.get $4 + local.get $3 local.get $1 select - i64.store offset=8 + i32.store offset=4 return end local.get $0 @@ -34063,27 +31786,27 @@ i32.sub i32.const 0 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort return end i32.const 33 local.get $1 i32.clz i32.sub - local.tee $6 + local.tee $8 i32.const 2 i32.shl local.tee $7 i32.const 1 i32.shl - local.set $9 + local.set $5 global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $9 + local.get $5 call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -34092,21 +31815,21 @@ i32.add local.set $11 loop $for-loop|1 - local.get $5 local.get $6 + local.get $8 i32.lt_u if - local.get $5 + local.get $6 i32.const 2 i32.shl local.get $10 i32.add i32.const -1 i32.store - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|1 end end @@ -34117,7 +31840,7 @@ end global.get $~lib/rt/tlsf/ROOT local.get $1 - i32.const 3 + i32.const 2 i32.shl call $~lib/rt/tlsf/allocateBlock i32.const 4 @@ -34130,11 +31853,11 @@ i32.sub local.tee $9 local.get $2 - call $~lib/util/sort/extendRunRight - local.tee $1 + call $~lib/util/sort/extendRunRight + local.tee $7 i32.const 1 i32.add - local.tee $5 + local.tee $1 i32.const 32 i32.lt_s if @@ -34146,51 +31869,51 @@ i32.const 31 i32.lt_s select - local.tee $1 - local.get $5 + local.tee $7 + local.get $1 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end loop $while-continue|2 - local.get $1 + local.get $7 local.get $9 i32.lt_s if local.get $0 - local.get $1 + local.get $7 i32.const 1 i32.add - local.tee $6 + local.tee $5 local.get $9 local.get $2 - call $~lib/util/sort/extendRunRight - local.tee $5 - local.get $6 + call $~lib/util/sort/extendRunRight + local.tee $6 + local.get $5 i32.sub i32.const 1 i32.add - local.tee $7 + local.tee $8 i32.const 32 i32.lt_s if local.get $0 - local.get $6 + local.get $5 local.get $9 - local.get $6 + local.get $5 i32.const 31 i32.add - local.tee $5 - local.get $5 + local.tee $1 + local.get $1 local.get $9 i32.gt_s select - local.tee $5 - local.get $7 + local.tee $6 + local.get $8 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end local.get $3 - local.get $6 + local.get $5 i32.add i64.extend_i32_u i64.const 30 @@ -34199,7 +31922,7 @@ i32.const 1 i32.add i64.extend_i32_u - local.tee $8 + local.tee $13 i64.div_u local.get $5 local.get $6 @@ -34209,16 +31932,16 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $8 + local.get $13 i64.div_u i64.xor i32.wrap_i64 i32.clz - local.set $7 + local.set $1 loop $for-loop|3 + local.get $1 local.get $4 - local.get $7 - i32.gt_u + i32.lt_u if local.get $4 i32.const 2 @@ -34226,12 +31949,12 @@ local.get $10 i32.add i32.load - local.tee $15 + local.tee $8 i32.const -1 i32.ne if local.get $0 - local.get $15 + local.get $8 local.get $11 local.get $4 i32.const 2 @@ -34241,16 +31964,16 @@ i32.load i32.const 1 i32.add - local.get $1 + local.get $7 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns local.get $3 local.get $10 i32.add i32.const -1 i32.store - local.get $15 + local.get $8 local.set $3 end local.get $4 @@ -34261,7 +31984,7 @@ end end local.get $10 - local.get $7 + local.get $1 i32.const 2 i32.shl local.tee $4 @@ -34271,13 +31994,13 @@ local.get $4 local.get $11 i32.add - local.get $1 + local.get $7 i32.store - local.get $6 - local.set $3 local.get $5 - local.set $1 - local.get $7 + local.set $3 + local.get $6 + local.set $7 + local.get $1 local.set $4 br $while-continue|2 end @@ -34308,7 +32031,7 @@ local.get $9 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns end local.get $4 i32.const 1 @@ -34322,25 +32045,25 @@ local.get $10 call $~lib/rt/tlsf/__free ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i64) (param $1 i64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - i64.gt_s + i32.gt_u local.get $0 local.get $1 - i64.lt_s + i32.lt_u i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i64) (result i32) + (func $std/typedarray/testArraySort<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - i64.lt_s + i32.lt_u local.get $0 local.get $1 - i64.gt_s + i32.gt_u i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (local $5 i64) (local $6 i64) (local $7 i32) @@ -34499,7 +32222,7 @@ end end ) - (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i64) (local $6 i32) @@ -34640,7 +32363,7 @@ end local.get $4 ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (local $6 i32) (local $7 i64) (local $8 i64) @@ -34766,7 +32489,7 @@ end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -34889,7 +32612,7 @@ i32.sub i32.const 0 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort return end i32.const 33 @@ -34956,7 +32679,7 @@ i32.sub local.tee $9 local.get $2 - call $~lib/util/sort/extendRunRight + call $~lib/util/sort/extendRunRight local.tee $1 i32.const 1 i32.add @@ -34975,7 +32698,7 @@ local.tee $1 local.get $5 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end loop $while-continue|2 local.get $1 @@ -34989,7 +32712,7 @@ local.tee $6 local.get $9 local.get $2 - call $~lib/util/sort/extendRunRight + call $~lib/util/sort/extendRunRight local.tee $5 local.get $6 i32.sub @@ -35013,7 +32736,7 @@ local.tee $5 local.get $7 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end local.get $3 local.get $6 @@ -35070,7 +32793,7 @@ local.get $1 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns local.get $3 local.get $10 i32.add @@ -35134,7 +32857,7 @@ local.get $9 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns end local.get $4 i32.const 1 @@ -35148,29 +32871,29 @@ local.get $10 call $~lib/rt/tlsf/__free ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i64) (param $1 i64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i64) (param $1 i64) (result i32) local.get $0 local.get $1 - i64.gt_u + i64.gt_s local.get $0 local.get $1 - i64.lt_u + i64.lt_s i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i64) (result i32) + (func $std/typedarray/testArraySort<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i64) (result i32) local.get $0 local.get $1 - i64.lt_u + i64.lt_s local.get $0 local.get $1 - i64.gt_u + i64.gt_s i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 f32) - (local $6 f32) + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (local $5 i64) + (local $6 i64) (local $7 i32) - (local $8 f32) + (local $8 i64) local.get $3 local.get $2 local.get $1 @@ -35197,16 +32920,16 @@ i32.ge_s if local.get $7 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add local.tee $3 - f32.load offset=4 + i64.load offset=8 local.tee $8 local.set $6 local.get $3 - f32.load + i64.load local.set $5 i32.const 2 global.set $~argumentsLength @@ -35214,7 +32937,7 @@ local.get $8 local.get $4 i32.load - call_indirect $0 (type $f32_f32_=>_i32) + call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.le_s if @@ -35234,11 +32957,11 @@ if block $while-break|1 local.get $3 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add - f32.load + i64.load local.set $8 i32.const 2 global.set $~argumentsLength @@ -35246,17 +32969,17 @@ local.get $5 local.get $4 i32.load - call_indirect $0 (type $f32_f32_=>_i32) + call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.le_s br_if $while-break|1 local.get $3 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add local.get $8 - f32.store offset=8 + i64.store offset=16 local.get $3 i32.const 1 i32.sub @@ -35266,12 +32989,12 @@ end end local.get $3 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add local.get $5 - f32.store offset=8 + i64.store offset=16 loop $while-continue|2 local.get $1 local.get $3 @@ -35279,11 +33002,11 @@ if block $while-break|2 local.get $3 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add - f32.load + i64.load local.set $5 i32.const 2 global.set $~argumentsLength @@ -35291,17 +33014,17 @@ local.get $6 local.get $4 i32.load - call_indirect $0 (type $f32_f32_=>_i32) + call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.le_s br_if $while-break|2 local.get $3 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add local.get $5 - f32.store offset=4 + i64.store offset=8 local.get $3 i32.const 1 i32.sub @@ -35311,12 +33034,12 @@ end end local.get $3 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add local.get $6 - f32.store offset=4 + i64.store offset=8 local.get $7 i32.const 2 i32.add @@ -35325,11 +33048,11 @@ end end ) - (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) - (local $5 f32) + (local $5 i64) (local $6 i32) - (local $7 f32) + (local $7 i64) local.get $1 local.get $2 i32.eq @@ -35338,25 +33061,25 @@ return end local.get $1 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add - f32.load + i64.load local.get $1 i32.const 1 i32.add local.tee $4 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add - f32.load + i64.load i32.const 2 global.set $~argumentsLength local.get $3 i32.load - call_indirect $0 (type $f32_f32_=>_i32) + call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s if @@ -35366,19 +33089,19 @@ i32.gt_s if (result i32) local.get $4 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add local.tee $6 - f32.load offset=4 + i64.load offset=8 local.get $6 - f32.load + i64.load i32.const 2 global.set $~argumentsLength local.get $3 i32.load - call_indirect $0 (type $f32_f32_=>_i32) + call_indirect $0 (type $i64_i64_=>_i32) i32.const 31 i32.shr_u else @@ -35400,29 +33123,29 @@ i32.lt_s if local.get $1 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add local.tee $3 - f32.load + i64.load local.set $5 local.get $3 local.get $2 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add local.tee $3 - f32.load - f32.store + i64.load + i64.store local.get $1 i32.const 1 i32.add local.set $1 local.get $3 local.get $5 - f32.store + i64.store local.get $2 i32.const 1 i32.sub @@ -35437,19 +33160,19 @@ i32.gt_s if (result i32) local.get $4 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add local.tee $1 - f32.load offset=4 + i64.load offset=8 local.get $1 - f32.load + i64.load i32.const 2 global.set $~argumentsLength local.get $3 i32.load - call_indirect $0 (type $f32_f32_=>_i32) + call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.ge_s else @@ -35466,10 +33189,10 @@ end local.get $4 ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (local $6 i32) - (local $7 f32) - (local $8 f32) + (local $7 i64) + (local $8 i64) (local $9 i32) (local $10 i32) local.get $3 @@ -35493,15 +33216,15 @@ i32.const 1 i32.sub local.tee $2 - i32.const 2 + i32.const 3 i32.shl local.tee $10 i32.add local.get $0 local.get $10 i32.add - f32.load - f32.store + i64.load + i64.store br $for-loop|0 end end @@ -35513,17 +33236,17 @@ local.get $9 local.get $6 i32.sub - i32.const 2 + i32.const 3 i32.shl local.get $4 i32.add local.get $6 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add - f32.load offset=4 - f32.store + i64.load offset=8 + i64.store local.get $6 i32.const 1 i32.add @@ -35537,18 +33260,18 @@ i32.le_s if local.get $6 - i32.const 2 + i32.const 3 i32.shl local.get $4 i32.add - f32.load + i64.load local.set $7 local.get $2 - i32.const 2 + i32.const 3 i32.shl local.get $4 i32.add - f32.load + i64.load local.set $8 i32.const 2 global.set $~argumentsLength @@ -35556,29 +33279,29 @@ local.get $8 local.get $5 i32.load - call_indirect $0 (type $f32_f32_=>_i32) + call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.lt_s if local.get $1 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add local.get $7 - f32.store + i64.store local.get $6 i32.const 1 i32.sub local.set $6 else local.get $1 - i32.const 2 + i32.const 3 i32.shl local.get $0 i32.add local.get $8 - f32.store + i64.store local.get $2 i32.const 1 i32.add @@ -35592,21 +33315,20 @@ end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) + (local $8 i64) (local $9 i32) (local $10 i32) (local $11 i32) (local $12 i32) (local $13 i64) - (local $14 f32) - (local $15 f32) - (local $16 i32) + (local $14 i64) + (local $15 i32) local.get $1 i32.const 48 i32.le_s @@ -35630,83 +33352,83 @@ br $break|0 end local.get $0 - f32.load - local.set $14 + i64.load + local.set $13 local.get $0 - f32.load offset=4 - local.set $15 + i64.load offset=8 + local.set $14 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $15 local.get $14 + local.get $13 + local.get $13 local.get $14 - local.get $15 local.get $2 i32.load - call_indirect $0 (type $f32_f32_=>_i32) + call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s local.tee $1 select - f32.store + i64.store local.get $0 - f32.load offset=8 + i64.load offset=16 local.set $8 i32.const 2 global.set $~argumentsLength + local.get $13 local.get $14 - local.get $15 local.get $1 select - local.tee $14 + local.tee $13 local.get $8 local.get $2 i32.load - call_indirect $0 (type $f32_f32_=>_i32) + call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s local.set $1 local.get $0 local.get $8 - local.get $14 + local.get $13 local.get $1 select - f32.store offset=4 + i64.store offset=8 local.get $0 - local.get $14 + local.get $13 local.get $8 local.get $1 select - f32.store offset=8 + i64.store offset=16 end local.get $0 - f32.load + i64.load local.set $8 local.get $0 - f32.load offset=4 - local.set $14 + i64.load offset=8 + local.set $13 i32.const 2 global.set $~argumentsLength local.get $0 - local.get $14 + local.get $13 local.get $8 local.get $8 - local.get $14 + local.get $13 local.get $2 i32.load - call_indirect $0 (type $f32_f32_=>_i32) + call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s local.tee $1 select - f32.store + i64.store local.get $0 local.get $8 - local.get $14 + local.get $13 local.get $1 select - f32.store offset=4 + i64.store offset=8 return end local.get $0 @@ -35716,7 +33438,7 @@ i32.sub i32.const 0 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort return end i32.const 33 @@ -35770,7 +33492,7 @@ end global.get $~lib/rt/tlsf/ROOT local.get $1 - i32.const 2 + i32.const 3 i32.shl call $~lib/rt/tlsf/allocateBlock i32.const 4 @@ -35783,7 +33505,7 @@ i32.sub local.tee $9 local.get $2 - call $~lib/util/sort/extendRunRight + call $~lib/util/sort/extendRunRight local.tee $1 i32.const 1 i32.add @@ -35802,7 +33524,7 @@ local.tee $1 local.get $5 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end loop $while-continue|2 local.get $1 @@ -35816,7 +33538,7 @@ local.tee $6 local.get $9 local.get $2 - call $~lib/util/sort/extendRunRight + call $~lib/util/sort/extendRunRight local.tee $5 local.get $6 i32.sub @@ -35840,7 +33562,7 @@ local.tee $5 local.get $7 local.get $2 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end local.get $3 local.get $6 @@ -35852,7 +33574,7 @@ i32.const 1 i32.add i64.extend_i32_u - local.tee $13 + local.tee $8 i64.div_u local.get $5 local.get $6 @@ -35862,7 +33584,7 @@ i64.extend_i32_u i64.const 30 i64.shl - local.get $13 + local.get $8 i64.div_u i64.xor i32.wrap_i64 @@ -35879,12 +33601,12 @@ local.get $10 i32.add i32.load - local.tee $16 + local.tee $15 i32.const -1 i32.ne if local.get $0 - local.get $16 + local.get $15 local.get $11 local.get $4 i32.const 2 @@ -35897,13 +33619,13 @@ local.get $1 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns local.get $3 local.get $10 i32.add i32.const -1 i32.store - local.get $16 + local.get $15 local.set $3 end local.get $4 @@ -35961,7 +33683,7 @@ local.get $9 local.get $12 local.get $2 - call $~lib/util/sort/mergeRuns + call $~lib/util/sort/mergeRuns end local.get $4 i32.const 1 @@ -35975,993 +33697,919 @@ local.get $10 call $~lib/rt/tlsf/__free ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f32) (param $1 f32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.reinterpret_f32 - local.tee $2 - i32.const 31 - i32.shr_s - i32.const 1 - i32.shr_u - local.get $2 - i32.xor - local.tee $2 - local.get $1 - i32.reinterpret_f32 - local.tee $3 - i32.const 31 - i32.shr_s - i32.const 1 - i32.shr_u - local.get $3 - i32.xor - local.tee $3 - i32.gt_s - local.get $2 - local.get $3 - i32.lt_s - i32.sub - ) - (func $std/typedarray/testArraySort<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i64) (param $1 i64) (result i32) local.get $0 local.get $1 - f32.lt + i64.gt_u local.get $0 local.get $1 - f32.gt + i64.lt_u i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 f64) (result i32) + (func $std/typedarray/testArraySort<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i64) (result i32) local.get $0 local.get $1 - f64.lt + i64.lt_u local.get $0 local.get $1 - f64.gt + i64.gt_u i32.sub ) - (func $~lib/rt/__visit_members (param $0 i32) - block $folding-inner3 - block $folding-inner2 - block $invalid - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (local $5 f32) + (local $6 f32) + (local $7 i32) + (local $8 f32) + local.get $3 + local.get $2 + local.get $1 + i32.sub + i32.const 1 + i32.add + local.tee $7 + local.get $3 + i32.sub + i32.const 1 + i32.and + i32.sub + local.get $7 + i32.const 1 + i32.and + local.get $3 + select + local.get $1 + i32.add + local.set $7 + loop $for-loop|0 + local.get $2 + local.get $7 + i32.ge_s + if + local.get $7 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.tee $3 + f32.load offset=4 + local.tee $8 + local.set $6 + local.get $3 + f32.load + local.set $5 + i32.const 2 + global.set $~argumentsLength + local.get $5 + local.get $8 + local.get $4 + i32.load + call_indirect $0 (type $f32_f32_=>_i32) + i32.const 0 + i32.le_s + if + local.get $5 + local.set $6 + local.get $8 + local.set $5 + end + local.get $7 + i32.const 1 + i32.sub + local.set $3 + loop $while-continue|1 + local.get $1 + local.get $3 + i32.le_s + if + block $while-break|1 + local.get $3 + i32.const 2 + i32.shl local.get $0 - i32.const 8 + i32.add + f32.load + local.set $8 + i32.const 2 + global.set $~argumentsLength + local.get $8 + local.get $5 + local.get $4 + i32.load + call_indirect $0 (type $f32_f32_=>_i32) + i32.const 0 + i32.le_s + br_if $while-break|1 + local.get $3 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $8 + f32.store offset=8 + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|1 + end + end + end + local.get $3 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $5 + f32.store offset=8 + loop $while-continue|2 + local.get $1 + local.get $3 + i32.le_s + if + block $while-break|2 + local.get $3 + i32.const 2 + i32.shl + local.get $0 + i32.add + f32.load + local.set $5 + i32.const 2 + global.set $~argumentsLength + local.get $5 + local.get $6 + local.get $4 + i32.load + call_indirect $0 (type $f32_f32_=>_i32) + i32.const 0 + i32.le_s + br_if $while-break|2 + local.get $3 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $5 + f32.store offset=4 + local.get $3 + i32.const 1 i32.sub - i32.load - br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner2 $folding-inner3 $folding-inner3 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $invalid + local.set $3 + br $while-continue|2 end - return end - return end - unreachable - end - local.get $0 - i32.load offset=4 - local.tee $0 - if + local.get $3 + i32.const 2 + i32.shl local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit + i32.add + local.get $6 + f32.store offset=4 + local.get $7 + i32.const 2 + i32.add + local.set $7 + br $for-loop|0 end + end + ) + (func $~lib/util/sort/extendRunRight (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 f32) + (local $6 i32) + (local $7 f32) + local.get $1 + local.get $2 + i32.eq + if + local.get $1 return end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + f32.load + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 2 + i32.shl local.get $0 + i32.add + f32.load + i32.const 2 + global.set $~argumentsLength + local.get $3 i32.load - local.tee $0 + call_indirect $0 (type $f32_f32_=>_i32) + i32.const 0 + i32.gt_s if - local.get $0 - call $byn-split-outlined-A$~lib/rt/itcms/__visit - end - ) - (func $~start - call $start:std/typedarray - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $2 - i64.const 0 - i64.store - local.get $2 - i32.const 0 - i32.store offset=8 - local.get $2 - i32.const 6 - call $~lib/typedarray/Int8Array#constructor - local.tee $7 - i32.store - local.get $7 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $7 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $7 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - local.get $7 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $7 - i32.const 5 - i32.const 5 - call $~lib/typedarray/Int8Array#__set - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 3952 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $3 - i64.const 0 - i64.store - local.get $7 - i32.load offset=8 + loop $while-continue|0 + local.get $2 + local.get $4 + i32.gt_s + if (result i32) + local.get $4 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.tee $6 + f32.load offset=4 + local.get $6 + f32.load + i32.const 2 + global.set $~argumentsLength + local.get $3 + i32.load + call_indirect $0 (type $f32_f32_=>_i32) + i32.const 31 + i32.shr_u + else + i32.const 0 + end + if + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $while-continue|0 + end + end + local.get $4 local.set $2 - local.get $3 - i32.const 12 - i32.const 3 - call $~lib/rt/itcms/__new - local.tee $6 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.const 0 - call $~lib/rt/itcms/__new - local.tee $8 - i32.store offset=4 - local.get $7 - i32.load offset=4 - local.set $5 - loop $for-loop|0 + loop $while-continue|1 local.get $1 local.get $2 i32.lt_s if local.get $1 - local.get $5 + i32.const 2 + i32.shl + local.get $0 i32.add - i32.load8_s - local.set $3 - i32.const 3 - global.set $~argumentsLength + local.tee $3 + f32.load + local.set $5 local.get $3 - local.get $1 - local.get $7 - i32.const 3952 - i32.load - call_indirect $0 (type $i32_i32_i32_=>_i32) - if - local.get $0 - local.get $8 - i32.add - local.get $3 - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - end + local.get $2 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.tee $3 + f32.load + f32.store local.get $1 i32.const 1 i32.add local.set $1 - br $for-loop|0 + local.get $3 + local.get $5 + f32.store + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|1 end end - local.get $6 - local.get $8 - local.get $0 - call $~lib/rt/itcms/__renew - local.tee $1 - i32.store - local.get $1 - if - local.get $6 - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__link + else + loop $while-continue|2 + local.get $2 + local.get $4 + i32.gt_s + if (result i32) + local.get $4 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.tee $1 + f32.load offset=4 + local.get $1 + f32.load + i32.const 2 + global.set $~argumentsLength + local.get $3 + i32.load + call_indirect $0 (type $f32_f32_=>_i32) + i32.const 0 + i32.ge_s + else + i32.const 0 + end + if + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $while-continue|2 + end end - local.get $6 - local.get $0 - i32.store offset=8 - local.get $6 + end + local.get $4 + ) + (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (local $6 i32) + (local $7 f32) + (local $8 f32) + (local $9 i32) + (local $10 i32) + local.get $3 + local.get $2 + i32.const 1 + i32.sub + local.tee $6 + i32.add + local.set $9 + local.get $6 + i32.const 1 + i32.add + local.set $2 + loop $for-loop|0 local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=8 - local.get $6 - i32.load offset=4 - local.get $6 - i32.load - i32.sub - if - i32.const 0 - i32.const 1568 - i32.const 413 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.load offset=8 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 414 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 415 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 1 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne + local.get $2 + i32.lt_s if - i32.const 0 - i32.const 1568 - i32.const 416 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $4 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.const 2 + i32.shl + local.tee $10 + i32.add + local.get $0 + local.get $10 + i32.add + f32.load + f32.store + br $for-loop|0 end + end + loop $for-loop|1 + local.get $3 local.get $6 - i32.const 2 - call $~lib/typedarray/Int8Array#__get - i32.const 5 - i32.ne + i32.gt_s if - i32.const 0 - i32.const 1568 - i32.const 417 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $9 + local.get $6 + i32.sub + i32.const 2 + i32.shl + local.get $4 + i32.add + local.get $6 + i32.const 2 + i32.shl + local.get $0 + i32.add + f32.load offset=4 + f32.store + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|1 end - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - return end - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $2 - i64.const 0 - i64.store - local.get $2 - i32.const 0 - i32.store offset=8 - local.get $2 - i32.const 6 - call $~lib/typedarray/Uint8Array#constructor - local.tee $7 - i32.store - local.get $7 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $7 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $7 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $7 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $7 - i32.const 5 - i32.const 5 - call $~lib/typedarray/Uint8Array#__set - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 3984 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $3 - i64.const 0 - i64.store - local.get $7 - i32.load offset=8 - local.set $2 + loop $for-loop|2 + local.get $1 local.get $3 - i32.const 12 - i32.const 4 - call $~lib/rt/itcms/__new - local.tee $6 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.const 0 - call $~lib/rt/itcms/__new - local.tee $8 - i32.store offset=4 - local.get $7 - i32.load offset=4 - local.set $5 - loop $for-loop|0 - local.get $1 + i32.le_s + if + local.get $6 + i32.const 2 + i32.shl + local.get $4 + i32.add + f32.load + local.set $7 local.get $2 + i32.const 2 + i32.shl + local.get $4 + i32.add + f32.load + local.set $8 + i32.const 2 + global.set $~argumentsLength + local.get $7 + local.get $8 + local.get $5 + i32.load + call_indirect $0 (type $f32_f32_=>_i32) + i32.const 0 i32.lt_s if local.get $1 - local.get $5 + i32.const 2 + i32.shl + local.get $0 i32.add - i32.load8_u - local.set $3 - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $1 local.get $7 - i32.const 3984 - i32.load - call_indirect $0 (type $i32_i32_i32_=>_i32) - if - local.get $0 - local.get $8 - i32.add - local.get $3 - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - end + f32.store + local.get $6 + i32.const 1 + i32.sub + local.set $6 + else local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $8 + f32.store + local.get $2 i32.const 1 i32.add - local.set $1 - br $for-loop|0 + local.set $2 end - end - local.get $6 - local.get $8 - local.get $0 - call $~lib/rt/itcms/__renew - local.tee $1 - i32.store - local.get $1 - if - local.get $6 local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $6 - local.get $0 - i32.store offset=8 - local.get $6 - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=8 - local.get $6 - i32.load offset=4 - local.get $6 - i32.load - i32.sub - if - i32.const 0 - i32.const 1568 - i32.const 413 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.load offset=8 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 414 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 0 - call $~lib/typedarray/Uint8Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 415 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 1 - call $~lib/typedarray/Uint8Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 416 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 417 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 1 + i32.add + local.set $1 + br $for-loop|2 end - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - return end - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.sub - global.set $~lib/memory/__stack_pointer - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $2 - i64.const 0 - i64.store - local.get $2 - i32.const 0 - i32.store offset=8 - local.get $2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $7 - i32.store - local.get $7 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $7 + (local $8 f32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i64) + (local $14 f32) + (local $15 f32) + (local $16 i32) + local.get $1 + i32.const 48 + i32.le_s + if + local.get $1 i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $7 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $7 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $7 - i32.const 5 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#__set - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 4016 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $3 - i64.const 0 - i64.store - local.get $7 - i32.load offset=8 - local.set $2 - local.get $3 - i32.const 12 - i32.const 5 - call $~lib/rt/itcms/__new - local.tee $6 - i32.store - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.const 0 - call $~lib/rt/itcms/__new - local.tee $8 - i32.store offset=4 - local.get $7 - i32.load offset=4 - local.set $5 - loop $for-loop|0 - local.get $1 - local.get $2 - i32.lt_s - if + i32.le_s + if + return + end + block $break|0 + block $case1|0 local.get $1 - local.get $5 - i32.add - i32.load8_u - local.set $3 i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $1 - local.get $7 - i32.const 4016 - i32.load - call_indirect $0 (type $i32_i32_i32_=>_i32) + i32.ne if - local.get $0 - local.get $8 - i32.add - local.get $3 - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.set $0 + local.get $1 + i32.const 2 + i32.eq + br_if $case1|0 + br $break|0 end + local.get $0 + f32.load + local.set $14 + local.get $0 + f32.load offset=4 + local.set $15 + i32.const 2 + global.set $~argumentsLength + local.get $0 + local.get $15 + local.get $14 + local.get $14 + local.get $15 + local.get $2 + i32.load + call_indirect $0 (type $f32_f32_=>_i32) + i32.const 0 + i32.gt_s + local.tee $1 + select + f32.store + local.get $0 + f32.load offset=8 + local.set $8 + i32.const 2 + global.set $~argumentsLength + local.get $14 + local.get $15 local.get $1 - i32.const 1 - i32.add + select + local.tee $14 + local.get $8 + local.get $2 + i32.load + call_indirect $0 (type $f32_f32_=>_i32) + i32.const 0 + i32.gt_s local.set $1 - br $for-loop|0 + local.get $0 + local.get $8 + local.get $14 + local.get $1 + select + f32.store offset=4 + local.get $0 + local.get $14 + local.get $8 + local.get $1 + select + f32.store offset=8 end - end - local.get $6 - local.get $8 - local.get $0 - call $~lib/rt/itcms/__renew - local.tee $1 - i32.store - local.get $1 - if - local.get $6 + local.get $0 + f32.load + local.set $8 + local.get $0 + f32.load offset=4 + local.set $14 + i32.const 2 + global.set $~argumentsLength + local.get $0 + local.get $14 + local.get $8 + local.get $8 + local.get $14 + local.get $2 + i32.load + call_indirect $0 (type $f32_f32_=>_i32) + i32.const 0 + i32.gt_s + local.tee $1 + select + f32.store + local.get $0 + local.get $8 + local.get $14 local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__link + select + f32.store offset=4 + return end - local.get $6 local.get $0 - i32.store offset=8 - local.get $6 + i32.const 0 local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=8 - local.get $6 - i32.load offset=4 - local.get $6 - i32.load + i32.const 1 i32.sub - if - i32.const 0 - i32.const 1568 - i32.const 413 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.load offset=8 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 414 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 415 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 416 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + local.get $2 + call $~lib/util/sort/insertionSort + return + end + i32.const 33 + local.get $1 + i32.clz + i32.sub + local.tee $6 + i32.const 2 + i32.shl + local.tee $7 + i32.const 1 + i32.shl + local.set $9 + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $9 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $10 + local.get $7 + i32.add + local.set $11 + loop $for-loop|1 + local.get $5 local.get $6 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 5 - i32.ne + i32.lt_u if - i32.const 0 - i32.const 1568 - i32.const 417 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $5 + i32.const 2 + i32.shl + local.get $10 + i32.add + i32.const -1 + i32.store + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|1 end - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - return end - i32.const 33040 - i32.const 33088 - i32.const 1 + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $1 + i32.const 2 + i32.shl + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.set $12 + local.get $0 + i32.const 0 + local.get $1 i32.const 1 - call $~lib/builtins/abort - unreachable - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - global.get $~lib/memory/__stack_pointer - i32.const 12 i32.sub - global.set $~lib/memory/__stack_pointer - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $2 - i64.const 0 - i64.store - local.get $2 - i32.const 0 - i32.store offset=8 - local.get $2 - i32.const 6 - call $~lib/typedarray/Int16Array#constructor - local.tee $7 - i32.store - local.get $7 + local.tee $9 + local.get $2 + call $~lib/util/sort/extendRunRight + local.tee $1 + i32.const 1 + i32.add + local.tee $5 + i32.const 32 + i32.lt_s + if + local.get $0 i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $7 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $7 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - local.get $7 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $7 - i32.const 5 - i32.const 5 - call $~lib/typedarray/Int16Array#__set - global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 4048 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 + local.get $9 + i32.const 31 + local.get $9 + i32.const 31 i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $3 - i64.const 0 - i64.store - local.get $7 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $2 - local.get $3 - i32.const 12 - i32.const 6 - call $~lib/rt/itcms/__new - local.tee $6 - i32.store - global.get $~lib/memory/__stack_pointer + select + local.tee $1 + local.get $5 local.get $2 - i32.const 1 - i32.shl - i32.const 0 - call $~lib/rt/itcms/__new - local.tee $8 - i32.store offset=4 - local.get $7 - i32.load offset=4 - local.set $5 - loop $for-loop|0 + call $~lib/util/sort/insertionSort + end + loop $while-continue|2 + local.get $1 + local.get $9 + i32.lt_s + if + local.get $0 local.get $1 + i32.const 1 + i32.add + local.tee $6 + local.get $9 local.get $2 + call $~lib/util/sort/extendRunRight + local.tee $5 + local.get $6 + i32.sub + i32.const 1 + i32.add + local.tee $7 + i32.const 32 i32.lt_s if - local.get $1 - i32.const 1 - i32.shl - local.get $5 + local.get $0 + local.get $6 + local.get $9 + local.get $6 + i32.const 31 i32.add - i32.load16_s - local.set $3 - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $1 + local.tee $5 + local.get $5 + local.get $9 + i32.gt_s + select + local.tee $5 local.get $7 - i32.const 4048 - i32.load - call_indirect $0 (type $i32_i32_i32_=>_i32) + local.get $2 + call $~lib/util/sort/insertionSort + end + local.get $3 + local.get $6 + i32.add + i64.extend_i32_u + i64.const 30 + i64.shl + local.get $9 + i32.const 1 + i32.add + i64.extend_i32_u + local.tee $13 + i64.div_u + local.get $5 + local.get $6 + i32.add + i32.const 1 + i32.add + i64.extend_i32_u + i64.const 30 + i64.shl + local.get $13 + i64.div_u + i64.xor + i32.wrap_i64 + i32.clz + local.set $7 + loop $for-loop|3 + local.get $4 + local.get $7 + i32.gt_u if - local.get $0 - i32.const 1 + local.get $4 + i32.const 2 i32.shl - local.get $8 + local.get $10 i32.add - local.get $3 - i32.store16 - local.get $0 + i32.load + local.tee $16 + i32.const -1 + i32.ne + if + local.get $0 + local.get $16 + local.get $11 + local.get $4 + i32.const 2 + i32.shl + local.tee $3 + i32.add + i32.load + i32.const 1 + i32.add + local.get $1 + local.get $12 + local.get $2 + call $~lib/util/sort/mergeRuns + local.get $3 + local.get $10 + i32.add + i32.const -1 + i32.store + local.get $16 + local.set $3 + end + local.get $4 i32.const 1 - i32.add - local.set $0 + i32.sub + local.set $4 + br $for-loop|3 end + end + local.get $10 + local.get $7 + i32.const 2 + i32.shl + local.tee $4 + i32.add + local.get $3 + i32.store + local.get $4 + local.get $11 + i32.add + local.get $1 + i32.store + local.get $6 + local.set $3 + local.get $5 + local.set $1 + local.get $7 + local.set $4 + br $while-continue|2 + end + end + loop $for-loop|4 + local.get $4 + if + local.get $4 + i32.const 2 + i32.shl + local.get $10 + i32.add + i32.load + local.tee $1 + i32.const -1 + i32.ne + if + local.get $0 local.get $1 + local.get $4 + i32.const 2 + i32.shl + local.get $11 + i32.add + i32.load i32.const 1 i32.add - local.set $1 - br $for-loop|0 + local.get $9 + local.get $12 + local.get $2 + call $~lib/util/sort/mergeRuns end + local.get $4 + i32.const 1 + i32.sub + local.set $4 + br $for-loop|4 end - local.get $6 - local.get $8 - local.get $0 - i32.const 1 - i32.shl - local.tee $0 - call $~lib/rt/itcms/__renew - local.tee $1 - i32.store - local.get $1 - if - local.get $6 - local.get $1 - call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $12 + call $~lib/rt/tlsf/__free + local.get $10 + call $~lib/rt/tlsf/__free + ) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f32) (param $1 f32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.reinterpret_f32 + local.tee $2 + i32.const 31 + i32.shr_s + i32.const 1 + i32.shr_u + local.get $2 + i32.xor + local.tee $2 + local.get $1 + i32.reinterpret_f32 + local.tee $3 + i32.const 31 + i32.shr_s + i32.const 1 + i32.shr_u + local.get $3 + i32.xor + local.tee $3 + i32.gt_s + local.get $2 + local.get $3 + i32.lt_s + i32.sub + ) + (func $std/typedarray/testArraySort<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 f32) (result i32) + local.get $0 + local.get $1 + f32.lt + local.get $0 + local.get $1 + f32.gt + i32.sub + ) + (func $std/typedarray/testArraySort<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 f64) (result i32) + local.get $0 + local.get $1 + f64.lt + local.get $0 + local.get $1 + f64.gt + i32.sub + ) + (func $~lib/rt/__visit_members (param $0 i32) + block $folding-inner3 + block $folding-inner2 + block $invalid + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner2 $folding-inner3 $folding-inner3 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $invalid + end + return + end + return + end + unreachable end - local.get $6 local.get $0 - i32.store offset=8 - local.get $6 - local.get $1 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=8 - local.get $6 i32.load offset=4 - local.get $6 - i32.load - i32.sub - if - i32.const 0 - i32.const 1568 - i32.const 413 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 414 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 0 - call $~lib/typedarray/Int16Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 415 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 416 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 5 - i32.ne + local.tee $0 if - i32.const 0 - i32.const 1568 - i32.const 417 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $0 + call $byn-split-outlined-A$~lib/rt/itcms/__visit end - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer return end - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.load + local.tee $0 + if + local.get $0 + call $byn-split-outlined-A$~lib/rt/itcms/__visit + end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> + (func $~start + call $start:std/typedarray + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -36989,32 +34637,32 @@ i32.store offset=8 local.get $2 i32.const 6 - call $~lib/typedarray/Uint16Array#constructor + call $~lib/typedarray/Int8Array#constructor local.tee $7 i32.store local.get $7 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint16Array#__set + call $~lib/typedarray/Int8Array#__set local.get $7 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint16Array#__set + call $~lib/typedarray/Int8Array#__set local.get $7 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint16Array#__set + call $~lib/typedarray/Int8Array#__set local.get $7 i32.const 3 i32.const 4 - call $~lib/typedarray/Uint16Array#__set + call $~lib/typedarray/Int8Array#__set local.get $7 i32.const 5 i32.const 5 - call $~lib/typedarray/Uint16Array#__set + call $~lib/typedarray/Int8Array#__set global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 4080 + i32.const 3952 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 @@ -37030,19 +34678,15 @@ i64.store local.get $7 i32.load offset=8 - i32.const 1 - i32.shr_u local.set $2 local.get $3 i32.const 12 - i32.const 7 + i32.const 3 call $~lib/rt/itcms/__new local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 - i32.const 1 - i32.shl i32.const 0 call $~lib/rt/itcms/__new local.tee $8 @@ -37056,28 +34700,24 @@ i32.lt_s if local.get $1 - i32.const 1 - i32.shl local.get $5 i32.add - i32.load16_u + i32.load8_s local.set $3 i32.const 3 global.set $~argumentsLength local.get $3 local.get $1 local.get $7 - i32.const 4080 + i32.const 3952 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if local.get $0 - i32.const 1 - i32.shl local.get $8 i32.add local.get $3 - i32.store16 + i32.store8 local.get $0 i32.const 1 i32.add @@ -37093,9 +34733,6 @@ local.get $6 local.get $8 local.get $0 - i32.const 1 - i32.shl - local.tee $0 call $~lib/rt/itcms/__renew local.tee $1 i32.store @@ -37132,8 +34769,6 @@ end local.get $6 i32.load offset=8 - i32.const 1 - i32.shr_u i32.const 3 i32.ne if @@ -37146,7 +34781,7 @@ end local.get $6 i32.const 0 - call $~lib/typedarray/Uint16Array#__get + call $~lib/typedarray/Int8Array#__get i32.const 3 i32.ne if @@ -37159,7 +34794,7 @@ end local.get $6 i32.const 1 - call $~lib/typedarray/Uint16Array#__get + call $~lib/typedarray/Int8Array#__get i32.const 4 i32.ne if @@ -37172,7 +34807,7 @@ end local.get $6 i32.const 2 - call $~lib/typedarray/Uint16Array#__get + call $~lib/typedarray/Int8Array#__get i32.const 5 i32.ne if @@ -37196,7 +34831,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -37224,32 +34859,32 @@ i32.store offset=8 local.get $2 i32.const 6 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $7 i32.store local.get $7 i32.const 0 i32.const 1 - call $~lib/typedarray/Int32Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $7 i32.const 1 i32.const 2 - call $~lib/typedarray/Int32Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $7 i32.const 2 i32.const 3 - call $~lib/typedarray/Int32Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $7 i32.const 3 i32.const 4 - call $~lib/typedarray/Int32Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $7 i32.const 5 i32.const 5 - call $~lib/typedarray/Int32Array#__set + call $~lib/typedarray/Uint8Array#__set global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 4112 + i32.const 3984 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 @@ -37265,19 +34900,15 @@ i64.store local.get $7 i32.load offset=8 - i32.const 2 - i32.shr_u local.set $2 local.get $3 i32.const 12 - i32.const 8 + i32.const 4 call $~lib/rt/itcms/__new local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 - i32.const 2 - i32.shl i32.const 0 call $~lib/rt/itcms/__new local.tee $8 @@ -37291,28 +34922,24 @@ i32.lt_s if local.get $1 - i32.const 2 - i32.shl local.get $5 i32.add - i32.load + i32.load8_u local.set $3 i32.const 3 global.set $~argumentsLength local.get $3 local.get $1 local.get $7 - i32.const 4112 + i32.const 3984 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if local.get $0 - i32.const 2 - i32.shl local.get $8 i32.add local.get $3 - i32.store + i32.store8 local.get $0 i32.const 1 i32.add @@ -37328,9 +34955,6 @@ local.get $6 local.get $8 local.get $0 - i32.const 2 - i32.shl - local.tee $0 call $~lib/rt/itcms/__renew local.tee $1 i32.store @@ -37367,8 +34991,6 @@ end local.get $6 i32.load offset=8 - i32.const 2 - i32.shr_u i32.const 3 i32.ne if @@ -37381,7 +35003,7 @@ end local.get $6 i32.const 0 - call $~lib/typedarray/Int32Array#__get + call $~lib/typedarray/Uint8Array#__get i32.const 3 i32.ne if @@ -37394,7 +35016,7 @@ end local.get $6 i32.const 1 - call $~lib/typedarray/Int32Array#__get + call $~lib/typedarray/Uint8Array#__get i32.const 4 i32.ne if @@ -37407,7 +35029,7 @@ end local.get $6 i32.const 2 - call $~lib/typedarray/Int32Array#__get + call $~lib/typedarray/Uint8Array#__get i32.const 5 i32.ne if @@ -37431,7 +35053,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -37459,32 +35081,32 @@ i32.store offset=8 local.get $2 i32.const 6 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $7 i32.store local.get $7 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $7 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $7 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $7 i32.const 3 i32.const 4 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $7 i32.const 5 i32.const 5 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 4144 + i32.const 4016 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 @@ -37500,19 +35122,15 @@ i64.store local.get $7 i32.load offset=8 - i32.const 2 - i32.shr_u local.set $2 local.get $3 i32.const 12 - i32.const 9 + i32.const 5 call $~lib/rt/itcms/__new local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 - i32.const 2 - i32.shl i32.const 0 call $~lib/rt/itcms/__new local.tee $8 @@ -37526,28 +35144,24 @@ i32.lt_s if local.get $1 - i32.const 2 - i32.shl local.get $5 i32.add - i32.load + i32.load8_u local.set $3 i32.const 3 global.set $~argumentsLength local.get $3 local.get $1 local.get $7 - i32.const 4144 + i32.const 4016 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if local.get $0 - i32.const 2 - i32.shl local.get $8 i32.add local.get $3 - i32.store + i32.store8 local.get $0 i32.const 1 i32.add @@ -37563,9 +35177,6 @@ local.get $6 local.get $8 local.get $0 - i32.const 2 - i32.shl - local.tee $0 call $~lib/rt/itcms/__renew local.tee $1 i32.store @@ -37602,8 +35213,6 @@ end local.get $6 i32.load offset=8 - i32.const 2 - i32.shr_u i32.const 3 i32.ne if @@ -37616,7 +35225,7 @@ end local.get $6 i32.const 0 - call $~lib/typedarray/Uint32Array#__get + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 3 i32.ne if @@ -37629,7 +35238,7 @@ end local.get $6 i32.const 1 - call $~lib/typedarray/Uint32Array#__get + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 i32.ne if @@ -37642,7 +35251,7 @@ end local.get $6 i32.const 2 - call $~lib/typedarray/Uint32Array#__get + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 5 i32.ne if @@ -37666,11 +35275,11 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -37694,32 +35303,32 @@ i32.store offset=8 local.get $2 i32.const 6 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $7 i32.store local.get $7 i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set + i32.const 1 + call $~lib/typedarray/Int16Array#__set local.get $7 i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set + i32.const 2 + call $~lib/typedarray/Int16Array#__set local.get $7 i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#__set local.get $7 i32.const 3 - i64.const 4 - call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Int16Array#__set local.get $7 i32.const 5 - i64.const 5 - call $~lib/typedarray/Int64Array#__set + i32.const 5 + call $~lib/typedarray/Int16Array#__set global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 4176 + i32.const 4048 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 @@ -37730,23 +35339,23 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $5 + local.tee $3 i64.const 0 i64.store local.get $7 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u local.set $2 - local.get $5 + local.get $3 i32.const 12 - i32.const 10 + i32.const 6 call $~lib/rt/itcms/__new local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 - i32.const 3 + i32.const 1 i32.shl i32.const 0 call $~lib/rt/itcms/__new @@ -37761,28 +35370,28 @@ i32.lt_s if local.get $1 - i32.const 3 + i32.const 1 i32.shl local.get $5 i32.add - i64.load + i32.load16_s local.set $3 i32.const 3 global.set $~argumentsLength local.get $3 local.get $1 local.get $7 - i32.const 4176 + i32.const 4048 i32.load - call_indirect $0 (type $i64_i32_i32_=>_i32) + call_indirect $0 (type $i32_i32_i32_=>_i32) if local.get $0 - i32.const 3 + i32.const 1 i32.shl local.get $8 i32.add local.get $3 - i64.store + i32.store16 local.get $0 i32.const 1 i32.add @@ -37798,7 +35407,7 @@ local.get $6 local.get $8 local.get $0 - i32.const 3 + i32.const 1 i32.shl local.tee $0 call $~lib/rt/itcms/__renew @@ -37837,7 +35446,7 @@ end local.get $6 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u i32.const 3 i32.ne @@ -37851,9 +35460,9 @@ end local.get $6 i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 3 - i64.ne + call $~lib/typedarray/Int16Array#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 1568 @@ -37864,9 +35473,9 @@ end local.get $6 i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 4 - i64.ne + call $~lib/typedarray/Int16Array#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 1568 @@ -37877,9 +35486,9 @@ end local.get $6 i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 5 - i64.ne + call $~lib/typedarray/Int16Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1568 @@ -37901,11 +35510,11 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -37929,32 +35538,32 @@ i32.store offset=8 local.get $2 i32.const 6 - call $~lib/typedarray/Uint64Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $7 i32.store local.get $7 i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set + i32.const 1 + call $~lib/typedarray/Uint16Array#__set local.get $7 i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set + i32.const 2 + call $~lib/typedarray/Uint16Array#__set local.get $7 i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set + i32.const 3 + call $~lib/typedarray/Uint16Array#__set local.get $7 i32.const 3 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set + i32.const 4 + call $~lib/typedarray/Uint16Array#__set local.get $7 i32.const 5 - i64.const 5 - call $~lib/typedarray/Uint64Array#__set + i32.const 5 + call $~lib/typedarray/Uint16Array#__set global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 4208 + i32.const 4080 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 @@ -37965,23 +35574,23 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $5 + local.tee $3 i64.const 0 i64.store local.get $7 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u local.set $2 - local.get $5 + local.get $3 i32.const 12 - i32.const 11 + i32.const 7 call $~lib/rt/itcms/__new local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 - i32.const 3 + i32.const 1 i32.shl i32.const 0 call $~lib/rt/itcms/__new @@ -37996,28 +35605,28 @@ i32.lt_s if local.get $1 - i32.const 3 + i32.const 1 i32.shl local.get $5 i32.add - i64.load + i32.load16_u local.set $3 i32.const 3 global.set $~argumentsLength local.get $3 local.get $1 local.get $7 - i32.const 4208 + i32.const 4080 i32.load - call_indirect $0 (type $i64_i32_i32_=>_i32) + call_indirect $0 (type $i32_i32_i32_=>_i32) if local.get $0 - i32.const 3 + i32.const 1 i32.shl local.get $8 i32.add local.get $3 - i64.store + i32.store16 local.get $0 i32.const 1 i32.add @@ -38033,7 +35642,7 @@ local.get $6 local.get $8 local.get $0 - i32.const 3 + i32.const 1 i32.shl local.tee $0 call $~lib/rt/itcms/__renew @@ -38072,7 +35681,7 @@ end local.get $6 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u i32.const 3 i32.ne @@ -38086,9 +35695,9 @@ end local.get $6 i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 3 - i64.ne + call $~lib/typedarray/Uint16Array#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 1568 @@ -38099,9 +35708,9 @@ end local.get $6 i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 4 - i64.ne + call $~lib/typedarray/Uint16Array#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 1568 @@ -38112,9 +35721,9 @@ end local.get $6 i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 5 - i64.ne + call $~lib/typedarray/Uint16Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1568 @@ -38136,11 +35745,11 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 f32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -38164,32 +35773,32 @@ i32.store offset=8 local.get $2 i32.const 6 - call $~lib/typedarray/Float32Array#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $7 i32.store local.get $7 i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set + i32.const 1 + call $~lib/typedarray/Int32Array#__set local.get $7 i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set + i32.const 2 + call $~lib/typedarray/Int32Array#__set local.get $7 i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set + i32.const 3 + call $~lib/typedarray/Int32Array#__set local.get $7 i32.const 3 - f32.const 4 - call $~lib/typedarray/Float32Array#__set + i32.const 4 + call $~lib/typedarray/Int32Array#__set local.get $7 i32.const 5 - f32.const 5 - call $~lib/typedarray/Float32Array#__set + i32.const 5 + call $~lib/typedarray/Int32Array#__set global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 4240 + i32.const 4112 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 @@ -38200,7 +35809,7 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $5 + local.tee $3 i64.const 0 i64.store local.get $7 @@ -38208,9 +35817,9 @@ i32.const 2 i32.shr_u local.set $2 - local.get $5 - i32.const 12 + local.get $3 i32.const 12 + i32.const 8 call $~lib/rt/itcms/__new local.tee $6 i32.store @@ -38235,16 +35844,16 @@ i32.shl local.get $5 i32.add - f32.load + i32.load local.set $3 i32.const 3 global.set $~argumentsLength local.get $3 local.get $1 local.get $7 - i32.const 4240 + i32.const 4112 i32.load - call_indirect $0 (type $f32_i32_i32_=>_i32) + call_indirect $0 (type $i32_i32_i32_=>_i32) if local.get $0 i32.const 2 @@ -38252,7 +35861,7 @@ local.get $8 i32.add local.get $3 - f32.store + i32.store local.get $0 i32.const 1 i32.add @@ -38321,9 +35930,9 @@ end local.get $6 i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 3 - f32.ne + call $~lib/typedarray/Int32Array#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 1568 @@ -38334,9 +35943,9 @@ end local.get $6 i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 4 - f32.ne + call $~lib/typedarray/Int32Array#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 1568 @@ -38347,9 +35956,9 @@ end local.get $6 i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 5 - f32.ne + call $~lib/typedarray/Int32Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1568 @@ -38371,11 +35980,11 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 f64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -38399,32 +36008,32 @@ i32.store offset=8 local.get $2 i32.const 6 - call $~lib/typedarray/Float64Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $7 i32.store local.get $7 i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set + i32.const 1 + call $~lib/typedarray/Uint32Array#__set local.get $7 i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set + i32.const 2 + call $~lib/typedarray/Uint32Array#__set local.get $7 i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set + i32.const 3 + call $~lib/typedarray/Uint32Array#__set local.get $7 i32.const 3 - f64.const 4 - call $~lib/typedarray/Float64Array#__set + i32.const 4 + call $~lib/typedarray/Uint32Array#__set local.get $7 i32.const 5 - f64.const 5 - call $~lib/typedarray/Float64Array#__set + i32.const 5 + call $~lib/typedarray/Uint32Array#__set global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - i32.const 4272 + i32.const 4144 i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 8 @@ -38435,23 +36044,23 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $5 + local.tee $3 i64.const 0 i64.store local.get $7 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u local.set $2 - local.get $5 + local.get $3 i32.const 12 - i32.const 13 + i32.const 9 call $~lib/rt/itcms/__new local.tee $6 i32.store global.get $~lib/memory/__stack_pointer local.get $2 - i32.const 3 + i32.const 2 i32.shl i32.const 0 call $~lib/rt/itcms/__new @@ -38466,28 +36075,28 @@ i32.lt_s if local.get $1 - i32.const 3 + i32.const 2 i32.shl local.get $5 i32.add - f64.load + i32.load local.set $3 i32.const 3 global.set $~argumentsLength local.get $3 local.get $1 local.get $7 - i32.const 4272 + i32.const 4144 i32.load - call_indirect $0 (type $f64_i32_i32_=>_i32) + call_indirect $0 (type $i32_i32_i32_=>_i32) if local.get $0 - i32.const 3 + i32.const 2 i32.shl local.get $8 i32.add local.get $3 - f64.store + i32.store local.get $0 i32.const 1 i32.add @@ -38503,7 +36112,7 @@ local.get $6 local.get $8 local.get $0 - i32.const 3 + i32.const 2 i32.shl local.tee $0 call $~lib/rt/itcms/__renew @@ -38542,7 +36151,7 @@ end local.get $6 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u i32.const 3 i32.ne @@ -38556,9 +36165,9 @@ end local.get $6 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 3 - f64.ne + call $~lib/typedarray/Uint32Array#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 1568 @@ -38569,9 +36178,9 @@ end local.get $6 i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.ne + call $~lib/typedarray/Uint32Array#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 1568 @@ -38582,9 +36191,9 @@ end local.get $6 i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.ne + call $~lib/typedarray/Uint32Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1568 @@ -38606,1015 +36215,1022 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $3 - i32.const 0 - i32.store - local.get $3 - i32.const 7152 - i32.store - local.get $0 - i32.const 255 - i32.and - i32.const 7152 - local.get $1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 536 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 537 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachSelf - local.get $2 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 538 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $3 - i32.const 0 - i32.store - local.get $3 - i32.const 7152 - i32.store - local.get $0 - i32.const 65535 - i32.and - i32.const 7152 - local.get $1 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 536 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 537 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachSelf - local.get $2 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 538 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $3 - i32.const 0 - i32.store - local.get $3 - i32.const 7152 - i32.store - i32.const 7152 - local.get $1 - call $~lib/array/Array#__get - local.get $0 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 536 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 537 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachSelf - local.get $2 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 538 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $3 - i32.const 0 - i32.store - local.get $3 - i32.const 7152 - i32.store - local.get $0 - i32.const 7152 - local.get $1 - call $~lib/array/Array#__get - i64.extend_i32_s - i64.ne - if - i32.const 0 - i32.const 1568 - i32.const 536 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 537 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachSelf - local.get $2 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 538 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) - (local $3 i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $3 - i32.const 0 - i32.store - local.get $3 - i32.const 7152 - i32.store - local.get $0 - i32.const 7152 - local.get $1 - call $~lib/array/Array#__get - f32.convert_i32_s - f32.ne - if - i32.const 0 - i32.const 1568 - i32.const 536 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $2 + i64.const 0 + i64.store + local.get $2 i32.const 0 - i32.const 1568 - i32.const 537 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachSelf - local.get $2 - i32.ne - if + i32.store offset=8 + local.get $2 + i32.const 6 + call $~lib/typedarray/Int64Array#constructor + local.tee $7 + i32.store + local.get $7 i32.const 0 - i32.const 1568 - i32.const 538 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 + i64.const 1 + call $~lib/typedarray/Int64Array#__set + local.get $7 i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $3 - i32.const 0 - i32.store - local.get $3 - i32.const 7152 - i32.store - local.get $0 - i32.const 7152 - local.get $1 - call $~lib/array/Array#__get - f64.convert_i32_s - f64.ne - if - i32.const 0 - i32.const 1568 - i32.const 536 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $7 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Int64Array#__set + local.get $7 + i32.const 3 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $7 i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if + i64.const 5 + call $~lib/typedarray/Int64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4176 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $5 + i64.const 0 + i64.store + local.get $7 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $2 + local.get $5 + i32.const 12 + i32.const 10 + call $~lib/rt/itcms/__new + local.tee $6 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.const 3 + i32.shl i32.const 0 - i32.const 1568 - i32.const 537 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachSelf - local.get $2 - i32.ne - if + call $~lib/rt/itcms/__new + local.tee $8 + i32.store offset=4 + local.get $7 + i32.load offset=4 + local.set $5 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $1 + i32.const 3 + i32.shl + local.get $5 + i32.add + i64.load + local.set $3 + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $1 + local.get $7 + i32.const 4176 + i32.load + call_indirect $0 (type $i64_i32_i32_=>_i32) + if + local.get $0 + i32.const 3 + i32.shl + local.get $8 + i32.add + local.get $3 + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $6 + local.get $8 + local.get $0 + i32.const 3 + i32.shl + local.tee $0 + call $~lib/rt/itcms/__renew + local.tee $1 + i32.store + local.get $1 + if + local.get $6 + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $6 + local.get $0 + i32.store offset=8 + local.get $6 + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=8 + local.get $6 + i32.load offset=4 + local.get $6 + i32.load + i32.sub + if + i32.const 0 + i32.const 1568 + i32.const 413 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 414 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 i32.const 0 - i32.const 1568 - i32.const 538 - i32.const 5 - call $~lib/builtins/abort - unreachable + call $~lib/typedarray/Int64Array#__get + i64.const 3 + i64.ne + if + i32.const 0 + i32.const 1568 + i32.const 415 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 1 + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne + if + i32.const 0 + i32.const 1568 + i32.const 416 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 5 + i64.ne + if + i32.const 0 + i32.const 1568 + i32.const 417 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + return end - global.get $std/typedarray/forEachCallCount + i32.const 33040 + i32.const 33088 i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer + i32.const 1 + call $~lib/builtins/abort + unreachable ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (local $0 i32) - (local $1 i64) + (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $2 - i64.const 0 - i64.store - local.get $2 - i64.const 0 - i64.store offset=8 - local.get $2 - i32.const 0 - i32.store offset=16 - local.get $2 - i32.const 7616 - i32.store - local.get $2 - i32.const 7628 - i32.load - local.tee $2 - call $~lib/typedarray/Int64Array#constructor - local.tee $3 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - call $~lib/typedarray/Int64Array#constructor - local.tee $4 - i32.store offset=8 - loop $for-loop|0 - local.get $0 - local.get $2 + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 16628 i32.lt_s - if - local.get $3 - local.get $0 - i32.const 7616 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $4 - local.get $0 - i32.const 7616 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=4 - local.set $5 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $6 - i32.const 1 - i32.gt_u - if - local.get $6 - i32.const 1 - i32.shr_u - local.set $7 - local.get $6 + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $2 + i64.const 0 + i64.store + local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + i32.const 6 + call $~lib/typedarray/Uint64Array#constructor + local.tee $7 + i32.store + local.get $7 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set + local.get $7 i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $7 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set + local.get $7 + i32.const 3 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $7 + i32.const 5 + i64.const 5 + call $~lib/typedarray/Uint64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4208 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 8 i32.sub - local.set $6 - loop $while-continue|0 - local.get $0 - local.get $7 - i32.lt_u + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $5 + i64.const 0 + i64.store + local.get $7 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $2 + local.get $5 + i32.const 12 + i32.const 11 + call $~lib/rt/itcms/__new + local.tee $6 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.const 3 + i32.shl + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $8 + i32.store offset=4 + local.get $7 + i32.load offset=4 + local.set $5 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.lt_s if - local.get $0 + local.get $1 i32.const 3 i32.shl local.get $5 i32.add - local.tee $8 i64.load - local.set $1 - local.get $8 - local.get $6 - local.get $0 - i32.sub + local.set $3 i32.const 3 - i32.shl - local.get $5 - i32.add - local.tee $8 - i64.load - i64.store - local.get $8 + global.set $~argumentsLength + local.get $3 + local.get $1 + local.get $7 + i32.const 4208 + i32.load + call_indirect $0 (type $i64_i32_i32_=>_i32) + if + local.get $0 + i32.const 3 + i32.shl + local.get $8 + i32.add + local.get $3 + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + end local.get $1 - i64.store - local.get $0 i32.const 1 i32.add - local.set $0 - br $while-continue|0 + local.set $1 + br $for-loop|0 end end - end - i32.const 0 - local.set $0 - loop $for-loop|1 + local.get $6 + local.get $8 local.get $0 - local.get $2 - i32.lt_s + i32.const 3 + i32.shl + local.tee $0 + call $~lib/rt/itcms/__renew + local.tee $1 + i32.store + local.get $1 if - local.get $3 - local.get $0 - call $~lib/typedarray/Int64Array#__get - i32.const 7616 - local.get $2 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - i64.extend_i32_s - i64.ne - if - i32.const 0 - i32.const 1568 - i32.const 570 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 + local.get $6 + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $6 + local.get $0 + i32.store offset=8 + local.get $6 + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=8 + local.get $6 + i32.load offset=4 + local.get $6 + i32.load + i32.sub + if + i32.const 0 + i32.const 1568 + i32.const 413 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 414 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 0 + call $~lib/typedarray/Uint64Array#__get + i64.const 3 + i64.ne + if + i32.const 0 + i32.const 1568 + i32.const 415 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 1 + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne + if + i32.const 0 + i32.const 1568 + i32.const 416 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 2 + call $~lib/typedarray/Uint64Array#__get + i64.const 5 + i64.ne + if + i32.const 0 + i32.const 1568 + i32.const 417 + i32.const 3 + call $~lib/builtins/abort + unreachable end + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + return end - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.const 8 - call $~lib/typedarray/Int64Array#subarray - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=4 - local.set $4 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $5 + i32.const 33040 + i32.const 33088 i32.const 1 - i32.gt_u - if - local.get $5 + i32.const 1 + call $~lib/builtins/abort + unreachable + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 f32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $2 + i64.const 0 + i64.store + local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + i32.const 6 + call $~lib/typedarray/Float32Array#constructor + local.tee $7 + i32.store + local.get $7 + i32.const 0 + f32.const 1 + call $~lib/typedarray/Float32Array#__set + local.get $7 i32.const 1 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $7 + i32.const 2 + f32.const 3 + call $~lib/typedarray/Float32Array#__set + local.get $7 + i32.const 3 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $7 + i32.const 5 + f32.const 5 + call $~lib/typedarray/Float32Array#__set + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4240 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $5 + i64.const 0 + i64.store + local.get $7 + i32.load offset=8 + i32.const 2 i32.shr_u - local.set $6 + local.set $2 local.get $5 - i32.const 1 - i32.sub + i32.const 12 + i32.const 12 + call $~lib/rt/itcms/__new + local.tee $6 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.const 2 + i32.shl + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $8 + i32.store offset=4 + local.get $7 + i32.load offset=4 local.set $5 - loop $while-continue|01 - local.get $0 - local.get $6 - i32.lt_u + loop $for-loop|0 + local.get $1 + local.get $2 + i32.lt_s if - local.get $0 - i32.const 3 + local.get $1 + i32.const 2 i32.shl - local.get $4 - i32.add - local.tee $7 - i64.load - local.set $1 - local.get $7 local.get $5 - local.get $0 - i32.sub - i32.const 3 - i32.shl - local.get $4 i32.add - local.tee $7 - i64.load - i64.store + f32.load + local.set $3 + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $1 local.get $7 + i32.const 4240 + i32.load + call_indirect $0 (type $f32_i32_i32_=>_i32) + if + local.get $0 + i32.const 2 + i32.shl + local.get $8 + i32.add + local.get $3 + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + end local.get $1 - i64.store - local.get $0 i32.const 1 i32.add - local.set $0 - br $while-continue|01 + local.set $1 + br $for-loop|0 end end - end - local.get $3 - i32.store offset=16 - local.get $3 - i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 8 - i64.ne - if - i32.const 0 - i32.const 1568 - i32.const 575 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 7 - i64.ne - if - i32.const 0 - i32.const 1568 - i32.const 576 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 6 - i64.ne - if - i32.const 0 - i32.const 1568 - i32.const 577 + local.get $6 + local.get $8 + local.get $0 + i32.const 2 + i32.shl + local.tee $0 + call $~lib/rt/itcms/__renew + local.tee $1 + i32.store + local.get $1 + if + local.get $6 + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $6 + local.get $0 + i32.store offset=8 + local.get $6 + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=8 + local.get $6 + i32.load offset=4 + local.get $6 + i32.load + i32.sub + if + i32.const 0 + i32.const 1568 + i32.const 413 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 3 - call $~lib/typedarray/Int64Array#__get - i64.const 5 - i64.ne - if + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 414 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 i32.const 0 - i32.const 1568 - i32.const 578 - i32.const 3 - call $~lib/builtins/abort - unreachable + call $~lib/typedarray/Float32Array#__get + f32.const 3 + f32.ne + if + i32.const 0 + i32.const 1568 + i32.const 415 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 1 + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne + if + i32.const 0 + i32.const 1568 + i32.const 416 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 2 + call $~lib/typedarray/Float32Array#__get + f32.const 5 + f32.ne + if + i32.const 0 + i32.const 1568 + i32.const 417 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + return end - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer + i32.const 33040 + i32.const 33088 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (local $0 i32) - (local $1 i64) + (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $2 - i64.const 0 - i64.store - local.get $2 - i64.const 0 - i64.store offset=8 - local.get $2 - i32.const 0 - i32.store offset=16 - local.get $2 - i32.const 7616 - i32.store - local.get $2 - i32.const 7628 - i32.load - local.tee $2 - call $~lib/typedarray/Uint64Array#constructor - local.tee $3 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - call $~lib/typedarray/Uint64Array#constructor - local.tee $4 - i32.store offset=8 - loop $for-loop|0 - local.get $0 - local.get $2 + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 16628 i32.lt_s - if - local.get $3 - local.get $0 - i32.const 7616 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $4 - local.get $0 - i32.const 7616 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=4 - local.set $5 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $6 - i32.const 1 - i32.gt_u - if - local.get $6 - i32.const 1 - i32.shr_u - local.set $7 - local.get $6 + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $2 + i64.const 0 + i64.store + local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + i32.const 6 + call $~lib/typedarray/Float64Array#constructor + local.tee $7 + i32.store + local.get $7 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $7 i32.const 1 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 2 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 3 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $7 + i32.const 5 + f64.const 5 + call $~lib/typedarray/Float64Array#__set + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 4272 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 8 i32.sub - local.set $6 - loop $while-continue|0 - local.get $0 - local.get $7 - i32.lt_u - if - local.get $0 - i32.const 3 - i32.shl - local.get $5 - i32.add - local.tee $8 - i64.load - local.set $1 - local.get $8 - local.get $6 - local.get $0 - i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $5 + i64.const 0 + i64.store + local.get $7 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $2 + local.get $5 + i32.const 12 + i32.const 13 + call $~lib/rt/itcms/__new + local.tee $6 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.const 3 + i32.shl + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $8 + i32.store offset=4 + local.get $7 + i32.load offset=4 + local.set $5 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $1 i32.const 3 i32.shl local.get $5 i32.add - local.tee $8 - i64.load - i64.store - local.get $8 + f64.load + local.set $3 + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $1 + local.get $7 + i32.const 4272 + i32.load + call_indirect $0 (type $f64_i32_i32_=>_i32) + if + local.get $0 + i32.const 3 + i32.shl + local.get $8 + i32.add + local.get $3 + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + end local.get $1 - i64.store - local.get $0 i32.const 1 i32.add - local.set $0 - br $while-continue|0 + local.set $1 + br $for-loop|0 end end - end - i32.const 0 - local.set $0 - loop $for-loop|1 + local.get $6 + local.get $8 local.get $0 - local.get $2 - i32.lt_s + i32.const 3 + i32.shl + local.tee $0 + call $~lib/rt/itcms/__renew + local.tee $1 + i32.store + local.get $1 if - local.get $3 - local.get $0 - call $~lib/typedarray/Uint64Array#__get - i32.const 7616 - local.get $2 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - i64.extend_i32_s - i64.ne - if - i32.const 0 - i32.const 1568 - i32.const 570 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 + local.get $6 + local.get $1 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $6 + local.get $0 + i32.store offset=8 + local.get $6 + local.get $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=8 + local.get $6 + i32.load offset=4 + local.get $6 + i32.load + i32.sub + if + i32.const 0 + i32.const 1568 + i32.const 413 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 414 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 3 + f64.ne + if + i32.const 0 + i32.const 1568 + i32.const 415 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne + if + i32.const 0 + i32.const 1568 + i32.const 416 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.ne + if + i32.const 0 + i32.const 1568 + i32.const 417 + i32.const 3 + call $~lib/builtins/abort + unreachable end + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + return end + i32.const 33040 + i32.const 33088 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - local.get $4 - i32.const 8 - call $~lib/typedarray/Uint64Array#subarray - local.set $3 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=4 - local.set $4 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $5 - i32.const 1 - i32.gt_u + i32.const 16628 + i32.lt_s if - local.get $5 + i32.const 33040 + i32.const 33088 i32.const 1 - i32.shr_u - local.set $6 - local.get $5 i32.const 1 - i32.sub - local.set $5 - loop $while-continue|01 - local.get $0 - local.get $6 - i32.lt_u - if - local.get $0 - i32.const 3 - i32.shl - local.get $4 - i32.add - local.tee $7 - i64.load - local.set $1 - local.get $7 - local.get $5 - local.get $0 - i32.sub - i32.const 3 - i32.shl - local.get $4 - i32.add - local.tee $7 - i64.load - i64.store - local.get $7 - local.get $1 - i64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $while-continue|01 - end - end - end - local.get $3 - i32.store offset=16 - local.get $3 - i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 8 - i64.ne - if - i32.const 0 - i32.const 1568 - i32.const 575 - i32.const 3 call $~lib/builtins/abort unreachable end + global.get $~lib/memory/__stack_pointer + local.tee $3 + i32.const 0 + i32.store local.get $3 - i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 7 - i64.ne + i32.const 7152 + i32.store + local.get $0 + i32.const 255 + i32.and + i32.const 7152 + local.get $1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + i32.ne if i32.const 0 i32.const 1568 - i32.const 576 - i32.const 3 + i32.const 536 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 6 - i64.ne + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne if i32.const 0 i32.const 1568 - i32.const 577 - i32.const 3 + i32.const 537 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 3 - call $~lib/typedarray/Uint64Array#__get - i64.const 5 - i64.ne + global.get $std/typedarray/forEachSelf + local.get $2 + i32.ne if i32.const 0 i32.const 1568 - i32.const 578 - i32.const 3 + i32.const 538 + i32.const 5 call $~lib/builtins/abort unreachable end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> - (local $0 i32) - (local $1 f32) - (local $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer @@ -39629,281 +37245,132 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $2 - i64.const 0 - i64.store - local.get $2 - i64.const 0 - i64.store offset=8 - local.get $2 - i32.const 0 - i32.store offset=16 - local.get $2 - i32.const 7616 - i32.store - local.get $2 - i32.const 7628 - i32.load - local.tee $2 - call $~lib/typedarray/Float32Array#constructor local.tee $3 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - call $~lib/typedarray/Float32Array#constructor - local.tee $4 - i32.store offset=8 - loop $for-loop|0 - local.get $0 - local.get $2 - i32.lt_s - if - local.get $3 - local.get $0 - i32.const 7616 - local.get $0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $4 - local.get $0 - i32.const 7616 - local.get $0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end i32.const 0 - local.set $0 - local.get $3 - i32.load offset=4 - local.set $5 + i32.store local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $6 - i32.const 1 - i32.gt_u + i32.const 7152 + i32.store + local.get $0 + i32.const 65535 + i32.and + i32.const 7152 + local.get $1 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + i32.ne if - local.get $6 - i32.const 1 - i32.shr_u - local.set $7 - local.get $6 - i32.const 1 - i32.sub - local.set $6 - loop $while-continue|0 - local.get $0 - local.get $7 - i32.lt_u - if - local.get $0 - i32.const 2 - i32.shl - local.get $5 - i32.add - local.tee $8 - f32.load - local.set $1 - local.get $8 - local.get $6 - local.get $0 - i32.sub - i32.const 2 - i32.shl - local.get $5 - i32.add - local.tee $8 - f32.load - f32.store - local.get $8 - local.get $1 - f32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $while-continue|0 - end - end - end - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - local.get $2 - i32.lt_s - if - local.get $3 - local.get $0 - call $~lib/typedarray/Float32Array#__get - i32.const 7616 - local.get $2 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - f32.convert_i32_s - f32.ne - if - i32.const 0 - i32.const 1568 - i32.const 570 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end + i32.const 0 + i32.const 1568 + i32.const 536 + i32.const 5 + call $~lib/builtins/abort + unreachable end - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.const 8 - call $~lib/typedarray/Float32Array#subarray - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=4 - local.set $4 - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $5 - i32.const 1 - i32.gt_u - if - local.get $5 - i32.const 1 - i32.shr_u - local.set $6 - local.get $5 - i32.const 1 - i32.sub - local.set $5 - loop $while-continue|01 - local.get $0 - local.get $6 - i32.lt_u - if - local.get $0 - i32.const 2 - i32.shl - local.get $4 - i32.add - local.tee $7 - f32.load - local.set $1 - local.get $7 - local.get $5 - local.get $0 - i32.sub - i32.const 2 - i32.shl - local.get $4 - i32.add - local.tee $7 - f32.load - f32.store - local.get $7 - local.get $1 - f32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $while-continue|01 - end - end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 537 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.store offset=16 - local.get $3 - i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 8 - f32.ne + global.get $std/typedarray/forEachSelf + local.get $2 + i32.ne if i32.const 0 i32.const 1568 - i32.const 575 - i32.const 3 + i32.const 538 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 + global.get $std/typedarray/forEachCallCount i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 7 - f32.ne + i32.add + global.set $std/typedarray/forEachCallCount + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + if + i32.const 33040 + i32.const 33088 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $3 + i32.const 0 + i32.store + local.get $3 + i32.const 7152 + i32.store + i32.const 7152 + local.get $1 + call $~lib/array/Array#__get + local.get $0 + i32.ne if i32.const 0 i32.const 1568 - i32.const 576 - i32.const 3 + i32.const 536 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 6 - f32.ne + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne if i32.const 0 i32.const 1568 - i32.const 577 - i32.const 3 + i32.const 537 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 3 - call $~lib/typedarray/Float32Array#__get - f32.const 5 - f32.ne + global.get $std/typedarray/forEachSelf + local.get $2 + i32.ne if i32.const 0 i32.const 1568 - i32.const 578 - i32.const 3 + i32.const 538 + i32.const 5 call $~lib/builtins/abort unreachable end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> - (local $0 i32) - (local $1 f64) - (local $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer @@ -39918,267 +37385,192 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.tee $2 - i64.const 0 - i64.store - local.get $2 - i64.const 0 - i64.store offset=8 - local.get $2 - i32.const 0 - i32.store offset=16 - local.get $2 - i32.const 7616 - i32.store - local.get $2 - i32.const 7628 - i32.load - local.tee $2 - call $~lib/typedarray/Float64Array#constructor local.tee $3 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - local.get $2 - call $~lib/typedarray/Float64Array#constructor - local.tee $4 - i32.store offset=8 - loop $for-loop|0 - local.get $0 - local.get $2 - i32.lt_s - if - local.get $3 - local.get $0 - i32.const 7616 - local.get $0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $4 - local.get $0 - i32.const 7616 - local.get $0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end i32.const 0 - local.set $0 - local.get $3 - i32.load offset=4 - local.set $5 + i32.store local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $6 - i32.const 1 - i32.gt_u + i32.const 7152 + i32.store + local.get $0 + i32.const 7152 + local.get $1 + call $~lib/array/Array#__get + i64.extend_i32_s + i64.ne if - local.get $6 - i32.const 1 - i32.shr_u - local.set $7 - local.get $6 - i32.const 1 - i32.sub - local.set $6 - loop $while-continue|0 - local.get $0 - local.get $7 - i32.lt_u - if - local.get $0 - i32.const 3 - i32.shl - local.get $5 - i32.add - local.tee $8 - f64.load - local.set $1 - local.get $8 - local.get $6 - local.get $0 - i32.sub - i32.const 3 - i32.shl - local.get $5 - i32.add - local.tee $8 - f64.load - f64.store - local.get $8 - local.get $1 - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $while-continue|0 - end - end + i32.const 0 + i32.const 1568 + i32.const 536 + i32.const 5 + call $~lib/builtins/abort + unreachable end - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - local.get $2 - i32.lt_s - if - local.get $3 - local.get $0 - call $~lib/typedarray/Float64Array#__get - i32.const 7616 - local.get $2 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - f64.convert_i32_s - f64.ne - if - i32.const 0 - i32.const 1568 - i32.const 570 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 537 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachSelf + local.get $2 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 538 + i32.const 5 + call $~lib/builtins/abort + unreachable end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount global.get $~lib/memory/__stack_pointer - local.get $4 i32.const 4 - i32.const 8 - call $~lib/typedarray/Float64Array#subarray - local.set $3 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=4 - local.set $4 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $5 - i32.const 1 - i32.gt_u + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s if - local.get $5 + i32.const 33040 + i32.const 33088 i32.const 1 - i32.shr_u - local.set $6 - local.get $5 i32.const 1 - i32.sub - local.set $5 - loop $while-continue|01 - local.get $0 - local.get $6 - i32.lt_u - if - local.get $0 - i32.const 3 - i32.shl - local.get $4 - i32.add - local.tee $7 - f64.load - local.set $1 - local.get $7 - local.get $5 - local.get $0 - i32.sub - i32.const 3 - i32.shl - local.get $4 - i32.add - local.tee $7 - f64.load - f64.store - local.get $7 - local.get $1 - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $while-continue|01 - end - end + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.store offset=16 - local.get $3 + global.get $~lib/memory/__stack_pointer + local.tee $3 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 8 - f64.ne + i32.store + local.get $3 + i32.const 7152 + i32.store + local.get $0 + i32.const 7152 + local.get $1 + call $~lib/array/Array#__get + f32.convert_i32_s + f32.ne if i32.const 0 i32.const 1568 - i32.const 575 - i32.const 3 + i32.const 536 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 7 - f64.ne + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne if i32.const 0 i32.const 1568 - i32.const 576 - i32.const 3 + i32.const 537 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 6 - f64.ne + global.get $std/typedarray/forEachSelf + local.get $2 + i32.ne if i32.const 0 i32.const 1568 - i32.const 577 - i32.const 3 + i32.const 538 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + if + i32.const 33040 + i32.const 33088 + i32.const 1 + i32.const 1 call $~lib/builtins/abort unreachable end + global.get $~lib/memory/__stack_pointer + local.tee $3 + i32.const 0 + i32.store local.get $3 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.const 5 + i32.const 7152 + i32.store + local.get $0 + i32.const 7152 + local.get $1 + call $~lib/array/Array#__get + f64.convert_i32_s f64.ne if i32.const 0 i32.const 1568 - i32.const 578 - i32.const 3 + i32.const 536 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 537 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachSelf + local.get $2 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 538 + i32.const 5 call $~lib/builtins/abort unreachable end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) @@ -40330,14 +37722,9 @@ end global.get $~lib/memory/__stack_pointer local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $1 i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -40453,16 +37840,14 @@ i32.add f32.load local.tee $2 + i32.trunc_sat_f32_s + i32.const 0 + local.get $2 local.get $2 f32.sub f32.const 0 f32.eq - if (result i32) - local.get $2 - i32.trunc_f32_s - else - i32.const 0 - end + select i32.store8 local.get $0 i32.const 1 @@ -40537,16 +37922,14 @@ i32.add f64.load local.tee $3 + i32.trunc_sat_f64_s + i32.const 0 + local.get $3 local.get $3 f64.sub f64.const 0 f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_s - else - i32.const 0 - end + select i32.store8 local.get $0 i32.const 1 @@ -40720,14 +38103,9 @@ end global.get $~lib/memory/__stack_pointer local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $1 i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -40843,16 +38221,14 @@ i32.add f32.load local.tee $2 + i32.trunc_sat_f32_u + i32.const 0 + local.get $2 local.get $2 f32.sub f32.const 0 f32.eq - if (result i32) - local.get $2 - i32.trunc_f32_u - else - i32.const 0 - end + select i32.store8 local.get $0 i32.const 1 @@ -40927,16 +38303,14 @@ i32.add f64.load local.tee $3 + i32.trunc_sat_f64_u + i32.const 0 + local.get $3 local.get $3 f64.sub f64.const 0 f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_u - else - i32.const 0 - end + select i32.store8 local.get $0 i32.const 1 @@ -41111,14 +38485,9 @@ end global.get $~lib/memory/__stack_pointer local.tee $3 - i64.const 0 - i64.store - local.get $3 - i64.const 0 - i64.store offset=8 - local.get $3 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $3 i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -41277,6 +38646,8 @@ local.get $0 local.get $3 i32.add + f32.const 0 + f32.const 255 local.get $0 i32.const 2 i32.shl @@ -41284,20 +38655,16 @@ i32.add f32.load local.tee $1 + f32.min + f32.max + i32.trunc_sat_f32_u + i32.const 0 + local.get $1 local.get $1 f32.sub f32.const 0 f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $1 - f32.min - f32.max - i32.trunc_f32_u - else - i32.const 0 - end + select i32.store8 local.get $0 i32.const 1 @@ -41366,6 +38733,8 @@ local.get $0 local.get $3 i32.add + f64.const 0 + f64.const 255 local.get $0 i32.const 3 i32.shl @@ -41373,20 +38742,16 @@ i32.add f64.load local.tee $2 + f64.min + f64.max + i32.trunc_sat_f64_u + i32.const 0 + local.get $2 local.get $2 f64.sub f64.const 0 f64.eq - if (result i32) - f64.const 0 - f64.const 255 - local.get $2 - f64.min - f64.max - i32.trunc_f64_u - else - i32.const 0 - end + select i32.store8 local.get $0 i32.const 1 @@ -41618,14 +38983,9 @@ end global.get $~lib/memory/__stack_pointer local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $1 i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -41745,16 +39105,14 @@ i32.add f32.load local.tee $2 + i32.trunc_sat_f32_s + i32.const 0 + local.get $2 local.get $2 f32.sub f32.const 0 f32.eq - if (result i32) - local.get $2 - i32.trunc_f32_s - else - i32.const 0 - end + select i32.store16 local.get $0 i32.const 1 @@ -41833,16 +39191,14 @@ i32.add f64.load local.tee $3 + i32.trunc_sat_f64_s + i32.const 0 + local.get $3 local.get $3 f64.sub f64.const 0 f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_s - else - i32.const 0 - end + select i32.store16 local.get $0 i32.const 1 @@ -42021,14 +39377,9 @@ end global.get $~lib/memory/__stack_pointer local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $1 i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -42148,16 +39499,14 @@ i32.add f32.load local.tee $2 + i32.trunc_sat_f32_u + i32.const 0 + local.get $2 local.get $2 f32.sub f32.const 0 f32.eq - if (result i32) - local.get $2 - i32.trunc_f32_u - else - i32.const 0 - end + select i32.store16 local.get $0 i32.const 1 @@ -42236,16 +39585,14 @@ i32.add f64.load local.tee $3 + i32.trunc_sat_f64_u + i32.const 0 + local.get $3 local.get $3 f64.sub f64.const 0 f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_u - else - i32.const 0 - end + select i32.store16 local.get $0 i32.const 1 @@ -42425,420 +39772,9 @@ end global.get $~lib/memory/__stack_pointer local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $7 - i32.store - local.get $7 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $7 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $7 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $8 - i32.store offset=4 - local.get $8 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $8 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $8 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $8 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - global.get $~lib/memory/__stack_pointer - i32.const 10 - call $~lib/typedarray/Int32Array#constructor - local.tee $4 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 11008 - i32.store offset=16 - local.get $4 - i32.const 11008 - i32.const 0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - i32.const 10 - i32.const 2 - i32.const 16 - i32.const 12528 - call $~lib/rt/__newArray - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=16 - local.get $4 - local.get $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - global.get $~lib/memory/__stack_pointer - i32.const 11088 - i32.store offset=16 - block $folding-inner1 - i32.const 11100 - i32.load - i32.const 3 - i32.add - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - br_if $folding-inner1 - local.get $4 - i32.load offset=4 - i32.const 12 - i32.add - local.set $5 - i32.const 11092 - i32.load - local.set $9 - i32.const 11100 - i32.load - local.set $10 - loop $for-loop|0 - local.get $0 - local.get $10 - i32.lt_s - if - local.get $0 - i32.const 2 - i32.shl - local.tee $6 - local.get $9 - i32.add - f32.load - local.set $2 - local.get $5 - local.get $6 - i32.add - local.get $2 - local.get $2 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $2 - i32.trunc_f32_s - else - i32.const 0 - end - i32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - i32.const 10 - i32.const 2 - i32.const 16 - i32.const 12640 - call $~lib/rt/__newArray - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=16 - local.get $4 - local.get $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $4 - local.get $7 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> - i32.const 10 - i32.const 2 - i32.const 16 - i32.const 12704 - call $~lib/rt/__newArray - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=16 - local.get $4 - local.get $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - global.get $~lib/memory/__stack_pointer - i32.const 11184 - i32.store offset=16 - i32.const 11196 - i32.load - i32.const 2 - i32.add - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - br_if $folding-inner1 - local.get $4 - i32.load offset=4 - i32.const 8 - i32.add - local.set $5 - i32.const 11188 - i32.load - local.set $6 - i32.const 11196 - i32.load - local.set $7 - i32.const 0 - local.set $0 - loop $for-loop|05 - local.get $0 - local.get $7 - i32.lt_s - if - local.get $0 - i32.const 2 - i32.shl - local.get $5 - i32.add - local.get $0 - i32.const 3 - i32.shl - local.get $6 - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_s - else - i32.const 0 - end - i32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|05 - end - end - i32.const 10 - i32.const 2 - i32.const 16 - i32.const 12768 - call $~lib/rt/__newArray - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=16 - local.get $4 - local.get $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $4 - local.get $8 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> - local.get $4 - local.get $1 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> - global.get $~lib/memory/__stack_pointer - i32.const 11264 - i32.store offset=16 - local.get $4 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - i32.const 10 - i32.const 2 - i32.const 16 - i32.const 12832 - call $~lib/rt/__newArray - local.set $0 - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=16 - local.get $4 - local.get $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - return - end - i32.const 1360 - i32.const 1632 - i32.const 1909 - i32.const 47 - call $~lib/builtins/abort - unreachable - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - i32.const 1568 - i32.const 758 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $2 - i32.const 2 - i32.shl - local.tee $5 - local.get $0 - i32.load offset=4 - i32.add - i32.load - local.tee $4 - local.get $5 - local.get $1 - i32.load offset=4 - i32.add - i32.load - local.tee $5 - i32.ne - if - global.get $~lib/memory/__stack_pointer - i32.const 12960 - i32.store - i32.const 12960 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.convert_i32_u - local.get $5 - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 1568 - i32.const 764 - i32.const 7 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> - (local $0 i32) - (local $1 i32) - (local $2 f32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - global.get $~lib/memory/__stack_pointer i32.const 20 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - if - i32.const 33040 - i32.const 33088 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=16 + memory.fill local.get $1 i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -42896,7 +39832,7 @@ call $~lib/typedarray/Int16Array#__set global.get $~lib/memory/__stack_pointer i32.const 10 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $4 i32.store offset=12 global.get $~lib/memory/__stack_pointer @@ -42908,8 +39844,8 @@ call $~lib/typedarray/Int32Array#set<~lib/array/Array> i32.const 10 i32.const 2 - i32.const 66 - i32.const 12896 + i32.const 16 + i32.const 12528 call $~lib/rt/__newArray local.set $5 global.get $~lib/memory/__stack_pointer @@ -42917,7 +39853,7 @@ i32.store offset=16 local.get $4 local.get $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> global.get $~lib/memory/__stack_pointer i32.const 11088 i32.store offset=16 @@ -42960,16 +39896,14 @@ local.get $6 i32.add local.get $2 + i32.trunc_sat_f32_s + i32.const 0 + local.get $2 local.get $2 f32.sub f32.const 0 f32.eq - if (result i32) - local.get $2 - i32.trunc_f32_u - else - i32.const 0 - end + select i32.store local.get $0 i32.const 1 @@ -42980,8 +39914,8 @@ end i32.const 10 i32.const 2 - i32.const 66 - i32.const 13008 + i32.const 16 + i32.const 12640 call $~lib/rt/__newArray local.set $0 global.get $~lib/memory/__stack_pointer @@ -42989,14 +39923,14 @@ i32.store offset=16 local.get $4 local.get $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> local.get $4 local.get $7 call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> i32.const 10 i32.const 2 - i32.const 66 - i32.const 13072 + i32.const 16 + i32.const 12704 call $~lib/rt/__newArray local.set $0 global.get $~lib/memory/__stack_pointer @@ -43004,7 +39938,7 @@ i32.store offset=16 local.get $4 local.get $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> global.get $~lib/memory/__stack_pointer i32.const 11184 i32.store offset=16 @@ -43048,16 +39982,14 @@ i32.add f64.load local.tee $3 + i32.trunc_sat_f64_s + i32.const 0 + local.get $3 local.get $3 f64.sub f64.const 0 f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_u - else - i32.const 0 - end + select i32.store local.get $0 i32.const 1 @@ -43068,8 +40000,8 @@ end i32.const 10 i32.const 2 - i32.const 66 - i32.const 13136 + i32.const 16 + i32.const 12768 call $~lib/rt/__newArray local.set $0 global.get $~lib/memory/__stack_pointer @@ -43077,7 +40009,7 @@ i32.store offset=16 local.get $4 local.get $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> local.get $4 local.get $8 call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> @@ -43091,8 +40023,8 @@ call $~lib/typedarray/Int32Array#set<~lib/array/Array> i32.const 10 i32.const 2 - i32.const 66 - i32.const 13200 + i32.const 16 + i32.const 12832 call $~lib/rt/__newArray local.set $0 global.get $~lib/memory/__stack_pointer @@ -43100,7 +40032,7 @@ i32.store offset=16 local.get $4 local.get $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> global.get $~lib/memory/__stack_pointer i32.const 20 i32.add @@ -43114,12 +40046,11 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) - (local $6 i64) + (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -43140,7 +40071,7 @@ i32.store local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u local.tee $3 local.get $1 @@ -43160,33 +40091,33 @@ i32.lt_s if local.get $2 - i32.const 3 + i32.const 2 i32.shl - local.tee $4 + local.tee $5 local.get $0 i32.load offset=4 i32.add - i64.load - local.tee $5 - local.get $4 + i32.load + local.tee $4 + local.get $5 local.get $1 i32.load offset=4 i32.add - i64.load - local.tee $6 - i64.ne + i32.load + local.tee $5 + i32.ne if global.get $~lib/memory/__stack_pointer - i32.const 13376 + i32.const 12960 i32.store - i32.const 13376 + i32.const 12960 i32.const 3 local.get $2 f64.convert_i32_s + local.get $4 + f64.convert_i32_u local.get $5 - f64.convert_i64_s - local.get $6 - f64.convert_i64_s + f64.convert_i32_u f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -43209,17 +40140,18 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (local $0 i32) (local $1 i32) - (local $2 f64) - (local $3 f32) + (local $2 f32) + (local $3 f64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -43237,49 +40169,44 @@ end global.get $~lib/memory/__stack_pointer local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $1 i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $5 + local.tee $7 i32.store - local.get $5 + local.get $7 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $5 + local.get $7 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $5 + local.get $7 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set global.get $~lib/memory/__stack_pointer i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $6 + local.tee $8 i32.store offset=4 - local.get $6 + local.get $8 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $6 + local.get $8 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $6 + local.get $8 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $6 + local.get $8 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set @@ -43302,26 +40229,28 @@ call $~lib/typedarray/Int16Array#__set global.get $~lib/memory/__stack_pointer i32.const 10 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $4 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 11008 i32.store offset=16 local.get $4 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + i32.const 11008 + i32.const 0 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> i32.const 10 - i32.const 3 - i32.const 67 - i32.const 13264 + i32.const 2 + i32.const 66 + i32.const 12896 call $~lib/rt/__newArray - local.set $7 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $5 i32.store offset=16 local.get $4 - local.get $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + local.get $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> global.get $~lib/memory/__stack_pointer i32.const 11088 i32.store offset=16 @@ -43332,49 +40261,47 @@ i32.add local.get $4 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u i32.gt_s br_if $folding-inner1 local.get $4 i32.load offset=4 - i32.const 24 + i32.const 12 i32.add - local.set $7 + local.set $5 i32.const 11092 i32.load - local.set $8 + local.set $9 i32.const 11100 i32.load - local.set $9 + local.set $10 loop $for-loop|0 local.get $0 - local.get $9 + local.get $10 i32.lt_s if - local.get $0 - i32.const 3 - i32.shl - local.get $7 - i32.add local.get $0 i32.const 2 i32.shl - local.get $8 + local.tee $6 + local.get $9 i32.add f32.load - local.tee $3 - local.get $3 + local.set $2 + local.get $5 + local.get $6 + i32.add + local.get $2 + i32.trunc_sat_f32_u + i32.const 0 + local.get $2 + local.get $2 f32.sub f32.const 0 f32.eq - if (result i64) - local.get $3 - i64.trunc_f32_s - else - i64.const 0 - end - i64.store + select + i32.store local.get $0 i32.const 1 i32.add @@ -43383,9 +40310,9 @@ end end i32.const 10 - i32.const 3 - i32.const 67 - i32.const 13424 + i32.const 2 + i32.const 66 + i32.const 13008 call $~lib/rt/__newArray local.set $0 global.get $~lib/memory/__stack_pointer @@ -43393,14 +40320,14 @@ i32.store offset=16 local.get $4 local.get $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> local.get $4 - local.get $5 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> + local.get $7 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> i32.const 10 - i32.const 3 - i32.const 67 - i32.const 13536 + i32.const 2 + i32.const 66 + i32.const 13072 call $~lib/rt/__newArray local.set $0 global.get $~lib/memory/__stack_pointer @@ -43408,7 +40335,7 @@ i32.store offset=16 local.get $4 local.get $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> global.get $~lib/memory/__stack_pointer i32.const 11184 i32.store offset=16 @@ -43418,51 +40345,49 @@ i32.add local.get $4 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u i32.gt_s br_if $folding-inner1 local.get $4 i32.load offset=4 - i32.const 16 + i32.const 8 i32.add local.set $5 i32.const 11188 i32.load - local.set $7 + local.set $6 i32.const 11196 i32.load - local.set $8 + local.set $7 i32.const 0 local.set $0 loop $for-loop|05 local.get $0 - local.get $8 + local.get $7 i32.lt_s if + local.get $0 + i32.const 2 + i32.shl + local.get $5 + i32.add local.get $0 i32.const 3 i32.shl - local.tee $9 - local.get $7 + local.get $6 i32.add f64.load - local.set $2 - local.get $5 - local.get $9 - i32.add - local.get $2 - local.get $2 + local.tee $3 + i32.trunc_sat_f64_u + i32.const 0 + local.get $3 + local.get $3 f64.sub f64.const 0 f64.eq - if (result i64) - local.get $2 - i64.trunc_f64_s - else - i64.const 0 - end - i64.store + select + i32.store local.get $0 i32.const 1 i32.add @@ -43471,9 +40396,9 @@ end end i32.const 10 - i32.const 3 - i32.const 67 - i32.const 13648 + i32.const 2 + i32.const 66 + i32.const 13136 call $~lib/rt/__newArray local.set $0 global.get $~lib/memory/__stack_pointer @@ -43481,22 +40406,22 @@ i32.store offset=16 local.get $4 local.get $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> local.get $4 - local.get $6 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + local.get $8 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> local.get $4 local.get $1 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> global.get $~lib/memory/__stack_pointer i32.const 11264 i32.store offset=16 local.get $4 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + call $~lib/typedarray/Int32Array#set<~lib/array/Array> i32.const 10 - i32.const 3 - i32.const 67 - i32.const 13760 + i32.const 2 + i32.const 66 + i32.const 13200 call $~lib/rt/__newArray local.set $0 global.get $~lib/memory/__stack_pointer @@ -43504,7 +40429,7 @@ i32.store offset=16 local.get $4 local.get $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> global.get $~lib/memory/__stack_pointer i32.const 20 i32.add @@ -43518,7 +40443,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -43581,16 +40506,16 @@ i64.ne if global.get $~lib/memory/__stack_pointer - i32.const 13984 + i32.const 13376 i32.store - i32.const 13984 + i32.const 13376 i32.const 3 local.get $2 f64.convert_i32_s local.get $5 - f64.convert_i64_u + f64.convert_i64_s local.get $6 - f64.convert_i64_u + f64.convert_i64_s f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -43613,7 +40538,7 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (local $0 i32) (local $1 i32) (local $2 f64) @@ -43641,14 +40566,404 @@ end global.get $~lib/memory/__stack_pointer local.tee $1 - i64.const 0 - i64.store + i32.const 0 + i32.const 20 + memory.fill local.get $1 - i64.const 0 - i64.store offset=8 + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $5 + i32.store + local.get $5 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $5 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $5 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $6 + i32.store offset=4 + local.get $6 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $6 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $6 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $6 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + i32.store offset=8 local.get $1 i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 10 + call $~lib/typedarray/Int64Array#constructor + local.tee $4 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 11008 i32.store offset=16 + local.get $4 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> + i32.const 10 + i32.const 3 + i32.const 67 + i32.const 13264 + call $~lib/rt/__newArray + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store offset=16 + local.get $4 + local.get $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + global.get $~lib/memory/__stack_pointer + i32.const 11088 + i32.store offset=16 + block $folding-inner1 + i32.const 11100 + i32.load + i32.const 3 + i32.add + local.get $4 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $4 + i32.load offset=4 + i32.const 24 + i32.add + local.set $7 + i32.const 11092 + i32.load + local.set $8 + i32.const 11100 + i32.load + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $0 + i32.const 3 + i32.shl + local.get $7 + i32.add + local.get $0 + i32.const 2 + i32.shl + local.get $8 + i32.add + f32.load + local.tee $3 + i64.trunc_sat_f32_s + i64.const 0 + local.get $3 + local.get $3 + f32.sub + f32.const 0 + f32.eq + select + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 10 + i32.const 3 + i32.const 67 + i32.const 13424 + call $~lib/rt/__newArray + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=16 + local.get $4 + local.get $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + local.get $4 + local.get $5 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> + i32.const 10 + i32.const 3 + i32.const 67 + i32.const 13536 + call $~lib/rt/__newArray + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=16 + local.get $4 + local.get $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + global.get $~lib/memory/__stack_pointer + i32.const 11184 + i32.store offset=16 + i32.const 11196 + i32.load + i32.const 2 + i32.add + local.get $4 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $4 + i32.load offset=4 + i32.const 16 + i32.add + local.set $5 + i32.const 11188 + i32.load + local.set $7 + i32.const 11196 + i32.load + local.set $8 + i32.const 0 + local.set $0 + loop $for-loop|05 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $0 + i32.const 3 + i32.shl + local.tee $9 + local.get $7 + i32.add + f64.load + local.set $2 + local.get $5 + local.get $9 + i32.add + local.get $2 + i64.trunc_sat_f64_s + i64.const 0 + local.get $2 + local.get $2 + f64.sub + f64.const 0 + f64.eq + select + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|05 + end + end + i32.const 10 + i32.const 3 + i32.const 67 + i32.const 13648 + call $~lib/rt/__newArray + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=16 + local.get $4 + local.get $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + local.get $4 + local.get $6 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + local.get $4 + local.get $1 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> + global.get $~lib/memory/__stack_pointer + i32.const 11264 + i32.store offset=16 + local.get $4 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> + i32.const 10 + i32.const 3 + i32.const 67 + i32.const 13760 + call $~lib/rt/__newArray + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=16 + local.get $4 + local.get $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + return + end + i32.const 1360 + i32.const 1632 + i32.const 1909 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i64) + (local $6 i64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + if + i32.const 33040 + i32.const 33088 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + local.get $1 + i32.load offset=12 + i32.ne + if + i32.const 0 + i32.const 1568 + i32.const 758 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $2 + i32.const 3 + i32.shl + local.tee $4 + local.get $0 + i32.load offset=4 + i32.add + i64.load + local.tee $5 + local.get $4 + local.get $1 + i32.load offset=4 + i32.add + i64.load + local.tee $6 + i64.ne + if + global.get $~lib/memory/__stack_pointer + i32.const 13984 + i32.store + i32.const 13984 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $5 + f64.convert_i64_u + local.get $6 + f64.convert_i64_u + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 1568 + i32.const 764 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> + (local $0 i32) + (local $1 i32) + (local $2 f64) + (local $3 f32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + if + i32.const 33040 + i32.const 33088 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $1 + i32.const 0 + i32.const 20 + memory.fill local.get $1 i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -43768,16 +41083,14 @@ i32.add f32.load local.tee $3 + i64.trunc_sat_f32_u + i64.const 0 + local.get $3 local.get $3 f32.sub f32.const 0 f32.eq - if (result i64) - local.get $3 - i64.trunc_f32_u - else - i64.const 0 - end + select i64.store local.get $0 i32.const 1 @@ -43856,16 +41169,14 @@ local.get $9 i32.add local.get $2 + i64.trunc_sat_f64_u + i64.const 0 + local.get $2 local.get $2 f64.sub f64.const 0 f64.eq - if (result i64) - local.get $2 - i64.trunc_f64_u - else - i64.const 0 - end + select i64.store local.get $0 i32.const 1 @@ -44046,14 +41357,9 @@ end global.get $~lib/memory/__stack_pointer local.tee $3 - i64.const 0 - i64.store - local.get $3 - i64.const 0 - i64.store offset=8 - local.get $3 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $3 i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -44537,14 +41843,9 @@ end global.get $~lib/memory/__stack_pointer local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $1 i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -44968,8 +42269,8 @@ (local $7 i32) (local $8 f64) (local $9 i32) - (local $10 i32) - (local $11 i64) + (local $10 i64) + (local $11 i32) (local $12 f64) (local $13 f32) (local $14 i64) @@ -45019,18 +42320,9 @@ i32.lt_s br_if $folding-inner21 global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 + i32.const 0 + i32.const 32 + memory.fill memory.size i32.const 16 i32.shl @@ -45411,33 +42703,58 @@ global.get $~lib/memory/__stack_pointer i32.const 5 call $~lib/typedarray/Int8Array#constructor - local.tee $2 + local.tee $4 i32.store - local.get $2 + local.get $4 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $2 + local.get $4 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $2 + local.get $4 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set - local.get $2 + local.get $4 i32.const 3 i32.const 4 call $~lib/typedarray/Int8Array#__set - local.get $2 + local.get $4 i32.const 4 i32.const 5 call $~lib/typedarray/Int8Array#__set - local.get $2 + local.get $4 + i32.load offset=4 + local.set $2 i32.const 1 + local.get $4 + i32.load offset=8 + local.tee $0 + local.get $0 i32.const 1 + i32.gt_s + select + local.tee $1 + i32.const 3 + local.get $0 + local.get $0 i32.const 3 - call $~lib/typedarray/Int8Array#fill + i32.gt_s + select + local.tee $0 + i32.lt_s + if + local.get $1 + local.get $2 + i32.add + i32.const 1 + local.get $0 + local.get $1 + i32.sub + memory.fill + end i32.const 5 i32.const 0 i32.const 15 @@ -45447,7 +42764,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 - local.get $2 + local.get $4 local.get $0 call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -45459,11 +42776,30 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 + i32.load offset=4 + local.set $2 i32.const 0 + local.get $4 + i32.load offset=8 + local.tee $1 + local.get $1 i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill + i32.gt_s + select + local.tee $0 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + i32.const 0 + local.get $1 + local.get $0 + i32.sub + memory.fill + end i32.const 5 i32.const 0 i32.const 15 @@ -45473,7 +42809,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 - local.get $2 + local.get $4 local.get $0 call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -45485,11 +42821,39 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 1 + local.get $4 + i32.load offset=4 + local.set $2 i32.const 0 - i32.const -3 - call $~lib/typedarray/Int8Array#fill + local.get $4 + i32.load offset=8 + local.tee $0 + local.get $0 + i32.const 0 + i32.gt_s + select + local.tee $1 + local.get $0 + i32.const 3 + i32.sub + local.tee $0 + i32.const 0 + local.get $0 + i32.const 0 + i32.gt_s + select + local.tee $0 + i32.lt_s + if + local.get $1 + local.get $2 + i32.add + i32.const 1 + local.get $0 + local.get $1 + i32.sub + memory.fill + end i32.const 5 i32.const 0 i32.const 15 @@ -45499,7 +42863,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 - local.get $2 + local.get $4 local.get $0 call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -45511,11 +42875,33 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 + i32.load offset=4 + local.set $2 + local.get $4 + i32.load offset=8 + local.tee $1 i32.const 2 - i32.const -2 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill + i32.sub + local.tee $0 + i32.const 0 + local.get $0 + i32.const 0 + i32.gt_s + select + local.tee $0 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + i32.const 2 + local.get $1 + local.get $0 + i32.sub + memory.fill + end i32.const 5 i32.const 0 i32.const 15 @@ -45525,7 +42911,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 - local.get $2 + local.get $4 local.get $0 call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -45537,11 +42923,36 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 0 + local.get $4 + i32.load offset=4 + local.set $2 i32.const 1 + local.get $4 + i32.load offset=8 + local.tee $0 + local.get $0 + i32.const 1 + i32.gt_s + select + local.tee $1 + i32.const 0 + local.get $0 + local.get $0 i32.const 0 - call $~lib/typedarray/Int8Array#fill + i32.gt_s + select + local.tee $0 + i32.lt_s + if + local.get $1 + local.get $2 + i32.add + i32.const 0 + local.get $0 + local.get $1 + i32.sub + memory.fill + end i32.const 5 i32.const 0 i32.const 15 @@ -45551,7 +42962,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 - local.get $2 + local.get $4 local.get $0 call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -45564,18 +42975,37 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $4 i32.const 1 i32.const 4 call $~lib/typedarray/Int8Array#subarray - local.tee $1 + local.tee $3 i32.store offset=8 - local.get $1 + local.get $3 + i32.load offset=4 + local.set $2 i32.const 0 + local.get $3 + i32.load offset=8 + local.tee $1 + local.get $1 i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill + i32.gt_s + select + local.tee $0 local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + i32.const 0 + local.get $1 + local.get $0 + i32.sub + memory.fill + end + local.get $3 i32.load offset=8 i32.const 3 i32.ne @@ -45587,9 +43017,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.load offset=4 - local.get $1 + local.get $3 i32.load i32.sub i32.const 1 @@ -45602,7 +43032,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.load offset=8 i32.const 3 i32.ne @@ -45623,7 +43053,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 - local.get $1 + local.get $3 local.get $0 call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -45644,7 +43074,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 - local.get $2 + local.get $4 local.get $0 call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -45756,7 +43186,7 @@ i32.gt_s select local.set $1 - loop $for-loop|01 + loop $for-loop|06 local.get $0 local.get $1 i32.gt_s @@ -45772,7 +43202,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|01 + br $for-loop|06 end end i32.const 5 @@ -45820,7 +43250,7 @@ i32.gt_s select local.set $0 - loop $for-loop|03 + loop $for-loop|08 local.get $0 local.get $1 i32.gt_s @@ -45836,7 +43266,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|03 + br $for-loop|08 end end i32.const 5 @@ -45877,7 +43307,7 @@ i32.gt_s select local.set $1 - loop $for-loop|05 + loop $for-loop|010 local.get $1 local.get $2 i32.lt_s @@ -45893,7 +43323,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|05 + br $for-loop|010 end end i32.const 5 @@ -45938,7 +43368,7 @@ i32.gt_s select local.set $0 - loop $for-loop|07 + loop $for-loop|012 local.get $0 local.get $1 i32.gt_s @@ -45954,7 +43384,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|07 + br $for-loop|012 end end i32.const 5 @@ -45999,7 +43429,7 @@ i32.gt_s select local.set $0 - loop $for-loop|09 + loop $for-loop|014 local.get $0 local.get $1 i32.lt_s @@ -46015,7 +43445,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|09 + br $for-loop|014 end end local.get $3 @@ -47087,7 +44517,7 @@ local.get $4 i32.load offset=8 local.set $2 - loop $for-loop|010 + loop $for-loop|015 local.get $1 local.get $2 i32.lt_s @@ -47111,7 +44541,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|010 + br $for-loop|015 end end local.get $5 @@ -47166,7 +44596,7 @@ local.get $4 i32.load offset=8 local.set $2 - loop $for-loop|0511 + loop $for-loop|05 local.get $1 local.get $2 i32.lt_s @@ -47190,7 +44620,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|0511 + br $for-loop|05 end end local.get $5 @@ -47663,11 +45093,11 @@ local.get $2 i32.add i64.load - local.set $11 + local.set $10 i32.const 4 global.set $~argumentsLength local.get $14 - local.get $11 + local.get $10 local.get $1 local.get $3 i32.const 3120 @@ -47744,11 +45174,11 @@ local.get $2 i32.add i64.load - local.set $11 + local.set $10 i32.const 4 global.set $~argumentsLength local.get $14 - local.get $11 + local.get $10 local.get $1 local.get $3 i32.const 3152 @@ -49109,11 +46539,11 @@ local.get $0 i32.add i64.load - local.set $11 + local.set $10 i32.const 4 global.set $~argumentsLength local.get $14 - local.get $11 + local.get $10 local.get $1 local.get $2 i32.const 3472 @@ -49190,11 +46620,11 @@ local.get $0 i32.add i64.load - local.set $11 + local.set $10 i32.const 4 global.set $~argumentsLength local.get $14 - local.get $11 + local.get $10 local.get $1 local.get $2 i32.const 3504 @@ -49445,7 +46875,7 @@ call $~lib/rt/itcms/__new local.tee $1 i32.store offset=4 - loop $for-loop|02 + loop $for-loop|01 local.get $4 local.get $15 i32.gt_s @@ -49471,7 +46901,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|02 + br $for-loop|01 end end local.get $2 @@ -49588,7 +47018,7 @@ call $~lib/rt/itcms/__new local.tee $1 i32.store offset=4 - loop $for-loop|04 + loop $for-loop|03 local.get $4 local.get $15 i32.gt_s @@ -49614,7 +47044,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|04 + br $for-loop|03 end end local.get $2 @@ -49731,7 +47161,7 @@ call $~lib/rt/itcms/__new local.tee $1 i32.store offset=4 - loop $for-loop|08 + loop $for-loop|07 local.get $4 local.get $15 i32.gt_s @@ -49757,7 +47187,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|08 + br $for-loop|07 end end local.get $2 @@ -49826,17 +47256,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $10 + local.tee $11 i32.store - local.get $10 + local.get $11 i32.const 0 i32.const 1 call $~lib/typedarray/Int16Array#__set - local.get $10 + local.get $11 i32.const 1 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $10 + local.get $11 i32.const 2 i32.const 3 call $~lib/typedarray/Int16Array#__set @@ -49856,12 +47286,12 @@ local.tee $0 i64.const 0 i64.store - local.get $10 + local.get $11 i32.load offset=8 i32.const 1 i32.shr_u local.set $7 - local.get $10 + local.get $11 i32.load offset=4 local.set $5 local.get $0 @@ -49899,7 +47329,7 @@ i32.add local.get $0 local.get $15 - local.get $10 + local.get $11 i32.const 3696 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) @@ -49977,17 +47407,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $10 + local.tee $11 i32.store - local.get $10 + local.get $11 i32.const 0 i32.const 1 call $~lib/typedarray/Uint16Array#__set - local.get $10 + local.get $11 i32.const 1 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $10 + local.get $11 i32.const 2 i32.const 3 call $~lib/typedarray/Uint16Array#__set @@ -50007,12 +47437,12 @@ local.tee $0 i64.const 0 i64.store - local.get $10 + local.get $11 i32.load offset=8 i32.const 1 i32.shr_u local.set $7 - local.get $10 + local.get $11 i32.load offset=4 local.set $5 local.get $0 @@ -50030,7 +47460,7 @@ call $~lib/rt/itcms/__new local.tee $2 i32.store offset=4 - loop $for-loop|014 + loop $for-loop|016 local.get $7 local.get $15 i32.gt_s @@ -50050,7 +47480,7 @@ i32.add local.get $0 local.get $15 - local.get $10 + local.get $11 i32.const 3728 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) @@ -50059,7 +47489,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|014 + br $for-loop|016 end end local.get $4 @@ -50128,17 +47558,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $10 + local.tee $11 i32.store - local.get $10 + local.get $11 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $10 + local.get $11 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $10 + local.get $11 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set @@ -50158,12 +47588,12 @@ local.tee $0 i64.const 0 i64.store - local.get $10 + local.get $11 i32.load offset=8 i32.const 2 i32.shr_u local.set $7 - local.get $10 + local.get $11 i32.load offset=4 local.set $5 local.get $0 @@ -50181,7 +47611,7 @@ call $~lib/rt/itcms/__new local.tee $2 i32.store offset=4 - loop $for-loop|018 + loop $for-loop|019 local.get $7 local.get $15 i32.gt_s @@ -50201,7 +47631,7 @@ i32.add local.get $0 local.get $15 - local.get $10 + local.get $11 i32.const 3760 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) @@ -50210,7 +47640,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|018 + br $for-loop|019 end end local.get $4 @@ -50279,17 +47709,17 @@ local.get $0 i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $10 + local.tee $11 i32.store - local.get $10 + local.get $11 i32.const 0 i32.const 1 call $~lib/typedarray/Uint32Array#__set - local.get $10 + local.get $11 i32.const 1 i32.const 2 call $~lib/typedarray/Uint32Array#__set - local.get $10 + local.get $11 i32.const 2 i32.const 3 call $~lib/typedarray/Uint32Array#__set @@ -50309,12 +47739,12 @@ local.tee $0 i64.const 0 i64.store - local.get $10 + local.get $11 i32.load offset=8 i32.const 2 i32.shr_u local.set $7 - local.get $10 + local.get $11 i32.load offset=4 local.set $5 local.get $0 @@ -50332,7 +47762,7 @@ call $~lib/rt/itcms/__new local.tee $2 i32.store offset=4 - loop $for-loop|021 + loop $for-loop|023 local.get $7 local.get $15 i32.gt_s @@ -50352,7 +47782,7 @@ i32.add local.get $0 local.get $15 - local.get $10 + local.get $11 i32.const 3792 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) @@ -50361,7 +47791,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|021 + br $for-loop|023 end end local.get $4 @@ -50483,7 +47913,7 @@ call $~lib/rt/itcms/__new local.tee $1 i32.store offset=4 - loop $for-loop|024 + loop $for-loop|026 local.get $5 local.get $15 i32.gt_s @@ -50495,13 +47925,13 @@ local.get $4 i32.add i64.load - local.set $11 + local.set $10 i32.const 3 global.set $~argumentsLength local.get $0 local.get $1 i32.add - local.get $11 + local.get $10 local.get $15 local.get $9 i32.const 3824 @@ -50512,7 +47942,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|024 + br $for-loop|026 end end local.get $3 @@ -50634,7 +48064,7 @@ call $~lib/rt/itcms/__new local.tee $1 i32.store offset=4 - loop $for-loop|028 + loop $for-loop|029 local.get $5 local.get $15 i32.gt_s @@ -50646,13 +48076,13 @@ local.get $4 i32.add i64.load - local.set $11 + local.set $10 i32.const 3 global.set $~argumentsLength local.get $0 local.get $1 i32.add - local.get $11 + local.get $10 local.get $15 local.get $9 i32.const 3856 @@ -50663,7 +48093,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|028 + br $for-loop|029 end end local.get $3 @@ -50785,7 +48215,7 @@ call $~lib/rt/itcms/__new local.tee $1 i32.store offset=4 - loop $for-loop|031 + loop $for-loop|033 local.get $5 local.get $15 i32.gt_s @@ -50814,7 +48244,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|031 + br $for-loop|033 end end local.get $3 @@ -50936,7 +48366,7 @@ call $~lib/rt/itcms/__new local.tee $1 i32.store offset=4 - loop $for-loop|034 + loop $for-loop|036 local.get $5 local.get $15 i32.gt_s @@ -50965,7 +48395,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|034 + br $for-loop|036 end end local.get $3 @@ -51065,7 +48495,7 @@ local.get $3 i32.load offset=8 local.set $1 - loop $for-loop|012 + loop $for-loop|01638 local.get $1 local.get $5 i32.gt_s @@ -51090,7 +48520,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|012 + br $for-loop|01638 end end i32.const 0 @@ -51109,7 +48539,7 @@ local.get $3 i32.load offset=8 local.set $1 - loop $for-loop|0436 + loop $for-loop|04 local.get $1 local.get $5 i32.gt_s @@ -51134,7 +48564,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0436 + br $for-loop|04 end end i32.const 0 @@ -51185,7 +48615,7 @@ local.get $3 i32.load offset=8 local.set $1 - loop $for-loop|01437 + loop $for-loop|018 local.get $1 local.get $5 i32.gt_s @@ -51210,7 +48640,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|01437 + br $for-loop|018 end end i32.const 0 @@ -51229,7 +48659,7 @@ local.get $3 i32.load offset=8 local.set $1 - loop $for-loop|0415 + loop $for-loop|0419 local.get $1 local.get $5 i32.gt_s @@ -51254,7 +48684,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0415 + br $for-loop|0419 end end i32.const 0 @@ -51293,7 +48723,7 @@ i32.const 2 i32.const 6 call $~lib/typedarray/Uint8ClampedArray#__set - block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.016 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.020 (result i32) global.get $~lib/memory/__stack_pointer i32.const 4432 i32.store offset=4 @@ -51305,7 +48735,7 @@ local.get $3 i32.load offset=8 local.set $1 - loop $for-loop|01838 + loop $for-loop|021 local.get $1 local.get $5 i32.gt_s @@ -51324,20 +48754,20 @@ i32.const 4432 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.016 + br_if $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.020 drop local.get $5 i32.const 1 i32.add local.set $5 - br $for-loop|01838 + br $for-loop|021 end end i32.const 0 end i32.eqz br_if $folding-inner23 - block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0119 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0122 (result i32) global.get $~lib/memory/__stack_pointer i32.const 4464 i32.store offset=4 @@ -51349,7 +48779,7 @@ local.get $3 i32.load offset=8 local.set $1 - loop $for-loop|0420 + loop $for-loop|0423 local.get $1 local.get $5 i32.gt_s @@ -51368,13 +48798,13 @@ i32.const 4464 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0119 + br_if $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0122 drop local.get $5 i32.const 1 i32.add local.set $5 - br $for-loop|0420 + br $for-loop|0423 end end i32.const 0 @@ -51427,7 +48857,7 @@ i32.const 1 i32.shr_u local.set $1 - loop $for-loop|02139 + loop $for-loop|024 local.get $1 local.get $5 i32.gt_s @@ -51454,7 +48884,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|02139 + br $for-loop|024 end end i32.const 0 @@ -51475,7 +48905,7 @@ i32.const 1 i32.shr_u local.set $1 - loop $for-loop|0422 + loop $for-loop|0425 local.get $1 local.get $5 i32.gt_s @@ -51502,7 +48932,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0422 + br $for-loop|0425 end end i32.const 0 @@ -51555,7 +48985,7 @@ i32.const 1 i32.shr_u local.set $1 - loop $for-loop|023 + loop $for-loop|02639 local.get $1 local.get $5 i32.gt_s @@ -51582,7 +49012,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|023 + br $for-loop|02639 end end i32.const 0 @@ -51603,7 +49033,7 @@ i32.const 1 i32.shr_u local.set $1 - loop $for-loop|0424 + loop $for-loop|0427 local.get $1 local.get $5 i32.gt_s @@ -51630,7 +49060,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0424 + br $for-loop|0427 end end i32.const 0 @@ -51683,7 +49113,7 @@ i32.const 2 i32.shr_u local.set $1 - loop $for-loop|025 + loop $for-loop|028 local.get $1 local.get $5 i32.gt_s @@ -51710,7 +49140,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|025 + br $for-loop|028 end end i32.const 0 @@ -51731,7 +49161,7 @@ i32.const 2 i32.shr_u local.set $1 - loop $for-loop|0426 + loop $for-loop|0429 local.get $1 local.get $5 i32.gt_s @@ -51758,7 +49188,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0426 + br $for-loop|0429 end end i32.const 0 @@ -51811,7 +49241,7 @@ i32.const 2 i32.shr_u local.set $1 - loop $for-loop|02840 + loop $for-loop|030 local.get $1 local.get $5 i32.gt_s @@ -51838,7 +49268,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|02840 + br $for-loop|030 end end i32.const 0 @@ -51859,7 +49289,7 @@ i32.const 2 i32.shr_u local.set $1 - loop $for-loop|0429 + loop $for-loop|0431 local.get $1 local.get $5 i32.gt_s @@ -51886,7 +49316,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0429 + br $for-loop|0431 end end i32.const 0 @@ -51939,7 +49369,7 @@ i32.const 3 i32.shr_u local.set $0 - loop $for-loop|030 + loop $for-loop|03340 local.get $0 local.get $5 i32.gt_s @@ -51950,11 +49380,11 @@ local.get $1 i32.add i64.load - local.set $11 + local.set $10 i32.const 3 global.set $~argumentsLength i32.const 1 - local.get $11 + local.get $10 local.get $5 local.get $2 i32.const 4752 @@ -51966,7 +49396,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|030 + br $for-loop|03340 end end i32.const 0 @@ -51987,7 +49417,7 @@ i32.const 3 i32.shr_u local.set $0 - loop $for-loop|0431 + loop $for-loop|0434 local.get $0 local.get $5 i32.gt_s @@ -51998,11 +49428,11 @@ local.get $1 i32.add i64.load - local.set $11 + local.set $10 i32.const 3 global.set $~argumentsLength i32.const 1 - local.get $11 + local.get $10 local.get $5 local.get $2 i32.const 4784 @@ -52014,7 +49444,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0431 + br $for-loop|0434 end end i32.const 0 @@ -52067,7 +49497,7 @@ i32.const 3 i32.shr_u local.set $0 - loop $for-loop|033 + loop $for-loop|035 local.get $0 local.get $5 i32.gt_s @@ -52078,11 +49508,11 @@ local.get $1 i32.add i64.load - local.set $11 + local.set $10 i32.const 3 global.set $~argumentsLength i32.const 1 - local.get $11 + local.get $10 local.get $5 local.get $2 i32.const 4816 @@ -52094,7 +49524,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|033 + br $for-loop|035 end end i32.const 0 @@ -52115,7 +49545,7 @@ i32.const 3 i32.shr_u local.set $0 - loop $for-loop|0434 + loop $for-loop|0436 local.get $0 local.get $5 i32.gt_s @@ -52126,11 +49556,11 @@ local.get $1 i32.add i64.load - local.set $11 + local.set $10 i32.const 3 global.set $~argumentsLength i32.const 1 - local.get $11 + local.get $10 local.get $5 local.get $2 i32.const 4848 @@ -52142,7 +49572,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0434 + br $for-loop|0436 end end i32.const 0 @@ -52195,7 +49625,7 @@ i32.const 2 i32.shr_u local.set $0 - loop $for-loop|035 + loop $for-loop|038 local.get $0 local.get $5 i32.gt_s @@ -52222,7 +49652,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|035 + br $for-loop|038 end end i32.const 0 @@ -52243,7 +49673,7 @@ i32.const 2 i32.shr_u local.set $0 - loop $for-loop|043641 + loop $for-loop|0439 local.get $0 local.get $5 i32.gt_s @@ -52270,7 +49700,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|043641 + br $for-loop|0439 end end i32.const 0 @@ -52323,7 +49753,7 @@ i32.const 3 i32.shr_u local.set $0 - loop $for-loop|038 + loop $for-loop|040 local.get $0 local.get $5 i32.gt_s @@ -52350,7 +49780,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|038 + br $for-loop|040 end end i32.const 0 @@ -52371,7 +49801,7 @@ i32.const 3 i32.shr_u local.set $0 - loop $for-loop|0439 + loop $for-loop|0441 local.get $0 local.get $5 i32.gt_s @@ -52398,7 +49828,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0439 + br $for-loop|0441 end end i32.const 0 @@ -52449,7 +49879,7 @@ i32.load offset=8 local.set $1 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 - loop $for-loop|040 + loop $for-loop|043 local.get $1 local.get $5 i32.gt_s @@ -52470,7 +49900,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|040 + br $for-loop|043 end end i32.const -1 @@ -52492,7 +49922,7 @@ i32.load offset=8 local.set $1 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.01 - loop $for-loop|0441 + loop $for-loop|0444 local.get $1 local.get $5 i32.gt_s @@ -52513,7 +49943,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0441 + br $for-loop|0444 end end i32.const -1 @@ -52568,7 +49998,7 @@ i32.load offset=8 local.set $1 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 - loop $for-loop|043 + loop $for-loop|045 local.get $1 local.get $5 i32.gt_s @@ -52589,7 +50019,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|043 + br $for-loop|045 end end i32.const -1 @@ -52611,7 +50041,7 @@ i32.load offset=8 local.set $1 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.01 - loop $for-loop|0444 + loop $for-loop|0446 local.get $1 local.get $5 i32.gt_s @@ -52632,7 +50062,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0444 + br $for-loop|0446 end end i32.const -1 @@ -52686,8 +50116,8 @@ local.get $3 i32.load offset=8 local.set $1 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.045 - loop $for-loop|046 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.047 + loop $for-loop|048 local.get $1 local.get $5 i32.gt_s @@ -52703,12 +50133,12 @@ i32.const 5136 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.045 + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.047 local.get $5 i32.const 1 i32.add local.set $5 - br $for-loop|046 + br $for-loop|048 end end i32.const -1 @@ -52729,8 +50159,8 @@ local.get $3 i32.load offset=8 local.set $1 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0147 - loop $for-loop|0448 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0149 + loop $for-loop|0450 local.get $1 local.get $5 i32.gt_s @@ -52746,12 +50176,12 @@ i32.const 5168 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0147 + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0149 local.get $5 i32.const 1 i32.add local.set $5 - br $for-loop|0448 + br $for-loop|0450 end end i32.const -1 @@ -52808,7 +50238,7 @@ i32.shr_u local.set $1 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 - loop $for-loop|049 + loop $for-loop|051 local.get $1 local.get $5 i32.gt_s @@ -52831,7 +50261,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|049 + br $for-loop|051 end end i32.const -1 @@ -52855,7 +50285,7 @@ i32.shr_u local.set $1 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.01 - loop $for-loop|0450 + loop $for-loop|0452 local.get $1 local.get $5 i32.gt_s @@ -52878,7 +50308,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0450 + br $for-loop|0452 end end i32.const -1 @@ -52935,7 +50365,7 @@ i32.shr_u local.set $1 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 - loop $for-loop|051 + loop $for-loop|053 local.get $1 local.get $5 i32.gt_s @@ -52958,7 +50388,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|051 + br $for-loop|053 end end i32.const -1 @@ -52982,7 +50412,7 @@ i32.shr_u local.set $1 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.01 - loop $for-loop|0452 + loop $for-loop|0454 local.get $1 local.get $5 i32.gt_s @@ -53005,7 +50435,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0452 + br $for-loop|0454 end end i32.const -1 @@ -53062,7 +50492,7 @@ i32.shr_u local.set $1 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 - loop $for-loop|053 + loop $for-loop|055 local.get $1 local.get $5 i32.gt_s @@ -53085,7 +50515,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|053 + br $for-loop|055 end end i32.const -1 @@ -53109,7 +50539,7 @@ i32.shr_u local.set $1 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.01 - loop $for-loop|0454 + loop $for-loop|0456 local.get $1 local.get $5 i32.gt_s @@ -53132,7 +50562,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0454 + br $for-loop|0456 end end i32.const -1 @@ -53189,7 +50619,7 @@ i32.shr_u local.set $1 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 - loop $for-loop|055 + loop $for-loop|057 local.get $1 local.get $5 i32.gt_s @@ -53212,7 +50642,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|055 + br $for-loop|057 end end i32.const -1 @@ -53236,7 +50666,7 @@ i32.shr_u local.set $1 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.01 - loop $for-loop|0456 + loop $for-loop|0458 local.get $1 local.get $5 i32.gt_s @@ -53259,7 +50689,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0456 + br $for-loop|0458 end end i32.const -1 @@ -53316,7 +50746,7 @@ i32.shr_u local.set $0 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 - loop $for-loop|057 + loop $for-loop|060 local.get $0 local.get $5 i32.gt_s @@ -53339,7 +50769,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|057 + br $for-loop|060 end end i32.const -1 @@ -53363,7 +50793,7 @@ i32.shr_u local.set $0 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.01 - loop $for-loop|0458 + loop $for-loop|0461 local.get $0 local.get $5 i32.gt_s @@ -53386,7 +50816,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0458 + br $for-loop|0461 end end i32.const -1 @@ -53443,7 +50873,7 @@ i32.shr_u local.set $0 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 - loop $for-loop|060 + loop $for-loop|062 local.get $0 local.get $5 i32.gt_s @@ -53466,7 +50896,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|060 + br $for-loop|062 end end i32.const -1 @@ -53490,7 +50920,7 @@ i32.shr_u local.set $0 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.01 - loop $for-loop|0461 + loop $for-loop|0463 local.get $0 local.get $5 i32.gt_s @@ -53513,7 +50943,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0461 + br $for-loop|0463 end end i32.const -1 @@ -53570,7 +51000,7 @@ i32.shr_u local.set $0 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 - loop $for-loop|062 + loop $for-loop|065 local.get $0 local.get $5 i32.gt_s @@ -53593,7 +51023,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|062 + br $for-loop|065 end end i32.const -1 @@ -53617,7 +51047,7 @@ i32.shr_u local.set $0 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.01 - loop $for-loop|0463 + loop $for-loop|0466 local.get $0 local.get $5 i32.gt_s @@ -53640,7 +51070,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0463 + br $for-loop|0466 end end i32.const -1 @@ -53697,7 +51127,7 @@ i32.shr_u local.set $0 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 - loop $for-loop|065 + loop $for-loop|067 local.get $0 local.get $5 i32.gt_s @@ -53720,7 +51150,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|065 + br $for-loop|067 end end i32.const -1 @@ -53744,7 +51174,7 @@ i32.shr_u local.set $0 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.01 - loop $for-loop|0466 + loop $for-loop|0468 local.get $0 local.get $5 i32.gt_s @@ -53767,7 +51197,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0466 + br $for-loop|0468 end end i32.const -1 @@ -53822,7 +51252,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 - loop $for-loop|067 + loop $for-loop|069 local.get $5 i32.const 0 i32.ge_s @@ -53843,7 +51273,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|067 + br $for-loop|069 end end i32.const -1 @@ -53865,7 +51295,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int8Array,i8>|inlined.01 - loop $for-loop|0468 + loop $for-loop|0470 local.get $5 i32.const 0 i32.ge_s @@ -53886,7 +51316,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|0468 + br $for-loop|0470 end end i32.const -1 @@ -53941,7 +51371,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 - loop $for-loop|069 + loop $for-loop|072 local.get $5 i32.const 0 i32.ge_s @@ -53962,7 +51392,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|069 + br $for-loop|072 end end i32.const -1 @@ -53984,7 +51414,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.01 - loop $for-loop|0470 + loop $for-loop|0473 local.get $5 i32.const 0 i32.ge_s @@ -54005,7 +51435,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|0470 + br $for-loop|0473 end end i32.const -1 @@ -54059,8 +51489,8 @@ i32.const 1 i32.sub local.set $5 - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.071 - loop $for-loop|072 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.074 + loop $for-loop|075 local.get $5 i32.const 0 i32.ge_s @@ -54076,12 +51506,12 @@ i32.const 5840 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.071 + br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.074 local.get $5 i32.const 1 i32.sub local.set $5 - br $for-loop|072 + br $for-loop|075 end end i32.const -1 @@ -54102,8 +51532,8 @@ i32.const 1 i32.sub local.set $5 - block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0173 - loop $for-loop|0474 + block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0176 + loop $for-loop|0477 local.get $5 i32.const 0 i32.ge_s @@ -54119,12 +51549,12 @@ i32.const 5872 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0173 + br_if $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0176 local.get $5 i32.const 1 i32.sub local.set $5 - br $for-loop|0474 + br $for-loop|0477 end end i32.const -1 @@ -54181,7 +51611,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 - loop $for-loop|075 + loop $for-loop|078 local.get $5 i32.const 0 i32.ge_s @@ -54204,7 +51634,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|075 + br $for-loop|078 end end i32.const -1 @@ -54228,7 +51658,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int16Array,i16>|inlined.01 - loop $for-loop|0476 + loop $for-loop|0479 local.get $5 i32.const 0 i32.ge_s @@ -54251,7 +51681,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|0476 + br $for-loop|0479 end end i32.const -1 @@ -54308,7 +51738,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 - loop $for-loop|077 + loop $for-loop|080 local.get $5 i32.const 0 i32.ge_s @@ -54331,7 +51761,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|077 + br $for-loop|080 end end i32.const -1 @@ -54355,7 +51785,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.01 - loop $for-loop|0478 + loop $for-loop|0481 local.get $5 i32.const 0 i32.ge_s @@ -54378,7 +51808,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|0478 + br $for-loop|0481 end end i32.const -1 @@ -54435,7 +51865,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 - loop $for-loop|079 + loop $for-loop|082 local.get $5 i32.const 0 i32.ge_s @@ -54458,7 +51888,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|079 + br $for-loop|082 end end i32.const -1 @@ -54482,7 +51912,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int32Array,i32>|inlined.01 - loop $for-loop|0480 + loop $for-loop|0483 local.get $5 i32.const 0 i32.ge_s @@ -54505,7 +51935,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|0480 + br $for-loop|0483 end end i32.const -1 @@ -54562,7 +51992,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 - loop $for-loop|082 + loop $for-loop|084 local.get $5 i32.const 0 i32.ge_s @@ -54585,7 +52015,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|082 + br $for-loop|084 end end i32.const -1 @@ -54609,7 +52039,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.01 - loop $for-loop|0483 + loop $for-loop|0485 local.get $5 i32.const 0 i32.ge_s @@ -54632,7 +52062,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|0483 + br $for-loop|0485 end end i32.const -1 @@ -54689,7 +52119,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 - loop $for-loop|084 + loop $for-loop|087 local.get $5 i32.const 0 i32.ge_s @@ -54712,7 +52142,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|084 + br $for-loop|087 end end i32.const -1 @@ -54736,7 +52166,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int64Array,i64>|inlined.01 - loop $for-loop|0485 + loop $for-loop|0488 local.get $5 i32.const 0 i32.ge_s @@ -54759,7 +52189,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|0485 + br $for-loop|0488 end end i32.const -1 @@ -54816,7 +52246,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 - loop $for-loop|087 + loop $for-loop|089 local.get $5 i32.const 0 i32.ge_s @@ -54839,7 +52269,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|087 + br $for-loop|089 end end i32.const -1 @@ -54863,7 +52293,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.01 - loop $for-loop|0488 + loop $for-loop|0490 local.get $5 i32.const 0 i32.ge_s @@ -54886,7 +52316,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|0488 + br $for-loop|0490 end end i32.const -1 @@ -54943,7 +52373,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 - loop $for-loop|089 + loop $for-loop|092 local.get $5 i32.const 0 i32.ge_s @@ -54966,7 +52396,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|089 + br $for-loop|092 end end i32.const -1 @@ -54990,7 +52420,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float32Array,f32>|inlined.01 - loop $for-loop|0490 + loop $for-loop|0493 local.get $5 i32.const 0 i32.ge_s @@ -55013,7 +52443,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|0490 + br $for-loop|0493 end end i32.const -1 @@ -55070,7 +52500,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 - loop $for-loop|092 + loop $for-loop|094 local.get $5 i32.const 0 i32.ge_s @@ -55093,7 +52523,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|092 + br $for-loop|094 end end i32.const -1 @@ -55117,7 +52547,7 @@ i32.sub local.set $5 block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float64Array,f64>|inlined.01 - loop $for-loop|0493 + loop $for-loop|0495 local.get $5 i32.const 0 i32.ge_s @@ -55140,7 +52570,7 @@ i32.const 1 i32.sub local.set $5 - br $for-loop|0493 + br $for-loop|0495 end end i32.const -1 @@ -55195,7 +52625,7 @@ local.get $3 i32.load offset=8 local.set $1 - loop $for-loop|094 + loop $for-loop|097 local.get $1 local.get $5 i32.gt_s @@ -55221,7 +52651,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|094 + br $for-loop|097 end end i32.const 1 @@ -55240,7 +52670,7 @@ local.get $3 i32.load offset=8 local.set $1 - loop $for-loop|0495 + loop $for-loop|0498 local.get $1 local.get $5 i32.gt_s @@ -55266,7 +52696,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0495 + br $for-loop|0498 end end i32.const 1 @@ -55317,7 +52747,7 @@ local.get $3 i32.load offset=8 local.set $1 - loop $for-loop|097 + loop $for-loop|099 local.get $1 local.get $5 i32.gt_s @@ -55343,7 +52773,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|097 + br $for-loop|099 end end i32.const 1 @@ -55362,7 +52792,7 @@ local.get $3 i32.load offset=8 local.set $1 - loop $for-loop|0498 + loop $for-loop|04100 local.get $1 local.get $5 i32.gt_s @@ -55388,7 +52818,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0498 + br $for-loop|04100 end end i32.const 1 @@ -55427,7 +52857,7 @@ i32.const 2 i32.const 6 call $~lib/typedarray/Uint8ClampedArray#__set - block $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.099 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0101 (result i32) global.get $~lib/memory/__stack_pointer i32.const 6544 i32.store offset=4 @@ -55439,7 +52869,7 @@ local.get $3 i32.load offset=8 local.set $1 - loop $for-loop|0100 + loop $for-loop|0102 local.get $1 local.get $5 i32.gt_s @@ -55459,20 +52889,20 @@ i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.099 + br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0101 drop local.get $5 i32.const 1 i32.add local.set $5 - br $for-loop|0100 + br $for-loop|0102 end end i32.const 1 end i32.eqz br_if $folding-inner29 - block $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.01101 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.01103 (result i32) global.get $~lib/memory/__stack_pointer i32.const 6576 i32.store offset=4 @@ -55484,7 +52914,7 @@ local.get $3 i32.load offset=8 local.set $1 - loop $for-loop|04102 + loop $for-loop|04104 local.get $1 local.get $5 i32.gt_s @@ -55504,13 +52934,13 @@ i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.01101 + br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.01103 drop local.get $5 i32.const 1 i32.add local.set $5 - br $for-loop|04102 + br $for-loop|04104 end end i32.const 1 @@ -55563,7 +52993,7 @@ i32.const 1 i32.shr_u local.set $1 - loop $for-loop|0103 + loop $for-loop|0105 local.get $1 local.get $5 i32.gt_s @@ -55591,7 +53021,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0103 + br $for-loop|0105 end end i32.const 1 @@ -55612,7 +53042,7 @@ i32.const 1 i32.shr_u local.set $1 - loop $for-loop|04104 + loop $for-loop|04106 local.get $1 local.get $5 i32.gt_s @@ -55640,7 +53070,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|04104 + br $for-loop|04106 end end i32.const 1 @@ -55693,7 +53123,7 @@ i32.const 1 i32.shr_u local.set $1 - loop $for-loop|0105 + loop $for-loop|0107 local.get $1 local.get $5 i32.gt_s @@ -55721,7 +53151,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0105 + br $for-loop|0107 end end i32.const 1 @@ -55742,7 +53172,7 @@ i32.const 1 i32.shr_u local.set $1 - loop $for-loop|04106 + loop $for-loop|04108 local.get $1 local.get $5 i32.gt_s @@ -55770,7 +53200,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|04106 + br $for-loop|04108 end end i32.const 1 @@ -55823,7 +53253,7 @@ i32.const 2 i32.shr_u local.set $1 - loop $for-loop|0107 + loop $for-loop|0109 local.get $1 local.get $5 i32.gt_s @@ -55851,7 +53281,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0107 + br $for-loop|0109 end end i32.const 1 @@ -55872,7 +53302,7 @@ i32.const 2 i32.shr_u local.set $1 - loop $for-loop|04108 + loop $for-loop|04110 local.get $1 local.get $5 i32.gt_s @@ -55900,7 +53330,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|04108 + br $for-loop|04110 end end i32.const 1 @@ -55953,7 +53383,7 @@ i32.const 2 i32.shr_u local.set $1 - loop $for-loop|0109 + loop $for-loop|0112 local.get $1 local.get $5 i32.gt_s @@ -55981,7 +53411,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0109 + br $for-loop|0112 end end i32.const 1 @@ -56002,7 +53432,7 @@ i32.const 2 i32.shr_u local.set $1 - loop $for-loop|04110 + loop $for-loop|04113 local.get $1 local.get $5 i32.gt_s @@ -56030,7 +53460,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|04110 + br $for-loop|04113 end end i32.const 1 @@ -56083,7 +53513,7 @@ i32.const 3 i32.shr_u local.set $0 - loop $for-loop|0112 + loop $for-loop|0114 local.get $0 local.get $5 i32.gt_s @@ -56094,11 +53524,11 @@ local.get $1 i32.add i64.load - local.set $11 + local.set $10 i32.const 3 global.set $~argumentsLength i32.const 0 - local.get $11 + local.get $10 local.get $5 local.get $2 i32.const 6864 @@ -56111,7 +53541,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0112 + br $for-loop|0114 end end i32.const 1 @@ -56132,7 +53562,7 @@ i32.const 3 i32.shr_u local.set $0 - loop $for-loop|04113 + loop $for-loop|04115 local.get $0 local.get $5 i32.gt_s @@ -56143,11 +53573,11 @@ local.get $1 i32.add i64.load - local.set $11 + local.set $10 i32.const 3 global.set $~argumentsLength i32.const 0 - local.get $11 + local.get $10 local.get $5 local.get $2 i32.const 6896 @@ -56160,7 +53590,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|04113 + br $for-loop|04115 end end i32.const 1 @@ -56213,7 +53643,7 @@ i32.const 3 i32.shr_u local.set $0 - loop $for-loop|0114 + loop $for-loop|0116 local.get $0 local.get $5 i32.gt_s @@ -56224,11 +53654,11 @@ local.get $1 i32.add i64.load - local.set $11 + local.set $10 i32.const 3 global.set $~argumentsLength i32.const 0 - local.get $11 + local.get $10 local.get $5 local.get $2 i32.const 6928 @@ -56241,7 +53671,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0114 + br $for-loop|0116 end end i32.const 1 @@ -56262,7 +53692,7 @@ i32.const 3 i32.shr_u local.set $0 - loop $for-loop|04115 + loop $for-loop|04117 local.get $0 local.get $5 i32.gt_s @@ -56273,11 +53703,11 @@ local.get $1 i32.add i64.load - local.set $11 + local.set $10 i32.const 3 global.set $~argumentsLength i32.const 0 - local.get $11 + local.get $10 local.get $5 local.get $2 i32.const 6960 @@ -56290,7 +53720,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|04115 + br $for-loop|04117 end end i32.const 1 @@ -56343,7 +53773,7 @@ i32.const 2 i32.shr_u local.set $0 - loop $for-loop|0116 + loop $for-loop|0118 local.get $0 local.get $5 i32.gt_s @@ -56371,7 +53801,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0116 + br $for-loop|0118 end end i32.const 1 @@ -56392,7 +53822,7 @@ i32.const 2 i32.shr_u local.set $0 - loop $for-loop|04117 + loop $for-loop|04119 local.get $0 local.get $5 i32.gt_s @@ -56420,7 +53850,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|04117 + br $for-loop|04119 end end i32.const 1 @@ -56473,7 +53903,7 @@ i32.const 3 i32.shr_u local.set $0 - loop $for-loop|0118 + loop $for-loop|0120 local.get $0 local.get $5 i32.gt_s @@ -56501,7 +53931,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|0118 + br $for-loop|0120 end end i32.const 1 @@ -56522,7 +53952,7 @@ i32.const 3 i32.shr_u local.set $0 - loop $for-loop|04119 + loop $for-loop|04121 local.get $0 local.get $5 i32.gt_s @@ -56550,7 +53980,7 @@ i32.const 1 i32.add local.set $5 - br $for-loop|04119 + br $for-loop|04121 end end i32.const 1 @@ -56625,7 +54055,7 @@ local.get $4 i32.load offset=8 local.set $2 - loop $for-loop|0116120 + loop $for-loop|0116122 local.get $1 local.get $2 i32.lt_s @@ -56645,7 +54075,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|0116120 + br $for-loop|0116122 end end global.get $std/typedarray/forEachCallCount @@ -57663,14 +55093,533 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store + i32.const 0 + i32.const 20 + memory.fill local.get $0 - i64.const 0 - i64.store offset=8 + i32.const 7616 + i32.store + local.get $0 + i32.const 7628 + i32.load + local.tee $2 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + call $~lib/typedarray/Int8Array#constructor + local.tee $0 + i32.store offset=8 + loop $for-loop|0123 + local.get $2 + local.get $5 + i32.gt_s + if + local.get $1 + local.get $5 + i32.const 7616 + local.get $5 + call $~lib/array/Array#__get + i32.extend8_s + call $~lib/typedarray/Int8Array#__set + local.get $0 + local.get $5 + i32.const 7616 + local.get $5 + call $~lib/array/Array#__get + i32.extend8_s + call $~lib/typedarray/Int8Array#__set + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0123 + end + end + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + call $~lib/util/bytes/REVERSE + i32.const 0 + local.set $5 + loop $for-loop|1 + local.get $2 + local.get $5 + i32.gt_s + if + local.get $1 + local.get $5 + call $~lib/typedarray/Int8Array#__get + i32.const 7616 + local.get $2 + i32.const 1 + i32.sub + local.get $5 + i32.sub + call $~lib/array/Array#__get + i32.extend8_s + i32.ne + br_if $folding-inner31 + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|1 + end + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.const 4 + i32.const 8 + call $~lib/typedarray/Int8Array#subarray + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + call $~lib/util/bytes/REVERSE + local.get $0 + i32.store offset=16 + local.get $0 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 8 + i32.ne + br_if $folding-inner32 + local.get $0 + i32.const 1 + call $~lib/typedarray/Int8Array#__get + i32.const 7 + i32.ne + br_if $folding-inner33 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int8Array#__get + i32.const 6 + i32.ne + br_if $folding-inner34 + local.get $0 + i32.const 3 + call $~lib/typedarray/Int8Array#__get + i32.const 5 + i32.ne + br_if $folding-inner35 + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 0 + local.set $5 + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner21 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.const 20 + memory.fill + local.get $0 + i32.const 7616 + i32.store + local.get $0 + i32.const 7628 + i32.load + local.tee $2 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + call $~lib/typedarray/Uint8Array#constructor + local.tee $0 + i32.store offset=8 + loop $for-loop|0124 + local.get $2 + local.get $5 + i32.gt_s + if + local.get $1 + local.get $5 + i32.const 7616 + local.get $5 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $0 + local.get $5 + i32.const 7616 + local.get $5 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0124 + end + end + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + call $~lib/util/bytes/REVERSE + i32.const 0 + local.set $5 + loop $for-loop|1125 + local.get $2 + local.get $5 + i32.gt_s + if + local.get $1 + local.get $5 + call $~lib/typedarray/Uint8Array#__get + i32.const 7616 + local.get $2 + i32.const 1 + i32.sub + local.get $5 + i32.sub + call $~lib/array/Array#__get + i32.const 255 + i32.and + i32.ne + br_if $folding-inner31 + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|1125 + end + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.const 8 + call $~lib/typedarray/Uint8Array#subarray + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + call $~lib/util/bytes/REVERSE + local.get $0 + i32.store offset=16 + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint8Array#__get + i32.const 8 + i32.ne + br_if $folding-inner32 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__get + i32.const 7 + i32.ne + br_if $folding-inner33 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__get + i32.const 6 + i32.ne + br_if $folding-inner34 local.get $0 + i32.const 3 + call $~lib/typedarray/Uint8Array#__get + i32.const 5 + i32.ne + br_if $folding-inner35 + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + i32.const 0 + local.set $5 + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner21 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.const 20 + memory.fill + local.get $0 + i32.const 7616 + i32.store + local.get $0 + i32.const 7628 + i32.load + local.tee $2 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $0 + i32.store offset=8 + loop $for-loop|0126 + local.get $2 + local.get $5 + i32.gt_s + if + local.get $1 + local.get $5 + i32.const 7616 + local.get $5 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + local.get $5 + i32.const 7616 + local.get $5 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0126 + end + end + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + call $~lib/util/bytes/REVERSE + i32.const 0 + local.set $5 + loop $for-loop|1127 + local.get $2 + local.get $5 + i32.gt_s + if + local.get $1 + local.get $5 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 7616 + local.get $2 + i32.const 1 + i32.sub + local.get $5 + i32.sub + call $~lib/array/Array#__get + i32.const 255 + i32.and + i32.ne + br_if $folding-inner31 + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|1127 + end + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.const 8 + call $~lib/typedarray/Uint8ClampedArray#subarray + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + call $~lib/util/bytes/REVERSE + local.get $0 + i32.store offset=16 + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 8 + i32.ne + br_if $folding-inner32 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 7 + i32.ne + br_if $folding-inner33 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 6 + i32.ne + br_if $folding-inner34 + local.get $0 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 5 + i32.ne + br_if $folding-inner35 + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner21 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.const 20 + memory.fill + local.get $0 + i32.const 7616 + i32.store + local.get $0 + i32.const 7628 + i32.load + local.tee $2 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $2 + call $~lib/typedarray/Int16Array#constructor + local.tee $0 + i32.store offset=8 + i32.const 0 + local.set $15 + loop $for-loop|0171 + local.get $2 + local.get $15 + i32.gt_s + if + local.get $1 + local.get $15 + i32.const 7616 + local.get $15 + call $~lib/array/Array#__get + i32.extend16_s + call $~lib/typedarray/Int16Array#__set + local.get $0 + local.get $15 + i32.const 7616 + local.get $15 + call $~lib/array/Array#__get + i32.extend16_s + call $~lib/typedarray/Int16Array#__set + local.get $15 + i32.const 1 + i32.add + local.set $15 + br $for-loop|0171 + end + end + local.get $1 + call $~lib/typedarray/Int16Array#reverse + drop + i32.const 0 + local.set $15 + loop $for-loop|1128 + local.get $2 + local.get $15 + i32.gt_s + if + local.get $1 + local.get $15 + call $~lib/typedarray/Int16Array#__get + i32.const 7616 + local.get $2 + i32.const 1 + i32.sub + local.get $15 + i32.sub + call $~lib/array/Array#__get + i32.extend16_s + i32.ne + br_if $folding-inner31 + local.get $15 + i32.const 1 + i32.add + local.set $15 + br $for-loop|1128 + end + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.const 8 + call $~lib/typedarray/Int16Array#subarray + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=12 + local.get $0 + call $~lib/typedarray/Int16Array#reverse + local.tee $0 + i32.store offset=16 + local.get $0 + i32.const 0 + call $~lib/typedarray/Int16Array#__get + i32.const 8 + i32.ne + br_if $folding-inner32 + local.get $0 + i32.const 1 + call $~lib/typedarray/Int16Array#__get + i32.const 7 + i32.ne + br_if $folding-inner33 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int16Array#__get + i32.const 6 + i32.ne + br_if $folding-inner34 + local.get $0 + i32.const 3 + call $~lib/typedarray/Int16Array#__get + i32.const 5 + i32.ne + br_if $folding-inner35 + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner21 + global.get $~lib/memory/__stack_pointer + local.tee $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 7616 i32.store @@ -57678,109 +55627,108 @@ i32.const 7628 i32.load local.tee $2 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $1 i32.store offset=4 global.get $~lib/memory/__stack_pointer local.get $2 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 i32.store offset=8 - loop $for-loop|0122 + i32.const 0 + local.set $15 + loop $for-loop|021129 local.get $2 - local.get $5 + local.get $15 i32.gt_s if local.get $1 - local.get $5 + local.get $15 i32.const 7616 - local.get $5 + local.get $15 call $~lib/array/Array#__get - i32.extend8_s - call $~lib/typedarray/Int8Array#__set + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set local.get $0 - local.get $5 + local.get $15 i32.const 7616 - local.get $5 + local.get $15 call $~lib/array/Array#__get - i32.extend8_s - call $~lib/typedarray/Int8Array#__set - local.get $5 + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $15 i32.const 1 i32.add - local.set $5 - br $for-loop|0122 + local.set $15 + br $for-loop|021129 end end local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/util/bytes/REVERSE + call $~lib/typedarray/Int16Array#reverse + drop i32.const 0 - local.set $5 - loop $for-loop|1 + local.set $15 + loop $for-loop|124 local.get $2 - local.get $5 + local.get $15 i32.gt_s if local.get $1 - local.get $5 - call $~lib/typedarray/Int8Array#__get + local.get $15 + call $~lib/typedarray/Uint16Array#__get i32.const 7616 local.get $2 i32.const 1 i32.sub - local.get $5 + local.get $15 i32.sub call $~lib/array/Array#__get - i32.extend8_s + i32.const 65535 + i32.and i32.ne br_if $folding-inner31 - local.get $5 + local.get $15 i32.const 1 i32.add - local.set $5 - br $for-loop|1 + local.set $15 + br $for-loop|124 end end global.get $~lib/memory/__stack_pointer local.get $0 - i32.const 4 i32.const 8 - call $~lib/typedarray/Int8Array#subarray + call $~lib/typedarray/Uint16Array#subarray local.set $0 global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=12 local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - call $~lib/util/bytes/REVERSE - local.get $0 + call $~lib/typedarray/Int16Array#reverse + local.tee $0 i32.store offset=16 local.get $0 i32.const 0 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 8 i32.ne br_if $folding-inner32 local.get $0 i32.const 1 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 7 i32.ne br_if $folding-inner33 local.get $0 i32.const 2 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 6 i32.ne br_if $folding-inner34 local.get $0 i32.const 3 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 5 i32.ne br_if $folding-inner35 @@ -57788,8 +55736,6 @@ i32.const 20 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $5 global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -57800,126 +55746,220 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 7616 i32.store local.get $0 i32.const 7628 i32.load - local.tee $2 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $11 + call $~lib/typedarray/Int32Array#constructor + local.tee $9 i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $2 - call $~lib/typedarray/Uint8Array#constructor - local.tee $0 + local.get $11 + call $~lib/typedarray/Int32Array#constructor + local.tee $7 i32.store offset=8 - loop $for-loop|0123 - local.get $2 - local.get $5 + i32.const 0 + local.set $15 + loop $for-loop|02941 + local.get $11 + local.get $15 i32.gt_s if - local.get $1 - local.get $5 + local.get $9 + local.get $15 i32.const 7616 - local.get $5 + local.get $15 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 - local.get $5 + call $~lib/typedarray/Int32Array#__set + local.get $7 + local.get $15 i32.const 7616 - local.get $5 + local.get $15 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $5 + call $~lib/typedarray/Int32Array#__set + local.get $15 i32.const 1 i32.add - local.set $5 - br $for-loop|0123 + local.set $15 + br $for-loop|02941 end end - local.get $1 + i32.const 0 + local.set $0 + local.get $9 i32.load offset=4 - local.get $1 + local.set $5 + local.get $9 i32.load offset=8 - call $~lib/util/bytes/REVERSE + i32.const 2 + i32.shr_u + local.tee $1 + i32.const 1 + i32.gt_u + if + local.get $1 + i32.const 1 + i32.shr_u + local.set $4 + local.get $1 + i32.const 1 + i32.sub + local.set $3 + loop $while-continue|0 + local.get $0 + local.get $4 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + local.get $5 + i32.add + local.tee $1 + i32.load + local.set $2 + local.get $1 + local.get $3 + local.get $0 + i32.sub + i32.const 2 + i32.shl + local.get $5 + i32.add + local.tee $1 + i32.load + i32.store + local.get $1 + local.get $2 + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|0 + end + end + end i32.const 0 - local.set $5 - loop $for-loop|1124 - local.get $2 - local.get $5 + local.set $15 + loop $for-loop|132 + local.get $11 + local.get $15 i32.gt_s if - local.get $1 - local.get $5 - call $~lib/typedarray/Uint8Array#__get + local.get $9 + local.get $15 + call $~lib/typedarray/Int32Array#__get i32.const 7616 - local.get $2 + local.get $11 i32.const 1 i32.sub - local.get $5 + local.get $15 i32.sub call $~lib/array/Array#__get - i32.const 255 - i32.and i32.ne br_if $folding-inner31 - local.get $5 + local.get $15 i32.const 1 i32.add - local.set $5 - br $for-loop|1124 + local.set $15 + br $for-loop|132 end end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $7 + i32.const 4 i32.const 8 - call $~lib/typedarray/Uint8Array#subarray - local.set $0 + call $~lib/typedarray/Int32Array#subarray + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $7 i32.store offset=12 - local.get $0 + i32.const 0 + local.set $1 + local.get $7 i32.load offset=4 - local.get $0 + local.set $5 + local.get $7 i32.load offset=8 - call $~lib/util/bytes/REVERSE - local.get $0 + i32.const 2 + i32.shr_u + local.tee $0 + i32.const 1 + i32.gt_u + if + local.get $0 + i32.const 1 + i32.shr_u + local.set $4 + local.get $0 + i32.const 1 + i32.sub + local.set $3 + loop $while-continue|0131 + local.get $1 + local.get $4 + i32.lt_u + if + local.get $1 + i32.const 2 + i32.shl + local.get $5 + i32.add + local.tee $0 + i32.load + local.set $2 + local.get $0 + local.get $3 + local.get $1 + i32.sub + i32.const 2 + i32.shl + local.get $5 + i32.add + local.tee $0 + i32.load + i32.store + local.get $0 + local.get $2 + i32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0131 + end + end + end + local.get $7 i32.store offset=16 - local.get $0 + local.get $7 i32.const 0 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 8 i32.ne br_if $folding-inner32 - local.get $0 + local.get $7 i32.const 1 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 7 i32.ne br_if $folding-inner33 - local.get $0 + local.get $7 i32.const 2 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 6 i32.ne br_if $folding-inner34 - local.get $0 + local.get $7 i32.const 3 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 5 i32.ne br_if $folding-inner35 @@ -57927,8 +55967,6 @@ i32.const 20 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $5 global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -57939,126 +55977,219 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 7616 i32.store local.get $0 i32.const 7628 i32.load - local.tee $2 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 + local.tee $11 + call $~lib/typedarray/Uint32Array#constructor + local.tee $9 i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $2 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $0 + local.get $11 + call $~lib/typedarray/Uint32Array#constructor + local.tee $7 i32.store offset=8 - loop $for-loop|0125 - local.get $2 - local.get $5 + i32.const 0 + local.set $15 + loop $for-loop|037175 + local.get $11 + local.get $15 i32.gt_s if - local.get $1 - local.get $5 + local.get $9 + local.get $15 i32.const 7616 - local.get $5 + local.get $15 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - local.get $5 + call $~lib/typedarray/Uint32Array#__set + local.get $7 + local.get $15 i32.const 7616 - local.get $5 + local.get $15 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $5 + call $~lib/typedarray/Uint32Array#__set + local.get $15 i32.const 1 i32.add - local.set $5 - br $for-loop|0125 + local.set $15 + br $for-loop|037175 end end - local.get $1 + i32.const 0 + local.set $0 + local.get $9 i32.load offset=4 - local.get $1 + local.set $5 + local.get $9 i32.load offset=8 - call $~lib/util/bytes/REVERSE + i32.const 2 + i32.shr_u + local.tee $1 + i32.const 1 + i32.gt_u + if + local.get $1 + i32.const 1 + i32.shr_u + local.set $4 + local.get $1 + i32.const 1 + i32.sub + local.set $3 + loop $while-continue|0133 + local.get $0 + local.get $4 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + local.get $5 + i32.add + local.tee $1 + i32.load + local.set $2 + local.get $1 + local.get $3 + local.get $0 + i32.sub + i32.const 2 + i32.shl + local.get $5 + i32.add + local.tee $1 + i32.load + i32.store + local.get $1 + local.get $2 + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|0133 + end + end + end i32.const 0 - local.set $5 - loop $for-loop|1126 - local.get $2 - local.get $5 + local.set $15 + loop $for-loop|140 + local.get $11 + local.get $15 i32.gt_s if - local.get $1 - local.get $5 - call $~lib/typedarray/Uint8ClampedArray#__get + local.get $9 + local.get $15 + call $~lib/typedarray/Uint32Array#__get i32.const 7616 - local.get $2 + local.get $11 i32.const 1 i32.sub - local.get $5 + local.get $15 i32.sub call $~lib/array/Array#__get - i32.const 255 - i32.and i32.ne br_if $folding-inner31 - local.get $5 + local.get $15 i32.const 1 i32.add - local.set $5 - br $for-loop|1126 + local.set $15 + br $for-loop|140 end end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $7 i32.const 8 - call $~lib/typedarray/Uint8ClampedArray#subarray - local.set $0 + call $~lib/typedarray/Uint32Array#subarray + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $7 i32.store offset=12 - local.get $0 + i32.const 0 + local.set $1 + local.get $7 i32.load offset=4 - local.get $0 + local.set $5 + local.get $7 i32.load offset=8 - call $~lib/util/bytes/REVERSE - local.get $0 + i32.const 2 + i32.shr_u + local.tee $0 + i32.const 1 + i32.gt_u + if + local.get $0 + i32.const 1 + i32.shr_u + local.set $4 + local.get $0 + i32.const 1 + i32.sub + local.set $3 + loop $while-continue|0135 + local.get $1 + local.get $4 + i32.lt_u + if + local.get $1 + i32.const 2 + i32.shl + local.get $5 + i32.add + local.tee $0 + i32.load + local.set $2 + local.get $0 + local.get $3 + local.get $1 + i32.sub + i32.const 2 + i32.shl + local.get $5 + i32.add + local.tee $0 + i32.load + i32.store + local.get $0 + local.get $2 + i32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0135 + end + end + end + local.get $7 i32.store offset=16 - local.get $0 + local.get $7 i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 8 i32.ne br_if $folding-inner32 - local.get $0 + local.get $7 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 7 i32.ne br_if $folding-inner33 - local.get $0 + local.get $7 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 6 i32.ne br_if $folding-inner34 - local.get $0 + local.get $7 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 5 i32.ne br_if $folding-inner35 @@ -58066,8 +56197,6 @@ i32.const 20 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $5 global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -58077,128 +56206,230 @@ i32.lt_s br_if $folding-inner21 global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 + local.tee $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 7616 i32.store local.get $0 i32.const 7628 i32.load - local.tee $2 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 + local.tee $9 + call $~lib/typedarray/Int64Array#constructor + local.tee $7 i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $2 - call $~lib/typedarray/Int16Array#constructor - local.tee $0 + local.get $9 + call $~lib/typedarray/Int64Array#constructor + local.tee $5 i32.store offset=8 - loop $for-loop|0127 - local.get $2 - local.get $5 + i32.const 0 + local.set $15 + loop $for-loop|045136 + local.get $9 + local.get $15 i32.gt_s if - local.get $1 - local.get $5 + local.get $7 + local.get $15 i32.const 7616 - local.get $5 + local.get $15 call $~lib/array/Array#__get - i32.extend16_s - call $~lib/typedarray/Int16Array#__set - local.get $0 + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $5 + local.get $15 i32.const 7616 - local.get $5 + local.get $15 call $~lib/array/Array#__get - i32.extend16_s - call $~lib/typedarray/Int16Array#__set - local.get $5 + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $15 i32.const 1 i32.add - local.set $5 - br $for-loop|0127 + local.set $15 + br $for-loop|045136 end end - local.get $1 - call $~lib/typedarray/Int16Array#reverse - drop i32.const 0 - local.set $5 - loop $for-loop|1128 - local.get $2 - local.get $5 + local.set $0 + local.get $7 + i32.load offset=4 + local.set $4 + local.get $7 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $1 + i32.const 1 + i32.gt_u + if + local.get $1 + i32.const 1 + i32.shr_u + local.set $3 + local.get $1 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|0137 + local.get $0 + local.get $3 + i32.lt_u + if + local.get $0 + i32.const 3 + i32.shl + local.get $4 + i32.add + local.tee $1 + i64.load + local.set $10 + local.get $1 + local.get $2 + local.get $0 + i32.sub + i32.const 3 + i32.shl + local.get $4 + i32.add + local.tee $1 + i64.load + i64.store + local.get $1 + local.get $10 + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|0137 + end + end + end + i32.const 0 + local.set $15 + loop $for-loop|148 + local.get $9 + local.get $15 i32.gt_s if - local.get $1 - local.get $5 - call $~lib/typedarray/Int16Array#__get + local.get $7 + local.get $15 + call $~lib/typedarray/Int64Array#__get i32.const 7616 - local.get $2 + local.get $9 i32.const 1 i32.sub - local.get $5 + local.get $15 i32.sub call $~lib/array/Array#__get - i32.extend16_s - i32.ne + i64.extend_i32_s + i64.ne br_if $folding-inner31 - local.get $5 + local.get $15 i32.const 1 i32.add - local.set $5 - br $for-loop|1128 + local.set $15 + br $for-loop|148 end end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $5 i32.const 8 - call $~lib/typedarray/Int16Array#subarray - local.set $0 + call $~lib/typedarray/Int64Array#subarray + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $5 i32.store offset=12 - local.get $0 - call $~lib/typedarray/Int16Array#reverse + i32.const 0 + local.set $1 + local.get $5 + i32.load offset=4 + local.set $4 + local.get $5 + i32.load offset=8 + i32.const 3 + i32.shr_u local.tee $0 + i32.const 1 + i32.gt_u + if + local.get $0 + i32.const 1 + i32.shr_u + local.set $3 + local.get $0 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|0139 + local.get $1 + local.get $3 + i32.lt_u + if + local.get $1 + i32.const 3 + i32.shl + local.get $4 + i32.add + local.tee $0 + i64.load + local.set $10 + local.get $0 + local.get $2 + local.get $1 + i32.sub + i32.const 3 + i32.shl + local.get $4 + i32.add + local.tee $0 + i64.load + i64.store + local.get $0 + local.get $10 + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0139 + end + end + end + local.get $5 i32.store offset=16 - local.get $0 + local.get $5 i32.const 0 - call $~lib/typedarray/Int16Array#__get - i32.const 8 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 8 + i64.ne br_if $folding-inner32 - local.get $0 + local.get $5 i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 7 + i64.ne br_if $folding-inner33 - local.get $0 + local.get $5 i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 6 + i64.ne br_if $folding-inner34 - local.get $0 + local.get $5 i32.const 3 - call $~lib/typedarray/Int16Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 5 + i64.ne br_if $folding-inner35 global.get $~lib/memory/__stack_pointer i32.const 20 i32.add global.set $~lib/memory/__stack_pointer - i32.const 0 - local.set $5 global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -58209,123 +56440,224 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 7616 i32.store local.get $0 i32.const 7628 i32.load - local.tee $2 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 + local.tee $9 + call $~lib/typedarray/Uint64Array#constructor + local.tee $7 i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $2 - call $~lib/typedarray/Uint16Array#constructor - local.tee $0 + local.get $9 + call $~lib/typedarray/Uint64Array#constructor + local.tee $5 i32.store offset=8 - loop $for-loop|0129 - local.get $2 - local.get $5 + i32.const 0 + local.set $15 + loop $for-loop|053140 + local.get $9 + local.get $15 i32.gt_s if - local.get $1 - local.get $5 + local.get $7 + local.get $15 i32.const 7616 - local.get $5 + local.get $15 call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - local.get $0 + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set local.get $5 + local.get $15 i32.const 7616 - local.get $5 + local.get $15 call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - local.get $5 + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $15 i32.const 1 i32.add - local.set $5 - br $for-loop|0129 + local.set $15 + br $for-loop|053140 end end - local.get $1 - call $~lib/typedarray/Int16Array#reverse - drop i32.const 0 - local.set $5 - loop $for-loop|1130 - local.get $2 - local.get $5 + local.set $0 + local.get $7 + i32.load offset=4 + local.set $4 + local.get $7 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $1 + i32.const 1 + i32.gt_u + if + local.get $1 + i32.const 1 + i32.shr_u + local.set $3 + local.get $1 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|0142 + local.get $0 + local.get $3 + i32.lt_u + if + local.get $0 + i32.const 3 + i32.shl + local.get $4 + i32.add + local.tee $1 + i64.load + local.set $10 + local.get $1 + local.get $2 + local.get $0 + i32.sub + i32.const 3 + i32.shl + local.get $4 + i32.add + local.tee $1 + i64.load + i64.store + local.get $1 + local.get $10 + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|0142 + end + end + end + i32.const 0 + local.set $15 + loop $for-loop|156 + local.get $9 + local.get $15 i32.gt_s if - local.get $1 - local.get $5 - call $~lib/typedarray/Uint16Array#__get + local.get $7 + local.get $15 + call $~lib/typedarray/Uint64Array#__get i32.const 7616 - local.get $2 + local.get $9 i32.const 1 i32.sub - local.get $5 + local.get $15 i32.sub call $~lib/array/Array#__get - i32.const 65535 - i32.and - i32.ne + i64.extend_i32_s + i64.ne br_if $folding-inner31 - local.get $5 + local.get $15 i32.const 1 i32.add - local.set $5 - br $for-loop|1130 + local.set $15 + br $for-loop|156 end end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $5 i32.const 8 - call $~lib/typedarray/Uint16Array#subarray - local.set $0 + call $~lib/typedarray/Uint64Array#subarray + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $5 i32.store offset=12 - local.get $0 - call $~lib/typedarray/Int16Array#reverse + i32.const 0 + local.set $1 + local.get $5 + i32.load offset=4 + local.set $4 + local.get $5 + i32.load offset=8 + i32.const 3 + i32.shr_u local.tee $0 + i32.const 1 + i32.gt_u + if + local.get $0 + i32.const 1 + i32.shr_u + local.set $3 + local.get $0 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|0144 + local.get $1 + local.get $3 + i32.lt_u + if + local.get $1 + i32.const 3 + i32.shl + local.get $4 + i32.add + local.tee $0 + i64.load + local.set $10 + local.get $0 + local.get $2 + local.get $1 + i32.sub + i32.const 3 + i32.shl + local.get $4 + i32.add + local.tee $0 + i64.load + i64.store + local.get $0 + local.get $10 + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0144 + end + end + end + local.get $5 i32.store offset=16 - local.get $0 + local.get $5 i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 8 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 8 + i64.ne br_if $folding-inner32 - local.get $0 + local.get $5 i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 7 + i64.ne br_if $folding-inner33 - local.get $0 + local.get $5 i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 6 + i64.ne br_if $folding-inner34 - local.get $0 + local.get $5 i32.const 3 - call $~lib/typedarray/Uint16Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 5 + i64.ne br_if $folding-inner35 global.get $~lib/memory/__stack_pointer i32.const 20 @@ -58341,152 +56673,149 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 7616 i32.store local.get $0 i32.const 7628 i32.load - local.tee $10 - call $~lib/typedarray/Int32Array#constructor local.tee $9 + call $~lib/typedarray/Float32Array#constructor + local.tee $7 i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $10 - call $~lib/typedarray/Int32Array#constructor - local.tee $7 + local.get $9 + call $~lib/typedarray/Float32Array#constructor + local.tee $5 i32.store offset=8 i32.const 0 local.set $15 - loop $for-loop|0171 - local.get $10 + loop $for-loop|061 + local.get $9 local.get $15 i32.gt_s if - local.get $9 + local.get $7 local.get $15 i32.const 7616 local.get $15 call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $7 + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $5 local.get $15 i32.const 7616 local.get $15 call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set local.get $15 i32.const 1 i32.add local.set $15 - br $for-loop|0171 + br $for-loop|061 end end i32.const 0 - local.set $1 - local.get $9 + local.set $0 + local.get $7 i32.load offset=4 - local.set $5 - local.get $9 + local.set $4 + local.get $7 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $0 + local.tee $1 i32.const 1 i32.gt_u if - local.get $0 + local.get $1 i32.const 1 i32.shr_u - local.set $4 - local.get $0 + local.set $3 + local.get $1 i32.const 1 i32.sub - local.set $3 - loop $while-continue|0 - local.get $1 - local.get $4 + local.set $2 + loop $while-continue|0145 + local.get $0 + local.get $3 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl - local.get $5 + local.get $4 i32.add - local.tee $0 - i32.load - local.set $2 - local.get $0 - local.get $3 + local.tee $1 + f32.load + local.set $6 local.get $1 + local.get $2 + local.get $0 i32.sub i32.const 2 i32.shl - local.get $5 + local.get $4 i32.add - local.tee $0 - i32.load - i32.store - local.get $0 - local.get $2 - i32.store + local.tee $1 + f32.load + f32.store local.get $1 + local.get $6 + f32.store + local.get $0 i32.const 1 i32.add - local.set $1 - br $while-continue|0 + local.set $0 + br $while-continue|0145 end end end i32.const 0 local.set $15 - loop $for-loop|1131 - local.get $10 + loop $for-loop|164 + local.get $9 local.get $15 i32.gt_s if - local.get $9 + local.get $7 local.get $15 - call $~lib/typedarray/Int32Array#__get + call $~lib/typedarray/Float32Array#__get i32.const 7616 - local.get $10 + local.get $9 i32.const 1 i32.sub local.get $15 i32.sub call $~lib/array/Array#__get - i32.ne + f32.convert_i32_s + f32.ne br_if $folding-inner31 local.get $15 i32.const 1 i32.add local.set $15 - br $for-loop|1131 + br $for-loop|164 end end global.get $~lib/memory/__stack_pointer - local.get $7 - i32.const 4 + local.get $5 i32.const 8 - call $~lib/typedarray/Int32Array#subarray - local.set $7 + call $~lib/typedarray/Float32Array#subarray + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $5 i32.store offset=12 i32.const 0 local.set $1 - local.get $7 + local.get $5 i32.load offset=4 - local.set $5 - local.get $7 + local.set $4 + local.get $5 i32.load offset=8 i32.const 2 i32.shr_u @@ -58497,71 +56826,71 @@ local.get $0 i32.const 1 i32.shr_u - local.set $4 + local.set $3 local.get $0 i32.const 1 i32.sub - local.set $3 - loop $while-continue|0133 + local.set $2 + loop $while-continue|0147 local.get $1 - local.get $4 + local.get $3 i32.lt_u if local.get $1 i32.const 2 i32.shl - local.get $5 + local.get $4 i32.add local.tee $0 - i32.load - local.set $2 + f32.load + local.set $6 local.get $0 - local.get $3 + local.get $2 local.get $1 i32.sub i32.const 2 i32.shl - local.get $5 + local.get $4 i32.add local.tee $0 - i32.load - i32.store + f32.load + f32.store local.get $0 - local.get $2 - i32.store + local.get $6 + f32.store local.get $1 i32.const 1 i32.add local.set $1 - br $while-continue|0133 + br $while-continue|0147 end end end - local.get $7 + local.get $5 i32.store offset=16 - local.get $7 + local.get $5 i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 8 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 8 + f32.ne br_if $folding-inner32 - local.get $7 + local.get $5 i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 7 + f32.ne br_if $folding-inner33 - local.get $7 + local.get $5 i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 6 + f32.ne br_if $folding-inner34 - local.get $7 + local.get $5 i32.const 3 - call $~lib/typedarray/Int32Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 5 + f32.ne br_if $folding-inner35 global.get $~lib/memory/__stack_pointer i32.const 20 @@ -58577,153 +56906,152 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 7616 i32.store local.get $0 i32.const 7628 i32.load - local.tee $10 - call $~lib/typedarray/Uint32Array#constructor local.tee $9 + call $~lib/typedarray/Float64Array#constructor + local.tee $7 i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $10 - call $~lib/typedarray/Uint32Array#constructor - local.tee $7 + local.get $9 + call $~lib/typedarray/Float64Array#constructor + local.tee $5 i32.store offset=8 i32.const 0 local.set $15 - loop $for-loop|021134 - local.get $10 + loop $for-loop|069148 + local.get $9 local.get $15 i32.gt_s if - local.get $9 + local.get $7 local.get $15 i32.const 7616 local.get $15 call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $7 + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $5 local.get $15 i32.const 7616 local.get $15 call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set local.get $15 i32.const 1 i32.add local.set $15 - br $for-loop|021134 + br $for-loop|069148 end end i32.const 0 - local.set $1 - local.get $9 + local.set $0 + local.get $7 i32.load offset=4 - local.set $5 - local.get $9 + local.set $4 + local.get $7 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u - local.tee $0 + local.tee $1 i32.const 1 i32.gt_u if - local.get $0 + local.get $1 i32.const 1 i32.shr_u - local.set $4 - local.get $0 + local.set $3 + local.get $1 i32.const 1 i32.sub - local.set $3 - loop $while-continue|0136 - local.get $1 - local.get $4 + local.set $2 + loop $while-continue|0149 + local.get $0 + local.get $3 i32.lt_u if - local.get $1 - i32.const 2 + local.get $0 + i32.const 3 i32.shl - local.get $5 + local.get $4 i32.add - local.tee $0 - i32.load - local.set $2 - local.get $0 - local.get $3 + local.tee $1 + f64.load + local.set $8 local.get $1 + local.get $2 + local.get $0 i32.sub - i32.const 2 + i32.const 3 i32.shl - local.get $5 + local.get $4 i32.add - local.tee $0 - i32.load - i32.store - local.get $0 - local.get $2 - i32.store + local.tee $1 + f64.load + f64.store local.get $1 + local.get $8 + f64.store + local.get $0 i32.const 1 i32.add - local.set $1 - br $while-continue|0136 + local.set $0 + br $while-continue|0149 end end end i32.const 0 local.set $15 - loop $for-loop|124 - local.get $10 + loop $for-loop|172 + local.get $9 local.get $15 i32.gt_s if - local.get $9 + local.get $7 local.get $15 - call $~lib/typedarray/Uint32Array#__get + call $~lib/typedarray/Float64Array#__get i32.const 7616 - local.get $10 + local.get $9 i32.const 1 i32.sub local.get $15 i32.sub call $~lib/array/Array#__get - i32.ne + f64.convert_i32_s + f64.ne br_if $folding-inner31 local.get $15 i32.const 1 i32.add local.set $15 - br $for-loop|124 + br $for-loop|172 end end global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $5 + i32.const 4 i32.const 8 - call $~lib/typedarray/Uint32Array#subarray - local.set $7 + call $~lib/typedarray/Float64Array#subarray + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $5 i32.store offset=12 i32.const 0 local.set $1 - local.get $7 + local.get $5 i32.load offset=4 - local.set $5 - local.get $7 + local.set $4 + local.get $5 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u local.tee $0 i32.const 1 @@ -58732,80 +57060,76 @@ local.get $0 i32.const 1 i32.shr_u - local.set $4 + local.set $3 local.get $0 i32.const 1 i32.sub - local.set $3 - loop $while-continue|0138 + local.set $2 + loop $while-continue|0151 local.get $1 - local.get $4 + local.get $3 i32.lt_u if local.get $1 - i32.const 2 + i32.const 3 i32.shl - local.get $5 + local.get $4 i32.add local.tee $0 - i32.load - local.set $2 + f64.load + local.set $8 local.get $0 - local.get $3 + local.get $2 local.get $1 i32.sub - i32.const 2 + i32.const 3 i32.shl - local.get $5 + local.get $4 i32.add local.tee $0 - i32.load - i32.store + f64.load + f64.store local.get $0 - local.get $2 - i32.store + local.get $8 + f64.store local.get $1 i32.const 1 i32.add local.set $1 - br $while-continue|0138 + br $while-continue|0151 end end end - local.get $7 + local.get $5 i32.store offset=16 - local.get $7 + local.get $5 i32.const 0 - call $~lib/typedarray/Uint32Array#__get - i32.const 8 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 8 + f64.ne br_if $folding-inner32 - local.get $7 + local.get $5 i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 7 + f64.ne br_if $folding-inner33 - local.get $7 + local.get $5 i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 6 + f64.ne br_if $folding-inner34 - local.get $7 + local.get $5 i32.const 3 - call $~lib/typedarray/Uint32Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.ne br_if $folding-inner35 global.get $~lib/memory/__stack_pointer i32.const 20 i32.add global.set $~lib/memory/__stack_pointer - call $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> @@ -58844,7 +57168,7 @@ local.get $4 i32.load offset=4 local.set $2 - loop $while-continue|0139 + loop $while-continue|0152 local.get $0 local.get $3 i32.lt_s @@ -58863,7 +57187,7 @@ i32.const 1 i32.add local.set $0 - br $while-continue|0139 + br $while-continue|0152 end end i32.const -1 @@ -58898,7 +57222,7 @@ local.get $4 i32.load offset=4 local.set $0 - loop $while-continue|0140 + loop $while-continue|0153 local.get $1 local.get $15 i32.gt_s @@ -58923,7 +57247,7 @@ i32.const 1 i32.add local.set $15 - br $while-continue|0140 + br $while-continue|0153 end end i32.const 0 @@ -58964,7 +57288,7 @@ local.get $4 i32.load offset=4 local.set $2 - loop $while-continue|0141 + loop $while-continue|0154 local.get $0 local.get $3 i32.lt_s @@ -58983,7 +57307,7 @@ i32.const 1 i32.add local.set $0 - br $while-continue|0141 + br $while-continue|0154 end end i32.const -1 @@ -59018,7 +57342,7 @@ local.get $4 i32.load offset=4 local.set $0 - loop $while-continue|029 + loop $while-continue|077 local.get $1 local.get $2 i32.lt_s @@ -59043,7 +57367,7 @@ i32.const 1 i32.add local.set $1 - br $while-continue|029 + br $while-continue|077 end end i32.const 0 @@ -60111,14 +58435,9 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 10928 i32.store @@ -60131,7 +58450,7 @@ i32.store offset=4 i32.const 0 local.set $15 - loop $for-loop|035142 + loop $for-loop|083 local.get $5 local.get $15 i32.gt_s @@ -60147,7 +58466,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|035142 + br $for-loop|083 end end global.get $~lib/memory/__stack_pointer @@ -60220,273 +58539,24 @@ i32.store offset=16 i32.const 0 local.set $15 - loop $for-loop|139 - local.get $5 - local.get $15 - i32.gt_s - if - local.get $4 - local.get $15 - call $~lib/typedarray/Int8Array#__get - local.get $0 - local.get $15 - call $~lib/typedarray/Int8Array#__get - i32.ne - br_if $folding-inner19 - local.get $15 - i32.const 1 - i32.add - local.set $15 - br $for-loop|139 - end - end - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - br_if $folding-inner21 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 10928 - i32.store - local.get $0 - i32.const 10940 - i32.load - local.tee $3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $2 - i32.store offset=4 - i32.const 0 - local.set $15 - loop $for-loop|044 - local.get $3 - local.get $15 - i32.gt_s - if - local.get $2 - local.get $15 - i32.const 10928 - local.get $15 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $15 - i32.const 1 - i32.add - local.set $15 - br $for-loop|044 - end - end - global.get $~lib/memory/__stack_pointer - local.tee $1 - local.get $2 - i32.load - local.tee $0 - i32.store offset=8 - local.get $1 - local.get $0 - local.get $2 - i32.load offset=4 - local.get $2 - i32.load - i32.sub - local.tee $0 - local.get $0 - local.get $2 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.tee $0 - i32.store offset=12 - i32.const 1 - global.set $~argumentsLength - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.const 0 - call $~lib/typedarray/Uint8Array.wrap@varargs - local.tee $0 - i32.store offset=16 - i32.const 0 - local.set $15 - loop $for-loop|149 - local.get $3 - local.get $15 - i32.gt_s - if - local.get $2 - local.get $15 - call $~lib/typedarray/Uint8Array#__get - local.get $0 - local.get $15 - call $~lib/typedarray/Uint8Array#__get - i32.ne - br_if $folding-inner19 - local.get $15 - i32.const 1 - i32.add - local.set $15 - br $for-loop|149 - end - end - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - br_if $folding-inner21 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 10928 - i32.store - local.get $0 - i32.const 10940 - i32.load - local.tee $5 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $4 - i32.store offset=4 - i32.const 0 - local.set $15 - loop $for-loop|054 - local.get $5 - local.get $15 - i32.gt_s - if - local.get $4 - local.get $15 - i32.const 10928 - local.get $15 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $15 - i32.const 1 - i32.add - local.set $15 - br $for-loop|054 - end - end - global.get $~lib/memory/__stack_pointer - local.tee $1 - local.get $4 - i32.load - local.tee $0 - i32.store offset=8 - local.get $1 - local.get $0 - local.get $4 - i32.load offset=4 - local.get $4 - i32.load - i32.sub - local.tee $0 - local.get $0 - local.get $4 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.tee $3 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 1 - global.set $~argumentsLength - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 16628 - i32.lt_s - br_if $folding-inner21 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.load offset=16 - local.set $1 - local.get $0 - i32.const 12 - i32.const 5 - call $~lib/rt/itcms/__new - local.tee $0 - i32.store - local.get $0 - local.get $3 - i32.store - local.get $3 - if - local.get $0 - local.get $3 - call $byn-split-outlined-A$~lib/rt/itcms/__link - end - local.get $0 - local.get $1 - i32.store offset=8 - local.get $0 - local.get $3 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $0 - i32.store offset=16 - i32.const 0 - local.set $15 - loop $for-loop|159 + loop $for-loop|187 local.get $5 local.get $15 i32.gt_s if local.get $4 local.get $15 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Int8Array#__get local.get $0 local.get $15 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Int8Array#__get i32.ne br_if $folding-inner19 local.get $15 i32.const 1 i32.add local.set $15 - br $for-loop|159 + br $for-loop|187 end end global.get $~lib/memory/__stack_pointer @@ -60503,14 +58573,248 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store + i32.const 0 + i32.const 20 + memory.fill local.get $0 - i64.const 0 - i64.store offset=8 + i32.const 10928 + i32.store + local.get $0 + i32.const 10940 + i32.load + local.tee $3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $2 + i32.store offset=4 + i32.const 0 + local.set $15 + loop $for-loop|092155 + local.get $3 + local.get $15 + i32.gt_s + if + local.get $2 + local.get $15 + i32.const 10928 + local.get $15 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $15 + i32.const 1 + i32.add + local.set $15 + br $for-loop|092155 + end + end + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $2 + i32.load + local.tee $0 + i32.store offset=8 + local.get $1 + local.get $0 + local.get $2 + i32.load offset=4 + local.get $2 + i32.load + i32.sub + local.tee $0 + local.get $0 + local.get $2 + i32.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.tee $0 + i32.store offset=12 + i32.const 1 + global.set $~argumentsLength + global.get $~lib/memory/__stack_pointer local.get $0 i32.const 0 + call $~lib/typedarray/Uint8Array.wrap@varargs + local.tee $0 + i32.store offset=16 + i32.const 0 + local.set $15 + loop $for-loop|197 + local.get $3 + local.get $15 + i32.gt_s + if + local.get $2 + local.get $15 + call $~lib/typedarray/Uint8Array#__get + local.get $0 + local.get $15 + call $~lib/typedarray/Uint8Array#__get + i32.ne + br_if $folding-inner19 + local.get $15 + i32.const 1 + i32.add + local.set $15 + br $for-loop|197 + end + end + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner21 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.const 20 + memory.fill + local.get $0 + i32.const 10928 + i32.store + local.get $0 + i32.const 10940 + i32.load + local.tee $5 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $4 + i32.store offset=4 + i32.const 0 + local.set $15 + loop $for-loop|0102156 + local.get $5 + local.get $15 + i32.gt_s + if + local.get $4 + local.get $15 + i32.const 10928 + local.get $15 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $15 + i32.const 1 + i32.add + local.set $15 + br $for-loop|0102156 + end + end + global.get $~lib/memory/__stack_pointer + local.tee $1 + local.get $4 + i32.load + local.tee $0 + i32.store offset=8 + local.get $1 + local.get $0 + local.get $4 + i32.load offset=4 + local.get $4 + i32.load + i32.sub + local.tee $0 + local.get $0 + local.get $4 + i32.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.tee $3 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + i32.const 1 + global.set $~argumentsLength + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner21 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.store + local.get $3 + i32.const 20 + i32.sub + i32.load offset=16 + local.set $1 + local.get $0 + i32.const 12 + i32.const 5 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + local.get $0 + local.get $3 + i32.store + local.get $3 + if + local.get $0 + local.get $3 + call $byn-split-outlined-A$~lib/rt/itcms/__link + end + local.get $0 + local.get $1 + i32.store offset=8 + local.get $0 + local.get $3 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 i32.store offset=16 + i32.const 0 + local.set $15 + loop $for-loop|1107 + local.get $5 + local.get $15 + i32.gt_s + if + local.get $4 + local.get $15 + call $~lib/typedarray/Uint8ClampedArray#__get + local.get $0 + local.get $15 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.ne + br_if $folding-inner19 + local.get $15 + i32.const 1 + i32.add + local.set $15 + br $for-loop|1107 + end + end + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 16628 + i32.lt_s + br_if $folding-inner21 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.const 20 + memory.fill local.get $0 i32.const 10928 i32.store @@ -60523,7 +58827,7 @@ i32.store offset=4 i32.const 0 local.set $15 - loop $for-loop|064200 + loop $for-loop|0112158 local.get $5 local.get $15 i32.gt_s @@ -60539,7 +58843,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|064200 + br $for-loop|0112158 end end global.get $~lib/memory/__stack_pointer @@ -60614,7 +58918,7 @@ i32.store offset=16 i32.const 0 local.set $15 - loop $for-loop|169 + loop $for-loop|1117 local.get $5 local.get $15 i32.gt_s @@ -60631,7 +58935,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|169 + br $for-loop|1117 end end global.get $~lib/memory/__stack_pointer @@ -60648,14 +58952,9 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 10928 i32.store @@ -60668,7 +58967,7 @@ i32.store offset=4 i32.const 0 local.set $15 - loop $for-loop|074 + loop $for-loop|0122 local.get $5 local.get $15 i32.gt_s @@ -60685,7 +58984,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|074 + br $for-loop|0122 end end global.get $~lib/memory/__stack_pointer @@ -60760,7 +59059,7 @@ i32.store offset=16 i32.const 0 local.set $15 - loop $for-loop|179 + loop $for-loop|1127161 local.get $5 local.get $15 i32.gt_s @@ -60777,7 +59076,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|179 + br $for-loop|1127161 end end global.get $~lib/memory/__stack_pointer @@ -60794,14 +59093,9 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 10928 i32.store @@ -60814,7 +59108,7 @@ i32.store offset=4 i32.const 0 local.set $15 - loop $for-loop|084146 + loop $for-loop|0132 local.get $5 local.get $15 i32.gt_s @@ -60829,7 +59123,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|084146 + br $for-loop|0132 end end global.get $~lib/memory/__stack_pointer @@ -60904,7 +59198,7 @@ i32.store offset=16 i32.const 0 local.set $15 - loop $for-loop|189 + loop $for-loop|1137 local.get $5 local.get $15 i32.gt_s @@ -60921,7 +59215,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|189 + br $for-loop|1137 end end global.get $~lib/memory/__stack_pointer @@ -60938,14 +59232,9 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 10928 i32.store @@ -60958,7 +59247,7 @@ i32.store offset=4 i32.const 0 local.set $15 - loop $for-loop|094148 + loop $for-loop|0142 local.get $5 local.get $15 i32.gt_s @@ -60973,7 +59262,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|094148 + br $for-loop|0142 end end global.get $~lib/memory/__stack_pointer @@ -61048,7 +59337,7 @@ i32.store offset=16 i32.const 0 local.set $15 - loop $for-loop|199 + loop $for-loop|1147 local.get $5 local.get $15 i32.gt_s @@ -61065,7 +59354,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|199 + br $for-loop|1147 end end global.get $~lib/memory/__stack_pointer @@ -61082,14 +59371,9 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 10928 i32.store @@ -61102,7 +59386,7 @@ i32.store offset=4 i32.const 0 local.set $15 - loop $for-loop|0104 + loop $for-loop|0152 local.get $5 local.get $15 i32.gt_s @@ -61118,7 +59402,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|0104 + br $for-loop|0152 end end global.get $~lib/memory/__stack_pointer @@ -61193,7 +59477,7 @@ i32.store offset=16 i32.const 0 local.set $15 - loop $for-loop|1109 + loop $for-loop|1157 local.get $5 local.get $15 i32.gt_s @@ -61210,7 +59494,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|1109 + br $for-loop|1157 end end global.get $~lib/memory/__stack_pointer @@ -61227,14 +59511,9 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 10928 i32.store @@ -61247,7 +59526,7 @@ i32.store offset=4 i32.const 0 local.set $15 - loop $for-loop|0114151 + loop $for-loop|0162 local.get $5 local.get $15 i32.gt_s @@ -61263,7 +59542,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|0114151 + br $for-loop|0162 end end global.get $~lib/memory/__stack_pointer @@ -61338,7 +59617,7 @@ i32.store offset=16 i32.const 0 local.set $15 - loop $for-loop|1119 + loop $for-loop|1167 local.get $5 local.get $15 i32.gt_s @@ -61355,7 +59634,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|1119 + br $for-loop|1167 end end global.get $~lib/memory/__stack_pointer @@ -61372,14 +59651,9 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 10928 i32.store @@ -61392,7 +59666,7 @@ i32.store offset=4 i32.const 0 local.set $15 - loop $for-loop|0124 + loop $for-loop|0172 local.get $5 local.get $15 i32.gt_s @@ -61408,7 +59682,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|0124 + br $for-loop|0172 end end global.get $~lib/memory/__stack_pointer @@ -61483,7 +59757,7 @@ i32.store offset=16 i32.const 0 local.set $15 - loop $for-loop|1129 + loop $for-loop|1177 local.get $5 local.get $15 i32.gt_s @@ -61500,7 +59774,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|1129 + br $for-loop|1177 end end global.get $~lib/memory/__stack_pointer @@ -61517,14 +59791,9 @@ br_if $folding-inner21 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 10928 i32.store @@ -61537,7 +59806,7 @@ i32.store offset=4 i32.const 0 local.set $15 - loop $for-loop|0134 + loop $for-loop|0182 local.get $5 local.get $15 i32.gt_s @@ -61553,7 +59822,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|0134 + br $for-loop|0182 end end global.get $~lib/memory/__stack_pointer @@ -61628,7 +59897,7 @@ i32.store offset=16 i32.const 0 local.set $15 - loop $for-loop|1139 + loop $for-loop|1187 local.get $5 local.get $15 i32.gt_s @@ -61645,7 +59914,7 @@ i32.const 1 i32.add local.set $15 - br $for-loop|1139 + br $for-loop|1187 end end global.get $~lib/memory/__stack_pointer @@ -61744,7 +60013,7 @@ local.set $0 i32.const 0 local.set $1 - loop $for-loop|0145 + loop $for-loop|0193 local.get $0 local.get $1 i32.gt_s @@ -61752,6 +60021,8 @@ local.get $1 local.get $3 i32.add + f32.const 0 + f32.const 255 local.get $1 i32.const 2 i32.shl @@ -61759,26 +60030,22 @@ i32.add f32.load local.tee $6 + f32.min + f32.max + i32.trunc_sat_f32_u + i32.const 0 + local.get $6 local.get $6 f32.sub f32.const 0 f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $6 - f32.min - f32.max - i32.trunc_f32_u - else - i32.const 0 - end + select i32.store8 local.get $1 i32.const 1 i32.add local.set $1 - br $for-loop|0145 + br $for-loop|0193 end end local.get $7 @@ -61810,7 +60077,7 @@ local.set $2 i32.const 0 local.set $1 - loop $for-loop|0151 + loop $for-loop|0199 local.get $1 local.get $2 i32.lt_s @@ -61842,7 +60109,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|0151 + br $for-loop|0199 end end i32.const 10 @@ -61920,7 +60187,7 @@ local.set $2 i32.const 0 local.set $1 - loop $for-loop|0157 + loop $for-loop|0205 local.get $1 local.get $2 i32.lt_s @@ -61945,7 +60212,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|0157 + br $for-loop|0205 end end local.get $7 @@ -62139,11 +60406,11 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $1of1157 - block $0of1158 - block $outOfRange159 + block $1of1170 + block $0of1171 + block $outOfRange172 global.get $~argumentsLength - br_table $0of1158 $1of1157 $outOfRange159 + br_table $0of1171 $1of1170 $outOfRange172 end unreachable end @@ -62265,11 +60532,11 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $1of1161 - block $0of1162 - block $outOfRange163 + block $1of1174 + block $0of1175 + block $outOfRange176 global.get $~argumentsLength - br_table $0of1162 $1of1161 $outOfRange163 + br_table $0of1175 $1of1174 $outOfRange176 end unreachable end @@ -63348,12 +61615,12 @@ i32.const 0 i32.gt_s if - loop $while-continue|0161 + loop $while-continue|0209 global.get $~lib/rt/itcms/state if call $~lib/rt/itcms/step drop - br $while-continue|0161 + br $while-continue|0209 end end end @@ -64464,7 +62731,7 @@ local.get $1 local.get $3 local.get $5 - call $~lib/memory/memory.copy + memory.copy end local.get $4 local.get $1 @@ -64695,7 +62962,7 @@ local.get $2 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -65684,7 +63951,7 @@ local.get $3 i32.add local.get $2 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -65862,7 +64129,7 @@ local.get $2 i32.const 9808 local.get $1 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -65998,7 +64265,7 @@ local.get $1 i32.add local.get $2 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 400ac3b10b..28bd233fe6 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -78,8 +78,8 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) @@ -2433,237 +2433,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2713,7 +2482,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) @@ -2888,23 +2657,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=32 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=40 + i32.const 44 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 local.get $0 @@ -4410,1527 +4165,274 @@ local.get $10 i32.const 0 i32.ne - local.set $20 - local.get $20 - if - local.get $8 - local.get $10 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $21 - local.get $21 - i32.const -1 - i32.ne - if - local.get $0 - local.get $21 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - i32.load - i32.const 1 - i32.add - local.get $12 - local.get $11 - local.get $2 - call $~lib/util/sort/mergeRuns - end - local.get $10 - i32.const 1 - i32.sub - local.set $10 - br $for-loop|4 - end - end - local.get $11 - call $~lib/rt/tlsf/__free - local.get $8 - call $~lib/rt/tlsf/__free - ) - (func $~lib/typedarray/Float64Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Float64Array#get:length - local.get $1 - call $~lib/util/sort/SORT - local.get $0 - ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i64) - local.get $0 - i64.reinterpret_f64 - local.set $2 - local.get $1 - i64.reinterpret_f64 - local.set $3 - local.get $2 - local.get $2 - i64.const 63 - i64.shr_s - i64.const 1 - i64.shr_u - i64.xor - local.set $2 - local.get $3 - local.get $3 - i64.const 63 - i64.shr_s - i64.const 1 - i64.shr_u - i64.xor - local.set $3 - local.get $2 - local.get $3 - i64.gt_s - local.get $2 - local.get $3 - i64.lt_s - i32.sub - ) - (func $~lib/typedarray/Float64Array#__get (param $0 i32) (param $1 i32) (result f64) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 336 - i32.const 608 - i32.const 1435 - i32.const 64 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - ) - (func $~lib/typedarray/Uint8ClampedArray#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.ge_u - if - i32.const 336 - i32.const 608 - i32.const 318 - i32.const 45 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.add - local.get $2 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $2 - i32.sub - i32.const 31 - i32.shr_s - local.get $2 - i32.or - i32.and - i32.store8 - ) - (func $~lib/typedarray/Uint8ClampedArray#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.ge_u - if - i32.const 336 - i32.const 608 - i32.const 307 - i32.const 45 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.add - i32.load8_u - ) - (func $~lib/typedarray/Int8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.ge_u - if - i32.const 336 - i32.const 608 - i32.const 36 - i32.const 45 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.add - local.get $2 - i32.store8 - ) - (func $~lib/typedarray/Int8Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $0 - local.set $7 - local.get $1 - local.set $6 - local.get $2 - local.set $5 - local.get $3 - local.set $4 - local.get $7 - i32.load offset=4 - local.set $8 - local.get $7 - call $~lib/typedarray/Int8Array#get:length - local.set $9 - local.get $5 - i32.const 0 - i32.lt_s - if (result i32) - local.get $9 - local.get $5 - i32.add - local.tee $10 - i32.const 0 - local.tee $11 - local.get $10 - local.get $11 - i32.gt_s - select - else - local.get $5 - local.tee $11 - local.get $9 - local.tee $10 - local.get $11 - local.get $10 - i32.lt_s - select - end - local.set $5 - local.get $4 - i32.const 0 - i32.lt_s - if (result i32) - local.get $9 - local.get $4 - i32.add - local.tee $10 - i32.const 0 - local.tee $11 - local.get $10 - local.get $11 - i32.gt_s - select - else - local.get $4 - local.tee $11 - local.get $9 - local.tee $10 - local.get $11 - local.get $10 - i32.lt_s - select - end - local.set $4 - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $5 - local.get $4 - i32.lt_s - if - local.get $8 - local.get $5 - i32.add - local.get $6 - local.get $4 - local.get $5 - i32.sub - call $~lib/memory/memory.fill - end - local.get $7 - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 + local.set $20 + local.get $20 + if + local.get $8 + local.get $10 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $21 + local.get $21 + i32.const -1 + i32.ne + if + local.get $0 + local.get $21 + local.get $9 + local.get $10 + i32.const 2 + i32.shl + i32.add + i32.load + i32.const 1 + i32.add + local.get $12 + local.get $11 + local.get $2 + call $~lib/util/sort/mergeRuns + end + local.get $10 + i32.const 1 + i32.sub + local.set $10 + br $for-loop|4 + end end + local.get $11 + call $~lib/rt/tlsf/__free + local.get $8 + call $~lib/rt/tlsf/__free + ) + (func $~lib/typedarray/Float64Array#sort (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + call $~lib/typedarray/Float64Array#get:length + local.get $1 + call $~lib/util/sort/SORT + local.get $0 + ) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) + (local $2 i64) + (local $3 i64) + local.get $0 + i64.reinterpret_f64 + local.set $2 + local.get $1 + i64.reinterpret_f64 + local.set $3 local.get $2 - i32.const 4 - i32.and + local.get $2 + i64.const 63 + i64.shr_s + i64.const 1 + i64.shr_u + i64.xor + local.set $2 + local.get $3 + local.get $3 + i64.const 63 + i64.shr_s + i64.const 1 + i64.shr_u + i64.xor + local.set $3 + local.get $2 + local.get $3 + i64.gt_s + local.get $2 + local.get $3 + i64.lt_s + i32.sub + ) + (func $~lib/typedarray/Float64Array#__get (param $0 i32) (param $1 i32) (result f64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 + i32.const 336 + i32.const 608 + i32.const 1435 + i32.const 64 + call $~lib/builtins/abort + unreachable end - local.get $2 - i32.const 2 - i32.and + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $~lib/typedarray/Uint8ClampedArray#__set (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 + i32.const 336 + i32.const 608 + i32.const 318 + i32.const 45 + call $~lib/builtins/abort + unreachable end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add local.get $2 - i32.const 1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $2 + i32.sub + i32.const 31 + i32.shr_s + local.get $2 + i32.or i32.and + i32.store8 + ) + (func $~lib/typedarray/Uint8ClampedArray#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 + i32.const 336 + i32.const 608 + i32.const 307 + i32.const 45 + call $~lib/builtins/abort + unreachable end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_u ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) + (func $~lib/typedarray/Int8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 336 + i32.const 608 + i32.const 36 + i32.const 45 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 + i32.store8 + ) + (func $~lib/typedarray/Int8Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + local.get $0 + local.set $7 + local.get $1 + local.set $6 + local.get $2 + local.set $5 + local.get $3 + local.set $4 + local.get $7 + i32.load offset=4 + local.set $8 + local.get $7 + call $~lib/typedarray/Int8Array#get:length + local.set $9 + local.get $5 + i32.const 0 + i32.lt_s + if (result i32) + local.get $9 local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + i32.add + local.tee $10 i32.const 0 - i32.const 1 + local.tee $11 + local.get $10 + local.get $11 + i32.gt_s + select + else + local.get $5 + local.tee $11 + local.get $9 + local.tee $10 + local.get $11 + local.get $10 i32.lt_s - drop + select + end + local.set $5 + local.get $4 + i32.const 0 + i32.lt_s + if (result i32) + local.get $9 local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub + i32.add + local.tee $10 i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end + local.tee $11 + local.get $10 + local.get $11 + i32.gt_s + select + else + local.get $4 + local.tee $11 + local.get $9 + local.tee $10 + local.get $11 + local.get $10 + i32.lt_s + select + end + local.set $4 + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $5 + local.get $4 + i32.lt_s + if + local.get $8 local.get $5 + i32.add + local.get $6 local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end + local.get $5 + i32.sub + memory.fill end + local.get $7 ) (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -5943,7 +4445,7 @@ local.get $3 local.get $2 local.get $0 - call $~lib/memory/memory.copy + memory.copy end local.get $3 ) @@ -6352,7 +4854,7 @@ local.get $11 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $7 ) (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) @@ -9242,7 +7744,7 @@ local.get $5 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy local.get $3 ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -23522,7 +22024,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $3 i32.const 1 @@ -23559,7 +22061,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 48 i32.const 46 @@ -23666,7 +22168,7 @@ local.get $7 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -23880,7 +22382,7 @@ f64.add local.set $16 local.get $16 - i32.trunc_f64_s + i32.trunc_sat_f64_s local.set $15 local.get $15 local.get $15 @@ -24720,7 +23222,7 @@ f32.eq if (result i32) local.get $11 - i32.trunc_f32_s + i32.trunc_sat_f32_s else i32.const 0 end @@ -24926,7 +23428,7 @@ f64.eq if (result i32) local.get $11 - i32.trunc_f64_s + i32.trunc_sat_f64_s else i32.const 0 end @@ -24990,7 +23492,7 @@ i32.load offset=4 local.get $4 i32.load offset=8 - call $~lib/memory/memory.copy + memory.copy ) (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -25138,7 +23640,7 @@ i32.load offset=4 local.get $4 i32.load offset=8 - call $~lib/memory/memory.copy + memory.copy ) (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -25349,7 +23851,7 @@ f32.eq if (result i32) local.get $11 - i32.trunc_f32_u + i32.trunc_sat_f32_u else i32.const 0 end @@ -25551,7 +24053,7 @@ f64.eq if (result i32) local.get $11 - i32.trunc_f64_u + i32.trunc_sat_f64_u else i32.const 0 end @@ -25615,7 +24117,7 @@ i32.load offset=4 local.get $4 i32.load offset=8 - call $~lib/memory/memory.copy + memory.copy ) (func $~lib/typedarray/Uint8Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -25763,7 +24265,7 @@ i32.load offset=4 local.get $4 i32.load offset=8 - call $~lib/memory/memory.copy + memory.copy ) (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -25984,7 +24486,7 @@ local.get $11 f32.min f32.max - i32.trunc_f32_u + i32.trunc_sat_f32_u else i32.const 0 end @@ -26213,7 +24715,7 @@ local.get $11 f64.min f64.max - i32.trunc_f64_u + i32.trunc_sat_f64_u else i32.const 0 end @@ -26277,7 +24779,7 @@ i32.load offset=4 local.get $4 i32.load offset=8 - call $~lib/memory/memory.copy + memory.copy ) (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -26719,7 +25221,7 @@ f32.eq if (result i32) local.get $11 - i32.trunc_f32_s + i32.trunc_sat_f32_s else i32.const 0 end @@ -26921,7 +25423,7 @@ f64.eq if (result i32) local.get $11 - i32.trunc_f64_s + i32.trunc_sat_f64_s else i32.const 0 end @@ -27080,7 +25582,7 @@ i32.load offset=4 local.get $4 i32.load offset=8 - call $~lib/memory/memory.copy + memory.copy ) (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -27388,7 +25890,7 @@ f32.eq if (result i32) local.get $11 - i32.trunc_f32_u + i32.trunc_sat_f32_u else i32.const 0 end @@ -27590,7 +26092,7 @@ f64.eq if (result i32) local.get $11 - i32.trunc_f64_u + i32.trunc_sat_f64_u else i32.const 0 end @@ -27749,7 +26251,7 @@ i32.load offset=4 local.get $4 i32.load offset=8 - call $~lib/memory/memory.copy + memory.copy ) (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -27897,7 +26399,7 @@ i32.load offset=4 local.get $4 i32.load offset=8 - call $~lib/memory/memory.copy + memory.copy ) (func $~lib/typedarray/Int32Array#__uget (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -28011,7 +26513,7 @@ f32.eq if (result i32) local.get $11 - i32.trunc_f32_s + i32.trunc_sat_f32_s else i32.const 0 end @@ -28213,7 +26715,7 @@ f64.eq if (result i32) local.get $11 - i32.trunc_f64_s + i32.trunc_sat_f64_s else i32.const 0 end @@ -28562,7 +27064,7 @@ i32.load offset=4 local.get $4 i32.load offset=8 - call $~lib/memory/memory.copy + memory.copy ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) local.get $0 @@ -28680,7 +27182,7 @@ f32.eq if (result i32) local.get $11 - i32.trunc_f32_u + i32.trunc_sat_f32_u else i32.const 0 end @@ -28882,7 +27384,7 @@ f64.eq if (result i32) local.get $11 - i32.trunc_f64_u + i32.trunc_sat_f64_u else i32.const 0 end @@ -29391,7 +27893,7 @@ f32.eq if (result i64) local.get $11 - i64.trunc_f32_s + i64.trunc_sat_f32_s else i64.const 0 end @@ -29455,7 +27957,7 @@ i32.load offset=4 local.get $4 i32.load offset=8 - call $~lib/memory/memory.copy + memory.copy ) (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -29551,7 +28053,7 @@ f64.eq if (result i64) local.get $11 - i64.trunc_f64_s + i64.trunc_sat_f64_s else i64.const 0 end @@ -30060,7 +28562,7 @@ f32.eq if (result i64) local.get $11 - i64.trunc_f32_u + i64.trunc_sat_f32_u else i64.const 0 end @@ -30124,7 +28626,7 @@ i32.load offset=4 local.get $4 i32.load offset=8 - call $~lib/memory/memory.copy + memory.copy ) (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -30220,7 +28722,7 @@ f64.eq if (result i64) local.get $11 - i64.trunc_f64_u + i64.trunc_sat_f64_u else i64.const 0 end @@ -30684,7 +29186,7 @@ i32.load offset=4 local.get $4 i32.load offset=8 - call $~lib/memory/memory.copy + memory.copy ) (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -31772,7 +30274,7 @@ local.get $11 f32.min f32.max - i32.trunc_f32_u + i32.trunc_sat_f32_u else i32.const 0 end @@ -50621,14 +49123,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayReverseValues local.tee $0 @@ -50807,14 +49304,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayReverseValues local.tee $0 @@ -50996,14 +49488,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayReverseValues local.tee $0 @@ -51185,14 +49672,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayReverseValues local.tee $0 @@ -51371,14 +49853,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayReverseValues local.tee $0 @@ -51560,14 +50037,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayReverseValues local.tee $0 @@ -51743,14 +50215,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayReverseValues local.tee $0 @@ -51926,14 +50393,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayReverseValues local.tee $0 @@ -52112,14 +50574,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayReverseValues local.tee $0 @@ -52298,14 +50755,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayReverseValues local.tee $0 @@ -52484,14 +50936,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayReverseValues local.tee $0 @@ -54034,14 +52481,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayWrapValues local.tee $0 @@ -54159,14 +52601,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayWrapValues local.tee $0 @@ -54287,14 +52724,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayWrapValues local.tee $0 @@ -54417,14 +52849,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayWrapValues local.tee $0 @@ -54548,14 +52975,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayWrapValues local.tee $0 @@ -54682,14 +53104,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayWrapValues local.tee $0 @@ -54801,143 +53218,7 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - global.get $std/typedarray/testArrayWrapValues - local.tee $0 - i32.store - local.get $0 - call $~lib/array/Array#get:length - local.set $1 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $1 - call $~lib/typedarray/Uint32Array#constructor - local.tee $2 - i32.store offset=4 - i32.const 0 - local.set $3 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - local.set $4 - local.get $4 - if - local.get $2 - local.get $3 - local.get $0 - local.get $3 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.load - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=8 - local.get $7 - local.get $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.tee $5 - i32.store offset=12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.const 0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - call $~lib/typedarray/Uint32Array.wrap@varargs - local.tee $6 - i32.store offset=16 - i32.const 0 - local.set $3 - loop $for-loop|1 - local.get $3 - local.get $1 - i32.lt_s - local.set $4 - local.get $4 - if - local.get $2 - local.get $3 - call $~lib/typedarray/Uint32Array#__get - local.get $6 - local.get $3 - call $~lib/typedarray/Uint32Array#__get - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 730 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (local $0 i32) (local $1 i32) (local $2 i32) @@ -54952,14 +53233,140 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store + i32.const 0 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + global.get $std/typedarray/testArrayWrapValues + local.tee $0 + i32.store + local.get $0 + call $~lib/array/Array#get:length + local.set $1 global.get $~lib/memory/__stack_pointer i32.const 0 + local.get $1 + call $~lib/typedarray/Uint32Array#constructor + local.tee $2 + i32.store offset=4 + i32.const 0 + local.set $3 + loop $for-loop|0 + local.get $3 + local.get $1 + i32.lt_s + local.set $4 + local.get $4 + if + local.get $2 + local.get $3 + local.get $0 + local.get $3 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.load + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store offset=8 + local.get $7 + local.get $2 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $2 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $2 + i32.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.tee $5 + i32.store offset=12 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.const 0 + i32.const 1 + global.set $~argumentsLength + i32.const 0 + call $~lib/typedarray/Uint32Array.wrap@varargs + local.tee $6 i32.store offset=16 + i32.const 0 + local.set $3 + loop $for-loop|1 + local.get $3 + local.get $1 + i32.lt_s + local.set $4 + local.get $4 + if + local.get $2 + local.get $3 + call $~lib/typedarray/Uint32Array#__get + local.get $6 + local.get $3 + call $~lib/typedarray/Uint32Array#__get + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 730 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayWrapValues local.tee $0 @@ -55091,14 +53498,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayWrapValues local.tee $0 @@ -55232,14 +53634,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayWrapValues local.tee $0 @@ -55375,14 +53772,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayWrapValues local.tee $0 @@ -55610,14 +54002,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 @@ -55904,14 +54291,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 @@ -56198,14 +54580,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 @@ -56492,14 +54869,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 @@ -56786,14 +55158,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 @@ -57080,14 +55447,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 @@ -57374,14 +55736,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 @@ -57668,14 +56025,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 @@ -57962,14 +56314,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 @@ -58256,14 +56603,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 @@ -58527,14 +56869,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 3 @@ -60240,17 +58577,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 + i32.const 0 + i32.const 32 + memory.fill global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 i32.eq @@ -63635,7 +61964,7 @@ local.get $6 i32.const 2 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $7 local.set $9 global.get $~lib/memory/__stack_pointer @@ -67361,7 +65690,7 @@ local.get $8 i32.add local.get $10 - call $~lib/memory/memory.copy + memory.copy local.get $11 local.set $12 global.get $~lib/memory/__stack_pointer @@ -67486,7 +65815,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -67797,7 +66126,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -67967,7 +66296,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -68137,7 +66466,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -68307,7 +66636,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -68477,7 +66806,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -68855,7 +67184,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -69204,7 +67533,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $5 i32.add @@ -69332,7 +67661,7 @@ local.get $2 i32.const 8784 local.get $1 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.set $3 global.get $~lib/memory/__stack_pointer @@ -69450,7 +67779,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $7 local.get $4 i32.add @@ -69612,7 +67941,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $7 local.get $4 i32.add @@ -69915,7 +68244,7 @@ local.get $1 i32.add local.get $6 - call $~lib/memory/memory.copy + memory.copy local.get $7 local.set $8 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/std/uri.optimized.wat b/tests/compiler/std/uri.optimized.wat index d104db6e95..0bb17127c2 100644 --- a/tests/compiler/std/uri.optimized.wat +++ b/tests/compiler/std/uri.optimized.wat @@ -1,11 +1,11 @@ (module (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) @@ -20,135 +20,69 @@ (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 20748)) (memory $0 1) - (data (i32.const 1036) "\1c") - (data (i32.const 1048) "\01") - (data (i32.const 1069) "\01\01\01\01\01\00\00\00\00\01\01\00\00\01") - (data (i32.const 1093) "\01\01\01\01\01\01\01") - (data (i32.const 1126) "\01\01\01\01\00\01") - (data (i32.const 1158) "\01\01\01") - (data (i32.const 1164) "<") - (data (i32.const 1176) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1228) "<") - (data (i32.const 1240) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") - (data (i32.const 1356) "<") - (data (i32.const 1368) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") - (data (i32.const 1420) ",") - (data (i32.const 1432) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 1500) "<") - (data (i32.const 1512) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 1564) ",") - (data (i32.const 1576) "\01\00\00\00\1a\00\00\00U\00R\00I\00 \00m\00a\00l\00f\00o\00r\00m\00e\00d") - (data (i32.const 1612) "<") - (data (i32.const 1624) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00u\00r\00i\00.\00t\00s") + (data (i32.const 1036) "\1c\00\00\00\00\00\00\00\00\00\00\00\01") + (data (i32.const 1069) "\01\01\01\01\01\00\00\00\00\01\01\00\00\01\00\00\00\00\00\00\00\00\00\00\01\01\01\01\01\01\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\01\01\01\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\01\01") + (data (i32.const 1164) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 1228) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 1356) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data (i32.const 1420) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data (i32.const 1500) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 1564) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00U\00R\00I\00 \00m\00a\00l\00f\00o\00r\00m\00e\00d") + (data (i32.const 1612) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00u\00r\00i\00.\00t\00s") (data (i32.const 1676) "0123456789ABCDEF") - (data (i32.const 1692) ",") - (data (i32.const 1704) "\01\00\00\00\14\00\00\00s\00t\00d\00/\00u\00r\00i\00.\00t\00s") - (data (i32.const 1740) "\1c") - (data (i32.const 1752) "\01\00\00\00\02\00\00\00a") - (data (i32.const 1772) "\1c") - (data (i32.const 1784) "\01\00\00\00\04\00\00\00a\001") - (data (i32.const 1804) "\1c") - (data (i32.const 1816) "\01\00\00\00\06\00\00\00a\00b\00_") - (data (i32.const 1836) "\\") - (data (i32.const 1848) "\01\00\00\00H\00\00\00A\00B\00C\00D\00X\00Y\00Z\00a\00f\00g\00k\00l\00m\00n\00w\00y\00z\000\001\002\003\004\005\006\007\008\009\00-\00_\00.\00!\00~\00*\00\'\00(\00)") - (data (i32.const 1932) "\1c") - (data (i32.const 1944) "\01\00\00\00\02") - (data (i32.const 1964) "\1c") - (data (i32.const 1976) "\01\00\00\00\06\00\00\00%\000\000") - (data (i32.const 1996) "\1c") - (data (i32.const 2008) "\01\00\00\00\02\00\00\00+") - (data (i32.const 2028) "\1c") - (data (i32.const 2040) "\01\00\00\00\06\00\00\00%\002\00B") - (data (i32.const 2060) "\1c") - (data (i32.const 2072) "\01\00\00\00\06\00\00\00#\000\00=") - (data (i32.const 2092) ",") - (data (i32.const 2104) "\01\00\00\00\0e\00\00\00%\002\003\000\00%\003\00D") - (data (i32.const 2140) "\1c") - (data (i32.const 2152) "\01\00\00\00\n\00\00\00 \001\002\003\00 ") - (data (i32.const 2172) ",") - (data (i32.const 2184) "\01\00\00\00\12\00\00\00%\002\000\001\002\003\00%\002\000") - (data (i32.const 2220) "\1c") - (data (i32.const 2232) "\01\00\00\00\04\00\00\00?\00+") - (data (i32.const 2252) "\1c") - (data (i32.const 2264) "\01\00\00\00\0c\00\00\00%\003\00F\00%\002\00B") - (data (i32.const 2284) "\1c") - (data (i32.const 2296) "\01\00\00\00\n\00\00\00-\00?\001\00.\00-") - (data (i32.const 2316) ",") - (data (i32.const 2328) "\01\00\00\00\0e\00\00\00-\00%\003\00F\001\00.\00-") - (data (i32.const 2364) "\1c") - (data (i32.const 2376) "\01\00\00\00\0c\00\00\00<\d8\ed\dd<\d8\fa\dd<\d8N\df") - (data (i32.const 2396) "\\") - (data (i32.const 2408) "\01\00\00\00H\00\00\00%\00F\000\00%\009\00F\00%\008\007\00%\00A\00D\00%\00F\000\00%\009\00F\00%\008\007\00%\00B\00A\00%\00F\000\00%\009\00F\00%\008\00D\00%\008\00E") - (data (i32.const 2492) "\1c") - (data (i32.const 2504) "\01\00\00\00\n\00\00\00H\c5U\b1X\d58\c1\94\c6") - (data (i32.const 2524) "l") - (data (i32.const 2536) "\01\00\00\00Z\00\00\00%\00E\00C\00%\009\005\00%\008\008\00%\00E\00B\00%\008\005\00%\009\005\00%\00E\00D\00%\009\005\00%\009\008\00%\00E\00C\00%\008\004\00%\00B\008\00%\00E\00C\00%\009\00A\00%\009\004") - (data (i32.const 2636) "\1c") - (data (i32.const 2648) "\01\00\00\00\06\00\00\00~\00\7f\00\80") - (data (i32.const 2668) ",") - (data (i32.const 2680) "\01\00\00\00\14\00\00\00~\00%\007\00F\00%\00C\002\00%\008\000") - (data (i32.const 2716) "\1c") - (data (i32.const 2728) "\01\00\00\00\04\00\00\00\00\d8\ff\df") - (data (i32.const 2748) ",") - (data (i32.const 2760) "\01\00\00\00\18\00\00\00%\00F\000\00%\009\000\00%\008\00F\00%\00B\00F") - (data (i32.const 2796) "\1c") - (data (i32.const 2808) "\01\00\00\00\n\00\00\00{\da\01\dc-\00P\da\02\dc") - (data (i32.const 2828) "L") - (data (i32.const 2840) "\01\00\00\002\00\00\00%\00F\002\00%\00A\00E\00%\00B\000\00%\008\001\00-\00%\00F\002\00%\00A\004\00%\008\000\00%\008\002") - (data (i32.const 2908) "\1c") - (data (i32.const 2920) "\01\00\00\00\n\00\00\00\n\00\t\00\0b\00\0c\00\0d") - (data (i32.const 2940) "<") - (data (i32.const 2952) "\01\00\00\00\1e\00\00\00%\000\00A\00%\000\009\00%\000\00B\00%\000\00C\00%\000\00D") - (data (i32.const 3004) ",") - (data (i32.const 3016) "\01\00\00\00\14\00\00\00;\00/\00?\00:\00@\00&\00=\00+\00$\00,") - (data (i32.const 3052) "L") - (data (i32.const 3064) "\01\00\00\00<\00\00\00%\003\00B\00%\002\00F\00%\003\00F\00%\003\00A\00%\004\000\00%\002\006\00%\003\00D\00%\002\00B\00%\002\004\00%\002\00C") - (data (i32.const 3132) "l") - (data (i32.const 3144) "\01\00\00\00\\\00\00\00h\00t\00t\00p\00:\00/\00/\00e\00n\00.\00w\00i\00k\00i\00p\00e\00d\00i\00a\00.\00o\00r\00g\00/\00w\00i\00k\00i\00/\00U\00T\00F\00-\008\00#\00D\00e\00s\00c\00r\00i\00p\00t\00i\00o\00n") - (data (i32.const 3244) "\8c") - (data (i32.const 3256) "\01\00\00\00t\00\00\00h\00t\00t\00p\00%\003\00A\00%\002\00F\00%\002\00F\00e\00n\00.\00w\00i\00k\00i\00p\00e\00d\00i\00a\00.\00o\00r\00g\00%\002\00F\00w\00i\00k\00i\00%\002\00F\00U\00T\00F\00-\008\00%\002\003\00D\00e\00s\00c\00r\00i\00p\00t\00i\00o\00n") - (data (i32.const 3389) "\01\00\00\01") - (data (i32.const 3415) "\01\00\01") - (data (i32.const 3446) "\01\01\01\01\00\01") - (data (i32.const 3478) "\01\01\01") - (data (i32.const 3484) ",") - (data (i32.const 3496) "\01\00\00\00\16\00\00\00;\00,\00/\00?\00:\00@\00&\00=\00+\00$\00#") - (data (i32.const 3532) "\1c") - (data (i32.const 3544) "\01\00\00\00\02\00\00\00 ") - (data (i32.const 3564) "\1c") - (data (i32.const 3576) "\01\00\00\00\06\00\00\00%\002\000") - (data (i32.const 3596) "\01\01\00\01\00\00\00\00\01\01\00\00\01") - (data (i32.const 3619) "\01\01\00\01\00\01\01") - (data (i32.const 3628) "\1c") - (data (i32.const 3640) "\01\00\00\00\06\00\00\00%\002\006") - (data (i32.const 3660) "\1c") - (data (i32.const 3672) "\01\00\00\00\02\00\00\00&") - (data (i32.const 3692) "\1c") - (data (i32.const 3704) "\01\00\00\00\06\00\00\00%\005\00E") - (data (i32.const 3724) "\1c") - (data (i32.const 3736) "\01\00\00\00\02\00\00\00^") - (data (i32.const 3756) "\1c") - (data (i32.const 3768) "\01\00\00\00\02\00\00\00\00\d8") - (data (i32.const 3788) "L") - (data (i32.const 3800) "\01\00\00\00<\00\00\00%\003\00b\00%\002\00f\00%\003\00f\00%\003\00a\00%\004\000\00%\003\00d\00%\002\00b\00%\002\004\00%\002\00c\00%\002\003") - (data (i32.const 3868) ",") - (data (i32.const 3880) "\01\00\00\00\14\00\00\00;\00/\00?\00:\00@\00=\00+\00$\00,\00#") - (data (i32.const 3916) "L") - (data (i32.const 3928) "\01\00\00\00<\00\00\00%\003\00B\00%\002\00F\00%\003\00F\00%\003\00A\00%\004\000\00%\003\00D\00%\002\00B\00%\002\004\00%\002\00C\00%\002\003") - (data (i32.const 3996) "|") - (data (i32.const 4008) "\01\00\00\00h\00\00\00h\00t\00t\00p\00:\00%\002\00F\00%\002\00F\00e\00n\00.\00w\00i\00k\00i\00p\00e\00d\00i\00a\00.\00o\00r\00g\00/\00w\00i\00k\00i\00/\00U\00T\00F\00-\008\00%\002\003\00D\00e\00s\00c\00r\00i\00p\00t\00i\00o\00n") - (data (i32.const 4124) "\1c") - (data (i32.const 4136) "\01\00\00\00\0c\00\00\00%\00D\00F\00%\008\000") - (data (i32.const 4156) "\1c") - (data (i32.const 4168) "\01\00\00\00\02\00\00\00\c0\07") - (data (i32.const 4188) "\1c") - (data (i32.const 4200) "\01\00\00\00\0c\00\00\00%\00C\002\00%\00B\00F") - (data (i32.const 4220) "\1c") - (data (i32.const 4232) "\01\00\00\00\02\00\00\00\bf") - (data (i32.const 4252) ",") - (data (i32.const 4264) "\01\00\00\00\0e\00\00\00\f7\00\b8\00W\00\ef\00\0f\00\f4\00V") - (data (i32.const 4300) "\1c") - (data (i32.const 4312) "\01\00\00\00\06\00\00\00\f4\00\b8\00\ef") + (data (i32.const 1692) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00s\00t\00d\00/\00u\00r\00i\00.\00t\00s") + (data (i32.const 1740) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a") + (data (i32.const 1772) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00a\001") + (data (i32.const 1804) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00b\00_") + (data (i32.const 1836) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\00A\00B\00C\00D\00X\00Y\00Z\00a\00f\00g\00k\00l\00m\00n\00w\00y\00z\000\001\002\003\004\005\006\007\008\009\00-\00_\00.\00!\00~\00*\00\'\00(\00)") + (data (i32.const 1932) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02") + (data (i32.const 1964) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00%\000\000") + (data (i32.const 1996) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00+") + (data (i32.const 2028) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00%\002\00B") + (data (i32.const 2060) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00#\000\00=") + (data (i32.const 2092) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00%\002\003\000\00%\003\00D") + (data (i32.const 2140) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00 \001\002\003\00 ") + (data (i32.const 2172) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00%\002\000\001\002\003\00%\002\000") + (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00?\00+") + (data (i32.const 2252) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00%\003\00F\00%\002\00B") + (data (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00-\00?\001\00.\00-") + (data (i32.const 2316) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00-\00%\003\00F\001\00.\00-") + (data (i32.const 2364) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00<\d8\ed\dd<\d8\fa\dd<\d8N\df") + (data (i32.const 2396) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\00%\00F\000\00%\009\00F\00%\008\007\00%\00A\00D\00%\00F\000\00%\009\00F\00%\008\007\00%\00B\00A\00%\00F\000\00%\009\00F\00%\008\00D\00%\008\00E") + (data (i32.const 2492) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00H\c5U\b1X\d58\c1\94\c6") + (data (i32.const 2524) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00Z\00\00\00%\00E\00C\00%\009\005\00%\008\008\00%\00E\00B\00%\008\005\00%\009\005\00%\00E\00D\00%\009\005\00%\009\008\00%\00E\00C\00%\008\004\00%\00B\008\00%\00E\00C\00%\009\00A\00%\009\004") + (data (i32.const 2636) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00~\00\7f\00\80") + (data (i32.const 2668) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00~\00%\007\00F\00%\00C\002\00%\008\000") + (data (i32.const 2716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\00\d8\ff\df") + (data (i32.const 2748) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00%\00F\000\00%\009\000\00%\008\00F\00%\00B\00F") + (data (i32.const 2796) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00{\da\01\dc-\00P\da\02\dc") + (data (i32.const 2828) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\002\00\00\00%\00F\002\00%\00A\00E\00%\00B\000\00%\008\001\00-\00%\00F\002\00%\00A\004\00%\008\000\00%\008\002") + (data (i32.const 2908) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00\n\00\t\00\0b\00\0c\00\0d") + (data (i32.const 2940) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00%\000\00A\00%\000\009\00%\000\00B\00%\000\00C\00%\000\00D") + (data (i32.const 3004) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00;\00/\00?\00:\00@\00&\00=\00+\00$\00,") + (data (i32.const 3052) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00<\00\00\00%\003\00B\00%\002\00F\00%\003\00F\00%\003\00A\00%\004\000\00%\002\006\00%\003\00D\00%\002\00B\00%\002\004\00%\002\00C") + (data (i32.const 3132) "l\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\\\00\00\00h\00t\00t\00p\00:\00/\00/\00e\00n\00.\00w\00i\00k\00i\00p\00e\00d\00i\00a\00.\00o\00r\00g\00/\00w\00i\00k\00i\00/\00U\00T\00F\00-\008\00#\00D\00e\00s\00c\00r\00i\00p\00t\00i\00o\00n") + (data (i32.const 3244) "\8c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00t\00\00\00h\00t\00t\00p\00%\003\00A\00%\002\00F\00%\002\00F\00e\00n\00.\00w\00i\00k\00i\00p\00e\00d\00i\00a\00.\00o\00r\00g\00%\002\00F\00w\00i\00k\00i\00%\002\00F\00U\00T\00F\00-\008\00%\002\003\00D\00e\00s\00c\00r\00i\00p\00t\00i\00o\00n") + (data (i32.const 3389) "\01\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\01\01\01\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\01\01") + (data (i32.const 3484) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00;\00,\00/\00?\00:\00@\00&\00=\00+\00$\00#") + (data (i32.const 3532) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00 ") + (data (i32.const 3564) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00%\002\000") + (data (i32.const 3596) "\01\01\00\01\00\00\00\00\01\01\00\00\01\00\00\00\00\00\00\00\00\00\00\01\01\00\01\00\01\01") + (data (i32.const 3628) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00%\002\006") + (data (i32.const 3660) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00&") + (data (i32.const 3692) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00%\005\00E") + (data (i32.const 3724) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00^") + (data (i32.const 3756) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\00\d8") + (data (i32.const 3788) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00<\00\00\00%\003\00b\00%\002\00f\00%\003\00f\00%\003\00a\00%\004\000\00%\003\00d\00%\002\00b\00%\002\004\00%\002\00c\00%\002\003") + (data (i32.const 3868) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00;\00/\00?\00:\00@\00=\00+\00$\00,\00#") + (data (i32.const 3916) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00<\00\00\00%\003\00B\00%\002\00F\00%\003\00F\00%\003\00A\00%\004\000\00%\003\00D\00%\002\00B\00%\002\004\00%\002\00C\00%\002\003") + (data (i32.const 3996) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00h\00\00\00h\00t\00t\00p\00:\00%\002\00F\00%\002\00F\00e\00n\00.\00w\00i\00k\00i\00p\00e\00d\00i\00a\00.\00o\00r\00g\00/\00w\00i\00k\00i\00/\00U\00T\00F\00-\008\00%\002\003\00D\00e\00s\00c\00r\00i\00p\00t\00i\00o\00n") + (data (i32.const 4124) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00%\00D\00F\00%\008\000") + (data (i32.const 4156) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\c0\07") + (data (i32.const 4188) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00%\00C\002\00%\00B\00F") + (data (i32.const 4220) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\bf") + (data (i32.const 4252) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00\f7\00\b8\00W\00\ef\00\0f\00\f4\00V") + (data (i32.const 4300) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00\f4\00\b8\00\ef") (data (i32.const 4336) "\03\00\00\00 \00\00\00\00\00\00\00 ") (export "memory" (memory $0)) (start $~start) @@ -1480,1055 +1414,11 @@ local.get $2 i32.const 20 i32.add - local.tee $2 - local.set $1 - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $3 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store8 offset=3 - local.get $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - local.get $1 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.add - local.tee $1 - i32.const 0 - i32.store - local.get $1 - local.get $0 - local.get $3 - i32.sub - i32.const -4 - i32.and - local.tee $0 - i32.add - local.tee $3 - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - i32.const 0 - i32.store offset=24 - local.get $3 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $3 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $1 - local.get $1 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.sub - local.set $0 - loop $while-continue|0 - local.get $0 - i32.const 32 - i32.ge_u - if - local.get $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 - i64.const 0 - i64.store offset=16 - local.get $1 - i64.const 0 - i64.store offset=24 - local.get $0 - i32.const 32 - i32.sub - local.set $0 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - local.get $2 - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end + local.tee $1 + i32.const 0 local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end + memory.fill + local.get $1 ) (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2565,7 +1455,7 @@ local.get $1 i32.gt_u select - call $~lib/memory/memory.copy + memory.copy local.get $2 ) (func $~lib/util/uri/encode (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -2659,7 +1549,7 @@ local.get $0 i32.add local.get $9 - call $~lib/memory/memory.copy + memory.copy local.get $7 local.get $9 i32.add @@ -3210,7 +2100,7 @@ i32.const 1 i32.shl local.tee $4 - call $~lib/memory/memory.copy + memory.copy local.get $4 local.get $6 i32.add diff --git a/tests/compiler/std/uri.untouched.wat b/tests/compiler/std/uri.untouched.wat index 8176f82b89..1c72a8de40 100644 --- a/tests/compiler/std/uri.untouched.wat +++ b/tests/compiler/std/uri.untouched.wat @@ -2,9 +2,9 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -2132,237 +2132,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2412,1262 +2181,9 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -3710,7 +2226,7 @@ local.get $5 i32.lt_u select - call $~lib/memory/memory.copy + memory.copy local.get $3 ) (func $~lib/util/uri/storeHex (param $0 i32) (param $1 i32) (param $2 i32) @@ -3849,7 +2365,7 @@ i32.shl i32.add local.get $11 - call $~lib/memory/memory.copy + memory.copy local.get $4 local.get $11 i32.add @@ -4423,7 +2939,7 @@ i32.shl i32.add local.get $9 - call $~lib/memory/memory.copy + memory.copy local.get $4 local.get $9 i32.add diff --git a/tests/compiler/super-inline.optimized.wat b/tests/compiler/super-inline.optimized.wat index 89fc32701f..42e805b3ae 100644 --- a/tests/compiler/super-inline.optimized.wat +++ b/tests/compiler/super-inline.optimized.wat @@ -1231,6 +1231,11 @@ local.get $1 i32.const 20 i32.add + local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $0 ) (func $~lib/rt/__visit_members (param $0 i32) block $invalid diff --git a/tests/compiler/super-inline.untouched.wat b/tests/compiler/super-inline.untouched.wat index 13e8004d63..7493621c87 100644 --- a/tests/compiler/super-inline.untouched.wat +++ b/tests/compiler/super-inline.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) @@ -23,7 +23,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $super-inline/foo (mut i32) (i32.const 0)) (global $super-inline/bar (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 416)) @@ -2064,237 +2063,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2344,7 +2112,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $super-inline/Foo#a (param $0 i32) (result i32) diff --git a/tests/compiler/templateliteral.optimized.wat b/tests/compiler/templateliteral.optimized.wat index 0d0a525028..69766b9fd5 100644 --- a/tests/compiler/templateliteral.optimized.wat +++ b/tests/compiler/templateliteral.optimized.wat @@ -1,8 +1,8 @@ (module - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $f64_=>_i32 (func (param f64) (result i32))) @@ -40,100 +40,59 @@ (data (i32.const 1176) "\01") (data (i32.const 1196) "<") (data (i32.const 1208) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1260) "<") - (data (i32.const 1272) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 1260) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") (data (i32.const 1388) "<") (data (i32.const 1400) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") (data (i32.const 1452) ",") (data (i32.const 1464) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") (data (i32.const 1532) "<") (data (i32.const 1544) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 1596) "\1c") - (data (i32.const 1608) "\01\00\00\00\04\00\00\00a\00b") - (data (i32.const 1628) "\1c") - (data (i32.const 1640) "\01\00\00\00\06\00\00\00(\00A\00=") - (data (i32.const 1660) "\1c") - (data (i32.const 1672) "\01\00\00\00\08\00\00\00,\00 \00B\00=") - (data (i32.const 1692) "\1c") - (data (i32.const 1704) "\01\00\00\00\02\00\00\00)") - (data (i32.const 1724) ",") - (data (i32.const 1736) "\03\00\00\00\14\00\00\00p\06\00\00\00\00\00\00\90\06\00\00\00\00\00\00\b0\06") - (data (i32.const 1772) ",") - (data (i32.const 1784) "\01\00\00\00\14\00\00\00(\00A\00=\00a\00,\00 \00B\00=\00b\00)") - (data (i32.const 1820) "|") - (data (i32.const 1832) "\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") - (data (i32.const 1948) "<") - (data (i32.const 1960) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") - (data (i32.const 2012) "\1c") - (data (i32.const 2024) "\01\00\00\00\02\00\00\000") + (data (i32.const 1596) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00a\00b") + (data (i32.const 1628) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00(\00A\00=") + (data (i32.const 1660) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00,\00 \00B\00=") + (data (i32.const 1692) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00)") + (data (i32.const 1724) ",\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\14\00\00\00p\06\00\00\00\00\00\00\90\06\00\00\00\00\00\00\b0\06") + (data (i32.const 1772) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00(\00A\00=\00a\00,\00 \00B\00=\00b\00)") + (data (i32.const 1820) "|\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") + (data (i32.const 1948) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") + (data (i32.const 2012) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\000") (data (i32.const 2044) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 2444) "\1c\04") - (data (i32.const 2456) "\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") - (data (i32.const 3500) "\\") - (data (i32.const 3512) "\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") - (data (i32.const 3596) "\1c") - (data (i32.const 3608) "\01\00\00\00\02\00\00\001") - (data (i32.const 3628) "\1c") - (data (i32.const 3640) "\01\00\00\00\04\00\00\001\002") - (data (i32.const 3660) ",") - (data (i32.const 3672) "\03\00\00\00\14\00\00\00p\06\00\00\00\00\00\00\90\06\00\00\00\00\00\00\b0\06") - (data (i32.const 3708) ",") - (data (i32.const 3720) "\01\00\00\00\14\00\00\00(\00A\00=\001\00,\00 \00B\00=\002\00)") - (data (i32.const 3756) "\1c") - (data (i32.const 3768) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 3788) "\1c") - (data (i32.const 3800) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 3820) ",") - (data (i32.const 3832) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3868) ",") - (data (i32.const 3880) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 2444) "\1c\04\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") + (data (i32.const 3500) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") + (data (i32.const 3596) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\001") + (data (i32.const 3628) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\001\002") + (data (i32.const 3660) ",\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\14\00\00\00p\06\00\00\00\00\00\00\90\06\00\00\00\00\00\00\b0\06") + (data (i32.const 3708) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00(\00A\00=\001\00,\00 \00B\00=\002\00)") + (data (i32.const 3756) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000") + (data (i32.const 3788) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N") + (data (i32.const 3820) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 3868) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 3976) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8#__uset (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 @@ -2933,7 +1848,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $2 local.get $6 i32.add @@ -2950,7 +1865,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $1 local.get $2 i32.add @@ -2988,7 +1903,7 @@ i32.shr_u i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy end global.get $~lib/memory/__stack_pointer i32.const 12 @@ -3724,7 +2639,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 @@ -3752,7 +2667,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 3014704 i32.store @@ -3875,7 +2790,7 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -4073,7 +2988,7 @@ f64.const 347 f64.add local.tee $0 - i32.trunc_f64_s + i32.trunc_sat_f64_s local.tee $7 local.get $0 local.get $7 @@ -4328,7 +3243,7 @@ local.get $1 i32.const 3920 local.get $2 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -4384,14 +3299,9 @@ br_if $folding-inner0 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 + i32.const 0 + i32.const 24 + memory.fill local.get $0 i32.const 1056 i32.store @@ -4490,15 +3400,9 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 + i32.const 0 + i32.const 24 + memory.fill i32.const 1 call $~lib/number/I32#toString local.set $0 @@ -4618,15 +3522,9 @@ i32.lt_s br_if $folding-inner0 global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 + i32.const 0 + i32.const 24 + memory.fill f64.const 1 call $~lib/number/F64#toString local.set $0 @@ -4748,17 +3646,9 @@ br_if $folding-inner0 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 + i32.const 0 + i32.const 32 + memory.fill local.get $0 i32.const 1 call $templateliteral/Ref#constructor @@ -4889,14 +3779,9 @@ br_if $folding-inner0 global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 5552 i32.store @@ -5064,14 +3949,9 @@ end global.get $~lib/memory/__stack_pointer local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $0 i32.const 1088 i32.store @@ -5316,14 +4196,9 @@ end global.get $~lib/memory/__stack_pointer local.tee $1 - i64.const 0 - i64.store - local.get $1 - i64.const 0 - i64.store offset=8 - local.get $1 i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill local.get $1 local.get $0 i32.load offset=4 @@ -5438,13 +4313,13 @@ local.get $4 local.get $0 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.get $4 i32.add local.get $1 local.get $3 - call $~lib/memory/memory.copy + memory.copy global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/tests/compiler/templateliteral.untouched.wat b/tests/compiler/templateliteral.untouched.wat index 2a1e50b66e..1f9fc01674 100644 --- a/tests/compiler/templateliteral.untouched.wat +++ b/tests/compiler/templateliteral.untouched.wat @@ -3,8 +3,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -2178,1644 +2178,160 @@ i32.add local.get $1 local.set $5 - local.get $5 - i32.const 4 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - i32.load - i32.const 2 - i32.const -1 - i32.xor - i32.and - call $~lib/rt/common/BLOCK#set:mmInfo - end - ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 - i32.eqz - if - local.get $0 - local.get $2 - call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 - call $~lib/rt/tlsf/searchBlock - local.set $3 - i32.const 1 - drop - local.get $3 - i32.eqz - if - i32.const 0 - i32.const 528 - i32.const 496 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - end - i32.const 1 - drop - local.get $3 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 528 - i32.const 498 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 - call $~lib/rt/tlsf/prepareBlock - i32.const 0 - drop - local.get $3 - ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - ) - (func $~lib/rt/itcms/Object#set:rtId (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/rt/itcms/Object#set:rtSize (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=16 - ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741804 - i32.ge_u - if - i32.const 192 - i32.const 256 - i32.const 260 - i32.const 31 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/itcms/total - global.get $~lib/rt/itcms/threshold - i32.ge_u - if - call $~lib/rt/itcms/interrupt - end - i32.const 16 - local.get $0 - i32.add - call $~lib/rt/tlsf/__alloc - i32.const 4 - i32.sub - local.set $2 - local.get $2 - local.get $1 - call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 - call $~lib/rt/itcms/Object#set:rtSize - local.get $2 - global.get $~lib/rt/itcms/fromSpace - global.get $~lib/rt/itcms/white - call $~lib/rt/itcms/Object#linkTo - global.get $~lib/rt/itcms/total - local.get $2 - call $~lib/rt/itcms/Object#get:size - i32.add - global.set $~lib/rt/itcms/total - local.get $2 - i32.const 20 - i32.add - local.set $3 - local.get $3 - i32.const 0 - local.get $0 - call $~lib/memory/memory.fill - local.get $3 - ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else + local.get $5 + i32.const 4 + i32.add + local.get $5 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + i32.load + i32.const 2 + i32.const -1 + i32.xor + i32.and + call $~lib/rt/common/BLOCK#set:mmInfo + end + ) + (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + call $~lib/rt/tlsf/prepareSize + local.set $2 + local.get $0 + local.get $2 + call $~lib/rt/tlsf/searchBlock + local.set $3 + local.get $3 + i32.eqz + if + local.get $0 + local.get $2 + call $~lib/rt/tlsf/growMemory + local.get $0 + local.get $2 + call $~lib/rt/tlsf/searchBlock + local.set $3 + i32.const 1 + drop + local.get $3 + i32.eqz + if i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end + i32.const 528 + i32.const 496 + i32.const 16 + call $~lib/builtins/abort + unreachable end end + i32.const 1 + drop + local.get $3 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 528 + i32.const 498 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $3 + call $~lib/rt/tlsf/removeBlock + local.get $0 + local.get $3 + local.get $2 + call $~lib/rt/tlsf/prepareBlock + i32.const 0 + drop + local.get $3 + ) + (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + ) + (func $~lib/rt/itcms/Object#set:rtId (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/rt/itcms/Object#set:rtSize (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=16 + ) + (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741804 + i32.ge_u + if + i32.const 192 + i32.const 256 + i32.const 260 + i32.const 31 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.ge_u + if + call $~lib/rt/itcms/interrupt + end + i32.const 16 + local.get $0 + i32.add + call $~lib/rt/tlsf/__alloc + i32.const 4 + i32.sub + local.set $2 + local.get $2 + local.get $1 + call $~lib/rt/itcms/Object#set:rtId + local.get $2 + local.get $0 + call $~lib/rt/itcms/Object#set:rtSize + local.get $2 + global.get $~lib/rt/itcms/fromSpace + global.get $~lib/rt/itcms/white + call $~lib/rt/itcms/Object#linkTo + global.get $~lib/rt/itcms/total + local.get $2 + call $~lib/rt/itcms/Object#get:size + i32.add + global.set $~lib/rt/itcms/total + local.get $2 + i32.const 20 + i32.add + local.set $3 + local.get $3 + i32.const 0 + local.get $0 + memory.fill + local.get $3 ) (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -4954,7 +3470,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $3 i32.const 1 @@ -4991,7 +3507,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 48 i32.const 46 @@ -5098,7 +3614,7 @@ local.get $7 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -5312,7 +3828,7 @@ f64.add local.set $16 local.get $16 - i32.trunc_f64_s + i32.trunc_sat_f64_s local.set $15 local.get $15 local.get $15 @@ -5814,14 +4330,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 + i32.const 0 + i32.const 24 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 32 local.tee $0 @@ -5944,14 +4455,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 + i32.const 0 + i32.const 24 + memory.fill i32.const 1 local.set $0 i32.const 2 @@ -6099,14 +4605,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 + i32.const 0 + i32.const 24 + memory.fill f64.const 1 local.set $0 f64.const 2 @@ -6252,14 +4753,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill i32.const 2 local.set $0 global.get $~lib/memory/__stack_pointer @@ -6518,17 +5014,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=24 + i32.const 0 + i32.const 32 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 1 @@ -6678,14 +5166,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=4 @@ -6763,14 +5246,9 @@ global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=16 + i32.const 20 + memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 i32.const 4528 @@ -6885,13 +5363,13 @@ local.get $5 local.get $0 local.get $2 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.get $2 i32.add local.get $1 local.get $3 - call $~lib/memory/memory.copy + memory.copy local.get $5 local.set $6 global.get $~lib/memory/__stack_pointer @@ -7049,7 +5527,7 @@ local.get $11 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $11 i32.add @@ -7066,7 +5544,7 @@ local.get $9 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $8 local.get $9 i32.add @@ -7102,7 +5580,7 @@ call $~lib/string/String#get:length i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy end local.get $10 local.set $12 @@ -7353,7 +5831,7 @@ local.get $2 i32.const 2896 local.get $1 - call $~lib/memory/memory.copy + memory.copy local.get $2 local.set $3 global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index d5176a0ff9..ff0a97349e 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -1807,11 +1807,15 @@ i32.add i32.add global.set $~lib/rt/itcms/total - local.get $1 local.get $0 i32.const 20 i32.add local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $1 + local.get $0 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 diff --git a/tests/compiler/typeof.untouched.wat b/tests/compiler/typeof.untouched.wat index e7af4a1991..b66dacb447 100644 --- a/tests/compiler/typeof.untouched.wat +++ b/tests/compiler/typeof.untouched.wat @@ -2240,237 +2240,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2520,7 +2289,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $~lib/rt/__visit_globals (param $0 i32) diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index 6fac2b9873..43a0defd71 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -1,7 +1,7 @@ (module - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) @@ -1590,879 +1590,6 @@ local.get $5 end ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $while-continue|0 - local.get $1 - i32.const 3 - i32.and - i32.const 0 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=12 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=1 - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=5 - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=9 - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=13 - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=2 - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=6 - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=10 - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=14 - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load offset=3 - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - local.get $1 - i32.load offset=7 - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=4 - local.get $0 - local.get $1 - i32.load offset=11 - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.load offset=15 - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.get $1 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - local.get $1 - i32.const 2 - i32.add - local.tee $3 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.add - local.set $1 - local.get $0 - local.get $3 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - local.tee $3 - i32.const 2 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 2 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u offset=1 - i32.store8 offset=1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $0 - i32.sub - local.get $4 - i32.sub - i32.const 0 - local.get $4 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $0 - local.get $1 - local.get $4 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $while-continue|0 @@ -2648,7 +1775,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 @@ -2676,7 +1803,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 3014704 i32.store @@ -2799,7 +1926,7 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -2997,7 +2124,7 @@ f64.const 347 f64.add local.tee $1 - i32.trunc_f64_s + i32.trunc_sat_f64_s local.tee $8 local.get $1 local.get $8 diff --git a/tests/compiler/wasi/trace.untouched.wat b/tests/compiler/wasi/trace.untouched.wat index b91f678d5a..1e7c3de8fa 100644 --- a/tests/compiler/wasi/trace.untouched.wat +++ b/tests/compiler/wasi/trace.untouched.wat @@ -2,11 +2,11 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -2515,1259 +2515,6 @@ end unreachable ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - loop $while-continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - i32.const 0 - end - local.set $5 - local.get $5 - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 - i32.const 1 - i32.add - local.set $1 - local.get $6 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - loop $while-continue|1 - local.get $2 - i32.const 16 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $while-continue|3 - local.get $2 - i32.const 17 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $while-continue|4 - local.get $2 - i32.const 18 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $3 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|5 - local.get $2 - i32.const 19 - i32.ge_u - local.set $5 - local.get $5 - if - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $while-continue|5 - end - end - br $break|2 - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $5 - i32.sub - local.get $3 - i32.sub - i32.const 0 - local.get $3 - i32.const 1 - i32.shl - i32.sub - i32.le_u - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -4017,7 +2764,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 local.get $3 i32.const 1 @@ -4054,7 +2801,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 48 i32.const 46 @@ -4161,7 +2908,7 @@ local.get $7 i32.const 2 i32.sub - call $~lib/memory/memory.copy + memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -4375,7 +3122,7 @@ f64.add local.set $16 local.get $16 - i32.trunc_f64_s + i32.trunc_sat_f64_s local.set $15 local.get $15 local.get $15 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 34acde17ff..9016485d0b 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1785,11 +1785,15 @@ i32.add i32.add global.set $~lib/rt/itcms/total - local.get $2 local.get $0 i32.const 20 i32.add local.tee $0 + i32.const 0 + i32.const 0 + memory.fill + local.get $2 + local.get $0 i32.store global.get $~lib/memory/__stack_pointer i32.const 4 diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index 242a12f684..5ca11a0b26 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -4,8 +4,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -24,7 +24,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 464)) (global $~lib/memory/__data_end i32 (i32.const 500)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16884)) @@ -2518,237 +2517,6 @@ local.get $1 i32.store offset=16 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - i32.const 1 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - i32.const 2 - i32.sub - local.get $4 - i32.store8 - local.get $6 - i32.const 3 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - i32.const 4 - i32.sub - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - i32.const 4 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - i32.const 12 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 8 - i32.sub - local.get $8 - i32.store - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - i32.const 28 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 24 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 20 - i32.sub - local.get $8 - i32.store - local.get $6 - i32.const 16 - i32.sub - local.get $8 - i32.store - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2798,7 +2566,7 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + memory.fill local.get $3 ) (func $while/testRef diff --git a/tests/features.json b/tests/features.json index 07322b22df..1ac3d7867a 100644 --- a/tests/features.json +++ b/tests/features.json @@ -1,21 +1,4 @@ { - "mutable-globals": { - }, - "bigint-integration": { - }, - "nontrapping-f2i": { - "asc_flags": [ - "--enable nontrapping-f2i" - ] - }, - "simd": { - "asc_flags": [ - "--enable simd" - ], - "v8_flags": [ - "--experimental-wasm-simd" - ] - }, "threads": { "asc_flags": [ "--enable threads" From 23b5f9e79ce8cf94e23f6845f750c5906cd89de8 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 14 Dec 2021 12:02:28 +0100 Subject: [PATCH 134/175] move enabled feature tests --- ...t-integration.js => bigint-integration.js} | 2 +- ...tegration.json => bigint-integration.json} | 0 .../compiler/bigint-integration.optimized.wat | 50 +++++++++++ ...t-integration.ts => bigint-integration.ts} | 0 .../compiler/bigint-integration.untouched.wat | 59 +++++++++++++ tests/compiler/features/README.md | 2 +- .../js-bigint-integration.optimized.wat | 50 ----------- .../js-bigint-integration.untouched.wat | 59 ------------- .../features/mutable-globals.untouched.wat | 86 ------------------- .../{features => }/mutable-globals.js | 0 .../{features => }/mutable-globals.json | 0 .../mutable-globals.optimized.wat | 28 +++--- .../{features => }/mutable-globals.ts | 0 tests/compiler/mutable-globals.untouched.wat | 86 +++++++++++++++++++ .../{features => }/nontrapping-f2i.json | 0 .../nontrapping-f2i.optimized.wat | 0 .../{features => }/nontrapping-f2i.ts | 0 .../nontrapping-f2i.untouched.wat | 4 +- tests/compiler/{features => }/simd.json | 0 .../{features => }/simd.optimized.wat | 20 ++--- tests/compiler/{features => }/simd.ts | 0 .../{features => }/simd.untouched.wat | 44 +++++----- 22 files changed, 245 insertions(+), 245 deletions(-) rename tests/compiler/{features/js-bigint-integration.js => bigint-integration.js} (92%) rename tests/compiler/{features/js-bigint-integration.json => bigint-integration.json} (100%) create mode 100644 tests/compiler/bigint-integration.optimized.wat rename tests/compiler/{features/js-bigint-integration.ts => bigint-integration.ts} (100%) create mode 100644 tests/compiler/bigint-integration.untouched.wat delete mode 100644 tests/compiler/features/js-bigint-integration.optimized.wat delete mode 100644 tests/compiler/features/js-bigint-integration.untouched.wat delete mode 100644 tests/compiler/features/mutable-globals.untouched.wat rename tests/compiler/{features => }/mutable-globals.js (100%) rename tests/compiler/{features => }/mutable-globals.json (100%) rename tests/compiler/{features => }/mutable-globals.optimized.wat (54%) rename tests/compiler/{features => }/mutable-globals.ts (100%) create mode 100644 tests/compiler/mutable-globals.untouched.wat rename tests/compiler/{features => }/nontrapping-f2i.json (100%) rename tests/compiler/{features => }/nontrapping-f2i.optimized.wat (100%) rename tests/compiler/{features => }/nontrapping-f2i.ts (100%) rename tests/compiler/{features => }/nontrapping-f2i.untouched.wat (98%) rename tests/compiler/{features => }/simd.json (100%) rename tests/compiler/{features => }/simd.optimized.wat (98%) rename tests/compiler/{features => }/simd.ts (100%) rename tests/compiler/{features => }/simd.untouched.wat (98%) diff --git a/tests/compiler/features/js-bigint-integration.js b/tests/compiler/bigint-integration.js similarity index 92% rename from tests/compiler/features/js-bigint-integration.js rename to tests/compiler/bigint-integration.js index 7519fea873..9d71ce0200 100644 --- a/tests/compiler/features/js-bigint-integration.js +++ b/tests/compiler/bigint-integration.js @@ -1,6 +1,6 @@ exports.preInstantiate = function(imports, exports) { const externalValue = 9007199254740991n; - imports["js-bigint-integration"] = { + imports["bigint-integration"] = { externalValue, getExternalValue: function() { return externalValue; diff --git a/tests/compiler/features/js-bigint-integration.json b/tests/compiler/bigint-integration.json similarity index 100% rename from tests/compiler/features/js-bigint-integration.json rename to tests/compiler/bigint-integration.json diff --git a/tests/compiler/bigint-integration.optimized.wat b/tests/compiler/bigint-integration.optimized.wat new file mode 100644 index 0000000000..18689520d7 --- /dev/null +++ b/tests/compiler/bigint-integration.optimized.wat @@ -0,0 +1,50 @@ +(module + (type $none_=>_i64 (func (result i64))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_none (func)) + (import "bigint-integration" "externalValue" (global $bigint-integration/externalValue i64)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "bigint-integration" "getExternalValue" (func $bigint-integration/getExternalValue (result i64))) + (global $bigint-integration/internalValue i64 (i64.const 9007199254740991)) + (global $~started (mut i32) (i32.const 0)) + (memory $0 1) + (data (i32.const 1036) "<") + (data (i32.const 1048) "\01\00\00\00*\00\00\00b\00i\00g\00i\00n\00t\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s") + (export "internalValue" (global $bigint-integration/internalValue)) + (export "getInternalValue" (func $bigint-integration/getInternalValue)) + (export "memory" (memory $0)) + (export "_start" (func $~start)) + (func $bigint-integration/getInternalValue (result i64) + i64.const 9007199254740991 + ) + (func $~start + global.get $~started + if + return + end + i32.const 1 + global.set $~started + global.get $bigint-integration/externalValue + i64.const 9007199254740991 + i64.ne + if + i32.const 0 + i32.const 1056 + i32.const 4 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + call $bigint-integration/getExternalValue + global.get $bigint-integration/externalValue + i64.ne + if + i32.const 0 + i32.const 1056 + i32.const 5 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) +) diff --git a/tests/compiler/features/js-bigint-integration.ts b/tests/compiler/bigint-integration.ts similarity index 100% rename from tests/compiler/features/js-bigint-integration.ts rename to tests/compiler/bigint-integration.ts diff --git a/tests/compiler/bigint-integration.untouched.wat b/tests/compiler/bigint-integration.untouched.wat new file mode 100644 index 0000000000..5d3e94cfba --- /dev/null +++ b/tests/compiler/bigint-integration.untouched.wat @@ -0,0 +1,59 @@ +(module + (type $none_=>_i64 (func (result i64))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (import "bigint-integration" "externalValue" (global $bigint-integration/externalValue i64)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "bigint-integration" "getExternalValue" (func $bigint-integration/getExternalValue (result i64))) + (global $bigint-integration/internalValue i64 (i64.const 9007199254740991)) + (global $~lib/memory/__data_end i32 (i32.const 76)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16460)) + (global $~lib/memory/__heap_base i32 (i32.const 16460)) + (global $~started (mut i32) (i32.const 0)) + (memory $0 1) + (data (i32.const 12) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00*\00\00\00b\00i\00g\00i\00n\00t\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s\00\00\00") + (table $0 1 funcref) + (elem $0 (i32.const 1)) + (export "internalValue" (global $bigint-integration/internalValue)) + (export "getInternalValue" (func $bigint-integration/getInternalValue)) + (export "memory" (memory $0)) + (export "_start" (func $~start)) + (func $start:bigint-integration + global.get $bigint-integration/externalValue + i64.const 9007199254740991 + i64.eq + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 4 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + call $bigint-integration/getExternalValue + global.get $bigint-integration/externalValue + i64.eq + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 5 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $bigint-integration/getInternalValue (result i64) + global.get $bigint-integration/internalValue + ) + (func $~start + global.get $~started + if + return + end + i32.const 1 + global.set $~started + call $start:bigint-integration + ) +) diff --git a/tests/compiler/features/README.md b/tests/compiler/features/README.md index 883099ce5e..30ac70c4d5 100644 --- a/tests/compiler/features/README.md +++ b/tests/compiler/features/README.md @@ -1 +1 @@ -Test cases for post-MVP WebAssembly features. \ No newline at end of file +Test cases for future WebAssembly features. diff --git a/tests/compiler/features/js-bigint-integration.optimized.wat b/tests/compiler/features/js-bigint-integration.optimized.wat deleted file mode 100644 index 66c0fd825a..0000000000 --- a/tests/compiler/features/js-bigint-integration.optimized.wat +++ /dev/null @@ -1,50 +0,0 @@ -(module - (type $none_=>_i64 (func (result i64))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_none (func)) - (import "js-bigint-integration" "externalValue" (global $features/js-bigint-integration/externalValue i64)) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "js-bigint-integration" "getExternalValue" (func $features/js-bigint-integration/getExternalValue (result i64))) - (global $features/js-bigint-integration/internalValue i64 (i64.const 9007199254740991)) - (global $~started (mut i32) (i32.const 0)) - (memory $0 1) - (data (i32.const 1036) "\\") - (data (i32.const 1048) "\01\00\00\00B\00\00\00f\00e\00a\00t\00u\00r\00e\00s\00/\00j\00s\00-\00b\00i\00g\00i\00n\00t\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s") - (export "internalValue" (global $features/js-bigint-integration/internalValue)) - (export "getInternalValue" (func $features/js-bigint-integration/getInternalValue)) - (export "memory" (memory $0)) - (export "_start" (func $~start)) - (func $features/js-bigint-integration/getInternalValue (result i64) - i64.const 9007199254740991 - ) - (func $~start - global.get $~started - if - return - end - i32.const 1 - global.set $~started - global.get $features/js-bigint-integration/externalValue - i64.const 9007199254740991 - i64.ne - if - i32.const 0 - i32.const 1056 - i32.const 4 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - call $features/js-bigint-integration/getExternalValue - global.get $features/js-bigint-integration/externalValue - i64.ne - if - i32.const 0 - i32.const 1056 - i32.const 5 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - ) -) diff --git a/tests/compiler/features/js-bigint-integration.untouched.wat b/tests/compiler/features/js-bigint-integration.untouched.wat deleted file mode 100644 index 6701fd6e66..0000000000 --- a/tests/compiler/features/js-bigint-integration.untouched.wat +++ /dev/null @@ -1,59 +0,0 @@ -(module - (type $none_=>_i64 (func (result i64))) - (type $none_=>_none (func)) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (import "js-bigint-integration" "externalValue" (global $features/js-bigint-integration/externalValue i64)) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "js-bigint-integration" "getExternalValue" (func $features/js-bigint-integration/getExternalValue (result i64))) - (global $features/js-bigint-integration/internalValue i64 (i64.const 9007199254740991)) - (global $~lib/memory/__data_end i32 (i32.const 108)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16492)) - (global $~lib/memory/__heap_base i32 (i32.const 16492)) - (global $~started (mut i32) (i32.const 0)) - (memory $0 1) - (data (i32.const 12) "\\\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00B\00\00\00f\00e\00a\00t\00u\00r\00e\00s\00/\00j\00s\00-\00b\00i\00g\00i\00n\00t\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00") - (table $0 1 funcref) - (elem $0 (i32.const 1)) - (export "internalValue" (global $features/js-bigint-integration/internalValue)) - (export "getInternalValue" (func $features/js-bigint-integration/getInternalValue)) - (export "memory" (memory $0)) - (export "_start" (func $~start)) - (func $start:features/js-bigint-integration - global.get $features/js-bigint-integration/externalValue - i64.const 9007199254740991 - i64.eq - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 4 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - call $features/js-bigint-integration/getExternalValue - global.get $features/js-bigint-integration/externalValue - i64.eq - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 5 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - ) - (func $features/js-bigint-integration/getInternalValue (result i64) - global.get $features/js-bigint-integration/internalValue - ) - (func $~start - global.get $~started - if - return - end - i32.const 1 - global.set $~started - call $start:features/js-bigint-integration - ) -) diff --git a/tests/compiler/features/mutable-globals.untouched.wat b/tests/compiler/features/mutable-globals.untouched.wat deleted file mode 100644 index 9138b7a324..0000000000 --- a/tests/compiler/features/mutable-globals.untouched.wat +++ /dev/null @@ -1,86 +0,0 @@ -(module - (type $none_=>_none (func)) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (import "mutable-globals" "external" (global $features/mutable-globals/external (mut i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (global $features/mutable-globals/internal (mut i32) (i32.const 124)) - (global $~lib/memory/__data_end i32 (i32.const 92)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16476)) - (global $~lib/memory/__heap_base i32 (i32.const 16476)) - (global $~started (mut i32) (i32.const 0)) - (memory $0 1) - (data (i32.const 12) "L\00\00\00\00\00\00\00\00\00\00\00\01\00\00\006\00\00\00f\00e\00a\00t\00u\00r\00e\00s\00/\00m\00u\00t\00a\00b\00l\00e\00-\00g\00l\00o\00b\00a\00l\00s\00.\00t\00s\00\00\00\00\00\00\00") - (table $0 1 funcref) - (elem $0 (i32.const 1)) - (export "external" (global $features/mutable-globals/external)) - (export "internal" (global $features/mutable-globals/internal)) - (export "memory" (memory $0)) - (export "_start" (func $~start)) - (func $start:features/mutable-globals - global.get $features/mutable-globals/external - i32.const 123 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 5 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $features/mutable-globals/internal - i32.const 124 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 6 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $features/mutable-globals/external - i32.const 10 - i32.add - global.set $features/mutable-globals/external - global.get $features/mutable-globals/internal - i32.const 10 - i32.add - global.set $features/mutable-globals/internal - global.get $features/mutable-globals/external - i32.const 133 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 11 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $features/mutable-globals/internal - i32.const 134 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 12 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - ) - (func $~start - global.get $~started - if - return - end - i32.const 1 - global.set $~started - call $start:features/mutable-globals - ) -) diff --git a/tests/compiler/features/mutable-globals.js b/tests/compiler/mutable-globals.js similarity index 100% rename from tests/compiler/features/mutable-globals.js rename to tests/compiler/mutable-globals.js diff --git a/tests/compiler/features/mutable-globals.json b/tests/compiler/mutable-globals.json similarity index 100% rename from tests/compiler/features/mutable-globals.json rename to tests/compiler/mutable-globals.json diff --git a/tests/compiler/features/mutable-globals.optimized.wat b/tests/compiler/mutable-globals.optimized.wat similarity index 54% rename from tests/compiler/features/mutable-globals.optimized.wat rename to tests/compiler/mutable-globals.optimized.wat index 3830fabfa0..e3bf3f53fc 100644 --- a/tests/compiler/features/mutable-globals.optimized.wat +++ b/tests/compiler/mutable-globals.optimized.wat @@ -1,15 +1,15 @@ (module (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_none (func)) - (import "mutable-globals" "external" (global $features/mutable-globals/external (mut i32))) + (import "mutable-globals" "external" (global $mutable-globals/external (mut i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (global $features/mutable-globals/internal (mut i32) (i32.const 124)) + (global $mutable-globals/internal (mut i32) (i32.const 124)) (global $~started (mut i32) (i32.const 0)) (memory $0 1) - (data (i32.const 1036) "L") - (data (i32.const 1048) "\01\00\00\006\00\00\00f\00e\00a\00t\00u\00r\00e\00s\00/\00m\00u\00t\00a\00b\00l\00e\00-\00g\00l\00o\00b\00a\00l\00s\00.\00t\00s") - (export "external" (global $features/mutable-globals/external)) - (export "internal" (global $features/mutable-globals/internal)) + (data (i32.const 1036) "<") + (data (i32.const 1048) "\01\00\00\00$\00\00\00m\00u\00t\00a\00b\00l\00e\00-\00g\00l\00o\00b\00a\00l\00s\00.\00t\00s") + (export "external" (global $mutable-globals/external)) + (export "internal" (global $mutable-globals/internal)) (export "memory" (memory $0)) (export "_start" (func $~start)) (func $~start @@ -19,7 +19,7 @@ end i32.const 1 global.set $~started - global.get $features/mutable-globals/external + global.get $mutable-globals/external i32.const 123 i32.ne if @@ -30,7 +30,7 @@ call $~lib/builtins/abort unreachable end - global.get $features/mutable-globals/internal + global.get $mutable-globals/internal i32.const 124 i32.ne if @@ -41,15 +41,15 @@ call $~lib/builtins/abort unreachable end - global.get $features/mutable-globals/external + global.get $mutable-globals/external i32.const 10 i32.add - global.set $features/mutable-globals/external - global.get $features/mutable-globals/internal + global.set $mutable-globals/external + global.get $mutable-globals/internal i32.const 10 i32.add - global.set $features/mutable-globals/internal - global.get $features/mutable-globals/external + global.set $mutable-globals/internal + global.get $mutable-globals/external i32.const 133 i32.ne if @@ -60,7 +60,7 @@ call $~lib/builtins/abort unreachable end - global.get $features/mutable-globals/internal + global.get $mutable-globals/internal i32.const 134 i32.ne if diff --git a/tests/compiler/features/mutable-globals.ts b/tests/compiler/mutable-globals.ts similarity index 100% rename from tests/compiler/features/mutable-globals.ts rename to tests/compiler/mutable-globals.ts diff --git a/tests/compiler/mutable-globals.untouched.wat b/tests/compiler/mutable-globals.untouched.wat new file mode 100644 index 0000000000..eb3914cc4b --- /dev/null +++ b/tests/compiler/mutable-globals.untouched.wat @@ -0,0 +1,86 @@ +(module + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (import "mutable-globals" "external" (global $mutable-globals/external (mut i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $mutable-globals/internal (mut i32) (i32.const 124)) + (global $~lib/memory/__data_end i32 (i32.const 76)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16460)) + (global $~lib/memory/__heap_base i32 (i32.const 16460)) + (global $~started (mut i32) (i32.const 0)) + (memory $0 1) + (data (i32.const 12) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00m\00u\00t\00a\00b\00l\00e\00-\00g\00l\00o\00b\00a\00l\00s\00.\00t\00s\00\00\00\00\00\00\00\00\00") + (table $0 1 funcref) + (elem $0 (i32.const 1)) + (export "external" (global $mutable-globals/external)) + (export "internal" (global $mutable-globals/internal)) + (export "memory" (memory $0)) + (export "_start" (func $~start)) + (func $start:mutable-globals + global.get $mutable-globals/external + i32.const 123 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 5 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $mutable-globals/internal + i32.const 124 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 6 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $mutable-globals/external + i32.const 10 + i32.add + global.set $mutable-globals/external + global.get $mutable-globals/internal + i32.const 10 + i32.add + global.set $mutable-globals/internal + global.get $mutable-globals/external + i32.const 133 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 11 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $mutable-globals/internal + i32.const 134 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 12 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $~start + global.get $~started + if + return + end + i32.const 1 + global.set $~started + call $start:mutable-globals + ) +) diff --git a/tests/compiler/features/nontrapping-f2i.json b/tests/compiler/nontrapping-f2i.json similarity index 100% rename from tests/compiler/features/nontrapping-f2i.json rename to tests/compiler/nontrapping-f2i.json diff --git a/tests/compiler/features/nontrapping-f2i.optimized.wat b/tests/compiler/nontrapping-f2i.optimized.wat similarity index 100% rename from tests/compiler/features/nontrapping-f2i.optimized.wat rename to tests/compiler/nontrapping-f2i.optimized.wat diff --git a/tests/compiler/features/nontrapping-f2i.ts b/tests/compiler/nontrapping-f2i.ts similarity index 100% rename from tests/compiler/features/nontrapping-f2i.ts rename to tests/compiler/nontrapping-f2i.ts diff --git a/tests/compiler/features/nontrapping-f2i.untouched.wat b/tests/compiler/nontrapping-f2i.untouched.wat similarity index 98% rename from tests/compiler/features/nontrapping-f2i.untouched.wat rename to tests/compiler/nontrapping-f2i.untouched.wat index 0b8a046ea5..c8db2f898d 100644 --- a/tests/compiler/features/nontrapping-f2i.untouched.wat +++ b/tests/compiler/nontrapping-f2i.untouched.wat @@ -21,7 +21,7 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (export "_start" (func $~start)) - (func $start:features/nontrapping-f2i + (func $start:nontrapping-f2i global.get $~lib/builtins/f32.MAX_VALUE i32.trunc_sat_f32_s global.get $~lib/builtins/i32.MAX_VALUE @@ -158,6 +158,6 @@ end i32.const 1 global.set $~started - call $start:features/nontrapping-f2i + call $start:nontrapping-f2i ) ) diff --git a/tests/compiler/features/simd.json b/tests/compiler/simd.json similarity index 100% rename from tests/compiler/features/simd.json rename to tests/compiler/simd.json diff --git a/tests/compiler/features/simd.optimized.wat b/tests/compiler/simd.optimized.wat similarity index 98% rename from tests/compiler/features/simd.optimized.wat rename to tests/compiler/simd.optimized.wat index dbcb2db121..0074eb86f8 100644 --- a/tests/compiler/features/simd.optimized.wat +++ b/tests/compiler/simd.optimized.wat @@ -12,8 +12,8 @@ (data (i32.const 1048) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 1100) "<") (data (i32.const 1112) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1164) "<") - (data (i32.const 1176) "\01\00\00\00 \00\00\00f\00e\00a\00t\00u\00r\00e\00s\00/\00s\00i\00m\00d\00.\00t\00s") + (data (i32.const 1164) ",") + (data (i32.const 1176) "\01\00\00\00\0e\00\00\00s\00i\00m\00d\00.\00t\00s") (export "memory" (memory $0)) (start $~start) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) @@ -547,10 +547,10 @@ if unreachable end - i32.const 17616 + i32.const 17600 i32.const 0 i32.store - i32.const 19184 + i32.const 19168 i32.const 0 i32.store loop $for-loop|0 @@ -561,7 +561,7 @@ local.get $0 i32.const 2 i32.shl - i32.const 17616 + i32.const 17600 i32.add i32.const 0 i32.store offset=4 @@ -579,7 +579,7 @@ i32.add i32.const 2 i32.shl - i32.const 17616 + i32.const 17600 i32.add i32.const 0 i32.store offset=96 @@ -597,13 +597,13 @@ br $for-loop|0 end end - i32.const 17616 - i32.const 19188 + i32.const 17600 + i32.const 19172 memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory - i32.const 17616 + i32.const 17600 global.set $~lib/rt/tlsf/ROOT ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) @@ -929,7 +929,7 @@ (local $1 i32) (local $2 i32) local.get $0 - i32.const 17612 + i32.const 17596 i32.lt_u if return diff --git a/tests/compiler/features/simd.ts b/tests/compiler/simd.ts similarity index 100% rename from tests/compiler/features/simd.ts rename to tests/compiler/simd.ts diff --git a/tests/compiler/features/simd.untouched.wat b/tests/compiler/simd.untouched.wat similarity index 98% rename from tests/compiler/features/simd.untouched.wat rename to tests/compiler/simd.untouched.wat index dbc3bd91cf..d7f857e0d3 100644 --- a/tests/compiler/features/simd.untouched.wat +++ b/tests/compiler/simd.untouched.wat @@ -17,13 +17,13 @@ (global $~lib/builtins/u8.MAX_VALUE i32 (i32.const 255)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) (global $~lib/builtins/u16.MAX_VALUE i32 (i32.const 65535)) - (global $~lib/memory/__data_end i32 (i32.const 204)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16588)) - (global $~lib/memory/__heap_base i32 (i32.const 16588)) + (global $~lib/memory/__data_end i32 (i32.const 188)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16572)) + (global $~lib/memory/__heap_base i32 (i32.const 16572)) (memory $0 1) (data (i32.const 12) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 76) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") - (data (i32.const 140) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00f\00e\00a\00t\00u\00r\00e\00s\00/\00s\00i\00m\00d\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 140) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00s\00i\00m\00d\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (elem $0 (i32.const 1)) (export "memory" (memory $0)) @@ -1457,7 +1457,7 @@ call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $features/simd/test_v128 + (func $simd/test_v128 (local $0 i32) v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000 v128.any_true @@ -1693,7 +1693,7 @@ local.get $0 call $~lib/rt/tlsf/__free ) - (func $features/simd/test_i8x16 + (func $simd/test_i8x16 (local $0 v128) (local $1 v128) (local $2 v128) @@ -2271,7 +2271,7 @@ unreachable end ) - (func $features/simd/test_i16x8 + (func $simd/test_i16x8 (local $0 v128) (local $1 v128) (local $2 v128) @@ -2956,7 +2956,7 @@ i16x8.extmul_high_i8x16_u drop ) - (func $features/simd/test_i32x4 + (func $simd/test_i32x4 (local $0 v128) (local $1 v128) (local $2 v128) @@ -3553,7 +3553,7 @@ i32x4.extmul_high_i16x8_u drop ) - (func $features/simd/test_i64x2 + (func $simd/test_i64x2 (local $0 v128) (local $1 v128) (local $2 v128) @@ -3830,7 +3830,7 @@ i64x2.extmul_high_i32x4_u drop ) - (func $features/simd/test_f32x4 + (func $simd/test_f32x4 (local $0 v128) (local $1 v128) (local $2 v128) @@ -4239,7 +4239,7 @@ f32x4.demote_f64x2_zero drop ) - (func $features/simd/test_f64x2 + (func $simd/test_f64x2 (local $0 v128) (local $1 v128) (local $2 v128) @@ -4634,26 +4634,26 @@ f64x2.promote_low_f32x4 drop ) - (func $features/simd/test_const (result v128) + (func $simd/test_const (result v128) (local $0 v128) v128.const i32x4 0x00000001 0x00000001 0x00000001 0x00000001 local.set $0 local.get $0 ) - (func $start:features/simd + (func $start:simd i32.const 1 drop - call $features/simd/test_v128 - call $features/simd/test_i8x16 - call $features/simd/test_i16x8 - call $features/simd/test_i32x4 - call $features/simd/test_i64x2 - call $features/simd/test_f32x4 - call $features/simd/test_f64x2 - call $features/simd/test_const + call $simd/test_v128 + call $simd/test_i8x16 + call $simd/test_i16x8 + call $simd/test_i32x4 + call $simd/test_i64x2 + call $simd/test_f32x4 + call $simd/test_f64x2 + call $simd/test_const drop ) (func $~start - call $start:features/simd + call $start:simd ) ) From a69cffdf0bbd59dbfd7684668b7c9a28baf9fd17 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 14 Dec 2021 12:08:47 +0100 Subject: [PATCH 135/175] update CI --- .github/workflows/test.yml | 4 ++-- tests/compiler/features/exception-handling.json | 5 +++++ tests/compiler/features/exception-handling.optimized.wat | 4 ++++ tests/compiler/features/exception-handling.ts | 1 + tests/compiler/features/exception-handling.untouched.wat | 9 +++++++++ tests/compiler/features/reference-types.json | 1 - 6 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 tests/compiler/features/exception-handling.json create mode 100644 tests/compiler/features/exception-handling.optimized.wat create mode 100644 tests/compiler/features/exception-handling.ts create mode 100644 tests/compiler/features/exception-handling.untouched.wat diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8b8808bd99..78ea139082 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,9 +77,9 @@ jobs: run: npm run build - name: Test experimental features env: - ASC_FEATURES: threads,reference-types,bigint-integration,gc + ASC_FEATURES: threads,reference-types,gc,exception-handling run: | - npm run test:compiler rt/flags features/js-bigint-integration features/reference-types features/threads std-wasi/process std-wasi/crypto + npm run test:compiler features/threads features/reference-types features/gc features/exception-handling runtimes: name: "Runtimes" runs-on: ubuntu-latest diff --git a/tests/compiler/features/exception-handling.json b/tests/compiler/features/exception-handling.json new file mode 100644 index 0000000000..dfa6f975e5 --- /dev/null +++ b/tests/compiler/features/exception-handling.json @@ -0,0 +1,5 @@ +{ + "features": [ + "exception-handling" + ] +} diff --git a/tests/compiler/features/exception-handling.optimized.wat b/tests/compiler/features/exception-handling.optimized.wat new file mode 100644 index 0000000000..23da3862e2 --- /dev/null +++ b/tests/compiler/features/exception-handling.optimized.wat @@ -0,0 +1,4 @@ +(module + (memory $0 0) + (export "memory" (memory $0)) +) diff --git a/tests/compiler/features/exception-handling.ts b/tests/compiler/features/exception-handling.ts new file mode 100644 index 0000000000..70b786d12e --- /dev/null +++ b/tests/compiler/features/exception-handling.ts @@ -0,0 +1 @@ +// TODO diff --git a/tests/compiler/features/exception-handling.untouched.wat b/tests/compiler/features/exception-handling.untouched.wat new file mode 100644 index 0000000000..f4d95ad56d --- /dev/null +++ b/tests/compiler/features/exception-handling.untouched.wat @@ -0,0 +1,9 @@ +(module + (global $~lib/memory/__data_end i32 (i32.const 8)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16392)) + (global $~lib/memory/__heap_base i32 (i32.const 16392)) + (memory $0 0) + (table $0 1 funcref) + (elem $0 (i32.const 1)) + (export "memory" (memory $0)) +) diff --git a/tests/compiler/features/reference-types.json b/tests/compiler/features/reference-types.json index 8f72a8bff4..44dbffd87b 100644 --- a/tests/compiler/features/reference-types.json +++ b/tests/compiler/features/reference-types.json @@ -1,7 +1,6 @@ { "features": [ "reference-types", - "exception-handling", "gc" ], "asc_flags": [ From 9da0fddbd9c6b610df411553b03d616d843c4a9e Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 14 Dec 2021 13:31:41 +0100 Subject: [PATCH 136/175] keep simd behind a flag for now --- cli/options.json | 2 +- src/compiler.ts | 3 +- tests/compiler/asc-constants.untouched.wat | 4 +- tests/compiler/simd.json | 4 +- tests/compiler/simd.optimized.wat | 170 ++++++++++++++++++- tests/compiler/simd.ts | 8 +- tests/compiler/simd.untouched.wat | 22 +-- tests/compiler/std/staticarray.optimized.wat | 8 +- 8 files changed, 184 insertions(+), 37 deletions(-) diff --git a/cli/options.json b/cli/options.json index 14a2e8eaf4..09492d35b3 100644 --- a/cli/options.json +++ b/cli/options.json @@ -199,6 +199,7 @@ "Enables WebAssembly features being disabled by default.", "", " threads Threading and atomic operations.", + " simd SIMD types and operations.", " reference-types Reference types and operations.", " gc Garbage collection (WIP).", "" @@ -221,7 +222,6 @@ " sign-extension Sign-extension operations", " nontrapping-f2i Non-trapping float to integer ops.", " bulk-memory Bulk memory operations.", - " simd SIMD types and operations.", "" ], "type": "S", diff --git a/src/compiler.ts b/src/compiler.ts index 2a3dba6ed3..763f5ae182 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -248,8 +248,7 @@ export class Options { features: Feature = Feature.MUTABLE_GLOBALS | Feature.SIGN_EXTENSION | Feature.NONTRAPPING_F2I - | Feature.BULK_MEMORY - | Feature.SIMD; + | Feature.BULK_MEMORY; /** If true, disallows unsafe features in user code. */ noUnsafe: bool = false; /** If true, enables pedantic diagnostics. */ diff --git a/tests/compiler/asc-constants.untouched.wat b/tests/compiler/asc-constants.untouched.wat index 94fde223b3..8bd868089a 100644 --- a/tests/compiler/asc-constants.untouched.wat +++ b/tests/compiler/asc-constants.untouched.wat @@ -10,7 +10,7 @@ (global $~lib/native/ASC_FEATURE_MUTABLE_GLOBALS i32 (i32.const 1)) (global $~lib/native/ASC_FEATURE_NONTRAPPING_F2I i32 (i32.const 1)) (global $~lib/native/ASC_FEATURE_BULK_MEMORY i32 (i32.const 1)) - (global $~lib/native/ASC_FEATURE_SIMD i32 (i32.const 1)) + (global $~lib/native/ASC_FEATURE_SIMD i32 (i32.const 0)) (global $~lib/native/ASC_FEATURE_THREADS i32 (i32.const 0)) (global $~lib/native/ASC_FEATURE_EXCEPTION_HANDLING i32 (i32.const 0)) (global $~lib/native/ASC_FEATURE_TAIL_CALLS i32 (i32.const 0)) @@ -47,7 +47,7 @@ drop i32.const 1 drop - i32.const 1 + i32.const 0 drop i32.const 0 drop diff --git a/tests/compiler/simd.json b/tests/compiler/simd.json index 23ec5535fe..0a393fd610 100644 --- a/tests/compiler/simd.json +++ b/tests/compiler/simd.json @@ -1,5 +1,5 @@ { "asc_flags": [ - ], - "skipInstantiate": true + "--enable", "simd" + ] } diff --git a/tests/compiler/simd.optimized.wat b/tests/compiler/simd.optimized.wat index 0074eb86f8..d017cdf643 100644 --- a/tests/compiler/simd.optimized.wat +++ b/tests/compiler/simd.optimized.wat @@ -1124,7 +1124,7 @@ i32.store local.get $0 v128.load32_zero - v128.const i32x4 0x00000000 0x00000000 0x00000000 0x0000002a + v128.const i32x4 0x0000002a 0x00000000 0x00000000 0x00000000 i8x16.eq i8x16.all_true i32.eqz @@ -1153,7 +1153,7 @@ i64.store local.get $0 v128.load64_zero - v128.const i32x4 0x00000000 0x00000000 0x0000002a 0x00000000 + v128.const i32x4 0x0000002a 0x00000000 0x00000000 0x00000000 i8x16.eq i8x16.all_true i32.eqz @@ -1167,11 +1167,167 @@ end local.get $0 call $~lib/rt/tlsf/__free - i32.const 0 - i32.const 1184 - i32.const 263 + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i32.const 1 + i32.store8 + local.get $0 + i32.const 2 + i32.store8 offset=1 + local.get $0 i32.const 3 - call $~lib/builtins/abort - unreachable + i32.store8 offset=2 + local.get $0 + i32.const 4 + i32.store8 offset=3 + local.get $0 + i32.const 5 + i32.store8 offset=4 + local.get $0 + i32.const 6 + i32.store8 offset=5 + local.get $0 + i32.const 7 + i32.store8 offset=6 + local.get $0 + i32.const 255 + i32.store8 offset=7 + local.get $0 + v128.load8x8_s align=1 + v128.const i32x4 0x00020001 0x00040003 0x00060005 0xffff0007 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 392 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + v128.load8x8_u align=1 + v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00ff0007 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 397 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/tlsf/__free + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i32.const 1 + i32.store16 + local.get $0 + i32.const 2 + i32.store16 offset=2 + local.get $0 + i32.const 3 + i32.store16 offset=4 + local.get $0 + i32.const 65535 + i32.store16 offset=6 + local.get $0 + v128.load16x4_s align=2 + v128.const i32x4 0x00000001 0x00000002 0x00000003 0xffffffff + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 523 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + v128.load16x4_u align=2 + v128.const i32x4 0x00000001 0x00000002 0x00000003 0x0000ffff + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 528 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/tlsf/__free + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i32.const 1 + i32.store + local.get $0 + i32.const -1 + i32.store offset=4 + local.get $0 + v128.load32x2_s align=4 + v128.const i32x4 0x00000001 0x00000000 0xffffffff 0xffffffff + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 582 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + v128.load32x2_u align=4 + v128.const i32x4 0x00000001 0x00000000 0xffffffff 0x00000000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 587 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/tlsf/__free ) ) diff --git a/tests/compiler/simd.ts b/tests/compiler/simd.ts index 432c715838..7abe0e8c82 100644 --- a/tests/compiler/simd.ts +++ b/tests/compiler/simd.ts @@ -107,7 +107,7 @@ function test_v128(): void { assert( v128.load32_zero(ptr) == - v128(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0) + v128(42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) ); __free(ptr); } @@ -117,7 +117,7 @@ function test_v128(): void { assert( v128.load64_zero(ptr) == - v128(0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0) + v128(42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) ); __free(ptr); } @@ -259,8 +259,8 @@ function test_i8x16(): void { == v128(0, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) ); + assert(i8x16.popcnt(a) == v128(0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4)); } - assert(i8x16.popcnt(a) == v128(0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4)); } function test_i16x8(): void { @@ -404,7 +404,7 @@ function test_i16x8(): void { assert(i16x8.q15mulr_sat_s( i16x8(-1, -16383, 32765, 65535, -32768, 65535, -16385, -32768), i16x8(-1, -16384, 1, -32768, -32768, 1, -16384, -10) - ) == i16x8(0, 8192, 1, 1, 32767, 0, 8193, 1)); + ) == i16x8(0, 8192, 1, 1, 32767, 0, 8193, 10)); // TODO: unimp in Binaryen's interpreter i16x8.extadd_pairwise_i8x16_s(a); diff --git a/tests/compiler/simd.untouched.wat b/tests/compiler/simd.untouched.wat index d7f857e0d3..d226d7e47d 100644 --- a/tests/compiler/simd.untouched.wat +++ b/tests/compiler/simd.untouched.wat @@ -1652,7 +1652,7 @@ i32.store local.get $0 v128.load32_zero - v128.const i32x4 0x00000000 0x00000000 0x00000000 0x0000002a + v128.const i32x4 0x0000002a 0x00000000 0x00000000 0x00000000 i8x16.eq i8x16.all_true i32.const 0 @@ -1676,7 +1676,7 @@ i64.store local.get $0 v128.load64_zero - v128.const i32x4 0x00000000 0x00000000 0x0000002a 0x00000000 + v128.const i32x4 0x0000002a 0x00000000 0x00000000 0x00000000 i8x16.eq i8x16.all_true i32.const 0 @@ -2254,7 +2254,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $7 i8x16.popcnt v128.const i32x4 0x02010100 0x03020201 0x03020201 0x04030302 i8x16.eq @@ -2265,8 +2265,8 @@ if i32.const 0 i32.const 160 - i32.const 263 - i32.const 3 + i32.const 262 + i32.const 5 call $~lib/builtins/abort unreachable end @@ -2919,20 +2919,12 @@ v128.const i32x4 0xc001ffff 0xffff7ffd 0xffff8000 0x8000bfff v128.const i32x4 0xc000ffff 0x80000001 0x00018000 0xfff6c000 i16x8.q15mulr_sat_s - v128.const i32x4 0x20000000 0x00010001 0x00007fff 0x00012001 + v128.const i32x4 0x20000000 0x00010001 0x00007fff 0x000a2001 i8x16.eq i8x16.all_true i32.const 0 i32.ne - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 404 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + drop local.get $0 i16x8.extadd_pairwise_i8x16_s drop diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index d6de2f879b..80dd3c5bc0 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -4336,8 +4336,8 @@ call $~lib/rt/itcms/__new local.tee $2 i32.const 2592 - v128.load align=1 - v128.store align=1 + i32.const 16 + memory.copy local.get $2 i32.store offset=16 i32.const 1 @@ -6089,8 +6089,8 @@ call $~lib/rt/itcms/__new local.tee $1 i32.const 3664 - v128.load align=1 - v128.store align=1 + i32.const 16 + memory.copy local.get $1 i32.store offset=28 i32.const 0 From e2ac2d315eff37e28e8251c62c56f8bf90e5fdf0 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 14 Dec 2021 14:34:09 +0100 Subject: [PATCH 137/175] add timing util --- tests/compiler.js | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/tests/compiler.js b/tests/compiler.js index a53cacc300..962b4e6065 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -88,15 +88,23 @@ function getTests() { return tests; } +function measureStart() { + return process.hrtime(); +} + +function measureEnd(start) { + const hrtime = process.hrtime(start); + return `${(hrtime[0] * 1e9 + hrtime[1] / 1e6).toFixed(3)} ms`; +} + // Starts a new section within a test function section(title) { - const start = process.hrtime(); + const start = measureStart(); console.log("- " + title); return { title, end(code) { - const hrtime = process.hrtime(start); - const time = `${(hrtime[0] * 1e9 + hrtime[1] / 1e6).toFixed(3)} ms`; + const time = measureEnd(start); switch (code) { case SUCCESS: console.log(" " + stdoutColors.green("SUCCESS") + " (" + time + ")\n"); break; default: console.log(" " + stdoutColors.red("FAILURE") + " (" + time + ")\n"); break; @@ -379,31 +387,42 @@ async function testInstantiate(binaryBuffer, glue, stderr, wasiOptions) { }); if (glue.preInstantiate) { - console.log(" [call preInstantiate]"); + console.log(" [invoke glue.preInstantiate]"); + const start = measureStart(); glue.preInstantiate(imports, exports); + console.log(" [return glue.preInstantiate] " + measureEnd(start)); } const wasi = wasiOptions ? new WASI(wasiOptions) : null; if (wasi) imports.wasi_snapshot_preview1 = wasi.wasiImport; const { instance } = await WebAssembly.instantiate(binaryBuffer, imports); Object.setPrototypeOf(exports, instance.exports); if (glue.postInstantiate) { - console.log(" [call postInstantiate]"); + console.log(" [invoke glue.postInstantiate]"); + const start = measureStart(); glue.postInstantiate(instance); + console.log(" [return glue.postInstantiate] " + measureEnd(start)); } if (wasi) { - console.log(" [wasi start]"); + console.log(" [invoke wasi.start]"); + const start = measureStart(); const code = wasi.start(instance); - console.log(" [wasi exit] code=" + code); + console.log(" [return wasi.start] code=" + code + ", " + measureEnd(start)); } else if (exports._start) { - console.log(" [call _start]"); + console.log(" [invoke exports._start]"); + const start = measureStart(); exports._start(); + console.log(" [return exports._start] " + measureEnd(start)); } else if (exports._initialize) { - console.log(" [call _initialize]"); + console.log(" [invoke exports._initialize]"); + const start = measureStart(); exports._initialize(); + console.log(" [return exports._initialize] " + measureEnd(start)); } if (glue.postStart) { - console.log(" [call postStart]"); + console.log(" [invoke glue.postStart]"); + const start = measureStart(); glue.postStart(instance); + console.log(" [return glue.postStart] " + measureEnd(start)); } const leakCount = rtrace.check(); if (leakCount) { From 75328a995af2baf5b3934316327c9fb82eb4e8e8 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 15 Dec 2021 10:22:53 +0100 Subject: [PATCH 138/175] tackle === vs == --- src/ast.ts | 8 +- src/builtins.ts | 3 + src/compiler.ts | 30 +- src/extra/ast.ts | 4 +- src/flow.ts | 73 +- src/types.ts | 10 +- std/assembly/array.ts | 6 +- std/assembly/arraybuffer.ts | 2 +- std/assembly/map.ts | 2 +- std/assembly/object.ts | 4 +- std/assembly/set.ts | 2 +- std/assembly/staticarray.ts | 4 +- std/assembly/string.ts | 22 +- std/assembly/symbol.ts | 4 +- std/assembly/util/hash.ts | 2 +- std/assembly/util/memory.ts | 2 +- std/assembly/util/sort.ts | 2 +- std/assembly/util/string.ts | 15 +- std/assembly/wasi/index.ts | 4 +- std/portable/index.js | 4 +- tests/compiler/NonNullable.optimized.wat | 216 +++--- tests/compiler/NonNullable.untouched.wat | 48 +- tests/compiler/builtins.optimized.wat | 4 +- tests/compiler/builtins.untouched.wat | 8 +- tests/compiler/class-implements.ts | 4 +- tests/compiler/features/reference-types.ts | 8 +- tests/compiler/instanceof.ts | 2 +- tests/compiler/issues/1225.ts | 4 +- tests/compiler/issues/1699.ts | 4 +- tests/compiler/issues/1714.optimized.wat | 37 + tests/compiler/issues/1714.ts | 2 +- tests/compiler/issues/1714.untouched.wat | 206 +++++- tests/compiler/resolve-binary.optimized.wat | 630 ++++++++---------- tests/compiler/resolve-binary.ts | 14 +- tests/compiler/resolve-binary.untouched.wat | 473 ++++++------- tests/compiler/std-wasi/console.optimized.wat | 267 ++++---- tests/compiler/std-wasi/console.untouched.wat | 306 ++++----- tests/compiler/std-wasi/crypto.optimized.wat | 15 +- tests/compiler/std-wasi/crypto.untouched.wat | 159 ++++- tests/compiler/std-wasi/process.optimized.wat | 267 ++++---- tests/compiler/std-wasi/process.untouched.wat | 306 ++++----- tests/compiler/std/array.optimized.wat | 452 ++++++------- tests/compiler/std/array.ts | 4 +- tests/compiler/std/array.untouched.wat | 51 +- tests/compiler/std/arraybuffer.ts | 2 +- tests/compiler/std/dataview.ts | 224 +++---- tests/compiler/std/pointer.ts | 4 +- tests/compiler/std/staticarray.optimized.wat | 6 - tests/compiler/std/staticarray.untouched.wat | 10 - tests/compiler/std/string-nonnull.json | 4 + .../compiler/std/string-nonnull.optimized.wat | 49 ++ tests/compiler/std/string-nonnull.ts | 13 + .../compiler/std/string-nonnull.untouched.wat | 280 ++++++++ tests/compiler/std/symbol.optimized.wat | 14 + tests/compiler/std/symbol.ts | 8 +- tests/compiler/std/symbol.untouched.wat | 14 +- tests/compiler/std/typedarray.ts | 2 +- tests/compiler/std/uri.optimized.wat | 26 +- tests/compiler/std/uri.ts | 4 +- tests/compiler/std/uri.untouched.wat | 28 +- tests/compiler/typeof.optimized.wat | 159 +++-- tests/compiler/typeof.ts | 4 +- tests/compiler/typeof.untouched.wat | 140 ++-- tests/compiler/wasi/abort.untouched.wat | 161 ++++- tests/compiler/wasi/trace.optimized.wat | 15 +- tests/compiler/wasi/trace.untouched.wat | 161 ++++- 66 files changed, 3054 insertions(+), 1964 deletions(-) create mode 100644 tests/compiler/std/string-nonnull.json create mode 100644 tests/compiler/std/string-nonnull.optimized.wat create mode 100644 tests/compiler/std/string-nonnull.ts create mode 100644 tests/compiler/std/string-nonnull.untouched.wat diff --git a/src/ast.ts b/src/ast.ts index 6ed44eeeeb..eb990c048a 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -824,7 +824,7 @@ export abstract class TypeNode extends Node { let namedTypeNode = changetype(this); // TS if (!namedTypeNode.name.next) { let typeArgumentNodes = namedTypeNode.typeArguments; - if (typeArgumentNodes !== null && typeArgumentNodes.length > 0) { + if (typeArgumentNodes && typeArgumentNodes.length > 0) { for (let i = 0, k = typeArgumentNodes.length; i < k; ++i) { if (typeArgumentNodes[i].hasGenericComponent(typeParameterNodes)) return true; } @@ -843,7 +843,7 @@ export abstract class TypeNode extends Node { } if (functionTypeNode.returnType.hasGenericComponent(typeParameterNodes)) return true; let explicitThisType = functionTypeNode.explicitThisType; - if (explicitThisType !== null && explicitThisType.hasGenericComponent(typeParameterNodes)) return true; + if (explicitThisType && explicitThisType.hasGenericComponent(typeParameterNodes)) return true; } else { assert(false); } @@ -883,7 +883,7 @@ export class NamedTypeNode extends TypeNode { /** Checks if this type node has type arguments. */ get hasTypeArguments(): bool { var typeArguments = this.typeArguments; - return typeArguments !== null && typeArguments.length > 0; + return typeArguments != null && typeArguments.length > 0; } } @@ -1339,7 +1339,7 @@ export class NewExpression extends Expression { get typeArgumentsRange(): Range { var typeArguments = this.typeArguments; var numTypeArguments: i32; - if (typeArguments !== null && (numTypeArguments = typeArguments.length) > 0) { + if (typeArguments && (numTypeArguments = typeArguments.length) > 0) { return Range.join(typeArguments[0].range, typeArguments[numTypeArguments - 1].range); } return this.typeName.range; diff --git a/src/builtins.ts b/src/builtins.ts index bc01631145..994541cfc0 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -700,6 +700,9 @@ export namespace BuiltinNames { // std/string.ts export const String_raw = "~lib/string/String.raw"; + export const String_eq = "~lib/string/String.__eq"; + export const String_ne = "~lib/string/String.__ne"; + export const String_not = "~lib/string/String.__not"; // std/bindings/wasi.ts export const wasiAbort = "~lib/wasi/index/abort"; diff --git a/src/compiler.ts b/src/compiler.ts index 763f5ae182..2659adfde0 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -4069,16 +4069,13 @@ export class Compiler extends DiagnosticEmitter { leftType = this.currentType; // check operator overload - if (operator == Token.EQUALS_EQUALS) { // can't overload '===' - let classReference = leftType.getClassOrWrapper(this.program); - if (classReference) { - let overload = classReference.lookupOverload(OperatorKind.EQ); - if (overload) { - expr = this.compileBinaryOverload(overload, left, leftExpr, leftType, right, expression); - break; - } + let classReference = leftType.getClassOrWrapper(this.program); + if (classReference) { + let overload = classReference.lookupOverload(OperatorKind.EQ); + if (overload) { + expr = this.compileBinaryOverload(overload, left, leftExpr, leftType, right, expression); + break; } - // fall back to compare by value } rightExpr = this.compileExpression(right, leftType); @@ -4108,16 +4105,13 @@ export class Compiler extends DiagnosticEmitter { leftType = this.currentType; // check operator overload - if (operator == Token.EXCLAMATION_EQUALS) { // can't overload '!==' - let classReference = leftType.getClass(); - if (classReference) { - let overload = classReference.lookupOverload(OperatorKind.NE); - if (overload) { - expr = this.compileBinaryOverload(overload, left, leftExpr, leftType, right, expression); - break; - } + let classReference = leftType.getClass(); + if (classReference) { + let overload = classReference.lookupOverload(OperatorKind.NE); + if (overload) { + expr = this.compileBinaryOverload(overload, left, leftExpr, leftType, right, expression); + break; } - // fall back to compare by value } rightExpr = this.compileExpression(right, leftType); diff --git a/src/extra/ast.ts b/src/extra/ast.ts index cbffac40fb..b96fafe050 100644 --- a/src/extra/ast.ts +++ b/src/extra/ast.ts @@ -499,7 +499,7 @@ export class ASTBuilder { indent(sb, this.indentLevel); let name = names[i]; let value = values[i]; - if (name === value) { + if (name == value) { this.visitNode(name); } else { this.visitNode(name); @@ -970,7 +970,7 @@ export class ASTBuilder { var indexSignature = node.indexSignature; var members = node.members; var numMembers = members.length; - if (indexSignature !== null || numMembers) { + if (indexSignature || numMembers) { sb.push(" {\n"); let indentLevel = ++this.indentLevel; if (indexSignature) { diff --git a/src/flow.ts b/src/flow.ts index c40c23686c..ab829c251e 100644 --- a/src/flow.ts +++ b/src/flow.ts @@ -65,7 +65,9 @@ import { getLocalSetIndex, getIfCondition, getConstValueI64High, - getUnaryValue + getUnaryValue, + getCallOperandAt, + getCallOperandCount } from "./module"; import { @@ -84,6 +86,10 @@ import { uniqueMap } from "./util"; +import { + BuiltinNames +} from "./builtins"; + /** Control flow flags indicating specific conditions. */ export const enum FlowFlags { /** No specific conditions. */ @@ -1115,6 +1121,36 @@ export class Flow { } break; } + case ExpressionId.Call: { + // handle string eq/ne/not overloads + let name = getCallTarget(expr); + if (name == BuiltinNames.String_eq) { + assert(getCallOperandCount(expr) == 2); + let left = getCallOperandAt(expr, 0); + let right = getCallOperandAt(expr, 1); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) != 0) { + this.inheritNonnullIfTrue(right, iff); // TRUE == right -> right must have been true + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) != 0) { + this.inheritNonnullIfTrue(left, iff); // left == TRUE -> left must have been true + } + } else if (name == BuiltinNames.String_ne) { + assert(getCallOperandCount(expr) == 2); + let left = getCallOperandAt(expr, 0); + let right = getCallOperandAt(expr, 1); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) == 0) { + this.inheritNonnullIfTrue(right, iff); // FALSE != right -> right must have been true + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) == 0) { + this.inheritNonnullIfTrue(left, iff); // left != FALSE -> left must have been true + } + } else if (name == BuiltinNames.String_not) { + assert(getCallOperandCount(expr) == 1); + this.inheritNonnullIfFalse(getCallOperandAt(expr, 0), iff); // !value -> value must have been false + } else if (name == BuiltinNames.tostack) { + assert(getCallOperandCount(expr) == 1); + this.inheritNonnullIfTrue(getCallOperandAt(expr, 0), iff); + } + break; + } } } @@ -1173,9 +1209,9 @@ export class Flow { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); if (getExpressionId(left) == ExpressionId.Const && getConstValueI64Low(left) == 0 && getConstValueI64High(left) == 0) { - this.inheritNonnullIfTrue(right, iff); // FALSE == right -> right must have been true + this.inheritNonnullIfTrue(right, iff); // TRUE == right -> right must have been true } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI64Low(right) == 0 && getConstValueI64High(right) == 0) { - this.inheritNonnullIfTrue(left, iff); // left == FALSE -> left must have been true + this.inheritNonnullIfTrue(left, iff); // left == TRUE -> left must have been true } break; } @@ -1202,6 +1238,37 @@ export class Flow { } break; } + case ExpressionId.Call: { + // handle string eq/ne/not overloads + let name = getCallTarget(expr); + if (name == BuiltinNames.String_eq) { + assert(getCallOperandCount(expr) == 2); + let left = getCallOperandAt(expr, 0); + let right = getCallOperandAt(expr, 1); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) == 0) { + this.inheritNonnullIfTrue(right, iff); // FALSE == right -> right must have been true + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) == 0) { + this.inheritNonnullIfTrue(left, iff); // left == FALSE -> left must have been true + } + } else if (name == BuiltinNames.String_ne) { + assert(getCallOperandCount(expr) == 2); + let left = getCallOperandAt(expr, 0); + let right = getCallOperandAt(expr, 1); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) != 0) { + this.inheritNonnullIfTrue(right, iff); // TRUE != right -> right must have been true + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) != 0) { + this.inheritNonnullIfTrue(left, iff); // left != TRUE -> left must have been true + } + } else if (name == BuiltinNames.String_not) { + assert(getCallOperandCount(expr) == 1); + this.inheritNonnullIfTrue(getCallOperandAt(expr, 0), iff); // !value -> value must have been true + } else if (name == BuiltinNames.tostack) { + assert(getCallOperandCount(expr) == 1); + let value = getCallOperandAt(expr, 0); + this.inheritNonnullIfFalse(value, iff); + } + break; + } } } diff --git a/src/types.ts b/src/types.ts index 061982cbdc..b07f5ac221 100644 --- a/src/types.ts +++ b/src/types.ts @@ -324,7 +324,7 @@ export class Type { /** Tests if this is a class type explicitly annotated as unmanaged. */ get isUnmanaged(): bool { var classReference = this.classReference; - return classReference !== null && classReference.hasDecorator(DecoratorFlags.UNMANAGED); + return classReference != null && classReference.hasDecorator(DecoratorFlags.UNMANAGED); } /** Gets the corresponding non-nullable type. */ @@ -812,8 +812,8 @@ export class Signature { // check `this` type var thisThisType = this.thisType; var otherThisType = other.thisType; - if (thisThisType !== null) { - if (otherThisType === null || !thisThisType.equals(otherThisType)) return false; + if (thisThisType) { + if (!otherThisType || !thisThisType.equals(otherThisType)) return false; } else if (otherThisType) { return false; } @@ -840,8 +840,8 @@ export class Signature { // check `this` type var thisThisType = this.thisType; var targetThisType = target.thisType; - if (thisThisType !== null) { - if (targetThisType === null || !thisThisType.isAssignableTo(targetThisType)) return false; + if (thisThisType) { + if (!targetThisType || !thisThisType.isAssignableTo(targetThisType)) return false; } else if (targetThisType) { return false; } diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 9bcdacdf12..320c67c4ea 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -28,7 +28,7 @@ function ensureCapacity(array: usize, newSize: usize, alignLog2: u32, canGrow: b if (ASC_RUNTIME != Runtime.Incremental) { memory.fill(newData + oldCapacity, 0, newCapacity - oldCapacity); } - if (newData !== oldData) { // oldData has been free'd + if (newData != oldData) { // oldData has been free'd store(array, newData, offsetof("buffer")); store(array, newData, offsetof("dataStart")); __link(array, changetype(newData), false); @@ -56,7 +56,7 @@ export class Array { private length_: i32; static isArray(value: U): bool { - return isReference() ? builtin_isArray(value) && value !== null : false; + return isReference() ? changetype(value) != 0 && builtin_isArray(value) : false; } static create(capacity: i32 = 0): Array { @@ -239,7 +239,7 @@ export class Array { concat(other: Array): Array { var thisLen = this.length_; - var otherLen = select(0, other.length_, other === null); + var otherLen = other.length_; var outLen = thisLen + otherLen; if (outLen > BLOCK_MAXSIZE >>> alignof()) throw new Error(E_INVALIDLENGTH); var out = changetype>(__newArray(outLen, alignof(), idof>())); diff --git a/std/assembly/arraybuffer.ts b/std/assembly/arraybuffer.ts index 18479ade6c..84974efa25 100644 --- a/std/assembly/arraybuffer.ts +++ b/std/assembly/arraybuffer.ts @@ -31,7 +31,7 @@ export abstract class ArrayBufferView { static isView(value: T): bool { if (isNullable()) { - if (value === null) return false; + if (changetype(value) == 0) return false; } if (value instanceof Int8Array) return true; if (value instanceof Uint8Array) return true; diff --git a/std/assembly/map.ts b/std/assembly/map.ts index a90ce8b622..65f2f2d28c 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -96,7 +96,7 @@ export class Map { } has(key: K): bool { - return this.find(key, HASH(key)) !== null; + return this.find(key, HASH(key)) != null; } @operator("[]") diff --git a/std/assembly/object.ts b/std/assembly/object.ts index 978260a116..c9543fe3df 100644 --- a/std/assembly/object.ts +++ b/std/assembly/object.ts @@ -2,7 +2,7 @@ export class Object { static is(value1: T, value2: T): bool { if (isFloat()) { if (value1 == value2) { - // 0 === -0, but they are not identical + // 0 == -0, but they are not identical if (sizeof() == 8) { // @ts-ignore: typecast return reinterpret(value1) == reinterpret(value2); @@ -11,7 +11,7 @@ export class Object { return reinterpret(value1) == reinterpret(value2); } } - // NaN !== NaN, but they are identical. + // NaN != NaN, but they are identical. // @ts-ignore: typecast return bool(i32(isNaN(value1)) & i32(isNaN(value2))); } diff --git a/std/assembly/set.ts b/std/assembly/set.ts index f8396a5216..43063da90c 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -94,7 +94,7 @@ export class Set { @operator("[]") has(key: T): bool { - return this.find(key, HASH(key)) !== null; + return this.find(key, HASH(key)) != null; } add(key: T): this { diff --git a/std/assembly/staticarray.ts b/std/assembly/staticarray.ts index f242c7147f..4552ecab0c 100644 --- a/std/assembly/staticarray.ts +++ b/std/assembly/staticarray.ts @@ -39,7 +39,7 @@ export class StaticArray { static concat(source: StaticArray, other: StaticArray): StaticArray { var sourceLen = source.length; - var otherLen = select(0, other.length, other === null); + var otherLen = other.length; var outLen = sourceLen + otherLen; if (outLen > BLOCK_MAXSIZE >>> alignof()) throw new Error(E_INVALIDLENGTH); var out = changetype>(__new(outLen << alignof(), idof>())); @@ -228,7 +228,7 @@ export class StaticArray { concat(other: Array): Array { var thisLen = this.length; - var otherLen = select(0, other.length, other === null); + var otherLen = other.length; var outLen = thisLen + otherLen; if (outLen > BLOCK_MAXSIZE >>> alignof()) throw new Error(E_INVALIDLENGTH); var out = changetype>(__newArray(outLen, alignof(), idof>())); diff --git a/std/assembly/string.ts b/std/assembly/string.ts index bc88594634..748f59ed65 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -107,17 +107,17 @@ import { Array } from "./array"; } @operator("==") private static __eq(left: String | null, right: String | null): bool { - if (left === right) return true; - if (left === null || right === null) return false; - var leftLength = left.length; - if (leftLength != right.length) return false; + if (changetype(left) == changetype(right)) return true; + if (changetype(left) == 0 || changetype(right) == 0) return false; + var leftLength = changetype(left).length; + if (leftLength != changetype(right).length) return false; // @ts-ignore: string <-> String return !compareImpl(left, 0, right, 0, leftLength); } @operator.prefix("!") private static __not(str: String | null): bool { - return str === null || !str.length; + return changetype(str) == 0 || !changetype(str).length; } @operator("!=") @@ -126,7 +126,7 @@ import { Array } from "./array"; } @operator(">") private static __gt(left: String, right: String): bool { - if (left === right) return false; + if (changetype(left) == changetype(right)) return false; var leftLength = left.length; if (!leftLength) return false; var rightLength = right.length; @@ -141,7 +141,7 @@ import { Array } from "./array"; } @operator("<") private static __lt(left: String, right: String): bool { - if (left === right) return false; + if (changetype(left) == changetype(right)) return false; var rightLength = right.length; if (!rightLength) return false; var leftLength = left.length; @@ -187,7 +187,7 @@ import { Array } from "./array"; // TODO: implement full locale comparison with locales and Collator options localeCompare(other: String): i32 { - if (other === this) return 0; // compare pointers + if (changetype(other) == changetype(this)) return 0; var len: isize = this.length; var otherLen: isize = other.length; if (otherLen != len) return select(1, -1, len > otherLen); @@ -468,9 +468,9 @@ import { Array } from "./array"; split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] { if (!limit) return changetype(__newArray(0, alignof(), idof>())); - if (separator === null) return [this]; + if (changetype(separator) == 0) return [ this ]; var length: isize = this.length; - var sepLen = separator.length; + var sepLen = changetype(separator).length; if (limit < 0) limit = i32.MAX_VALUE; if (!sepLen) { if (!length) return changetype(__newArray(0, alignof(), idof>())); @@ -494,7 +494,7 @@ import { Array } from "./array"; } var result = changetype(__newArray(0, alignof(), idof>())); var end = 0, start = 0, i = 0; - while (~(end = this.indexOf(separator, start))) { + while (~(end = this.indexOf(changetype(separator), start))) { let len = end - start; if (len > 0) { let out = changetype(__new(len << 1, idof())); diff --git a/std/assembly/symbol.ts b/std/assembly/symbol.ts index 9fd06cd707..d5d06253b5 100644 --- a/std/assembly/symbol.ts +++ b/std/assembly/symbol.ts @@ -74,7 +74,7 @@ import { Map } from "./map"; } static keyFor(sym: symbol): string | null { - return idToString !== null && idToString.has(changetype(sym)) + return idToString != null && idToString.has(changetype(sym)) ? idToString.get(changetype(sym)) : null; } @@ -95,7 +95,7 @@ import { Map } from "./map"; case 10: { str = "toStringTag"; break; } case 11: { str = "unscopables"; break; } default: { - if (idToString !== null && idToString.has(id)) str = idToString.get(id); + if (idToString != null && idToString.has(id)) str = idToString.get(id); break; } } diff --git a/std/assembly/util/hash.ts b/std/assembly/util/hash.ts index c902598c7b..d70ada21a4 100644 --- a/std/assembly/util/hash.ts +++ b/std/assembly/util/hash.ts @@ -69,7 +69,7 @@ function mix(h: u32, key: u32): u32 { // @ts-ignore: decorator @inline function hashStr(key: string): u32 { - if (key === null) return XXH32_SEED; + if (changetype(key) == 0) return XXH32_SEED; var h: u32 = key.length << 1; var len: usize = h; diff --git a/std/assembly/util/memory.ts b/std/assembly/util/memory.ts index 700165b80e..f9d93b640f 100644 --- a/std/assembly/util/memory.ts +++ b/std/assembly/util/memory.ts @@ -144,7 +144,7 @@ export function memcpy(dest: usize, src: usize, n: usize): void { // see: musl/s // @ts-ignore: decorator @inline export function memmove(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memmove.c - if (dest === src) return; + if (dest == src) return; if (ASC_SHRINK_LEVEL < 1) { if (src - dest - n <= -(n << 1)) { memcpy(dest, src, n); diff --git a/std/assembly/util/sort.ts b/std/assembly/util/sort.ts index df2624f8da..7346f1b00f 100644 --- a/std/assembly/util/sort.ts +++ b/std/assembly/util/sort.ts @@ -44,7 +44,7 @@ export function COMPARATOR(): Comparator { } } else if (isString()) { return (a, b) => { - if (a === b || a === null || b === null) return 0; + if (changetype(a) == changetype(b) || changetype(a) == 0 || changetype(b) == 0) return 0; var alen = changetype(a).length; var blen = changetype(b).length; if (!(alen | blen)) return 0; diff --git a/std/assembly/util/string.ts b/std/assembly/util/string.ts index 0bea1ec612..8fad5f80e6 100644 --- a/std/assembly/util/string.ts +++ b/std/assembly/util/string.ts @@ -981,15 +981,14 @@ export function joinStringArray(dataStart: usize, length: i32, separator: string var value: string; for (let i = 0; i < length; ++i) { value = load(dataStart + (i << alignof())); - // @ts-ignore: type - if (value !== null) estLen += value.length; + if (changetype(value) != 0) estLen += value.length; } var offset = 0; var sepLen = separator.length; var result = changetype(__new((estLen + sepLen * lastIndex) << 1, idof())); for (let i = 0; i < lastIndex; ++i) { value = load(dataStart + (i << alignof())); - if (value !== null) { + if (changetype(value) != 0) { let valueLen = value.length; memory.copy( changetype(result) + (offset << 1), @@ -1008,7 +1007,7 @@ export function joinStringArray(dataStart: usize, length: i32, separator: string } } value = load(dataStart + (lastIndex << alignof())); - if (value !== null) { + if (changetype(value) != 0) { memory.copy( changetype(result) + (offset << 1), changetype(value), @@ -1021,23 +1020,23 @@ export function joinStringArray(dataStart: usize, length: i32, separator: string export function joinReferenceArray(dataStart: usize, length: i32, separator: string): string { var lastIndex = length - 1; if (lastIndex < 0) return ""; - var value: T; + var value: T; // except string if (!lastIndex) { value = load(dataStart); // @ts-ignore: type - return value !== null ? value.toString() : ""; + return value != null ? value.toString() : ""; } var result = ""; var sepLen = separator.length; for (let i = 0; i < lastIndex; ++i) { value = load(dataStart + (i << alignof())); // @ts-ignore: type - if (value !== null) result += value.toString(); + if (value != null) result += value.toString(); if (sepLen) result += separator; } value = load(dataStart + (lastIndex << alignof())); // @ts-ignore: type - if (value !== null) result += value.toString(); + if (value != null) result += value.toString(); return result; } diff --git a/std/assembly/wasi/index.ts b/std/assembly/wasi/index.ts index e72f0016f5..d84fedbef5 100644 --- a/std/assembly/wasi/index.ts +++ b/std/assembly/wasi/index.ts @@ -31,11 +31,11 @@ function abort( // eslint-disable-line @typescript-eslint/no-unused-vars changetype(iovPtr).buf = bufPtr; var ptr = bufPtr; store(ptr, 0x203A74726F6261); ptr += 7; // 'abort: ' - if (message !== null) { + if (message != null) { ptr += String.UTF8.encodeUnsafe(changetype(message), message.length, ptr); } store(ptr, 0x206E6920); ptr += 4; // ' in ' - if (fileName !== null) { + if (fileName != null) { ptr += String.UTF8.encodeUnsafe(changetype(fileName), fileName.length, ptr); } store(ptr++, 0x28); // ( diff --git a/std/portable/index.js b/std/portable/index.js index 4e2c6c345d..1928b4fd14 100644 --- a/std/portable/index.js +++ b/std/portable/index.js @@ -262,8 +262,8 @@ if (typeof globalScope.ASC_TARGET === "undefined") { } function defaultComparator(a, b) { - if (a === b) { - if (a !== 0) return 0; + if (a == b) { + if (a != 0) return 0; a = 1 / a, b = 1 / b; } else { var nanA = a != a, nanB = b != b; diff --git a/tests/compiler/NonNullable.optimized.wat b/tests/compiler/NonNullable.optimized.wat index ad2608bb49..65ae3cc81a 100644 --- a/tests/compiler/NonNullable.optimized.wat +++ b/tests/compiler/NonNullable.optimized.wat @@ -142,124 +142,10 @@ i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer - block $folding-inner1 - block $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 1324 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 1056 - i32.store - local.get $0 - i32.const 1056 - i32.store offset=4 - i32.const 1056 - i32.const 1056 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 3 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $0 - i32.const 1136 - i32.store - local.get $0 - i32.const 1136 - i32.store offset=4 - i32.const 1136 - i32.const 1136 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 4 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $0 - i32.const 1168 - i32.store - local.get $0 - i32.const 1168 - i32.store offset=4 - i32.const 1168 - i32.const 1168 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 5 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $0 - i32.const 1248 - i32.store offset=8 - local.get $0 - i32.const 1248 - i32.store - i32.const 1248 - i32.const 0 - call $~lib/string/String.__eq - br_if $folding-inner1 - global.get $~lib/memory/__stack_pointer - local.tee $0 - i32.const 1248 - i32.store - local.get $0 - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 1324 - i32.lt_s - br_if $folding-inner0 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const 1248 - i32.const 0 - call $~lib/string/String.__eq - i32.eqz - if - global.get $~lib/memory/__stack_pointer - i32.const 1248 - i32.store - i32.const 1248 - i32.const 0 - call $~lib/string/String.__eq - br_if $folding-inner1 - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 12 - i32.add - global.set $~lib/memory/__stack_pointer - return - end + global.get $~lib/memory/__stack_pointer + i32.const 1324 + i32.lt_s + if i32.const 17728 i32.const 17776 i32.const 1 @@ -267,6 +153,100 @@ call $~lib/builtins/abort unreachable end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i64.const 0 + i64.store + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 1056 + i32.store + local.get $0 + i32.const 1056 + i32.store offset=4 + i32.const 1056 + i32.const 1056 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 3 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 1136 + i32.store + local.get $0 + i32.const 1136 + i32.store offset=4 + i32.const 1136 + i32.const 1136 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 4 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 1168 + i32.store + local.get $0 + i32.const 1168 + i32.store offset=4 + i32.const 1168 + i32.const 1168 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 5 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 1248 + i32.store offset=8 + local.get $0 + i32.const 1248 + i32.store + block $folding-inner0 + i32.const 1248 + i32.const 0 + call $~lib/string/String.__eq + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 1248 + i32.store + i32.const 1248 + i32.const 0 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 1248 + i32.const 0 + call $~lib/string/String.__eq + br_if $folding-inner0 + end + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + return + end i32.const 0 i32.const 1088 i32.const 9 diff --git a/tests/compiler/NonNullable.untouched.wat b/tests/compiler/NonNullable.untouched.wat index c95d96c4c6..90c52b4e98 100644 --- a/tests/compiler/NonNullable.untouched.wat +++ b/tests/compiler/NonNullable.untouched.wat @@ -203,6 +203,15 @@ unreachable end ) + (func $NonNullable/safetyCheck<~lib/string/String|null> (param $0 i32) + local.get $0 + i32.const 0 + call $~lib/string/String.__ne + if + local.get $0 + call $NonNullable/assertNonNull<~lib/string/String> + end + ) (func $~start call $start:NonNullable ) @@ -219,45 +228,6 @@ unreachable end ) - (func $NonNullable/safetyCheck<~lib/string/String|null> (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - i32.const 0 - call $~lib/string/String.__ne - if - local.get $0 - local.tee $1 - if (result i32) - local.get $1 - else - i32.const 256 - i32.const 64 - i32.const 14 - i32.const 35 - call $~lib/builtins/abort - unreachable - end - local.set $2 - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.store - local.get $2 - call $NonNullable/assertNonNull<~lib/string/String> - end - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) (func $start:NonNullable (local $0 i32) (local $1 i32) diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index 51a190f843..0618716a77 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -687,9 +687,9 @@ i32.const 5 f64.const 0 f64.const 0 - f64.const 23 - f64.const 24 f64.const 24 + f64.const 25 + f64.const 25 call $~lib/builtins/trace global.get $~lib/memory/__stack_pointer local.tee $0 diff --git a/tests/compiler/builtins.untouched.wat b/tests/compiler/builtins.untouched.wat index 46e531c6a7..81a545ffc8 100644 --- a/tests/compiler/builtins.untouched.wat +++ b/tests/compiler/builtins.untouched.wat @@ -2502,11 +2502,11 @@ local.set $1 i32.const 0 local.set $0 - i32.const 23 - local.set $6 i32.const 24 + local.set $6 + i32.const 25 local.set $7 - i32.const 24 + i32.const 25 local.set $8 i32.const 256 local.set $9 @@ -2551,7 +2551,7 @@ unreachable end local.get $6 - i32.const 23 + i32.const 24 i32.eq i32.eqz if diff --git a/tests/compiler/class-implements.ts b/tests/compiler/class-implements.ts index d284e80068..95ea3ae87c 100644 --- a/tests/compiler/class-implements.ts +++ b/tests/compiler/class-implements.ts @@ -7,7 +7,7 @@ export class A implements I { } var a = new A(); -assert(a.foo() === 1); +assert(a.foo() == 1); class B { } @@ -17,4 +17,4 @@ export class C extends B implements I { } var c = new C(); -assert(c.foo() === 2); +assert(c.foo() == 2); diff --git a/tests/compiler/features/reference-types.ts b/tests/compiler/features/reference-types.ts index 3fdcf874ff..8522e174fa 100644 --- a/tests/compiler/features/reference-types.ts +++ b/tests/compiler/features/reference-types.ts @@ -48,20 +48,20 @@ if(somethingNull()) { // Explicit null checks (don’t work yet) /* -if(somethingReal() !== null) { +if(somethingReal() != null) { // nop } else { assert(false); } -if(somethingReal() === null) { +if(somethingReal() == null) { assert(false); } -if(somethingNull() === null) { +if(somethingNull() == null) { // nop } else { assert(false); } -if(somethingNull() !== null) { +if(somethingNull() != null) { assert(false); } */ diff --git a/tests/compiler/instanceof.ts b/tests/compiler/instanceof.ts index 2cff1b0bc4..ff793c2b3d 100644 --- a/tests/compiler/instanceof.ts +++ b/tests/compiler/instanceof.ts @@ -72,4 +72,4 @@ assert( an instanceof A); // TS: !=null is an instance of A assert( an instanceof A | null); // AS: !=null is an instance of A | null // TODO: keep track of nullability during flows, so this becomes precomputable: -// assert(an !== null && an instanceof A); +// assert(an != null && an instanceof A); diff --git a/tests/compiler/issues/1225.ts b/tests/compiler/issues/1225.ts index 70cc63a79d..5f6288f68d 100644 --- a/tests/compiler/issues/1225.ts +++ b/tests/compiler/issues/1225.ts @@ -15,8 +15,8 @@ export function viaThis(): u32 { return x.viaThis; } -assert(normal() === 4); -assert(viaThis() === 4); +assert(normal() == 4); +assert(viaThis() == 4); x = changetype(0); // unleak diff --git a/tests/compiler/issues/1699.ts b/tests/compiler/issues/1699.ts index 8b29f619ce..a72b7352af 100644 --- a/tests/compiler/issues/1699.ts +++ b/tests/compiler/issues/1699.ts @@ -12,8 +12,8 @@ function test(): void { testinstances[n] = testinstance; } } - assert(testinstances[0] === testinstances[1]); - assert(testinstances[2] !== testinstances[1]); + assert(testinstances[0] == testinstances[1]); + assert(testinstances[2] != testinstances[1]); } test(); diff --git a/tests/compiler/issues/1714.optimized.wat b/tests/compiler/issues/1714.optimized.wat index 5b3ac4dd54..ac31a940af 100644 --- a/tests/compiler/issues/1714.optimized.wat +++ b/tests/compiler/issues/1714.optimized.wat @@ -1,8 +1,45 @@ (module + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_none (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17500)) (memory $0 1) (data (i32.const 1036) ",") (data (i32.const 1048) "\01\00\00\00\1c\00\00\00i\00s\00s\00u\00e\00s\00/\001\007\001\004\00.\00t\00s") (data (i32.const 1084) "\1c") (data (i32.const 1096) "\01\00\00\00\06\00\00\00i\003\002") (export "memory" (memory $0)) + (start $~start) + (func $~start + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1116 + i32.lt_s + if + i32.const 17520 + i32.const 17568 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i64.const 0 + i64.store + local.get $0 + i32.const 1104 + i32.store + local.get $0 + i32.const 1104 + i32.store offset=4 + local.get $0 + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) ) diff --git a/tests/compiler/issues/1714.ts b/tests/compiler/issues/1714.ts index 9dd08915ae..7527bdfc60 100644 --- a/tests/compiler/issues/1714.ts +++ b/tests/compiler/issues/1714.ts @@ -15,4 +15,4 @@ function bar(): string { // T1=f64, T2=i32 return nameof(); // iff T1 == i32 } -assert(bar() === "i32"); +assert(bar() == "i32"); diff --git a/tests/compiler/issues/1714.untouched.wat b/tests/compiler/issues/1714.untouched.wat index ea38be61bd..f7bda7fa3b 100644 --- a/tests/compiler/issues/1714.untouched.wat +++ b/tests/compiler/issues/1714.untouched.wat @@ -2,7 +2,14 @@ (type $none_=>_i32 (func (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) + (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) + (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/memory/__data_end i32 (i32.const 92)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16476)) (global $~lib/memory/__heap_base i32 (i32.const 16476)) @@ -34,7 +41,187 @@ call $issues/1714/bar return ) + (func $~lib/string/String#get:length (param $0 i32) (result i32) + local.get $0 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $6 + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $4 + i32.const 4 + i32.ge_u + if (result i32) + local.get $5 + i32.const 7 + i32.and + local.get $6 + i32.const 7 + i32.and + i32.or + i32.eqz + else + i32.const 0 + end + if + block $do-break|0 + loop $do-loop|0 + local.get $5 + i64.load + local.get $6 + i64.load + i64.ne + if + br $do-break|0 + end + local.get $5 + i32.const 8 + i32.add + local.set $5 + local.get $6 + i32.const 8 + i32.add + local.set $6 + local.get $4 + i32.const 4 + i32.sub + local.set $4 + local.get $4 + i32.const 4 + i32.ge_u + br_if $do-loop|0 + end + end + end + loop $while-continue|1 + local.get $4 + local.tee $7 + i32.const 1 + i32.sub + local.set $4 + local.get $7 + local.set $7 + local.get $7 + if + local.get $5 + i32.load16_u + local.set $8 + local.get $6 + i32.load16_u + local.set $9 + local.get $8 + local.get $9 + i32.ne + if + local.get $8 + local.get $9 + i32.sub + return + end + local.get $5 + i32.const 2 + i32.add + local.set $5 + local.get $6 + i32.const 2 + i32.add + local.set $6 + br $while-continue|1 + end + end + i32.const 0 + ) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 0 + i32.eq + end + if + i32.const 0 + return + end + local.get $0 + call $~lib/string/String#get:length + local.set $2 + local.get $2 + local.get $1 + call $~lib/string/String#get:length + i32.ne + if + i32.const 0 + return + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + ) + (func $~start + call $start:issues/1714 + ) + (func $~stack_check + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__data_end + i32.lt_s + if + i32.const 16496 + i32.const 16544 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) (func $start:issues/1714 + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store call $issues/1714/foo i32.const 0 i32.eq @@ -48,8 +235,18 @@ unreachable end call $issues/1714/bar + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 i32.const 80 - i32.eq + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -59,8 +256,9 @@ call $~lib/builtins/abort unreachable end - ) - (func $~start - call $start:issues/1714 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer ) ) diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 3b544655a5..aae3004b71 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -26,7 +26,7 @@ (global $resolve-binary/foo (mut i32) (i32.const 0)) (global $resolve-binary/bar (mut i32) (i32.const 0)) (global $resolve-binary/bar2 (mut i32) (i32.const 0)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 27676)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 27644)) (memory $0 1) (data (i32.const 1036) "\1c") (data (i32.const 1048) "\01\00\00\00\08\00\00\00t\00r\00u\00e") @@ -34,63 +34,63 @@ (data (i32.const 1080) "\01\00\00\00\n\00\00\00f\00a\00l\00s\00e") (data (i32.const 1100) "<") (data (i32.const 1112) "\01\00\00\00\"\00\00\00r\00e\00s\00o\00l\00v\00e\00-\00b\00i\00n\00a\00r\00y\00.\00t\00s") - (data (i32.const 1164) "\1c") - (data (i32.const 1176) "\01\00\00\00\02\00\00\00a") - (data (i32.const 1196) "|") - (data (i32.const 1208) "\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") - (data (i32.const 1324) "<") - (data (i32.const 1336) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") - (data (i32.const 1388) "\1c") - (data (i32.const 1400) "\01\00\00\00\02\00\00\000") - (data (i32.const 1420) "<") - (data (i32.const 1432) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") - (data (i32.const 1484) "<") - (data (i32.const 1496) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") - (data (i32.const 1612) "<") - (data (i32.const 1624) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") - (data (i32.const 1676) ",") - (data (i32.const 1688) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 1756) "<") - (data (i32.const 1768) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 1820) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 2220) "\1c\04") - (data (i32.const 2232) "\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") - (data (i32.const 3276) "\\") - (data (i32.const 3288) "\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") + (data (i32.const 1164) "|") + (data (i32.const 1176) "\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") + (data (i32.const 1292) "<") + (data (i32.const 1304) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00n\00u\00m\00b\00e\00r\00.\00t\00s") + (data (i32.const 1356) "\1c") + (data (i32.const 1368) "\01\00\00\00\02\00\00\000") + (data (i32.const 1388) "<") + (data (i32.const 1400) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data (i32.const 1452) "<") + (data (i32.const 1464) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data (i32.const 1580) "<") + (data (i32.const 1592) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data (i32.const 1644) ",") + (data (i32.const 1656) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data (i32.const 1724) "<") + (data (i32.const 1736) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 1788) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") + (data (i32.const 2188) "\1c\04") + (data (i32.const 2200) "\01\00\00\00\00\04\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\000\00a\000\00b\000\00c\000\00d\000\00e\000\00f\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\001\00a\001\00b\001\00c\001\00d\001\00e\001\00f\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\002\00a\002\00b\002\00c\002\00d\002\00e\002\00f\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\003\00a\003\00b\003\00c\003\00d\003\00e\003\00f\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\004\00a\004\00b\004\00c\004\00d\004\00e\004\00f\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\005\00a\005\00b\005\00c\005\00d\005\00e\005\00f\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\006\00a\006\00b\006\00c\006\00d\006\00e\006\00f\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\007\00a\007\00b\007\00c\007\00d\007\00e\007\00f\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\008\00a\008\00b\008\00c\008\00d\008\00e\008\00f\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\009\00a\009\00b\009\00c\009\00d\009\00e\009\00f\00a\000\00a\001\00a\002\00a\003\00a\004\00a\005\00a\006\00a\007\00a\008\00a\009\00a\00a\00a\00b\00a\00c\00a\00d\00a\00e\00a\00f\00b\000\00b\001\00b\002\00b\003\00b\004\00b\005\00b\006\00b\007\00b\008\00b\009\00b\00a\00b\00b\00b\00c\00b\00d\00b\00e\00b\00f\00c\000\00c\001\00c\002\00c\003\00c\004\00c\005\00c\006\00c\007\00c\008\00c\009\00c\00a\00c\00b\00c\00c\00c\00d\00c\00e\00c\00f\00d\000\00d\001\00d\002\00d\003\00d\004\00d\005\00d\006\00d\007\00d\008\00d\009\00d\00a\00d\00b\00d\00c\00d\00d\00d\00e\00d\00f\00e\000\00e\001\00e\002\00e\003\00e\004\00e\005\00e\006\00e\007\00e\008\00e\009\00e\00a\00e\00b\00e\00c\00e\00d\00e\00e\00e\00f\00f\000\00f\001\00f\002\00f\003\00f\004\00f\005\00f\006\00f\007\00f\008\00f\009\00f\00a\00f\00b\00f\00c\00f\00d\00f\00e\00f\00f") + (data (i32.const 3244) "\\") + (data (i32.const 3256) "\01\00\00\00H\00\00\000\001\002\003\004\005\006\007\008\009\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z") + (data (i32.const 3340) "\1c") + (data (i32.const 3352) "\01\00\00\00\02\00\00\001") (data (i32.const 3372) "\1c") - (data (i32.const 3384) "\01\00\00\00\02\00\00\001") - (data (i32.const 3404) "\1c") - (data (i32.const 3416) "\01\00\00\00\02\00\00\002") - (data (i32.const 3445) "\a0\f6?") - (data (i32.const 3457) "\c8\b9\f2\82,\d6\bf\80V7($\b4\fa<\00\00\00\00\00\80\f6?") - (data (i32.const 3489) "\08X\bf\bd\d1\d5\bf \f7\e0\d8\08\a5\1c\bd\00\00\00\00\00`\f6?") - (data (i32.const 3521) "XE\17wv\d5\bfmP\b6\d5\a4b#\bd\00\00\00\00\00@\f6?\00\00\00\00\00\00\00\00\00\f8-\87\ad\1a\d5\bf\d5g\b0\9e\e4\84\e6\bc\00\00\00\00\00 \f6?\00\00\00\00\00\00\00\00\00xw\95_\be\d4\bf\e0>)\93i\1b\04\bd\00\00\00\00\00\00\f6?\00\00\00\00\00\00\00\00\00`\1c\c2\8ba\d4\bf\cc\84LH/\d8\13=\00\00\00\00\00\e0\f5?\00\00\00\00\00\00\00\00\00\a8\86\860\04\d4\bf:\0b\82\ed\f3B\dc<\00\00\00\00\00\c0\f5?\00\00\00\00\00\00\00\00\00HiUL\a6\d3\bf`\94Q\86\c6\b1 =\00\00\00\00\00\a0\f5?\00\00\00\00\00\00\00\00\00\80\98\9a\ddG\d3\bf\92\80\c5\d4MY%=\00\00\00\00\00\80\f5?\00\00\00\00\00\00\00\00\00 \e1\ba\e2\e8\d2\bf\d8+\b7\99\1e{&=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00@\f5?\00\00\00\00\00\00\00\00\00x\cf\fbA)\d2\bfv\daS($Z\16\bd\00\00\00\00\00 \f5?\00\00\00\00\00\00\00\00\00\98i\c1\98\c8\d1\bf\04T\e7h\bc\af\1f\bd\00\00\00\00\00\00\f5?\00\00\00\00\00\00\00\00\00\a8\ab\ab\\g\d1\bf\f0\a8\823\c6\1f\1f=\00\00\00\00\00\e0\f4?\00\00\00\00\00\00\00\00\00H\ae\f9\8b\05\d1\bffZ\05\fd\c4\a8&\bd\00\00\00\00\00\c0\f4?\00\00\00\00\00\00\00\00\00\90s\e2$\a3\d0\bf\0e\03\f4~\eek\0c\bd\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\80\f4?\00\00\00\00\00\00\00\00\00@^m\18\b9\cf\bf\87<\99\ab*W\0d=\00\00\00\00\00`\f4?\00\00\00\00\00\00\00\00\00`\dc\cb\ad\f0\ce\bf$\af\86\9c\b7&+=\00\00\00\00\00@\f4?\00\00\00\00\00\00\00\00\00\f0*n\07\'\ce\bf\10\ff?TO/\17\bd\00\00\00\00\00 \f4?\00\00\00\00\00\00\00\00\00\c0Ok!\\\cd\bf\1bh\ca\bb\91\ba!=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy\'=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy\'=\00\00\00\00\00\e0\f3?\00\00\00\00\00\00\00\00\00\90-t\86\c2\cb\bf\8f\b7\8b1\b0N\19=\00\00\00\00\00\c0\f3?\00\00\00\00\00\00\00\00\00\c0\80N\c9\f3\ca\bff\90\cd?cN\ba<\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\80\f3?\00\00\00\00\00\00\00\00\00P\f4\9cZR\c9\bf\e3\d4\c1\04\d9\d1*\bd\00\00\00\00\00`\f3?\00\00\00\00\00\00\00\00\00\d0 e\a0\7f\c8\bf\t\fa\db\7f\bf\bd+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00 \f3?\00\00\00\00\00\00\00\00\00\d0\19\e7\0f\d6\c6\bff\e2\b2\a3j\e4\10\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\e0\f2?\00\00\00\00\00\00\00\00\00\b0\a1\e3\e5&\c5\bf\8f[\07\90\8b\de \bd\00\00\00\00\00\c0\f2?\00\00\00\00\00\00\00\00\00\80\cbl+M\c4\bf\11\0e\bd\00\00\00\00\00\e0\ed?\00\00\00\00\00\00\00\00\00`F\d1;\97\b1?\9b\9e\0dV]2%\bd\00\00\00\00\00\a0\ed?\00\00\00\00\00\00\00\00\00\e0\d1\a7\f5\bd\b3?\d7N\db\a5^\c8,=\00\00\00\00\00`\ed?\00\00\00\00\00\00\00\00\00\a0\97MZ\e9\b5?\1e\1d]<\06i,\bd\00\00\00\00\00@\ed?\00\00\00\00\00\00\00\00\00\c0\ea\n\d3\00\b7?2\ed\9d\a9\8d\1e\ec<\00\00\00\00\00\00\ed?\00\00\00\00\00\00\00\00\00@Y]^3\b9?\daG\bd:\\\11#=\00\00\00\00\00\c0\ec?\00\00\00\00\00\00\00\00\00`\ad\8d\c8j\bb?\e5h\f7+\80\90\13\bd\00\00\00\00\00\a0\ec?\00\00\00\00\00\00\00\00\00@\bc\01X\88\bc?\d3\acZ\c6\d1F&=\00\00\00\00\00`\ec?\00\00\00\00\00\00\00\00\00 \n\839\c7\be?\e0E\e6\afh\c0-\bd\00\00\00\00\00@\ec?\00\00\00\00\00\00\00\00\00\e0\db9\91\e8\bf?\fd\n\a1O\d64%\bd\00\00\00\00\00\00\ec?\00\00\00\00\00\00\00\00\00\e0\'\82\8e\17\c1?\f2\07-\cex\ef!=\00\00\00\00\00\e0\eb?\00\00\00\00\00\00\00\00\00\f0#~+\aa\c1?4\998D\8e\a7,=\00\00\00\00\00\a0\eb?\00\00\00\00\00\00\00\00\00\80\86\0ca\d1\c2?\a1\b4\81\cbl\9d\03=\00\00\00\00\00\80\eb?\00\00\00\00\00\00\00\00\00\90\15\b0\fce\c3?\89rK#\a8/\c6<\00\00\00\00\00@\eb?\00\00\00\00\00\00\00\00\00\b03\83=\91\c4?x\b6\fdTy\83%=\00\00\00\00\00 \eb?\00\00\00\00\00\00\00\00\00\b0\a1\e4\e5\'\c5?\c7}i\e5\e83&=\00\00\00\00\00\e0\ea?\00\00\00\00\00\00\00\00\00\10\8c\beNW\c6?x.<,\8b\cf\19=\00\00\00\00\00\c0\ea?\00\00\00\00\00\00\00\00\00pu\8b\12\f0\c6?\e1!\9c\e5\8d\11%\bd\00\00\00\00\00\a0\ea?\00\00\00\00\00\00\00\00\00PD\85\8d\89\c7?\05C\91p\10f\1c\bd\00\00\00\00\00`\ea?\00\00\00\00\00\00\00\00\00\009\eb\af\be\c8?\d1,\e9\aaT=\07\bd\00\00\00\00\00@\ea?\00\00\00\00\00\00\00\00\00\00\f7\dcZZ\c9?o\ff\a0X(\f2\07=\00\00\00\00\00\00\ea?\00\00\00\00\00\00\00\00\00\e0\8a<\ed\93\ca?i!VPCr(\bd\00\00\00\00\00\e0\e9?\00\00\00\00\00\00\00\00\00\d0[W\d81\cb?\aa\e1\acN\8d5\0c\bd\00\00\00\00\00\c0\e9?\00\00\00\00\00\00\00\00\00\e0;8\87\d0\cb?\b6\12TY\c4K-\bd\00\00\00\00\00\a0\e9?\00\00\00\00\00\00\00\00\00\10\f0\c6\fbo\cc?\d2+\96\c5r\ec\f1\bc\00\00\00\00\00`\e9?\00\00\00\00\00\00\00\00\00\90\d4\b0=\b1\cd?5\b0\15\f7*\ff*\bd\00\00\00\00\00@\e9?\00\00\00\00\00\00\00\00\00\10\e7\ff\0eS\ce?0\f4A`\'\12\c2<\00\00\00\00\00 \e9?\00\00\00\00\00\00\00\00\00\00\dd\e4\ad\f5\ce?\11\8e\bbe\15!\ca\bc\00\00\00\00\00\00\e9?\00\00\00\00\00\00\00\00\00\b0\b3l\1c\99\cf?0\df\0c\ca\ec\cb\1b=\00\00\00\00\00\c0\e8?\00\00\00\00\00\00\00\00\00XM`8q\d0?\91N\ed\16\db\9c\f8<\00\00\00\00\00\a0\e8?\00\00\00\00\00\00\00\00\00`ag-\c4\d0?\e9\ea<\16\8b\18\'=\00\00\00\00\00\80\e8?\00\00\00\00\00\00\00\00\00\e8\'\82\8e\17\d1?\1c\f0\a5c\0e!,\bd\00\00\00\00\00`\e8?\00\00\00\00\00\00\00\00\00\f8\ac\cb\\k\d1?\81\16\a5\f7\cd\9a+=\00\00\00\00\00@\e8?\00\00\00\00\00\00\00\00\00hZc\99\bf\d1?\b7\bdGQ\ed\a6,=\00\00\00\00\00 \e8?\00\00\00\00\00\00\00\00\00\b8\0emE\14\d2?\ea\baF\ba\de\87\n=\00\00\00\00\00\e0\e7?\00\00\00\00\00\00\00\00\00\90\dc|\f0\be\d2?\f4\04PJ\fa\9c*=\00\00\00\00\00\c0\e7?\00\00\00\00\00\00\00\00\00`\d3\e1\f1\14\d3?\b8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") - (data (i32.const 9596) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 9628) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 9660) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 9708) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 9816) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8)\93i\1b\04\bd\00\00\00\00\00\00\f6?\00\00\00\00\00\00\00\00\00`\1c\c2\8ba\d4\bf\cc\84LH/\d8\13=\00\00\00\00\00\e0\f5?\00\00\00\00\00\00\00\00\00\a8\86\860\04\d4\bf:\0b\82\ed\f3B\dc<\00\00\00\00\00\c0\f5?\00\00\00\00\00\00\00\00\00HiUL\a6\d3\bf`\94Q\86\c6\b1 =\00\00\00\00\00\a0\f5?\00\00\00\00\00\00\00\00\00\80\98\9a\ddG\d3\bf\92\80\c5\d4MY%=\00\00\00\00\00\80\f5?\00\00\00\00\00\00\00\00\00 \e1\ba\e2\e8\d2\bf\d8+\b7\99\1e{&=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00@\f5?\00\00\00\00\00\00\00\00\00x\cf\fbA)\d2\bfv\daS($Z\16\bd\00\00\00\00\00 \f5?\00\00\00\00\00\00\00\00\00\98i\c1\98\c8\d1\bf\04T\e7h\bc\af\1f\bd\00\00\00\00\00\00\f5?\00\00\00\00\00\00\00\00\00\a8\ab\ab\\g\d1\bf\f0\a8\823\c6\1f\1f=\00\00\00\00\00\e0\f4?\00\00\00\00\00\00\00\00\00H\ae\f9\8b\05\d1\bffZ\05\fd\c4\a8&\bd\00\00\00\00\00\c0\f4?\00\00\00\00\00\00\00\00\00\90s\e2$\a3\d0\bf\0e\03\f4~\eek\0c\bd\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\80\f4?\00\00\00\00\00\00\00\00\00@^m\18\b9\cf\bf\87<\99\ab*W\0d=\00\00\00\00\00`\f4?\00\00\00\00\00\00\00\00\00`\dc\cb\ad\f0\ce\bf$\af\86\9c\b7&+=\00\00\00\00\00@\f4?\00\00\00\00\00\00\00\00\00\f0*n\07\'\ce\bf\10\ff?TO/\17\bd\00\00\00\00\00 \f4?\00\00\00\00\00\00\00\00\00\c0Ok!\\\cd\bf\1bh\ca\bb\91\ba!=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy\'=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy\'=\00\00\00\00\00\e0\f3?\00\00\00\00\00\00\00\00\00\90-t\86\c2\cb\bf\8f\b7\8b1\b0N\19=\00\00\00\00\00\c0\f3?\00\00\00\00\00\00\00\00\00\c0\80N\c9\f3\ca\bff\90\cd?cN\ba<\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\80\f3?\00\00\00\00\00\00\00\00\00P\f4\9cZR\c9\bf\e3\d4\c1\04\d9\d1*\bd\00\00\00\00\00`\f3?\00\00\00\00\00\00\00\00\00\d0 e\a0\7f\c8\bf\t\fa\db\7f\bf\bd+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00 \f3?\00\00\00\00\00\00\00\00\00\d0\19\e7\0f\d6\c6\bff\e2\b2\a3j\e4\10\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\e0\f2?\00\00\00\00\00\00\00\00\00\b0\a1\e3\e5&\c5\bf\8f[\07\90\8b\de \bd\00\00\00\00\00\c0\f2?\00\00\00\00\00\00\00\00\00\80\cbl+M\c4\bf\11\0e\bd\00\00\00\00\00\e0\ed?\00\00\00\00\00\00\00\00\00`F\d1;\97\b1?\9b\9e\0dV]2%\bd\00\00\00\00\00\a0\ed?\00\00\00\00\00\00\00\00\00\e0\d1\a7\f5\bd\b3?\d7N\db\a5^\c8,=\00\00\00\00\00`\ed?\00\00\00\00\00\00\00\00\00\a0\97MZ\e9\b5?\1e\1d]<\06i,\bd\00\00\00\00\00@\ed?\00\00\00\00\00\00\00\00\00\c0\ea\n\d3\00\b7?2\ed\9d\a9\8d\1e\ec<\00\00\00\00\00\00\ed?\00\00\00\00\00\00\00\00\00@Y]^3\b9?\daG\bd:\\\11#=\00\00\00\00\00\c0\ec?\00\00\00\00\00\00\00\00\00`\ad\8d\c8j\bb?\e5h\f7+\80\90\13\bd\00\00\00\00\00\a0\ec?\00\00\00\00\00\00\00\00\00@\bc\01X\88\bc?\d3\acZ\c6\d1F&=\00\00\00\00\00`\ec?\00\00\00\00\00\00\00\00\00 \n\839\c7\be?\e0E\e6\afh\c0-\bd\00\00\00\00\00@\ec?\00\00\00\00\00\00\00\00\00\e0\db9\91\e8\bf?\fd\n\a1O\d64%\bd\00\00\00\00\00\00\ec?\00\00\00\00\00\00\00\00\00\e0\'\82\8e\17\c1?\f2\07-\cex\ef!=\00\00\00\00\00\e0\eb?\00\00\00\00\00\00\00\00\00\f0#~+\aa\c1?4\998D\8e\a7,=\00\00\00\00\00\a0\eb?\00\00\00\00\00\00\00\00\00\80\86\0ca\d1\c2?\a1\b4\81\cbl\9d\03=\00\00\00\00\00\80\eb?\00\00\00\00\00\00\00\00\00\90\15\b0\fce\c3?\89rK#\a8/\c6<\00\00\00\00\00@\eb?\00\00\00\00\00\00\00\00\00\b03\83=\91\c4?x\b6\fdTy\83%=\00\00\00\00\00 \eb?\00\00\00\00\00\00\00\00\00\b0\a1\e4\e5\'\c5?\c7}i\e5\e83&=\00\00\00\00\00\e0\ea?\00\00\00\00\00\00\00\00\00\10\8c\beNW\c6?x.<,\8b\cf\19=\00\00\00\00\00\c0\ea?\00\00\00\00\00\00\00\00\00pu\8b\12\f0\c6?\e1!\9c\e5\8d\11%\bd\00\00\00\00\00\a0\ea?\00\00\00\00\00\00\00\00\00PD\85\8d\89\c7?\05C\91p\10f\1c\bd\00\00\00\00\00`\ea?\00\00\00\00\00\00\00\00\00\009\eb\af\be\c8?\d1,\e9\aaT=\07\bd\00\00\00\00\00@\ea?\00\00\00\00\00\00\00\00\00\00\f7\dcZZ\c9?o\ff\a0X(\f2\07=\00\00\00\00\00\00\ea?\00\00\00\00\00\00\00\00\00\e0\8a<\ed\93\ca?i!VPCr(\bd\00\00\00\00\00\e0\e9?\00\00\00\00\00\00\00\00\00\d0[W\d81\cb?\aa\e1\acN\8d5\0c\bd\00\00\00\00\00\c0\e9?\00\00\00\00\00\00\00\00\00\e0;8\87\d0\cb?\b6\12TY\c4K-\bd\00\00\00\00\00\a0\e9?\00\00\00\00\00\00\00\00\00\10\f0\c6\fbo\cc?\d2+\96\c5r\ec\f1\bc\00\00\00\00\00`\e9?\00\00\00\00\00\00\00\00\00\90\d4\b0=\b1\cd?5\b0\15\f7*\ff*\bd\00\00\00\00\00@\e9?\00\00\00\00\00\00\00\00\00\10\e7\ff\0eS\ce?0\f4A`\'\12\c2<\00\00\00\00\00 \e9?\00\00\00\00\00\00\00\00\00\00\dd\e4\ad\f5\ce?\11\8e\bbe\15!\ca\bc\00\00\00\00\00\00\e9?\00\00\00\00\00\00\00\00\00\b0\b3l\1c\99\cf?0\df\0c\ca\ec\cb\1b=\00\00\00\00\00\c0\e8?\00\00\00\00\00\00\00\00\00XM`8q\d0?\91N\ed\16\db\9c\f8<\00\00\00\00\00\a0\e8?\00\00\00\00\00\00\00\00\00`ag-\c4\d0?\e9\ea<\16\8b\18\'=\00\00\00\00\00\80\e8?\00\00\00\00\00\00\00\00\00\e8\'\82\8e\17\d1?\1c\f0\a5c\0e!,\bd\00\00\00\00\00`\e8?\00\00\00\00\00\00\00\00\00\f8\ac\cb\\k\d1?\81\16\a5\f7\cd\9a+=\00\00\00\00\00@\e8?\00\00\00\00\00\00\00\00\00hZc\99\bf\d1?\b7\bdGQ\ed\a6,=\00\00\00\00\00 \e8?\00\00\00\00\00\00\00\00\00\b8\0emE\14\d2?\ea\baF\ba\de\87\n=\00\00\00\00\00\e0\e7?\00\00\00\00\00\00\00\00\00\90\dc|\f0\be\d2?\f4\04PJ\fa\9c*=\00\00\00\00\00\c0\e7?\00\00\00\00\00\00\00\00\00`\d3\e1\f1\14\d3?\b8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") + (data (i32.const 9564) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000") + (data (i32.const 9596) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N") + (data (i32.const 9628) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 9676) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 9784) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8)\93i\1b\04\bd\00\00\00\00\00\00\f6?\00\00\00\00\00\00\00\00\00`\1c\c2\8ba\d4\bf\cc\84LH/\d8\13=\00\00\00\00\00\e0\f5?\00\00\00\00\00\00\00\00\00\a8\86\860\04\d4\bf:\0b\82\ed\f3B\dc<\00\00\00\00\00\c0\f5?\00\00\00\00\00\00\00\00\00HiUL\a6\d3\bf`\94Q\86\c6\b1 =\00\00\00\00\00\a0\f5?\00\00\00\00\00\00\00\00\00\80\98\9a\ddG\d3\bf\92\80\c5\d4MY%=\00\00\00\00\00\80\f5?\00\00\00\00\00\00\00\00\00 \e1\ba\e2\e8\d2\bf\d8+\b7\99\1e{&=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00@\f5?\00\00\00\00\00\00\00\00\00x\cf\fbA)\d2\bfv\daS($Z\16\bd\00\00\00\00\00 \f5?\00\00\00\00\00\00\00\00\00\98i\c1\98\c8\d1\bf\04T\e7h\bc\af\1f\bd\00\00\00\00\00\00\f5?\00\00\00\00\00\00\00\00\00\a8\ab\ab\\g\d1\bf\f0\a8\823\c6\1f\1f=\00\00\00\00\00\e0\f4?\00\00\00\00\00\00\00\00\00H\ae\f9\8b\05\d1\bffZ\05\fd\c4\a8&\bd\00\00\00\00\00\c0\f4?\00\00\00\00\00\00\00\00\00\90s\e2$\a3\d0\bf\0e\03\f4~\eek\0c\bd\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\80\f4?\00\00\00\00\00\00\00\00\00@^m\18\b9\cf\bf\87<\99\ab*W\0d=\00\00\00\00\00`\f4?\00\00\00\00\00\00\00\00\00`\dc\cb\ad\f0\ce\bf$\af\86\9c\b7&+=\00\00\00\00\00@\f4?\00\00\00\00\00\00\00\00\00\f0*n\07\'\ce\bf\10\ff?TO/\17\bd\00\00\00\00\00 \f4?\00\00\00\00\00\00\00\00\00\c0Ok!\\\cd\bf\1bh\ca\bb\91\ba!=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy\'=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy\'=\00\00\00\00\00\e0\f3?\00\00\00\00\00\00\00\00\00\90-t\86\c2\cb\bf\8f\b7\8b1\b0N\19=\00\00\00\00\00\c0\f3?\00\00\00\00\00\00\00\00\00\c0\80N\c9\f3\ca\bff\90\cd?cN\ba<\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\80\f3?\00\00\00\00\00\00\00\00\00P\f4\9cZR\c9\bf\e3\d4\c1\04\d9\d1*\bd\00\00\00\00\00`\f3?\00\00\00\00\00\00\00\00\00\d0 e\a0\7f\c8\bf\t\fa\db\7f\bf\bd+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00 \f3?\00\00\00\00\00\00\00\00\00\d0\19\e7\0f\d6\c6\bff\e2\b2\a3j\e4\10\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\e0\f2?\00\00\00\00\00\00\00\00\00\b0\a1\e3\e5&\c5\bf\8f[\07\90\8b\de \bd\00\00\00\00\00\c0\f2?\00\00\00\00\00\00\00\00\00\80\cbl+M\c4\bf\11\0e\bd\00\00\00\00\00\e0\ed?\00\00\00\00\00\00\00\00\00`F\d1;\97\b1?\9b\9e\0dV]2%\bd\00\00\00\00\00\a0\ed?\00\00\00\00\00\00\00\00\00\e0\d1\a7\f5\bd\b3?\d7N\db\a5^\c8,=\00\00\00\00\00`\ed?\00\00\00\00\00\00\00\00\00\a0\97MZ\e9\b5?\1e\1d]<\06i,\bd\00\00\00\00\00@\ed?\00\00\00\00\00\00\00\00\00\c0\ea\n\d3\00\b7?2\ed\9d\a9\8d\1e\ec<\00\00\00\00\00\00\ed?\00\00\00\00\00\00\00\00\00@Y]^3\b9?\daG\bd:\\\11#=\00\00\00\00\00\c0\ec?\00\00\00\00\00\00\00\00\00`\ad\8d\c8j\bb?\e5h\f7+\80\90\13\bd\00\00\00\00\00\a0\ec?\00\00\00\00\00\00\00\00\00@\bc\01X\88\bc?\d3\acZ\c6\d1F&=\00\00\00\00\00`\ec?\00\00\00\00\00\00\00\00\00 \n\839\c7\be?\e0E\e6\afh\c0-\bd\00\00\00\00\00@\ec?\00\00\00\00\00\00\00\00\00\e0\db9\91\e8\bf?\fd\n\a1O\d64%\bd\00\00\00\00\00\00\ec?\00\00\00\00\00\00\00\00\00\e0\'\82\8e\17\c1?\f2\07-\cex\ef!=\00\00\00\00\00\e0\eb?\00\00\00\00\00\00\00\00\00\f0#~+\aa\c1?4\998D\8e\a7,=\00\00\00\00\00\a0\eb?\00\00\00\00\00\00\00\00\00\80\86\0ca\d1\c2?\a1\b4\81\cbl\9d\03=\00\00\00\00\00\80\eb?\00\00\00\00\00\00\00\00\00\90\15\b0\fce\c3?\89rK#\a8/\c6<\00\00\00\00\00@\eb?\00\00\00\00\00\00\00\00\00\b03\83=\91\c4?x\b6\fdTy\83%=\00\00\00\00\00 \eb?\00\00\00\00\00\00\00\00\00\b0\a1\e4\e5\'\c5?\c7}i\e5\e83&=\00\00\00\00\00\e0\ea?\00\00\00\00\00\00\00\00\00\10\8c\beNW\c6?x.<,\8b\cf\19=\00\00\00\00\00\c0\ea?\00\00\00\00\00\00\00\00\00pu\8b\12\f0\c6?\e1!\9c\e5\8d\11%\bd\00\00\00\00\00\a0\ea?\00\00\00\00\00\00\00\00\00PD\85\8d\89\c7?\05C\91p\10f\1c\bd\00\00\00\00\00`\ea?\00\00\00\00\00\00\00\00\00\009\eb\af\be\c8?\d1,\e9\aaT=\07\bd\00\00\00\00\00@\ea?\00\00\00\00\00\00\00\00\00\00\f7\dcZZ\c9?o\ff\a0X(\f2\07=\00\00\00\00\00\00\ea?\00\00\00\00\00\00\00\00\00\e0\8a<\ed\93\ca?i!VPCr(\bd\00\00\00\00\00\e0\e9?\00\00\00\00\00\00\00\00\00\d0[W\d81\cb?\aa\e1\acN\8d5\0c\bd\00\00\00\00\00\c0\e9?\00\00\00\00\00\00\00\00\00\e0;8\87\d0\cb?\b6\12TY\c4K-\bd\00\00\00\00\00\a0\e9?\00\00\00\00\00\00\00\00\00\10\f0\c6\fbo\cc?\d2+\96\c5r\ec\f1\bc\00\00\00\00\00`\e9?\00\00\00\00\00\00\00\00\00\90\d4\b0=\b1\cd?5\b0\15\f7*\ff*\bd\00\00\00\00\00@\e9?\00\00\00\00\00\00\00\00\00\10\e7\ff\0eS\ce?0\f4A`\'\12\c2<\00\00\00\00\00 \e9?\00\00\00\00\00\00\00\00\00\00\dd\e4\ad\f5\ce?\11\8e\bbe\15!\ca\bc\00\00\00\00\00\00\e9?\00\00\00\00\00\00\00\00\00\b0\b3l\1c\99\cf?0\df\0c\ca\ec\cb\1b=\00\00\00\00\00\c0\e8?\00\00\00\00\00\00\00\00\00XM`8q\d0?\91N\ed\16\db\9c\f8<\00\00\00\00\00\a0\e8?\00\00\00\00\00\00\00\00\00`ag-\c4\d0?\e9\ea<\16\8b\18\'=\00\00\00\00\00\80\e8?\00\00\00\00\00\00\00\00\00\e8\'\82\8e\17\d1?\1c\f0\a5c\0e!,\bd\00\00\00\00\00`\e8?\00\00\00\00\00\00\00\00\00\f8\ac\cb\\k\d1?\81\16\a5\f7\cd\9a+=\00\00\00\00\00@\e8?\00\00\00\00\00\00\00\00\00hZc\99\bf\d1?\b7\bdGQ\ed\a6,=\00\00\00\00\00 \e8?\00\00\00\00\00\00\00\00\00\b8\0emE\14\d2?\ea\baF\ba\de\87\n=\00\00\00\00\00\e0\e7?\00\00\00\00\00\00\00\00\00\90\dc|\f0\be\d2?\f4\04PJ\fa\9c*=\00\00\00\00\00\c0\e7?\00\00\00\00\00\00\00\00\00`\d3\e1\f1\14\d3?\b8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") - (data (i32.const 8572) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000\00\00\00\00\00\00\00") - (data (i32.const 8604) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N\00\00\00\00\00\00\00") - (data (i32.const 8636) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 8684) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 8736) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 8792) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8)\93i\1b\04\bd\00\00\00\00\00\00\f6?\00\00\00\00\00\00\00\00\00`\1c\c2\8ba\d4\bf\cc\84LH/\d8\13=\00\00\00\00\00\e0\f5?\00\00\00\00\00\00\00\00\00\a8\86\860\04\d4\bf:\0b\82\ed\f3B\dc<\00\00\00\00\00\c0\f5?\00\00\00\00\00\00\00\00\00HiUL\a6\d3\bf`\94Q\86\c6\b1 =\00\00\00\00\00\a0\f5?\00\00\00\00\00\00\00\00\00\80\98\9a\ddG\d3\bf\92\80\c5\d4MY%=\00\00\00\00\00\80\f5?\00\00\00\00\00\00\00\00\00 \e1\ba\e2\e8\d2\bf\d8+\b7\99\1e{&=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00@\f5?\00\00\00\00\00\00\00\00\00x\cf\fbA)\d2\bfv\daS($Z\16\bd\00\00\00\00\00 \f5?\00\00\00\00\00\00\00\00\00\98i\c1\98\c8\d1\bf\04T\e7h\bc\af\1f\bd\00\00\00\00\00\00\f5?\00\00\00\00\00\00\00\00\00\a8\ab\ab\\g\d1\bf\f0\a8\823\c6\1f\1f=\00\00\00\00\00\e0\f4?\00\00\00\00\00\00\00\00\00H\ae\f9\8b\05\d1\bffZ\05\fd\c4\a8&\bd\00\00\00\00\00\c0\f4?\00\00\00\00\00\00\00\00\00\90s\e2$\a3\d0\bf\0e\03\f4~\eek\0c\bd\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\80\f4?\00\00\00\00\00\00\00\00\00@^m\18\b9\cf\bf\87<\99\ab*W\0d=\00\00\00\00\00`\f4?\00\00\00\00\00\00\00\00\00`\dc\cb\ad\f0\ce\bf$\af\86\9c\b7&+=\00\00\00\00\00@\f4?\00\00\00\00\00\00\00\00\00\f0*n\07\'\ce\bf\10\ff?TO/\17\bd\00\00\00\00\00 \f4?\00\00\00\00\00\00\00\00\00\c0Ok!\\\cd\bf\1bh\ca\bb\91\ba!=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy\'=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy\'=\00\00\00\00\00\e0\f3?\00\00\00\00\00\00\00\00\00\90-t\86\c2\cb\bf\8f\b7\8b1\b0N\19=\00\00\00\00\00\c0\f3?\00\00\00\00\00\00\00\00\00\c0\80N\c9\f3\ca\bff\90\cd?cN\ba<\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\80\f3?\00\00\00\00\00\00\00\00\00P\f4\9cZR\c9\bf\e3\d4\c1\04\d9\d1*\bd\00\00\00\00\00`\f3?\00\00\00\00\00\00\00\00\00\d0 e\a0\7f\c8\bf\t\fa\db\7f\bf\bd+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00 \f3?\00\00\00\00\00\00\00\00\00\d0\19\e7\0f\d6\c6\bff\e2\b2\a3j\e4\10\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\e0\f2?\00\00\00\00\00\00\00\00\00\b0\a1\e3\e5&\c5\bf\8f[\07\90\8b\de \bd\00\00\00\00\00\c0\f2?\00\00\00\00\00\00\00\00\00\80\cbl+M\c4\bf\11\0e\bd\00\00\00\00\00\e0\ed?\00\00\00\00\00\00\00\00\00`F\d1;\97\b1?\9b\9e\0dV]2%\bd\00\00\00\00\00\a0\ed?\00\00\00\00\00\00\00\00\00\e0\d1\a7\f5\bd\b3?\d7N\db\a5^\c8,=\00\00\00\00\00`\ed?\00\00\00\00\00\00\00\00\00\a0\97MZ\e9\b5?\1e\1d]<\06i,\bd\00\00\00\00\00@\ed?\00\00\00\00\00\00\00\00\00\c0\ea\n\d3\00\b7?2\ed\9d\a9\8d\1e\ec<\00\00\00\00\00\00\ed?\00\00\00\00\00\00\00\00\00@Y]^3\b9?\daG\bd:\\\11#=\00\00\00\00\00\c0\ec?\00\00\00\00\00\00\00\00\00`\ad\8d\c8j\bb?\e5h\f7+\80\90\13\bd\00\00\00\00\00\a0\ec?\00\00\00\00\00\00\00\00\00@\bc\01X\88\bc?\d3\acZ\c6\d1F&=\00\00\00\00\00`\ec?\00\00\00\00\00\00\00\00\00 \n\839\c7\be?\e0E\e6\afh\c0-\bd\00\00\00\00\00@\ec?\00\00\00\00\00\00\00\00\00\e0\db9\91\e8\bf?\fd\n\a1O\d64%\bd\00\00\00\00\00\00\ec?\00\00\00\00\00\00\00\00\00\e0\'\82\8e\17\c1?\f2\07-\cex\ef!=\00\00\00\00\00\e0\eb?\00\00\00\00\00\00\00\00\00\f0#~+\aa\c1?4\998D\8e\a7,=\00\00\00\00\00\a0\eb?\00\00\00\00\00\00\00\00\00\80\86\0ca\d1\c2?\a1\b4\81\cbl\9d\03=\00\00\00\00\00\80\eb?\00\00\00\00\00\00\00\00\00\90\15\b0\fce\c3?\89rK#\a8/\c6<\00\00\00\00\00@\eb?\00\00\00\00\00\00\00\00\00\b03\83=\91\c4?x\b6\fdTy\83%=\00\00\00\00\00 \eb?\00\00\00\00\00\00\00\00\00\b0\a1\e4\e5\'\c5?\c7}i\e5\e83&=\00\00\00\00\00\e0\ea?\00\00\00\00\00\00\00\00\00\10\8c\beNW\c6?x.<,\8b\cf\19=\00\00\00\00\00\c0\ea?\00\00\00\00\00\00\00\00\00pu\8b\12\f0\c6?\e1!\9c\e5\8d\11%\bd\00\00\00\00\00\a0\ea?\00\00\00\00\00\00\00\00\00PD\85\8d\89\c7?\05C\91p\10f\1c\bd\00\00\00\00\00`\ea?\00\00\00\00\00\00\00\00\00\009\eb\af\be\c8?\d1,\e9\aaT=\07\bd\00\00\00\00\00@\ea?\00\00\00\00\00\00\00\00\00\00\f7\dcZZ\c9?o\ff\a0X(\f2\07=\00\00\00\00\00\00\ea?\00\00\00\00\00\00\00\00\00\e0\8a<\ed\93\ca?i!VPCr(\bd\00\00\00\00\00\e0\e9?\00\00\00\00\00\00\00\00\00\d0[W\d81\cb?\aa\e1\acN\8d5\0c\bd\00\00\00\00\00\c0\e9?\00\00\00\00\00\00\00\00\00\e0;8\87\d0\cb?\b6\12TY\c4K-\bd\00\00\00\00\00\a0\e9?\00\00\00\00\00\00\00\00\00\10\f0\c6\fbo\cc?\d2+\96\c5r\ec\f1\bc\00\00\00\00\00`\e9?\00\00\00\00\00\00\00\00\00\90\d4\b0=\b1\cd?5\b0\15\f7*\ff*\bd\00\00\00\00\00@\e9?\00\00\00\00\00\00\00\00\00\10\e7\ff\0eS\ce?0\f4A`\'\12\c2<\00\00\00\00\00 \e9?\00\00\00\00\00\00\00\00\00\00\dd\e4\ad\f5\ce?\11\8e\bbe\15!\ca\bc\00\00\00\00\00\00\e9?\00\00\00\00\00\00\00\00\00\b0\b3l\1c\99\cf?0\df\0c\ca\ec\cb\1b=\00\00\00\00\00\c0\e8?\00\00\00\00\00\00\00\00\00XM`8q\d0?\91N\ed\16\db\9c\f8<\00\00\00\00\00\a0\e8?\00\00\00\00\00\00\00\00\00`ag-\c4\d0?\e9\ea<\16\8b\18\'=\00\00\00\00\00\80\e8?\00\00\00\00\00\00\00\00\00\e8\'\82\8e\17\d1?\1c\f0\a5c\0e!,\bd\00\00\00\00\00`\e8?\00\00\00\00\00\00\00\00\00\f8\ac\cb\\k\d1?\81\16\a5\f7\cd\9a+=\00\00\00\00\00@\e8?\00\00\00\00\00\00\00\00\00hZc\99\bf\d1?\b7\bdGQ\ed\a6,=\00\00\00\00\00 \e8?\00\00\00\00\00\00\00\00\00\b8\0emE\14\d2?\ea\baF\ba\de\87\n=\00\00\00\00\00\e0\e7?\00\00\00\00\00\00\00\00\00\90\dc|\f0\be\d2?\f4\04PJ\fa\9c*=\00\00\00\00\00\c0\e7?\00\00\00\00\00\00\00\00\00`\d3\e1\f1\14\d3?\b8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") + (data (i32.const 8540) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000\00\00\00\00\00\00\00") + (data (i32.const 8572) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N\00\00\00\00\00\00\00") + (data (i32.const 8604) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 8652) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 8704) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 8760) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -156,6 +156,123 @@ (data (i32.const 7936) "\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\02\82") (export "memory" (memory $0)) (export "_start" (func $~start)) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $1 + i32.const 0 + local.get $0 + select + i32.eqz + if + i32.const 0 + return + end + local.get $0 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + local.tee $3 + local.get $1 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.ne + if + i32.const 0 + return + end + local.get $0 + local.tee $2 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + local.get $3 + local.tee $0 + i32.const 4 + i32.ge_u + i32.and + if + loop $do-loop|0 + local.get $2 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $2 + i32.const 8 + i32.add + local.set $2 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-loop|0 + end + end + end + block $__inlined_func$~lib/util/string/compareImpl + loop $while-continue|1 + local.get $0 + local.tee $3 + i32.const 1 + i32.sub + local.set $0 + local.get $3 + if + local.get $2 + i32.load16_u + local.tee $5 + local.get $1 + i32.load16_u + local.tee $4 + i32.sub + local.set $3 + local.get $4 + local.get $5 + i32.ne + br_if $__inlined_func$~lib/util/string/compareImpl + local.get $2 + i32.const 2 + i32.add + local.set $2 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + local.set $3 + end + local.get $3 + i32.eqz + ) (func $~lib/string/String.UTF8.encodeUnsafe@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -349,7 +466,11 @@ i64.const 9071471065260641 i64.store local.get $0 + i32.const 0 + call $~lib/string/String.__eq if (result i32) + i32.const 19 + else local.get $0 i32.const 20 i32.sub @@ -365,8 +486,6 @@ call $~lib/string/String.UTF8.encodeUnsafe@varargs i32.const 19 i32.add - else - i32.const 19 end local.tee $0 i32.const 544106784 @@ -376,6 +495,9 @@ i32.add local.set $0 local.get $1 + i32.const 0 + call $~lib/string/String.__eq + i32.eqz if local.get $1 i32.const 20 @@ -3794,10 +3916,6 @@ ) (func $~lib/map/Map<~lib/string/String,u64>#find (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) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -3826,144 +3944,39 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 loop $while-continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=16 - local.tee $6 + local.tee $2 i32.const 1 i32.and if (result i32) i32.const 0 else - block $__inlined_func$~lib/string/String.__eq (result i32) - global.get $~lib/memory/__stack_pointer - local.get $2 - i32.load - local.tee $5 - i32.store - i32.const 1 - local.get $1 - local.get $5 - i32.eq - br_if $__inlined_func$~lib/string/String.__eq - drop - i32.const 0 - local.get $1 - i32.const 0 - local.get $5 - select - i32.eqz - br_if $__inlined_func$~lib/string/String.__eq - drop - i32.const 0 - local.get $5 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - local.tee $0 - local.get $1 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - i32.ne - br_if $__inlined_func$~lib/string/String.__eq - drop - block $__inlined_func$~lib/util/string/compareImpl (result i32) - local.get $5 - i32.const 7 - i32.and - local.get $1 - local.tee $3 - i32.const 7 - i32.and - i32.or - i32.eqz - local.get $0 - i32.const 4 - i32.ge_u - i32.and - if - loop $do-loop|0 - local.get $5 - i64.load - local.get $3 - i64.load - i64.eq - if - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $3 - i32.const 8 - i32.add - local.set $3 - local.get $0 - i32.const 4 - i32.sub - local.tee $0 - i32.const 4 - i32.ge_u - br_if $do-loop|0 - end - end - end - loop $while-continue|1 - local.get $0 - local.tee $4 - i32.const 1 - i32.sub - local.set $0 - local.get $4 - if - local.get $5 - i32.load16_u - local.tee $4 - local.get $3 - i32.load16_u - local.tee $7 - i32.ne - if - local.get $4 - local.get $7 - i32.sub - br $__inlined_func$~lib/util/string/compareImpl - end - local.get $5 - i32.const 2 - i32.add - local.set $5 - local.get $3 - i32.const 2 - i32.add - local.set $3 - br $while-continue|1 - end - end - i32.const 0 - end - i32.eqz - end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.load + local.tee $3 + i32.store + local.get $3 + local.get $1 + call $~lib/string/String.__eq end if global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $2 + local.get $0 return end - local.get $6 + local.get $2 i32.const -2 i32.and - local.set $2 + local.set $0 br $while-continue|0 end end diff --git a/tests/compiler/std-wasi/console.untouched.wat b/tests/compiler/std-wasi/console.untouched.wat index bc9b2076bc..be3d50e1c7 100644 --- a/tests/compiler/std-wasi/console.untouched.wat +++ b/tests/compiler/std-wasi/console.untouched.wat @@ -27,6 +27,7 @@ (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/bindings/wasi/tempbuf i32 (i32.const 112)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) @@ -42,7 +43,6 @@ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/console/timers (mut i32) (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/rt/__rtti_base i32 (i32.const 6912)) (global $~lib/memory/__data_end i32 (i32.const 6948)) @@ -195,6 +195,159 @@ local.get $1 i32.store ) + (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $6 + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $4 + i32.const 4 + i32.ge_u + if (result i32) + local.get $5 + i32.const 7 + i32.and + local.get $6 + i32.const 7 + i32.and + i32.or + i32.eqz + else + i32.const 0 + end + if + block $do-break|0 + loop $do-loop|0 + local.get $5 + i64.load + local.get $6 + i64.load + i64.ne + if + br $do-break|0 + end + local.get $5 + i32.const 8 + i32.add + local.set $5 + local.get $6 + i32.const 8 + i32.add + local.set $6 + local.get $4 + i32.const 4 + i32.sub + local.set $4 + local.get $4 + i32.const 4 + i32.ge_u + br_if $do-loop|0 + end + end + end + loop $while-continue|1 + local.get $4 + local.tee $7 + i32.const 1 + i32.sub + local.set $4 + local.get $7 + local.set $7 + local.get $7 + if + local.get $5 + i32.load16_u + local.set $8 + local.get $6 + i32.load16_u + local.set $9 + local.get $8 + local.get $9 + i32.ne + if + local.get $8 + local.get $9 + i32.sub + return + end + local.get $5 + i32.const 2 + i32.add + local.set $5 + local.get $6 + i32.const 2 + i32.add + local.set $6 + br $while-continue|1 + end + end + i32.const 0 + ) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 0 + i32.eq + end + if + i32.const 0 + return + end + local.get $0 + call $~lib/string/String#get:length + local.set $2 + local.get $2 + local.get $1 + call $~lib/string/String#get:length + i32.ne + if + i32.const 0 + return + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + ) + (func $~lib/string/String.__ne (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/string/String.__eq + i32.eqz + ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) @@ -548,7 +701,7 @@ local.set $4 local.get $0 i32.const 0 - i32.ne + call $~lib/string/String.__ne if local.get $4 local.get $0 @@ -572,7 +725,7 @@ local.set $4 local.get $1 i32.const 0 - i32.ne + call $~lib/string/String.__ne if local.get $4 local.get $1 @@ -4051,153 +4204,6 @@ end return ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $5 - local.get $2 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.set $6 - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 4 - i32.ge_u - if (result i32) - local.get $5 - i32.const 7 - i32.and - local.get $6 - i32.const 7 - i32.and - i32.or - i32.eqz - else - i32.const 0 - end - if - block $do-break|0 - loop $do-loop|0 - local.get $5 - i64.load - local.get $6 - i64.load - i64.ne - if - br $do-break|0 - end - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $6 - i32.const 8 - i32.add - local.set $6 - local.get $4 - i32.const 4 - i32.sub - local.set $4 - local.get $4 - i32.const 4 - i32.ge_u - br_if $do-loop|0 - end - end - end - loop $while-continue|1 - local.get $4 - local.tee $7 - i32.const 1 - i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 - if - local.get $5 - i32.load16_u - local.set $8 - local.get $6 - i32.load16_u - local.set $9 - local.get $8 - local.get $9 - i32.ne - if - local.get $8 - local.get $9 - i32.sub - return - end - local.get $5 - i32.const 2 - i32.add - local.set $5 - local.get $6 - i32.const 2 - i32.add - local.set $6 - br $while-continue|1 - end - end - i32.const 0 - ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - local.get $0 - i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $1 - i32.const 0 - i32.eq - end - if - i32.const 0 - return - end - local.get $0 - call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 - call $~lib/string/String#get:length - i32.ne - if - i32.const 0 - return - end - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz - ) (func $~lib/map/Map<~lib/string/String,u64>#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 diff --git a/tests/compiler/std-wasi/crypto.optimized.wat b/tests/compiler/std-wasi/crypto.optimized.wat index 2337f7ceda..61aaf0e9f3 100644 --- a/tests/compiler/std-wasi/crypto.optimized.wat +++ b/tests/compiler/std-wasi/crypto.optimized.wat @@ -328,6 +328,13 @@ i64.store local.get $0 if (result i32) + i32.const 0 + else + i32.const 1 + end + if (result i32) + i32.const 19 + else local.get $0 i32.const 20 i32.sub @@ -343,8 +350,6 @@ call $~lib/string/String.UTF8.encodeUnsafe@varargs i32.const 19 i32.add - else - i32.const 19 end local.tee $0 i32.const 544106784 @@ -354,6 +359,12 @@ i32.add local.set $0 local.get $1 + if (result i32) + i32.const 0 + else + i32.const 1 + end + i32.eqz if local.get $1 i32.const 20 diff --git a/tests/compiler/std-wasi/crypto.untouched.wat b/tests/compiler/std-wasi/crypto.untouched.wat index ffc0365dcf..fdf9a175f8 100644 --- a/tests/compiler/std-wasi/crypto.untouched.wat +++ b/tests/compiler/std-wasi/crypto.untouched.wat @@ -19,6 +19,7 @@ (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) @@ -34,7 +35,6 @@ (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $std-wasi/crypto/ab (mut i32) (i32.const 0)) (global $std-wasi/crypto/buf (mut i32) (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/process/process.stdout i32 (i32.const 1)) (global $~lib/bindings/wasi/tempbuf i32 (i32.const 5648)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) @@ -169,6 +169,159 @@ i32.const 1 i32.shr_u ) + (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $6 + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $4 + i32.const 4 + i32.ge_u + if (result i32) + local.get $5 + i32.const 7 + i32.and + local.get $6 + i32.const 7 + i32.and + i32.or + i32.eqz + else + i32.const 0 + end + if + block $do-break|0 + loop $do-loop|0 + local.get $5 + i64.load + local.get $6 + i64.load + i64.ne + if + br $do-break|0 + end + local.get $5 + i32.const 8 + i32.add + local.set $5 + local.get $6 + i32.const 8 + i32.add + local.set $6 + local.get $4 + i32.const 4 + i32.sub + local.set $4 + local.get $4 + i32.const 4 + i32.ge_u + br_if $do-loop|0 + end + end + end + loop $while-continue|1 + local.get $4 + local.tee $7 + i32.const 1 + i32.sub + local.set $4 + local.get $7 + local.set $7 + local.get $7 + if + local.get $5 + i32.load16_u + local.set $8 + local.get $6 + i32.load16_u + local.set $9 + local.get $8 + local.get $9 + i32.ne + if + local.get $8 + local.get $9 + i32.sub + return + end + local.get $5 + i32.const 2 + i32.add + local.set $5 + local.get $6 + i32.const 2 + i32.add + local.set $6 + br $while-continue|1 + end + end + i32.const 0 + ) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 0 + i32.eq + end + if + i32.const 0 + return + end + local.get $0 + call $~lib/string/String#get:length + local.set $2 + local.get $2 + local.get $1 + call $~lib/string/String#get:length + i32.ne + if + i32.const 0 + return + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + ) + (func $~lib/string/String.__ne (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/string/String.__eq + i32.eqz + ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) @@ -522,7 +675,7 @@ local.set $4 local.get $0 i32.const 0 - i32.ne + call $~lib/string/String.__ne if local.get $4 local.get $0 @@ -546,7 +699,7 @@ local.set $4 local.get $1 i32.const 0 - i32.ne + call $~lib/string/String.__ne if local.get $4 local.get $1 diff --git a/tests/compiler/std-wasi/process.optimized.wat b/tests/compiler/std-wasi/process.optimized.wat index 2597da3922..90e413b738 100644 --- a/tests/compiler/std-wasi/process.optimized.wat +++ b/tests/compiler/std-wasi/process.optimized.wat @@ -153,6 +153,128 @@ (data (i32.const 7360) "\05\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02A\00\00\00\00\00\00\10A\82") (export "memory" (memory $0)) (export "_start" (func $~start)) + (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + local.get $1 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.tee $1 + i32.const 7 + i32.and + local.get $2 + i32.const 7 + i32.and + i32.or + i32.eqz + local.get $3 + i32.const 4 + i32.ge_u + i32.and + if + loop $do-loop|0 + local.get $1 + i64.load + local.get $2 + i64.load + i64.eq + if + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $2 + i32.const 8 + i32.add + local.set $2 + local.get $3 + i32.const 4 + i32.sub + local.tee $3 + i32.const 4 + i32.ge_u + br_if $do-loop|0 + end + end + end + loop $while-continue|1 + local.get $3 + local.tee $0 + i32.const 1 + i32.sub + local.set $3 + local.get $0 + if + local.get $1 + i32.load16_u + local.tee $0 + local.get $2 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $0 + local.get $4 + i32.sub + return + end + local.get $1 + i32.const 2 + i32.add + local.set $1 + local.get $2 + i32.const 2 + i32.add + local.set $2 + br $while-continue|1 + end + end + i32.const 0 + ) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $1 + i32.const 0 + local.get $0 + select + i32.eqz + if + i32.const 0 + return + end + local.get $0 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + local.tee $2 + local.get $1 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.ne + if + i32.const 0 + return + end + local.get $0 + i32.const 0 + local.get $1 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + ) (func $~lib/string/String.UTF8.encodeUnsafe@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -346,7 +468,11 @@ i64.const 9071471065260641 i64.store local.get $0 + i32.const 0 + call $~lib/string/String.__eq if (result i32) + i32.const 19 + else local.get $0 i32.const 20 i32.sub @@ -362,8 +488,6 @@ call $~lib/string/String.UTF8.encodeUnsafe@varargs i32.const 19 i32.add - else - i32.const 19 end local.tee $0 i32.const 544106784 @@ -373,6 +497,9 @@ i32.add local.set $0 local.get $1 + i32.const 0 + call $~lib/string/String.__eq + i32.eqz if local.get $1 i32.const 20 @@ -2773,85 +2900,6 @@ call $byn-split-outlined-A$~lib/rt/itcms/__link end ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - local.get $1 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.tee $1 - i32.const 7 - i32.and - local.get $2 - i32.const 7 - i32.and - i32.or - i32.eqz - local.get $3 - i32.const 4 - i32.ge_u - i32.and - if - loop $do-loop|0 - local.get $1 - i64.load - local.get $2 - i64.load - i64.eq - if - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 8 - i32.add - local.set $2 - local.get $3 - i32.const 4 - i32.sub - local.tee $3 - i32.const 4 - i32.ge_u - br_if $do-loop|0 - end - end - end - loop $while-continue|1 - local.get $3 - local.tee $0 - i32.const 1 - i32.sub - local.set $3 - local.get $0 - if - local.get $1 - i32.load16_u - local.tee $0 - local.get $2 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $0 - local.get $4 - i32.sub - return - end - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $2 - i32.const 2 - i32.add - local.set $2 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -3396,7 +3444,6 @@ ) (func $~lib/map/Map<~lib/string/String,~lib/string/String>#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -3431,56 +3478,20 @@ if local.get $0 i32.load offset=8 - local.tee $4 + local.tee $2 i32.const 1 i32.and if (result i32) i32.const 0 else - block $__inlined_func$~lib/string/String.__eq (result i32) - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.load - local.tee $3 - i32.store - i32.const 1 - local.get $1 - local.get $3 - i32.eq - br_if $__inlined_func$~lib/string/String.__eq - drop - i32.const 0 - local.get $1 - i32.const 0 - local.get $3 - select - i32.eqz - br_if $__inlined_func$~lib/string/String.__eq - drop - i32.const 0 - local.get $3 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - local.tee $2 - local.get $1 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - i32.ne - br_if $__inlined_func$~lib/string/String.__eq - drop - local.get $3 - i32.const 0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz - end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.load + local.tee $3 + i32.store + local.get $3 + local.get $1 + call $~lib/string/String.__eq end if global.get $~lib/memory/__stack_pointer @@ -3490,7 +3501,7 @@ local.get $0 return end - local.get $4 + local.get $2 i32.const -2 i32.and local.set $0 diff --git a/tests/compiler/std-wasi/process.untouched.wat b/tests/compiler/std-wasi/process.untouched.wat index 3b8c085871..8029d25a7e 100644 --- a/tests/compiler/std-wasi/process.untouched.wat +++ b/tests/compiler/std-wasi/process.untouched.wat @@ -29,6 +29,7 @@ (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/bindings/wasi/tempbuf i32 (i32.const 64)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) @@ -46,7 +47,6 @@ (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) (global $~lib/process/process.argv (mut i32) (i32.const 0)) (global $std-wasi/process/argv (mut i32) (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) (global $~lib/process/process.env (mut i32) (i32.const 0)) (global $std-wasi/process/env (mut i32) (i32.const 0)) @@ -193,6 +193,159 @@ local.get $1 i32.store ) + (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $6 + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $4 + i32.const 4 + i32.ge_u + if (result i32) + local.get $5 + i32.const 7 + i32.and + local.get $6 + i32.const 7 + i32.and + i32.or + i32.eqz + else + i32.const 0 + end + if + block $do-break|0 + loop $do-loop|0 + local.get $5 + i64.load + local.get $6 + i64.load + i64.ne + if + br $do-break|0 + end + local.get $5 + i32.const 8 + i32.add + local.set $5 + local.get $6 + i32.const 8 + i32.add + local.set $6 + local.get $4 + i32.const 4 + i32.sub + local.set $4 + local.get $4 + i32.const 4 + i32.ge_u + br_if $do-loop|0 + end + end + end + loop $while-continue|1 + local.get $4 + local.tee $7 + i32.const 1 + i32.sub + local.set $4 + local.get $7 + local.set $7 + local.get $7 + if + local.get $5 + i32.load16_u + local.set $8 + local.get $6 + i32.load16_u + local.set $9 + local.get $8 + local.get $9 + i32.ne + if + local.get $8 + local.get $9 + i32.sub + return + end + local.get $5 + i32.const 2 + i32.add + local.set $5 + local.get $6 + i32.const 2 + i32.add + local.set $6 + br $while-continue|1 + end + end + i32.const 0 + ) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 0 + i32.eq + end + if + i32.const 0 + return + end + local.get $0 + call $~lib/string/String#get:length + local.set $2 + local.get $2 + local.get $1 + call $~lib/string/String#get:length + i32.ne + if + i32.const 0 + return + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + ) + (func $~lib/string/String.__ne (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/string/String.__eq + i32.eqz + ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) @@ -546,7 +699,7 @@ local.set $4 local.get $0 i32.const 0 - i32.ne + call $~lib/string/String.__ne if local.get $4 local.get $0 @@ -570,7 +723,7 @@ local.set $4 local.get $1 i32.const 0 - i32.ne + call $~lib/string/String.__ne if local.get $4 local.get $1 @@ -4010,111 +4163,6 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $5 - local.get $2 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.set $6 - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 4 - i32.ge_u - if (result i32) - local.get $5 - i32.const 7 - i32.and - local.get $6 - i32.const 7 - i32.and - i32.or - i32.eqz - else - i32.const 0 - end - if - block $do-break|0 - loop $do-loop|0 - local.get $5 - i64.load - local.get $6 - i64.load - i64.ne - if - br $do-break|0 - end - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $6 - i32.const 8 - i32.add - local.set $6 - local.get $4 - i32.const 4 - i32.sub - local.set $4 - local.get $4 - i32.const 4 - i32.ge_u - br_if $do-loop|0 - end - end - end - loop $while-continue|1 - local.get $4 - local.tee $7 - i32.const 1 - i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 - if - local.get $5 - i32.load16_u - local.set $8 - local.get $6 - i32.load16_u - local.set $9 - local.get $8 - local.get $9 - i32.ne - if - local.get $8 - local.get $9 - i32.sub - return - end - local.get $5 - i32.const 2 - i32.add - local.set $5 - local.get $6 - i32.const 2 - i32.add - local.set $6 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -4440,48 +4488,6 @@ end return ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - local.get $0 - i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $1 - i32.const 0 - i32.eq - end - if - i32.const 0 - return - end - local.get $0 - call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 - call $~lib/string/String#get:length - i32.ne - if - i32.const 0 - return - end - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz - ) (func $~lib/map/MapEntry<~lib/string/String,~lib/string/String>#set:value (param $0 i32) (param $1 i32) local.get $0 local.get $1 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 5249f6908c..98e7e19444 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -16203,7 +16203,7 @@ local.set $0 i32.const -1 local.set $1 - block $__inlined_func$~lib/array/Array#indexOf39 + block $__inlined_func$~lib/array/Array#indexOf38 local.get $2 i32.load offset=12 local.tee $3 @@ -16212,11 +16212,11 @@ i32.const 1 local.get $3 select - br_if $__inlined_func$~lib/array/Array#indexOf39 + br_if $__inlined_func$~lib/array/Array#indexOf38 local.get $2 i32.load offset=4 local.set $2 - loop $while-continue|041 + loop $while-continue|040 local.get $0 local.get $3 i32.lt_s @@ -16230,12 +16230,12 @@ i32.load i32.const 42 i32.eq - br_if $__inlined_func$~lib/array/Array#indexOf39 + br_if $__inlined_func$~lib/array/Array#indexOf38 local.get $1 i32.const 1 i32.add local.set $0 - br $while-continue|041 + br $while-continue|040 end end i32.const -1 @@ -16262,7 +16262,7 @@ local.set $0 i32.const -1 local.set $1 - block $__inlined_func$~lib/array/Array#indexOf42 + block $__inlined_func$~lib/array/Array#indexOf41 local.get $2 i32.load offset=12 local.tee $3 @@ -16271,11 +16271,11 @@ i32.const 1 local.get $3 select - br_if $__inlined_func$~lib/array/Array#indexOf42 + br_if $__inlined_func$~lib/array/Array#indexOf41 local.get $2 i32.load offset=4 local.set $2 - loop $while-continue|044 + loop $while-continue|043 local.get $0 local.get $3 i32.lt_s @@ -16289,12 +16289,12 @@ i32.load i32.const 45 i32.eq - br_if $__inlined_func$~lib/array/Array#indexOf42 + br_if $__inlined_func$~lib/array/Array#indexOf41 local.get $1 i32.const 1 i32.add local.set $0 - br $while-continue|044 + br $while-continue|043 end end i32.const -1 @@ -16321,7 +16321,7 @@ local.set $0 i32.const -1 local.set $1 - block $__inlined_func$~lib/array/Array#indexOf45 + block $__inlined_func$~lib/array/Array#indexOf44 local.get $2 i32.load offset=12 local.tee $3 @@ -16330,11 +16330,11 @@ i32.const 1 local.get $3 select - br_if $__inlined_func$~lib/array/Array#indexOf45 + br_if $__inlined_func$~lib/array/Array#indexOf44 local.get $2 i32.load offset=4 local.set $2 - loop $while-continue|047 + loop $while-continue|046 local.get $0 local.get $3 i32.lt_s @@ -16348,12 +16348,12 @@ i32.load i32.const 43 i32.eq - br_if $__inlined_func$~lib/array/Array#indexOf45 + br_if $__inlined_func$~lib/array/Array#indexOf44 local.get $1 i32.const 1 i32.add local.set $0 - br $while-continue|047 + br $while-continue|046 end end i32.const -1 @@ -16378,7 +16378,7 @@ i32.store i32.const -1 local.set $0 - block $__inlined_func$~lib/array/Array#indexOf48 + block $__inlined_func$~lib/array/Array#indexOf47 local.get $1 i32.load offset=12 local.tee $2 @@ -16387,7 +16387,7 @@ i32.const 1 local.get $2 select - br_if $__inlined_func$~lib/array/Array#indexOf48 + br_if $__inlined_func$~lib/array/Array#indexOf47 local.get $2 i32.const 100 i32.sub @@ -16401,7 +16401,7 @@ local.get $1 i32.load offset=4 local.set $1 - loop $while-continue|050 + loop $while-continue|049 local.get $0 local.get $2 i32.lt_s @@ -16414,12 +16414,12 @@ i32.load i32.const 43 i32.eq - br_if $__inlined_func$~lib/array/Array#indexOf48 + br_if $__inlined_func$~lib/array/Array#indexOf47 local.get $0 i32.const 1 i32.add local.set $0 - br $while-continue|050 + br $while-continue|049 end end i32.const -1 @@ -16444,7 +16444,7 @@ i32.store i32.const -1 local.set $0 - block $__inlined_func$~lib/array/Array#indexOf51 + block $__inlined_func$~lib/array/Array#indexOf50 local.get $1 i32.load offset=12 local.tee $2 @@ -16453,7 +16453,7 @@ i32.const 1 local.get $2 select - br_if $__inlined_func$~lib/array/Array#indexOf51 + br_if $__inlined_func$~lib/array/Array#indexOf50 local.get $2 i32.const 2 i32.sub @@ -16467,7 +16467,7 @@ local.get $1 i32.load offset=4 local.set $1 - loop $while-continue|053 + loop $while-continue|052 local.get $0 local.get $2 i32.lt_s @@ -16480,12 +16480,12 @@ i32.load i32.const 43 i32.eq - br_if $__inlined_func$~lib/array/Array#indexOf51 + br_if $__inlined_func$~lib/array/Array#indexOf50 local.get $0 i32.const 1 i32.add local.set $0 - br $while-continue|053 + br $while-continue|052 end end i32.const -1 @@ -16510,7 +16510,7 @@ i32.store i32.const -1 local.set $0 - block $__inlined_func$~lib/array/Array#indexOf54 + block $__inlined_func$~lib/array/Array#indexOf53 local.get $1 i32.load offset=12 local.tee $2 @@ -16519,7 +16519,7 @@ i32.const 1 local.get $2 select - br_if $__inlined_func$~lib/array/Array#indexOf54 + br_if $__inlined_func$~lib/array/Array#indexOf53 local.get $2 i32.const 4 i32.sub @@ -16533,7 +16533,7 @@ local.get $1 i32.load offset=4 local.set $1 - loop $while-continue|056 + loop $while-continue|055 local.get $0 local.get $2 i32.lt_s @@ -16546,12 +16546,12 @@ i32.load i32.const 43 i32.eq - br_if $__inlined_func$~lib/array/Array#indexOf54 + br_if $__inlined_func$~lib/array/Array#indexOf53 local.get $0 i32.const 1 i32.add local.set $0 - br $while-continue|056 + br $while-continue|055 end end i32.const -1 @@ -16578,7 +16578,7 @@ local.set $0 i32.const -1 local.set $1 - block $__inlined_func$~lib/array/Array#indexOf57 + block $__inlined_func$~lib/array/Array#indexOf56 local.get $2 i32.load offset=12 local.tee $3 @@ -16587,11 +16587,11 @@ i32.const 1 local.get $3 select - br_if $__inlined_func$~lib/array/Array#indexOf57 + br_if $__inlined_func$~lib/array/Array#indexOf56 local.get $2 i32.load offset=4 local.set $2 - loop $while-continue|059 + loop $while-continue|058 local.get $0 local.get $3 i32.lt_s @@ -16605,12 +16605,12 @@ i32.load i32.const 43 i32.eq - br_if $__inlined_func$~lib/array/Array#indexOf57 + br_if $__inlined_func$~lib/array/Array#indexOf56 local.get $1 i32.const 1 i32.add local.set $0 - br $while-continue|059 + br $while-continue|058 end end i32.const -1 @@ -16637,7 +16637,7 @@ local.set $0 i32.const -1 local.set $1 - block $__inlined_func$~lib/array/Array#indexOf60 + block $__inlined_func$~lib/array/Array#indexOf59 local.get $2 i32.load offset=12 local.tee $3 @@ -16646,11 +16646,11 @@ i32.const 1 local.get $3 select - br_if $__inlined_func$~lib/array/Array#indexOf60 + br_if $__inlined_func$~lib/array/Array#indexOf59 local.get $2 i32.load offset=4 local.set $2 - loop $while-continue|062 + loop $while-continue|061 local.get $0 local.get $3 i32.lt_s @@ -16664,12 +16664,12 @@ i32.load i32.const 43 i32.eq - br_if $__inlined_func$~lib/array/Array#indexOf60 + br_if $__inlined_func$~lib/array/Array#indexOf59 local.get $1 i32.const 1 i32.add local.set $0 - br $while-continue|062 + br $while-continue|061 end end i32.const -1 @@ -16696,7 +16696,7 @@ local.set $0 i32.const -1 local.set $1 - block $__inlined_func$~lib/array/Array#indexOf63 + block $__inlined_func$~lib/array/Array#indexOf62 local.get $2 i32.load offset=12 local.tee $3 @@ -16705,11 +16705,11 @@ i32.const 1 local.get $3 select - br_if $__inlined_func$~lib/array/Array#indexOf63 + br_if $__inlined_func$~lib/array/Array#indexOf62 local.get $2 i32.load offset=4 local.set $2 - loop $while-continue|065 + loop $while-continue|064 local.get $0 local.get $3 i32.lt_s @@ -16723,12 +16723,12 @@ i32.load i32.const 43 i32.eq - br_if $__inlined_func$~lib/array/Array#indexOf63 + br_if $__inlined_func$~lib/array/Array#indexOf62 local.get $1 i32.const 1 i32.add local.set $0 - br $while-continue|065 + br $while-continue|064 end end i32.const -1 @@ -16773,7 +16773,7 @@ local.get $2 i32.load offset=4 local.set $2 - loop $while-continue|067 + loop $while-continue|066 local.get $0 local.get $3 i32.lt_s @@ -16792,7 +16792,7 @@ i32.const 1 i32.add local.set $0 - br $while-continue|067 + br $while-continue|066 end end i32.const -1 @@ -16835,7 +16835,7 @@ local.get $2 i32.load offset=4 local.set $2 - loop $while-continue|069 + loop $while-continue|068 local.get $0 local.get $3 i32.lt_s @@ -16854,7 +16854,7 @@ i32.const 1 i32.add local.set $0 - br $while-continue|069 + br $while-continue|068 end end i32.const -1 @@ -17019,7 +17019,7 @@ local.get $1 i32.load offset=4 local.set $2 - loop $while-continue|071 + loop $while-continue|070 local.get $0 i32.const 0 i32.ge_s @@ -17037,7 +17037,7 @@ i32.const 1 i32.sub local.set $0 - br $while-continue|071 + br $while-continue|070 end end i32.const -1 @@ -17056,12 +17056,12 @@ end i32.const -1 local.set $0 - block $__inlined_func$~lib/array/Array#lastIndexOf72 + block $__inlined_func$~lib/array/Array#lastIndexOf71 local.get $1 i32.load offset=12 local.tee $2 i32.eqz - br_if $__inlined_func$~lib/array/Array#lastIndexOf72 + br_if $__inlined_func$~lib/array/Array#lastIndexOf71 local.get $2 i32.const 1 i32.sub @@ -17074,7 +17074,7 @@ local.get $1 i32.load offset=4 local.set $2 - loop $while-continue|074 + loop $while-continue|073 local.get $0 i32.const 0 i32.ge_s @@ -17087,12 +17087,12 @@ i32.load i32.const 2 i32.eq - br_if $__inlined_func$~lib/array/Array#lastIndexOf72 + br_if $__inlined_func$~lib/array/Array#lastIndexOf71 local.get $0 i32.const 1 i32.sub local.set $0 - br $while-continue|074 + br $while-continue|073 end end i32.const -1 @@ -17109,12 +17109,12 @@ end i32.const -1 local.set $0 - block $__inlined_func$~lib/array/Array#lastIndexOf75 + block $__inlined_func$~lib/array/Array#lastIndexOf74 local.get $1 i32.load offset=12 local.tee $2 i32.eqz - br_if $__inlined_func$~lib/array/Array#lastIndexOf75 + br_if $__inlined_func$~lib/array/Array#lastIndexOf74 local.get $2 i32.const 2 i32.sub @@ -17122,7 +17122,7 @@ local.get $1 i32.load offset=4 local.set $2 - loop $while-continue|077 + loop $while-continue|076 local.get $0 i32.const 0 i32.ge_s @@ -17135,12 +17135,12 @@ i32.load i32.const 2 i32.eq - br_if $__inlined_func$~lib/array/Array#lastIndexOf75 + br_if $__inlined_func$~lib/array/Array#lastIndexOf74 local.get $0 i32.const 1 i32.sub local.set $0 - br $while-continue|077 + br $while-continue|076 end end i32.const -1 @@ -17157,12 +17157,12 @@ end i32.const -1 local.set $0 - block $__inlined_func$~lib/array/Array#lastIndexOf78 + block $__inlined_func$~lib/array/Array#lastIndexOf77 local.get $1 i32.load offset=12 local.tee $2 i32.eqz - br_if $__inlined_func$~lib/array/Array#lastIndexOf78 + br_if $__inlined_func$~lib/array/Array#lastIndexOf77 local.get $2 i32.const 1 i32.sub @@ -17170,7 +17170,7 @@ local.get $1 i32.load offset=4 local.set $1 - loop $while-continue|080 + loop $while-continue|079 local.get $0 i32.const 0 i32.ge_s @@ -17183,12 +17183,12 @@ i32.load i32.const 2 i32.eq - br_if $__inlined_func$~lib/array/Array#lastIndexOf78 + br_if $__inlined_func$~lib/array/Array#lastIndexOf77 local.get $0 i32.const 1 i32.sub local.set $0 - br $while-continue|080 + br $while-continue|079 end end i32.const -1 @@ -17822,7 +17822,7 @@ local.get $1 i32.load offset=4 local.set $1 - loop $while-continue|082 + loop $while-continue|081 local.get $0 local.get $2 i32.lt_s @@ -17847,7 +17847,7 @@ i32.const 1 i32.add local.set $0 - br $while-continue|082 + br $while-continue|081 end end i32.const 0 @@ -17887,7 +17887,7 @@ local.get $1 i32.load offset=4 local.set $1 - loop $while-continue|084 + loop $while-continue|083 local.get $0 local.get $2 i32.lt_s @@ -17912,7 +17912,7 @@ i32.const 1 i32.add local.set $0 - br $while-continue|084 + br $while-continue|083 end end i32.const 0 @@ -19272,7 +19272,7 @@ i32.load offset=12 local.set $2 block $__inlined_func$~lib/array/Array#findIndex - loop $for-loop|093 + loop $for-loop|092 local.get $2 local.get $1 i32.load offset=12 @@ -19303,7 +19303,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|093 + br $for-loop|092 end end i32.const -1 @@ -19333,8 +19333,8 @@ local.get $1 i32.load offset=12 local.set $2 - block $__inlined_func$~lib/array/Array#findIndex95 - loop $for-loop|097 + block $__inlined_func$~lib/array/Array#findIndex94 + loop $for-loop|096 local.get $2 local.get $1 i32.load offset=12 @@ -19360,12 +19360,12 @@ i32.const 6176 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $__inlined_func$~lib/array/Array#findIndex95 + br_if $__inlined_func$~lib/array/Array#findIndex94 local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|097 + br $for-loop|096 end end i32.const -1 @@ -19397,8 +19397,8 @@ local.get $1 i32.load offset=12 local.set $2 - block $__inlined_func$~lib/array/Array#findIndex99 - loop $for-loop|0101 + block $__inlined_func$~lib/array/Array#findIndex98 + loop $for-loop|0100 local.get $2 local.get $1 i32.load offset=12 @@ -19424,12 +19424,12 @@ i32.const 6208 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $__inlined_func$~lib/array/Array#findIndex99 + br_if $__inlined_func$~lib/array/Array#findIndex98 local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|0101 + br $for-loop|0100 end end i32.const -1 @@ -19461,8 +19461,8 @@ local.get $1 i32.load offset=12 local.set $2 - block $__inlined_func$~lib/array/Array#findIndex103 - loop $for-loop|0105 + block $__inlined_func$~lib/array/Array#findIndex102 + loop $for-loop|0104 local.get $2 local.get $1 i32.load offset=12 @@ -19488,12 +19488,12 @@ i32.const 6240 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $__inlined_func$~lib/array/Array#findIndex103 + br_if $__inlined_func$~lib/array/Array#findIndex102 local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|0105 + br $for-loop|0104 end end i32.const -1 @@ -19541,8 +19541,8 @@ local.get $1 i32.load offset=12 local.set $2 - block $__inlined_func$~lib/array/Array#findIndex108 - loop $for-loop|0110 + block $__inlined_func$~lib/array/Array#findIndex107 + loop $for-loop|0109 local.get $2 local.get $1 i32.load offset=12 @@ -19568,12 +19568,12 @@ i32.const 6272 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $__inlined_func$~lib/array/Array#findIndex108 + br_if $__inlined_func$~lib/array/Array#findIndex107 local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|0110 + br $for-loop|0109 end end i32.const -1 @@ -19632,8 +19632,8 @@ local.get $1 i32.load offset=12 local.set $2 - block $__inlined_func$~lib/array/Array#findIndex112 - loop $for-loop|0114 + block $__inlined_func$~lib/array/Array#findIndex111 + loop $for-loop|0113 local.get $2 local.get $1 i32.load offset=12 @@ -19659,12 +19659,12 @@ i32.const 6304 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $__inlined_func$~lib/array/Array#findIndex112 + br_if $__inlined_func$~lib/array/Array#findIndex111 local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|0114 + br $for-loop|0113 end end i32.const -1 @@ -19732,7 +19732,7 @@ i32.sub local.set $1 block $__inlined_func$~lib/array/Array#findLastIndex - loop $for-loop|0118 + loop $for-loop|0117 local.get $1 i32.const 0 i32.ge_s @@ -19756,7 +19756,7 @@ i32.const 1 i32.sub local.set $1 - br $for-loop|0118 + br $for-loop|0117 end end i32.const -1 @@ -19781,8 +19781,8 @@ i32.const 1 i32.sub local.set $1 - block $__inlined_func$~lib/array/Array#findLastIndex120 - loop $for-loop|0122 + block $__inlined_func$~lib/array/Array#findLastIndex119 + loop $for-loop|0121 local.get $1 i32.const 0 i32.ge_s @@ -19801,12 +19801,12 @@ i32.const 6416 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $__inlined_func$~lib/array/Array#findLastIndex120 + br_if $__inlined_func$~lib/array/Array#findLastIndex119 local.get $1 i32.const 1 i32.sub local.set $1 - br $for-loop|0122 + br $for-loop|0121 end end i32.const -1 @@ -19833,8 +19833,8 @@ i32.const 1 i32.sub local.set $1 - block $__inlined_func$~lib/array/Array#findLastIndex124 - loop $for-loop|0126 + block $__inlined_func$~lib/array/Array#findLastIndex123 + loop $for-loop|0125 local.get $1 i32.const 0 i32.ge_s @@ -19853,12 +19853,12 @@ i32.const 6448 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $__inlined_func$~lib/array/Array#findLastIndex124 + br_if $__inlined_func$~lib/array/Array#findLastIndex123 local.get $1 i32.const 1 i32.sub local.set $1 - br $for-loop|0126 + br $for-loop|0125 end end i32.const -1 @@ -19885,8 +19885,8 @@ i32.const 1 i32.sub local.set $1 - block $__inlined_func$~lib/array/Array#findLastIndex128 - loop $for-loop|0130 + block $__inlined_func$~lib/array/Array#findLastIndex127 + loop $for-loop|0129 local.get $1 i32.const 0 i32.ge_s @@ -19905,12 +19905,12 @@ i32.const 6480 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $__inlined_func$~lib/array/Array#findLastIndex128 + br_if $__inlined_func$~lib/array/Array#findLastIndex127 local.get $1 i32.const 1 i32.sub local.set $1 - br $for-loop|0130 + br $for-loop|0129 end end i32.const -1 @@ -19943,7 +19943,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0133 + loop $for-loop|0132 local.get $2 local.get $1 i32.load offset=12 @@ -19979,7 +19979,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0133 + br $for-loop|0132 end end i32.const 1 @@ -19993,7 +19993,7 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/array/Array#every135 (result i32) + block $__inlined_func$~lib/array/Array#every134 (result i32) global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr @@ -20007,7 +20007,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0137 + loop $for-loop|0136 local.get $2 local.get $1 i32.load offset=12 @@ -20037,13 +20037,13 @@ i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.eqz - br_if $__inlined_func$~lib/array/Array#every135 + br_if $__inlined_func$~lib/array/Array#every134 drop local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|0137 + br $for-loop|0136 end end i32.const 1 @@ -20056,7 +20056,7 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/array/Array#every139 (result i32) + block $__inlined_func$~lib/array/Array#every138 (result i32) global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr @@ -20070,7 +20070,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0141 + loop $for-loop|0140 local.get $2 local.get $1 i32.load offset=12 @@ -20100,13 +20100,13 @@ i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.eqz - br_if $__inlined_func$~lib/array/Array#every139 + br_if $__inlined_func$~lib/array/Array#every138 drop local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|0141 + br $for-loop|0140 end end i32.const 1 @@ -20136,7 +20136,7 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/array/Array#every144 (result i32) + block $__inlined_func$~lib/array/Array#every143 (result i32) global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr @@ -20150,7 +20150,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0146 + loop $for-loop|0145 local.get $2 local.get $1 i32.load offset=12 @@ -20180,13 +20180,13 @@ i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.eqz - br_if $__inlined_func$~lib/array/Array#every144 + br_if $__inlined_func$~lib/array/Array#every143 drop local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|0146 + br $for-loop|0145 end end i32.const 1 @@ -20227,7 +20227,7 @@ local.get $0 call $~lib/array/Array#pop drop - block $__inlined_func$~lib/array/Array#every148 (result i32) + block $__inlined_func$~lib/array/Array#every147 (result i32) global.get $~lib/memory/__stack_pointer global.get $std/array/arr local.tee $1 @@ -20240,7 +20240,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0150 + loop $for-loop|0149 local.get $2 local.get $1 i32.load offset=12 @@ -20270,13 +20270,13 @@ i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.eqz - br_if $__inlined_func$~lib/array/Array#every148 + br_if $__inlined_func$~lib/array/Array#every147 drop local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|0150 + br $for-loop|0149 end end i32.const 1 @@ -20335,7 +20335,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0154 + loop $for-loop|0153 local.get $2 local.get $1 i32.load offset=12 @@ -20370,7 +20370,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0154 + br $for-loop|0153 end end i32.const 0 @@ -20384,7 +20384,7 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/array/Array#some156 (result i32) + block $__inlined_func$~lib/array/Array#some155 (result i32) global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr @@ -20398,7 +20398,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0158 + loop $for-loop|0157 local.get $2 local.get $1 i32.load offset=12 @@ -20427,13 +20427,13 @@ i32.const 6704 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $__inlined_func$~lib/array/Array#some156 + br_if $__inlined_func$~lib/array/Array#some155 drop local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|0158 + br $for-loop|0157 end end i32.const 0 @@ -20446,7 +20446,7 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/array/Array#some160 (result i32) + block $__inlined_func$~lib/array/Array#some159 (result i32) global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr @@ -20460,7 +20460,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0162 + loop $for-loop|0161 local.get $2 local.get $1 i32.load offset=12 @@ -20489,13 +20489,13 @@ i32.const 6736 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $__inlined_func$~lib/array/Array#some160 + br_if $__inlined_func$~lib/array/Array#some159 drop local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|0162 + br $for-loop|0161 end end i32.const 0 @@ -20524,7 +20524,7 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/array/Array#some165 (result i32) + block $__inlined_func$~lib/array/Array#some164 (result i32) global.get $~lib/memory/__stack_pointer local.tee $0 global.get $std/array/arr @@ -20538,7 +20538,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0167 + loop $for-loop|0166 local.get $2 local.get $1 i32.load offset=12 @@ -20567,13 +20567,13 @@ i32.const 6768 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $__inlined_func$~lib/array/Array#some165 + br_if $__inlined_func$~lib/array/Array#some164 drop local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|0167 + br $for-loop|0166 end end i32.const 0 @@ -20615,7 +20615,7 @@ local.get $0 call $~lib/array/Array#pop drop - block $__inlined_func$~lib/array/Array#some169 (result i32) + block $__inlined_func$~lib/array/Array#some168 (result i32) global.get $~lib/memory/__stack_pointer global.get $std/array/arr local.tee $1 @@ -20628,7 +20628,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0171 + loop $for-loop|0170 local.get $2 local.get $1 i32.load offset=12 @@ -20657,13 +20657,13 @@ i32.const 6800 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) - br_if $__inlined_func$~lib/array/Array#some169 + br_if $__inlined_func$~lib/array/Array#some168 drop local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|0171 + br $for-loop|0170 end end i32.const 0 @@ -20722,7 +20722,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0175 + loop $for-loop|0174 local.get $2 local.get $1 i32.load offset=12 @@ -20752,7 +20752,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0175 + br $for-loop|0174 end end global.get $std/array/i @@ -20781,7 +20781,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0179 + loop $for-loop|0178 local.get $2 local.get $1 i32.load offset=12 @@ -20811,7 +20811,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0179 + br $for-loop|0178 end end global.get $std/array/i @@ -20856,7 +20856,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0184 + loop $for-loop|0183 local.get $2 local.get $1 i32.load offset=12 @@ -20886,7 +20886,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0184 + br $for-loop|0183 end end global.get $std/array/i @@ -20942,7 +20942,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0188 + loop $for-loop|0187 local.get $2 local.get $1 i32.load offset=12 @@ -20972,7 +20972,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0188 + br $for-loop|0187 end end global.get $std/array/i @@ -21030,7 +21030,7 @@ local.get $1 i32.load offset=12 local.set $2 - loop $for-loop|0193 + loop $for-loop|0192 local.get $2 local.get $1 i32.load offset=12 @@ -21060,7 +21060,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0193 + br $for-loop|0192 end end global.get $~lib/memory/__stack_pointer @@ -21167,7 +21167,7 @@ local.set $10 i32.const 0 local.set $0 - loop $for-loop|0197 + loop $for-loop|0196 local.get $3 local.get $2 i32.load offset=12 @@ -21204,7 +21204,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0197 + br $for-loop|0196 end end global.get $~lib/memory/__stack_pointer @@ -21583,7 +21583,7 @@ local.get $1 i32.load offset=12 local.set $3 - loop $for-loop|0206 + loop $for-loop|0205 local.get $3 local.get $1 i32.load offset=12 @@ -21617,7 +21617,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0206 + br $for-loop|0205 end end local.get $2 @@ -21648,7 +21648,7 @@ local.get $1 i32.load offset=12 local.set $3 - loop $for-loop|0210 + loop $for-loop|0209 local.get $3 local.get $1 i32.load offset=12 @@ -21682,7 +21682,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0210 + br $for-loop|0209 end end local.get $2 @@ -21713,7 +21713,7 @@ local.get $1 i32.load offset=12 local.set $3 - loop $for-loop|0214 + loop $for-loop|0213 local.get $3 local.get $1 i32.load offset=12 @@ -21747,7 +21747,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0214 + br $for-loop|0213 end end local.get $2 @@ -21775,7 +21775,7 @@ local.get $1 i32.load offset=12 local.set $3 - loop $for-loop|0218 + loop $for-loop|0217 local.get $3 local.get $1 i32.load offset=12 @@ -21809,7 +21809,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0218 + br $for-loop|0217 end end local.get $2 @@ -21836,7 +21836,7 @@ local.get $1 i32.load offset=12 local.set $3 - loop $for-loop|0222 + loop $for-loop|0221 local.get $3 local.get $1 i32.load offset=12 @@ -21870,7 +21870,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0222 + br $for-loop|0221 end end local.get $2 @@ -21917,7 +21917,7 @@ local.get $1 i32.load offset=12 local.set $3 - loop $for-loop|0227 + loop $for-loop|0226 local.get $3 local.get $1 i32.load offset=12 @@ -21951,7 +21951,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0227 + br $for-loop|0226 end end local.get $2 @@ -22009,7 +22009,7 @@ local.get $1 i32.load offset=12 local.set $3 - loop $for-loop|0231 + loop $for-loop|0230 local.get $3 local.get $1 i32.load offset=12 @@ -22043,7 +22043,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0231 + br $for-loop|0230 end end local.get $2 @@ -22105,7 +22105,7 @@ i32.const 1 i32.sub local.set $0 - loop $for-loop|0235 + loop $for-loop|0234 local.get $0 i32.const 0 i32.ge_s @@ -22132,7 +22132,7 @@ i32.const 1 i32.sub local.set $0 - br $for-loop|0235 + br $for-loop|0234 end end local.get $2 @@ -22163,7 +22163,7 @@ i32.const 1 i32.sub local.set $0 - loop $for-loop|0239 + loop $for-loop|0238 local.get $0 i32.const 0 i32.ge_s @@ -22190,7 +22190,7 @@ i32.const 1 i32.sub local.set $0 - br $for-loop|0239 + br $for-loop|0238 end end local.get $2 @@ -22221,7 +22221,7 @@ i32.const 1 i32.sub local.set $0 - loop $for-loop|0243 + loop $for-loop|0242 local.get $0 i32.const 0 i32.ge_s @@ -22248,7 +22248,7 @@ i32.const 1 i32.sub local.set $0 - br $for-loop|0243 + br $for-loop|0242 end end local.get $2 @@ -22276,7 +22276,7 @@ i32.const 1 i32.sub local.set $0 - loop $for-loop|0247 + loop $for-loop|0246 local.get $0 i32.const 0 i32.ge_s @@ -22303,7 +22303,7 @@ i32.const 1 i32.sub local.set $0 - br $for-loop|0247 + br $for-loop|0246 end end local.get $2 @@ -22330,7 +22330,7 @@ i32.const 1 i32.sub local.set $0 - loop $for-loop|0251 + loop $for-loop|0250 local.get $0 i32.const 0 i32.ge_s @@ -22357,7 +22357,7 @@ i32.const 1 i32.sub local.set $0 - br $for-loop|0251 + br $for-loop|0250 end end local.get $2 @@ -22404,7 +22404,7 @@ i32.const 1 i32.sub local.set $0 - loop $for-loop|0256 + loop $for-loop|0255 local.get $0 i32.const 0 i32.ge_s @@ -22431,7 +22431,7 @@ i32.const 1 i32.sub local.set $0 - br $for-loop|0256 + br $for-loop|0255 end end local.get $2 @@ -22489,7 +22489,7 @@ i32.const 1 i32.sub local.set $0 - loop $for-loop|0260 + loop $for-loop|0259 local.get $0 i32.const 0 i32.ge_s @@ -22516,7 +22516,7 @@ i32.const 1 i32.sub local.set $0 - br $for-loop|0260 + br $for-loop|0259 end end local.get $2 @@ -23134,7 +23134,7 @@ drop i32.const 0 local.set $1 - loop $for-loop|029 + loop $for-loop|028 local.get $1 local.get $3 i32.lt_s @@ -23172,7 +23172,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|029 + br $for-loop|028 end end i32.const 1 @@ -23209,11 +23209,11 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $1of1309 - block $0of1310 - block $outOfRange311 + block $1of1308 + block $0of1309 + block $outOfRange310 global.get $~argumentsLength - br_table $0of1310 $1of1309 $outOfRange311 + br_table $0of1309 $1of1308 $outOfRange310 end unreachable end @@ -23781,7 +23781,7 @@ i32.store i32.const 0 local.set $1 - loop $for-loop|0313 + loop $for-loop|0312 local.get $1 i32.const 2 i32.lt_s @@ -23805,7 +23805,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|0313 + br $for-loop|0312 end end global.get $~lib/memory/__stack_pointer @@ -24146,7 +24146,7 @@ end i32.const 0 local.set $3 - loop $for-loop|045 + loop $for-loop|044 local.get $1 local.get $3 i32.gt_s @@ -24181,7 +24181,7 @@ i32.const 1 i32.add local.set $3 - br $for-loop|045 + br $for-loop|044 end end global.get $~lib/memory/__stack_pointer @@ -24220,7 +24220,7 @@ i32.store i32.const 0 local.set $1 - loop $for-loop|049 + loop $for-loop|04849 local.get $1 i32.const 400 i32.lt_s @@ -24351,7 +24351,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|049 + br $for-loop|04849 end end global.get $~lib/memory/__stack_pointer @@ -24376,13 +24376,13 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $1of152 - block $0of153 - block $outOfRange54 + block $1of151 + block $0of152 + block $outOfRange53 global.get $~argumentsLength i32.const 1 i32.sub - br_table $0of153 $1of152 $outOfRange54 + br_table $0of152 $1of151 $outOfRange53 end unreachable end @@ -24482,7 +24482,7 @@ i32.store i32.const 0 local.set $0 - loop $for-loop|149 + loop $for-loop|150 local.get $2 local.get $4 i32.lt_s @@ -24534,7 +24534,7 @@ i32.const 1 i32.add local.set $2 - br $for-loop|149 + br $for-loop|150 end end local.get $3 @@ -25096,7 +25096,7 @@ i32.store i32.const 0 local.set $0 - loop $for-loop|050 + loop $for-loop|051 local.get $2 local.get $4 i32.lt_s @@ -25135,7 +25135,7 @@ i32.const 1 i32.add local.set $2 - br $for-loop|050 + br $for-loop|051 end end local.get $9 @@ -25287,7 +25287,7 @@ i32.store i32.const 0 local.set $0 - loop $for-loop|051 + loop $for-loop|052 local.get $2 local.get $4 i32.lt_s @@ -25328,7 +25328,7 @@ i32.const 1 i32.add local.set $2 - br $for-loop|051 + br $for-loop|052 end end local.get $9 @@ -25665,7 +25665,7 @@ i32.const 1 i32.shr_u local.set $4 - loop $for-loop|052 + loop $for-loop|053 local.get $1 local.get $2 i32.gt_s @@ -25707,7 +25707,7 @@ i32.const 1 i32.add local.set $2 - br $for-loop|052 + br $for-loop|053 end end global.get $~lib/memory/__stack_pointer @@ -25879,7 +25879,7 @@ i32.const 1 i32.shr_u local.set $4 - loop $for-loop|053 + loop $for-loop|054 local.get $1 local.get $2 i32.gt_s @@ -25921,7 +25921,7 @@ i32.const 1 i32.add local.set $2 - br $for-loop|053 + br $for-loop|054 end end global.get $~lib/memory/__stack_pointer @@ -26101,7 +26101,7 @@ i32.const 1 i32.shr_u local.set $4 - loop $for-loop|054 + loop $for-loop|055 local.get $1 local.get $2 i32.gt_s @@ -26143,7 +26143,7 @@ i32.const 1 i32.add local.set $2 - br $for-loop|054 + br $for-loop|055 end end global.get $~lib/memory/__stack_pointer @@ -26359,7 +26359,7 @@ local.set $3 i32.const 0 local.set $0 - loop $for-loop|0317 + loop $for-loop|0316 local.get $0 local.get $1 i32.lt_s @@ -26384,7 +26384,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|0317 + br $for-loop|0316 end end global.get $~lib/memory/__stack_pointer @@ -26425,7 +26425,7 @@ local.set $2 i32.const 0 local.set $0 - loop $for-loop|1320 + loop $for-loop|1319 local.get $0 local.get $1 i32.lt_s @@ -26458,12 +26458,12 @@ i32.const 1 i32.add local.set $0 - br $for-loop|1320 + br $for-loop|1319 end end i32.const 0 local.set $0 - loop $for-loop|2323 + loop $for-loop|2322 local.get $0 local.get $3 i32.lt_s @@ -26485,7 +26485,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|2323 + br $for-loop|2322 end end global.get $~lib/memory/__stack_pointer @@ -26669,7 +26669,7 @@ local.set $5 i32.const 0 local.set $0 - loop $for-loop|065 + loop $for-loop|064 local.get $3 local.get $1 i32.load offset=12 @@ -26720,7 +26720,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|065 + br $for-loop|064 end end global.get $~lib/memory/__stack_pointer @@ -26810,12 +26810,12 @@ i32.const 0 i32.gt_s if - loop $while-continue|0330 + loop $while-continue|0329 global.get $~lib/rt/itcms/state if call $~lib/rt/itcms/step drop - br $while-continue|0330 + br $while-continue|0329 end end end @@ -27204,9 +27204,6 @@ local.tee $3 local.get $1 i32.load offset=12 - i32.const 0 - local.get $1 - select local.tee $2 i32.add local.tee $4 @@ -29818,9 +29815,6 @@ local.tee $2 local.get $1 i32.load offset=12 - i32.const 0 - local.get $1 - select local.tee $4 i32.add local.tee $3 @@ -31713,9 +31707,6 @@ local.tee $2 local.get $1 i32.load offset=12 - i32.const 0 - local.get $1 - select local.tee $4 i32.add local.tee $3 @@ -33619,9 +33610,6 @@ local.tee $4 local.get $1 i32.load offset=12 - i32.const 0 - local.get $1 - select local.tee $5 i32.add local.tee $2 diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index c91e6de905..19f861d687 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -20,7 +20,7 @@ function isArraysEqual(a: Array, b: Array, len: i32 = 0): bool { if (!len) { len = a.length; if (len != b.length) return false; - if (a === b) return true; + if (a == b) return true; } for (let i = 0; i < len; i++) { if (isFloat()) { @@ -525,7 +525,7 @@ var i: i32; assert(spliced2[0]!.v == 1); assert(refArr2.length == 2); - assert(refArr2[0] === null); + assert(refArr2[0] == null); assert(refArr2[1]!.v == 2); } diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 6823d50d80..bf9ae8dfef 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -2627,6 +2627,11 @@ local.get $0 i32.const 0 i32.ne + if (result i32) + i32.const 1 + else + i32.const 0 + end ) (func $std/array/Ref#set:v (param $0 i32) (param $1 i32) local.get $0 @@ -2634,7 +2639,14 @@ i32.store ) (func $~lib/array/Array.isArray (param $0 i32) (result i32) + local.get $0 i32.const 0 + i32.ne + if (result i32) + i32.const 0 + else + i32.const 0 + end ) (func $~lib/arraybuffer/ArrayBufferView#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -2656,18 +2668,37 @@ i32.store offset=8 ) (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (param $0 i32) (result i32) + local.get $0 i32.const 0 + i32.ne + if (result i32) + i32.const 0 + else + i32.const 0 + end ) (func $~lib/array/Array.isArray (param $0 i32) (result i32) i32.const 0 ) (func $~lib/array/Array.isArray<~lib/string/String> (param $0 i32) (result i32) + local.get $0 i32.const 0 + i32.ne + if (result i32) + i32.const 0 + else + i32.const 0 + end ) (func $~lib/array/Array.isArray<~lib/array/Array> (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne + if (result i32) + i32.const 1 + else + i32.const 0 + end ) (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -35708,13 +35739,8 @@ local.get $0 i32.load offset=12 local.set $2 - i32.const 0 local.get $1 i32.load offset=12 - local.get $1 - i32.const 0 - i32.eq - select local.set $3 local.get $2 local.get $3 @@ -40953,13 +40979,8 @@ local.get $0 i32.load offset=12 local.set $2 - i32.const 0 local.get $1 i32.load offset=12 - local.get $1 - i32.const 0 - i32.eq - select local.set $3 local.get $2 local.get $3 @@ -41478,13 +41499,8 @@ local.get $0 i32.load offset=12 local.set $2 - i32.const 0 local.get $1 i32.load offset=12 - local.get $1 - i32.const 0 - i32.eq - select local.set $3 local.get $2 local.get $3 @@ -41987,13 +42003,8 @@ local.get $0 i32.load offset=12 local.set $2 - i32.const 0 local.get $1 i32.load offset=12 - local.get $1 - i32.const 0 - i32.eq - select local.set $3 local.get $2 local.get $3 diff --git a/tests/compiler/std/arraybuffer.ts b/tests/compiler/std/arraybuffer.ts index 57bdb29dc4..5ed1691742 100644 --- a/tests/compiler/std/arraybuffer.ts +++ b/tests/compiler/std/arraybuffer.ts @@ -6,7 +6,7 @@ let sliced = buffer.slice(); assert(sliced.byteLength == 8); - assert(sliced !== buffer); + assert(sliced != buffer); sliced = buffer.slice(1); diff --git a/tests/compiler/std/dataview.ts b/tests/compiler/std/dataview.ts index eee61291ba..b44812abf4 100644 --- a/tests/compiler/std/dataview.ts +++ b/tests/compiler/std/dataview.ts @@ -12,154 +12,154 @@ let view = new DataView(array.buffer, array.byteOffset, array.byteLength); - assert(view.getFloat32(0, true) === -4.592586247781397e-20); - assert(view.getFloat32(1, true) === -2.3413961970849473e-37); - assert(view.getFloat32(2, true) === 7.710587701863113e+22); - assert(view.getFloat32(3, true) === 229.51023864746094); - assert(view.getFloat32(4, true) === 14079802746555335000.0); - - assert(view.getFloat32(0, false) === -2.2751405188178955e+33); - assert(view.getFloat32(1, false) === -62437351080004160000.0); - assert(view.getFloat32(2, false) === 1403059112509440.0); - assert(view.getFloat32(3, false) === -5.522466503261712e-20); - assert(view.getFloat32(4, false) === -1.6843597451835358e-37); - - assert(view.getFloat64(0, true) === 7.936550095674706e+150); - assert(view.getFloat64(0, false) === -4.1177747581885255e+264); - - assert(view.getInt8(0) === -10); - assert(view.getInt8(1) === -32); - assert(view.getInt8(2) === 88); - assert(view.getInt8(3) === -97); - assert(view.getInt8(4) === -126); - assert(view.getInt8(5) === 101); - assert(view.getInt8(6) === 67); - assert(view.getInt8(7) === 95); - - assert(view.getInt16(0, true) === -7946); - assert(view.getInt16(1, true) === 22752); - assert(view.getInt16(2, true) === -24744); - assert(view.getInt16(3, true) === -32097); - assert(view.getInt16(4, true) === 25986); - assert(view.getInt16(5, true) === 17253); - assert(view.getInt16(6, true) === 24387); - - assert(view.getInt16(0, false) === -2336); - assert(view.getInt16(1, false) === -8104); - assert(view.getInt16(2, false) === 22687); - assert(view.getInt16(3, false) === -24702); - assert(view.getInt16(4, false) === -32155); - assert(view.getInt16(5, false) === 25923); - assert(view.getInt16(6, false) === 17247); - - assert(view.getInt32(0, true) === -1621565194); - assert(view.getInt32(1, true) === -2103486240); - assert(view.getInt32(2, true) === 1703059288); - assert(view.getInt32(3, true) === 1130726047); - assert(view.getInt32(4, true) === 1598252418); - - assert(view.getInt32(0, false) === -153069409); - assert(view.getInt32(1, false) === -531062910); - assert(view.getInt32(2, false) === 1486848613); - assert(view.getInt32(3, false) === -1618844349); - assert(view.getInt32(4, false) === -2107292833); - - assert(view.getInt64(0, true) === 6864441868736323830); - assert(view.getInt64(0, false) === -657428103485373601); - - assert(view.getUint8(0) === 246); - assert(view.getUint8(1) === 224); - assert(view.getUint8(2) === 88); - assert(view.getUint8(3) === 159); - assert(view.getUint8(4) === 130); - assert(view.getUint8(5) === 101); - assert(view.getUint8(6) === 67); - assert(view.getUint8(7) === 95); - - assert(view.getUint16(0, true) === 57590); - assert(view.getUint16(1, true) === 22752); - assert(view.getUint16(2, true) === 40792); - assert(view.getUint16(3, true) === 33439); - assert(view.getUint16(4, true) === 25986); - assert(view.getUint16(5, true) === 17253); - assert(view.getUint16(6, true) === 24387); - - assert(view.getUint16(0, false) === 63200); - assert(view.getUint16(1, false) === 57432); - assert(view.getUint16(2, false) === 22687); - assert(view.getUint16(3, false) === 40834); - assert(view.getUint16(4, false) === 33381); - assert(view.getUint16(5, false) === 25923); - assert(view.getUint16(6, false) === 17247); - - assert(view.getUint32(0, true) === 2673402102); - assert(view.getUint32(1, true) === 2191481056); - assert(view.getUint32(2, true) === 1703059288); - assert(view.getUint32(3, true) === 1130726047); - assert(view.getUint32(4, true) === 1598252418); - - assert(view.getUint32(0, false) === 4141897887); - assert(view.getUint32(1, false) === 3763904386); - assert(view.getUint32(2, false) === 1486848613); - assert(view.getUint32(3, false) === 2676122947); - assert(view.getUint32(4, false) === 2187674463); - - assert(view.getUint64(0, true) === 6864441868736323830); - assert(view.getUint64(0, false) === 17789315970224178015); + assert(view.getFloat32(0, true) == -4.592586247781397e-20); + assert(view.getFloat32(1, true) == -2.3413961970849473e-37); + assert(view.getFloat32(2, true) == 7.710587701863113e+22); + assert(view.getFloat32(3, true) == 229.51023864746094); + assert(view.getFloat32(4, true) == 14079802746555335000.0); + + assert(view.getFloat32(0, false) == -2.2751405188178955e+33); + assert(view.getFloat32(1, false) == -62437351080004160000.0); + assert(view.getFloat32(2, false) == 1403059112509440.0); + assert(view.getFloat32(3, false) == -5.522466503261712e-20); + assert(view.getFloat32(4, false) == -1.6843597451835358e-37); + + assert(view.getFloat64(0, true) == 7.936550095674706e+150); + assert(view.getFloat64(0, false) == -4.1177747581885255e+264); + + assert(view.getInt8(0) == -10); + assert(view.getInt8(1) == -32); + assert(view.getInt8(2) == 88); + assert(view.getInt8(3) == -97); + assert(view.getInt8(4) == -126); + assert(view.getInt8(5) == 101); + assert(view.getInt8(6) == 67); + assert(view.getInt8(7) == 95); + + assert(view.getInt16(0, true) == -7946); + assert(view.getInt16(1, true) == 22752); + assert(view.getInt16(2, true) == -24744); + assert(view.getInt16(3, true) == -32097); + assert(view.getInt16(4, true) == 25986); + assert(view.getInt16(5, true) == 17253); + assert(view.getInt16(6, true) == 24387); + + assert(view.getInt16(0, false) == -2336); + assert(view.getInt16(1, false) == -8104); + assert(view.getInt16(2, false) == 22687); + assert(view.getInt16(3, false) == -24702); + assert(view.getInt16(4, false) == -32155); + assert(view.getInt16(5, false) == 25923); + assert(view.getInt16(6, false) == 17247); + + assert(view.getInt32(0, true) == -1621565194); + assert(view.getInt32(1, true) == -2103486240); + assert(view.getInt32(2, true) == 1703059288); + assert(view.getInt32(3, true) == 1130726047); + assert(view.getInt32(4, true) == 1598252418); + + assert(view.getInt32(0, false) == -153069409); + assert(view.getInt32(1, false) == -531062910); + assert(view.getInt32(2, false) == 1486848613); + assert(view.getInt32(3, false) == -1618844349); + assert(view.getInt32(4, false) == -2107292833); + + assert(view.getInt64(0, true) == 6864441868736323830); + assert(view.getInt64(0, false) == -657428103485373601); + + assert(view.getUint8(0) == 246); + assert(view.getUint8(1) == 224); + assert(view.getUint8(2) == 88); + assert(view.getUint8(3) == 159); + assert(view.getUint8(4) == 130); + assert(view.getUint8(5) == 101); + assert(view.getUint8(6) == 67); + assert(view.getUint8(7) == 95); + + assert(view.getUint16(0, true) == 57590); + assert(view.getUint16(1, true) == 22752); + assert(view.getUint16(2, true) == 40792); + assert(view.getUint16(3, true) == 33439); + assert(view.getUint16(4, true) == 25986); + assert(view.getUint16(5, true) == 17253); + assert(view.getUint16(6, true) == 24387); + + assert(view.getUint16(0, false) == 63200); + assert(view.getUint16(1, false) == 57432); + assert(view.getUint16(2, false) == 22687); + assert(view.getUint16(3, false) == 40834); + assert(view.getUint16(4, false) == 33381); + assert(view.getUint16(5, false) == 25923); + assert(view.getUint16(6, false) == 17247); + + assert(view.getUint32(0, true) == 2673402102); + assert(view.getUint32(1, true) == 2191481056); + assert(view.getUint32(2, true) == 1703059288); + assert(view.getUint32(3, true) == 1130726047); + assert(view.getUint32(4, true) == 1598252418); + + assert(view.getUint32(0, false) == 4141897887); + assert(view.getUint32(1, false) == 3763904386); + assert(view.getUint32(2, false) == 1486848613); + assert(view.getUint32(3, false) == 2676122947); + assert(view.getUint32(4, false) == 2187674463); + + assert(view.getUint64(0, true) == 6864441868736323830); + assert(view.getUint64(0, false) == 17789315970224178015); view.setFloat32(0, 1.5976661625240943e-18, true); - assert(view.getFloat32(0, true) === 1.5976661625240943e-18); + assert(view.getFloat32(0, true) == 1.5976661625240943e-18); view.setFloat32(0, 1.9762819733816963e+21, false); - assert(view.getFloat32(0, false) === 1.9762819733816963e+21); + assert(view.getFloat32(0, false) == 1.9762819733816963e+21); view.setFloat64(0, -1.094252199637739e+148, true); - assert(view.getFloat64(0, true) === -1.094252199637739e+148); + assert(view.getFloat64(0, true) == -1.094252199637739e+148); view.setFloat64(0, 6.022586634778589e-103, false); - assert(view.getFloat64(0, false) === 6.022586634778589e-103); + assert(view.getFloat64(0, false) == 6.022586634778589e-103); view.setInt8(0, 108); - assert(view.getInt8(0) === 108); + assert(view.getInt8(0) == 108); view.setInt16(0, -13360, true); - assert(view.getInt16(0, true) === -13360); + assert(view.getInt16(0, true) == -13360); view.setInt16(0, 14689, false); - assert(view.getInt16(0, false) === 14689); + assert(view.getInt16(0, false) == 14689); view.setInt32(0, 1204680201, true); - assert(view.getInt32(0, true) === 1204680201); + assert(view.getInt32(0, true) == 1204680201); view.setInt32(0, 660673230, false); - assert(view.getInt32(0, false) === 660673230); + assert(view.getInt32(0, false) == 660673230); view.setInt64(0, -3290739641816099749, true); - assert(view.getInt64(0, true) === -3290739641816099749); + assert(view.getInt64(0, true) == -3290739641816099749); view.setInt64(0, 8178932412950708047, false); - assert(view.getInt64(0, false) === 8178932412950708047); + assert(view.getInt64(0, false) == 8178932412950708047); view.setUint8(0, 238); - assert(view.getUint8(0) === 238); + assert(view.getUint8(0) == 238); view.setUint16(0, 58856, true); - assert(view.getUint16(0, true) === 58856); + assert(view.getUint16(0, true) == 58856); view.setUint16(0, 60400, false); - assert(view.getUint16(0, false) === 60400); + assert(view.getUint16(0, false) == 60400); view.setUint32(0, 3448161552, true); - assert(view.getUint32(0, true) === 3448161552); + assert(view.getUint32(0, true) == 3448161552); view.setUint32(0, 2784175665, false); - assert(view.getUint32(0, false) === 2784175665); + assert(view.getUint32(0, false) == 2784175665); view.setUint64(0, 2334704782995986958, true); - assert(view.getUint64(0, true) === 2334704782995986958); + assert(view.getUint64(0, true) == 2334704782995986958); view.setUint64(0, 11323557176419695287, false); - assert(view.getUint64(0, false) === 11323557176419695287); + assert(view.getUint64(0, false) == 11323557176419695287); view = new DataView(array.buffer); assert(view.byteOffset == 0); diff --git a/tests/compiler/std/pointer.ts b/tests/compiler/std/pointer.ts index 360e7fd9de..dc3c1a2435 100644 --- a/tests/compiler/std/pointer.ts +++ b/tests/compiler/std/pointer.ts @@ -21,7 +21,7 @@ @inline set value(value: T) { if (isReference()) { if (isManaged()) ERROR("Unsafe unmanaged set of a managed object"); - if (value === null) { + if (value == null) { memory.fill(changetype(this), 0, offsetof()); } else { memory.copy(changetype(this), changetype(value), offsetof()); @@ -91,7 +91,7 @@ assert(sub.offset == 16); assert(one.offset == 8); var nextOne = ++one; -assert(nextOne === one); +assert(nextOne == one); assert(one.offset == 16); assert(two.offset == 24); diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 80dd3c5bc0..2deea0ab6f 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -6412,9 +6412,6 @@ i32.load offset=16 i32.const 2 i32.shr_u - i32.const 0 - local.get $1 - select local.tee $2 i32.add local.tee $4 @@ -6680,9 +6677,6 @@ local.tee $5 local.get $1 i32.load offset=12 - i32.const 0 - local.get $1 - select local.tee $3 i32.add local.tee $4 diff --git a/tests/compiler/std/staticarray.untouched.wat b/tests/compiler/std/staticarray.untouched.wat index 51d352d47e..dedc01ca36 100644 --- a/tests/compiler/std/staticarray.untouched.wat +++ b/tests/compiler/std/staticarray.untouched.wat @@ -7400,13 +7400,8 @@ local.get $0 call $~lib/staticarray/StaticArray#get:length local.set $2 - i32.const 0 local.get $1 call $~lib/staticarray/StaticArray#get:length - local.get $1 - i32.const 0 - i32.eq - select local.set $3 local.get $2 local.get $3 @@ -7678,13 +7673,8 @@ local.get $0 call $~lib/staticarray/StaticArray<~lib/string/String>#get:length local.set $2 - i32.const 0 local.get $1 call $~lib/array/Array<~lib/string/String>#get:length - local.get $1 - i32.const 0 - i32.eq - select local.set $3 local.get $2 local.get $3 diff --git a/tests/compiler/std/string-nonnull.json b/tests/compiler/std/string-nonnull.json new file mode 100644 index 0000000000..1bdd02b1be --- /dev/null +++ b/tests/compiler/std/string-nonnull.json @@ -0,0 +1,4 @@ +{ + "asc_flags": [ + ] +} diff --git a/tests/compiler/std/string-nonnull.optimized.wat b/tests/compiler/std/string-nonnull.optimized.wat new file mode 100644 index 0000000000..0acdd30cb7 --- /dev/null +++ b/tests/compiler/std/string-nonnull.optimized.wat @@ -0,0 +1,49 @@ +(module + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17452)) + (memory $0 1) + (data (i32.const 1036) "\1c") + (data (i32.const 1048) "\01") + (export "memory" (memory $0)) + (start $~start) + (func $~start + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1068 + i32.lt_s + if + i32.const 17472 + i32.const 17520 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 1056 + i32.store + i32.const 1052 + i32.load + i32.const 1 + i32.shr_u + if + i32.const 1052 + i32.load + drop + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) +) diff --git a/tests/compiler/std/string-nonnull.ts b/tests/compiler/std/string-nonnull.ts new file mode 100644 index 0000000000..930066cee7 --- /dev/null +++ b/tests/compiler/std/string-nonnull.ts @@ -0,0 +1,13 @@ +{ + let s: string | null = ""; + + // should derive that s is non-null in then + if (s != null) s.length; + if (s !== null) s.length; + if (s) s.length; + + // should derive that s is non-null in else + if (s == null) {} else s.length; + if (s === null) {} else s.length; + if (!s) {} else s.length; +} diff --git a/tests/compiler/std/string-nonnull.untouched.wat b/tests/compiler/std/string-nonnull.untouched.wat new file mode 100644 index 0000000000..bd051368cb --- /dev/null +++ b/tests/compiler/std/string-nonnull.untouched.wat @@ -0,0 +1,280 @@ +(module + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) + (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) + (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/memory/__data_end i32 (i32.const 44)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16428)) + (global $~lib/memory/__heap_base i32 (i32.const 16428)) + (memory $0 1) + (data (i32.const 12) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (table $0 1 funcref) + (elem $0 (i32.const 1)) + (export "memory" (memory $0)) + (start $~start) + (func $~lib/string/String#get:length (param $0 i32) (result i32) + local.get $0 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $6 + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $4 + i32.const 4 + i32.ge_u + if (result i32) + local.get $5 + i32.const 7 + i32.and + local.get $6 + i32.const 7 + i32.and + i32.or + i32.eqz + else + i32.const 0 + end + if + block $do-break|0 + loop $do-loop|0 + local.get $5 + i64.load + local.get $6 + i64.load + i64.ne + if + br $do-break|0 + end + local.get $5 + i32.const 8 + i32.add + local.set $5 + local.get $6 + i32.const 8 + i32.add + local.set $6 + local.get $4 + i32.const 4 + i32.sub + local.set $4 + local.get $4 + i32.const 4 + i32.ge_u + br_if $do-loop|0 + end + end + end + loop $while-continue|1 + local.get $4 + local.tee $7 + i32.const 1 + i32.sub + local.set $4 + local.get $7 + local.set $7 + local.get $7 + if + local.get $5 + i32.load16_u + local.set $8 + local.get $6 + i32.load16_u + local.set $9 + local.get $8 + local.get $9 + i32.ne + if + local.get $8 + local.get $9 + i32.sub + return + end + local.get $5 + i32.const 2 + i32.add + local.set $5 + local.get $6 + i32.const 2 + i32.add + local.set $6 + br $while-continue|1 + end + end + i32.const 0 + ) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 0 + i32.eq + end + if + i32.const 0 + return + end + local.get $0 + call $~lib/string/String#get:length + local.set $2 + local.get $2 + local.get $1 + call $~lib/string/String#get:length + i32.ne + if + i32.const 0 + return + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + ) + (func $~lib/string/String.__ne (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/string/String.__eq + i32.eqz + ) + (func $~lib/string/String.__not (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $0 + call $~lib/string/String#get:length + i32.eqz + end + ) + (func $start:std/string-nonnull + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 32 + local.tee $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/string/String.__ne + if + local.get $0 + call $~lib/string/String#get:length + drop + end + local.get $0 + i32.const 0 + call $~lib/string/String.__ne + if + local.get $0 + call $~lib/string/String#get:length + drop + end + local.get $0 + if + local.get $0 + call $~lib/string/String#get:length + drop + end + local.get $0 + i32.const 0 + call $~lib/string/String.__eq + if + nop + else + local.get $0 + call $~lib/string/String#get:length + drop + end + local.get $0 + i32.const 0 + call $~lib/string/String.__eq + if + nop + else + local.get $0 + call $~lib/string/String#get:length + drop + end + local.get $0 + call $~lib/string/String.__not + if + nop + else + local.get $0 + call $~lib/string/String#get:length + drop + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~start + call $start:std/string-nonnull + ) + (func $~stack_check + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__data_end + i32.lt_s + if + i32.const 16448 + i32.const 16496 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) +) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index cb473fc034..d2f4b56baa 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -3529,7 +3529,14 @@ global.get $std/symbol/sym2 call $~lib/symbol/_Symbol.keyFor global.set $std/symbol/key2 + global.get $~lib/memory/__stack_pointer global.get $std/symbol/key1 + local.tee $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/string/String.__eq + i32.eqz if i32.const 0 i32.const 1088 @@ -3538,7 +3545,14 @@ call $~lib/builtins/abort unreachable end + global.get $~lib/memory/__stack_pointer global.get $std/symbol/key2 + local.tee $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/string/String.__eq + i32.eqz if i32.const 0 i32.const 1088 diff --git a/tests/compiler/std/symbol.ts b/tests/compiler/std/symbol.ts index 9fb8c76a71..35b24e3c23 100644 --- a/tests/compiler/std/symbol.ts +++ b/tests/compiler/std/symbol.ts @@ -1,18 +1,18 @@ var sym1 = Symbol("123"); var sym2 = Symbol("123"); -assert(sym1 !== sym2); +assert(sym1 != sym2); var sym3 = Symbol.for("123"); var sym4 = Symbol.for("123"); -assert(sym3 === sym4); +assert(sym3 == sym4); var key1 = Symbol.keyFor(sym1); var key2 = Symbol.keyFor(sym2); -assert(key1 === null); -assert(key2 === null); +assert(key1 == null); +assert(key2 == null); var key3 = Symbol.keyFor(sym3)!; var key4 = Symbol.keyFor(sym4)!; diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index d80839b0dd..f2f7253bf1 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -3988,8 +3988,13 @@ call $~lib/symbol/_Symbol.keyFor global.set $std/symbol/key2 global.get $std/symbol/key1 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 i32.const 0 - i32.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -4000,8 +4005,13 @@ unreachable end global.get $std/symbol/key2 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 i32.const 0 - i32.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 diff --git a/tests/compiler/std/typedarray.ts b/tests/compiler/std/typedarray.ts index ba08ab3b20..e877cd07a4 100644 --- a/tests/compiler/std/typedarray.ts +++ b/tests/compiler/std/typedarray.ts @@ -297,7 +297,7 @@ testInstantiate(5); assert(subsliced.byteLength == 4); let copy = arr.slice(); - assert(copy !== arr); + assert(copy != arr); assert(copy.length == arr.length); assert(copy.byteOffset == arr.byteOffset); assert(copy.byteLength == arr.byteLength); diff --git a/tests/compiler/std/uri.optimized.wat b/tests/compiler/std/uri.optimized.wat index 0bb17127c2..d057861e87 100644 --- a/tests/compiler/std/uri.optimized.wat +++ b/tests/compiler/std/uri.optimized.wat @@ -2783,7 +2783,7 @@ end global.get $~lib/memory/__stack_pointer i32.const 2080 - i32.store + i32.store offset=8 i32.const 2080 i32.const 2076 i32.load @@ -2791,8 +2791,17 @@ i32.shr_u i32.const 1068 call $~lib/util/uri/encode + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer i32.const 2112 - i32.eq + i32.store offset=4 + local.get $0 + i32.const 2112 + call $~lib/string/String.__eq + i32.eqz if i32.const 0 i32.const 1712 @@ -2803,7 +2812,7 @@ end global.get $~lib/memory/__stack_pointer i32.const 2160 - i32.store + i32.store offset=8 i32.const 2160 i32.const 2156 i32.load @@ -2811,8 +2820,17 @@ i32.shr_u i32.const 1068 call $~lib/util/uri/encode + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer i32.const 2192 - i32.eq + i32.store offset=4 + local.get $0 + i32.const 2192 + call $~lib/string/String.__eq + i32.eqz if i32.const 0 i32.const 1712 diff --git a/tests/compiler/std/uri.ts b/tests/compiler/std/uri.ts index df56861342..b165c8815b 100644 --- a/tests/compiler/std/uri.ts +++ b/tests/compiler/std/uri.ts @@ -11,8 +11,8 @@ assert( ); assert(encodeURIComponent("\0") == "%00"); assert(encodeURIComponent("+") == "%2B"); -assert(encodeURIComponent("#0=") !== "%230%3D"); -assert(encodeURIComponent(" 123 ") !== "%20123%20"); +assert(encodeURIComponent("#0=") == "%230%3D"); +assert(encodeURIComponent(" 123 ") == "%20123%20"); assert(encodeURIComponent("?+") == "%3F%2B"); assert(encodeURIComponent("-?1.-") == "-%3F1.-"); assert(encodeURIComponent("🇭🇺🍎") == "%F0%9F%87%AD%F0%9F%87%BA%F0%9F%8D%8E"); diff --git a/tests/compiler/std/uri.untouched.wat b/tests/compiler/std/uri.untouched.wat index 1c72a8de40..deb0cd39d9 100644 --- a/tests/compiler/std/uri.untouched.wat +++ b/tests/compiler/std/uri.untouched.wat @@ -3613,11 +3613,21 @@ local.set $0 global.get $~lib/memory/__stack_pointer local.get $0 - i32.store + i32.store offset=8 local.get $0 call $~lib/uri/encodeURIComponent + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 i32.const 1088 - i32.ne + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3631,11 +3641,21 @@ local.set $0 global.get $~lib/memory/__stack_pointer local.get $0 - i32.store + i32.store offset=8 local.get $0 call $~lib/uri/encodeURIComponent + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 i32.const 1168 - i32.ne + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/string/String.__eq i32.eqz if i32.const 0 diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index ff0a97349e..8ae032f2f4 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -24,10 +24,10 @@ (memory $0 1) (data (i32.const 1036) "\1c") (data (i32.const 1048) "\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r") - (data (i32.const 1068) "\1c") - (data (i32.const 1080) "\01\00\00\00\0c\00\00\00o\00b\00j\00e\00c\00t") - (data (i32.const 1100) ",") - (data (i32.const 1112) "\01\00\00\00\12\00\00\00t\00y\00p\00e\00o\00f\00.\00t\00s") + (data (i32.const 1068) ",") + (data (i32.const 1080) "\01\00\00\00\12\00\00\00t\00y\00p\00e\00o\00f\00.\00t\00s") + (data (i32.const 1116) "\1c") + (data (i32.const 1128) "\01\00\00\00\0c\00\00\00o\00b\00j\00e\00c\00t") (data (i32.const 1148) ",") (data (i32.const 1160) "\01\00\00\00\10\00\00\00f\00u\00n\00c\00t\00i\00o\00n") (data (i32.const 1196) ",") @@ -1204,57 +1204,76 @@ i64.const 0 i64.store local.get $0 - i32.const 1088 + i32.const 1056 i32.store local.get $0 - i32.const 1088 + i32.const 1056 i32.store offset=4 - i32.const 1088 - i32.const 1088 + i32.const 1056 + i32.const 1056 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 1120 - i32.const 13 + i32.const 1088 + i32.const 1 i32.const 1 call $~lib/builtins/abort unreachable end global.get $~lib/memory/__stack_pointer local.tee $0 - i32.const 1088 + i32.const 1136 i32.store local.get $0 - i32.const 1088 + i32.const 1136 i32.store offset=4 - i32.const 1088 - i32.const 1088 + i32.const 1136 + i32.const 1136 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 1120 - i32.const 14 + i32.const 1088 + i32.const 11 i32.const 1 call $~lib/builtins/abort unreachable end global.get $~lib/memory/__stack_pointer local.tee $0 - i32.const 1088 + i32.const 1136 i32.store local.get $0 - i32.const 1088 + i32.const 1136 i32.store offset=4 - i32.const 1088 - i32.const 1088 + i32.const 1136 + i32.const 1136 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 1120 - i32.const 15 + i32.const 1088 + i32.const 12 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i32.const 1136 + i32.store + local.get $0 + i32.const 1136 + i32.store offset=4 + i32.const 1136 + i32.const 1136 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 13 i32.const 1 call $~lib/builtins/abort unreachable @@ -1272,8 +1291,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 16 + i32.const 1088 + i32.const 14 i32.const 1 call $~lib/builtins/abort unreachable @@ -1291,8 +1310,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 17 + i32.const 1088 + i32.const 15 i32.const 1 call $~lib/builtins/abort unreachable @@ -1310,27 +1329,27 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 19 + i32.const 1088 + i32.const 17 i32.const 1 call $~lib/builtins/abort unreachable end global.get $~lib/memory/__stack_pointer local.tee $0 - i32.const 1088 + i32.const 1136 i32.store local.get $0 - i32.const 1088 + i32.const 1136 i32.store offset=4 - i32.const 1088 - i32.const 1088 + i32.const 1136 + i32.const 1136 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 1120 - i32.const 20 + i32.const 1088 + i32.const 18 i32.const 1 call $~lib/builtins/abort unreachable @@ -1348,8 +1367,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 21 + i32.const 1088 + i32.const 19 i32.const 1 call $~lib/builtins/abort unreachable @@ -1367,8 +1386,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 22 + i32.const 1088 + i32.const 20 i32.const 1 call $~lib/builtins/abort unreachable @@ -1386,8 +1405,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 23 + i32.const 1088 + i32.const 21 i32.const 1 call $~lib/builtins/abort unreachable @@ -1405,8 +1424,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 24 + i32.const 1088 + i32.const 22 i32.const 1 call $~lib/builtins/abort unreachable @@ -1424,8 +1443,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 27 + i32.const 1088 + i32.const 25 i32.const 1 call $~lib/builtins/abort unreachable @@ -1443,8 +1462,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 29 + i32.const 1088 + i32.const 27 i32.const 1 call $~lib/builtins/abort unreachable @@ -1462,8 +1481,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 31 + i32.const 1088 + i32.const 29 i32.const 1 call $~lib/builtins/abort unreachable @@ -1481,8 +1500,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 33 + i32.const 1088 + i32.const 31 i32.const 1 call $~lib/builtins/abort unreachable @@ -1500,8 +1519,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 35 + i32.const 1088 + i32.const 33 i32.const 1 call $~lib/builtins/abort unreachable @@ -1519,8 +1538,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 37 + i32.const 1088 + i32.const 35 i32.const 1 call $~lib/builtins/abort unreachable @@ -1538,8 +1557,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 39 + i32.const 1088 + i32.const 37 i32.const 1 call $~lib/builtins/abort unreachable @@ -1824,19 +1843,19 @@ local.get $0 global.set $typeof/c global.get $~lib/memory/__stack_pointer - i32.const 1088 + i32.const 1136 i32.store global.get $~lib/memory/__stack_pointer - i32.const 1088 + i32.const 1136 i32.store offset=4 - i32.const 1088 - i32.const 1088 + i32.const 1136 + i32.const 1136 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 1120 - i32.const 41 + i32.const 1088 + i32.const 39 i32.const 1 call $~lib/builtins/abort unreachable @@ -1854,8 +1873,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 42 + i32.const 1088 + i32.const 40 i32.const 1 call $~lib/builtins/abort unreachable @@ -1873,8 +1892,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 46 + i32.const 1088 + i32.const 44 i32.const 1 call $~lib/builtins/abort unreachable @@ -1892,8 +1911,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 47 + i32.const 1088 + i32.const 45 i32.const 1 call $~lib/builtins/abort unreachable @@ -1911,8 +1930,8 @@ i32.eqz if i32.const 0 - i32.const 1120 - i32.const 48 + i32.const 1088 + i32.const 46 i32.const 1 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/typeof.ts b/tests/compiler/typeof.ts index a54c04db72..b29d88663b 100644 --- a/tests/compiler/typeof.ts +++ b/tests/compiler/typeof.ts @@ -1,6 +1,4 @@ -assert(typeof 1 === "number"); // static string === static string precomputes - -// non-precomputed +assert(typeof 1 == "number"); class SomeClass { static someStaticMethod(): void {} diff --git a/tests/compiler/typeof.untouched.wat b/tests/compiler/typeof.untouched.wat index b66dacb447..ea7dbf8cd3 100644 --- a/tests/compiler/typeof.untouched.wat +++ b/tests/compiler/typeof.untouched.wat @@ -10,11 +10,11 @@ (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (global $typeof/SomeNamespace.a i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $typeof/SomeNamespace.a i32 (i32.const 1)) (global $typeof/b (mut i32) (i32.const 1)) (global $typeof/i (mut i32) (i32.const 1)) (global $typeof/f (mut f32) (f32.const 1)) @@ -41,8 +41,8 @@ (global $~started (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 12) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r\00") - (data (i32.const 44) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00o\00b\00j\00e\00c\00t\00") - (data (i32.const 76) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00t\00y\00p\00e\00o\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 44) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00t\00y\00p\00e\00o\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 92) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00o\00b\00j\00e\00c\00t\00") (data (i32.const 124) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 172) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00b\00o\00o\00l\00e\00a\00n\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 220) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\001\00\00\00\00\00\00\00\00\00\00\00") @@ -2403,16 +2403,34 @@ i32.const 1 drop i32.const 32 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 i32.const 32 - i32.eq - drop - i32.const 64 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 64 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 112 local.set $0 global.get $~lib/memory/__stack_pointer local.get $0 i32.store local.get $0 - i32.const 64 + i32.const 112 local.set $0 global.get $~lib/memory/__stack_pointer local.get $0 @@ -2422,19 +2440,19 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 13 + i32.const 64 + i32.const 11 i32.const 1 call $~lib/builtins/abort unreachable end - i32.const 64 + i32.const 112 local.set $0 global.get $~lib/memory/__stack_pointer local.get $0 i32.store local.get $0 - i32.const 64 + i32.const 112 local.set $0 global.get $~lib/memory/__stack_pointer local.get $0 @@ -2444,19 +2462,19 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 14 + i32.const 64 + i32.const 12 i32.const 1 call $~lib/builtins/abort unreachable end - i32.const 64 + i32.const 112 local.set $0 global.get $~lib/memory/__stack_pointer local.get $0 i32.store local.get $0 - i32.const 64 + i32.const 112 local.set $0 global.get $~lib/memory/__stack_pointer local.get $0 @@ -2466,8 +2484,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 15 + i32.const 64 + i32.const 13 i32.const 1 call $~lib/builtins/abort unreachable @@ -2488,8 +2506,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 16 + i32.const 64 + i32.const 14 i32.const 1 call $~lib/builtins/abort unreachable @@ -2510,8 +2528,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 17 + i32.const 64 + i32.const 15 i32.const 1 call $~lib/builtins/abort unreachable @@ -2534,19 +2552,19 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 19 + i32.const 64 + i32.const 17 i32.const 1 call $~lib/builtins/abort unreachable end - i32.const 64 + i32.const 112 local.set $0 global.get $~lib/memory/__stack_pointer local.get $0 i32.store local.get $0 - i32.const 64 + i32.const 112 local.set $0 global.get $~lib/memory/__stack_pointer local.get $0 @@ -2556,8 +2574,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 20 + i32.const 64 + i32.const 18 i32.const 1 call $~lib/builtins/abort unreachable @@ -2580,8 +2598,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 21 + i32.const 64 + i32.const 19 i32.const 1 call $~lib/builtins/abort unreachable @@ -2604,8 +2622,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 22 + i32.const 64 + i32.const 20 i32.const 1 call $~lib/builtins/abort unreachable @@ -2628,8 +2646,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 23 + i32.const 64 + i32.const 21 i32.const 1 call $~lib/builtins/abort unreachable @@ -2652,8 +2670,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 24 + i32.const 64 + i32.const 22 i32.const 1 call $~lib/builtins/abort unreachable @@ -2676,8 +2694,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 27 + i32.const 64 + i32.const 25 i32.const 1 call $~lib/builtins/abort unreachable @@ -2700,8 +2718,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 29 + i32.const 64 + i32.const 27 i32.const 1 call $~lib/builtins/abort unreachable @@ -2724,8 +2742,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 31 + i32.const 64 + i32.const 29 i32.const 1 call $~lib/builtins/abort unreachable @@ -2748,8 +2766,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 33 + i32.const 64 + i32.const 31 i32.const 1 call $~lib/builtins/abort unreachable @@ -2772,8 +2790,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 35 + i32.const 64 + i32.const 33 i32.const 1 call $~lib/builtins/abort unreachable @@ -2796,8 +2814,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 37 + i32.const 64 + i32.const 35 i32.const 1 call $~lib/builtins/abort unreachable @@ -2820,8 +2838,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 39 + i32.const 64 + i32.const 37 i32.const 1 call $~lib/builtins/abort unreachable @@ -2848,13 +2866,13 @@ global.set $typeof/c global.get $typeof/c drop - i32.const 64 + i32.const 112 local.set $0 global.get $~lib/memory/__stack_pointer local.get $0 i32.store local.get $0 - i32.const 64 + i32.const 112 local.set $0 global.get $~lib/memory/__stack_pointer local.get $0 @@ -2864,8 +2882,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 41 + i32.const 64 + i32.const 39 i32.const 1 call $~lib/builtins/abort unreachable @@ -2886,8 +2904,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 42 + i32.const 64 + i32.const 40 i32.const 1 call $~lib/builtins/abort unreachable @@ -2908,8 +2926,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 46 + i32.const 64 + i32.const 44 i32.const 1 call $~lib/builtins/abort unreachable @@ -2932,8 +2950,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 47 + i32.const 64 + i32.const 45 i32.const 1 call $~lib/builtins/abort unreachable @@ -2956,8 +2974,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 48 + i32.const 64 + i32.const 46 i32.const 1 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/wasi/abort.untouched.wat b/tests/compiler/wasi/abort.untouched.wat index 4c9c72ad37..6732ef0bd2 100644 --- a/tests/compiler/wasi/abort.untouched.wat +++ b/tests/compiler/wasi/abort.untouched.wat @@ -1,7 +1,8 @@ (module + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) @@ -11,6 +12,7 @@ (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/memory/__data_end i32 (i32.const 220)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16604)) @@ -38,6 +40,159 @@ i32.const 1 i32.shr_u ) + (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $6 + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $4 + i32.const 4 + i32.ge_u + if (result i32) + local.get $5 + i32.const 7 + i32.and + local.get $6 + i32.const 7 + i32.and + i32.or + i32.eqz + else + i32.const 0 + end + if + block $do-break|0 + loop $do-loop|0 + local.get $5 + i64.load + local.get $6 + i64.load + i64.ne + if + br $do-break|0 + end + local.get $5 + i32.const 8 + i32.add + local.set $5 + local.get $6 + i32.const 8 + i32.add + local.set $6 + local.get $4 + i32.const 4 + i32.sub + local.set $4 + local.get $4 + i32.const 4 + i32.ge_u + br_if $do-loop|0 + end + end + end + loop $while-continue|1 + local.get $4 + local.tee $7 + i32.const 1 + i32.sub + local.set $4 + local.get $7 + local.set $7 + local.get $7 + if + local.get $5 + i32.load16_u + local.set $8 + local.get $6 + i32.load16_u + local.set $9 + local.get $8 + local.get $9 + i32.ne + if + local.get $8 + local.get $9 + i32.sub + return + end + local.get $5 + i32.const 2 + i32.add + local.set $5 + local.get $6 + i32.const 2 + i32.add + local.set $6 + br $while-continue|1 + end + end + i32.const 0 + ) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 0 + i32.eq + end + if + i32.const 0 + return + end + local.get $0 + call $~lib/string/String#get:length + local.set $2 + local.get $2 + local.get $1 + call $~lib/string/String#get:length + i32.ne + if + i32.const 0 + return + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + ) + (func $~lib/string/String.__ne (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/string/String.__eq + i32.eqz + ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) @@ -391,7 +546,7 @@ local.set $4 local.get $0 i32.const 0 - i32.ne + call $~lib/string/String.__ne if local.get $4 local.get $0 @@ -415,7 +570,7 @@ local.set $4 local.get $1 i32.const 0 - i32.ne + call $~lib/string/String.__ne if local.get $4 local.get $1 diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index 43a0defd71..a5111bb2e2 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -233,6 +233,13 @@ i64.store local.get $0 if (result i32) + i32.const 0 + else + i32.const 1 + end + if (result i32) + i32.const 19 + else local.get $0 i32.const 20 i32.sub @@ -248,8 +255,6 @@ call $~lib/string/String.UTF8.encodeUnsafe@varargs i32.const 19 i32.add - else - i32.const 19 end local.tee $0 i32.const 544106784 @@ -259,6 +264,12 @@ i32.add local.set $0 local.get $1 + if (result i32) + i32.const 0 + else + i32.const 1 + end + i32.eqz if local.get $1 i32.const 20 diff --git a/tests/compiler/wasi/trace.untouched.wat b/tests/compiler/wasi/trace.untouched.wat index 1e7c3de8fa..42317e57fc 100644 --- a/tests/compiler/wasi/trace.untouched.wat +++ b/tests/compiler/wasi/trace.untouched.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) @@ -19,6 +19,7 @@ (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) @@ -26,7 +27,6 @@ (global $~lib/util/number/_K (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) - (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/memory/__data_end i32 (i32.const 1616)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 18000)) (global $~lib/memory/__heap_base i32 (i32.const 18000)) @@ -167,6 +167,159 @@ i32.const 1 i32.shr_u ) + (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $6 + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $4 + i32.const 4 + i32.ge_u + if (result i32) + local.get $5 + i32.const 7 + i32.and + local.get $6 + i32.const 7 + i32.and + i32.or + i32.eqz + else + i32.const 0 + end + if + block $do-break|0 + loop $do-loop|0 + local.get $5 + i64.load + local.get $6 + i64.load + i64.ne + if + br $do-break|0 + end + local.get $5 + i32.const 8 + i32.add + local.set $5 + local.get $6 + i32.const 8 + i32.add + local.set $6 + local.get $4 + i32.const 4 + i32.sub + local.set $4 + local.get $4 + i32.const 4 + i32.ge_u + br_if $do-loop|0 + end + end + end + loop $while-continue|1 + local.get $4 + local.tee $7 + i32.const 1 + i32.sub + local.set $4 + local.get $7 + local.set $7 + local.get $7 + if + local.get $5 + i32.load16_u + local.set $8 + local.get $6 + i32.load16_u + local.set $9 + local.get $8 + local.get $9 + i32.ne + if + local.get $8 + local.get $9 + i32.sub + return + end + local.get $5 + i32.const 2 + i32.add + local.set $5 + local.get $6 + i32.const 2 + i32.add + local.set $6 + br $while-continue|1 + end + end + i32.const 0 + ) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 0 + i32.eq + end + if + i32.const 0 + return + end + local.get $0 + call $~lib/string/String#get:length + local.set $2 + local.get $2 + local.get $1 + call $~lib/string/String#get:length + i32.ne + if + i32.const 0 + return + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + ) + (func $~lib/string/String.__ne (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/string/String.__eq + i32.eqz + ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) @@ -520,7 +673,7 @@ local.set $4 local.get $0 i32.const 0 - i32.ne + call $~lib/string/String.__ne if local.get $4 local.get $0 @@ -544,7 +697,7 @@ local.set $4 local.get $1 i32.const 0 - i32.ne + call $~lib/string/String.__ne if local.get $4 local.get $1 From 1722afa59f2f1bf22fd4bafacccf875da62d76d9 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 15 Dec 2021 13:06:42 +0100 Subject: [PATCH 139/175] unify --- src/ast.ts | 2 +- src/bindings.ts | 6 ++--- src/builtins.ts | 26 ++++++++++---------- src/compiler.ts | 46 ++++++++++++++++++------------------ src/diagnostics.ts | 6 ++--- src/flow.ts | 18 +++++++------- src/module.ts | 8 +++---- src/parser.ts | 28 +++++++++++----------- src/program.ts | 59 +++++++++++++++++++++++----------------------- src/resolver.ts | 48 ++++++++++++++++++------------------- src/types.ts | 6 ++--- 11 files changed, 126 insertions(+), 127 deletions(-) diff --git a/src/ast.ts b/src/ast.ts index eb990c048a..80b4efa789 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -2353,7 +2353,7 @@ export function mangleInternalPath(path: string): string { export function isTypeOmitted(type: TypeNode): bool { if (type.kind == NodeKind.NAMEDTYPE) { let name = (type).name; - return !(name.next !== null || name.identifier.text.length > 0); + return !(name.next || name.identifier.text.length > 0); } return false; } diff --git a/src/bindings.ts b/src/bindings.ts index 17b05c9853..635c2574dc 100644 --- a/src/bindings.ts +++ b/src/bindings.ts @@ -291,7 +291,7 @@ export class TSDBuilder extends ExportsWalker { } sb.push(name); var base = element.base; - if (base !== null && base.is(CommonFlags.COMPILED | CommonFlags.MODULE_EXPORT)) { + if (base && base.is(CommonFlags.COMPILED | CommonFlags.MODULE_EXPORT)) { sb.push(" extends "); let extendsNode = assert(element.prototype.extendsNode); sb.push(extendsNode.name.identifier.text); // TODO: fqn? @@ -346,7 +346,7 @@ export class TSDBuilder extends ExportsWalker { visitNamespace(name: string, element: Element): void { var members = element.members; - if (members !== null && members.size > 0) { + if (members && members.size > 0) { let sb = this.sb; indent(sb, this.indentLevel++); sb.push("export namespace "); @@ -436,7 +436,7 @@ export class TSDBuilder extends ExportsWalker { sb.push("export const table: WebAssembly.Table;\n"); } let exportStart = options.exportStart || null; - if (exportStart !== null) { + if (exportStart) { sb.push("export function "); sb.push(exportStart); sb.push("(): void;\n"); diff --git a/src/builtins.ts b/src/builtins.ts index 994541cfc0..c4a65cb35d 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -804,7 +804,7 @@ function builtin_isString(ctx: BuiltinContext): ExpressionRef { if (!type) return module.unreachable(); var classReference = type.getClass(); return module.i32( - classReference !== null && classReference.isAssignableTo(compiler.program.stringInstance) + classReference && classReference.isAssignableTo(compiler.program.stringInstance) ? 1 : 0 ); @@ -820,7 +820,7 @@ function builtin_isArray(ctx: BuiltinContext): ExpressionRef { if (!type) return module.unreachable(); var classReference = type.getClass(); return module.i32( - classReference !== null && classReference.extends(compiler.program.arrayPrototype) + classReference && classReference.extends(compiler.program.arrayPrototype) ? 1 : 0 ); @@ -836,7 +836,7 @@ function builtin_isArrayLike(ctx: BuiltinContext): ExpressionRef { if (!type) return module.unreachable(); var classReference = type.getClass(); return module.i32( - classReference !== null && classReference.isArrayLike + classReference && classReference.isArrayLike ? 1 : 0 ); @@ -880,7 +880,7 @@ function builtin_isDefined(ctx: BuiltinContext): ExpressionRef { Type.auto, ReportMode.SWALLOW ); - return module.i32(element !== null ? 1 : 0); + return module.i32(element ? 1 : 0); } builtins.set(BuiltinNames.isDefined, builtin_isDefined); @@ -1024,7 +1024,7 @@ function builtin_offsetof(ctx: BuiltinContext): ExpressionRef { } let fieldName = (firstOperand).value; let classMembers = classReference.members; - if (classMembers !== null && classMembers.has(fieldName)) { + if (classMembers && classMembers.has(fieldName)) { let member = assert(classMembers.get(fieldName)); if (member.kind == ElementKind.FIELD) { return contextualUsize(compiler, i64_new((member).memoryOffset), contextualType); @@ -1077,7 +1077,7 @@ function builtin_idof(ctx: BuiltinContext): ExpressionRef { return module.i32(signatureReference.id); } let classReference = type.getClassOrWrapper(compiler.program); - if (classReference !== null && !classReference.hasDecorator(DecoratorFlags.UNMANAGED)) { + if (classReference && !classReference.hasDecorator(DecoratorFlags.UNMANAGED)) { return module.i32(classReference.id); } compiler.error( @@ -2886,7 +2886,7 @@ function builtin_memory_data(ctx: BuiltinContext): ExpressionRef { var numOperands = operands.length; var usizeType = compiler.options.usizeType; var offset: i64; - if (typeArguments !== null && typeArguments.length > 0) { // data(values[, align]) + if (typeArguments && typeArguments.length > 0) { // data(values[, align]) let elementType = typeArguments[0]; if (!elementType.isValue) { compiler.error( @@ -9477,7 +9477,7 @@ export function compileVisitGlobals(compiler: Compiler): void { let globalType = global.type; let classReference = globalType.getClass(); if ( - classReference !== null && + classReference && !classReference.hasDecorator(DecoratorFlags.UNMANAGED) && global.is(CommonFlags.COMPILED) ) { @@ -9585,7 +9585,7 @@ function ensureVisitMembersOf(compiler: Compiler, instance: Class): void { for (let _values = Map_values(members), j = 0, l = _values.length; j < l; ++j) { let member = unchecked(_values[j]); if (member.kind == ElementKind.FIELD) { - if ((member).parent === instance) { + if ((member).parent == instance) { let fieldType = (member).type; if (fieldType.isManaged) { let fieldOffset = (member).memoryOffset; @@ -9741,7 +9741,7 @@ export function compileRTTI(compiler: Compiler): void { assert(instanceId == lastId++); let flags: TypeinfoFlags = 0; if (instance.isPointerfree) flags |= TypeinfoFlags.POINTERFREE; - if (instance !== abvInstance && instance.extends(abvPrototype)) { + if (instance != abvInstance && instance.extends(abvPrototype)) { let valueType = instance.getArrayValueType(); flags |= TypeinfoFlags.ARRAYBUFFERVIEW; flags |= TypeinfoFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(valueType); @@ -9807,7 +9807,7 @@ export function compileClassInstanceOf(compiler: Compiler, prototype: ClassProto // if (__instanceof(ref, ID[i])) return true var instances = prototype.instances; - if (instances !== null && instances.size > 0) { + if (instances && instances.size > 0) { // TODO: for (let instance of instances.values()) { for (let _values = Map_values(instances), i = 0, k = _values.length; i < k; ++i) { let instance = unchecked(_values[i]); @@ -9853,7 +9853,7 @@ function evaluateConstantType(ctx: BuiltinContext): Type | null { return typeArguments[0]; } if (operands.length == 1) { // optional type argument - if (typeArguments !== null && typeArguments.length > 0) { + if (typeArguments && typeArguments.length > 0) { if (typeArguments.length > 1) { compiler.error( DiagnosticCode.Expected_0_type_arguments_but_got_1, @@ -9867,7 +9867,7 @@ function evaluateConstantType(ctx: BuiltinContext): Type | null { } return compiler.currentType; } - if (typeArguments !== null && typeArguments.length > 1) { + if (typeArguments && typeArguments.length > 1) { compiler.error( DiagnosticCode.Expected_0_type_arguments_but_got_1, ctx.reportNode.typeArgumentsRange, "1", typeArguments.length.toString() diff --git a/src/compiler.ts b/src/compiler.ts index 2659adfde0..237440ef17 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -745,9 +745,9 @@ export class Compiler extends DiagnosticEmitter { // exports it is likely a reactor, otherwise it is likely a command. exportStart = this.hasCustomFunctionExports ? "_initialize" : "_start"; } - if (!startIsEmpty || exportStart !== null) { + if (!startIsEmpty || exportStart != null) { let signature = startFunctionInstance.signature; - if (!startIsEmpty && exportStart !== null) { + if (!startIsEmpty && exportStart != null) { module.addGlobal(BuiltinNames.started, TypeRef.I32, true, module.i32(0)); startFunctionBody.unshift( module.global_set(BuiltinNames.started, module.i32(1)) @@ -767,7 +767,7 @@ export class Compiler extends DiagnosticEmitter { module.flatten(startFunctionBody) ); startFunctionInstance.finalize(module, funcRef); - if (exportStart === null) module.setStart(funcRef); + if (exportStart == null) module.setStart(funcRef); else { if (!isIdentifier(exportStart) || module.hasExport(exportStart)) { this.error( @@ -821,7 +821,7 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.FUNCTION_PROTOTYPE: { let functionPrototype = element; let functionInstances = functionPrototype.instances; - if (functionInstances !== null && functionInstances.size > 0) { + if (functionInstances && functionInstances.size > 0) { // TODO: for (let instance of instances.values()) { for (let _values = Map_values(functionInstances), i = 0, k = _values.length; i < k; ++i) { let instance = unchecked(_values[i]); @@ -845,7 +845,7 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.CLASS_PROTOTYPE: { let classPrototype = element; let classInstances = classPrototype.instances; - if (classInstances !== null && classInstances.size > 0) { + if (classInstances && classInstances.size > 0) { // TODO: for (let instance of instances.values()) { for (let _values = Map_values(classInstances), i = 0, k = _values.length; i < k; ++i) { let instance = unchecked(_values[i]); @@ -1722,7 +1722,7 @@ export class Compiler extends DiagnosticEmitter { } // check that super has been called if this is a derived class - if (classInstance.base !== null && !flow.is(FlowFlags.CALLS_SUPER)) { + if (classInstance.base && !flow.is(FlowFlags.CALLS_SUPER)) { this.error( DiagnosticCode.Constructors_for_derived_classes_must_contain_a_super_call, instance.prototype.declaration.range @@ -1920,7 +1920,7 @@ export class Compiler extends DiagnosticEmitter { if (setterInstance) { let ret = this.compileFunction(setterInstance); let getterInstance = instance.getterInstance; - if (getterInstance !== null && getterInstance.is(CommonFlags.COMPILED) && setterInstance.is(CommonFlags.COMPILED)) { + if (getterInstance && getterInstance.is(CommonFlags.COMPILED) && setterInstance.is(CommonFlags.COMPILED)) { instance.set(CommonFlags.COMPILED); } return ret; @@ -2163,7 +2163,7 @@ export class Compiler extends DiagnosticEmitter { } case NodeKind.FIELDDECLARATION: { let element = this.program.getElementByDeclaration(statement); - if (element !== null && element.kind == ElementKind.GLOBAL) { // static + if (element && element.kind == ElementKind.GLOBAL) { // static if (!element.hasDecorator(DecoratorFlags.LAZY)) this.compileGlobal(element); } break; @@ -2171,7 +2171,7 @@ export class Compiler extends DiagnosticEmitter { case NodeKind.EXPORT: { let exportStatement = statement; let internalPath = exportStatement.internalPath; - if (internalPath !== null) { + if (internalPath != null) { this.compileFileByPath(internalPath, assert(exportStatement.path)); } break; @@ -6014,7 +6014,7 @@ export class Compiler extends DiagnosticEmitter { // Cannot assign to readonly fields except in constructors if there's no initializer if (fieldInstance.is(CommonFlags.READONLY)) { - if (!isConstructor || initializerNode !== null) { + if (!isConstructor || initializerNode) { this.error( DiagnosticCode.Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property, valueExpression.range, fieldInstance.internalName @@ -6468,7 +6468,7 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.CLASS: { let classInstance = target; let typeArguments = classInstance.getTypeArgumentsTo(this.program.functionPrototype); - if (typeArguments !== null && typeArguments.length > 0) { + if (typeArguments && typeArguments.length > 0) { let ftype = typeArguments[0]; signature = ftype.getSignature(); functionArg = this.compileExpression(expression.expression, ftype, Constraints.CONV_IMPLICIT); @@ -7843,7 +7843,7 @@ export class Compiler extends DiagnosticEmitter { let functionPrototype = target; let typeParameterNodes = functionPrototype.typeParameterNodes; - if (typeParameterNodes !== null && typeParameterNodes.length != 0) { + if (typeParameterNodes && typeParameterNodes.length != 0) { this.error( DiagnosticCode.Type_argument_expected, expression.range @@ -7888,7 +7888,7 @@ export class Compiler extends DiagnosticEmitter { let namedType = isType; if (!(namedType.isNullable || namedType.hasTypeArguments)) { let element = this.resolver.resolveTypeName(namedType.name, flow.actualFunction, ReportMode.SWALLOW); - if (element !== null && element.kind == ElementKind.CLASS_PROTOTYPE) { + if (element && element.kind == ElementKind.CLASS_PROTOTYPE) { let prototype = element; if (prototype.is(CommonFlags.GENERIC)) { return this.makeInstanceofClass(expression, prototype); @@ -8161,7 +8161,7 @@ export class Compiler extends DiagnosticEmitter { var stringInstance = this.program.stringInstance; var stringType = stringInstance.type; - if (tag === null) { + if (!tag) { // Shortcut if just a (multi-line) string if (numParts == 1) { return this.ensureStaticString(parts[0]); @@ -8291,7 +8291,7 @@ export class Compiler extends DiagnosticEmitter { let parameterTypes = instance.signature.parameterTypes; if (parameterTypes.length) { let first = parameterTypes[0].getClass(); - if (first !== null && !first.extends(tsaArrayInstance.prototype)) { + if (first && !first.extends(tsaArrayInstance.prototype)) { arrayInstance = assert(this.resolver.resolveClass(this.program.arrayPrototype, [ stringType ])); } } @@ -8359,7 +8359,7 @@ export class Compiler extends DiagnosticEmitter { // handle static arrays let contextualClass = contextualType.getClass(); - if (contextualClass !== null && contextualClass.extends(program.staticArrayPrototype)) { + if (contextualClass && contextualClass.extends(program.staticArrayPrototype)) { return this.compileStaticArrayLiteral(expression, contextualType, constraints); } @@ -8685,7 +8685,7 @@ export class Compiler extends DiagnosticEmitter { for (let _keys = Map_keys(members), i = 0, k = _keys.length; i < k; ++i) { let memberKey = _keys[i]; let member = assert(members.get(memberKey)); - if (member !== null && member.kind == ElementKind.FIELD) { + if (member && member.kind == ElementKind.FIELD) { omittedFields.add(member); // incl. private/protected } } @@ -8846,7 +8846,7 @@ export class Compiler extends DiagnosticEmitter { var classReference: Class | null; if ( !typeArguments && - (classReference = contextualType.classReference) !== null && + (classReference = contextualType.classReference) && classReference.prototype == classPrototype && classReference.is(CommonFlags.GENERIC) ) { @@ -9340,7 +9340,7 @@ export class Compiler extends DiagnosticEmitter { let overload = classReference.lookupOverload(OperatorKind.POSTFIX_INC); if (overload) { let isInstance = overload.is(CommonFlags.INSTANCE); - if (tempLocal !== null && !isInstance) { // revert: static overload simply returns + if (tempLocal && !isInstance) { // revert: static overload simply returns getValue = getLocalSetValue(getValue); flow.freeTempLocal(tempLocal); tempLocal = null; @@ -9429,7 +9429,7 @@ export class Compiler extends DiagnosticEmitter { let overload = classReference.lookupOverload(OperatorKind.POSTFIX_DEC); if (overload) { let isInstance = overload.is(CommonFlags.INSTANCE); - if (tempLocal !== null && !isInstance) { // revert: static overload simply returns + if (tempLocal && !isInstance) { // revert: static overload simply returns getValue = getLocalSetValue(getValue); flow.freeTempLocal(tempLocal); tempLocal = null; @@ -9978,7 +9978,7 @@ export class Compiler extends DiagnosticEmitter { } else { let classReference = type.getClass(); if (classReference) { - if (classReference.prototype === stringInstance.prototype) { + if (classReference.prototype == stringInstance.prototype) { typeString = "string"; } else { typeString = "object"; @@ -10526,7 +10526,7 @@ export class Compiler extends DiagnosticEmitter { var stringInstance = program.stringInstance; var messageArg: ExpressionRef; - if (message !== null) { + if (message) { messageArg = this.compileExpression(message, stringInstance.type, Constraints.CONV_IMPLICIT); } else { messageArg = this.makeZero(stringInstance.type, codeLocation); @@ -10653,7 +10653,7 @@ function mangleImportName( var program = element.program; var decorator = assert(findDecorator(DecoratorKind.EXTERNAL, declaration.decorators)); var args = decorator.args; - if (args !== null && args.length > 0) { + if (args && args.length > 0) { let arg = args[0]; // if one argument is given, override just the element name // if two arguments are given, override both module and element name diff --git a/src/diagnostics.ts b/src/diagnostics.ts index 3fe2ecb821..c6eb82304d 100644 --- a/src/diagnostics.ts +++ b/src/diagnostics.ts @@ -102,9 +102,9 @@ export class DiagnosticMessage { arg2: string | null = null ): DiagnosticMessage { var message = diagnosticCodeToString(code); - if (arg0 !== null) message = message.replace("{0}", arg0); - if (arg1 !== null) message = message.replace("{1}", arg1); - if (arg2 !== null) message = message.replace("{2}", arg2); + if (arg0 != null) message = message.replace("{0}", arg0); + if (arg1 != null) message = message.replace("{1}", arg1); + if (arg2 != null) message = message.replace("{2}", arg2); return new DiagnosticMessage(code, category, message); } diff --git a/src/flow.ts b/src/flow.ts index ab829c251e..fc5d657121 100644 --- a/src/flow.ts +++ b/src/flow.ts @@ -243,7 +243,7 @@ export class Flow { /** Tests if this is an inline flow. */ get isInline(): bool { - return this.inlineFunction !== null; + return this.inlineFunction != null; } /** Gets the actual function being compiled, The inlined function when inlining, otherwise the parent function. */ @@ -341,7 +341,7 @@ export class Flow { } var local: Local; if (except) { - if (temps !== null && temps.length > 0) { + if (temps && temps.length > 0) { for (let i = 0, k = temps.length; i < k; ++i) { if (!except.has(temps[i].index)) { local = temps[i]; @@ -357,7 +357,7 @@ export class Flow { } local = parentFunction.addLocal(type); } else { - if (temps !== null && temps.length > 0) { + if (temps && temps.length > 0) { local = assert(temps.pop()); local.type = type; local.flags = CommonFlags.NONE; @@ -453,7 +453,7 @@ export class Flow { /** Gets the scoped local of the specified name. */ getScopedLocal(name: string): Local | null { var scopedLocals = this.scopedLocals; - if (scopedLocals !== null && scopedLocals.has(name)) return assert(scopedLocals.get(name)); + if (scopedLocals && scopedLocals.has(name)) return assert(scopedLocals.get(name)); return null; } @@ -560,7 +560,7 @@ export class Flow { var current: Flow | null = this; do { let scope = current.scopedLocals; - if (scope !== null && scope.has(name)) return assert(scope.get(name)); + if (scope && scope.has(name)) return assert(scope.get(name)); current = current.parent; } while (current); var localsByName = this.parentFunction.localsByName; @@ -623,7 +623,7 @@ export class Flow { // guaranteed by super field.parent != actualClass || // has field initializer - field.initializerNode !== null || + field.initializerNode || // is initialized as a ctor parameter field.prototype.parameterIndex != -1 || // is safe to initialize with zero @@ -760,7 +760,7 @@ export class Flow { if (thisFlags & FlowFlags.CONTINUES) { // nothing can change that newFlags |= FlowFlags.CONTINUES; - } else if (other.continueLabel === this.continueLabel) { + } else if (other.continueLabel == this.continueLabel) { if (otherFlags & FlowFlags.CONTINUES) { newFlags |= FlowFlags.CONDITIONALLY_CONTINUES; } else { @@ -962,9 +962,9 @@ export class Flow { var numThisLocalFlags = before.localFlags.length; var numOtherLocalFlags = after.localFlags.length; var parentFunction = before.parentFunction; - assert(parentFunction === after.parentFunction); + assert(parentFunction == after.parentFunction); var localsByIndex = parentFunction.localsByIndex; - assert(localsByIndex === after.parentFunction.localsByIndex); + assert(localsByIndex == after.parentFunction.localsByIndex); for (let i = 0, k = min(numThisLocalFlags, numOtherLocalFlags); i < k; ++i) { let local = localsByIndex[i]; let type = local.type; diff --git a/src/module.ts b/src/module.ts index b617fe864c..e44830dc80 100644 --- a/src/module.ts +++ b/src/module.ts @@ -1574,7 +1574,7 @@ export class Module { results: TypeRef, isReturn: bool = false ): ExpressionRef { - var cStr = this.allocStringCached(tableName !== null ? tableName : "0"); + var cStr = this.allocStringCached(tableName != null ? tableName : "0"); var cArr = allocPtrArray(operands); var ret = isReturn ? binaryen._BinaryenReturnCallIndirect( @@ -2499,7 +2499,7 @@ export class Module { private cachedPointersToStrings: Map = new Map(); allocStringCached(str: string | null): usize { - if (str === null) return 0; + if (str == null) return 0; var cached = this.cachedStringsToPointers; if (cached.has(str)) return changetype(cached.get(str)); var ptr = allocString(str); @@ -3109,11 +3109,11 @@ function stringLengthUTF8(str: string): usize { } function allocString(str: string | null): usize { - if (str === null) return 0; + if (str == null) return 0; var len = stringLengthUTF8(str); var ptr = binaryen._malloc(len + 1) >>> 0; var idx = ptr; - if (len === str.length) { + if (len == str.length) { // fast path when all chars are ascii for (let i = 0, k = str.length; i < k; ++i) { let u = str.charCodeAt(i) >>> 0; diff --git a/src/parser.ts b/src/parser.ts index 60510cdcd0..105f5f5bfa 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -144,7 +144,7 @@ export class Parser extends DiagnosticEmitter { this.seenlog.add(internalPath); // do not request again // check if this is an error - if (text === null) { + if (text == null) { let dependees = this.dependees; let dependee: Dependee | null = null; if (dependees.has(internalPath)) dependee = assert(dependees.get(internalPath)); @@ -401,7 +401,7 @@ export class Parser extends DiagnosticEmitter { } // check if this an `export default` declaration - if (defaultEnd && statement !== null) { + if (defaultEnd && statement != null) { switch (statement.kind) { case NodeKind.ENUMDECLARATION: case NodeKind.FUNCTIONDECLARATION: @@ -984,7 +984,7 @@ export class Parser extends DiagnosticEmitter { } } var range = Range.join(identifier.range, tn.range()); - if (initializer !== null && (flags & CommonFlags.DEFINITELY_ASSIGNED) != 0) { + if (initializer && (flags & CommonFlags.DEFINITELY_ASSIGNED) != 0) { this.error( DiagnosticCode.A_definite_assignment_assertion_is_not_permitted_in_this_context, range @@ -1113,7 +1113,7 @@ export class Parser extends DiagnosticEmitter { while (!tn.skip(Token.GREATERTHAN)) { let typeParameter = this.parseTypeParameter(tn); if (!typeParameter) return null; - if (typeParameter.defaultType !== null) { + if (typeParameter.defaultType) { seenOptional = true; } else if (seenOptional) { this.error( @@ -1248,7 +1248,7 @@ export class Parser extends DiagnosticEmitter { while (!tn.skip(Token.CLOSEPAREN)) { let param = this.parseParameter(tn, isConstructor); // reports if (!param) return null; - if (seenRest !== null && !reportedRest) { + if (seenRest && !reportedRest) { this.error( DiagnosticCode.A_rest_parameter_must_be_last_in_a_parameter_list, seenRest.name.range @@ -1451,7 +1451,7 @@ export class Parser extends DiagnosticEmitter { name.range ); // recoverable } - if (parameters.length > 0 && parameters[0].initializer !== null) { + if (parameters.length > 0 && parameters[0].initializer) { this.error( DiagnosticCode.A_set_accessor_parameter_cannot_have_an_initializer, name.range @@ -1857,7 +1857,7 @@ export class Parser extends DiagnosticEmitter { if (!decorators) decorators = new Array(); decorators.push(decorator); } while (tn.skip(Token.AT)); - if (isInterface && decorators !== null) { + if (isInterface && decorators) { this.error( DiagnosticCode.Decorators_are_not_valid_here, Range.join(decorators[0].range, decorators[decorators.length - 1].range) @@ -2182,7 +2182,7 @@ export class Parser extends DiagnosticEmitter { name.range ); } - if (parameters.length > 0 && parameters[0].initializer !== null) { + if (parameters.length > 0 && parameters[0].initializer) { this.error( DiagnosticCode.A_set_accessor_parameter_cannot_have_an_initializer, name.range @@ -2344,7 +2344,7 @@ export class Parser extends DiagnosticEmitter { let range = tn.range(startPos, tn.pos); if ( (flags & CommonFlags.DEFINITELY_ASSIGNED) != 0 && - (isInterface || initializer !== null || (flags & CommonFlags.STATIC) != 0) + (isInterface || initializer || (flags & CommonFlags.STATIC) != 0) ) { this.error( DiagnosticCode.A_definite_assignment_assertion_is_not_permitted_in_this_context, @@ -2375,7 +2375,7 @@ export class Parser extends DiagnosticEmitter { // at: '[': 'key' ':' Type ']' ':' Type - if (decorators !== null && decorators.length > 0) { + if (decorators && decorators.length > 0) { this.error( DiagnosticCode.Decorators_are_not_valid_here, Range.join(decorators[0].range, decorators[decorators.length - 1].range) @@ -2533,7 +2533,7 @@ export class Parser extends DiagnosticEmitter { } } let ret = Node.createExportStatement(members, path, isDeclare, tn.range(startPos, tn.pos)); - if (path !== null) { + if (path) { let internalPath = assert(ret.internalPath); if (!this.seenlog.has(internalPath)) { this.dependees.set(internalPath, new Dependee(currentSource, path)); @@ -3606,7 +3606,7 @@ export class Parser extends DiagnosticEmitter { let arguments_: Expression[] | null = null; if ( tn.skip(Token.OPENPAREN) || - (typeArguments = this.tryParseTypeArgumentsBeforeArguments(tn)) !== null + (typeArguments = this.tryParseTypeArgumentsBeforeArguments(tn)) ) { arguments_ = this.parseArguments(tn); if (!arguments_) return null; @@ -3919,7 +3919,7 @@ export class Parser extends DiagnosticEmitter { var start = tn.tokenPos; var typeArguments: TypeNode[] | null = null; do { - if (tn.peek() === Token.GREATERTHAN) { + if (tn.peek() == Token.GREATERTHAN) { break; } let type = this.parseType(tn, true, true); @@ -4258,7 +4258,7 @@ export class Parser extends DiagnosticEmitter { while ( tn.skip(Token.OPENPAREN) || potentiallyGeneric && - (typeArguments = this.tryParseTypeArgumentsBeforeArguments(tn)) !== null + (typeArguments = this.tryParseTypeArgumentsBeforeArguments(tn)) ) { let args = this.parseArguments(tn); if (!args) break; diff --git a/src/program.ts b/src/program.ts index 51834811c3..9a2b453008 100644 --- a/src/program.ts +++ b/src/program.ts @@ -218,8 +218,8 @@ export enum OperatorKind { BITWISE_SHL, // a << b BITWISE_SHR, // a >> b BITWISE_SHR_U, // a >>> b - EQ, // a == b - NE, // a != b + EQ, // a == b, a === b + NE, // a != b, a !== b GT, // a > b GE, // a >= b LT, // a < b @@ -238,7 +238,6 @@ export enum OperatorKind { POSTFIX_DEC // a-- // not overridable: - // IDENTITY // a === b // LOGICAL_AND // a && b // LOGICAL_OR // a || b } @@ -1230,7 +1229,7 @@ export class Program extends DiagnosticEmitter { file.ensureExport(exportName, element); } else { let globalElement = this.lookup(localName); - if (globalElement !== null && isDeclaredElement(globalElement.kind)) { // export { memory } + if (globalElement && isDeclaredElement(globalElement.kind)) { // export { memory } file.ensureExport(exportName, globalElement); } else { this.error( @@ -1497,7 +1496,7 @@ export class Program extends DiagnosticEmitter { } } let baseSetter = baseProperty.setterPrototype; - if (baseSetter !== null && thisProperty.setterPrototype !== null) { + if (baseSetter && thisProperty.setterPrototype) { baseSetter.set(CommonFlags.VIRTUAL); let thisSetter = thisProperty.setterPrototype; if (thisSetter) { @@ -1675,7 +1674,7 @@ export class Program extends DiagnosticEmitter { // user has multiple global elements of the same name in different files, // which might result in unexpected shared symbols accross files. considering // this a wonky feature for now that we might want to revisit later. - if (existing !== element) { + if (existing != element) { let merged = tryMerge(existing, element); if (!merged) { if (isDeclaredElement(existing.kind)) { @@ -1868,7 +1867,7 @@ export class Program extends DiagnosticEmitter { this.initializeProperty(methodDeclaration, element); } else { let method = this.initializeMethod(methodDeclaration, element); - if (method !== null && methodDeclaration.name.kind == NodeKind.CONSTRUCTOR) { + if (method && methodDeclaration.name.kind == NodeKind.CONSTRUCTOR) { element.constructorPrototype = method; } } @@ -2023,7 +2022,7 @@ export class Program extends DiagnosticEmitter { var name = declaration.name.text; if (declaration.is(CommonFlags.STATIC)) { let parentMembers = parent.members; - if (parentMembers !== null && parentMembers.has(name)) { + if (parentMembers && parentMembers.has(name)) { let element = assert(parentMembers.get(name)); if (element.kind == ElementKind.PROPERTY_PROTOTYPE) return element; } else { @@ -2033,7 +2032,7 @@ export class Program extends DiagnosticEmitter { } } else { let parentMembers = parent.instanceMembers; - if (parentMembers !== null && parentMembers.has(name)) { + if (parentMembers && parentMembers.has(name)) { let element = assert(parentMembers.get(name)); if (element.kind == ElementKind.PROPERTY_PROTOTYPE) return element; } else { @@ -2192,7 +2191,7 @@ export class Program extends DiagnosticEmitter { return; } // local element, i.e. export { foo [as bar] } - if (foreignPath === null) { + if (foreignPath == null) { // resolve right away if the local element already exists if (element = localFile.getMember(localName)) { @@ -2789,7 +2788,7 @@ export abstract class Element { if (!members) this.members = members = new Map(); else if (members.has(name)) { let existing = assert(members.get(name)); - if (existing.parent !== this) { + if (existing.parent != this) { // override non-own element } else { let merged = tryMerge(existing, element); @@ -3090,7 +3089,7 @@ export class File extends Element { /** Looks up the export of the specified name. */ lookupExport(name: string): DeclaredElement | null { var exports = this.exports; - if (exports !== null && exports.has(name)) return assert(exports.get(name)); + if (exports && exports.has(name)) return assert(exports.get(name)); var exportsStar = this.exportsStar; if (exportsStar) { for (let i = 0, k = exportsStar.length; i < k; ++i) { @@ -3517,7 +3516,7 @@ export class FunctionPrototype extends DeclaredElement { /** Gets the resolved instance for the specified instance key, if already resolved. */ getResolvedInstance(instanceKey: string): Function | null { var instances = this.instances; - if (instances !== null && instances.has(instanceKey)) return assert(instances.get(instanceKey)); + if (instances && instances.has(instanceKey)) return assert(instances.get(instanceKey)); return null; } @@ -3665,7 +3664,7 @@ export class Function extends TypedElement { // if it has a name, check previously as this method will throw otherwise var localIndex = this.signature.parameterTypes.length + this.additionalLocals.length; if (this.is(CommonFlags.INSTANCE)) ++localIndex; - var localName = name !== null + var localName = name != null ? name : "var$" + localIndex.toString(); if (!declaration) declaration = this.program.makeNativeVariableDeclaration(localName); @@ -3823,7 +3822,7 @@ export class Field extends VariableLikeElement { /** Gets the internal name of the respective getter function. */ get internalGetterName(): string { var cached = this._internalGetterName; - if (cached === null) this._internalGetterName = cached = this.parent.internalName + INSTANCE_DELIMITER + GETTER_PREFIX + this.name; + if (cached == null) this._internalGetterName = cached = this.parent.internalName + INSTANCE_DELIMITER + GETTER_PREFIX + this.name; return cached; } private _internalGetterName: string | null = null; @@ -3831,7 +3830,7 @@ export class Field extends VariableLikeElement { /** Gets the internal name of the respective setter function. */ get internalSetterName(): string { var cached = this._internalSetterName; - if (cached === null) this._internalSetterName = cached = this.parent.internalName + INSTANCE_DELIMITER + SETTER_PREFIX + this.name; + if (cached == null) this._internalSetterName = cached = this.parent.internalName + INSTANCE_DELIMITER + SETTER_PREFIX + this.name; return cached; } private _internalSetterName: string | null = null; @@ -4048,8 +4047,7 @@ export class ClassPrototype extends DeclaredElement { /** Tests if this prototype is of a builtin array type (Array/TypedArray). */ get isBuiltinArray(): bool { var arrayBufferViewInstance = this.program.arrayBufferViewInstance; - return arrayBufferViewInstance !== null - && this.extends(arrayBufferViewInstance.prototype); + return arrayBufferViewInstance && this.extends(arrayBufferViewInstance.prototype); } /** Tests if this prototype extends the specified. */ @@ -4060,7 +4058,7 @@ export class ClassPrototype extends DeclaredElement { // cannot directly or indirectly extend itself if (seen.has(current)) break; seen.add(current); - if (current === basePtototype) return true; + if (current == basePtototype) return true; current = current.basePrototype; } while (current); return false; @@ -4103,7 +4101,7 @@ export class ClassPrototype extends DeclaredElement { /** Gets the resolved instance for the specified instance key, if already resolved. */ getResolvedInstance(instanceKey: string): Class | null { var instances = this.instances; - if (instances !== null && instances.has(instanceKey)) return instances.get(instanceKey); + if (instances && instances.has(instanceKey)) return instances.get(instanceKey); return null; } @@ -4166,15 +4164,16 @@ export class Class extends TypedElement { get isArrayLike(): bool { if (this.isBuiltinArray) return true; var lengthField = this.getMember("length"); - return lengthField !== null && ( + if (!lengthField) return false; + return ( lengthField.kind == ElementKind.FIELD || ( lengthField.kind == ElementKind.PROPERTY_PROTOTYPE && - (lengthField).getterPrototype !== null // TODO: resolve & check type? + (lengthField).getterPrototype != null // TODO: resolve & check type? ) ) && ( - this.lookupOverload(OperatorKind.INDEXED_GET) !== null || - this.lookupOverload(OperatorKind.UNCHECKED_INDEXED_GET) !== null + this.lookupOverload(OperatorKind.INDEXED_GET) != null || + this.lookupOverload(OperatorKind.UNCHECKED_INDEXED_GET) != null ); } @@ -4226,7 +4225,7 @@ export class Class extends TypedElement { contextualTypeArguments.set(typeParameters[i].name.text, typeArguments[i]); } } - } else if (typeParameters !== null && typeParameters.length > 0) { + } else if (typeParameters && typeParameters.length > 0) { throw new Error("type argument count mismatch"); } registerConcreteElement(program, this); @@ -4349,7 +4348,7 @@ export class Class extends TypedElement { /** Writes a field value to a buffer and returns the number of bytes written. */ writeField(name: string, value: T, buffer: Uint8Array, baseOffset: i32 = this.program.totalOverhead): i32 { var member = this.getMember(name); - if (member !== null && member.kind == ElementKind.FIELD) { + if (member && member.kind == ElementKind.FIELD) { let fieldInstance = member; let offset = baseOffset + fieldInstance.memoryOffset; let typeKind = fieldInstance.type.kind; @@ -4424,7 +4423,7 @@ export class Class extends TypedElement { getTypeArgumentsTo(extendedPrototype: ClassPrototype): Type[] | null { var current: Class | null = this; do { - if (current.prototype === extendedPrototype) return current.typeArguments; + if (current.prototype == extendedPrototype) return current.typeArguments; current = current.base; } while (current); return null; @@ -4443,7 +4442,7 @@ export class Class extends TypedElement { return this.getTypeArgumentsTo(staticArrayPrototype)![0]; } var abvInstance = program.arrayBufferViewInstance; - while (current.base !== abvInstance) { + while (current.base != abvInstance) { current = assert(current.base); } var prototype = current.prototype; @@ -4520,7 +4519,7 @@ export class Class extends TypedElement { let extendee = _values[i]; if (exceptIfMember) { let instanceMembers = extendee.prototype.instanceMembers; - if (instanceMembers !== null && instanceMembers.has(exceptIfMember)) continue; + if (instanceMembers && instanceMembers.has(exceptIfMember)) continue; } out.add(extendee); extendee.getAllExtendees(exceptIfMember, out); @@ -4581,7 +4580,7 @@ function registerConcreteElement(program: Program, element: Element): void { function tryMerge(older: Element, newer: Element): DeclaredElement | null { // NOTE: some of the following cases are not supported by TS, not sure why exactly. // suggesting to just merge what seems to be possible for now and revisit later. - assert(older.program === newer.program); + assert(older.program == newer.program); if (newer.members) return null; var merged: DeclaredElement | null = null; switch (older.kind) { diff --git a/src/resolver.ts b/src/resolver.ts index 8de0697ddf..db485a0973 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -191,9 +191,9 @@ export class Resolver extends DiagnosticEmitter { // Look up in contextual types if a simple type if (isSimpleType) { let simpleName = nameNode.identifier.text; - if (ctxTypes !== null && ctxTypes.has(simpleName)) { + if (ctxTypes && ctxTypes.has(simpleName)) { let type = assert(ctxTypes.get(simpleName)); - if (typeArgumentNodes !== null && typeArgumentNodes.length > 0) { + if (typeArgumentNodes && typeArgumentNodes.length > 0) { if (reportMode == ReportMode.REPORT) { this.error( DiagnosticCode.Type_0_is_not_generic, @@ -227,7 +227,7 @@ export class Resolver extends DiagnosticEmitter { // Handle enums (become i32) if (element.kind == ElementKind.ENUM) { - if (typeArgumentNodes !== null && typeArgumentNodes.length > 0) { + if (typeArgumentNodes && typeArgumentNodes.length > 0) { if (reportMode == ReportMode.REPORT) { this.error( DiagnosticCode.Type_0_is_not_generic, @@ -270,7 +270,7 @@ export class Resolver extends DiagnosticEmitter { // Shortcut already resolved (mostly builtins) if (element.is(CommonFlags.RESOLVED)) { - if (typeArgumentNodes !== null && typeArgumentNodes.length > 0) { + if (typeArgumentNodes && typeArgumentNodes.length > 0) { if (reportMode == ReportMode.REPORT) { this.error( DiagnosticCode.Type_0_is_not_generic, @@ -314,7 +314,7 @@ export class Resolver extends DiagnosticEmitter { reportMode ); if (!typeArguments) return null; - } else if (typeArgumentNodes !== null && typeArgumentNodes.length > 0) { + } else if (typeArgumentNodes && typeArgumentNodes.length > 0) { this.error( DiagnosticCode.Type_0_is_not_generic, node.range, nameNode.identifier.text @@ -805,14 +805,14 @@ export class Resolver extends DiagnosticEmitter { if (node.kind == NodeKind.NAMEDTYPE) { let namedTypeNode = node; let typeArgumentNodes = namedTypeNode.typeArguments; - if (typeArgumentNodes !== null && typeArgumentNodes.length > 0) { // foo(bar: Array) + if (typeArgumentNodes && typeArgumentNodes.length > 0) { // foo(bar: Array) let classReference = type.classReference; if (classReference) { let classPrototype = this.resolveTypeName(namedTypeNode.name, ctxFlow.actualFunction); if (!classPrototype || classPrototype.kind != ElementKind.CLASS_PROTOTYPE) return; if (classReference.prototype == classPrototype) { let typeArguments = classReference.typeArguments; - if (typeArguments !== null && typeArguments.length == typeArgumentNodes.length) { + if (typeArguments && typeArguments.length == typeArgumentNodes.length) { for (let i = 0, k = typeArguments.length; i < k; ++i) { this.propagateInferredGenericTypes(typeArgumentNodes[i], typeArguments[i], ctxFlow, ctxTypes, typeParameterNames); } @@ -832,7 +832,7 @@ export class Resolver extends DiagnosticEmitter { } else if (node.kind == NodeKind.FUNCTIONTYPE) { // foo(bar: (baz: T) => i32)) let functionTypeNode = node; let parameterNodes = functionTypeNode.parameters; - if (parameterNodes !== null && parameterNodes.length > 0) { + if (parameterNodes && parameterNodes.length > 0) { let signatureReference = type.signatureReference; if (signatureReference) { let parameterTypes = signatureReference.parameterTypes; @@ -2120,7 +2120,7 @@ export class Resolver extends DiagnosticEmitter { } } var parent: Element | null = ctxFlow.actualFunction.parent; - if (parent !== null && parent.kind == ElementKind.CLASS) { + if (parent && parent.kind == ElementKind.CLASS) { let base = (parent).base; if (base) { this.currentThisExpression = null; @@ -2193,7 +2193,7 @@ export class Resolver extends DiagnosticEmitter { } case LiteralKind.ARRAY: { let classReference = ctxType.getClass(); - if (classReference !== null && classReference.prototype == this.program.arrayPrototype) { + if (classReference && classReference.prototype == this.program.arrayPrototype) { return this.getElementOfType(ctxType); } // otherwise infer, ignoring ctxType @@ -2350,7 +2350,7 @@ export class Resolver extends DiagnosticEmitter { } case ElementKind.CLASS: { let typeArguments = (target).getTypeArgumentsTo(this.program.functionPrototype); - if (typeArguments !== null && typeArguments.length > 0) { + if (typeArguments && typeArguments.length > 0) { let ftype = typeArguments[0]; let signatureReference = assert(ftype.signatureReference); return signatureReference.returnType; @@ -2623,8 +2623,8 @@ export class Resolver extends DiagnosticEmitter { var signatureNode = prototype.functionTypeNode; var typeParameterNodes = prototype.typeParameterNodes; var numFunctionTypeArguments: i32; - if (typeArguments !== null && (numFunctionTypeArguments = typeArguments.length) > 0) { - assert(typeParameterNodes !== null && numFunctionTypeArguments == typeParameterNodes.length); + if (typeArguments && (numFunctionTypeArguments = typeArguments.length) > 0) { + assert(typeParameterNodes && numFunctionTypeArguments == typeParameterNodes.length); for (let i = 0; i < numFunctionTypeArguments; ++i) { ctxTypes.set( (typeParameterNodes)[i].name.text, @@ -2801,7 +2801,7 @@ export class Resolver extends DiagnosticEmitter { // Otherwise make sure that no type arguments have been specified } else { - if (typeArgumentNodes !== null && typeArgumentNodes.length > 0) { + if (typeArgumentNodes && typeArgumentNodes.length > 0) { if (reportMode == ReportMode.REPORT) { this.error( DiagnosticCode.Type_0_is_not_generic, @@ -2919,7 +2919,7 @@ export class Resolver extends DiagnosticEmitter { } } else { let typeParameterNodes = prototype.typeParameterNodes; - assert(!(typeParameterNodes !== null && typeParameterNodes.length > 0)); + assert(!(typeParameterNodes && typeParameterNodes.length > 0)); } instance.contextualTypeArguments = ctxTypes; @@ -3091,7 +3091,7 @@ export class Resolver extends DiagnosticEmitter { let existingField: Field | null = null; if (base) { let baseMembers = base.members; - if (baseMembers !== null && baseMembers.has(fieldPrototype.name)) { + if (baseMembers && baseMembers.has(fieldPrototype.name)) { let baseField = assert(baseMembers.get(fieldPrototype.name)); if (baseField.kind == ElementKind.FIELD) { existingField = baseField; @@ -3105,7 +3105,7 @@ export class Resolver extends DiagnosticEmitter { } } if (!fieldTypeNode) { - if (existingField !== null && !existingField.is(CommonFlags.PRIVATE)) { + if (existingField && !existingField.is(CommonFlags.PRIVATE)) { fieldType = existingField.type; } if (!fieldType) { @@ -3134,7 +3134,7 @@ export class Resolver extends DiagnosticEmitter { } } if (!fieldType) break; // did report above - if (existingField !== null) { + if (existingField) { // visibility checks /* existingField visibility on top @@ -3203,7 +3203,7 @@ export class Resolver extends DiagnosticEmitter { } let fieldInstance = new Field(fieldPrototype, instance, fieldType); assert(isPowerOf2(fieldType.byteSize)); - if (existingField !== null) { + if (existingField) { fieldInstance.memoryOffset = existingField.memoryOffset; } else { let mask = fieldType.byteSize - 1; @@ -3243,7 +3243,7 @@ export class Resolver extends DiagnosticEmitter { ); } else { let propertySetter = property.setterInstance; - if (propertySetter !== null && !propertyGetter.visibilityEquals(propertySetter)) { + if (propertySetter && !propertyGetter.visibilityEquals(propertySetter)) { this.errorRelated( DiagnosticCode.Getter_and_setter_accessors_do_not_agree_in_visibility, propertyGetter.identifierNode.range, propertySetter.identifierNode.range @@ -3273,7 +3273,7 @@ export class Resolver extends DiagnosticEmitter { // Link _own_ constructor if present { let ctorPrototype = instance.getMember(CommonNames.constructor); - if (ctorPrototype !== null && ctorPrototype.parent === instance) { + if (ctorPrototype && ctorPrototype.parent == instance) { assert(ctorPrototype.kind == ElementKind.FUNCTION_PROTOTYPE); let ctorInstance = this.resolveFunction( ctorPrototype, @@ -3367,13 +3367,13 @@ export class Resolver extends DiagnosticEmitter { // pending classes being resolved. for (let _values = Set_values(pendingClasses), i = 0, k = _values.length; i < k; ++i) { let pending = _values[i]; - let dependsOnInstance = pending.base === instance; + let dependsOnInstance = pending.base == instance; let interfaces = pending.interfaces; if (interfaces) { let anyPending = false; for (let _values2 = Set_values(interfaces), j = 0, l = _values2.length; j < l; ++j) { let iface = _values2[j]; - if (iface === instance) dependsOnInstance = true; + if (iface == instance) dependsOnInstance = true; else if (pendingClasses.has(iface)) anyPending = true; } if (anyPending) continue; @@ -3413,7 +3413,7 @@ export class Resolver extends DiagnosticEmitter { // Otherwise make sure that no type arguments have been specified } else { - if (typeArgumentNodes !== null && typeArgumentNodes.length > 0) { + if (typeArgumentNodes && typeArgumentNodes.length > 0) { if (reportMode == ReportMode.REPORT) { this.error( DiagnosticCode.Type_0_is_not_generic, diff --git a/src/types.ts b/src/types.ts index b07f5ac221..ac2ee9c1f4 100644 --- a/src/types.ts +++ b/src/types.ts @@ -261,7 +261,7 @@ export class Type { /** Tests if this type represents a class. */ get isClass(): bool { return this.isInternalReference - ? this.classReference !== null + ? this.classReference != null : false; } @@ -300,7 +300,7 @@ export class Type { /** Tests if this type represents a function. */ get isFunction(): bool { return this.isInternalReference - ? this.signatureReference !== null + ? this.signatureReference != null : false; } @@ -316,7 +316,7 @@ export class Type { if (this.isInternalReference) { let classReference = this.classReference; if (classReference) return !classReference.hasDecorator(DecoratorFlags.UNMANAGED); - return this.signatureReference !== null; // function references are managed + return this.signatureReference != null; // function references are managed } return false; } From 337c826a6ebff73dce67b5516197340fbb257500 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 15 Dec 2021 16:50:26 +0100 Subject: [PATCH 140/175] update binaryen --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8b989f609f..75a11ccc58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "binaryen": "103.0.0-nightly.20211209", + "binaryen": "103.0.0-nightly.20211215", "long": "^5.2.0" }, "bin": { @@ -375,9 +375,9 @@ "dev": true }, "node_modules/binaryen": { - "version": "103.0.0-nightly.20211209", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-103.0.0-nightly.20211209.tgz", - "integrity": "sha512-hJwgeNIFVV0mHYjOlCq0DdnCj00wEEIwPl5MKtd2G5j9JyX9iHL5mG4ummuygkD23tmgBjSbNLKAwcN7lHWx0g==", + "version": "103.0.0-nightly.20211215", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-103.0.0-nightly.20211215.tgz", + "integrity": "sha512-SxUAKyhlFAbiNXHyzjhECs1fsKmz3v7rSI1jUx0RRuWJamz/6JiKg6+l+Cx0D2HNm96CS4UiZFqIxWi16vNbDQ==", "bin": { "wasm-opt": "bin/wasm-opt", "wasm2js": "bin/wasm2js" @@ -2016,9 +2016,9 @@ "dev": true }, "binaryen": { - "version": "103.0.0-nightly.20211209", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-103.0.0-nightly.20211209.tgz", - "integrity": "sha512-hJwgeNIFVV0mHYjOlCq0DdnCj00wEEIwPl5MKtd2G5j9JyX9iHL5mG4ummuygkD23tmgBjSbNLKAwcN7lHWx0g==" + "version": "103.0.0-nightly.20211215", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-103.0.0-nightly.20211215.tgz", + "integrity": "sha512-SxUAKyhlFAbiNXHyzjhECs1fsKmz3v7rSI1jUx0RRuWJamz/6JiKg6+l+Cx0D2HNm96CS4UiZFqIxWi16vNbDQ==" }, "brace-expansion": { "version": "1.1.11", diff --git a/package.json b/package.json index 01b437c635..2ec98c933c 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "103.0.0-nightly.20211209", + "binaryen": "103.0.0-nightly.20211215", "long": "^5.2.0" }, "devDependencies": { From 47f4eb446eb42a23ccfb58c7cb51c7cf4867b13c Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 15 Dec 2021 18:01:35 +0100 Subject: [PATCH 141/175] add total time to stats --- cli/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cli/index.js b/cli/index.js index 78fe9f8cd5..725a5a2f52 100644 --- a/cli/index.js +++ b/cli/index.js @@ -168,6 +168,9 @@ export async function main(argv, options) { if (!Array.isArray(argv)) argv = configToArguments(argv); if (!options) options = {}; + const stats = options.stats || new Stats(); + const statsBegin = stats.begin(); + // Bundle semantic version let bundleMinorVersion = 0, bundleMajorVersion = 0, bundlePatchVersion = 0; const versionParts = (version || "").split("."); @@ -182,7 +185,6 @@ export async function main(argv, options) { const readFile = options.readFile || readFileNode; const writeFile = options.writeFile || writeFileNode; const listFiles = options.listFiles || listFilesNode; - const stats = options.stats || new Stats(); // Parse command line options but do not populate option defaults yet const optionsResult = optionsUtil.parse(argv, generated.options, false); @@ -222,6 +224,7 @@ export async function main(argv, options) { stderr.write(`${stderrColors.red("FAILURE ")}${error.stack.replace(/^ERROR: /i, "")}${EOL}`); } if (module) module.dispose(); + if (!stats.total) stats.total = stats.end(statsBegin); return Object.assign({ error, stdout, stderr, stats }, result); }; @@ -1033,6 +1036,7 @@ export async function main(argv, options) { return prepareResult(err); } + stats.total = stats.end(statsBegin); if (opts.stats) stderr.write(stats.toString()); return prepareResult(null); @@ -1245,6 +1249,8 @@ export class Stats { out.push(`│ ${keys[i].padEnd(keysLen)} │ ${times[i].padStart(timesLen)} │ ${counts[i].padStart(countsLen)} │${EOL}`); } out.push(`├─${"─".repeat(keysLen)}─┴─${"─".repeat(timesLen)}─┴─${"─".repeat(countsLen)}─┤${EOL}`); + const totalTime = `Took ${formatTime(this.total)}`; + out.push(`│ ${totalTime}${" ".repeat(totalLen - totalTime.length)} │${EOL}`); const readsWrites = `${this.readCount} reads, ${this.writeCount} writes`; out.push(`│ ${readsWrites}${" ".repeat(totalLen - readsWrites.length)} │${EOL}`); out.push(`╰─${"─".repeat(totalLen)}─╯${EOL}`); From e25ca01e43c84d3f3dd0ef8cdae5162786b5957d Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 15 Dec 2021 19:53:57 +0100 Subject: [PATCH 142/175] comment --- src/flow.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/flow.ts b/src/flow.ts index fc5d657121..709a47cf87 100644 --- a/src/flow.ts +++ b/src/flow.ts @@ -1199,9 +1199,9 @@ export class Flow { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) == 0) { - this.inheritNonnullIfTrue(right, iff); // FALSE == right -> right must have been true + this.inheritNonnullIfTrue(right, iff); // !(FALSE == right) -> right must have been true } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) == 0) { - this.inheritNonnullIfTrue(left, iff); // left == FALSE -> left must have been true + this.inheritNonnullIfTrue(left, iff); // !(left == FALSE) -> left must have been true } break; } @@ -1209,9 +1209,9 @@ export class Flow { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); if (getExpressionId(left) == ExpressionId.Const && getConstValueI64Low(left) == 0 && getConstValueI64High(left) == 0) { - this.inheritNonnullIfTrue(right, iff); // TRUE == right -> right must have been true + this.inheritNonnullIfTrue(right, iff); // !(FALSE == right) -> right must have been true } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI64Low(right) == 0 && getConstValueI64High(right) == 0) { - this.inheritNonnullIfTrue(left, iff); // left == TRUE -> left must have been true + this.inheritNonnullIfTrue(left, iff); // !(left == FALSE) -> left must have been true } break; } @@ -1219,9 +1219,9 @@ export class Flow { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) != 0) { - this.inheritNonnullIfTrue(right, iff); // TRUE != right -> right must have been true + this.inheritNonnullIfTrue(right, iff); // !(TRUE != right) -> right must have been true } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) != 0) { - this.inheritNonnullIfTrue(left, iff); // left != TRUE -> left must have been true + this.inheritNonnullIfTrue(left, iff); // !(left != TRUE) -> left must have been true } break; } @@ -1229,9 +1229,9 @@ export class Flow { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); if (getExpressionId(left) == ExpressionId.Const && (getConstValueI64Low(left) != 0 || getConstValueI64High(left) != 0)) { - this.inheritNonnullIfTrue(right, iff); // TRUE != right -> right must have been true for this to become false + this.inheritNonnullIfTrue(right, iff); // !(TRUE != right) -> right must have been true } else if (getExpressionId(right) == ExpressionId.Const && (getConstValueI64Low(right) != 0 || getConstValueI64High(right) != 0)) { - this.inheritNonnullIfTrue(left, iff); // left != TRUE -> left must have been true for this to become false + this.inheritNonnullIfTrue(left, iff); // !(left != TRUE) -> left must have been true } break; } @@ -1246,22 +1246,22 @@ export class Flow { let left = getCallOperandAt(expr, 0); let right = getCallOperandAt(expr, 1); if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) == 0) { - this.inheritNonnullIfTrue(right, iff); // FALSE == right -> right must have been true + this.inheritNonnullIfTrue(right, iff); // !(FALSE == right) -> right must have been true } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) == 0) { - this.inheritNonnullIfTrue(left, iff); // left == FALSE -> left must have been true + this.inheritNonnullIfTrue(left, iff); // !(left == FALSE) -> left must have been true } } else if (name == BuiltinNames.String_ne) { assert(getCallOperandCount(expr) == 2); let left = getCallOperandAt(expr, 0); let right = getCallOperandAt(expr, 1); if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) != 0) { - this.inheritNonnullIfTrue(right, iff); // TRUE != right -> right must have been true + this.inheritNonnullIfTrue(right, iff); // !(TRUE != right) -> right must have been true } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) != 0) { - this.inheritNonnullIfTrue(left, iff); // left != TRUE -> left must have been true + this.inheritNonnullIfTrue(left, iff); // !(left != TRUE) -> left must have been true } } else if (name == BuiltinNames.String_not) { assert(getCallOperandCount(expr) == 1); - this.inheritNonnullIfTrue(getCallOperandAt(expr, 0), iff); // !value -> value must have been true + this.inheritNonnullIfTrue(getCallOperandAt(expr, 0), iff); // !(!value) -> value must have been true } else if (name == BuiltinNames.tostack) { assert(getCallOperandCount(expr) == 1); let value = getCallOperandAt(expr, 0); From cc1bd1152ec0ed4d964b3d22fcb7ae151629d8a1 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 15 Dec 2021 20:18:02 +0100 Subject: [PATCH 143/175] same --- src/flow.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/flow.ts b/src/flow.ts index 709a47cf87..c5d939e695 100644 --- a/src/flow.ts +++ b/src/flow.ts @@ -1264,8 +1264,7 @@ export class Flow { this.inheritNonnullIfTrue(getCallOperandAt(expr, 0), iff); // !(!value) -> value must have been true } else if (name == BuiltinNames.tostack) { assert(getCallOperandCount(expr) == 1); - let value = getCallOperandAt(expr, 0); - this.inheritNonnullIfFalse(value, iff); + this.inheritNonnullIfFalse(getCallOperandAt(expr, 0), iff); } break; } From 05913bf83c626121cdaf14c29093276efce9a9a6 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 15 Dec 2021 23:04:24 +0100 Subject: [PATCH 144/175] account for usize ptr, refactor --- src/flow.ts | 109 ++++++++++++++------------------------------------ src/module.ts | 10 +++++ 2 files changed, 40 insertions(+), 79 deletions(-) diff --git a/src/flow.ts b/src/flow.ts index c5d939e695..7f302a706c 100644 --- a/src/flow.ts +++ b/src/flow.ts @@ -64,10 +64,11 @@ import { getCallTarget, getLocalSetIndex, getIfCondition, - getConstValueI64High, getUnaryValue, getCallOperandAt, - getCallOperandCount + getCallOperandCount, + isConstZero, + isConstNonZero } from "./module"; import { @@ -1052,17 +1053,11 @@ export class Flow { } case ExpressionId.If: { let ifFalse = getIfFalse(expr); - if (!ifFalse) break; - if (getExpressionId(ifFalse) == ExpressionId.Const) { + if (ifFalse && isConstZero(ifFalse)) { // Logical AND: (if (condition ifTrue 0)) // the only way this had become true is if condition and ifTrue are true - if ( - (getExpressionType(ifFalse) == TypeRef.I32 && getConstValueI32(ifFalse) == 0) || - (getExpressionType(ifFalse) == TypeRef.I64 && getConstValueI64Low(ifFalse) == 0 && getConstValueI64High(ifFalse) == 0) - ) { - this.inheritNonnullIfTrue(getIfCondition(expr), iff); - this.inheritNonnullIfTrue(getIfTrue(expr), iff); - } + this.inheritNonnullIfTrue(getIfCondition(expr), iff); + this.inheritNonnullIfTrue(getIfTrue(expr), iff); } break; } @@ -1078,42 +1073,24 @@ export class Flow { } case ExpressionId.Binary: { switch (getBinaryOp(expr)) { - case BinaryOp.EqI32: { - let left = getBinaryLeft(expr); - let right = getBinaryRight(expr); - if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) != 0) { - this.inheritNonnullIfTrue(right, iff); // TRUE == right -> right must have been true - } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) != 0) { - this.inheritNonnullIfTrue(left, iff); // left == TRUE -> left must have been true - } - break; - } + case BinaryOp.EqI32: case BinaryOp.EqI64: { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); - if (getExpressionId(left) == ExpressionId.Const && (getConstValueI64Low(left) != 0 || getConstValueI64High(left) != 0)) { + if (isConstNonZero(left)) { this.inheritNonnullIfTrue(right, iff); // TRUE == right -> right must have been true - } else if (getExpressionId(right) == ExpressionId.Const && (getConstValueI64Low(right) != 0 && getConstValueI64High(right) != 0)) { + } else if (isConstNonZero(right)) { this.inheritNonnullIfTrue(left, iff); // left == TRUE -> left must have been true } break; } - case BinaryOp.NeI32: { - let left = getBinaryLeft(expr); - let right = getBinaryRight(expr); - if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) == 0) { - this.inheritNonnullIfTrue(right, iff); // FALSE != right -> right must have been true - } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) == 0) { - this.inheritNonnullIfTrue(left, iff); // left != FALSE -> left must have been true - } - break; - } + case BinaryOp.NeI32: case BinaryOp.NeI64: { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); - if (getExpressionId(left) == ExpressionId.Const && getConstValueI64Low(left) == 0 && getConstValueI64High(left) == 0) { + if (isConstZero(left)) { this.inheritNonnullIfTrue(right, iff); // FALSE != right -> right must have been true - } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI64Low(right) == 0 && getConstValueI64High(right) == 0) { + } else if (isConstZero(right)) { this.inheritNonnullIfTrue(left, iff); // left != FALSE -> left must have been true } break; @@ -1128,18 +1105,18 @@ export class Flow { assert(getCallOperandCount(expr) == 2); let left = getCallOperandAt(expr, 0); let right = getCallOperandAt(expr, 1); - if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) != 0) { + if (isConstNonZero(left)) { this.inheritNonnullIfTrue(right, iff); // TRUE == right -> right must have been true - } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) != 0) { + } else if (isConstNonZero(right)) { this.inheritNonnullIfTrue(left, iff); // left == TRUE -> left must have been true } } else if (name == BuiltinNames.String_ne) { assert(getCallOperandCount(expr) == 2); let left = getCallOperandAt(expr, 0); let right = getCallOperandAt(expr, 1); - if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) == 0) { + if (isConstZero(left)) { this.inheritNonnullIfTrue(right, iff); // FALSE != right -> right must have been true - } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) == 0) { + } else if (isConstZero(right)) { this.inheritNonnullIfTrue(left, iff); // left != FALSE -> left must have been true } } else if (name == BuiltinNames.String_not) { @@ -1175,62 +1152,36 @@ export class Flow { } case ExpressionId.If: { let ifTrue = getIfTrue(expr); - if (getExpressionId(ifTrue) == ExpressionId.Const) { - let ifFalse = getIfFalse(expr); - if (!ifFalse) break; + let ifFalse = getIfFalse(expr); + if (ifFalse && isConstNonZero(ifTrue)) { // Logical OR: (if (condition 1 ifFalse)) // the only way this had become false is if condition and ifFalse are false - let exprType = getExpressionType(ifTrue); - if ( - (exprType == TypeRef.I32 && getConstValueI32(ifTrue) != 0) || - (exprType == TypeRef.I64 && (getConstValueI64Low(ifTrue) != 0 || getConstValueI64High(ifTrue) != 0)) - ) { - this.inheritNonnullIfFalse(getIfCondition(expr), iff); - this.inheritNonnullIfFalse(getIfFalse(expr), iff); - } - + this.inheritNonnullIfFalse(getIfCondition(expr), iff); + this.inheritNonnullIfFalse(getIfFalse(expr), iff); } break; } case ExpressionId.Binary: { switch (getBinaryOp(expr)) { // remember: we want to know how the _entire_ expression became FALSE (!) - case BinaryOp.EqI32: { - let left = getBinaryLeft(expr); - let right = getBinaryRight(expr); - if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) == 0) { - this.inheritNonnullIfTrue(right, iff); // !(FALSE == right) -> right must have been true - } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) == 0) { - this.inheritNonnullIfTrue(left, iff); // !(left == FALSE) -> left must have been true - } - break; - } + case BinaryOp.EqI32: case BinaryOp.EqI64: { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); - if (getExpressionId(left) == ExpressionId.Const && getConstValueI64Low(left) == 0 && getConstValueI64High(left) == 0) { + if (isConstZero(left)) { this.inheritNonnullIfTrue(right, iff); // !(FALSE == right) -> right must have been true - } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI64Low(right) == 0 && getConstValueI64High(right) == 0) { + } else if (isConstZero(right)) { this.inheritNonnullIfTrue(left, iff); // !(left == FALSE) -> left must have been true } break; } - case BinaryOp.NeI32: { - let left = getBinaryLeft(expr); - let right = getBinaryRight(expr); - if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) != 0) { - this.inheritNonnullIfTrue(right, iff); // !(TRUE != right) -> right must have been true - } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) != 0) { - this.inheritNonnullIfTrue(left, iff); // !(left != TRUE) -> left must have been true - } - break; - } + case BinaryOp.NeI32: case BinaryOp.NeI64: { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); - if (getExpressionId(left) == ExpressionId.Const && (getConstValueI64Low(left) != 0 || getConstValueI64High(left) != 0)) { + if (isConstNonZero(left)) { this.inheritNonnullIfTrue(right, iff); // !(TRUE != right) -> right must have been true - } else if (getExpressionId(right) == ExpressionId.Const && (getConstValueI64Low(right) != 0 || getConstValueI64High(right) != 0)) { + } else if (isConstNonZero(right)) { this.inheritNonnullIfTrue(left, iff); // !(left != TRUE) -> left must have been true } break; @@ -1245,18 +1196,18 @@ export class Flow { assert(getCallOperandCount(expr) == 2); let left = getCallOperandAt(expr, 0); let right = getCallOperandAt(expr, 1); - if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) == 0) { + if (isConstZero(left)) { this.inheritNonnullIfTrue(right, iff); // !(FALSE == right) -> right must have been true - } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) == 0) { + } else if (isConstZero(right)) { this.inheritNonnullIfTrue(left, iff); // !(left == FALSE) -> left must have been true } } else if (name == BuiltinNames.String_ne) { assert(getCallOperandCount(expr) == 2); let left = getCallOperandAt(expr, 0); let right = getCallOperandAt(expr, 1); - if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) != 0) { + if (isConstNonZero(left)) { this.inheritNonnullIfTrue(right, iff); // !(TRUE != right) -> right must have been true - } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) != 0) { + } else if (isConstNonZero(right)) { this.inheritNonnullIfTrue(left, iff); // !(left != TRUE) -> left must have been true } } else if (name == BuiltinNames.String_not) { diff --git a/src/module.ts b/src/module.ts index e44830dc80..e63ddd0f77 100644 --- a/src/module.ts +++ b/src/module.ts @@ -2663,6 +2663,16 @@ export function isConstZero(expr: ExpressionRef): bool { return false; } +export function isConstNonZero(expr: ExpressionRef): bool { + if (getExpressionId(expr) != ExpressionId.Const) return false; + var type = getExpressionType(expr); + if (type == TypeRef.I32) return getConstValueI32(expr) != 0; + if (type == TypeRef.I64) return getConstValueI64Low(expr) != 0 || getConstValueI64High(expr) != 0; + if (type == TypeRef.F32) return getConstValueF32(expr) != 0; + if (type == TypeRef.F64) return getConstValueF64(expr) != 0; + return false; +} + export function getLocalGetIndex(expr: ExpressionRef): Index { return binaryen._BinaryenLocalGetGetIndex(expr); } From 1dadb87035e6886a2a1c37af9cff288c449d1511 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 15 Dec 2021 23:09:07 +0100 Subject: [PATCH 145/175] minor --- src/module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/module.ts b/src/module.ts index e63ddd0f77..83ad28e4f0 100644 --- a/src/module.ts +++ b/src/module.ts @@ -2657,7 +2657,7 @@ export function isConstZero(expr: ExpressionRef): bool { if (getExpressionId(expr) != ExpressionId.Const) return false; var type = getExpressionType(expr); if (type == TypeRef.I32) return getConstValueI32(expr) == 0; - if (type == TypeRef.I64) return getConstValueI64Low(expr) == 0 && getConstValueI64High(expr) == 0; + if (type == TypeRef.I64) return (getConstValueI64Low(expr) | getConstValueI64High(expr)) == 0; if (type == TypeRef.F32) return getConstValueF32(expr) == 0; if (type == TypeRef.F64) return getConstValueF64(expr) == 0; return false; @@ -2667,7 +2667,7 @@ export function isConstNonZero(expr: ExpressionRef): bool { if (getExpressionId(expr) != ExpressionId.Const) return false; var type = getExpressionType(expr); if (type == TypeRef.I32) return getConstValueI32(expr) != 0; - if (type == TypeRef.I64) return getConstValueI64Low(expr) != 0 || getConstValueI64High(expr) != 0; + if (type == TypeRef.I64) return (getConstValueI64Low(expr) | getConstValueI64High(expr)) != 0; if (type == TypeRef.F32) return getConstValueF32(expr) != 0; if (type == TypeRef.F64) return getConstValueF64(expr) != 0; return false; From 634e414e89527c97e57abc1972bcab0edb5b63d8 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 16 Dec 2021 12:27:51 +0100 Subject: [PATCH 146/175] preserve side effects in 'constant' type checks --- src/builtins.ts | 126 ++++--- src/module.ts | 15 +- tests/compiler/infer-array.optimized.wat | 407 +++++++++++++++++------ tests/compiler/infer-array.untouched.wat | 278 ++++++++++++++-- 4 files changed, 660 insertions(+), 166 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index c4a65cb35d..47ee2fe435 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -73,7 +73,8 @@ import { getConstValueF64, getLocalGetIndex, createType, - ExpressionRunnerFlags + ExpressionRunnerFlags, + mustPreserveSideEffects } from "./module"; import { @@ -744,10 +745,10 @@ export const function_builtins = new Map Express function builtin_isInteger(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var type = evaluateConstantType(ctx); + var type = checkConstantType(ctx); compiler.currentType = Type.bool; if (!type) return module.unreachable(); - return module.i32(type.isIntegerValue ? 1 : 0); + return reifyConstantType(ctx, module.i32(type.isIntegerValue ? 1 : 0)); } builtins.set(BuiltinNames.isInteger, builtin_isInteger); @@ -755,10 +756,10 @@ builtins.set(BuiltinNames.isInteger, builtin_isInteger); function builtin_isFloat(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var type = evaluateConstantType(ctx); + var type = checkConstantType(ctx); compiler.currentType = Type.bool; if (!type) return module.unreachable(); - return module.i32(type.isFloatValue ? 1 : 0); + return reifyConstantType(ctx, module.i32(type.isFloatValue ? 1 : 0)); } builtins.set(BuiltinNames.isFloat, builtin_isFloat); @@ -766,10 +767,10 @@ builtins.set(BuiltinNames.isFloat, builtin_isFloat); function builtin_isBoolean(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var type = evaluateConstantType(ctx); + var type = checkConstantType(ctx); compiler.currentType = Type.bool; if (!type) return module.unreachable(); - return module.i32(type.isBooleanValue ? 1 : 0); + return reifyConstantType(ctx, module.i32(type.isBooleanValue ? 1 : 0)); } builtins.set(BuiltinNames.isBoolean, builtin_isBoolean); @@ -777,10 +778,10 @@ builtins.set(BuiltinNames.isBoolean, builtin_isBoolean); function builtin_isSigned(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var type = evaluateConstantType(ctx); + var type = checkConstantType(ctx); compiler.currentType = Type.bool; if (!type) return module.unreachable(); - return module.i32(type.isSignedIntegerValue ? 1 : 0); + return reifyConstantType(ctx, module.i32(type.isSignedIntegerValue ? 1 : 0)); } builtins.set(BuiltinNames.isSigned, builtin_isSigned); @@ -788,10 +789,10 @@ builtins.set(BuiltinNames.isSigned, builtin_isSigned); function builtin_isReference(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var type = evaluateConstantType(ctx); + var type = checkConstantType(ctx); compiler.currentType = Type.bool; if (!type) return module.unreachable(); - return module.i32(type.isReference ? 1 : 0); + return reifyConstantType(ctx, module.i32(type.isReference ? 1 : 0)); } builtins.set(BuiltinNames.isReference, builtin_isReference); @@ -799,14 +800,16 @@ builtins.set(BuiltinNames.isReference, builtin_isReference); function builtin_isString(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var type = evaluateConstantType(ctx); + var type = checkConstantType(ctx); compiler.currentType = Type.bool; if (!type) return module.unreachable(); var classReference = type.getClass(); - return module.i32( - classReference && classReference.isAssignableTo(compiler.program.stringInstance) - ? 1 - : 0 + return reifyConstantType(ctx, + module.i32( + classReference && classReference.isAssignableTo(compiler.program.stringInstance) + ? 1 + : 0 + ) ); } builtins.set(BuiltinNames.isString, builtin_isString); @@ -815,14 +818,16 @@ builtins.set(BuiltinNames.isString, builtin_isString); function builtin_isArray(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var type = evaluateConstantType(ctx); + var type = checkConstantType(ctx); compiler.currentType = Type.bool; if (!type) return module.unreachable(); var classReference = type.getClass(); - return module.i32( - classReference && classReference.extends(compiler.program.arrayPrototype) - ? 1 - : 0 + return reifyConstantType(ctx, + module.i32( + classReference && classReference.extends(compiler.program.arrayPrototype) + ? 1 + : 0 + ) ); } builtins.set(BuiltinNames.isArray, builtin_isArray); @@ -831,14 +836,16 @@ builtins.set(BuiltinNames.isArray, builtin_isArray); function builtin_isArrayLike(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var type = evaluateConstantType(ctx); + var type = checkConstantType(ctx); compiler.currentType = Type.bool; if (!type) return module.unreachable(); var classReference = type.getClass(); - return module.i32( - classReference && classReference.isArrayLike - ? 1 - : 0 + return reifyConstantType(ctx, + module.i32( + classReference && classReference.isArrayLike + ? 1 + : 0 + ) ); } builtins.set(BuiltinNames.isArrayLike, builtin_isArrayLike); @@ -847,10 +854,10 @@ builtins.set(BuiltinNames.isArrayLike, builtin_isArrayLike); function builtin_isFunction(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var type = evaluateConstantType(ctx); + var type = checkConstantType(ctx); compiler.currentType = Type.bool; if (!type) return module.unreachable(); - return module.i32(type.isFunction ? 1 : 0); + return reifyConstantType(ctx, module.i32(type.isFunction ? 1 : 0)); } builtins.set(BuiltinNames.isFunction, builtin_isFunction); @@ -858,15 +865,19 @@ builtins.set(BuiltinNames.isFunction, builtin_isFunction); function builtin_isNullable(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var type = evaluateConstantType(ctx); + var type = checkConstantType(ctx); compiler.currentType = Type.bool; if (!type) return module.unreachable(); - return module.i32(type.isNullableReference ? 1 : 0); + return reifyConstantType(ctx, module.i32(type.isNullableReference ? 1 : 0)); } builtins.set(BuiltinNames.isNullable, builtin_isNullable); // isDefined(expression) -> bool function builtin_isDefined(ctx: BuiltinContext): ExpressionRef { + // Note that `isDefined` neither compiles nor evaluates the given expression + // but exclusively performs a check whether it can be compiled in theory. + // This is not exactly unsafe due to only seemingly having side effects which + // actually never happen, but may confuse tooling unaware of its semantics. var compiler = ctx.compiler; var module = compiler.module; compiler.currentType = Type.bool; @@ -895,7 +906,13 @@ function builtin_isConstant(ctx: BuiltinContext): ExpressionRef { ) return module.unreachable(); var expr = compiler.compileExpression(ctx.operands[0], Type.auto); compiler.currentType = Type.bool; - return module.i32(getExpressionId(expr) == ExpressionId.Const ? 1 : 0); + if (!mustPreserveSideEffects(expr, module.ref)) { + return module.i32(getExpressionId(expr) == ExpressionId.Const ? 1 : 0); + } + return module.block(null, [ + module.maybeDrop(expr), + module.i32(0) + ], getExpressionType(expr)); } builtins.set(BuiltinNames.isConstant, builtin_isConstant); @@ -903,10 +920,10 @@ builtins.set(BuiltinNames.isConstant, builtin_isConstant); function builtin_isManaged(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var type = evaluateConstantType(ctx); + var type = checkConstantType(ctx); compiler.currentType = Type.bool; if (!type) return module.unreachable(); - return module.i32(type.isManaged ? 1 : 0); + return reifyConstantType(ctx, module.i32(type.isManaged ? 1 : 0)); } builtins.set(BuiltinNames.isManaged, builtin_isManaged); @@ -914,10 +931,10 @@ builtins.set(BuiltinNames.isManaged, builtin_isManaged); function builtin_isVoid(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var type = evaluateConstantType(ctx); + var type = checkConstantType(ctx); compiler.currentType = Type.bool; if (!type) return module.unreachable(); - return module.i32(type.kind == TypeKind.VOID ? 1 : 0); + return reifyConstantType(ctx, module.i32(type.kind == TypeKind.VOID ? 1 : 0)); } builtins.set(BuiltinNames.isVoid, builtin_isVoid); @@ -925,7 +942,7 @@ builtins.set(BuiltinNames.isVoid, builtin_isVoid); function builtin_lengthof(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var type = evaluateConstantType(ctx); + var type = checkConstantType(ctx); compiler.currentType = Type.i32; if (!type) return module.unreachable(); var signatureReference = type.signatureReference; @@ -936,7 +953,7 @@ function builtin_lengthof(ctx: BuiltinContext): ExpressionRef { ); return module.unreachable(); } - return module.i32(signatureReference.parameterTypes.length); + return reifyConstantType(ctx, module.i32(signatureReference.parameterTypes.length)); } builtins.set(BuiltinNames.lengthof, builtin_lengthof); @@ -1044,7 +1061,7 @@ builtins.set(BuiltinNames.offsetof, builtin_offsetof); function builtin_nameof(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var resultType = evaluateConstantType(ctx); + var resultType = checkConstantType(ctx); if (!resultType) { compiler.currentType = compiler.program.stringInstance.type; return module.unreachable(); @@ -1061,7 +1078,7 @@ function builtin_nameof(ctx: BuiltinContext): ExpressionRef { } else { value = resultType.toString(); } - return compiler.ensureStaticString(value); + return reifyConstantType(ctx, compiler.ensureStaticString(value)); } builtins.set(BuiltinNames.nameof, builtin_nameof); @@ -1069,16 +1086,16 @@ builtins.set(BuiltinNames.nameof, builtin_nameof); function builtin_idof(ctx: BuiltinContext): ExpressionRef { var compiler = ctx.compiler; var module = compiler.module; - var type = evaluateConstantType(ctx); + var type = checkConstantType(ctx); compiler.currentType = Type.u32; if (!type) return module.unreachable(); let signatureReference = type.getSignature(); if (signatureReference) { - return module.i32(signatureReference.id); + return reifyConstantType(ctx, module.i32(signatureReference.id)); } let classReference = type.getClassOrWrapper(compiler.program); if (classReference && !classReference.hasDecorator(DecoratorFlags.UNMANAGED)) { - return module.i32(classReference.id); + return reifyConstantType(ctx, module.i32(classReference.id)); } compiler.error( DiagnosticCode.Operation_0_cannot_be_applied_to_type_1, @@ -3896,7 +3913,7 @@ function builtin_v128_shuffle(ctx: BuiltinContext): ExpressionRef { if (type.isValue) { let laneWidth = type.byteSize; let laneCount = 16 / laneWidth; - assert(isInteger(laneCount) && isPowerOf2(laneCount)); + assert(Number.isInteger(laneCount) && isPowerOf2(laneCount)); if ( checkArgsRequired(ctx, 2 + laneCount) ) { @@ -9837,11 +9854,14 @@ export function compileClassInstanceOf(compiler: Compiler, prototype: ClassProto // Helpers -/** Evaluates the constant type of a type argument *or* expression. */ -function evaluateConstantType(ctx: BuiltinContext): Type | null { +var checkConstantType_expr: ExpressionRef = 0; + +/** Checks the constant type of a type argument *or* expression. */ +function checkConstantType(ctx: BuiltinContext): Type | null { var compiler = ctx.compiler; var operands = ctx.operands; var typeArguments = ctx.typeArguments; + checkConstantType_expr = 0; if (operands.length == 0) { // requires type argument if (!typeArguments || typeArguments.length != 1) { compiler.error( @@ -9861,9 +9881,9 @@ function evaluateConstantType(ctx: BuiltinContext): Type | null { ); return null; } - compiler.compileExpression(operands[0], typeArguments[0], Constraints.CONV_IMPLICIT); + checkConstantType_expr = compiler.compileExpression(operands[0], typeArguments[0], Constraints.CONV_IMPLICIT); } else { - compiler.compileExpression(operands[0], Type.auto); + checkConstantType_expr = compiler.compileExpression(operands[0], Type.auto); } return compiler.currentType; } @@ -9880,6 +9900,18 @@ function evaluateConstantType(ctx: BuiltinContext): Type | null { return null; } +/** Reifies a constant type check potentially involving an expression. */ +function reifyConstantType(ctx: BuiltinContext, expr: ExpressionRef): ExpressionRef { + var module = ctx.compiler.module; + if (checkConstantType_expr && mustPreserveSideEffects(checkConstantType_expr, module.ref)) { + expr = module.block(null, [ + module.maybeDrop(checkConstantType_expr), + expr + ], getExpressionType(expr)); + } + return expr; +} + /** Evaluates a compile-time constant immediate offset argument.*/ function evaluateImmediateOffset(expression: Expression, compiler: Compiler): i32 { var module = compiler.module; diff --git a/src/module.ts b/src/module.ts index 83ad28e4f0..040b3c8845 100644 --- a/src/module.ts +++ b/src/module.ts @@ -1472,6 +1472,17 @@ export class Module { return binaryen._BinaryenDrop(this.ref, expression); } + /** Drops an expression if it evaluates to a value. */ + maybeDrop( + expression: ExpressionRef + ): ExpressionRef { + var type = binaryen._BinaryenExpressionGetType(expression); + if (type != TypeRef.None && type != TypeRef.Unreachable) { + return binaryen._BinaryenDrop(this.ref, expression); + } + return expression; + } + maybeDropCondition(condition: ExpressionRef, result: ExpressionRef): ExpressionRef { // FIXME: This is necessary because Binaryen's ExpressionRunner bails early // when encountering a local with an unknown value. This helper only drops @@ -3039,8 +3050,8 @@ export function getSideEffects(expr: ExpressionRef, module: ModuleRef): SideEffe return binaryen._BinaryenExpressionGetSideEffects(expr, module); } -export function hasSideEffects(expr: ExpressionRef, module: ModuleRef): bool { - return getSideEffects(expr, module) != SideEffects.None; +export function mustPreserveSideEffects(expr: ExpressionRef, module: ModuleRef): bool { + return (getSideEffects(expr, module) & ~(SideEffects.ReadsLocal | SideEffects.ReadsGlobal)) != SideEffects.None; } // helpers diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index 6f34e4d213..b9e609e6d0 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -1,10 +1,10 @@ (module - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -35,12 +35,12 @@ (data (i32.const 1468) ",") (data (i32.const 1480) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 1516) ",") - (data (i32.const 1532) "\18") - (data (i32.const 1542) "\f0?\00\00\00\00\00\00\00@\00\00\00\00\00\00\08@") - (data (i32.const 1564) "\1c") - (data (i32.const 1580) "\08\00\00\00\01\00\00\00\ff\ff\ff\ff") - (data (i32.const 1596) ",") - (data (i32.const 1608) "\01\00\00\00\1c\00\00\00i\00n\00f\00e\00r\00-\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1528) "\01\00\00\00\1c\00\00\00i\00n\00f\00e\00r\00-\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1564) ",") + (data (i32.const 1580) "\18") + (data (i32.const 1590) "\f0?\00\00\00\00\00\00\00@\00\00\00\00\00\00\08@") + (data (i32.const 1612) "\1c") + (data (i32.const 1628) "\08\00\00\00\01\00\00\00\ff\ff\ff\ff") (data (i32.const 1644) ",") (data (i32.const 1660) "\18") (data (i32.const 1670) "\f0?\00\00\00\00\00\00\00@\00\00\00\00\00\00\08@") @@ -1534,6 +1534,83 @@ memory.fill local.get $1 ) + (func $~lib/array/Array#__get (param $0 i32) + local.get $0 + i32.load offset=12 + i32.eqz + if + i32.const 1280 + i32.const 1488 + i32.const 114 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.load + drop + ) + (func $~lib/array/Array#__get (param $0 i32) + local.get $0 + i32.load offset=12 + i32.eqz + if + i32.const 1280 + i32.const 1488 + i32.const 114 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + f64.load + drop + ) + (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=12 + local.get $1 + i32.le_u + if + i32.const 1280 + i32.const 1488 + i32.const 114 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=12 + local.get $1 + i32.le_u + if + i32.const 1280 + i32.const 1488 + i32.const 114 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + drop + ) (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.load offset=4 @@ -1560,92 +1637,96 @@ i32.const 16 i32.sub global.set $~lib/memory/__stack_pointer - global.get $~lib/memory/__stack_pointer - i32.const 2212 - i32.lt_s - if - i32.const 18624 - i32.const 18672 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.tee $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - memory.size - i32.const 16 - i32.shl - i32.const 18596 - i32.sub - i32.const 1 - i32.shr_u - global.set $~lib/rt/itcms/threshold - i32.const 1204 - i32.const 1200 - i32.store - i32.const 1208 - i32.const 1200 - i32.store - i32.const 1200 - global.set $~lib/rt/itcms/pinSpace - i32.const 1236 - i32.const 1232 - i32.store - i32.const 1240 - i32.const 1232 - i32.store - i32.const 1232 - global.set $~lib/rt/itcms/toSpace - i32.const 1380 - i32.const 1376 - i32.store - i32.const 1384 - i32.const 1376 - i32.store - i32.const 1376 - global.set $~lib/rt/itcms/fromSpace - local.get $0 - i32.const 3 - i32.const 2 - i32.const 3 - i32.const 1056 - call $~lib/rt/__newArray - i32.store - global.get $~lib/memory/__stack_pointer - i32.const 3 - i32.const 3 - i32.const 4 - i32.const 1536 - call $~lib/rt/__newArray - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 2 - i32.const 2 - i32.const 5 - i32.const 1584 - call $~lib/rt/__newArray - local.tee $0 - i32.store block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 2212 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + local.tee $0 + i64.const 0 + i64.store local.get $0 - i32.load offset=12 + i64.const 0 + i64.store offset=8 + memory.size + i32.const 16 + i32.shl + i32.const 18596 + i32.sub i32.const 1 - i32.le_u - br_if $folding-inner0 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 1204 + i32.const 1200 + i32.store + i32.const 1208 + i32.const 1200 + i32.store + i32.const 1200 + global.set $~lib/rt/itcms/pinSpace + i32.const 1236 + i32.const 1232 + i32.store + i32.const 1240 + i32.const 1232 + i32.store + i32.const 1232 + global.set $~lib/rt/itcms/toSpace + i32.const 1380 + i32.const 1376 + i32.store + i32.const 1384 + i32.const 1376 + i32.store + i32.const 1376 + global.set $~lib/rt/itcms/fromSpace local.get $0 - i32.load offset=4 - i32.load offset=4 + i32.const 3 + i32.const 2 + i32.const 3 + i32.const 1056 + call $~lib/rt/__newArray + local.tee $0 + i32.store + local.get $0 + call $~lib/array/Array#__get + local.get $0 + call $~lib/array/Array#__get + global.get $~lib/memory/__stack_pointer + i32.const 3 + i32.const 3 + i32.const 4 + i32.const 1584 + call $~lib/rt/__newArray + local.tee $0 + i32.store offset=4 + local.get $0 + call $~lib/array/Array#__get + global.get $~lib/memory/__stack_pointer + i32.const 2 + i32.const 2 + i32.const 5 + i32.const 1632 + call $~lib/rt/__newArray + local.tee $0 + i32.store + local.get $0 + i32.const 0 + call $~lib/array/Array#__get + drop + local.get $0 + i32.const 0 + call $~lib/array/Array#__get + drop + local.get $0 + i32.const 1 + call $~lib/array/Array#__get i32.const -1 i32.ne if i32.const 0 - i32.const 1616 + i32.const 1536 i32.const 14 i32.const 3 call $~lib/builtins/abort @@ -1657,7 +1738,10 @@ i32.const 4 i32.const 1664 call $~lib/rt/__newArray + local.tee $0 i32.store offset=4 + local.get $0 + call $~lib/array/Array#__get global.get $~lib/memory/__stack_pointer i32.const 3 i32.const 2 @@ -1667,14 +1751,11 @@ local.tee $0 i32.store local.get $0 - i32.load offset=12 - i32.const 1 - i32.le_u - br_if $folding-inner0 + i32.const 0 + call $~lib/array/Array#__get local.get $0 - i32.load offset=4 - f32.load offset=4 - drop + i32.const 1 + call $~lib/array/Array#__get global.get $~lib/memory/__stack_pointer call $infer-array/Ref#constructor local.tee $0 @@ -1706,6 +1787,9 @@ call $~lib/array/Array#__uset local.get $3 i32.store offset=12 + local.get $3 + i32.const 0 + call $~lib/array/Array#__get global.get $~lib/memory/__stack_pointer call $infer-array/Ref#constructor local.tee $0 @@ -1737,6 +1821,9 @@ call $~lib/array/Array#__uset local.get $3 i32.store offset=8 + local.get $3 + i32.const 1 + call $~lib/array/Array#__get global.get $~lib/memory/__stack_pointer call $infer-array/Ref#constructor local.tee $0 @@ -1764,41 +1851,76 @@ call $~lib/array/Array#__uset local.get $2 i32.store offset=12 + local.get $2 + i32.const 0 + call $~lib/array/Array#__get global.get $~lib/memory/__stack_pointer i32.const 2 i32.const 2 i32.const 9 i32.const 1776 call $~lib/rt/__newArray + local.tee $0 i32.store offset=8 + local.get $0 + i32.const 0 + call $~lib/array/Array#__get global.get $~lib/memory/__stack_pointer i32.const 1 i32.const 2 i32.const 10 i32.const 1808 call $~lib/rt/__newArray + local.tee $0 i32.store offset=12 + local.get $0 + i32.const 0 + call $~lib/array/Array#__get + drop + local.get $0 + i32.const 0 + call $~lib/array/Array#__get + drop global.get $~lib/memory/__stack_pointer i32.const 2 i32.const 2 i32.const 10 i32.const 1840 call $~lib/rt/__newArray + local.tee $0 i32.store offset=4 + local.get $0 + i32.const 0 + call $~lib/array/Array#__get + drop + local.get $0 + i32.const 0 + call $~lib/array/Array#__get + drop global.get $~lib/memory/__stack_pointer i32.const 2 i32.const 2 i32.const 3 i32.const 1872 call $~lib/rt/__newArray + local.tee $0 i32.store offset=12 + local.get $0 + call $~lib/array/Array#__get + local.get $0 + call $~lib/array/Array#__get global.get $~lib/memory/__stack_pointer i32.const 2 i32.const 2 i32.const 3 i32.const 1904 call $~lib/rt/__newArray + local.tee $0 i32.store offset=8 + local.get $0 + call $~lib/array/Array#__get + local.get $0 + call $~lib/array/Array#__get global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer i32.const 2 @@ -1831,15 +1953,57 @@ local.get $1 i32.store offset=12 global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2212 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $1 + i32.load offset=12 + i32.eqz + if + i32.const 1280 + i32.const 1488 + i32.const 114 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.load offset=4 + i32.load + local.tee $0 + i32.store + local.get $0 + i32.eqz + if + i32.const 2000 + i32.const 1488 + i32.const 118 + i32.const 40 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer i32.const 16 i32.add global.set $~lib/memory/__stack_pointer return end - i32.const 1280 - i32.const 1488 - i32.const 114 - i32.const 42 + i32.const 18624 + i32.const 18672 + i32.const 1 + i32.const 1 call $~lib/builtins/abort unreachable ) @@ -2015,6 +2179,53 @@ global.set $~lib/memory/__stack_pointer local.get $0 ) + (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 2212 + i32.lt_s + if + i32.const 18624 + i32.const 18672 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + i32.load offset=12 + local.get $1 + i32.le_u + if + i32.const 1280 + i32.const 1488 + i32.const 114 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $2 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + i32.store + local.get $2 + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) (func $byn-split-outlined-A$~lib/rt/itcms/__visit (param $0 i32) global.get $~lib/rt/itcms/white local.get $0 diff --git a/tests/compiler/infer-array.untouched.wat b/tests/compiler/infer-array.untouched.wat index 23e6e1b337..600c821016 100644 --- a/tests/compiler/infer-array.untouched.wat +++ b/tests/compiler/infer-array.untouched.wat @@ -41,9 +41,9 @@ (data (i32.const 352) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 380) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 444) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") - (data (i32.const 492) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00@\00\00\00\00\00\00\08@\00\00\00\00") - (data (i32.const 540) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\01\00\00\00\ff\ff\ff\ff\00\00\00\00") - (data (i32.const 572) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00i\00n\00f\00e\00r\00-\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 492) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00i\00n\00f\00e\00r\00-\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 540) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00@\00\00\00\00\00\00\08@\00\00\00\00") + (data (i32.const 588) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\01\00\00\00\ff\ff\ff\ff\00\00\00\00") (data (i32.const 620) ",\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00@\00\00\00\00\00\00\08@\00\00\00\00") (data (i32.const 668) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\00\80?\00\00\00@\00\00@@") (data (i32.const 700) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a\00\00\00\00\00\00\00\00\00\00\00") @@ -2419,33 +2419,93 @@ call $~lib/rt/__newArray local.tee $1 i32.store - i32.const 1 + local.get $1 + i32.const 0 + call $~lib/array/Array#__get drop i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 3 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + call $~lib/array/Array#__get drop + i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 4 + i32.const 3 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer i32.const 3 i32.const 3 i32.const 4 - i32.const 512 + i32.const 560 call $~lib/rt/__newArray local.tee $0 i32.store offset=4 - i32.const 1 + local.get $0 + i32.const 0 + call $~lib/array/Array#__get drop + i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 8 + i32.const 3 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer i32.const 2 i32.const 2 i32.const 5 - i32.const 560 + i32.const 608 call $~lib/rt/__newArray local.tee $1 i32.store + local.get $1 + i32.const 0 + call $~lib/array/Array#__get + drop i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 12 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + call $~lib/array/Array#__get drop i32.const 0 i32.eqz - drop + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 13 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $1 i32.const 1 call $~lib/array/Array#__get @@ -2454,7 +2514,7 @@ i32.eqz if i32.const 0 - i32.const 592 + i32.const 512 i32.const 14 i32.const 3 call $~lib/builtins/abort @@ -2468,8 +2528,20 @@ call $~lib/rt/__newArray local.tee $0 i32.store offset=4 - i32.const 1 + local.get $0 + i32.const 0 + call $~lib/array/Array#__get drop + i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 18 + i32.const 3 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer i32.const 3 i32.const 2 @@ -2478,8 +2550,20 @@ call $~lib/rt/__newArray local.tee $1 i32.store - i32.const 1 + local.get $1 + i32.const 0 + call $~lib/array/Array#__get drop + i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 22 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $1 i32.const 1 call $~lib/array/Array#__get @@ -2519,8 +2603,20 @@ local.get $3 local.tee $4 i32.store offset=12 - i32.const 1 + local.get $4 + i32.const 0 + call $~lib/array/Array#__get drop + i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 30 + i32.const 3 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer i32.const 0 call $infer-array/Ref#constructor @@ -2556,8 +2652,20 @@ local.get $1 local.tee $3 i32.store offset=8 + local.get $3 i32.const 1 + call $~lib/array/Array#__get drop + i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 36 + i32.const 3 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer i32.const 0 call $infer-array/Ref#constructor @@ -2588,8 +2696,20 @@ local.get $0 local.tee $4 i32.store offset=12 - i32.const 1 + local.get $4 + i32.const 0 + call $~lib/array/Array#__get drop + i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 41 + i32.const 3 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer i32.const 2 i32.const 2 @@ -2598,8 +2718,20 @@ call $~lib/rt/__newArray local.tee $3 i32.store offset=8 - i32.const 1 + local.get $3 + i32.const 0 + call $~lib/array/Array<~lib/string/String|null>#__get drop + i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 45 + i32.const 3 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer i32.const 1 i32.const 2 @@ -2608,11 +2740,35 @@ call $~lib/rt/__newArray local.tee $4 i32.store offset=12 + local.get $4 + i32.const 0 + call $~lib/array/Array#__get + drop i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 49 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 0 + call $~lib/array/Array#__get drop i32.const 0 i32.eqz - drop + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 50 + i32.const 3 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer i32.const 2 i32.const 2 @@ -2621,11 +2777,35 @@ call $~lib/rt/__newArray local.tee $0 i32.store offset=4 + local.get $0 + i32.const 0 + call $~lib/array/Array#__get + drop i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 52 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + call $~lib/array/Array#__get drop i32.const 0 i32.eqz - drop + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 53 + i32.const 3 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer i32.const 2 i32.const 2 @@ -2634,11 +2814,35 @@ call $~lib/rt/__newArray local.tee $4 i32.store offset=12 + local.get $4 + i32.const 0 + call $~lib/array/Array#__get + drop i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 57 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 0 + call $~lib/array/Array#__get drop i32.const 0 i32.eqz - drop + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 58 + i32.const 3 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer i32.const 2 i32.const 2 @@ -2647,11 +2851,35 @@ call $~lib/rt/__newArray local.tee $3 i32.store offset=8 + local.get $3 + i32.const 0 + call $~lib/array/Array#__get + drop i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 60 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 0 + call $~lib/array/Array#__get drop i32.const 0 i32.eqz - drop + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 61 + i32.const 3 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer i32.const 2 @@ -2685,8 +2913,20 @@ local.get $3 local.tee $4 i32.store offset=12 - i32.const 1 + local.get $4 + i32.const 0 + call $~lib/array/Array<~lib/array/Array>#__get drop + i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 65 + i32.const 3 + call $~lib/builtins/abort + unreachable + end i32.const 0 i32.eqz drop From c6590de08c7c5a0435c00f113835cae143fadc44 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 16 Dec 2021 16:07:19 +0100 Subject: [PATCH 147/175] remove invalid comment --- std/assembly/util/string.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/assembly/util/string.ts b/std/assembly/util/string.ts index 8fad5f80e6..ae7e1e267c 100644 --- a/std/assembly/util/string.ts +++ b/std/assembly/util/string.ts @@ -1020,7 +1020,7 @@ export function joinStringArray(dataStart: usize, length: i32, separator: string export function joinReferenceArray(dataStart: usize, length: i32, separator: string): string { var lastIndex = length - 1; if (lastIndex < 0) return ""; - var value: T; // except string + var value: T; if (!lastIndex) { value = load(dataStart); // @ts-ignore: type From 9cc69620882c57b2a09f1b455b73b3d9c6b976c8 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 9 Jan 2022 03:29:03 +0100 Subject: [PATCH 148/175] initial bindings --- .eslintignore | 2 +- .eslintrc.cjs | 7 +- .gitattributes | 2 + .github/workflows/test.yml | 2 +- .gitignore | 2 +- bin/asinit.js | 8 +- cli/README.md | 2 +- cli/index.d.ts | 12 +- cli/index.js | 330 +- cli/options.json | 27 +- lib/loader/package.json | 4 +- package.json | 6 +- scripts/build-web.js | 5 +- scripts/build.js | 8 +- src/README.md | 6 +- src/asconfig.json | 34 +- src/ast.ts | 8 + src/bindings.ts | 491 +- src/bindings/js.ts | 1268 + src/bindings/tsd.ts | 363 + src/bindings/util.ts | 198 + src/compiler.ts | 287 +- src/diagnosticMessages.json | 3 +- src/diagnostics.ts | 2 +- src/extra/ast.ts | 102 +- src/index-js.ts | 21 +- src/index-wasm.ts | 351 + src/index.ts | 288 +- src/parser.ts | 2 +- src/program.ts | 33 +- src/tsconfig.json | 2 +- src/util/text.ts | 95 + std/assembly/bindings/dom.ts | 137 + std/assembly/builtins.ts | 2 + std/assembly/index.d.ts | 20 +- tests/allocators/default/package.json | 4 +- tests/allocators/stub/package.json | 4 +- tests/compiler.js | 43 +- tests/compiler/bigint-integration.js | 9 +- tests/compiler/bindings/esm.js | 70 + tests/compiler/bindings/esm.json | 10 + tests/compiler/bindings/esm.optimized.d.ts | 79 + tests/compiler/bindings/esm.optimized.js | 371 + tests/compiler/bindings/esm.optimized.wat | 3327 ++ tests/compiler/bindings/esm.ts | 135 + tests/compiler/bindings/esm.untouched.d.ts | 79 + tests/compiler/bindings/esm.untouched.js | 371 + tests/compiler/bindings/esm.untouched.wat | 4209 ++ tests/compiler/class-implements.optimized.wat | 302 +- tests/compiler/class-implements.ts | 4 +- tests/compiler/class-implements.untouched.wat | 86 +- tests/compiler/declare.js | 4 +- tests/compiler/duplicate-field-errors.ts | 6 +- tests/compiler/duplicate-fields.optimized.wat | 227 +- tests/compiler/duplicate-fields.ts | 6 +- tests/compiler/duplicate-fields.untouched.wat | 151 +- tests/compiler/export-generic.json | 17 - tests/compiler/export-generic.ts | 14 - tests/compiler/export.optimized.wat | 6 - tests/compiler/export.untouched.wat | 9 - tests/compiler/exportimport-table.js | 4 +- tests/compiler/exports-lazy.optimized.wat | 6 + tests/compiler/exports-lazy.untouched.wat | 13 +- tests/compiler/exports.optimized.wat | 1701 +- tests/compiler/exports.untouched.wat | 2590 +- .../exportstar-rereexport.optimized.wat | 25 - .../exportstar-rereexport.untouched.wat | 19 - tests/compiler/exportstar.optimized.wat | 6 - tests/compiler/exportstar.untouched.wat | 9 - .../compiler/extends-recursive.optimized.wat | 552 +- tests/compiler/extends-recursive.ts | 4 +- .../compiler/extends-recursive.untouched.wat | 105 +- tests/compiler/external.js | 4 +- tests/compiler/external.optimized.wat | 2 - tests/compiler/external.ts | 3 - tests/compiler/external.untouched.wat | 2 - tests/compiler/features/reference-types.js | 4 +- tests/compiler/heap.optimized.wat | 141 +- tests/compiler/heap.ts | 2 - tests/compiler/heap.untouched.wat | 24 +- tests/compiler/implicit-getter-setter.js | 34 - tests/compiler/implicit-getter-setter.json | 2 - .../implicit-getter-setter.optimized.wat | 1742 - tests/compiler/implicit-getter-setter.ts | 7 - .../implicit-getter-setter.untouched.wat | 2490 -- tests/compiler/mutable-globals.js | 8 +- tests/compiler/package.json | 3 - tests/compiler/reexport.optimized.wat | 552 +- tests/compiler/reexport.untouched.wat | 445 +- tests/compiler/rereexport.optimized.wat | 25 - tests/compiler/rereexport.untouched.wat | 21 +- tests/compiler/resolve-nested.optimized.wat | 1643 +- tests/compiler/resolve-nested.ts | 2 +- tests/compiler/resolve-nested.untouched.wat | 2473 +- tests/compiler/std/array.optimized.wat | 16319 ++----- tests/compiler/std/array.ts | 8 - tests/compiler/std/array.untouched.wat | 35567 ++++++---------- tests/compiler/std/math.js | 4 +- tests/compiler/std/mod.js | 4 +- tests/compiler/std/string-casemapping.js | 4 +- tests/compiler/tsconfig.json | 4 +- tests/compiler/unmanaged-errors.ts | 10 +- tests/compiler/wasi/abort.js | 8 +- tests/compiler/wasi/seed.js | 12 +- tests/compiler/wasi/trace.js | 8 +- util/browser/url.js | 23 + 106 files changed, 30446 insertions(+), 49861 deletions(-) create mode 100644 src/bindings/js.ts create mode 100644 src/bindings/tsd.ts create mode 100644 src/bindings/util.ts create mode 100644 src/index-wasm.ts create mode 100644 std/assembly/bindings/dom.ts create mode 100644 tests/compiler/bindings/esm.js create mode 100644 tests/compiler/bindings/esm.json create mode 100644 tests/compiler/bindings/esm.optimized.d.ts create mode 100644 tests/compiler/bindings/esm.optimized.js create mode 100644 tests/compiler/bindings/esm.optimized.wat create mode 100644 tests/compiler/bindings/esm.ts create mode 100644 tests/compiler/bindings/esm.untouched.d.ts create mode 100644 tests/compiler/bindings/esm.untouched.js create mode 100644 tests/compiler/bindings/esm.untouched.wat delete mode 100644 tests/compiler/export-generic.json delete mode 100644 tests/compiler/export-generic.ts delete mode 100644 tests/compiler/implicit-getter-setter.js delete mode 100644 tests/compiler/implicit-getter-setter.json delete mode 100644 tests/compiler/implicit-getter-setter.optimized.wat delete mode 100644 tests/compiler/implicit-getter-setter.ts delete mode 100644 tests/compiler/implicit-getter-setter.untouched.wat delete mode 100644 tests/compiler/package.json diff --git a/.eslintignore b/.eslintignore index 369f3beb9f..bb97247b6a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,7 +1,7 @@ dist/ lib/binaryen.js lib/parse/index.js -out/ +build/ raw/ tests/parser/ diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 18892f0cce..3ba62e3992 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -19,7 +19,12 @@ module.exports = { globals: { "globalThis": "readonly", "BigInt64Array": "readonly", - "BigUint64Array": "readonly" + "BigUint64Array": "readonly", + "WebAssembly": "readonly", + "FinalizationRegistry": "readonly", + "fetch": "readonly", + "URL": "readonly", + "console": "readonly" }, // === General rules ========================================================= diff --git a/.gitattributes b/.gitattributes index 4f55c2c550..219d8546ed 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,5 @@ bin/* text eol=lf dist/* binary scripts/*.sh eol=lf tests/compiler/std/string-encoding.ts eol=lf +src/bindings/js.ts eol=lf +src/bindings/tsd.ts eol=lf diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78ea139082..c70c8e2678 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,7 +60,7 @@ jobs: - name: Bootstrap run: npm run bootstrap:${{ matrix.target }} - name: Test - run: npm run test:compiler -- --wasm out/assemblyscript.${{ matrix.target }}-bootstrap.wasm + run: npm run test:compiler -- --wasm build/assemblyscript.${{ matrix.target }}-bootstrap.js features: name: "Features" runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index aa04eaa0bd..0f82274e83 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ node_modules/ *debug.* dist/ -out/ +build/ raw/ .history *.backup diff --git a/bin/asinit.js b/bin/asinit.js index fdbdc1a7ca..df4676e593 100644 --- a/bin/asinit.js +++ b/bin/asinit.js @@ -275,15 +275,15 @@ function ensureAsconfigJson() { fs.writeFileSync(asconfigFile, JSON.stringify({ targets: { debug: { - // -b build/untouched.wasm -t build/untouched.wat --sourceMap --debug - binaryFile: "build/untouched.wasm", + // -o build/untouched.wasm -t build/untouched.wat --sourceMap --debug + outFile: "build/untouched.wasm", textFile: "build/untouched.wat", sourceMap: true, debug: true }, release: { - // -b build/optimized.wasm -t build/optimized.wat --sourceMap --optimize - binaryFile: "build/optimized.wasm", + // -o build/optimized.wasm -t build/optimized.wat --sourceMap --optimize + outFile: "build/optimized.wasm", textFile: "build/optimized.wat", sourceMap: true, optimizeLevel: 3, diff --git a/cli/README.md b/cli/README.md index cabb06c762..9e048005e3 100644 --- a/cli/README.md +++ b/cli/README.md @@ -20,7 +20,7 @@ import asc from "assemblyscript/asc"; const { error, stdout } = await asc.main([ "myModule.ts", - "--binaryFile", "myModule.wasm", + "--outFile", "myModule.wasm", "--optimize", "--sourceMap", "--stats" diff --git a/cli/index.d.ts b/cli/index.d.ts index adcbf26b97..c2666db31f 100644 --- a/cli/index.d.ts +++ b/cli/index.d.ts @@ -92,14 +92,12 @@ export interface CompilerOptions { converge?: boolean; /** Specifies the base directory of input and output files. */ baseDir?: string; - /** Specifies the output file. File extension indicates format. */ + /** Specifies the WebAssembly output file (.wasm). */ outFile?: string; - /** Specifies the binary output file (.wasm). */ - binaryFile?: string; - /** Specifies the text output file (.wat). */ + /** Specifies the WebAssembly text output file (.wat). */ textFile?: string; - /** Specifies the TypeScript definition output file (.d.ts). */ - tsdFile?: string; + /** Specified the bindings to generate. */ + bindings?: string[]; /** Enables source map generation. Optionally takes the URL. */ sourceMap?: boolean | string; /** Specifies the runtime variant to include in the program. */ @@ -200,7 +198,7 @@ export function compileString(sources: { [key: string]: string } | string, optio }>; /** Checks diagnostics emitted so far for errors. */ -export function checkDiagnostics(emitter: Record, stderr?: OutputStream, reportDiagnostic?: DiagnosticReporter): boolean; +export function checkDiagnostics(emitter: Record, stderr?: OutputStream, reportDiagnostic?: DiagnosticReporter, useColors?: boolean): boolean; /** Statistics for the current task. */ export class Stats { diff --git a/cli/index.js b/cli/index.js index 725a5a2f52..d41354c3c9 100644 --- a/cli/index.js +++ b/cli/index.js @@ -28,61 +28,23 @@ */ import { fs, module, path, process, url } from "../util/node.js"; -import { fetch } from "../util/web.js"; -import { Colors} from "../util/terminal.js"; +import { Colors } from "../util/terminal.js"; import { utf8 } from "../util/text.js"; import * as optionsUtil from "../util/options.js"; import * as generated from "./index.generated.js"; import binaryen from "../lib/binaryen.js"; -import assemblyscriptJS from "assemblyscript"; -import loader from "../lib/loader/index.js"; -import rtrace from "../lib/rtrace/index.js"; +import * as assemblyscriptJS from "assemblyscript"; // Use the TS->JS variant by default var assemblyscript = assemblyscriptJS; -var __newString = str => str; -var __getString = ptr => ptr; -var __pin = ptr => ptr; -var __unpin = _ => undefined; -var __collect = _ => undefined; // Use the AS->Wasm variant as an option (experimental) const wasmPos = process.argv.indexOf("--wasm"); if (~wasmPos) { - const binaryPath = String(process.argv[wasmPos + 1]); + const wasmPath = String(process.argv[wasmPos + 1]); process.argv.splice(wasmPos, 2); - const rtraceInstance = new rtrace.Rtrace({ - onerror(err, info) { - console.log(err, info); - }, - getMemory() { - return exports.memory; - }, - oncollect() { - var gcProfile = rtrace.gcProfile; - if (gcProfile && gcProfile.length && fs.writeFileSync) { - let timestamp = Date.now(); - fs.writeFileSync( - `rtrace-gc-profile-${timestamp}.json`, - JSON.stringify(gcProfile) - ); - fs.writeFileSync( - `rtrace-gc-profile-${timestamp}.csv`, - `time,memory,pause\n${gcProfile.join("\n")}` - ); - } - } - }); - const { exports } = await loader.instantiate(await (await fetch(binaryPath)).arrayBuffer(), rtraceInstance.install({ binaryen })); - assemblyscript = exports; - ({ __newString, - __getString, - __pin, - __unpin, - __collect - } = assemblyscript); - if (assemblyscript._initialize) assemblyscript._initialize(); + assemblyscript = await import(new URL(wasmPath, url.pathToFileURL(process.cwd() + "/"))); } const require = module.createRequire(import.meta.url); @@ -101,12 +63,12 @@ function toUpperSnakeCase(str) { } /** Ensures that an object is a wrapper class instead of just a pointer. */ -function __wrap(ptrOrObj, wrapperClass) { - if (typeof ptrOrObj === "number") { - return ptrOrObj === 0 ? null : wrapperClass.wrap(ptrOrObj); - } - return ptrOrObj; -} +// function __wrap(ptrOrObj, wrapperClass) { +// if (typeof ptrOrObj === "number") { +// return ptrOrObj === 0 ? null : wrapperClass.wrap(ptrOrObj); +// } +// return ptrOrObj; +// } /** AssemblyScript version. */ export const version = generated.version; @@ -150,7 +112,7 @@ export function configToArguments(options, argv = []) { export async function compileString(sources, config = {}) { if (typeof sources === "string") sources = { [`input${extension}`]: sources }; var argv = [ - "--binaryFile", "binary", + "--outFile", "binary", "--textFile", "text", ]; configToArguments(config, argv); @@ -217,13 +179,14 @@ export async function main(argv, options) { } var module = null; + var binaryenModule = null; // Prepares the result object var prepareResult = (error, result = {}) => { if (error) { stderr.write(`${stderrColors.red("FAILURE ")}${error.stack.replace(/^ERROR: /i, "")}${EOL}`); } - if (module) module.dispose(); + if (binaryenModule) binaryenModule.dispose(); if (!stats.total) stats.total = stats.end(statsBegin); return Object.assign({ error, stdout, stderr, stats }, result); }; @@ -254,8 +217,8 @@ export async function main(argv, options) { "", colors.white("EXAMPLES"), " " + colors.cyan("asc") + " hello" + extension, - " " + colors.cyan("asc") + " hello" + extension + " -b hello.wasm -t hello.wat", - " " + colors.cyan("asc") + " hello1" + extension + " hello2" + extension + " -b -O > hello.wasm", + " " + colors.cyan("asc") + " hello" + extension + " -o hello.wasm -t hello.wat", + " " + colors.cyan("asc") + " hello1" + extension + " hello2" + extension + " -o -O > hello.wasm", " " + colors.cyan("asc") + " --config asconfig.json --target release", "", colors.white("OPTIONS"), @@ -329,7 +292,7 @@ export async function main(argv, options) { // Set up options var program, runtime; - const compilerOptions = __pin(assemblyscript.newOptions()); + const compilerOptions = assemblyscript.newOptions(); switch (opts.runtime) { case "stub": runtime = 0; break; case "minimal": runtime = 1; break; @@ -346,7 +309,7 @@ export async function main(argv, options) { assemblyscript.setSharedMemory(compilerOptions, opts.sharedMemory); assemblyscript.setImportTable(compilerOptions, opts.importTable); assemblyscript.setExportTable(compilerOptions, opts.exportTable); - assemblyscript.setExportStart(compilerOptions, __newString(typeof opts.exportStart === "string" ? opts.exportStart : null)); + assemblyscript.setExportStart(compilerOptions, typeof opts.exportStart === "string" ? opts.exportStart : null); assemblyscript.setMemoryBase(compilerOptions, opts.memoryBase >>> 0); assemblyscript.setTableBase(compilerOptions, opts.tableBase >>> 0); assemblyscript.setSourceMap(compilerOptions, opts.sourceMap != null); @@ -361,14 +324,14 @@ export async function main(argv, options) { assemblyscript.setStackSize(compilerOptions, opts.stackSize); // Instrument callback to perform GC - prepareResult = (original => { - return function gcBeforePrepareResult(err) { - __unpin(compilerOptions); - if (program) __unpin(program); - __collect(); - return original(err); - }; - })(prepareResult); + // prepareResult = (original => { + // return function gcBeforePrepareResult(err) { + // __unpin(compilerOptions); + // if (program) __unpin(program); + // __collect(); + // return original(err); + // }; + // })(prepareResult); // Add or override aliases if specified if (opts.use) { @@ -382,12 +345,7 @@ export async function main(argv, options) { if (!alias.length) { return prepareResult(Error(`Global alias '${part}' is invalid.`)); } - { - let aliasPtr = __pin(__newString(alias)); - let namePtr = __newString(name); - assemblyscript.setGlobalAlias(compilerOptions, aliasPtr, namePtr); - __unpin(aliasPtr); - } + assemblyscript.addGlobalAlias(compilerOptions, alias, name); } } @@ -428,7 +386,7 @@ export async function main(argv, options) { assemblyscript.setOptimizeLevelHints(compilerOptions, optimizeLevel, shrinkLevel); // Initialize the program - program = __pin(assemblyscript.newProgram(compilerOptions)); + program = assemblyscript.newProgram(compilerOptions); // Collect transforms *constructors* from the `--transform` CLI flag as well // as the `transform` option into the `transforms` array. @@ -444,7 +402,7 @@ export async function main(argv, options) { let filename = transformArgs[i].trim(); let resolved; let transform; - if (require.resolve && url.pathToFileURL) { + if (require.resolve) { try { resolved = require.resolve(filename, { paths: [process.cwd(), baseDir] }); transform = await import(url.pathToFileURL(resolved)); @@ -514,10 +472,7 @@ export async function main(argv, options) { if (libPath.includes("/")) return; // in sub-directory: imported on demand let begin = stats.begin(); stats.parseCount++; - let textPtr = __pin(__newString(libraryFiles[libPath])); - let pathPtr = __newString(libraryPrefix + libPath + extension); - assemblyscript.parse(program, textPtr, pathPtr, false); - __unpin(textPtr); + assemblyscript.parse(program, libraryFiles[libPath], libraryPrefix + libPath + extension, false); stats.parseTime += stats.end(begin); }); let customLibDirs = []; @@ -543,10 +498,7 @@ export async function main(argv, options) { libraryFiles[libPath.replace(extension_re, "")] = libText; let begin = stats.begin(); stats.parseCount++; - let textPtr = __pin(__newString(libText)); - let pathPtr = __newString(libraryPrefix + libPath); - assemblyscript.parse(program, textPtr, pathPtr, false); - __unpin(textPtr); + assemblyscript.parse(program, libText, libraryPrefix + libPath, false); stats.parseTime += stats.end(begin); } } @@ -632,10 +584,11 @@ export async function main(argv, options) { // Gets all pending imported files from the the backlog function getBacklog(paths = []) { - var internalPath; - while ((internalPath = __getString(assemblyscript.nextFile(program)))) { + do { + let internalPath = assemblyscript.nextFile(program); + if (internalPath == null) break; paths.push(internalPath); - } + } while (true); return paths; } @@ -645,7 +598,7 @@ export async function main(argv, options) { while ((backlog = getBacklog()).length) { let files = []; for (let internalPath of backlog) { - const dependee = __getString(assemblyscript.getDependee(program, __newString(internalPath))); + const dependee = assemblyscript.getDependee(program, internalPath); files.push(getFile(internalPath, dependee)); // queue } files = await Promise.all(files); // parallel @@ -655,19 +608,14 @@ export async function main(argv, options) { const begin = stats.begin(); stats.parseCount++; if (file) { - const textPtr = __pin(__newString(file.sourceText)); - const pathPtr = __newString(file.sourcePath); - assemblyscript.parse(program, textPtr, pathPtr, false); - __unpin(textPtr); + assemblyscript.parse(program, file.sourceText, file.sourcePath, false); } else { - const textPtr = __newString(null); // no need to pin - const pathPtr = __newString(internalPath + extension); - assemblyscript.parse(program, textPtr, pathPtr, false); + assemblyscript.parse(program, null, internalPath + extension, false); } stats.parseTime += stats.end(begin); } } - const numErrors = checkDiagnostics(program, stderr, options.reportDiagnostic); + const numErrors = checkDiagnostics(program, stderr, options.reportDiagnostic, stderrColors.enabled); if (numErrors) { const err = Error(`${numErrors} parse error(s)`); err.stack = err.message; // omit stack @@ -689,10 +637,7 @@ export async function main(argv, options) { } let begin = stats.begin(); stats.parseCount++; - let textPtr = __pin(__newString(runtimeText)); - let pathPtr = __newString(runtimePath + extension); - assemblyscript.parse(program, textPtr, pathPtr, true); - __unpin(textPtr); + assemblyscript.parse(program, runtimeText, runtimePath + extension, true); stats.parseTime += stats.end(begin); } @@ -722,10 +667,7 @@ export async function main(argv, options) { let begin = stats.begin(); stats.parseCount++; - let textPtr = __pin(__newString(sourceText)); - let pathPtr = __newString(sourcePath); - assemblyscript.parse(program, textPtr, pathPtr, true); - __unpin(textPtr); + assemblyscript.parse(program, sourceText, sourcePath, true); stats.parseTime += stats.end(begin); } @@ -774,24 +716,15 @@ export async function main(argv, options) { } catch (e) { crash("compile", e); } - // From here on we are going to use Binaryen.js, except that we keep pass - // order as defined in the compiler. - if (typeof module === "number") { // Wasm - const original = assemblyscript.Module.wrap(module); - module = binaryen.wrapModule(original.ref); - module.optimize = function(...args) { - original.optimize(...args); - }; - } else { // JS - const original = module; - module = binaryen.wrapModule(module.ref); - module.optimize = function(...args) { - original.optimize(...args); - }; - } stats.compileTime += stats.end(begin); } - var numErrors = checkDiagnostics(program, stderr, options.reportDiagnostic); + // From here on we are going to use Binaryen.js + binaryenModule = binaryen.wrapModule( + typeof module === "number" || module instanceof Number + ? assemblyscript.getBinaryenModuleRef(module) + : module.ref + ); + var numErrors = checkDiagnostics(program, stderr, options.reportDiagnostic, stderrColors.enabled); if (numErrors) { const err = Error(`${numErrors} compile error(s)`); err.stack = err.message; // omit stack @@ -800,11 +733,11 @@ export async function main(argv, options) { // Call afterCompile transform hook { - let error = await applyTransform("afterCompile", module); + let error = await applyTransform("afterCompile", binaryenModule); if (error) return prepareResult(error); } - numErrors = checkDiagnostics(program, stderr, options.reportDiagnostic); + numErrors = checkDiagnostics(program, stderr, options.reportDiagnostic, stderrColors.enabled); if (numErrors) { const err = Error(`${numErrors} afterCompile error(s)`); err.stack = err.message; // omit stack @@ -815,7 +748,7 @@ export async function main(argv, options) { if (!opts.noValidate) { let begin = stats.begin(); stats.validateCount++; - let isValid = module.validate(); + let isValid = assemblyscript.validate(module); stats.validateTime += stats.end(begin); if (!isValid) { return prepareResult(Error("validate error")); @@ -826,7 +759,7 @@ export async function main(argv, options) { if (opts.trapMode === "clamp" || opts.trapMode === "js") { let begin = stats.begin(); try { - module.runPasses([`trap-mode-${opts.trapMode}`]); + binaryenModule.runPasses([`trap-mode-${opts.trapMode}`]); } catch (e) { crash("runPasses", e); } @@ -860,12 +793,12 @@ export async function main(argv, options) { let begin = stats.begin(); try { stats.optimizeCount++; - module.optimize(optimizeLevel, shrinkLevel, debugInfo, zeroFilledMemory); + assemblyscript.optimize(module, optimizeLevel, shrinkLevel, debugInfo, zeroFilledMemory); } catch (e) { crash("optimize", e); } try { - module.runPasses(runPasses); + binaryenModule.runPasses(runPasses); } catch (e) { crash("runPasses", e); } @@ -874,7 +807,7 @@ export async function main(argv, options) { try { let begin = stats.begin(); stats.emitCount++; - last = module.emitBinary(); + last = binaryenModule.emitBinary(); stats.emitTime += stats.end(begin); } catch (e) { crash("emitBinary (converge)", e); @@ -882,12 +815,12 @@ export async function main(argv, options) { do { try { stats.optimizeCount++; - module.optimize(optimizeLevel, shrinkLevel, debugInfo, zeroFilledMemory); + assemblyscript.optimize(module, optimizeLevel, shrinkLevel, debugInfo, zeroFilledMemory); } catch (e) { crash("optimize (converge)", e); } try { - module.runPasses(runPasses); + binaryenModule.runPasses(runPasses); } catch (e) { crash("runPasses (converge)", e); } @@ -895,7 +828,7 @@ export async function main(argv, options) { try { let begin = stats.begin(); stats.emitCount++; - next = module.emitBinary(); + next = binaryenModule.emitBinary(); stats.emitTime += stats.end(begin); } catch (e) { crash("emitBinary (converge)", e); @@ -916,41 +849,42 @@ export async function main(argv, options) { // Prepare output if (!opts.noEmit) { - if (opts.outFile != null) { - if (opts.textFile == null && /\.was?t$/.test(opts.outFile)) { - opts.textFile = opts.outFile; - } else if (opts.binaryFile == null) { - opts.binaryFile = opts.outFile; - } - } - + let bindings = opts.bindings || []; let hasStdout = false; - let hasOutput = opts.textFile != null - || opts.binaryFile != null - || opts.tsdFile != null; + let hasOutFile = opts.outFile != null; + let hasTextFile = opts.textFile != null; + let hasOutput = hasOutFile || hasTextFile; + let hasFileOutput = (hasOutFile && opts.outFile.length > 0) || (hasTextFile && opts.textFile.length > 0); + let basepath = hasFileOutput + ? (opts.outFile || opts.textFile).replace(/\.\w+$/, "") + : null; + let basename = hasFileOutput + ? path.basename(basepath) + : null; + + assemblyscript.setBasenameHint(compilerOptions, basename); // Write binary - if (opts.binaryFile != null) { - let basename = path.basename(opts.binaryFile); + if (opts.outFile != null) { let sourceMapURL = opts.sourceMap != null ? opts.sourceMap.length ? opts.sourceMap - : `./${basename}.map` + : `./${basename}.wasm.map` : null; let begin = stats.begin(); stats.emitCount++; let wasm; try { - wasm = module.emitBinary(sourceMapURL); + wasm = binaryenModule.emitBinary(sourceMapURL); } catch (e) { crash("emitBinary", e); } stats.emitTime += stats.end(begin); - if (opts.binaryFile.length) { + if (opts.outFile.length) { pending.push( - writeFile(opts.binaryFile, wasm.binary, baseDir) + writeFile(opts.outFile, wasm.binary, baseDir) ); } else { hasStdout = true; @@ -959,25 +893,25 @@ export async function main(argv, options) { // Post-process source map if (wasm.sourceMap != "") { - if (opts.binaryFile.length) { + if (opts.outFile.length) { let map = JSON.parse(wasm.sourceMap); map.sourceRoot = `./${basename}`; let contents = []; for (let i = 0, k = map.sources.length; i < k; ++i) { let name = map.sources[i]; - let text = assemblyscript.getSource(program, __newString(name.replace(extension_re, ""))); + let text = assemblyscript.getSource(program, name.replace(extension_re, "")); if (text == null) return prepareResult(Error(`Source of file '${name}' not found.`)); contents[i] = text; } map.sourcesContent = contents; pending.push( writeFile(path.join( - path.dirname(opts.binaryFile), + path.dirname(opts.outFile), path.basename(sourceMapURL) ).replace(/^\.\//, ""), JSON.stringify(map), baseDir) ); } else { - stderr.write(`Skipped source map (stdout already occupied)${EOL}`); + stderr.write(`Skipped source map (no output path)${EOL}`); } } } @@ -991,8 +925,8 @@ export async function main(argv, options) { // use superset text format when extension is `.wast`. // Otherwise use official stack IR format (wat). out = opts.textFile?.endsWith(".wast") - ? module.emitText() - : module.emitStackIR(true); + ? binaryenModule.emitText() + : binaryenModule.emitStackIR(true); } catch (e) { crash("emitText", e); } @@ -1009,23 +943,44 @@ export async function main(argv, options) { } // Write TypeScript definition - if (opts.tsdFile != null) { - let begin = stats.begin(); - stats.emitCount++; - let tsd; - try { - tsd = assemblyscript.buildTSD(program); - } catch (e) { - crash("buildTSD", e); + const bindingsEsm = bindings.includes("esm"); + const bindingsRaw = !bindingsEsm && bindings.includes("raw"); + if (bindingsEsm || bindingsRaw) { + if (basepath) { + let begin = stats.begin(); + stats.emitCount++; + let source; + try { + source = assemblyscript.buildTSD(program, bindingsEsm); + } catch (e) { + crash("buildTSD", e); + } + stats.emitTime += stats.end(begin); + pending.push( + writeFile(basepath + ".d.ts", source, baseDir) + ); + } else { + stderr.write(`Skipped TypeScript binding (no output path)${EOL}`); } - stats.emitTime += stats.end(begin); - if (opts.tsdFile.length) { + } + + // Write JavaScript bindings + if (bindingsEsm || bindingsRaw) { + if (basepath) { + let begin = stats.begin(); + stats.emitCount++; + let source; + try { + source = assemblyscript.buildJS(program, bindingsEsm); + } catch (e) { + crash("buildJS", e); + } + stats.emitTime += stats.end(begin); pending.push( - writeFile(opts.tsdFile, __getString(tsd), baseDir) + writeFile(basepath + ".js", source, baseDir) ); - } else if (!hasStdout) { - hasStdout = true; - writeStdout(__getString(tsd)); + } else { + stderr.write(`Skipped JavaScript binding (no output path)${EOL}`); } } } @@ -1162,47 +1117,40 @@ async function getConfig(file, baseDir, readFile) { } /** Checks diagnostics emitted so far for errors. */ -export function checkDiagnostics(program, stderr, reportDiagnostic) { +export function checkDiagnostics(program, stderr, reportDiagnostic, useColors) { + if (typeof useColors === "undefined" && stderr) useColors = stderr.isTTY; var numErrors = 0; do { - let diagnosticPtr = assemblyscript.nextDiagnostic(program); - if (!diagnosticPtr) break; - __pin(diagnosticPtr); + let diagnostic = assemblyscript.nextDiagnostic(program); + if (!diagnostic) break; if (stderr) { stderr.write( - __getString(assemblyscript.formatDiagnostic(diagnosticPtr, stderr.isTTY, true)) + + assemblyscript.formatDiagnostic(diagnostic, useColors, true) + EOL + EOL ); } if (reportDiagnostic) { - const diagnostic = __wrap(diagnosticPtr, assemblyscript.DiagnosticMessage); - const range = __wrap(diagnostic.range, assemblyscript.Range); - const relatedRange = __wrap(diagnostic.relatedRange, assemblyscript.Range); - const rangeSource = range ? __wrap(range.source, assemblyscript.Source) : null; - const relatedRangeSource = relatedRange ? __wrap(relatedRange.source, assemblyscript.Source) : null; - + function wrapRange(range) { + return range && { + start: assemblyscript.getRangeStart(range), + end: assemblyscript.getRangeEnd(range), + source: wrapSource(assemblyscript.getRangeSource(range)) + } || null; + } + function wrapSource(source) { + return source && { + normalizedPath: assemblyscript.getSourceNormalizedPath(source) + } || null; + } reportDiagnostic({ - message: __getString(diagnostic.message), - code: diagnostic.code, - category: diagnostic.category, - range: range ? { - start: range.start, - end: range.end, - source: rangeSource ? { - normalizedPath: __getString(rangeSource.normalizedPath) - } : null, - } : null, - relatedRange: relatedRange ? { - start: relatedRange.start, - end: relatedRange.end, - source: relatedRangeSource ? { - normalizedPath: __getString(relatedRangeSource.normalizedPath) - } : null - } : null + message: assemblyscript.getDiagnosticMessage(diagnostic), + code: assemblyscript.getDiagnosticCode(diagnostic), + category: assemblyscript.getDiagnosticCategory(diagnostic), + range: wrapRange(assemblyscript.getDiagnosticRange(diagnostic)), + relatedRange: wrapRange(assemblyscript.getDiagnosticRelatedRange(diagnostic)) }); } - if (assemblyscript.isError(diagnosticPtr)) ++numErrors; - __unpin(diagnosticPtr); + if (assemblyscript.isError(diagnostic)) ++numErrors; } while (true); return numErrors; } diff --git a/cli/options.json b/cli/options.json index 09492d35b3..f60ce2c00b 100644 --- a/cli/options.json +++ b/cli/options.json @@ -64,31 +64,30 @@ "outFile": { "category": "Output", - "description": "Specifies the output file. File extension indicates format.", + "description": "Specifies the WebAssembly output file (.wasm).", "type": "s", "alias": "o", "isPath": true }, - "binaryFile": { - "category": "Output", - "description": "Specifies the binary output file (.wasm).", - "type": "s", - "alias": "b", - "isPath": true - }, "textFile": { "category": "Output", - "description": "Specifies the text output file (.wat).", + "description": "Specifies the WebAssembly text output file (.wat).", "type": "s", "alias": "t", "isPath": true }, - "tsdFile": { + "bindings": { "category": "Output", - "description": "Specifies the TypeScript definition output file (.d.ts).", - "type": "s", - "alias": "d", - "isPath": true + "description": [ + "Specifies the bindings to generate (.js + .d.ts).", + "", + " esm JavaScript bindings & typings for ESM integration.", + " raw Like esm, but exports just the instantiate function.", + " Useful where modules are meant to be instantiated", + " multiple times or non-ESM imports must be provided." + ], + "type": "S", + "alias": "b" }, "sourceMap": { diff --git a/lib/loader/package.json b/lib/loader/package.json index 8b9a69518f..2cd178daad 100644 --- a/lib/loader/package.json +++ b/lib/loader/package.json @@ -33,8 +33,8 @@ }, "scripts": { "asbuild": "npm run asbuild:default && npm run asbuild:legacy", - "asbuild:default": "node ../../bin/asc tests/assembly/index.ts --binaryFile tests/build/default.wasm --exportRuntime --exportTable", - "asbuild:legacy": "node ../../bin/asc tests/assembly/index.ts --disable mutable-globals --binaryFile tests/build/legacy.wasm --exportRuntime --exportTable", + "asbuild:default": "node ../../bin/asc tests/assembly/index.ts --outFile tests/build/default.wasm --exportRuntime --exportTable", + "asbuild:legacy": "node ../../bin/asc tests/assembly/index.ts --disable mutable-globals --outFile tests/build/legacy.wasm --exportRuntime --exportTable", "build": "npx esm2umd loader index.js > umd/index.js", "test": "node tests && node tests/umd" }, diff --git a/package.json b/package.json index 2ec98c933c..9bde2e1f9a 100644 --- a/package.json +++ b/package.json @@ -78,9 +78,9 @@ "asbuild:optimized": "node bin/asc --config src/asconfig.json --target optimized", "asbuild:rtraced": "node bin/asc --config src/asconfig.json --target rtraced", "bootstrap": "npm run bootstrap:untouched && npm run bootstrap:optimized", - "bootstrap:untouched": "node bin/asc --config src/asconfig.json --target untouched && node bin/asc --config src/asconfig.json --target untouched-bootstrap --wasm out/assemblyscript.untouched.wasm && node bin/asc --config src/asconfig.json --target untouched-bootstrap --wasm out/assemblyscript.untouched-bootstrap.wasm && git --no-pager diff --no-index out/assemblyscript.untouched.wast out/assemblyscript.untouched-bootstrap.wast", - "bootstrap:optimized": "node bin/asc --config src/asconfig.json --target optimized && node bin/asc --config src/asconfig.json --target optimized-bootstrap --wasm out/assemblyscript.optimized.wasm && node bin/asc --config src/asconfig.json --target optimized-bootstrap --wasm out/assemblyscript.optimized-bootstrap.wasm && git --no-pager diff --no-index out/assemblyscript.optimized.wast out/assemblyscript.optimized-bootstrap.wast", - "bootstrap:rtraced": "node bin/asc --config src/asconfig.json --target rtraced && node bin/asc --config src/asconfig.json --target rtraced --wasm out/assemblyscript.rtraced.wasm" + "bootstrap:untouched": "node bin/asc --config src/asconfig.json --target untouched && node bin/asc --config src/asconfig.json --target untouched-bootstrap --wasm ./build/assemblyscript.untouched.js && node bin/asc --config src/asconfig.json --target untouched-bootstrap --wasm ./build/assemblyscript.untouched-bootstrap.js && git --no-pager diff --no-index build/assemblyscript.untouched.wast build/assemblyscript.untouched-bootstrap.wast", + "bootstrap:optimized": "node bin/asc --config src/asconfig.json --target optimized && node bin/asc --config src/asconfig.json --target optimized-bootstrap --wasm ./build/assemblyscript.optimized.js && node bin/asc --config src/asconfig.json --target optimized-bootstrap --wasm ./build/assemblyscript.optimized-bootstrap.js && git --no-pager diff --no-index build/assemblyscript.optimized.wast build/assemblyscript.optimized-bootstrap.wast", + "bootstrap:rtraced": "node bin/asc --config src/asconfig.json --target rtraced && node bin/asc --config src/asconfig.json --target rtraced --wasm ./build/assemblyscript.rtraced.js" }, "files": [ "bin/", diff --git a/scripts/build-web.js b/scripts/build-web.js index 297b55796b..fded04b86b 100644 --- a/scripts/build-web.js +++ b/scripts/build-web.js @@ -21,12 +21,13 @@ fs.writeFileSync(path.join(dirname, "..", "dist", "web.html"), ` + + +``` + +## Usage + +One task the loader does not perform is to implicitly translate between WebAssembly pointers and JavaScript objects, and that's where the mixed in utility comes into play. For example, if one has + +```ts +// AssemblyScript +export function concat(a: string, b: string): string { + return a + b +} +``` + +and then wants to call `concat` externally, the string arguments cannot just be JavaScript strings but must first be allocated in the module's memory with their lifetime tracked, like so: + +```js +// JavaScript +const { concat } = myModule.exports +const { __newString, __getString } = myModule.exports + +function doConcat(aStr, bStr) { + let aPtr = __newString(aStr) + let bPtr = __newString(bStr) + let cPtr = concat(aPtr, bPtr) + let cStr = __getString(cPtr) + return cStr +} + +console.log(doConcat("Hello ", "world!")) +``` + +### Creating arrays + +Arrays (or more advanced classes for that matter) require a bit more cooperation because we need to know their value type in order to work with them properly. To achieve this, every class has a unique id internally, and a chunk of runtime type information (RTTI) is shipped with the module to evaluate class types. Here's an example of working with an `Int32Array`: + +```ts +// AssemblyScript +export function sum(arr: Int32Array): i32 { + let sum = 0 + for (let i = 0, k = arr.length; i < k; ++i) { + sum += unchecked(arr[i]) + } + return sum +} +export const Int32Array_ID = idof() +``` + +```js +// JavaScript +const { sum, Int32Array_ID } = myModule.exports +const { __newArray } = myModule.exports + +function doSum(values) { + const arrPtr = __newArray(Int32Array_ID, values) + return sum(arrPtr) +} + +console.log(doSum([1, 2, 3])) +``` + +This works with all kinds of arrays, except that ids are different and values are interpreted differently, of course. + +### Reading arrays + +If one is instead interested in the values of an array being returned by the module, there are two approaches to this. Let's say we have the following module: + +```ts +// AssemblyScript +export function getRandomArray(len: i32): Int32Array { + const arr = new Int32Array(len) + // fill with random values + return arr +} +``` + +The first is, obviously, to read the array's values from the module's memory by essentially copying them to a JS array + +```js +// JavaScript +const { getRandomArray } = myModule.exports +const { __getArray } = myModule.exports + +function doGetRandomArray(len) { + const arrPtr = getRandomArray(len) + const values = __getArray(arrPtr) + return values +} + +console.log(doGetRandomArray(10)) +``` + +which is always safe, while the second is to create a live view on the array, enabling two-way modification of its values: + +```js +// JavaScript +const { getRandomArray } = myModule.exports +const { __getArrayView, __pin, __unpin } = myModule.exports + +function doGetRandomArrayView(len) { + const arrPtr = __pin(getRandomArray(len)) // pin if necessary + const view = __getArrayView(arrPtr) + return { ptr, view } +} + +const randomArray = doGetRandomArrayView(10) +console.log(randomArray.view) +__unpin(randomArray.ptr) // unpin if necessary +``` + +The latter variant can be more efficient (and useful) but is a little dangerous because the view may become detached from the module's memory when memory automatically grows. Also, the viewed array can grow automatically when pushed to, with the view then referencing random memory. Pushing to an array can be avoided quite easily, yet it is notoriously hard to predict when module memory grows - but one can try to set a sufficiently large size of `--initialMemory` or defensively trigger a sufficiently large dynamic allocation being freed immediately before dealing with potentially problematic views. + +### Custom classes + +As mentioned earlier, the loader understands how to make a nice object structure of a module's exports, and it is possible to utilize it to work with classes in a more natural way. For example, when calling the following function externally + +```ts +// AssemblyScript +export class Foo { + constructor(public str: string) {} + getString(): string { + return this.str + } +} + +export function getFoo(): Foo { // this one + return new Foo("Hello world!") +} +``` + +one can wrap the received pointer in a `myModule.exports.Foo` instance: + +```js +// JavaScript +const { Foo, getFoo } = myModule.exports +const { __getString, __pin, __unpin } = myModule.exports + +const fooPtr = __pin(getFoo()) // pin if necessary +const foo = Foo.wrap(fooPtr) +const strPtr = foo.getString() +console.log(__getString(strPtr)) +__unpin(fooPtr) // unpin if necessary +``` + +## API + +For reference, here comes the full API provided by the loader. + +::: tip +Copying from and extending the examples above is typically sufficient. +::: + +### Static members + +* ```ts + function instantiate( + moduleOrBuffer: WasmInstantiable, + imports?: WasmImports + ): Promise + ``` + Asynchronously instantiates an AssemblyScript module from anything that can be instantiated. + +* ```ts + function instantiateSync( + moduleOrBuffer: WasmInstantiable, + imports?: WasmImports + ): ASUtil & T + ``` + Synchronously instantiates an AssemblyScript module from a WebAssembly.Module or binary buffer. Not recommended. + +* ```ts + function instantiateStreaming( + response: Response | PromiseLike, + imports?: WasmImports + ): Promise + ``` + Asynchronously instantiates an AssemblyScript module from a response, i.e. as obtained by fetch. + +* ```ts + function demangle( + exports: WasmExports, + baseModule?: Object + ): T + ``` + Demangles an AssemblyScript module's exports to a friendly object structure. You usually don't have to call this manually as instantiation does this implicitly. + +Note that `T` above can either be omitted if the shape of the module is unknown, or can reference a `.d.ts` (i.e. `typeof MyModule`) as produced by the compiler with the `-d` option. + +### Module instance utility + +The following utility functions are mixed into the module's exports. + +* ```ts + function __newString(str: string): number + ``` + Allocates a new string in the module's memory and returns a pointer to it. Requires `--exportRuntime` for access to `__new`. + +* ```ts + function __newArray( + id: number, + values: valuesOrCapacity?: number[] | ArrayBufferView | number + ): number + ``` + Allocates a new array in the module's memory and returns a pointer to it. The `id` is the unique runtime id of the respective array class. If you are using `Int32Array` for example, the best way to know the id is an `export const Int32Array_ID = idof()`. Requires `--exportRuntime` for access to `__new`. The `values` parameter сan also be used to pre-allocate an otherwise empty array of a certain capacity. + +* ```ts + function __getString(ptr: number): string + ``` + Copies a string's value from the module's memory to a JavaScript string. `ptr` must not be zero. + +* ```ts + function __getFunction(ptr: number): ((...args: unknown[]) => unknown) | null + ``` + Gets a callable function object from the module's memory containing its table index. `ptr` must not be zero. + +* ```ts + function __getArrayBuffer(ptr: number): ArrayBuffer + ``` + Copies an ArrayBuffer's value from the module's memory to a JavaScript buffer. `ptr` must not be zero. + +* ```ts + function __getArray(ptr: number): number[] + ``` + Copies an array's values from the module's memory to a JavaScript array. Infers the array type from RTTI. `ptr` must not be zero. + +* ```ts + function __getArrayView(ptr: number): TypedArray + ``` + Gets a live view on the values of an array in the module's memory. Infers the array type from RTTI. `ptr` must not be zero. + + This differs from `__getArray` in that the data isn't copied but remains live in both directions. That's faster but also unsafe because if the array grows or becomes garbage collected, the view will no longer represent the correct memory region and modifying its values in this state will most likely corrupt memory or otherwise explode. Use, but use with care. + +* ```ts + function __getInt8ArrayView(ptr: number): Int8Array + function __getUint8ArrayView(ptr: number): Uint8Array + function __getUint8ClampedArrayView(ptr: number): Uint8ClampedArray + function __getInt16ArrayView(ptr: number): Int16Array + function __getUint16ArrayView(ptr: number): Uint16Array + function __getInt32ArrayView(ptr: number): Int32Array + function __getUint32ArrayView(ptr: number): Uint32Array + function __getInt64ArrayView(ptr: number): BigInt64Array + function __getUint64ArrayView(ptr: number): BigUint64Array + function __getFloat32ArrayView(ptr: number): Float32Array + function __getFloat64ArrayView(ptr: number): Float64Array + ``` + Slightly more efficient variants of `__getArrayView` where the type of the array is know beforehand. Doesn't try to infer the type. + +### Module instance runtime interface + +When compiling with `--exportRuntime`, the loader will expose the runtime interface (`__new`, `__pin`, `__unpin`, `__collect`) as well. + +## Convenience vs. efficiency + +Making the loader's API any more convenient has its tradeoffs. One would either have to include extended type information with the module itself or generate an additional JavaScript file of glue code that does (and hides) all the lifting. As such, one can consider the loader as a small and efficient building block that can do it all, yet does not sacrifice efficiency. If that's not exactly what you are looking for, take a look at more convenient tools below. Just remember that these have tradeoffs. + +### More convenient tools + +* [as-bind](https://github.com/torch2424/as-bind) is a library, built on top of the loader, to make passing high-level data structures between AssemblyScript and JavaScript more convenient. + +## Advanced usage + +### Direct memory access + +All of the above can be mixed with direct memory accesses on `myModule.exports.memory.buffer`, for instance by adhering to class layout. + +### TypeScript definitions + +The compiler is able to emit definitions using the `-d` command line option that are compatible with modules demangled by the loader, and these can be used for proper typings in development: + +```ts +// TypeScript +import type * as MyModule from "myModule"; // pointing at the generated d.ts + +loader.instantiate( + fetch("myModule.wasm"), + { ... } +).then(({ exports }) => { + ... +}) +``` From bd228298d8da1b9f356964e9f15232ba89e1c1d7 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 26 Jan 2022 17:33:27 +0100 Subject: [PATCH 162/175] move development instructions to readme --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index b3260c8932..8e73885756 100644 --- a/README.md +++ b/README.md @@ -34,3 +34,20 @@

Sponsor logos

+ +## Development instructions + +A development environment can be set up by cloning the repository: + +```sh +git clone https://github.com/AssemblyScript/assemblyscript.git +cd assemblyscript +npm install +npm link +``` + +The link step is optional and makes the development instance available globally. The full process is documented as part of the repository: + +* [Compiler instructions](./src) +* [Runtime instructions](./std/assembly/rt) +* [Test instructions](./tests) From b1870ced21b0559b4c7acd63d1e15028e905f5d6 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 27 Jan 2022 18:41:05 +0100 Subject: [PATCH 163/175] add experimental `module` specifier --- src/ast.ts | 25 ++++++++++++++++++++ src/compiler.ts | 8 +++++++ src/extra/ast.ts | 15 ++++++++++++ src/glue/binaryen.d.ts | 1 + src/parser.ts | 38 +++++++++++++++++++++++++++++++ tests/parser/module.ts | 2 ++ tests/parser/module.ts.fixture.ts | 2 ++ 7 files changed, 91 insertions(+) create mode 100644 tests/parser/module.ts create mode 100644 tests/parser/module.ts.fixture.ts diff --git a/src/ast.ts b/src/ast.ts index 25eeade6ce..c5a2427d1e 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -99,6 +99,7 @@ export enum NodeKind { VARIABLE, VOID, WHILE, + MODULE, // declaration statements CLASSDECLARATION, @@ -712,6 +713,14 @@ export abstract class Node { return new TypeDeclaration(name, decorators, flags, typeParameters, type, range); } + static createModuleDeclaration( + name: string, + flags: CommonFlags, + range: Range + ): ModuleDeclaration { + return new ModuleDeclaration(name, flags, range); + } + static createVariableStatement( decorators: DecoratorNode[] | null, declarations: VariableDeclaration[], @@ -1701,6 +1710,8 @@ export abstract class DeclarationStatement extends Statement { ) { super(kind, range); } + /** Overridden module name from preceeding `module` statement. */ + public overriddenModuleName: string | null = null; /** Tests if this node has the specified flag or flags. */ is(flag: CommonFlags): bool { return (this.flags & flag) == flag; } @@ -2256,6 +2267,20 @@ export class TryStatement extends Statement { } } +/** Represents a `module` statement. */ +export class ModuleDeclaration extends Statement { + constructor( + /** Module name. */ + public moduleName: string, + /** Common flags indicating specific traits. */ + public flags: CommonFlags, + /** Source range. */ + range: Range + ) { + super(NodeKind.MODULE, range); + } +} + /** Represents a `type` declaration. */ export class TypeDeclaration extends DeclarationStatement { constructor( diff --git a/src/compiler.ts b/src/compiler.ts index 87b631c28f..dfd32be99b 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -2160,6 +2160,10 @@ export class Compiler extends DiagnosticEmitter { stmt = module.unreachable(); break; } + case NodeKind.MODULE: { + stmt = module.nop(); + break; + } default: { assert(false); stmt = module.unreachable(); @@ -10525,6 +10529,10 @@ function mangleImportName( mangleImportName_elementName = mangleInternalName( element.name, element.parent, element.is(CommonFlags.INSTANCE), true ); + // override module name if a `module` statement is present + let overriddenModuleName = declaration.overriddenModuleName; + if (overriddenModuleName) mangleImportName_moduleName = overriddenModuleName; + if (!element.hasDecorator(DecoratorFlags.EXTERNAL)) return; var program = element.program; diff --git a/src/extra/ast.ts b/src/extra/ast.ts index 3e61f2c34b..2ba8f449ae 100644 --- a/src/extra/ast.ts +++ b/src/extra/ast.ts @@ -65,6 +65,7 @@ import { TryStatement, VariableStatement, WhileStatement, + ModuleDeclaration, DeclarationStatement, ClassDeclaration, @@ -289,6 +290,10 @@ export class ASTBuilder { this.visitWhileStatement(node); break; } + case NodeKind.MODULE: { + this.visitModuleDeclaration(node); + break; + } // declaration statements @@ -1471,6 +1476,16 @@ export class ASTBuilder { this.visitTypeNode(node.type); } + visitModuleDeclaration(node: ModuleDeclaration): void { + var sb = this.sb; + if (node.flags & CommonFlags.DECLARE) { + sb.push("declare "); + } + sb.push("module \""); + sb.push(escapeString(node.moduleName, CharCode.DOUBLEQUOTE)); + sb.push("\""); + } + visitVariableDeclaration(node: VariableDeclaration): void { this.visitIdentifierExpression(node.name); var type = node.type; diff --git a/src/glue/binaryen.d.ts b/src/glue/binaryen.d.ts index 45adb16939..17b3f098c9 100644 --- a/src/glue/binaryen.d.ts +++ b/src/glue/binaryen.d.ts @@ -7,6 +7,7 @@ * * @license Apache-2.0 */ +module "binaryen"; export type Index = u32; export type ExpressionId = i32; diff --git a/src/parser.ts b/src/parser.ts index f0013a9b2b..b9dc2fc7b3 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -86,6 +86,7 @@ import { VariableDeclaration, VoidStatement, WhileStatement, + ModuleDeclaration, mangleInternalPath } from "./ast"; @@ -115,6 +116,8 @@ export class Parser extends DiagnosticEmitter { dependees: Map = new Map(); /** An array of parsed sources. */ sources: Source[]; + /** Current overridden module name. */ + currentModuleName: string | null = null; /** Constructs a new parser. */ constructor( @@ -173,6 +176,7 @@ export class Parser extends DiagnosticEmitter { this.sources.push(source); this.currentSource = source; + this.currentModuleName = null; // tokenize and parse var tn = new Tokenizer(source, this.diagnostics); @@ -351,6 +355,18 @@ export class Parser extends DiagnosticEmitter { } break; } + case Token.MODULE: { // also identifier + let state = tn.mark(); + tn.next(); + if (tn.peek(true) == Token.STRINGLITERAL && !tn.nextTokenOnNewLine) { + tn.discard(state); + statement = this.parseModuleDeclaration(tn, flags); + } else { + tn.reset(state); + statement = this.parseStatement(tn, true); + } + break; + } default: { // handle plain exports @@ -917,6 +933,7 @@ export class Parser extends DiagnosticEmitter { do { let declaration = this.parseVariableDeclaration(tn, flags, decorators, isFor); if (!declaration) return null; + declaration.overriddenModuleName = this.currentModuleName; declarations.push(declaration); } while (tn.skip(Token.COMMA)); @@ -1048,6 +1065,7 @@ export class Parser extends DiagnosticEmitter { members, tn.range(startPos, tn.pos) ); + ret.overriddenModuleName = this.currentModuleName; tn.skip(Token.SEMICOLON); return ret; } @@ -1522,6 +1540,7 @@ export class Parser extends DiagnosticEmitter { ArrowKind.NONE, tn.range(startPos, tn.pos) ); + ret.overriddenModuleName = this.currentModuleName; tn.skip(Token.SEMICOLON); return ret; } @@ -1772,6 +1791,7 @@ export class Parser extends DiagnosticEmitter { } while (!tn.skip(Token.CLOSEBRACE)); } declaration.range.end = tn.pos; + declaration.overriddenModuleName = this.currentModuleName; return declaration; } @@ -2476,6 +2496,7 @@ export class Parser extends DiagnosticEmitter { } } declaration.range.end = tn.pos; + declaration.overriddenModuleName = this.currentModuleName; tn.skip(Token.SEMICOLON); return declaration; } else { @@ -3487,6 +3508,7 @@ export class Parser extends DiagnosticEmitter { tn.range(startPos, tn.pos) ); tn.skip(Token.SEMICOLON); + ret.overriddenModuleName = this.currentModuleName; return ret; } else { this.error( @@ -3503,6 +3525,22 @@ export class Parser extends DiagnosticEmitter { return null; } + parseModuleDeclaration( + tn: Tokenizer, + flags: CommonFlags + ): ModuleDeclaration | null { + + // at 'module': StringLiteral ';'? + + var startPos = tn.tokenPos; + assert(tn.next() == Token.STRINGLITERAL); // checked earlier + var moduleName = tn.readString(); + var ret = Node.createModuleDeclaration(moduleName, flags, tn.range(startPos, tn.pos)); + this.currentModuleName = moduleName; + tn.skip(Token.SEMICOLON); + return ret; + } + parseVoidStatement( tn: Tokenizer ): VoidStatement | null { diff --git a/tests/parser/module.ts b/tests/parser/module.ts new file mode 100644 index 0000000000..c22817d3ea --- /dev/null +++ b/tests/parser/module.ts @@ -0,0 +1,2 @@ +module "abc"; +declare module "abc"; diff --git a/tests/parser/module.ts.fixture.ts b/tests/parser/module.ts.fixture.ts new file mode 100644 index 0000000000..c22817d3ea --- /dev/null +++ b/tests/parser/module.ts.fixture.ts @@ -0,0 +1,2 @@ +module "abc"; +declare module "abc"; From b17cefbbba2bc54e5784ef5d93680033aa9a0755 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 27 Jan 2022 18:49:14 +0100 Subject: [PATCH 164/175] update Binaryen (no fixture changes) --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9fbf2b6e7c..14eda67bcd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "binaryen": "105.0.0-nightly.20220118", + "binaryen": "105.0.0-nightly.20220127", "long": "^5.2.0" }, "bin": { @@ -375,9 +375,9 @@ "dev": true }, "node_modules/binaryen": { - "version": "105.0.0-nightly.20220118", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-105.0.0-nightly.20220118.tgz", - "integrity": "sha512-70nh6HAiEyNZkLajA02xIsTsXR6I6e8ljmGmUYdAlvHvcrIF+oUQLMsOmXZl76o1iawYWTCZM2fnqjkFGfziXg==", + "version": "105.0.0-nightly.20220127", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-105.0.0-nightly.20220127.tgz", + "integrity": "sha512-saXUrw8yoY8PtgHue7Tr4F4QTYFZGDNNEhEjI7cYkeZzCCw3pcL0haj8D9c2OaWFyqvHj3q6siRNBVpp/TC4AQ==", "bin": { "wasm-opt": "bin/wasm-opt", "wasm2js": "bin/wasm2js" @@ -2016,9 +2016,9 @@ "dev": true }, "binaryen": { - "version": "105.0.0-nightly.20220118", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-105.0.0-nightly.20220118.tgz", - "integrity": "sha512-70nh6HAiEyNZkLajA02xIsTsXR6I6e8ljmGmUYdAlvHvcrIF+oUQLMsOmXZl76o1iawYWTCZM2fnqjkFGfziXg==" + "version": "105.0.0-nightly.20220127", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-105.0.0-nightly.20220127.tgz", + "integrity": "sha512-saXUrw8yoY8PtgHue7Tr4F4QTYFZGDNNEhEjI7cYkeZzCCw3pcL0haj8D9c2OaWFyqvHj3q6siRNBVpp/TC4AQ==" }, "brace-expansion": { "version": "1.1.11", diff --git a/package.json b/package.json index e37aaa0a55..50cf1830c5 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "105.0.0-nightly.20220118", + "binaryen": "105.0.0-nightly.20220127", "long": "^5.2.0" }, "devDependencies": { From b163bd59c6ef2aae89963b37e14a74e632b77afc Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 27 Jan 2022 19:54:32 +0100 Subject: [PATCH 165/175] update asinit --- bin/asinit.js | 52 +++++++++++++--------------------------------- src/bindings/js.ts | 45 +++++++++++++++++++++++++++++++++------ 2 files changed, 54 insertions(+), 43 deletions(-) diff --git a/bin/asinit.js b/bin/asinit.js index 2c7a869165..e6ebf0ec92 100644 --- a/bin/asinit.js +++ b/bin/asinit.js @@ -292,7 +292,9 @@ function ensureAsconfigJson() { noAssert: false } }, - options: {} + options: { + bindings: "esm" + } }, null, 2)); console.log(stdoutColors.green(" Created: ") + asconfigFile); } else { @@ -352,17 +354,13 @@ function ensurePackageJson() { const buildAll = commands[pm].run + " asbuild:debug && " + commands[pm].run + " asbuild:release"; if (!fs.existsSync(packageFile)) { fs.writeFileSync(packageFile, JSON.stringify({ + "type": "module", "scripts": { "asbuild:debug": buildDebug, "asbuild:release": buildRelease, "asbuild": buildAll, ...(useNode && {"test": "node tests"}) }, - ...(useNode && { - "dependencies": { - "@assemblyscript/loader": "^" + version - } - }), "devDependencies": { "assemblyscript": "^" + version } @@ -372,6 +370,10 @@ function ensurePackageJson() { let pkg = JSON.parse(fs.readFileSync(packageFile)); let scripts = pkg.scripts || {}; let updated = false; + if (!pkg["type"]) { + pkg["type"] = "module"; + updated = true; + } if (!scripts["asbuild"]) { scripts["asbuild:debug"] = buildDebug; scripts["asbuild:release"] = buildRelease; @@ -384,12 +386,6 @@ function ensurePackageJson() { pkg["scripts"] = scripts; updated = true; } - let dependencies = pkg["dependencies"] || {}; - if (!dependencies["@assemblyscript/loader"] && useNode) { - dependencies["@assemblyscript/loader"] = "^" + version; - pkg["dependencies"] = dependencies; - updated = true; - } let devDependencies = pkg["devDependencies"] || {}; if (!devDependencies["assemblyscript"]) { devDependencies["assemblyscript"] = "^" + version; @@ -409,17 +405,8 @@ function ensurePackageJson() { function ensureIndexJs() { console.log("- Making sure that 'index.js' exists..."); if (!fs.existsSync(indexFile)) { - // since node.js v13.2.0 or v12.17.0 we can use ESM without flags - const ver = process.versions.node.split('.'); - const maj = parseInt(ver[0]); - const min = parseInt(ver[1]); - const supportESM = maj >= 14 || (maj == 13 && min >= 2) || (maj == 12 && min >= 17); fs.writeFileSync(indexFile, [ - "const fs = require(\"fs\");", - "const loader = require(\"@assemblyscript/loader" + (supportESM ? "" : "/umd") + "\");", - "const imports = { /* imports go here */ };", - "const wasmModule = loader.instantiateSync(fs.readFileSync(__dirname + \"/build/release.wasm\"), imports);", - "module.exports = wasmModule.exports;" + "export * from \"./build/release.js\";" ].join("\n") + "\n"); console.log(stdoutColors.green(" Created: ") + indexFile); } else { @@ -443,9 +430,9 @@ function ensureTestsIndexJs() { console.log("- Making sure that 'tests/index.js' exists..."); if (!fs.existsSync(testsIndexFile)) { fs.writeFileSync(testsIndexFile, [ - "const assert = require(\"assert\");", - "const myModule = require(\"..\");", - "assert.strictEqual(myModule.add(1, 2), 3);", + "import assert from \"assert\";", + "import { add } from \"../build/debug.js\";", + "assert.strictEqual(add(1, 2), 3);", "console.log(\"ok\");" ].join("\n") + "\n"); console.log(stdoutColors.green(" Created: ") + testsIndexFile); @@ -462,18 +449,9 @@ function ensureIndexHtml() { "", "", " ", - " ", - " ", " ", " ", diff --git a/src/bindings/js.ts b/src/bindings/js.ts index 598a7de066..4a99a28151 100644 --- a/src/bindings/js.ts +++ b/src/bindings/js.ts @@ -493,6 +493,7 @@ export class JSBuilder extends ExportsWalker { // prototypes and overrides selectively where instrumentation is required. indent(sb, this.indentLevel++); sb.push("const adaptedImports = {\n"); + let sbLengthBefore = sb.length; for (let _keys = Map_keys(moduleImports), i = 0, k = _keys.length; i < k; ++i) { let moduleName = _keys[i]; let moduleId = this.ensureModuleId(moduleName); @@ -545,8 +546,14 @@ export class JSBuilder extends ExportsWalker { sb.push("}),\n"); } } - indent(sb, --this.indentLevel); - sb.push("};\n"); + --this.indentLevel; + let hasAdaptedImports = sb.length > sbLengthBefore; + if (hasAdaptedImports) { + indent(sb, this.indentLevel); + sb.push("};\n"); + } else { + sb.length = sbLengthBefore - 2; // incl. indent + } var mappings = this.importMappings; var map = new Array(); @@ -573,17 +580,39 @@ export class JSBuilder extends ExportsWalker { sb[insertPos] = map.join(""); indent(sb, this.indentLevel); - sb.push("const { exports } = await WebAssembly.instantiate(module, adaptedImports);\n"); + sb.push("const { exports } = await WebAssembly.instantiate(module"); + if (hasAdaptedImports) { + sb.push(", adaptedImports);\n"); + } else { + sb.push(", imports);\n"); + } indent(sb, this.indentLevel); sb.push("const memory = exports.memory || imports.env.memory;\n"); indent(sb, this.indentLevel++); sb.push("const adaptedExports = Object.setPrototypeOf({\n"); + sbLengthBefore = sb.length; // Instrument module exports. Keeps raw (Wasm) exports on the prototype and // overrides selectively where instrumentation is required. this.walk(); - indent(sb, --this.indentLevel); - sb.push("}, exports);\n"); + --this.indentLevel; + let hasAdaptedExports = sb.length > sbLengthBefore; + if (hasAdaptedExports) { + indent(sb, this.indentLevel); + sb.push("}, exports);\n"); + } else { + if ( + this.needsLiftBuffer || this.needsLowerBuffer || + this.needsLiftString || this.needsLowerString || + this.needsLiftArray || this.needsLowerArray || + this.needsLiftTypedArray || this.needsLowerTypedArray || + this.needsLiftStaticArray + ) { + sb.length = sbLengthBefore - 2; // skip adaptedExports + 1x indent + } else { + sb.length = sbLengthBefore - 4; // skip memory and adaptedExports + 2x indent + } + } // Add external JS code fragments var deferredCode = this.deferredCode; @@ -806,7 +835,11 @@ export class JSBuilder extends ExportsWalker { sb.push(` exports.${exportStart}();\n`); } - sb.push(" return adaptedExports;\n}\n"); + if (hasAdaptedExports) { + sb.push(" return adaptedExports;\n}\n"); + } else { + sb.push(" return exports;\n}\n"); + } --this.indentLevel; assert(this.indentLevel == 0); From a223638944cc20a0591e478c7a679e9f7b700fc4 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 27 Jan 2022 20:02:52 +0100 Subject: [PATCH 166/175] don't need a top-level index.js anymore --- bin/asinit.js | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/bin/asinit.js b/bin/asinit.js index e6ebf0ec92..13cbac7c19 100644 --- a/bin/asinit.js +++ b/bin/asinit.js @@ -101,7 +101,6 @@ const gitignoreFile = path.join(buildDir, ".gitignore"); const packageFile = path.join(projectDir, "package.json"); const indexHtml = path.join(projectDir, "index.html"); -const indexFile = path.join(projectDir, "index.js"); const testsIndexFile = path.join(testsDir, "index.js"); const basePaths = [ @@ -115,7 +114,6 @@ const basePaths = [ ]; const nodePaths = [ - [indexFile, "Main file loading the WebAssembly module and exporting its exports."], [testsIndexFile, "Example test to check that your module is indeed working."] ]; @@ -159,7 +157,6 @@ function createProject(answer) { ensureAsconfigJson(); if (useNode) { - ensureIndexJs(); ensureTestsDirectory(); ensureTestsIndexJs(); } @@ -355,6 +352,9 @@ function ensurePackageJson() { if (!fs.existsSync(packageFile)) { fs.writeFileSync(packageFile, JSON.stringify({ "type": "module", + "exports": { + ".": "./build/release.js" + }, "scripts": { "asbuild:debug": buildDebug, "asbuild:release": buildRelease, @@ -374,6 +374,11 @@ function ensurePackageJson() { pkg["type"] = "module"; updated = true; } + if (!pkg["exports"]) { + pkg["exports"] = { + ".": "./build/release.js" + }; + } if (!scripts["asbuild"]) { scripts["asbuild:debug"] = buildDebug; scripts["asbuild:release"] = buildRelease; @@ -402,19 +407,6 @@ function ensurePackageJson() { console.log(); } -function ensureIndexJs() { - console.log("- Making sure that 'index.js' exists..."); - if (!fs.existsSync(indexFile)) { - fs.writeFileSync(indexFile, [ - "export * from \"./build/release.js\";" - ].join("\n") + "\n"); - console.log(stdoutColors.green(" Created: ") + indexFile); - } else { - console.log(stdoutColors.yellow(" Exists: ") + indexFile); - } - console.log(); -} - function ensureTestsDirectory() { console.log("- Making sure that the 'tests' directory exists..."); if (!fs.existsSync(testsDir)) { From b9120d10a5bcfe19bc57be63f151feb66882a286 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 27 Jan 2022 20:06:37 +0100 Subject: [PATCH 167/175] update link to docs --- bin/asinit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/asinit.js b/bin/asinit.js index 13cbac7c19..88fc3727cb 100644 --- a/bin/asinit.js +++ b/bin/asinit.js @@ -204,7 +204,7 @@ function createProject(answer) { ] : []), "The AssemblyScript documentation covers all the details:", "", - " https://docs.assemblyscript.org", + " https://www.assemblyscript.org", "", "Have a nice day!" ].join("\n")); From cc45b9ea1d28992063a18ab0db3c98f8b6c8f755 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 27 Jan 2022 20:09:05 +0100 Subject: [PATCH 168/175] export types --- bin/asinit.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/asinit.js b/bin/asinit.js index 88fc3727cb..9708e6d4b3 100644 --- a/bin/asinit.js +++ b/bin/asinit.js @@ -353,7 +353,10 @@ function ensurePackageJson() { fs.writeFileSync(packageFile, JSON.stringify({ "type": "module", "exports": { - ".": "./build/release.js" + ".": { + "import": "./build/release.js", + "types": "./build/release.d.ts" + } }, "scripts": { "asbuild:debug": buildDebug, @@ -376,7 +379,10 @@ function ensurePackageJson() { } if (!pkg["exports"]) { pkg["exports"] = { - ".": "./build/release.js" + ".": { + "import": "./build/release.js", + "types": "./build/release.d.ts" + } }; } if (!scripts["asbuild"]) { From 628bd8e96dee50d7b85b65df0358c66fd78b742b Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 28 Jan 2022 11:50:40 +0100 Subject: [PATCH 169/175] simplify --- bin/asinit.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/bin/asinit.js b/bin/asinit.js index 9708e6d4b3..be60bac106 100644 --- a/bin/asinit.js +++ b/bin/asinit.js @@ -332,9 +332,8 @@ function ensureGitignore() { console.log("- Making sure that 'build/.gitignore' is set up..."); if (!fs.existsSync(gitignoreFile)) { fs.writeFileSync(gitignoreFile, [ - "*.wasm", - "*.wasm.map", - "*.asm.js" + "*", + "!.gitignore" ].join("\n") + "\n"); console.log(stdoutColors.green(" Created: ") + gitignoreFile); } else { @@ -446,13 +445,13 @@ function ensureIndexHtml() { fs.writeFileSync(indexHtml, [ "", "", - " ", - " ", - " ", - " ", + "", + "", + "", + "", "", ].join("\n") + "\n"); console.log(stdoutColors.green(" Created: ") + indexHtml); From d7a44042b324a26e124ad217aeab64bae8a9846c Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 29 Jan 2022 11:55:44 +0100 Subject: [PATCH 170/175] simplify --- bin/asinit.js | 91 ++++++++++++++++++++---------------------------- cli/options.json | 2 +- util/options.js | 2 +- 3 files changed, 39 insertions(+), 56 deletions(-) diff --git a/bin/asinit.js b/bin/asinit.js index be60bac106..5023e5c09a 100644 --- a/bin/asinit.js +++ b/bin/asinit.js @@ -43,27 +43,18 @@ if (typeof process.env.npm_config_user_agent === "string") { const asinitOptions = { "help": { "category": "General", - "description": "Prints a help message.", + "description": "Prints this help message.", "type": "b", "alias": "h" }, "yes": { "category": "General", - "description": "Answers all questions with their default option for non-interactive usage.", + "description": [ + "Answers all questions with their default option", + "for non-interactive usage." + ], "type": "b", "alias": "y" - }, - "web": { - "category": "General", - "description": "Adds an index.html file that can load your module. (Disables node without --node/-n flag)", - "type": "b", - "alias": "w" - }, - "node": { - "category": "General", - "description": "Re-enables node files when using the --web/-w flag", - "type": "b", - "alias": "n" } }; @@ -71,15 +62,19 @@ const cliOptions = optionsUtil.parse(process.argv.slice(2), asinitOptions); if (cliOptions.options.help || cliOptions.arguments.length === 0) printHelp(); -const useWeb = cliOptions.options.web; -const useNode = cliOptions.options.node || !useWeb; - function printHelp() { console.log([ "Sets up a new AssemblyScript project or updates an existing one.", - "For example, to create a new project in the current directory:", "", + stdoutColors.white("SYNTAX"), + " " + stdoutColors.cyan("asinit") + " directory [options]", + "", + stdoutColors.white("EXAMPLES"), " " + stdoutColors.cyan("asinit") + " .", + " " + stdoutColors.cyan("asinit") + " ./newProject -y", + "", + stdoutColors.white("OPTIONS"), + optionsUtil.help(asinitOptions, { noCategories: true }) ].join("\n")); process.exit(0); } @@ -100,31 +95,21 @@ const testsDir = path.join(projectDir, "tests"); const gitignoreFile = path.join(buildDir, ".gitignore"); const packageFile = path.join(projectDir, "package.json"); -const indexHtml = path.join(projectDir, "index.html"); +const indexHtmlFile = path.join(projectDir, "index.html"); const testsIndexFile = path.join(testsDir, "index.js"); -const basePaths = [ +const paths = [ [assemblyDir, "Directory holding the AssemblyScript sources being compiled to WebAssembly."], [tsconfigFile, "TypeScript configuration inheriting recommended AssemblyScript settings."], [entryFile, "Example entry file being compiled to WebAssembly to get you started."], [buildDir, "Build artifact directory where compiled WebAssembly files are stored."], [gitignoreFile, "Git configuration that excludes compiled binaries from source control."], [asconfigFile, "Configuration file defining both a 'debug' and a 'release' target."], - [packageFile, "Package info containing the necessary commands to compile to WebAssembly."] -]; - -const nodePaths = [ - [testsIndexFile, "Example test to check that your module is indeed working."] -]; - -const webPaths = [ - [indexHtml, "Starter HTML file that loads your module."] + [packageFile, "Package info containing the necessary commands to compile to WebAssembly."], + [testsIndexFile, "Stater test to check that the module is functioning."], + [indexHtmlFile, "Starter HTML file that loads the module in a browser."] ]; -const paths = basePaths; -if (useNode) Array.prototype.push.apply(paths, nodePaths); -if (useWeb) Array.prototype.push.apply(paths, webPaths); - const formatPath = filePath => "./" + path.relative(projectDir, filePath).replace(/\\/g, "/"); console.log([ @@ -155,15 +140,9 @@ function createProject(answer) { ensureGitignore(); ensurePackageJson(); ensureAsconfigJson(); - - if (useNode) { - ensureTestsDirectory(); - ensureTestsIndexJs(); - } - - if (useWeb) { - ensureIndexHtml(); - } + ensureTestsDirectory(); + ensureTestsIndexJs(); + ensureIndexHtml(); console.log([ stdoutColors.green("Done!"), @@ -196,12 +175,10 @@ function createProject(answer) { " ^ The optimized WebAssembly module using default optimization settings.", " You can change the optimization settings in '" + stdoutColors.cyan("package.json")+ "'.", "", - ...(useNode ? [ - "To run the tests, do:", - "", - stdoutColors.white(" " + commands[pm].test), - "" - ] : []), + "To run the tests, do:", + "", + stdoutColors.white(" " + commands[pm].test), + "", "The AssemblyScript documentation covers all the details:", "", " https://www.assemblyscript.org", @@ -361,7 +338,8 @@ function ensurePackageJson() { "asbuild:debug": buildDebug, "asbuild:release": buildRelease, "asbuild": buildAll, - ...(useNode && {"test": "node tests"}) + "test": "node tests", + "start": "npx serve ." }, "devDependencies": { "assemblyscript": "^" + version @@ -391,11 +369,16 @@ function ensurePackageJson() { pkg["scripts"] = scripts; updated = true; } - if (!scripts["test"] || scripts["test"] == npmDefaultTest && useNode) { + if (!scripts["test"] || scripts["test"] == npmDefaultTest) { scripts["test"] = "node tests"; pkg["scripts"] = scripts; updated = true; } + if (!scripts["start"]) { + scripts["start"] = "npx serve .", + pkg["scripts"] = scripts; + updated = true; + } let devDependencies = pkg["devDependencies"] || {}; if (!devDependencies["assemblyscript"]) { devDependencies["assemblyscript"] = "^" + version; @@ -441,8 +424,8 @@ function ensureTestsIndexJs() { function ensureIndexHtml() { console.log("- Making sure that 'index.html' exists..."); - if (!fs.existsSync(indexHtml)) { - fs.writeFileSync(indexHtml, [ + if (!fs.existsSync(indexHtmlFile)) { + fs.writeFileSync(indexHtmlFile, [ "", "", "", @@ -454,9 +437,9 @@ function ensureIndexHtml() { "", "", ].join("\n") + "\n"); - console.log(stdoutColors.green(" Created: ") + indexHtml); + console.log(stdoutColors.green(" Created: ") + indexHtmlFile); } else { - console.log(stdoutColors.yellow(" Exists: ") + indexHtml); + console.log(stdoutColors.yellow(" Exists: ") + indexHtmlFile); } console.log(); } diff --git a/cli/options.json b/cli/options.json index f60ce2c00b..4ca455b19c 100644 --- a/cli/options.json +++ b/cli/options.json @@ -258,7 +258,7 @@ "transform": { "category": "API", - "description": "Specifies the path to a custom transform to 'require'.", + "description": "Specifies the path to a custom transform to load.", "type": "S", "isPath": true, "useNodeResolution": true diff --git a/util/options.js b/util/options.js index 0e3e426f81..d0633b19e2 100644 --- a/util/options.js +++ b/util/options.js @@ -133,7 +133,7 @@ export function help(config, options) { sb.push(eol + " " + stdoutColors.gray(category) + eol); sb.push(sbCategories[category].join(eol)); }); - if (hasCategories) { + if (hasCategories && sbOther.length) { sb.push(eol + " " + stdoutColors.gray("Other") + eol); } sb.push(sbOther.join(eol)); From 5bfaa9903288880de06737a20c9573a76893ee34 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 30 Jan 2022 20:14:30 +0100 Subject: [PATCH 171/175] make console/crypto/process usable with bindings --- std/assembly/bindings/dom.ts | 25 ++ std/assembly/bindings/node.ts | 6 + std/assembly/builtins.ts | 1 + std/assembly/console.ts | 133 ++++++---- std/assembly/crypto.ts | 12 +- std/assembly/process.ts | 123 ++++++---- tests/compiler/std-wasi/console.debug.wat | 31 ++- tests/compiler/std-wasi/console.release.wat | 10 +- tests/compiler/std-wasi/crypto.debug.wat | 12 +- tests/compiler/std-wasi/crypto.release.wat | 8 +- tests/compiler/std-wasi/process.debug.wat | 50 ++-- tests/compiler/std-wasi/process.release.wat | 32 +-- tests/compiler/std/console.debug.wat | 254 ++++++++++++++++++++ tests/compiler/std/console.json | 5 + tests/compiler/std/console.release.wat | 166 +++++++++++++ tests/compiler/std/console.ts | 25 ++ 16 files changed, 748 insertions(+), 145 deletions(-) create mode 100644 std/assembly/bindings/node.ts create mode 100644 tests/compiler/std/console.debug.wat create mode 100644 tests/compiler/std/console.json create mode 100644 tests/compiler/std/console.release.wat create mode 100644 tests/compiler/std/console.ts diff --git a/std/assembly/bindings/dom.ts b/std/assembly/bindings/dom.ts index 9f74d2b28b..cd206110c4 100644 --- a/std/assembly/bindings/dom.ts +++ b/std/assembly/bindings/dom.ts @@ -121,17 +121,42 @@ export declare namespace Date { } export declare namespace console { + @external("env", "console.assert") + export function assert(condition: bool, message: string): void; @external("env", "console.log") export function log(text: string): void; + @external("env", "console.debug") + export function debug(text: string): void; @external("env", "console.info") export function info(text: string): void; @external("env", "console.warn") export function warn(text: string): void; @external("env", "console.error") export function error(text: string): void; + @external("env", "console.time") + export function time(label: string): void; + @external("env", "console.timeLog") + export function timeLog(label: string): void; + @external("env", "console.timeEnd") + export function timeEnd(label: string): void; } export declare namespace document { @external("env", "document.getElementById") export function getElementById(id: string): externref; } + +export declare namespace performance { + @external("env", "performance.now") + export function now(): f64; +} + +export namespace crypto { + export function getRandomValues(array: Uint8Array): void { + let values = getRandomValuesN(array.length); + array.set(values); + } + @external("env", "crypto.getRandomValuesN") + @external.js("let a = new Uint8Array(n); crypto.getRandomValues(a); return a;") + export declare function getRandomValuesN(n: u32): Uint8Array; +} diff --git a/std/assembly/bindings/node.ts b/std/assembly/bindings/node.ts new file mode 100644 index 0000000000..77a29f9eff --- /dev/null +++ b/std/assembly/bindings/node.ts @@ -0,0 +1,6 @@ +export declare namespace process { + @external("env", "process.argv") + export const argv: string[]; + @external("env", "process.exit") + export function exit(code: i32): void; +} diff --git a/std/assembly/builtins.ts b/std/assembly/builtins.ts index eccd4562f3..18ec475c01 100644 --- a/std/assembly/builtins.ts +++ b/std/assembly/builtins.ts @@ -2336,6 +2336,7 @@ declare function trace( // @ts-ignore: decorator @external("env", "seed") +@external.js("return Date.now() * Math.random();") declare function seed(): f64; /* eslint-enable @typescript-eslint/no-unused-vars */ diff --git a/std/assembly/console.ts b/std/assembly/console.ts index f1d5f8de95..c65771a2df 100644 --- a/std/assembly/console.ts +++ b/std/assembly/console.ts @@ -2,86 +2,126 @@ import { process } from "./process"; +import { + console as binding +} from "./bindings/dom"; + // @ts-ignore: decorator @lazy var timers = new Map(); export namespace console { export function assert(condition: T, message: string = ""): void { - if (!condition) { - let stderr = process.stderr; - stderr.write("Assertion failed: "); - stderr.write(message); - stderr.write("\n"); + if (isDefined(ASC_WASI)) { + if (!condition) { + let stderr = process.stderr; + stderr.write("Assertion failed: "); + stderr.write(message); + stderr.write("\n"); + } + } else { + binding.assert(!!condition, message); } } export function log(message: string = ""): void { - var stdout = process.stdout; - stdout.write(message); - stdout.write("\n"); + if (isDefined(ASC_WASI)) { + let stdout = process.stdout; + stdout.write(message); + stdout.write("\n"); + } else { + binding.log(message); + } } export function debug(message: string = ""): void { - var stdout = process.stdout; - stdout.write("Debug: "); - stdout.write(message); - stdout.write("\n"); + if (isDefined(ASC_WASI)) { + let stdout = process.stdout; + stdout.write("Debug: "); + stdout.write(message); + stdout.write("\n"); + } else { + binding.debug(message); + } } export function info(message: string = ""): void { - var stdout = process.stdout; - stdout.write("Info: "); - stdout.write(message); - stdout.write("\n"); + if (isDefined(ASC_WASI)) { + let stdout = process.stdout; + stdout.write("Info: "); + stdout.write(message); + stdout.write("\n"); + } else { + binding.info(message); + } } export function warn(message: string = ""): void { - var stdout = process.stdout; - stdout.write("Warning: "); - stdout.write(message); - stdout.write("\n"); + if (isDefined(ASC_WASI)) { + let stdout = process.stdout; + stdout.write("Warning: "); + stdout.write(message); + stdout.write("\n"); + } else { + binding.warn(message); + } } export function error(message: string = ""): void { - var stdout = process.stdout; - stdout.write("Error: "); - stdout.write(message); - stdout.write("\n"); + if (isDefined(ASC_WASI)) { + let stdout = process.stdout; + stdout.write("Error: "); + stdout.write(message); + stdout.write("\n"); + } else { + binding.error(message); + } } export function time(label: string = "default"): void { - var stdout = process.stdout; - if (timers.has(label)) { - stdout.write("Warning: Label '"); - stdout.write(label); - stdout.write("' already exists for console.time()\n"); - return; + if (isDefined(ASC_WASI)) { + let stdout = process.stdout; + if (timers.has(label)) { + stdout.write("Warning: Label '"); + stdout.write(label); + stdout.write("' already exists for console.time()\n"); + return; + } + timers.set(label, process.hrtime()); + } else { + binding.time(label); } - timers.set(label, process.hrtime()); } export function timeLog(label: string = "default"): void { - var stdout = process.stdout; - if (!timers.has(label)) { - stdout.write("Warning: No such label '"); - stdout.write(label); - stdout.write("' for console.timeLog()\n"); - return; + if (isDefined(ASC_WASI)) { + let stdout = process.stdout; + if (!timers.has(label)) { + stdout.write("Warning: No such label '"); + stdout.write(label); + stdout.write("' for console.timeLog()\n"); + return; + } + timeLogImpl(label); + } else { + binding.timeLog(label); } - timeLogImpl(label); } export function timeEnd(label: string = "default"): void { - var stdout = process.stdout; - if (!timers.has(label)) { - stdout.write("Warning: No such label '"); - stdout.write(label); - stdout.write("' for console.timeEnd()\n"); - return; + if (isDefined(ASC_WASI)) { + let stdout = process.stdout; + if (!timers.has(label)) { + stdout.write("Warning: No such label '"); + stdout.write(label); + stdout.write("' for console.timeEnd()\n"); + return; + } + timeLogImpl(label); + timers.delete(label); + } else { + binding.timeEnd(label); } - timeLogImpl(label); - timers.delete(label); } } @@ -96,5 +136,4 @@ function timeLogImpl(label: string): void { stdout.write(": "); stdout.write(millisStr); stdout.write("ms\n"); - // __dispose(changetype(millisStr)); } diff --git a/std/assembly/crypto.ts b/std/assembly/crypto.ts index 5bf4c500c2..d49301bed4 100644 --- a/std/assembly/crypto.ts +++ b/std/assembly/crypto.ts @@ -3,9 +3,17 @@ import { random_get } from "bindings/wasi_snapshot_preview1"; +import { + crypto as crypto_binding +} from "bindings/dom"; + export namespace crypto { export function getRandomValues(array: Uint8Array): void { - var err = random_get(changetype(array.buffer) + array.byteOffset, array.byteLength); - if (err) throw new Error(errnoToString(err)); + if (isDefined(ASC_WASI)) { + let err = random_get(changetype(array.buffer) + array.byteOffset, array.byteLength); + if (err) throw new Error(errnoToString(err)); + } else { + crypto_binding.getRandomValues(array); + } } } diff --git a/std/assembly/process.ts b/std/assembly/process.ts index 4b12f0d9c1..e728e44061 100644 --- a/std/assembly/process.ts +++ b/std/assembly/process.ts @@ -14,6 +14,15 @@ import { tempbuf } from "bindings/wasi"; +import { + Date as Date_binding, + performance as performance_binding +} from "bindings/dom"; + +import { + process as process_binding +} from "bindings/node"; + import { E_INDEXOUTOFRANGE } from "util/error"; @@ -36,7 +45,11 @@ export namespace process { @lazy export var exitCode = 0; export function exit(code: i32 = exitCode): void { - proc_exit(code); + if (isDefined(ASC_WASI)) { + proc_exit(code); + } else { + process_binding.exit(code); + } } // @ts-ignore: decorator @@ -47,63 +60,83 @@ export namespace process { @lazy export const stderr = changetype(2); export function time(): i64 { - var err = clock_time_get(clockid.REALTIME, 1000000, tempbuf); - if (err) throw new Error(errnoToString(err)); - return load(tempbuf) / 1000000; + if (isDefined(ASC_WASI)) { + let err = clock_time_get(clockid.REALTIME, 1000000, tempbuf); + if (err) throw new Error(errnoToString(err)); + return load(tempbuf) / 1000000; + } else { + return Date_binding.now(); + } } export function hrtime(): u64 { - var err = clock_time_get(clockid.MONOTONIC, 0, tempbuf); - if (err) throw new Error(errnoToString(err)); - return load(tempbuf); + if (isDefined(ASC_WASI)) { + let err = clock_time_get(clockid.MONOTONIC, 0, tempbuf); + if (err) throw new Error(errnoToString(err)); + return load(tempbuf); + } else { + let now = performance_binding.now(); + let millis = now; + let fraction = now - millis; + return millis * 1000000 + (fraction * 1000000); + } } } function lazyArgv(): string[] { - var err = args_sizes_get(tempbuf, tempbuf + sizeof()); - if (err) throw new Error(errnoToString(err)); - var count = load(tempbuf); - var ptrsSize = count * sizeof(); - var dataSize = load(tempbuf, sizeof()); - var bufSize = ptrsSize + dataSize; - var buf = __alloc(bufSize); - err = args_get(buf, buf + ptrsSize); - if (err) throw new Error(errnoToString(err)); - var count32 = count; - var argv = new Array(count32); - for (let i = 0; i < count32; ++i) { - let ptr = load(buf + i * sizeof()); - let str = String.UTF8.decodeUnsafe(ptr, ptr + bufSize - buf, true); - argv[i] = str; + if (isDefined(ASC_WASI)) { + let err = args_sizes_get(tempbuf, tempbuf + sizeof()); + if (err) throw new Error(errnoToString(err)); + let count = load(tempbuf); + let ptrsSize = count * sizeof(); + let dataSize = load(tempbuf, sizeof()); + let bufSize = ptrsSize + dataSize; + let buf = __alloc(bufSize); + err = args_get(buf, buf + ptrsSize); + if (err) throw new Error(errnoToString(err)); + let count32 = count; + let argv = new Array(count32); + for (let i = 0; i < count32; ++i) { + let ptr = load(buf + i * sizeof()); + let str = String.UTF8.decodeUnsafe(ptr, ptr + bufSize - buf, true); + argv[i] = str; + } + __free(buf); + return argv; + } else { + return process_binding.argv; } - __free(buf); - return argv; } function lazyEnv(): Map { - var err = environ_sizes_get(tempbuf, tempbuf + 4); - if (err) throw new Error(errnoToString(err)); - var count = load(tempbuf); - var ptrsSize = count * sizeof(); - var dataSize = load(tempbuf, sizeof()); - var bufSize = ptrsSize + dataSize; - var buf = __alloc(bufSize); - err = environ_get(buf, buf + ptrsSize); - if (err) throw new Error(errnoToString(err)); - var env = new Map(); - for (let i: usize = 0; i < count; ++i) { - let ptr = load(buf + i * sizeof()); - let str = String.UTF8.decodeUnsafe(ptr, ptr + bufSize - buf, true); - let pos = str.indexOf("="); - if (~pos) { - env.set(str.substring(0, pos), str.substring(pos + 1)); - // __dispose(changetype(str)); - } else { - env.set(str, ""); + if (isDefined(ASC_WASI)) { + let err = environ_sizes_get(tempbuf, tempbuf + 4); + if (err) throw new Error(errnoToString(err)); + let count = load(tempbuf); + let ptrsSize = count * sizeof(); + let dataSize = load(tempbuf, sizeof()); + let bufSize = ptrsSize + dataSize; + let buf = __alloc(bufSize); + err = environ_get(buf, buf + ptrsSize); + if (err) throw new Error(errnoToString(err)); + let env = new Map(); + for (let i: usize = 0; i < count; ++i) { + let ptr = load(buf + i * sizeof()); + let str = String.UTF8.decodeUnsafe(ptr, ptr + bufSize - buf, true); + let pos = str.indexOf("="); + if (~pos) { + env.set(str.substring(0, pos), str.substring(pos + 1)); + // __dispose(changetype(str)); + } else { + env.set(str, ""); + } } + __free(buf); + return env; + } else { + // TODO: What about Node? + return new Map(); } - __free(buf); - return env; } @unmanaged diff --git a/tests/compiler/std-wasi/console.debug.wat b/tests/compiler/std-wasi/console.debug.wat index be3d50e1c7..7aa8c6187a 100644 --- a/tests/compiler/std-wasi/console.debug.wat +++ b/tests/compiler/std-wasi/console.debug.wat @@ -3129,7 +3129,7 @@ local.get $7 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 3248 - i32.const 178 + i32.const 211 i32.const 16 call $~lib/wasi/index/abort unreachable @@ -3158,7 +3158,7 @@ if i32.const 0 i32.const 3248 - i32.const 184 + i32.const 217 i32.const 3 call $~lib/wasi/index/abort unreachable @@ -3188,7 +3188,7 @@ local.get $10 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 3248 - i32.const 189 + i32.const 222 i32.const 12 call $~lib/wasi/index/abort unreachable @@ -4216,6 +4216,8 @@ (func $~lib/process/process.hrtime (result i64) (local $0 i32) i32.const 1 + drop + i32.const 1 i64.const 0 global.get $~lib/bindings/wasi/tempbuf call $~lib/bindings/wasi_snapshot_preview1/clock_time_get @@ -4227,13 +4229,14 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 3248 - i32.const 57 - i32.const 14 + i32.const 75 + i32.const 16 call $~lib/wasi/index/abort unreachable end global.get $~lib/bindings/wasi/tempbuf i64.load + return ) (func $~lib/map/MapEntry<~lib/string/String,u64>#set:value (param $0 i32) (param $1 i64) local.get $0 @@ -5197,6 +5200,8 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + i32.const 1 + drop local.get $0 i32.eqz if @@ -5238,6 +5243,8 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + i32.const 1 + drop global.get $~lib/process/process.stdout local.set $1 local.get $1 @@ -5267,6 +5274,8 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + i32.const 1 + drop global.get $~lib/process/process.stdout local.set $1 local.get $1 @@ -5304,6 +5313,8 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + i32.const 1 + drop global.get $~lib/process/process.stdout local.set $1 local.get $1 @@ -5341,6 +5352,8 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + i32.const 1 + drop global.get $~lib/process/process.stdout local.set $1 local.get $1 @@ -5378,6 +5391,8 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + i32.const 1 + drop global.get $~lib/process/process.stdout local.set $1 local.get $1 @@ -5491,6 +5506,8 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + i32.const 1 + drop global.get $~lib/process/process.stdout local.set $1 global.get $~lib/console/timers @@ -5626,6 +5643,8 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + i32.const 1 + drop global.get $~lib/process/process.stdout local.set $1 global.get $~lib/console/timers @@ -5681,6 +5700,8 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + i32.const 1 + drop global.get $~lib/process/process.stdout local.set $1 global.get $~lib/console/timers diff --git a/tests/compiler/std-wasi/console.release.wat b/tests/compiler/std-wasi/console.release.wat index 2b269e8732..ef22e2e656 100644 --- a/tests/compiler/std-wasi/console.release.wat +++ b/tests/compiler/std-wasi/console.release.wat @@ -2040,7 +2040,7 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 4272 - i32.const 178 + i32.const 211 i32.const 16 call $~lib/wasi/index/abort unreachable @@ -2145,7 +2145,7 @@ if i32.const 0 i32.const 4272 - i32.const 184 + i32.const 217 i32.const 3 call $~lib/wasi/index/abort unreachable @@ -2171,7 +2171,7 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 4272 - i32.const 189 + i32.const 222 i32.const 12 call $~lib/wasi/index/abort unreachable @@ -2913,8 +2913,8 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 4272 - i32.const 57 - i32.const 14 + i32.const 75 + i32.const 16 call $~lib/wasi/index/abort unreachable end diff --git a/tests/compiler/std-wasi/crypto.debug.wat b/tests/compiler/std-wasi/crypto.debug.wat index fdf9a175f8..77695ee36d 100644 --- a/tests/compiler/std-wasi/crypto.debug.wat +++ b/tests/compiler/std-wasi/crypto.debug.wat @@ -3595,6 +3595,8 @@ ) (func $~lib/crypto/crypto.getRandomValues (param $0 i32) (local $1 i32) + i32.const 1 + drop local.get $0 i32.load local.get $0 @@ -3611,8 +3613,8 @@ local.get $1 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 3696 - i32.const 9 i32.const 14 + i32.const 16 call $~lib/wasi/index/abort unreachable end @@ -4288,7 +4290,7 @@ local.get $7 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 5696 - i32.const 178 + i32.const 211 i32.const 16 call $~lib/wasi/index/abort unreachable @@ -4317,7 +4319,7 @@ if i32.const 0 i32.const 5696 - i32.const 184 + i32.const 217 i32.const 3 call $~lib/wasi/index/abort unreachable @@ -4347,7 +4349,7 @@ local.get $10 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 5696 - i32.const 189 + i32.const 222 i32.const 12 call $~lib/wasi/index/abort unreachable @@ -4572,6 +4574,8 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + i32.const 1 + drop global.get $~lib/process/process.stdout local.set $1 local.get $1 diff --git a/tests/compiler/std-wasi/crypto.release.wat b/tests/compiler/std-wasi/crypto.release.wat index 61aaf0e9f3..6e995dbb52 100644 --- a/tests/compiler/std-wasi/crypto.release.wat +++ b/tests/compiler/std-wasi/crypto.release.wat @@ -2392,8 +2392,8 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 4720 - i32.const 9 i32.const 14 + i32.const 16 call $~lib/wasi/index/abort unreachable end @@ -3068,7 +3068,7 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 6720 - i32.const 178 + i32.const 211 i32.const 16 call $~lib/wasi/index/abort unreachable @@ -3173,7 +3173,7 @@ if i32.const 0 i32.const 6720 - i32.const 184 + i32.const 217 i32.const 3 call $~lib/wasi/index/abort unreachable @@ -3199,7 +3199,7 @@ local.get $1 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 6720 - i32.const 189 + i32.const 222 i32.const 12 call $~lib/wasi/index/abort unreachable diff --git a/tests/compiler/std-wasi/process.debug.wat b/tests/compiler/std-wasi/process.debug.wat index 8029d25a7e..93f72ce6f5 100644 --- a/tests/compiler/std-wasi/process.debug.wat +++ b/tests/compiler/std-wasi/process.debug.wat @@ -3127,7 +3127,7 @@ local.get $7 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 3200 - i32.const 178 + i32.const 211 i32.const 16 call $~lib/wasi/index/abort unreachable @@ -3156,7 +3156,7 @@ if i32.const 0 i32.const 3200 - i32.const 184 + i32.const 217 i32.const 3 call $~lib/wasi/index/abort unreachable @@ -3186,7 +3186,7 @@ local.get $10 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 3200 - i32.const 189 + i32.const 222 i32.const 12 call $~lib/wasi/index/abort unreachable @@ -4679,6 +4679,8 @@ ) (func $~lib/process/process.time (result i64) (local $0 i32) + i32.const 1 + drop i32.const 0 i64.const 1000000 global.get $~lib/bindings/wasi/tempbuf @@ -4691,8 +4693,8 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 3200 - i32.const 51 - i32.const 14 + i32.const 65 + i32.const 16 call $~lib/wasi/index/abort unreachable end @@ -4700,6 +4702,7 @@ i64.load i64.const 1000000 i64.div_u + return ) (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -5248,6 +5251,8 @@ (func $~lib/process/process.hrtime (result i64) (local $0 i32) i32.const 1 + drop + i32.const 1 i64.const 0 global.get $~lib/bindings/wasi/tempbuf call $~lib/bindings/wasi_snapshot_preview1/clock_time_get @@ -5259,13 +5264,14 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 3200 - i32.const 57 - i32.const 14 + i32.const 75 + i32.const 16 call $~lib/wasi/index/abort unreachable end global.get $~lib/bindings/wasi/tempbuf i64.load + return ) (func $~lib/number/U64#toString (param $0 i64) (param $1 i32) (result i32) local.get $0 @@ -5273,6 +5279,8 @@ call $~lib/util/number/utoa64 ) (func $~lib/process/process.exit (param $0 i32) + i32.const 1 + drop local.get $0 call $~lib/bindings/wasi_snapshot_preview1/proc_exit ) @@ -5301,7 +5309,7 @@ if i32.const 3760 i32.const 3200 - i32.const 135 + i32.const 168 i32.const 7 call $~lib/wasi/index/abort unreachable @@ -5333,7 +5341,7 @@ local.get $4 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 3200 - i32.const 140 + i32.const 173 i32.const 14 call $~lib/wasi/index/abort unreachable @@ -5622,6 +5630,8 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + i32.const 1 + drop global.get $~lib/process/process.stdout local.set $1 local.get $1 @@ -5741,6 +5751,8 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 + i32.const 1 + drop global.get $~lib/bindings/wasi/tempbuf global.get $~lib/bindings/wasi/tempbuf i32.const 4 @@ -5754,8 +5766,8 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 3200 - i32.const 85 - i32.const 12 + i32.const 114 + i32.const 14 call $~lib/wasi/index/abort unreachable end @@ -5789,8 +5801,8 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 3200 - i32.const 92 - i32.const 12 + i32.const 121 + i32.const 14 call $~lib/wasi/index/abort unreachable end @@ -5891,6 +5903,7 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $12 + return ) (func $~lib/map/Map<~lib/string/String,~lib/string/String>#keys (param $0 i32) (result i32) (local $1 i32) @@ -6578,6 +6591,8 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + i32.const 1 + drop global.get $~lib/bindings/wasi/tempbuf global.get $~lib/bindings/wasi/tempbuf i32.const 4 @@ -6591,8 +6606,8 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 3200 - i32.const 64 - i32.const 12 + i32.const 89 + i32.const 14 call $~lib/wasi/index/abort unreachable end @@ -6626,8 +6641,8 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 3200 - i32.const 71 - i32.const 12 + i32.const 96 + i32.const 14 call $~lib/wasi/index/abort unreachable end @@ -6686,6 +6701,7 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $12 + return ) (func $~lib/array/Array<~lib/string/String>#__get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/std-wasi/process.release.wat b/tests/compiler/std-wasi/process.release.wat index 90e413b738..b829a44713 100644 --- a/tests/compiler/std-wasi/process.release.wat +++ b/tests/compiler/std-wasi/process.release.wat @@ -2042,7 +2042,7 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 4224 - i32.const 178 + i32.const 211 i32.const 16 call $~lib/wasi/index/abort unreachable @@ -2147,7 +2147,7 @@ if i32.const 0 i32.const 4224 - i32.const 184 + i32.const 217 i32.const 3 call $~lib/wasi/index/abort unreachable @@ -2173,7 +2173,7 @@ local.get $1 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 4224 - i32.const 189 + i32.const 222 i32.const 12 call $~lib/wasi/index/abort unreachable @@ -3550,8 +3550,8 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 4224 - i32.const 85 - i32.const 12 + i32.const 114 + i32.const 14 call $~lib/wasi/index/abort unreachable end @@ -3587,8 +3587,8 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 4224 - i32.const 92 - i32.const 12 + i32.const 121 + i32.const 14 call $~lib/wasi/index/abort unreachable end @@ -3884,8 +3884,8 @@ local.get $3 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 4224 - i32.const 64 - i32.const 12 + i32.const 89 + i32.const 14 call $~lib/wasi/index/abort unreachable end @@ -3921,8 +3921,8 @@ local.get $4 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 4224 - i32.const 71 - i32.const 12 + i32.const 96 + i32.const 14 call $~lib/wasi/index/abort unreachable end @@ -4186,8 +4186,8 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 4224 - i32.const 51 - i32.const 14 + i32.const 65 + i32.const 16 call $~lib/wasi/index/abort unreachable end @@ -4393,8 +4393,8 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 4224 - i32.const 57 - i32.const 14 + i32.const 75 + i32.const 16 call $~lib/wasi/index/abort unreachable end @@ -4598,7 +4598,7 @@ local.get $0 call $~lib/bindings/wasi_snapshot_preview1/errnoToString i32.const 4224 - i32.const 140 + i32.const 173 i32.const 14 call $~lib/wasi/index/abort unreachable diff --git a/tests/compiler/std/console.debug.wat b/tests/compiler/std/console.debug.wat new file mode 100644 index 0000000000..8f86dfe207 --- /dev/null +++ b/tests/compiler/std/console.debug.wat @@ -0,0 +1,254 @@ +(module + (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (import "env" "console.assert" (func $~lib/bindings/dom/console.assert (param i32 i32))) + (import "env" "console.log" (func $~lib/bindings/dom/console.log (param i32))) + (import "env" "console.debug" (func $~lib/bindings/dom/console.debug (param i32))) + (import "env" "console.info" (func $~lib/bindings/dom/console.info (param i32))) + (import "env" "console.warn" (func $~lib/bindings/dom/console.warn (param i32))) + (import "env" "console.error" (func $~lib/bindings/dom/console.error (param i32))) + (import "env" "console.time" (func $~lib/bindings/dom/console.time (param i32))) + (import "env" "console.timeLog" (func $~lib/bindings/dom/console.timeLog (param i32))) + (import "env" "console.timeEnd" (func $~lib/bindings/dom/console.timeEnd (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $~lib/memory/__data_end i32 (i32.const 588)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16972)) + (global $~lib/memory/__heap_base i32 (i32.const 16972)) + (memory $0 1) + (data (i32.const 12) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00w\00h\00o\00o\00p\00s\00") + (data (i32.const 44) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00p\00h\00e\00w\00\00\00\00\00") + (data (i32.const 76) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00h\00e\00l\00l\00o\00 \00l\00o\00g\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 124) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00d\00e\00b\00u\00g\00\00\00\00\00\00\00") + (data (i32.const 172) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00h\00e\00l\00l\00o\00 \00i\00n\00f\00o\00\00\00\00\00\00\00\00\00") + (data (i32.const 220) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00h\00e\00l\00l\00o\00 \00w\00a\00r\00n\00\00\00\00\00\00\00\00\00") + (data (i32.const 268) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00e\00r\00r\00o\00r\00\00\00\00\00\00\00") + (data (i32.const 316) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00s\00o\00m\00e\00L\00a\00b\00e\00l\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 364) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\14\00\00\00w\00r\00o\00n\00g\00L\00a\00b\00e\00l\00\00\00\00\00\00\00\00\00") + (data (i32.const 412) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00d\00u\00p\00l\00i\00c\00a\00t\00e\00L\00a\00b\00e\00l\00") + (data (i32.const 460) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\001\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 492) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\001\002\00\00\00\00\00\00\00\00\00") + (data (i32.const 524) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\002\003\00\00\00\00\00\00\00") + (data (i32.const 556) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\001\002\003\004\00\00\00\00\00") + (table $0 1 funcref) + (elem $0 (i32.const 1)) + (export "memory" (memory $0)) + (start $~start) + (func $~lib/console/console.assert (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.eqz + i32.eqz + local.get $1 + call $~lib/bindings/dom/console.assert + ) + (func $~lib/console/console.log (param $0 i32) + i32.const 0 + drop + local.get $0 + call $~lib/bindings/dom/console.log + ) + (func $~lib/console/console.debug (param $0 i32) + i32.const 0 + drop + local.get $0 + call $~lib/bindings/dom/console.debug + ) + (func $~lib/console/console.info (param $0 i32) + i32.const 0 + drop + local.get $0 + call $~lib/bindings/dom/console.info + ) + (func $~lib/console/console.warn (param $0 i32) + i32.const 0 + drop + local.get $0 + call $~lib/bindings/dom/console.warn + ) + (func $~lib/console/console.error (param $0 i32) + i32.const 0 + drop + local.get $0 + call $~lib/bindings/dom/console.error + ) + (func $~lib/console/console.time (param $0 i32) + i32.const 0 + drop + local.get $0 + call $~lib/bindings/dom/console.time + ) + (func $~lib/console/console.timeLog (param $0 i32) + i32.const 0 + drop + local.get $0 + call $~lib/bindings/dom/console.timeLog + ) + (func $~lib/console/console.timeEnd (param $0 i32) + i32.const 0 + drop + local.get $0 + call $~lib/bindings/dom/console.timeEnd + ) + (func $~start + call $start:std/console + ) + (func $~stack_check + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__data_end + i32.lt_s + if + i32.const 16992 + i32.const 17040 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $start:std/console + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + i32.const 0 + i32.const 32 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/console/console.assert + i32.const 1 + i32.const 64 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/console/console.assert + i32.const 96 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.log + i32.const 144 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.debug + i32.const 192 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.info + i32.const 240 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.warn + i32.const 288 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.error + i32.const 336 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.time + i32.const 336 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.timeLog + i32.const 336 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.timeEnd + i32.const 384 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.timeLog + i32.const 384 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.timeEnd + i32.const 432 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.time + i32.const 432 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.time + i32.const 480 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.log + i32.const 512 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.log + i32.const 544 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.log + i32.const 576 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + call $~lib/console/console.log + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) +) diff --git a/tests/compiler/std/console.json b/tests/compiler/std/console.json new file mode 100644 index 0000000000..23ec5535fe --- /dev/null +++ b/tests/compiler/std/console.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + ], + "skipInstantiate": true +} diff --git a/tests/compiler/std/console.release.wat b/tests/compiler/std/console.release.wat new file mode 100644 index 0000000000..1e444eb7dc --- /dev/null +++ b/tests/compiler/std/console.release.wat @@ -0,0 +1,166 @@ +(module + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (import "env" "console.assert" (func $~lib/bindings/dom/console.assert (param i32 i32))) + (import "env" "console.log" (func $~lib/bindings/dom/console.log (param i32))) + (import "env" "console.debug" (func $~lib/bindings/dom/console.debug (param i32))) + (import "env" "console.info" (func $~lib/bindings/dom/console.info (param i32))) + (import "env" "console.warn" (func $~lib/bindings/dom/console.warn (param i32))) + (import "env" "console.error" (func $~lib/bindings/dom/console.error (param i32))) + (import "env" "console.time" (func $~lib/bindings/dom/console.time (param i32))) + (import "env" "console.timeLog" (func $~lib/bindings/dom/console.timeLog (param i32))) + (import "env" "console.timeEnd" (func $~lib/bindings/dom/console.timeEnd (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17996)) + (memory $0 1) + (data (i32.const 1036) "\1c") + (data (i32.const 1048) "\01\00\00\00\0c\00\00\00w\00h\00o\00o\00p\00s") + (data (i32.const 1068) "\1c") + (data (i32.const 1080) "\01\00\00\00\08\00\00\00p\00h\00e\00w") + (data (i32.const 1100) ",") + (data (i32.const 1112) "\01\00\00\00\12\00\00\00h\00e\00l\00l\00o\00 \00l\00o\00g") + (data (i32.const 1148) ",") + (data (i32.const 1160) "\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00d\00e\00b\00u\00g") + (data (i32.const 1196) ",") + (data (i32.const 1208) "\01\00\00\00\14\00\00\00h\00e\00l\00l\00o\00 \00i\00n\00f\00o") + (data (i32.const 1244) ",") + (data (i32.const 1256) "\01\00\00\00\14\00\00\00h\00e\00l\00l\00o\00 \00w\00a\00r\00n") + (data (i32.const 1292) ",") + (data (i32.const 1304) "\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00e\00r\00r\00o\00r") + (data (i32.const 1340) ",") + (data (i32.const 1352) "\01\00\00\00\12\00\00\00s\00o\00m\00e\00L\00a\00b\00e\00l") + (data (i32.const 1388) ",") + (data (i32.const 1400) "\01\00\00\00\14\00\00\00w\00r\00o\00n\00g\00L\00a\00b\00e\00l") + (data (i32.const 1436) ",") + (data (i32.const 1448) "\01\00\00\00\1c\00\00\00d\00u\00p\00l\00i\00c\00a\00t\00e\00L\00a\00b\00e\00l") + (data (i32.const 1484) "\1c") + (data (i32.const 1496) "\01\00\00\00\02\00\00\001") + (data (i32.const 1516) "\1c") + (data (i32.const 1528) "\01\00\00\00\04\00\00\001\002") + (data (i32.const 1548) "\1c") + (data (i32.const 1560) "\01\00\00\00\06\00\00\001\002\003") + (data (i32.const 1580) "\1c") + (data (i32.const 1592) "\01\00\00\00\08\00\00\001\002\003\004") + (export "memory" (memory $0)) + (start $~start) + (func $~start + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1612 + i32.lt_s + if + i32.const 18016 + i32.const 18064 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.tee $0 + i64.const 0 + i64.store + local.get $0 + i32.const 1056 + i32.store + i32.const 0 + i32.const 1056 + call $~lib/bindings/dom/console.assert + global.get $~lib/memory/__stack_pointer + i32.const 1088 + i32.store + i32.const 1 + i32.const 1088 + call $~lib/bindings/dom/console.assert + global.get $~lib/memory/__stack_pointer + i32.const 1120 + i32.store offset=4 + i32.const 1120 + call $~lib/bindings/dom/console.log + global.get $~lib/memory/__stack_pointer + i32.const 1168 + i32.store offset=4 + i32.const 1168 + call $~lib/bindings/dom/console.debug + global.get $~lib/memory/__stack_pointer + i32.const 1216 + i32.store offset=4 + i32.const 1216 + call $~lib/bindings/dom/console.info + global.get $~lib/memory/__stack_pointer + i32.const 1264 + i32.store offset=4 + i32.const 1264 + call $~lib/bindings/dom/console.warn + global.get $~lib/memory/__stack_pointer + i32.const 1312 + i32.store offset=4 + i32.const 1312 + call $~lib/bindings/dom/console.error + global.get $~lib/memory/__stack_pointer + i32.const 1360 + i32.store offset=4 + i32.const 1360 + call $~lib/bindings/dom/console.time + global.get $~lib/memory/__stack_pointer + i32.const 1360 + i32.store offset=4 + i32.const 1360 + call $~lib/bindings/dom/console.timeLog + global.get $~lib/memory/__stack_pointer + i32.const 1360 + i32.store offset=4 + i32.const 1360 + call $~lib/bindings/dom/console.timeEnd + global.get $~lib/memory/__stack_pointer + i32.const 1408 + i32.store offset=4 + i32.const 1408 + call $~lib/bindings/dom/console.timeLog + global.get $~lib/memory/__stack_pointer + i32.const 1408 + i32.store offset=4 + i32.const 1408 + call $~lib/bindings/dom/console.timeEnd + global.get $~lib/memory/__stack_pointer + i32.const 1456 + i32.store offset=4 + i32.const 1456 + call $~lib/bindings/dom/console.time + global.get $~lib/memory/__stack_pointer + i32.const 1456 + i32.store offset=4 + i32.const 1456 + call $~lib/bindings/dom/console.time + global.get $~lib/memory/__stack_pointer + i32.const 1504 + i32.store offset=4 + i32.const 1504 + call $~lib/bindings/dom/console.log + global.get $~lib/memory/__stack_pointer + i32.const 1536 + i32.store offset=4 + i32.const 1536 + call $~lib/bindings/dom/console.log + global.get $~lib/memory/__stack_pointer + i32.const 1568 + i32.store offset=4 + i32.const 1568 + call $~lib/bindings/dom/console.log + global.get $~lib/memory/__stack_pointer + i32.const 1600 + i32.store offset=4 + i32.const 1600 + call $~lib/bindings/dom/console.log + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) +) diff --git a/tests/compiler/std/console.ts b/tests/compiler/std/console.ts new file mode 100644 index 0000000000..5fb2e20514 --- /dev/null +++ b/tests/compiler/std/console.ts @@ -0,0 +1,25 @@ +// asserts +console.assert(false, "whoops"); +console.assert(true, "phew"); + +// prefixes +console.log("hello log"); +console.debug("hello debug"); +console.info("hello info"); +console.warn("hello warn"); +console.error("hello error"); + +// timers +console.time("someLabel"); +console.timeLog("someLabel"); +console.timeEnd("someLabel"); +console.timeLog("wrongLabel"); +console.timeEnd("wrongLabel"); +console.time("duplicateLabel"); +console.time("duplicateLabel"); + +// fast writes +console.log("1"); +console.log("12"); +console.log("123"); +console.log("1234"); From 45f4ee8da8ffd4cd55cfec009d9dc64c87653527 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 10 Feb 2022 12:58:03 +0100 Subject: [PATCH 172/175] reorganize some bindings --- std/assembly/bindings/Date.ts | 1 - std/assembly/bindings/Math.ts | 44 - std/assembly/bindings/Reflect.ts | 4 - std/assembly/bindings/console.ts | 10 - std/assembly/date.ts | 4 +- std/assembly/index.d.ts | 5 + std/assembly/math.ts | 2 +- std/assembly/performance.ts | 22 + tests/compiler.js | 27 +- tests/compiler/bindings/esm.debug.js | 2 +- tests/compiler/bindings/esm.debug.wat | 2 +- tests/compiler/bindings/esm.release.js | 2 +- tests/compiler/bindings/esm.release.wat | 2 +- tests/compiler/bindings/esm.ts | 2 +- tests/compiler/bindings/raw.debug.js | 2 +- tests/compiler/bindings/raw.debug.wat | 2 +- tests/compiler/bindings/raw.release.js | 2 +- tests/compiler/bindings/raw.release.wat | 2 +- .../features/reference-types.debug.wat | 82 +- .../features/reference-types.release.wat | 46 +- tests/compiler/features/reference-types.ts | 17 - tests/compiler/std/array.debug.wat | 4 +- tests/compiler/std/array.release.wat | 4 +- tests/compiler/std/math.debug.wat | 208 +-- tests/compiler/std/math.release.wat | 1398 ++++++++--------- 25 files changed, 900 insertions(+), 996 deletions(-) delete mode 100644 std/assembly/bindings/Date.ts delete mode 100644 std/assembly/bindings/Math.ts delete mode 100644 std/assembly/bindings/Reflect.ts delete mode 100644 std/assembly/bindings/console.ts create mode 100644 std/assembly/performance.ts diff --git a/std/assembly/bindings/Date.ts b/std/assembly/bindings/Date.ts deleted file mode 100644 index e6a6a9bb54..0000000000 --- a/std/assembly/bindings/Date.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function now(): f64; diff --git a/std/assembly/bindings/Math.ts b/std/assembly/bindings/Math.ts deleted file mode 100644 index 6e38741463..0000000000 --- a/std/assembly/bindings/Math.ts +++ /dev/null @@ -1,44 +0,0 @@ -export declare const E: f64; -export declare const LN2: f64; -export declare const LN10: f64; -export declare const LOG2E: f64; -export declare const LOG10E: f64; -export declare const PI: f64; -export declare const SQRT1_2: f64; -export declare const SQRT2: f64; - -export declare function abs(x: f64): f64; -export declare function acos(x: f64): f64; -export declare function acosh(x: f64): f64; -export declare function asin(x: f64): f64; -export declare function asinh(x: f64): f64; -export declare function atan(x: f64): f64; -export declare function atan2(y: f64, x: f64): f64; -export declare function atanh(x: f64): f64; -export declare function cbrt(x: f64): f64; -export declare function ceil(x: f64): f64; -export declare function clz32(x: f64): f64; -export declare function cos(x: f64): f64; -export declare function cosh(x: f64): f64; -export declare function exp(x: f64): f64; -export declare function expm1(x: f64): f64; -export declare function floor(x: f64): f64; -export declare function fround(x: f64): f32; -export declare function hypot(value1: f64, value2: f64): f64; // TODO: rest -export declare function imul(a: f64, b: f64): f64; -export declare function log(x: f64): f64; -export declare function log10(x: f64): f64; -export declare function log1p(x: f64): f64; -export declare function log2(x: f64): f64; -export declare function max(value1: f64, value2: f64): f64; // TODO: rest -export declare function min(value1: f64, value2: f64): f64; // TODO: rest -export declare function pow(base: f64, exponent: f64): f64; -export declare function random(): f64; -export declare function round(x: f64): f64; -export declare function sign(x: f64): f64; -export declare function sin(x: f64): f64; -export declare function sinh(x: f64): f64; -export declare function sqrt(x: f64): f64; -export declare function tan(x: f64): f64; -export declare function tanh(x: f64): f64; -export declare function trunc(x: f64): f64; diff --git a/std/assembly/bindings/Reflect.ts b/std/assembly/bindings/Reflect.ts deleted file mode 100644 index 411833bf23..0000000000 --- a/std/assembly/bindings/Reflect.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare function get(target: externref, propertyKey: externref/* , receiver: externref */): externref; -export declare function has(target: externref, propertyKey: externref): bool; -export declare function set(target: externref, propertyKey: externref, value: externref/* , receiver: externref */): externref; -export declare function apply(target: externref, thisArgument: externref, argumentsList: externref): externref; diff --git a/std/assembly/bindings/console.ts b/std/assembly/bindings/console.ts deleted file mode 100644 index 8dea45426d..0000000000 --- a/std/assembly/bindings/console.ts +++ /dev/null @@ -1,10 +0,0 @@ -export declare function assert(value: externref): void; -export declare function clear(): void; -export declare function error(value: externref): void; -export declare function info(value: externref): void; -export declare function log(value: externref): void; -export declare function time(label: externref): externref; -export declare function timeEnd(label: externref): void; -export declare function timeLog(label: externref): void; -export declare function trace(): void; -export declare function warn(value: externref): void; diff --git a/std/assembly/date.ts b/std/assembly/date.ts index 8f219b7100..53d83c4476 100644 --- a/std/assembly/date.ts +++ b/std/assembly/date.ts @@ -1,5 +1,5 @@ import { E_INVALIDDATE } from "util/error"; -import { now as Date_now } from "./bindings/Date"; +import { Date as Date_binding } from "./bindings/dom"; // @ts-ignore: decorator @inline const @@ -33,7 +33,7 @@ export class Date { } @inline static now(): i64 { - return Date_now(); + return Date_binding.now(); } // It can parse only ISO 8601 inputs like YYYY-MM-DDTHH:MM:SS.000Z diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index b660494d93..54d47259f9 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -1843,6 +1843,11 @@ declare class Object { static is(value1: T, value2: T): bool; } +declare namespace performance { + /** Gets a high resolution timestamp measured in milliseconds. */ + export function now(): f64; +} + declare class Date { /** Returns the UTC timestamp in milliseconds of the specified date. */ static UTC( diff --git a/std/assembly/math.ts b/std/assembly/math.ts index 7ed89ca755..c934e9dce7 100644 --- a/std/assembly/math.ts +++ b/std/assembly/math.ts @@ -1,4 +1,4 @@ -import * as JSMath from "./bindings/Math"; +import { Math as JSMath } from "./bindings/dom"; export { JSMath }; import { diff --git a/std/assembly/performance.ts b/std/assembly/performance.ts new file mode 100644 index 0000000000..b53ddb5ae5 --- /dev/null +++ b/std/assembly/performance.ts @@ -0,0 +1,22 @@ +import { + clock_time_get, + clockid, + errnoToString, + tempbuf +} from "bindings/wasi"; + +import { + performance as performance_binding +} from "bindings/dom"; + +export namespace performance { + export function now(): f64 { + if (isDefined(ASC_WASI)) { + let err = clock_time_get(clockid.MONOTONIC, 1000, tempbuf); // TODO: more precision? + if (err) throw new Error(errnoToString(err)); + return load(tempbuf) / 1000000; + } else { + return performance_binding.now(); + } + } +} diff --git a/tests/compiler.js b/tests/compiler.js index 2c4c361f82..510b788a63 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -376,6 +376,21 @@ async function testInstantiate(binaryBuffer, glue, stderr, wasiOptions) { } }); + function toEnv(name, ref) { + let env = {}; + for (let key of Object.getOwnPropertyNames(ref)) env[`${name}.${key}`] = ref[key]; + let prototype = ref.prototype; + if (prototype) { + for (const key of Object.getOwnPropertyNames(prototype)) { + const original = prototype[key]; + env[`${name}#${key}`] = (thisArg, ...args) => { + return original.apply(thisArg, args); + }; + } + } + return env; + } + const imports = rtrace.install({ env: Object.assign({}, globalThis, { memory, @@ -391,13 +406,13 @@ async function testInstantiate(binaryBuffer, glue, stderr, wasiOptions) { visit: function() { // override in tests }, - "Date#getTimezoneOffset"() { + "Date.getTimezoneOffset"() { + // @external.js in bindings tests return new Date().getTimezoneOffset(); - } - }), - Math, - Date, - Reflect + }, + ...toEnv("Date", Date), + ...toEnv("Math", Math) + }) }); if (glue.preInstantiate) { diff --git a/tests/compiler/bindings/esm.debug.js b/tests/compiler/bindings/esm.debug.js index 155fbdd315..b9f1a03a29 100644 --- a/tests/compiler/bindings/esm.debug.js +++ b/tests/compiler/bindings/esm.debug.js @@ -18,7 +18,7 @@ async function instantiate(module, imports = {}) { // bindings/esm/immutableGlobalNested: externref globalThis.globalThis )(), - "Date#getTimezoneOffset"() { + "Date.getTimezoneOffset"() { // bindings/esm/Date_getTimezoneOffset() => i32 return (() => { // @external.js diff --git a/tests/compiler/bindings/esm.debug.wat b/tests/compiler/bindings/esm.debug.wat index 133f7ab35b..bffd1a2eb9 100644 --- a/tests/compiler/bindings/esm.debug.wat +++ b/tests/compiler/bindings/esm.debug.wat @@ -19,7 +19,7 @@ (import "env" "globalThis.globalThis" (global $bindings/esm/immutableGlobalNested externref)) (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (import "env" "console.log" (func $~lib/bindings/dom/console.log (param i32))) - (import "env" "Date#getTimezoneOffset" (func $bindings/esm/Date_getTimezoneOffset (result i32))) + (import "env" "Date.getTimezoneOffset" (func $bindings/esm/Date_getTimezoneOffset (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $bindings/esm/plainGlobal i32 (i32.const 1)) (global $bindings/esm/plainMutableGlobal (mut i32) (i32.const 2)) diff --git a/tests/compiler/bindings/esm.release.js b/tests/compiler/bindings/esm.release.js index a3725960c0..f531cf96da 100644 --- a/tests/compiler/bindings/esm.release.js +++ b/tests/compiler/bindings/esm.release.js @@ -18,7 +18,7 @@ async function instantiate(module, imports = {}) { // bindings/esm/immutableGlobalNested: externref globalThis.globalThis )(), - "Date#getTimezoneOffset"() { + "Date.getTimezoneOffset"() { // bindings/esm/Date_getTimezoneOffset() => i32 return (() => { // @external.js diff --git a/tests/compiler/bindings/esm.release.wat b/tests/compiler/bindings/esm.release.wat index ab57908bdd..623031690b 100644 --- a/tests/compiler/bindings/esm.release.wat +++ b/tests/compiler/bindings/esm.release.wat @@ -12,7 +12,7 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (import "env" "console.log" (func $~lib/bindings/dom/console.log (param i32))) - (import "env" "Date#getTimezoneOffset" (func $bindings/esm/Date_getTimezoneOffset (result i32))) + (import "env" "Date.getTimezoneOffset" (func $bindings/esm/Date_getTimezoneOffset (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $bindings/esm/plainGlobal i32 (i32.const 1)) (global $bindings/esm/plainMutableGlobal (mut i32) (i32.const 2)) diff --git a/tests/compiler/bindings/esm.ts b/tests/compiler/bindings/esm.ts index fb2621e1ee..d19e3ee6e2 100644 --- a/tests/compiler/bindings/esm.ts +++ b/tests/compiler/bindings/esm.ts @@ -129,7 +129,7 @@ immutableGlobal; immutableGlobalNested; // @ts-ignore -@external("env", "Date#getTimezoneOffset") +@external("env", "Date.getTimezoneOffset") @external.js("return new Date().getTimezoneOffset();") declare function Date_getTimezoneOffset(): i32; diff --git a/tests/compiler/bindings/raw.debug.js b/tests/compiler/bindings/raw.debug.js index f3b585e83f..0708464670 100644 --- a/tests/compiler/bindings/raw.debug.js +++ b/tests/compiler/bindings/raw.debug.js @@ -18,7 +18,7 @@ export async function instantiate(module, imports = {}) { // bindings/esm/immutableGlobalNested: externref globalThis.globalThis )(), - "Date#getTimezoneOffset"() { + "Date.getTimezoneOffset"() { // bindings/esm/Date_getTimezoneOffset() => i32 return (() => { // @external.js diff --git a/tests/compiler/bindings/raw.debug.wat b/tests/compiler/bindings/raw.debug.wat index 57494a7066..b8b0a36c97 100644 --- a/tests/compiler/bindings/raw.debug.wat +++ b/tests/compiler/bindings/raw.debug.wat @@ -19,7 +19,7 @@ (import "env" "globalThis.globalThis" (global $bindings/esm/immutableGlobalNested externref)) (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (import "env" "console.log" (func $~lib/bindings/dom/console.log (param i32))) - (import "env" "Date#getTimezoneOffset" (func $bindings/esm/Date_getTimezoneOffset (result i32))) + (import "env" "Date.getTimezoneOffset" (func $bindings/esm/Date_getTimezoneOffset (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $bindings/esm/plainGlobal i32 (i32.const 1)) (global $bindings/esm/plainMutableGlobal (mut i32) (i32.const 2)) diff --git a/tests/compiler/bindings/raw.release.js b/tests/compiler/bindings/raw.release.js index f3b585e83f..0708464670 100644 --- a/tests/compiler/bindings/raw.release.js +++ b/tests/compiler/bindings/raw.release.js @@ -18,7 +18,7 @@ export async function instantiate(module, imports = {}) { // bindings/esm/immutableGlobalNested: externref globalThis.globalThis )(), - "Date#getTimezoneOffset"() { + "Date.getTimezoneOffset"() { // bindings/esm/Date_getTimezoneOffset() => i32 return (() => { // @external.js diff --git a/tests/compiler/bindings/raw.release.wat b/tests/compiler/bindings/raw.release.wat index 6a97df1d3d..84c687adb6 100644 --- a/tests/compiler/bindings/raw.release.wat +++ b/tests/compiler/bindings/raw.release.wat @@ -12,7 +12,7 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (import "env" "console.log" (func $~lib/bindings/dom/console.log (param i32))) - (import "env" "Date#getTimezoneOffset" (func $bindings/esm/Date_getTimezoneOffset (result i32))) + (import "env" "Date.getTimezoneOffset" (func $bindings/esm/Date_getTimezoneOffset (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $bindings/esm/plainGlobal i32 (i32.const 1)) (global $bindings/esm/plainMutableGlobal (mut i32) (i32.const 2)) diff --git a/tests/compiler/features/reference-types.debug.wat b/tests/compiler/features/reference-types.debug.wat index 5bd3683a6a..0f89b35fd6 100644 --- a/tests/compiler/features/reference-types.debug.wat +++ b/tests/compiler/features/reference-types.debug.wat @@ -2,17 +2,9 @@ (type $none_=>_none (func)) (type $none_=>_externref (func (result externref))) (type $externref_=>_externref (func (param externref) (result externref))) - (type $externref_externref_=>_i32 (func (param externref externref) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $externref_=>_none (func (param externref))) - (type $externref_externref_=>_externref (func (param externref externref) (result externref))) - (import "reference-types" "someObject" (global $features/reference-types/someObject externref)) - (import "reference-types" "someKey" (global $features/reference-types/someKey externref)) - (import "Reflect" "has" (func $~lib/bindings/Reflect/has (param externref externref) (result i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "console" "log" (func $~lib/bindings/console/log (param externref))) - (import "Reflect" "get" (func $~lib/bindings/Reflect/get (param externref externref) (result externref))) (import "reference-types" "somethingReal" (func $features/reference-types/somethingReal (result externref))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "reference-types" "somethingNull" (func $features/reference-types/somethingNull (result externref))) (import "reference-types" "external" (func $features/reference-types/external (param externref) (result externref))) (global $features/reference-types/funcGlobal (mut funcref) (ref.null func)) @@ -47,7 +39,7 @@ if i32.const 0 i32.const 32 - i32.const 94 + i32.const 77 i32.const 3 call $~lib/builtins/abort unreachable @@ -62,7 +54,7 @@ if i32.const 0 i32.const 32 - i32.const 96 + i32.const 79 i32.const 3 call $~lib/builtins/abort unreachable @@ -77,7 +69,7 @@ if i32.const 0 i32.const 32 - i32.const 98 + i32.const 81 i32.const 3 call $~lib/builtins/abort unreachable @@ -94,7 +86,7 @@ if i32.const 0 i32.const 32 - i32.const 94 + i32.const 77 i32.const 3 call $~lib/builtins/abort unreachable @@ -109,7 +101,7 @@ if i32.const 0 i32.const 32 - i32.const 96 + i32.const 79 i32.const 3 call $~lib/builtins/abort unreachable @@ -124,7 +116,7 @@ if i32.const 0 i32.const 32 - i32.const 98 + i32.const 81 i32.const 3 call $~lib/builtins/abort unreachable @@ -141,7 +133,7 @@ if i32.const 0 i32.const 32 - i32.const 94 + i32.const 77 i32.const 3 call $~lib/builtins/abort unreachable @@ -156,7 +148,7 @@ if i32.const 0 i32.const 32 - i32.const 96 + i32.const 79 i32.const 3 call $~lib/builtins/abort unreachable @@ -171,7 +163,7 @@ if i32.const 0 i32.const 32 - i32.const 98 + i32.const 81 i32.const 3 call $~lib/builtins/abort unreachable @@ -182,28 +174,6 @@ ) (func $start:features/reference-types (local $0 funcref) - global.get $features/reference-types/someObject - global.get $features/reference-types/someKey - call $~lib/bindings/Reflect/has - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 21 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $features/reference-types/someObject - call $~lib/bindings/console/log - global.get $features/reference-types/someKey - call $~lib/bindings/console/log - global.get $features/reference-types/someObject - global.get $features/reference-types/someKey - call $~lib/bindings/Reflect/get - call $~lib/bindings/console/log call $features/reference-types/somethingReal ref.is_null i32.eqz @@ -214,7 +184,7 @@ if i32.const 0 i32.const 32 - i32.const 33 + i32.const 16 i32.const 3 call $~lib/builtins/abort unreachable @@ -232,7 +202,7 @@ if i32.const 0 i32.const 32 - i32.const 38 + i32.const 21 i32.const 3 call $~lib/builtins/abort unreachable @@ -249,7 +219,7 @@ if i32.const 0 i32.const 32 - i32.const 43 + i32.const 26 i32.const 3 call $~lib/builtins/abort unreachable @@ -264,7 +234,7 @@ if i32.const 0 i32.const 32 - i32.const 46 + i32.const 29 i32.const 3 call $~lib/builtins/abort unreachable @@ -278,7 +248,7 @@ if i32.const 0 i32.const 32 - i32.const 72 + i32.const 55 i32.const 1 call $~lib/builtins/abort unreachable @@ -293,7 +263,7 @@ if i32.const 0 i32.const 32 - i32.const 74 + i32.const 57 i32.const 1 call $~lib/builtins/abort unreachable @@ -308,7 +278,7 @@ if i32.const 0 i32.const 32 - i32.const 76 + i32.const 59 i32.const 1 call $~lib/builtins/abort unreachable @@ -321,7 +291,7 @@ if i32.const 0 i32.const 32 - i32.const 79 + i32.const 62 i32.const 1 call $~lib/builtins/abort unreachable @@ -336,7 +306,7 @@ if i32.const 0 i32.const 32 - i32.const 81 + i32.const 64 i32.const 1 call $~lib/builtins/abort unreachable @@ -351,7 +321,7 @@ if i32.const 0 i32.const 32 - i32.const 83 + i32.const 66 i32.const 1 call $~lib/builtins/abort unreachable @@ -364,7 +334,7 @@ if i32.const 0 i32.const 32 - i32.const 86 + i32.const 69 i32.const 1 call $~lib/builtins/abort unreachable @@ -379,7 +349,7 @@ if i32.const 0 i32.const 32 - i32.const 88 + i32.const 71 i32.const 1 call $~lib/builtins/abort unreachable @@ -394,7 +364,7 @@ if i32.const 0 i32.const 32 - i32.const 90 + i32.const 73 i32.const 1 call $~lib/builtins/abort unreachable @@ -409,7 +379,7 @@ if i32.const 0 i32.const 32 - i32.const 108 + i32.const 91 i32.const 1 call $~lib/builtins/abort unreachable @@ -421,7 +391,7 @@ if i32.const 0 i32.const 32 - i32.const 110 + i32.const 93 i32.const 1 call $~lib/builtins/abort unreachable @@ -434,7 +404,7 @@ if i32.const 0 i32.const 32 - i32.const 113 + i32.const 96 i32.const 3 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/features/reference-types.release.wat b/tests/compiler/features/reference-types.release.wat index 70b16e1b82..e6d211b914 100644 --- a/tests/compiler/features/reference-types.release.wat +++ b/tests/compiler/features/reference-types.release.wat @@ -2,17 +2,9 @@ (type $none_=>_externref (func (result externref))) (type $none_=>_none (func)) (type $externref_=>_externref (func (param externref) (result externref))) - (type $externref_externref_=>_i32 (func (param externref externref) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $externref_=>_none (func (param externref))) - (type $externref_externref_=>_externref (func (param externref externref) (result externref))) - (import "reference-types" "someObject" (global $features/reference-types/someObject externref)) - (import "reference-types" "someKey" (global $features/reference-types/someKey externref)) - (import "Reflect" "has" (func $~lib/bindings/Reflect/has (param externref externref) (result i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "console" "log" (func $~lib/bindings/console/log (param externref))) - (import "Reflect" "get" (func $~lib/bindings/Reflect/get (param externref externref) (result externref))) (import "reference-types" "somethingReal" (func $features/reference-types/somethingReal (result externref))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "reference-types" "somethingNull" (func $features/reference-types/somethingNull (result externref))) (import "reference-types" "external" (func $features/reference-types/external (param externref) (result externref))) (global $features/reference-types/funcGlobal (mut funcref) (ref.null func)) @@ -37,36 +29,12 @@ call $features/reference-types/external ) (func $~start - (local $0 externref) - (local $1 externref) - global.get $features/reference-types/someObject - global.get $features/reference-types/someKey - call $~lib/bindings/Reflect/has - i32.eqz - if - i32.const 0 - i32.const 1056 - i32.const 21 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $features/reference-types/someObject - local.tee $0 - call $~lib/bindings/console/log - global.get $features/reference-types/someKey - local.tee $1 - call $~lib/bindings/console/log - local.get $0 - local.get $1 - call $~lib/bindings/Reflect/get - call $~lib/bindings/console/log call $features/reference-types/somethingReal ref.is_null if i32.const 0 i32.const 1056 - i32.const 33 + i32.const 16 i32.const 3 call $~lib/builtins/abort unreachable @@ -77,7 +45,7 @@ if i32.const 0 i32.const 1056 - i32.const 38 + i32.const 21 i32.const 3 call $~lib/builtins/abort unreachable @@ -87,7 +55,7 @@ if i32.const 0 i32.const 1056 - i32.const 43 + i32.const 26 i32.const 3 call $~lib/builtins/abort unreachable @@ -98,7 +66,7 @@ if i32.const 0 i32.const 1056 - i32.const 46 + i32.const 29 i32.const 3 call $~lib/builtins/abort unreachable @@ -109,7 +77,7 @@ if i32.const 0 i32.const 1056 - i32.const 72 + i32.const 55 i32.const 1 call $~lib/builtins/abort unreachable @@ -122,7 +90,7 @@ if i32.const 0 i32.const 1056 - i32.const 86 + i32.const 69 i32.const 1 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/features/reference-types.ts b/tests/compiler/features/reference-types.ts index 8522e174fa..2d03fd2303 100644 --- a/tests/compiler/features/reference-types.ts +++ b/tests/compiler/features/reference-types.ts @@ -11,23 +11,6 @@ export function internal(a: externref): externref { return d; } -// can use reflection to work with externref values - -import * as Reflect from "bindings/Reflect"; - -declare const someObject: externref; -declare const someKey: externref; - -assert(Reflect.has(someObject, someKey)); - -// can call JS bindings with externref values - -import * as console from "bindings/console"; - -console.log(someObject); -console.log(someKey); -console.log(Reflect.get(someObject, someKey)); - // Truthiness conversion if(!somethingReal()) { assert(false); diff --git a/tests/compiler/std/array.debug.wat b/tests/compiler/std/array.debug.wat index 37d2ca75d0..fec743e019 100644 --- a/tests/compiler/std/array.debug.wat +++ b/tests/compiler/std/array.debug.wat @@ -31,7 +31,7 @@ (type $i64_=>_i32 (func (param i64) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) + (import "env" "Math.random" (func $~lib/bindings/dom/Math.random (result f64))) (import "env" "seed" (func $~lib/builtins/seed (result f64))) (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) @@ -28873,7 +28873,7 @@ i32.const 3 call $~lib/array/Array#push drop - call $~lib/bindings/Math/random + call $~lib/bindings/dom/Math.random i64.reinterpret_f64 call $~lib/math/NativeMath.seedRandom global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/std/array.release.wat b/tests/compiler/std/array.release.wat index 335dc05e7e..a95e6b784c 100644 --- a/tests/compiler/std/array.release.wat +++ b/tests/compiler/std/array.release.wat @@ -22,7 +22,7 @@ (type $i32_i64_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i64 i32 i64 i32) (result i32))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) + (import "env" "Math.random" (func $~lib/bindings/dom/Math.random (result f64))) (import "env" "seed" (func $~lib/builtins/seed (result f64))) (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) @@ -21800,7 +21800,7 @@ i32.const 3 call $~lib/array/Array#push i64.const -7046029254386353131 - call $~lib/bindings/Math/random + call $~lib/bindings/dom/Math.random i64.reinterpret_f64 local.tee $5 local.get $5 diff --git a/tests/compiler/std/math.debug.wat b/tests/compiler/std/math.debug.wat index 14b266d8ac..af18fb79b3 100644 --- a/tests/compiler/std/math.debug.wat +++ b/tests/compiler/std/math.debug.wat @@ -28,46 +28,46 @@ (type $i64_i64_i64_i64_i64_i32_=>_i32 (func (param i64 i64 i64 i64 i64 i32) (result i32))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (import "Math" "E" (global $~lib/bindings/Math/E f64)) - (import "Math" "LN2" (global $~lib/bindings/Math/LN2 f64)) - (import "Math" "LN10" (global $~lib/bindings/Math/LN10 f64)) - (import "Math" "LOG2E" (global $~lib/bindings/Math/LOG2E f64)) - (import "Math" "PI" (global $~lib/bindings/Math/PI f64)) - (import "Math" "SQRT1_2" (global $~lib/bindings/Math/SQRT1_2 f64)) - (import "Math" "SQRT2" (global $~lib/bindings/Math/SQRT2 f64)) + (import "env" "Math.E" (global $~lib/bindings/dom/Math.E f64)) + (import "env" "Math.LN2" (global $~lib/bindings/dom/Math.LN2 f64)) + (import "env" "Math.LN10" (global $~lib/bindings/dom/Math.LN10 f64)) + (import "env" "Math.LOG2E" (global $~lib/bindings/dom/Math.LOG2E f64)) + (import "env" "Math.PI" (global $~lib/bindings/dom/Math.PI f64)) + (import "env" "Math.SQRT1_2" (global $~lib/bindings/dom/Math.SQRT1_2 f64)) + (import "env" "Math.SQRT2" (global $~lib/bindings/dom/Math.SQRT2 f64)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "Math" "abs" (func $~lib/bindings/Math/abs (param f64) (result f64))) - (import "Math" "acos" (func $~lib/bindings/Math/acos (param f64) (result f64))) - (import "Math" "acosh" (func $~lib/bindings/Math/acosh (param f64) (result f64))) - (import "Math" "asin" (func $~lib/bindings/Math/asin (param f64) (result f64))) - (import "Math" "asinh" (func $~lib/bindings/Math/asinh (param f64) (result f64))) - (import "Math" "atan" (func $~lib/bindings/Math/atan (param f64) (result f64))) - (import "Math" "atanh" (func $~lib/bindings/Math/atanh (param f64) (result f64))) - (import "Math" "atan2" (func $~lib/bindings/Math/atan2 (param f64 f64) (result f64))) - (import "Math" "cbrt" (func $~lib/bindings/Math/cbrt (param f64) (result f64))) - (import "Math" "ceil" (func $~lib/bindings/Math/ceil (param f64) (result f64))) - (import "Math" "cos" (func $~lib/bindings/Math/cos (param f64) (result f64))) - (import "Math" "cosh" (func $~lib/bindings/Math/cosh (param f64) (result f64))) - (import "Math" "exp" (func $~lib/bindings/Math/exp (param f64) (result f64))) - (import "Math" "expm1" (func $~lib/bindings/Math/expm1 (param f64) (result f64))) - (import "Math" "pow" (func $~lib/bindings/Math/pow (param f64 f64) (result f64))) - (import "Math" "floor" (func $~lib/bindings/Math/floor (param f64) (result f64))) - (import "Math" "log" (func $~lib/bindings/Math/log (param f64) (result f64))) - (import "Math" "log10" (func $~lib/bindings/Math/log10 (param f64) (result f64))) - (import "Math" "log1p" (func $~lib/bindings/Math/log1p (param f64) (result f64))) - (import "Math" "log2" (func $~lib/bindings/Math/log2 (param f64) (result f64))) - (import "Math" "max" (func $~lib/bindings/Math/max (param f64 f64) (result f64))) - (import "Math" "min" (func $~lib/bindings/Math/min (param f64 f64) (result f64))) + (import "env" "Math.abs" (func $~lib/bindings/dom/Math.abs (param f64) (result f64))) + (import "env" "Math.acos" (func $~lib/bindings/dom/Math.acos (param f64) (result f64))) + (import "env" "Math.acosh" (func $~lib/bindings/dom/Math.acosh (param f64) (result f64))) + (import "env" "Math.asin" (func $~lib/bindings/dom/Math.asin (param f64) (result f64))) + (import "env" "Math.asinh" (func $~lib/bindings/dom/Math.asinh (param f64) (result f64))) + (import "env" "Math.atan" (func $~lib/bindings/dom/Math.atan (param f64) (result f64))) + (import "env" "Math.atanh" (func $~lib/bindings/dom/Math.atanh (param f64) (result f64))) + (import "env" "Math.atan2" (func $~lib/bindings/dom/Math.atan2 (param f64 f64) (result f64))) + (import "env" "Math.cbrt" (func $~lib/bindings/dom/Math.cbrt (param f64) (result f64))) + (import "env" "Math.ceil" (func $~lib/bindings/dom/Math.ceil (param f64) (result f64))) + (import "env" "Math.cos" (func $~lib/bindings/dom/Math.cos (param f64) (result f64))) + (import "env" "Math.cosh" (func $~lib/bindings/dom/Math.cosh (param f64) (result f64))) + (import "env" "Math.exp" (func $~lib/bindings/dom/Math.exp (param f64) (result f64))) + (import "env" "Math.expm1" (func $~lib/bindings/dom/Math.expm1 (param f64) (result f64))) + (import "env" "Math.pow" (func $~lib/bindings/dom/Math.pow (param f64 f64) (result f64))) + (import "env" "Math.floor" (func $~lib/bindings/dom/Math.floor (param f64) (result f64))) + (import "env" "Math.log" (func $~lib/bindings/dom/Math.log (param f64) (result f64))) + (import "env" "Math.log10" (func $~lib/bindings/dom/Math.log10 (param f64) (result f64))) + (import "env" "Math.log1p" (func $~lib/bindings/dom/Math.log1p (param f64) (result f64))) + (import "env" "Math.log2" (func $~lib/bindings/dom/Math.log2 (param f64) (result f64))) + (import "env" "Math.max" (func $~lib/bindings/dom/Math.max (param f64 f64) (result f64))) + (import "env" "Math.min" (func $~lib/bindings/dom/Math.min (param f64 f64) (result f64))) (import "math" "mod" (func $std/math/mod (param f64 f64) (result f64))) - (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) + (import "env" "Math.random" (func $~lib/bindings/dom/Math.random (result f64))) (import "env" "seed" (func $~lib/builtins/seed (result f64))) - (import "Math" "sign" (func $~lib/bindings/Math/sign (param f64) (result f64))) - (import "Math" "sin" (func $~lib/bindings/Math/sin (param f64) (result f64))) - (import "Math" "sinh" (func $~lib/bindings/Math/sinh (param f64) (result f64))) - (import "Math" "sqrt" (func $~lib/bindings/Math/sqrt (param f64) (result f64))) - (import "Math" "tan" (func $~lib/bindings/Math/tan (param f64) (result f64))) - (import "Math" "tanh" (func $~lib/bindings/Math/tanh (param f64) (result f64))) - (import "Math" "trunc" (func $~lib/bindings/Math/trunc (param f64) (result f64))) + (import "env" "Math.sign" (func $~lib/bindings/dom/Math.sign (param f64) (result f64))) + (import "env" "Math.sin" (func $~lib/bindings/dom/Math.sin (param f64) (result f64))) + (import "env" "Math.sinh" (func $~lib/bindings/dom/Math.sinh (param f64) (result f64))) + (import "env" "Math.sqrt" (func $~lib/bindings/dom/Math.sqrt (param f64) (result f64))) + (import "env" "Math.tan" (func $~lib/bindings/dom/Math.tan (param f64) (result f64))) + (import "env" "Math.tanh" (func $~lib/bindings/dom/Math.tanh (param f64) (result f64))) + (import "env" "Math.trunc" (func $~lib/bindings/dom/Math.trunc (param f64) (result f64))) (global $std/math/js i32 (i32.const 1)) (global $std/math/INEXACT i32 (i32.const 1)) (global $std/math/INVALID i32 (i32.const 2)) @@ -616,7 +616,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs local.get $1 local.get $2 local.get $3 @@ -846,7 +846,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos local.get $1 local.get $2 local.get $3 @@ -1692,7 +1692,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/acosh + call $~lib/bindings/dom/Math.acosh local.get $1 local.get $2 local.get $3 @@ -2323,7 +2323,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin local.get $1 local.get $2 local.get $3 @@ -2523,7 +2523,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/asinh + call $~lib/bindings/dom/Math.asinh local.get $1 local.get $2 local.get $3 @@ -2888,7 +2888,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan local.get $1 local.get $2 local.get $3 @@ -3207,7 +3207,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/atanh + call $~lib/bindings/dom/Math.atanh local.get $1 local.get $2 local.get $3 @@ -3597,7 +3597,7 @@ if (result i32) local.get $0 local.get $1 - call $~lib/bindings/Math/atan2 + call $~lib/bindings/dom/Math.atan2 local.get $2 local.get $3 local.get $4 @@ -4044,7 +4044,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/cbrt + call $~lib/bindings/dom/Math.cbrt local.get $1 local.get $2 local.get $3 @@ -4189,7 +4189,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil local.get $1 local.get $2 local.get $3 @@ -5138,7 +5138,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos local.get $1 local.get $2 local.get $3 @@ -6477,7 +6477,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/cosh + call $~lib/bindings/dom/Math.cosh local.get $1 local.get $2 local.get $3 @@ -7020,7 +7020,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp local.get $1 local.get $2 local.get $3 @@ -7046,7 +7046,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 local.get $1 local.get $2 local.get $3 @@ -7342,7 +7342,7 @@ if (result i32) f64.const 2 local.get $0 - call $~lib/bindings/Math/pow + call $~lib/bindings/dom/Math.pow local.get $1 local.get $2 local.get $3 @@ -7495,7 +7495,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor local.get $1 local.get $2 local.get $3 @@ -7872,7 +7872,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log local.get $1 local.get $2 local.get $3 @@ -8158,7 +8158,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/log10 + call $~lib/bindings/dom/Math.log10 local.get $1 local.get $2 local.get $3 @@ -8384,7 +8384,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p local.get $1 local.get $2 local.get $3 @@ -8763,7 +8763,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 local.get $1 local.get $2 local.get $3 @@ -8972,7 +8972,7 @@ if (result i32) local.get $0 local.get $1 - call $~lib/bindings/Math/max + call $~lib/bindings/dom/Math.max local.get $2 local.get $3 local.get $4 @@ -9013,7 +9013,7 @@ if (result i32) local.get $0 local.get $1 - call $~lib/bindings/Math/min + call $~lib/bindings/dom/Math.min local.get $2 local.get $3 local.get $4 @@ -10569,7 +10569,7 @@ if (result i32) local.get $0 local.get $1 - call $~lib/bindings/Math/pow + call $~lib/bindings/dom/Math.pow local.get $2 local.get $3 local.get $4 @@ -11477,7 +11477,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/sign + call $~lib/bindings/dom/Math.sign local.get $1 local.get $2 local.get $3 @@ -12698,7 +12698,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin local.get $1 local.get $2 local.get $3 @@ -13436,7 +13436,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/sinh + call $~lib/bindings/dom/Math.sinh local.get $1 local.get $2 local.get $3 @@ -13558,7 +13558,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt local.get $1 local.get $2 local.get $3 @@ -14116,7 +14116,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan local.get $1 local.get $2 local.get $3 @@ -14885,7 +14885,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/tanh + call $~lib/bindings/dom/Math.tanh local.get $1 local.get $2 local.get $3 @@ -15000,7 +15000,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc local.get $1 local.get $2 local.get $3 @@ -16298,7 +16298,7 @@ f32.eq drop global.get $~lib/math/NativeMath.E - global.get $~lib/bindings/Math/E + global.get $~lib/bindings/dom/Math.E f64.const 0 i32.const 0 call $std/math/check @@ -16312,7 +16312,7 @@ unreachable end global.get $~lib/math/NativeMath.LN2 - global.get $~lib/bindings/Math/LN2 + global.get $~lib/bindings/dom/Math.LN2 f64.const 0 i32.const 0 call $std/math/check @@ -16326,7 +16326,7 @@ unreachable end global.get $~lib/math/NativeMath.LN10 - global.get $~lib/bindings/Math/LN10 + global.get $~lib/bindings/dom/Math.LN10 f64.const 0 i32.const 0 call $std/math/check @@ -16340,7 +16340,7 @@ unreachable end global.get $~lib/math/NativeMath.LOG2E - global.get $~lib/bindings/Math/LOG2E + global.get $~lib/bindings/dom/Math.LOG2E f64.const 0 i32.const 0 call $std/math/check @@ -16354,7 +16354,7 @@ unreachable end global.get $~lib/math/NativeMath.PI - global.get $~lib/bindings/Math/PI + global.get $~lib/bindings/dom/Math.PI f64.const 0 i32.const 0 call $std/math/check @@ -16368,7 +16368,7 @@ unreachable end global.get $~lib/math/NativeMath.SQRT1_2 - global.get $~lib/bindings/Math/SQRT1_2 + global.get $~lib/bindings/dom/Math.SQRT1_2 f64.const 0 i32.const 0 call $std/math/check @@ -16382,7 +16382,7 @@ unreachable end global.get $~lib/math/NativeMath.SQRT2 - global.get $~lib/bindings/Math/SQRT2 + global.get $~lib/bindings/dom/Math.SQRT2 f64.const 0 i32.const 0 call $std/math/check @@ -16396,7 +16396,7 @@ unreachable end global.get $~lib/math/NativeMathf.E - global.get $~lib/bindings/Math/E + global.get $~lib/bindings/dom/Math.E f32.demote_f64 f32.const 0 i32.const 0 @@ -16411,7 +16411,7 @@ unreachable end global.get $~lib/math/NativeMathf.LN2 - global.get $~lib/bindings/Math/LN2 + global.get $~lib/bindings/dom/Math.LN2 f32.demote_f64 f32.const 0 i32.const 0 @@ -16426,7 +16426,7 @@ unreachable end global.get $~lib/math/NativeMathf.LN10 - global.get $~lib/bindings/Math/LN10 + global.get $~lib/bindings/dom/Math.LN10 f32.demote_f64 f32.const 0 i32.const 0 @@ -16441,7 +16441,7 @@ unreachable end global.get $~lib/math/NativeMathf.LOG2E - global.get $~lib/bindings/Math/LOG2E + global.get $~lib/bindings/dom/Math.LOG2E f32.demote_f64 f32.const 0 i32.const 0 @@ -16456,7 +16456,7 @@ unreachable end global.get $~lib/math/NativeMathf.PI - global.get $~lib/bindings/Math/PI + global.get $~lib/bindings/dom/Math.PI f32.demote_f64 f32.const 0 i32.const 0 @@ -16471,7 +16471,7 @@ unreachable end global.get $~lib/math/NativeMathf.SQRT1_2 - global.get $~lib/bindings/Math/SQRT1_2 + global.get $~lib/bindings/dom/Math.SQRT1_2 f32.demote_f64 f32.const 0 i32.const 0 @@ -16486,7 +16486,7 @@ unreachable end global.get $~lib/math/NativeMathf.SQRT2 - global.get $~lib/bindings/Math/SQRT2 + global.get $~lib/bindings/dom/Math.SQRT2 f32.demote_f64 f32.const 0 i32.const 0 @@ -26244,7 +26244,7 @@ global.get $std/math/kPI f64.const 2 f64.div - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.eq i32.eqz if @@ -26266,7 +26266,7 @@ f64.mul f64.const 2 f64.div - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.eq i32.eqz if @@ -26284,7 +26284,7 @@ f64.const 1.e+90 global.get $std/math/kPI f64.mul - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.eq i32.eqz if @@ -47200,7 +47200,7 @@ call $~lib/builtins/abort unreachable end - call $~lib/bindings/Math/random + call $~lib/bindings/dom/Math.random i64.reinterpret_f64 call $~lib/math/NativeMath.seedRandom i32.const 0 @@ -47241,7 +47241,7 @@ br $for-loop|0 end end - call $~lib/bindings/Math/random + call $~lib/bindings/dom/Math.random i64.reinterpret_f64 local.set $3 local.get $3 @@ -51688,7 +51688,7 @@ global.get $std/math/kPI f64.const 2 f64.div - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.eq i32.eqz if @@ -51710,7 +51710,7 @@ f64.mul f64.const 2 f64.div - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.eq i32.eqz if @@ -55691,7 +55691,7 @@ f64.const 2.3283064365386963e-10 call $~lib/math/NativeMath.tan f64.const 2.3283064365386963e-10 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55705,7 +55705,7 @@ f64.const -2.3283064365386963e-10 call $~lib/math/NativeMath.tan f64.const -2.3283064365386963e-10 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55723,7 +55723,7 @@ f64.const 11 f64.const 16 f64.div - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55741,7 +55741,7 @@ f64.const -11 f64.const 16 f64.div - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55755,7 +55755,7 @@ f64.const 0.39269908169872414 call $~lib/math/NativeMath.tan f64.const 0.39269908169872414 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55769,7 +55769,7 @@ f64.const 0.6743358 call $~lib/math/NativeMath.tan f64.const 0.6743358 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55783,7 +55783,7 @@ f64.const 3.725290298461914e-09 call $~lib/math/NativeMath.tan f64.const 3.725290298461914e-09 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55801,7 +55801,7 @@ global.get $std/math/kPI f64.const 2 f64.div - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55815,7 +55815,7 @@ f64.const 0.5 call $~lib/math/NativeMath.tan f64.const 0.5 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55829,7 +55829,7 @@ f64.const 1.107148717794091 call $~lib/math/NativeMath.tan f64.const 1.107148717794091 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55851,7 +55851,7 @@ f64.div global.get $std/math/kPI f64.mul - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55873,7 +55873,7 @@ f64.div global.get $std/math/kPI f64.mul - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55895,7 +55895,7 @@ f64.div global.get $std/math/kPI f64.mul - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55917,7 +55917,7 @@ f64.div global.get $std/math/kPI f64.mul - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55931,7 +55931,7 @@ global.get $std/math/kTwo120 call $~lib/math/NativeMath.tan global.get $std/math/kTwo120 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if @@ -55947,7 +55947,7 @@ call $~lib/math/NativeMath.tan global.get $std/math/kTwo120 f64.neg - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.eq i32.eqz if diff --git a/tests/compiler/std/math.release.wat b/tests/compiler/std/math.release.wat index 1648bc4f65..eaea0cc0f0 100644 --- a/tests/compiler/std/math.release.wat +++ b/tests/compiler/std/math.release.wat @@ -20,46 +20,46 @@ (type $i64_i64_i64_i64_i64_=>_none (func (param i64 i64 i64 i64 i64))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (import "Math" "E" (global $~lib/bindings/Math/E f64)) - (import "Math" "LN2" (global $~lib/bindings/Math/LN2 f64)) - (import "Math" "LN10" (global $~lib/bindings/Math/LN10 f64)) - (import "Math" "LOG2E" (global $~lib/bindings/Math/LOG2E f64)) - (import "Math" "PI" (global $~lib/bindings/Math/PI f64)) - (import "Math" "SQRT1_2" (global $~lib/bindings/Math/SQRT1_2 f64)) - (import "Math" "SQRT2" (global $~lib/bindings/Math/SQRT2 f64)) + (import "env" "Math.E" (global $~lib/bindings/dom/Math.E f64)) + (import "env" "Math.LN2" (global $~lib/bindings/dom/Math.LN2 f64)) + (import "env" "Math.LN10" (global $~lib/bindings/dom/Math.LN10 f64)) + (import "env" "Math.LOG2E" (global $~lib/bindings/dom/Math.LOG2E f64)) + (import "env" "Math.PI" (global $~lib/bindings/dom/Math.PI f64)) + (import "env" "Math.SQRT1_2" (global $~lib/bindings/dom/Math.SQRT1_2 f64)) + (import "env" "Math.SQRT2" (global $~lib/bindings/dom/Math.SQRT2 f64)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "Math" "abs" (func $~lib/bindings/Math/abs (param f64) (result f64))) - (import "Math" "acos" (func $~lib/bindings/Math/acos (param f64) (result f64))) - (import "Math" "acosh" (func $~lib/bindings/Math/acosh (param f64) (result f64))) - (import "Math" "asin" (func $~lib/bindings/Math/asin (param f64) (result f64))) - (import "Math" "asinh" (func $~lib/bindings/Math/asinh (param f64) (result f64))) - (import "Math" "atan" (func $~lib/bindings/Math/atan (param f64) (result f64))) - (import "Math" "atanh" (func $~lib/bindings/Math/atanh (param f64) (result f64))) - (import "Math" "atan2" (func $~lib/bindings/Math/atan2 (param f64 f64) (result f64))) - (import "Math" "cbrt" (func $~lib/bindings/Math/cbrt (param f64) (result f64))) - (import "Math" "ceil" (func $~lib/bindings/Math/ceil (param f64) (result f64))) - (import "Math" "cos" (func $~lib/bindings/Math/cos (param f64) (result f64))) - (import "Math" "cosh" (func $~lib/bindings/Math/cosh (param f64) (result f64))) - (import "Math" "exp" (func $~lib/bindings/Math/exp (param f64) (result f64))) - (import "Math" "expm1" (func $~lib/bindings/Math/expm1 (param f64) (result f64))) - (import "Math" "pow" (func $~lib/bindings/Math/pow (param f64 f64) (result f64))) - (import "Math" "floor" (func $~lib/bindings/Math/floor (param f64) (result f64))) - (import "Math" "log" (func $~lib/bindings/Math/log (param f64) (result f64))) - (import "Math" "log10" (func $~lib/bindings/Math/log10 (param f64) (result f64))) - (import "Math" "log1p" (func $~lib/bindings/Math/log1p (param f64) (result f64))) - (import "Math" "log2" (func $~lib/bindings/Math/log2 (param f64) (result f64))) - (import "Math" "max" (func $~lib/bindings/Math/max (param f64 f64) (result f64))) - (import "Math" "min" (func $~lib/bindings/Math/min (param f64 f64) (result f64))) + (import "env" "Math.abs" (func $~lib/bindings/dom/Math.abs (param f64) (result f64))) + (import "env" "Math.acos" (func $~lib/bindings/dom/Math.acos (param f64) (result f64))) + (import "env" "Math.acosh" (func $~lib/bindings/dom/Math.acosh (param f64) (result f64))) + (import "env" "Math.asin" (func $~lib/bindings/dom/Math.asin (param f64) (result f64))) + (import "env" "Math.asinh" (func $~lib/bindings/dom/Math.asinh (param f64) (result f64))) + (import "env" "Math.atan" (func $~lib/bindings/dom/Math.atan (param f64) (result f64))) + (import "env" "Math.atanh" (func $~lib/bindings/dom/Math.atanh (param f64) (result f64))) + (import "env" "Math.atan2" (func $~lib/bindings/dom/Math.atan2 (param f64 f64) (result f64))) + (import "env" "Math.cbrt" (func $~lib/bindings/dom/Math.cbrt (param f64) (result f64))) + (import "env" "Math.ceil" (func $~lib/bindings/dom/Math.ceil (param f64) (result f64))) + (import "env" "Math.cos" (func $~lib/bindings/dom/Math.cos (param f64) (result f64))) + (import "env" "Math.cosh" (func $~lib/bindings/dom/Math.cosh (param f64) (result f64))) + (import "env" "Math.exp" (func $~lib/bindings/dom/Math.exp (param f64) (result f64))) + (import "env" "Math.expm1" (func $~lib/bindings/dom/Math.expm1 (param f64) (result f64))) + (import "env" "Math.pow" (func $~lib/bindings/dom/Math.pow (param f64 f64) (result f64))) + (import "env" "Math.floor" (func $~lib/bindings/dom/Math.floor (param f64) (result f64))) + (import "env" "Math.log" (func $~lib/bindings/dom/Math.log (param f64) (result f64))) + (import "env" "Math.log10" (func $~lib/bindings/dom/Math.log10 (param f64) (result f64))) + (import "env" "Math.log1p" (func $~lib/bindings/dom/Math.log1p (param f64) (result f64))) + (import "env" "Math.log2" (func $~lib/bindings/dom/Math.log2 (param f64) (result f64))) + (import "env" "Math.max" (func $~lib/bindings/dom/Math.max (param f64 f64) (result f64))) + (import "env" "Math.min" (func $~lib/bindings/dom/Math.min (param f64 f64) (result f64))) (import "math" "mod" (func $std/math/mod (param f64 f64) (result f64))) - (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) + (import "env" "Math.random" (func $~lib/bindings/dom/Math.random (result f64))) (import "env" "seed" (func $~lib/builtins/seed (result f64))) - (import "Math" "sign" (func $~lib/bindings/Math/sign (param f64) (result f64))) - (import "Math" "sin" (func $~lib/bindings/Math/sin (param f64) (result f64))) - (import "Math" "sinh" (func $~lib/bindings/Math/sinh (param f64) (result f64))) - (import "Math" "sqrt" (func $~lib/bindings/Math/sqrt (param f64) (result f64))) - (import "Math" "tan" (func $~lib/bindings/Math/tan (param f64) (result f64))) - (import "Math" "tanh" (func $~lib/bindings/Math/tanh (param f64) (result f64))) - (import "Math" "trunc" (func $~lib/bindings/Math/trunc (param f64) (result f64))) + (import "env" "Math.sign" (func $~lib/bindings/dom/Math.sign (param f64) (result f64))) + (import "env" "Math.sin" (func $~lib/bindings/dom/Math.sin (param f64) (result f64))) + (import "env" "Math.sinh" (func $~lib/bindings/dom/Math.sinh (param f64) (result f64))) + (import "env" "Math.sqrt" (func $~lib/bindings/dom/Math.sqrt (param f64) (result f64))) + (import "env" "Math.tan" (func $~lib/bindings/dom/Math.tan (param f64) (result f64))) + (import "env" "Math.tanh" (func $~lib/bindings/dom/Math.tanh (param f64) (result f64))) + (import "env" "Math.trunc" (func $~lib/bindings/dom/Math.trunc (param f64) (result f64))) (global $~lib/math/rempio2_y0 (mut f64) (f64.const 0)) (global $~lib/math/rempio2_y1 (mut f64) (f64.const 0)) (global $~lib/math/res128_hi (mut i64) (i64.const 0)) @@ -1395,7 +1395,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/acosh + call $~lib/bindings/dom/Math.acosh local.get $1 local.get $2 call $std/math/check @@ -2138,7 +2138,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/asinh + call $~lib/bindings/dom/Math.asinh local.get $1 local.get $2 call $std/math/check @@ -2683,7 +2683,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/atanh + call $~lib/bindings/dom/Math.atanh local.get $1 local.get $2 call $std/math/check @@ -2947,7 +2947,7 @@ if (result i32) local.get $0 local.get $1 - call $~lib/bindings/Math/atan2 + call $~lib/bindings/dom/Math.atan2 local.get $2 local.get $3 call $std/math/check @@ -3248,7 +3248,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/cbrt + call $~lib/bindings/dom/Math.cbrt local.get $1 local.get $2 call $std/math/check @@ -5050,7 +5050,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/cosh + call $~lib/bindings/dom/Math.cosh local.get $1 local.get $2 call $std/math/check @@ -5671,7 +5671,7 @@ if (result i32) f64.const 2 local.get $0 - call $~lib/bindings/Math/pow + call $~lib/bindings/dom/Math.pow local.get $1 local.get $2 call $std/math/check @@ -6251,7 +6251,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/log10 + call $~lib/bindings/dom/Math.log10 local.get $1 local.get $2 call $std/math/check @@ -6792,7 +6792,7 @@ if (result i32) local.get $0 local.get $1 - call $~lib/bindings/Math/max + call $~lib/bindings/dom/Math.max local.get $2 f64.const 0 call $std/math/check @@ -6810,7 +6810,7 @@ if (result i32) local.get $0 local.get $1 - call $~lib/bindings/Math/min + call $~lib/bindings/dom/Math.min local.get $2 f64.const 0 call $std/math/check @@ -7971,7 +7971,7 @@ if (result i32) local.get $0 local.get $1 - call $~lib/bindings/Math/pow + call $~lib/bindings/dom/Math.pow local.get $2 local.get $3 call $std/math/check @@ -8582,7 +8582,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/sign + call $~lib/bindings/dom/Math.sign local.get $1 f64.const 0 call $std/math/check @@ -10014,7 +10014,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/sinh + call $~lib/bindings/dom/Math.sinh local.get $1 local.get $2 call $std/math/check @@ -11001,7 +11001,7 @@ call $std/math/check if (result i32) local.get $0 - call $~lib/bindings/Math/tanh + call $~lib/bindings/dom/Math.tanh local.get $1 local.get $2 call $std/math/check @@ -12086,7 +12086,7 @@ (local $5 f32) (local $6 i64) f64.const 2.718281828459045 - global.get $~lib/bindings/Math/E + global.get $~lib/bindings/dom/Math.E f64.const 0 call $std/math/check i32.eqz @@ -12099,7 +12099,7 @@ unreachable end f64.const 0.6931471805599453 - global.get $~lib/bindings/Math/LN2 + global.get $~lib/bindings/dom/Math.LN2 f64.const 0 call $std/math/check i32.eqz @@ -12112,7 +12112,7 @@ unreachable end f64.const 2.302585092994046 - global.get $~lib/bindings/Math/LN10 + global.get $~lib/bindings/dom/Math.LN10 f64.const 0 call $std/math/check i32.eqz @@ -12125,7 +12125,7 @@ unreachable end f64.const 1.4426950408889634 - global.get $~lib/bindings/Math/LOG2E + global.get $~lib/bindings/dom/Math.LOG2E f64.const 0 call $std/math/check i32.eqz @@ -12138,7 +12138,7 @@ unreachable end f64.const 3.141592653589793 - global.get $~lib/bindings/Math/PI + global.get $~lib/bindings/dom/Math.PI f64.const 0 call $std/math/check i32.eqz @@ -12151,7 +12151,7 @@ unreachable end f64.const 0.7071067811865476 - global.get $~lib/bindings/Math/SQRT1_2 + global.get $~lib/bindings/dom/Math.SQRT1_2 f64.const 0 call $std/math/check i32.eqz @@ -12164,7 +12164,7 @@ unreachable end f64.const 1.4142135623730951 - global.get $~lib/bindings/Math/SQRT2 + global.get $~lib/bindings/dom/Math.SQRT2 f64.const 0 call $std/math/check i32.eqz @@ -12177,7 +12177,7 @@ unreachable end f32.const 2.7182817459106445 - global.get $~lib/bindings/Math/E + global.get $~lib/bindings/dom/Math.E f32.demote_f64 f32.const 0 call $std/math/check @@ -12191,7 +12191,7 @@ unreachable end f32.const 0.6931471824645996 - global.get $~lib/bindings/Math/LN2 + global.get $~lib/bindings/dom/Math.LN2 f32.demote_f64 f32.const 0 call $std/math/check @@ -12205,7 +12205,7 @@ unreachable end f32.const 2.3025851249694824 - global.get $~lib/bindings/Math/LN10 + global.get $~lib/bindings/dom/Math.LN10 f32.demote_f64 f32.const 0 call $std/math/check @@ -12219,7 +12219,7 @@ unreachable end f32.const 1.4426950216293335 - global.get $~lib/bindings/Math/LOG2E + global.get $~lib/bindings/dom/Math.LOG2E f32.demote_f64 f32.const 0 call $std/math/check @@ -12233,7 +12233,7 @@ unreachable end f32.const 3.1415927410125732 - global.get $~lib/bindings/Math/PI + global.get $~lib/bindings/dom/Math.PI f32.demote_f64 f32.const 0 call $std/math/check @@ -12247,7 +12247,7 @@ unreachable end f32.const 0.7071067690849304 - global.get $~lib/bindings/Math/SQRT1_2 + global.get $~lib/bindings/dom/Math.SQRT1_2 f32.demote_f64 f32.const 0 call $std/math/check @@ -12261,7 +12261,7 @@ unreachable end f32.const 1.4142135381698608 - global.get $~lib/bindings/Math/SQRT2 + global.get $~lib/bindings/dom/Math.SQRT2 f32.demote_f64 f32.const 0 call $std/math/check @@ -13092,7 +13092,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const 8.06684839057968 f64.const 0 call $std/math/check @@ -13114,7 +13114,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const 4.345239849338305 f64.const 0 call $std/math/check @@ -13136,7 +13136,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const 8.38143342755525 f64.const 0 call $std/math/check @@ -13158,7 +13158,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const 6.531673581913484 f64.const 0 call $std/math/check @@ -13180,7 +13180,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const 9.267056966972586 f64.const 0 call $std/math/check @@ -13202,7 +13202,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const 0.6619858980995045 f64.const 0 call $std/math/check @@ -13224,7 +13224,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const 0.4066039223853553 f64.const 0 call $std/math/check @@ -13246,7 +13246,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const 0.5617597462207241 f64.const 0 call $std/math/check @@ -13268,7 +13268,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const 0.7741522965913037 f64.const 0 call $std/math/check @@ -13290,7 +13290,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const 0.6787637026394024 f64.const 0 call $std/math/check @@ -13312,7 +13312,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const 0 f64.const 0 call $std/math/check @@ -13334,7 +13334,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const 0 f64.const 0 call $std/math/check @@ -13356,7 +13356,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const 1 f64.const 0 call $std/math/check @@ -13378,7 +13378,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const 1 f64.const 0 call $std/math/check @@ -13400,7 +13400,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const inf f64.const 0 call $std/math/check @@ -13422,7 +13422,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const inf f64.const 0 call $std/math/check @@ -13444,7 +13444,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/abs + call $~lib/bindings/dom/Math.abs f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -13688,7 +13688,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -13711,7 +13711,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -13734,7 +13734,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -13757,7 +13757,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -13780,7 +13780,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -13803,7 +13803,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const 0.8473310828433507 f64.const -0.41553276777267456 call $std/math/check @@ -13826,7 +13826,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const 1.989530071088669 f64.const 0.4973946213722229 call $std/math/check @@ -13849,7 +13849,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const 0.9742849645674904 f64.const -0.4428897500038147 call $std/math/check @@ -13872,7 +13872,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const 0.6854215158636222 f64.const -0.12589527666568756 call $std/math/check @@ -13895,7 +13895,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const 2.316874138205964 f64.const -0.17284949123859406 call $std/math/check @@ -13918,7 +13918,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const 1.5707963267948966 f64.const -0.27576595544815063 call $std/math/check @@ -13941,7 +13941,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const 3.141592653589793 f64.const -0.27576595544815063 call $std/math/check @@ -13964,7 +13964,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const 0 f64.const 0 call $std/math/check @@ -13987,7 +13987,7 @@ call $std/math/check if (result i32) f64.const 1.0000000000000002 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -14010,7 +14010,7 @@ call $std/math/check if (result i32) f64.const -1.0000000000000002 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -14033,7 +14033,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -14056,7 +14056,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -14079,7 +14079,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -14102,7 +14102,7 @@ call $std/math/check if (result i32) f64.const -0.5309227209592985 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const 2.1304853799705463 f64.const 0.1391008496284485 call $std/math/check @@ -14125,7 +14125,7 @@ call $std/math/check if (result i32) f64.const 0.4939556746399746 - call $~lib/bindings/Math/acos + call $~lib/bindings/dom/Math.acos f64.const 1.0541629875851946 f64.const 0.22054767608642578 call $std/math/check @@ -14949,7 +14949,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -14972,7 +14972,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -14995,7 +14995,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -15018,7 +15018,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -15041,7 +15041,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -15064,7 +15064,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const 0.7234652439515459 f64.const -0.13599912822246552 call $std/math/check @@ -15087,7 +15087,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const -0.41873374429377225 f64.const -0.09264230728149414 call $std/math/check @@ -15110,7 +15110,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const 0.5965113622274062 f64.const -0.10864213854074478 call $std/math/check @@ -15133,7 +15133,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const 0.8853748109312743 f64.const -0.4256366193294525 call $std/math/check @@ -15156,7 +15156,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const -0.7460778114110673 f64.const 0.13986606895923615 call $std/math/check @@ -15179,7 +15179,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const 1.5707963267948966 f64.const -0.27576595544815063 call $std/math/check @@ -15202,7 +15202,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const -1.5707963267948966 f64.const 0.27576595544815063 call $std/math/check @@ -15225,7 +15225,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const 0 f64.const 0 call $std/math/check @@ -15248,7 +15248,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const -0 f64.const 0 call $std/math/check @@ -15271,7 +15271,7 @@ call $std/math/check if (result i32) f64.const 1.0000000000000002 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -15294,7 +15294,7 @@ call $std/math/check if (result i32) f64.const -1.0000000000000002 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -15317,7 +15317,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -15340,7 +15340,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -15363,7 +15363,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -15386,7 +15386,7 @@ call $std/math/check if (result i32) f64.const 0.5073043929119148 - call $~lib/bindings/Math/asin + call $~lib/bindings/dom/Math.asin f64.const 0.5320538997772349 f64.const -0.16157317161560059 call $std/math/check @@ -16079,7 +16079,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const -1.4474613762633468 f64.const 0.14857111871242523 call $std/math/check @@ -16102,7 +16102,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const 1.344597927114538 f64.const -0.08170335739850998 call $std/math/check @@ -16125,7 +16125,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const -1.4520463463295539 f64.const -0.07505480200052261 call $std/math/check @@ -16148,7 +16148,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const -1.4188758658752532 f64.const -0.057633496820926666 call $std/math/check @@ -16171,7 +16171,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const 1.463303145448706 f64.const 0.1606956422328949 call $std/math/check @@ -16194,7 +16194,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const 0.5847550670238325 f64.const 0.4582556486129761 call $std/math/check @@ -16217,7 +16217,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const -0.3861864177552131 f64.const -0.2574281692504883 call $std/math/check @@ -16240,7 +16240,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const 0.5118269531628881 f64.const -0.11444277316331863 call $std/math/check @@ -16263,7 +16263,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const 0.6587802431653822 f64.const -0.11286488175392151 call $std/math/check @@ -16286,7 +16286,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const -0.5963307826973472 f64.const -0.2182842344045639 call $std/math/check @@ -16309,7 +16309,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const 0 f64.const 0 call $std/math/check @@ -16332,7 +16332,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const -0 f64.const 0 call $std/math/check @@ -16355,7 +16355,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const 0.7853981633974483 f64.const -0.27576595544815063 call $std/math/check @@ -16378,7 +16378,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const -0.7853981633974483 f64.const 0.27576595544815063 call $std/math/check @@ -16401,7 +16401,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const 1.5707963267948966 f64.const -0.27576595544815063 call $std/math/check @@ -16424,7 +16424,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const -1.5707963267948966 f64.const 0.27576595544815063 call $std/math/check @@ -16447,7 +16447,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -16470,7 +16470,7 @@ call $std/math/check if (result i32) f64.const 0.6929821535674624 - call $~lib/bindings/Math/atan + call $~lib/bindings/dom/Math.atan f64.const 0.6060004555152562 f64.const -0.17075790464878082 call $std/math/check @@ -19004,7 +19004,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -8 f64.const 0 call $std/math/check @@ -19026,7 +19026,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 5 f64.const 0 call $std/math/check @@ -19048,7 +19048,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -8 f64.const 0 call $std/math/check @@ -19070,7 +19070,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -6 f64.const 0 call $std/math/check @@ -19092,7 +19092,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 10 f64.const 0 call $std/math/check @@ -19114,7 +19114,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -19136,7 +19136,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -0 f64.const 0 call $std/math/check @@ -19158,7 +19158,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -19180,7 +19180,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -19202,7 +19202,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -0 f64.const 0 call $std/math/check @@ -19224,7 +19224,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -19246,7 +19246,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const inf f64.const 0 call $std/math/check @@ -19268,7 +19268,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -inf f64.const 0 call $std/math/check @@ -19290,7 +19290,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 0 f64.const 0 call $std/math/check @@ -19312,7 +19312,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -0 f64.const 0 call $std/math/check @@ -19334,7 +19334,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -19356,7 +19356,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -1 f64.const 0 call $std/math/check @@ -19378,7 +19378,7 @@ call $std/math/check if (result i32) f64.const 0.5 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -19400,7 +19400,7 @@ call $std/math/check if (result i32) f64.const -0.5 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -0 f64.const 0 call $std/math/check @@ -19422,7 +19422,7 @@ call $std/math/check if (result i32) f64.const 1.0000152587890625 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 2 f64.const 0 call $std/math/check @@ -19444,7 +19444,7 @@ call $std/math/check if (result i32) f64.const -1.0000152587890625 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -1 f64.const 0 call $std/math/check @@ -19466,7 +19466,7 @@ call $std/math/check if (result i32) f64.const 0.9999923706054688 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -19488,7 +19488,7 @@ call $std/math/check if (result i32) f64.const -0.9999923706054688 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -0 f64.const 0 call $std/math/check @@ -19510,7 +19510,7 @@ call $std/math/check if (result i32) f64.const 7.888609052210118e-31 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -19532,7 +19532,7 @@ call $std/math/check if (result i32) f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -0 f64.const 0 call $std/math/check @@ -19554,7 +19554,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -19576,7 +19576,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const inf f64.const 0 call $std/math/check @@ -19598,7 +19598,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -inf f64.const 0 call $std/math/check @@ -19620,7 +19620,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 0 f64.const 0 call $std/math/check @@ -19642,7 +19642,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -0 f64.const 0 call $std/math/check @@ -19664,7 +19664,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -19686,7 +19686,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -1 f64.const 0 call $std/math/check @@ -19708,7 +19708,7 @@ call $std/math/check if (result i32) f64.const 0.5 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -19730,7 +19730,7 @@ call $std/math/check if (result i32) f64.const -0.5 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -0 f64.const 0 call $std/math/check @@ -19752,7 +19752,7 @@ call $std/math/check if (result i32) f64.const 1.0000152587890625 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 2 f64.const 0 call $std/math/check @@ -19774,7 +19774,7 @@ call $std/math/check if (result i32) f64.const -1.0000152587890625 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -1 f64.const 0 call $std/math/check @@ -19796,7 +19796,7 @@ call $std/math/check if (result i32) f64.const 0.9999923706054688 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -19818,7 +19818,7 @@ call $std/math/check if (result i32) f64.const -0.9999923706054688 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -0 f64.const 0 call $std/math/check @@ -19840,7 +19840,7 @@ call $std/math/check if (result i32) f64.const 7.888609052210118e-31 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -19862,7 +19862,7 @@ call $std/math/check if (result i32) f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -0 f64.const 0 call $std/math/check @@ -19884,7 +19884,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -19906,7 +19906,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const inf f64.const 0 call $std/math/check @@ -19928,7 +19928,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -inf f64.const 0 call $std/math/check @@ -19950,7 +19950,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 0 f64.const 0 call $std/math/check @@ -19972,7 +19972,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -0 f64.const 0 call $std/math/check @@ -19994,7 +19994,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -20016,7 +20016,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -1 f64.const 0 call $std/math/check @@ -20038,7 +20038,7 @@ call $std/math/check if (result i32) f64.const 0.5 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -20060,7 +20060,7 @@ call $std/math/check if (result i32) f64.const -0.5 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -0 f64.const 0 call $std/math/check @@ -20082,7 +20082,7 @@ call $std/math/check if (result i32) f64.const 1.0000152587890625 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 2 f64.const 0 call $std/math/check @@ -20104,7 +20104,7 @@ call $std/math/check if (result i32) f64.const -1.0000152587890625 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -1 f64.const 0 call $std/math/check @@ -20126,7 +20126,7 @@ call $std/math/check if (result i32) f64.const 0.9999923706054688 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -20148,7 +20148,7 @@ call $std/math/check if (result i32) f64.const -0.9999923706054688 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -0 f64.const 0 call $std/math/check @@ -20170,7 +20170,7 @@ call $std/math/check if (result i32) f64.const 7.888609052210118e-31 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const 1 f64.const 0 call $std/math/check @@ -20192,7 +20192,7 @@ call $std/math/check if (result i32) f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/ceil + call $~lib/bindings/dom/Math.ceil f64.const -0 f64.const 0 call $std/math/check @@ -20930,7 +20930,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.21126281599887137 f64.const -0.10962469130754471 call $std/math/check @@ -20953,7 +20953,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.35895602297578955 f64.const -0.10759828239679337 call $std/math/check @@ -20976,7 +20976,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.503333091765516 f64.const -0.021430473774671555 call $std/math/check @@ -20999,7 +20999,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.9692853212503283 f64.const -0.4787876307964325 call $std/math/check @@ -21022,7 +21022,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.9875878064788627 f64.const 0.4880668818950653 call $std/math/check @@ -21045,7 +21045,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.7887730869248576 f64.const 0.12708666920661926 call $std/math/check @@ -21068,7 +21068,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.9184692397007294 f64.const -0.26120713353157043 call $std/math/check @@ -21091,7 +21091,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.8463190467415896 f64.const -0.302586168050766 call $std/math/check @@ -21114,7 +21114,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.7150139289952383 f64.const -0.08537746220827103 call $std/math/check @@ -21137,7 +21137,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.7783494994757447 f64.const 0.30890750885009766 call $std/math/check @@ -21160,7 +21160,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -21183,7 +21183,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -21206,7 +21206,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -21229,7 +21229,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -21252,7 +21252,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -21275,7 +21275,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.5403023058681398 f64.const 0.4288286566734314 call $std/math/check @@ -21298,7 +21298,7 @@ call $std/math/check if (result i32) f64.const 2 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.4161468365471424 f64.const -0.35859397053718567 call $std/math/check @@ -21321,7 +21321,7 @@ call $std/math/check if (result i32) f64.const 3 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.9899924966004454 f64.const 0.3788451552391052 call $std/math/check @@ -21344,7 +21344,7 @@ call $std/math/check if (result i32) f64.const 4 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.6536436208636119 f64.const -0.23280560970306396 call $std/math/check @@ -21367,7 +21367,7 @@ call $std/math/check if (result i32) f64.const 5 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.28366218546322625 f64.const -0.3277357816696167 call $std/math/check @@ -21390,7 +21390,7 @@ call $std/math/check if (result i32) f64.const 0.1 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.9950041652780258 f64.const 0.49558526277542114 call $std/math/check @@ -21413,7 +21413,7 @@ call $std/math/check if (result i32) f64.const 0.2 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.9800665778412416 f64.const -0.02407640963792801 call $std/math/check @@ -21436,7 +21436,7 @@ call $std/math/check if (result i32) f64.const 0.3 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.955336489125606 f64.const -0.37772229313850403 call $std/math/check @@ -21459,7 +21459,7 @@ call $std/math/check if (result i32) f64.const 0.4 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.9210609940028851 f64.const 0.25818485021591187 call $std/math/check @@ -21482,7 +21482,7 @@ call $std/math/check if (result i32) f64.const 0.5 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.8775825618903728 f64.const 0.3839152157306671 call $std/math/check @@ -21505,7 +21505,7 @@ call $std/math/check if (result i32) f64.const 2.3641409746639015e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -21528,7 +21528,7 @@ call $std/math/check if (result i32) f64.const 1.1820704873319507e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -21551,7 +21551,7 @@ call $std/math/check if (result i32) f64.const 5e-324 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -21574,7 +21574,7 @@ call $std/math/check if (result i32) f64.const -5e-324 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -21597,7 +21597,7 @@ call $std/math/check if (result i32) f64.const -3.14 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.9999987317275395 f64.const 0.3855516016483307 call $std/math/check @@ -21620,7 +21620,7 @@ call $std/math/check if (result i32) f64.const 8988465674311579538646525e283 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.826369834614148 f64.const -0.3695965111255646 call $std/math/check @@ -21643,7 +21643,7 @@ call $std/math/check if (result i32) f64.const 1797693134862315708145274e284 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.9999876894265599 f64.const 0.23448343575000763 call $std/math/check @@ -21666,7 +21666,7 @@ call $std/math/check if (result i32) f64.const -8988465674311579538646525e283 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.826369834614148 f64.const -0.3695965111255646 call $std/math/check @@ -21689,7 +21689,7 @@ call $std/math/check if (result i32) f64.const 3.14 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.9999987317275395 f64.const 0.3855516016483307 call $std/math/check @@ -21712,7 +21712,7 @@ call $std/math/check if (result i32) f64.const 3.1415 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.9999999957076562 f64.const -0.30608975887298584 call $std/math/check @@ -21735,7 +21735,7 @@ call $std/math/check if (result i32) f64.const 3.141592 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.9999999999997864 f64.const 0.15403328835964203 call $std/math/check @@ -21758,7 +21758,7 @@ call $std/math/check if (result i32) f64.const 3.14159265 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -1 f64.const -0.02901807427406311 call $std/math/check @@ -21781,7 +21781,7 @@ call $std/math/check if (result i32) f64.const 3.1415926535 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -1 f64.const -1.8155848010792397e-05 call $std/math/check @@ -21804,7 +21804,7 @@ call $std/math/check if (result i32) f64.const 3.141592653589 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -1 f64.const -1.4169914130945926e-09 call $std/math/check @@ -21827,7 +21827,7 @@ call $std/math/check if (result i32) f64.const 3.14159265358979 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -1 f64.const -2.350864897985184e-14 call $std/math/check @@ -21850,7 +21850,7 @@ call $std/math/check if (result i32) f64.const 3.141592653589793 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -1 f64.const -3.377158741883318e-17 call $std/math/check @@ -21873,7 +21873,7 @@ call $std/math/check if (result i32) f64.const 1.57 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 7.963267107332633e-04 f64.const 0.2968159317970276 call $std/math/check @@ -21896,7 +21896,7 @@ call $std/math/check if (result i32) f64.const 1.570796 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 3.2679489653813835e-07 f64.const -0.32570895552635193 call $std/math/check @@ -21919,7 +21919,7 @@ call $std/math/check if (result i32) f64.const 1.5707963267 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 9.489659630678013e-11 f64.const -0.27245646715164185 call $std/math/check @@ -21942,7 +21942,7 @@ call $std/math/check if (result i32) f64.const 1.57079632679489 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 6.722570487708307e-15 f64.const -0.10747683793306351 call $std/math/check @@ -21965,7 +21965,7 @@ call $std/math/check if (result i32) f64.const 1.5707963267948966 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 6.123233995736766e-17 f64.const 0.12148229777812958 call $std/math/check @@ -21988,7 +21988,7 @@ call $std/math/check if (result i32) f64.const 0.6700635199486106 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.7837822193016158 f64.const -0.07278502732515335 call $std/math/check @@ -22011,7 +22011,7 @@ call $std/math/check if (result i32) f64.const 0.5343890189437553 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.8605799719039517 f64.const -0.48434028029441833 call $std/math/check @@ -22034,7 +22034,7 @@ call $std/math/check if (result i32) f64.const 0.43999702754890085 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.9047529293001976 f64.const 0.029777472838759422 call $std/math/check @@ -22057,7 +22057,7 @@ call $std/math/check if (result i32) f64.const 0.9902840844687313 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.5484523364480768 f64.const 0.19765280187129974 call $std/math/check @@ -22080,7 +22080,7 @@ call $std/math/check if (result i32) f64.const 0.45381447534338915 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.8987813902263783 f64.const -0.017724866047501564 call $std/math/check @@ -22103,7 +22103,7 @@ call $std/math/check if (result i32) f64.const 0.4609888813583589 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.8956130474713057 f64.const 0.36449819803237915 call $std/math/check @@ -22126,7 +22126,7 @@ call $std/math/check if (result i32) f64.const 0.9285434097956422 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.5990009794292984 f64.const -0.2899416387081146 call $std/math/check @@ -22149,7 +22149,7 @@ call $std/math/check if (result i32) f64.const 0.9109092124488352 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.6130276692774378 f64.const -0.49353134632110596 call $std/math/check @@ -22172,7 +22172,7 @@ call $std/math/check if (result i32) f64.const 0.8328600650359556 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.6727624710046357 f64.const -0.36606088280677795 call $std/math/check @@ -22195,7 +22195,7 @@ call $std/math/check if (result i32) f64.const 0.9536201252203433 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.5787346183487084 f64.const -0.17089833319187164 call $std/math/check @@ -22218,7 +22218,7 @@ call $std/math/check if (result i32) f64.const 0.8726590065457699 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.6427919144259047 f64.const -0.2744986116886139 call $std/math/check @@ -22241,7 +22241,7 @@ call $std/math/check if (result i32) f64.const 0.18100447535968447 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.9836633656884893 f64.const 3.0195272993296385e-03 call $std/math/check @@ -22264,7 +22264,7 @@ call $std/math/check if (result i32) f64.const 2.356194490349839 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.7071067812979126 f64.const -0.48278746008872986 call $std/math/check @@ -22287,7 +22287,7 @@ call $std/math/check if (result i32) f64.const 2.356194490372272 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.7071067813137752 f64.const -0.4866050183773041 call $std/math/check @@ -22310,7 +22310,7 @@ call $std/math/check if (result i32) f64.const 2.3561944902251115 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.707106781209717 f64.const -0.3533952236175537 call $std/math/check @@ -22333,7 +22333,7 @@ call $std/math/check if (result i32) f64.const 2.3561944903149996 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.7071067812732775 f64.const -0.41911986470222473 call $std/math/check @@ -22356,7 +22356,7 @@ call $std/math/check if (result i32) f64.const 2.3561944903603527 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.707106781305347 f64.const -0.4706200063228607 call $std/math/check @@ -22379,7 +22379,7 @@ call $std/math/check if (result i32) f64.const 2.3561944903826197 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.7071067813210922 f64.const -0.30618351697921753 call $std/math/check @@ -22402,7 +22402,7 @@ call $std/math/check if (result i32) f64.const 2.356194490371803 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.7071067813134436 f64.const -0.30564820766448975 call $std/math/check @@ -22425,7 +22425,7 @@ call $std/math/check if (result i32) f64.const 2.356194490399931 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.7071067813333329 f64.const -0.38845571875572205 call $std/math/check @@ -22448,7 +22448,7 @@ call $std/math/check if (result i32) f64.const 2.356194490260191 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.707106781234522 f64.const -0.23796851933002472 call $std/math/check @@ -22471,7 +22471,7 @@ call $std/math/check if (result i32) f64.const 2.3561944904043153 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.7071067813364332 f64.const -0.3274589478969574 call $std/math/check @@ -22494,7 +22494,7 @@ call $std/math/check if (result i32) f64.const 2.0943951024759446 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.5000000000716629 f64.const -0.41711342334747314 call $std/math/check @@ -22517,7 +22517,7 @@ call $std/math/check if (result i32) f64.const 2.09439510243324 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.5000000000346797 f64.const -0.3566164970397949 call $std/math/check @@ -22540,7 +22540,7 @@ call $std/math/check if (result i32) f64.const 2.0943951025133885 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.5000000001040902 f64.const -0.2253485918045044 call $std/math/check @@ -22563,7 +22563,7 @@ call $std/math/check if (result i32) f64.const 2.0943951025466707 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.5000000001329135 f64.const -0.12982259690761566 call $std/math/check @@ -22586,7 +22586,7 @@ call $std/math/check if (result i32) f64.const 2.094395102413896 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.5000000000179272 f64.const -0.15886764228343964 call $std/math/check @@ -22609,7 +22609,7 @@ call $std/math/check if (result i32) f64.const 2.0943951024223404 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.5000000000252403 f64.const -0.266656756401062 call $std/math/check @@ -22632,7 +22632,7 @@ call $std/math/check if (result i32) f64.const 2.0943951024960477 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.5000000000890726 f64.const -0.4652077853679657 call $std/math/check @@ -22655,7 +22655,7 @@ call $std/math/check if (result i32) f64.const 2.0943951025173315 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.500000000107505 f64.const -0.46710994839668274 call $std/math/check @@ -22678,7 +22678,7 @@ call $std/math/check if (result i32) f64.const 2.094395102405924 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.5000000000110234 f64.const -0.2469603717327118 call $std/math/check @@ -22701,7 +22701,7 @@ call $std/math/check if (result i32) f64.const 2.094395102428558 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.500000000030625 f64.const -0.3799441158771515 call $std/math/check @@ -22724,7 +22724,7 @@ call $std/math/check if (result i32) f64.const 8.513210770864056 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.6125076939987759 f64.const 0.4989966154098511 call $std/math/check @@ -22747,7 +22747,7 @@ call $std/math/check if (result i32) f64.const 6.802886129801017 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.8679677961345452 f64.const 0.4972165524959564 call $std/math/check @@ -22770,7 +22770,7 @@ call $std/math/check if (result i32) f64.const 9.171925393086408 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.9682027440424544 f64.const -0.49827584624290466 call $std/math/check @@ -22793,7 +22793,7 @@ call $std/math/check if (result i32) f64.const 8.854690112888573 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.8418535663818527 f64.const 0.4974979758262634 call $std/math/check @@ -22816,7 +22816,7 @@ call $std/math/check if (result i32) f64.const 9.213510813859608 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.9777659802838506 f64.const -0.4995604455471039 call $std/math/check @@ -22839,7 +22839,7 @@ call $std/math/check if (result i32) f64.const 7.782449081542151 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.07147156381293339 f64.const 0.49858126044273376 call $std/math/check @@ -22862,7 +22862,7 @@ call $std/math/check if (result i32) f64.const 7.500261332273616 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.34639017633458113 f64.const -0.4996210038661957 call $std/math/check @@ -22885,7 +22885,7 @@ call $std/math/check if (result i32) f64.const 9.121739418731588 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.9544341297541811 f64.const 0.4982815086841583 call $std/math/check @@ -22908,7 +22908,7 @@ call $std/math/check if (result i32) f64.const 6.784954020476316 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.8767332233166646 f64.const -0.4988083839416504 call $std/math/check @@ -22931,7 +22931,7 @@ call $std/math/check if (result i32) f64.const 8.770846542666664 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const -0.7936984117400705 f64.const 0.4999682903289795 call $std/math/check @@ -22954,7 +22954,7 @@ call $std/math/check if (result i32) f64.const 9.313225746154785e-10 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0.001953125 call $std/math/check @@ -22977,7 +22977,7 @@ call $std/math/check if (result i32) f64.const -9.313225746154785e-10 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0.001953125 call $std/math/check @@ -23000,7 +23000,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072014e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23023,7 +23023,7 @@ call $std/math/check if (result i32) f64.const -2.2250738585072014e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23046,7 +23046,7 @@ call $std/math/check if (result i32) f64.const 5e-324 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23069,7 +23069,7 @@ call $std/math/check if (result i32) f64.const -5e-324 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23092,7 +23092,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23115,7 +23115,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23138,7 +23138,7 @@ call $std/math/check if (result i32) f64.const 1e-323 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23161,7 +23161,7 @@ call $std/math/check if (result i32) f64.const 4.4e-323 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23184,7 +23184,7 @@ call $std/math/check if (result i32) f64.const 5.562684646268003e-309 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23207,7 +23207,7 @@ call $std/math/check if (result i32) f64.const 1.1125369292536007e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23230,7 +23230,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072004e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23253,7 +23253,7 @@ call $std/math/check if (result i32) f64.const 2.225073858507201e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23276,7 +23276,7 @@ call $std/math/check if (result i32) f64.const 2.225073858507202e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23299,7 +23299,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072024e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23322,7 +23322,7 @@ call $std/math/check if (result i32) f64.const 4.4501477170144003e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23345,7 +23345,7 @@ call $std/math/check if (result i32) f64.const 4.450147717014403e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23368,7 +23368,7 @@ call $std/math/check if (result i32) f64.const 4.450147717014406e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23391,7 +23391,7 @@ call $std/math/check if (result i32) f64.const 8.900295434028806e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23414,7 +23414,7 @@ call $std/math/check if (result i32) f64.const 7.450580596923828e-09 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0.125 call $std/math/check @@ -23437,7 +23437,7 @@ call $std/math/check if (result i32) f64.const 1.4901161193847656e-08 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.9999999999999999 f64.const -1.850372590034581e-17 call $std/math/check @@ -23460,7 +23460,7 @@ call $std/math/check if (result i32) f64.const 4.470348358154297e-08 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.999999999999999 f64.const -1.4988010832439613e-15 call $std/math/check @@ -23483,7 +23483,7 @@ call $std/math/check if (result i32) f64.const -1e-323 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23506,7 +23506,7 @@ call $std/math/check if (result i32) f64.const -4.4e-323 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23529,7 +23529,7 @@ call $std/math/check if (result i32) f64.const -5.562684646268003e-309 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23552,7 +23552,7 @@ call $std/math/check if (result i32) f64.const -1.1125369292536007e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23575,7 +23575,7 @@ call $std/math/check if (result i32) f64.const -2.2250738585072004e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23598,7 +23598,7 @@ call $std/math/check if (result i32) f64.const -2.225073858507201e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23621,7 +23621,7 @@ call $std/math/check if (result i32) f64.const -2.225073858507202e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23644,7 +23644,7 @@ call $std/math/check if (result i32) f64.const -2.2250738585072024e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23667,7 +23667,7 @@ call $std/math/check if (result i32) f64.const -4.4501477170144003e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23690,7 +23690,7 @@ call $std/math/check if (result i32) f64.const -4.450147717014403e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23713,7 +23713,7 @@ call $std/math/check if (result i32) f64.const -4.450147717014406e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23736,7 +23736,7 @@ call $std/math/check if (result i32) f64.const -8.900295434028806e-308 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0 call $std/math/check @@ -23759,7 +23759,7 @@ call $std/math/check if (result i32) f64.const -7.450580596923828e-09 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 1 f64.const 0.125 call $std/math/check @@ -23782,7 +23782,7 @@ call $std/math/check if (result i32) f64.const -1.4901161193847656e-08 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.9999999999999999 f64.const -1.850372590034581e-17 call $std/math/check @@ -23805,7 +23805,7 @@ call $std/math/check if (result i32) f64.const -4.470348358154297e-08 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.const 0.999999999999999 f64.const -1.4988010832439613e-15 call $std/math/check @@ -23824,7 +23824,7 @@ f64.const 1.5707963267948966 call $~lib/math/NativeMath.cos f64.const 1.5707963267948966 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.ne if i32.const 0 @@ -23837,7 +23837,7 @@ f64.const 3.141592653589793 call $~lib/math/NativeMath.cos f64.const 3.141592653589793 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.ne if i32.const 0 @@ -23850,7 +23850,7 @@ f64.const 3141592653589793231804887e66 call $~lib/math/NativeMath.cos f64.const 3141592653589793231804887e66 - call $~lib/bindings/Math/cos + call $~lib/bindings/dom/Math.cos f64.ne if i32.const 0 @@ -25411,7 +25411,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 3.137706068161745e-04 f64.const -0.2599197328090668 call $std/math/check @@ -25434,7 +25434,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 77.11053017112141 f64.const -0.02792675793170929 call $std/math/check @@ -25457,7 +25457,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 2.290813384916323e-04 f64.const -0.24974334239959717 call $std/math/check @@ -25480,7 +25480,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 1.4565661260931588e-03 f64.const -0.4816822409629822 call $std/math/check @@ -25503,7 +25503,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 10583.558245524993 f64.const 0.17696762084960938 call $std/math/check @@ -25526,7 +25526,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 1.9386384525571998 f64.const -0.4964246451854706 call $std/math/check @@ -25549,7 +25549,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 0.6659078892838025 f64.const -0.10608318448066711 call $std/math/check @@ -25572,7 +25572,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 1.7537559518626311 f64.const -0.39162111282348633 call $std/math/check @@ -25595,7 +25595,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 2.1687528885129246 f64.const -0.2996125817298889 call $std/math/check @@ -25618,7 +25618,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 0.5072437089402843 f64.const 0.47261738777160645 call $std/math/check @@ -25641,7 +25641,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 1 f64.const 0 call $std/math/check @@ -25664,7 +25664,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 1 f64.const 0 call $std/math/check @@ -25687,7 +25687,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 2.718281828459045 f64.const -0.3255307376384735 call $std/math/check @@ -25710,7 +25710,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 0.36787944117144233 f64.const 0.22389651834964752 call $std/math/check @@ -25733,7 +25733,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const inf f64.const 0 call $std/math/check @@ -25756,7 +25756,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 0 f64.const 0 call $std/math/check @@ -25779,7 +25779,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -25802,7 +25802,7 @@ call $std/math/check if (result i32) f64.const 1.0397214889526365 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 2.828429155876411 f64.const 0.18803080916404724 call $std/math/check @@ -25825,7 +25825,7 @@ call $std/math/check if (result i32) f64.const -1.0397214889526365 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 0.35355313670217847 f64.const 0.2527272403240204 call $std/math/check @@ -25848,7 +25848,7 @@ call $std/math/check if (result i32) f64.const 1.0397210121154785 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 2.8284278071766122 f64.const -0.4184139370918274 call $std/math/check @@ -25871,7 +25871,7 @@ call $std/math/check if (result i32) f64.const 1.0397214889526367 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 2.8284291558764116 f64.const -0.22618377208709717 call $std/math/check @@ -25894,7 +25894,7 @@ call $std/math/check if (result i32) f64.const 5e-324 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 1 f64.const 0 call $std/math/check @@ -25917,7 +25917,7 @@ call $std/math/check if (result i32) f64.const -5e-324 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 1 f64.const 0 call $std/math/check @@ -25940,7 +25940,7 @@ call $std/math/check if (result i32) f64.const 709.782712893384 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 1797693134862273196746681e284 f64.const -0.10568465292453766 call $std/math/check @@ -25963,7 +25963,7 @@ call $std/math/check if (result i32) f64.const 709.7827128933841 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const inf f64.const 0 call $std/math/check @@ -25986,7 +25986,7 @@ call $std/math/check if (result i32) f64.const -745.1332191019411 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 5e-324 f64.const 0.5 call $std/math/check @@ -26009,7 +26009,7 @@ call $std/math/check if (result i32) f64.const -745.1332191019412 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 0 f64.const -0.5 call $std/math/check @@ -26032,7 +26032,7 @@ call $std/math/check if (result i32) f64.const -708.3964185322641 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 2.2250738585072626e-308 f64.const 0.26172348856925964 call $std/math/check @@ -26055,7 +26055,7 @@ call $std/math/check if (result i32) f64.const -708.3964185322642 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 2.2250738585070097e-308 f64.const 2.2250738585070097e-308 call $std/math/check @@ -26078,7 +26078,7 @@ call $std/math/check if (result i32) f64.const 0.5006933289508785 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 1.6498647732549399 f64.const 0.5 call $std/math/check @@ -26101,7 +26101,7 @@ call $std/math/check if (result i32) f64.const 0.628493326460252 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 1.8747837631658781 f64.const 0.5 call $std/math/check @@ -26124,7 +26124,7 @@ call $std/math/check if (result i32) f64.const 0.837522455340574 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 2.3106351774748006 f64.const -0.5 call $std/math/check @@ -26147,7 +26147,7 @@ call $std/math/check if (result i32) f64.const 0.8504909932810999 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 2.3407958848710777 f64.const 0.5 call $std/math/check @@ -26170,7 +26170,7 @@ call $std/math/check if (result i32) f64.const 1.6270060846924657 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 5.088617001442459 f64.const 0.5 call $std/math/check @@ -26193,7 +26193,7 @@ call $std/math/check if (result i32) f64.const 1.6744336219614115 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 5.335772228886831 f64.const 0.5 call $std/math/check @@ -26216,7 +26216,7 @@ call $std/math/check if (result i32) f64.const 6.657914718791208 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 778.924964819056 f64.const 0.5 call $std/math/check @@ -26239,7 +26239,7 @@ call $std/math/check if (result i32) f64.const 11.022872793631722 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 61259.41271820104 f64.const 0.5 call $std/math/check @@ -26262,7 +26262,7 @@ call $std/math/check if (result i32) f64.const 11.411195701885317 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 90327.36165653409 f64.const 0.5 call $std/math/check @@ -26285,7 +26285,7 @@ call $std/math/check if (result i32) f64.const 11.794490387560606 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 132520.20290772576 f64.const 0.5 call $std/math/check @@ -26308,7 +26308,7 @@ call $std/math/check if (result i32) f64.const 412.83872756953286 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 1965989977109266413433084e155 f64.const 0.5 call $std/math/check @@ -26331,7 +26331,7 @@ call $std/math/check if (result i32) f64.const 510.87569028483415 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 7421526272656495968225491e197 f64.const -0.5 call $std/math/check @@ -26354,7 +26354,7 @@ call $std/math/check if (result i32) f64.const -2.6589841439772853e-14 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 0.9999999999999735 f64.const 0.5 call $std/math/check @@ -26377,7 +26377,7 @@ call $std/math/check if (result i32) f64.const -2.7144952952085447e-14 - call $~lib/bindings/Math/exp + call $~lib/bindings/dom/Math.exp f64.const 0.9999999999999728 f64.const -0.5 call $std/math/check @@ -26736,7 +26736,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const -0.9996862293931839 f64.const -0.2760058343410492 call $std/math/check @@ -26759,7 +26759,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const 76.11053017112141 f64.const -0.02792675793170929 call $std/math/check @@ -26782,7 +26782,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const -0.9997709186615084 f64.const 0.10052496194839478 call $std/math/check @@ -26805,7 +26805,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const -0.9985434338739069 f64.const -0.27437829971313477 call $std/math/check @@ -26828,7 +26828,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const 10582.558245524993 f64.const 0.17696762084960938 call $std/math/check @@ -26851,7 +26851,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const 0.9386384525571999 f64.const 0.007150684483349323 call $std/math/check @@ -26874,7 +26874,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const -0.3340921107161975 f64.const -0.21216636896133423 call $std/math/check @@ -26897,7 +26897,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const 0.7537559518626312 f64.const 0.21675777435302734 call $std/math/check @@ -26920,7 +26920,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const 1.1687528885129248 f64.const 0.4007748067378998 call $std/math/check @@ -26943,7 +26943,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const -0.4927562910597158 f64.const -0.05476519837975502 call $std/math/check @@ -26966,7 +26966,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const 0 f64.const 0 call $std/math/check @@ -26989,7 +26989,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const -0 f64.const 0 call $std/math/check @@ -27012,7 +27012,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const 1.7182818284590453 f64.const 0.348938524723053 call $std/math/check @@ -27035,7 +27035,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const -0.6321205588285577 f64.const 0.11194825917482376 call $std/math/check @@ -27058,7 +27058,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const inf f64.const 0 call $std/math/check @@ -27081,7 +27081,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const -1 f64.const 0 call $std/math/check @@ -27104,7 +27104,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -27127,7 +27127,7 @@ call $std/math/check if (result i32) f64.const 2.225073858507201e-308 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const 2.225073858507201e-308 f64.const 0 call $std/math/check @@ -27150,7 +27150,7 @@ call $std/math/check if (result i32) f64.const -2.225073858507201e-308 - call $~lib/bindings/Math/expm1 + call $~lib/bindings/dom/Math.expm1 f64.const -2.225073858507201e-308 f64.const 0 call $std/math/check @@ -27995,7 +27995,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const -9 f64.const 0 call $std/math/check @@ -28017,7 +28017,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const 4 f64.const 0 call $std/math/check @@ -28039,7 +28039,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const -9 f64.const 0 call $std/math/check @@ -28061,7 +28061,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const -7 f64.const 0 call $std/math/check @@ -28083,7 +28083,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const 9 f64.const 0 call $std/math/check @@ -28105,7 +28105,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const 0 f64.const 0 call $std/math/check @@ -28127,7 +28127,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const -1 f64.const 0 call $std/math/check @@ -28149,7 +28149,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const 0 f64.const 0 call $std/math/check @@ -28171,7 +28171,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const 0 f64.const 0 call $std/math/check @@ -28193,7 +28193,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const -1 f64.const 0 call $std/math/check @@ -28215,7 +28215,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -28237,7 +28237,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const inf f64.const 0 call $std/math/check @@ -28259,7 +28259,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const -inf f64.const 0 call $std/math/check @@ -28281,7 +28281,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const 0 f64.const 0 call $std/math/check @@ -28303,7 +28303,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const -0 f64.const 0 call $std/math/check @@ -28325,7 +28325,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const 1 f64.const 0 call $std/math/check @@ -28347,7 +28347,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const -1 f64.const 0 call $std/math/check @@ -28369,7 +28369,7 @@ call $std/math/check if (result i32) f64.const 0.5 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const 0 f64.const 0 call $std/math/check @@ -28391,7 +28391,7 @@ call $std/math/check if (result i32) f64.const -0.5 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const -1 f64.const 0 call $std/math/check @@ -28413,7 +28413,7 @@ call $std/math/check if (result i32) f64.const 1.0000152587890625 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const 1 f64.const 0 call $std/math/check @@ -28435,7 +28435,7 @@ call $std/math/check if (result i32) f64.const -1.0000152587890625 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const -2 f64.const 0 call $std/math/check @@ -28457,7 +28457,7 @@ call $std/math/check if (result i32) f64.const 0.9999923706054688 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const 0 f64.const 0 call $std/math/check @@ -28479,7 +28479,7 @@ call $std/math/check if (result i32) f64.const -0.9999923706054688 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const -1 f64.const 0 call $std/math/check @@ -28501,7 +28501,7 @@ call $std/math/check if (result i32) f64.const 7.888609052210118e-31 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const 0 f64.const 0 call $std/math/check @@ -28523,7 +28523,7 @@ call $std/math/check if (result i32) f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/floor + call $~lib/bindings/dom/Math.floor f64.const -1 f64.const 0 call $std/math/check @@ -29711,7 +29711,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -29734,7 +29734,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const 1.4690809584224322 f64.const -0.3412533402442932 call $std/math/check @@ -29757,7 +29757,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -29780,7 +29780,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -29803,7 +29803,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const 2.2264658498795615 f64.const 0.3638114035129547 call $std/math/check @@ -29826,7 +29826,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const -0.4125110252365137 f64.const -0.29108747839927673 call $std/math/check @@ -29849,7 +29849,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -29872,7 +29872,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const -0.5766810183195862 f64.const -0.10983199626207352 call $std/math/check @@ -29895,7 +29895,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const -0.2559866591263865 f64.const -0.057990044355392456 call $std/math/check @@ -29918,7 +29918,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -29941,7 +29941,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const -inf f64.const 0 call $std/math/check @@ -29964,7 +29964,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const -inf f64.const 0 call $std/math/check @@ -29987,7 +29987,7 @@ call $std/math/check if (result i32) f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -30010,7 +30010,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const 0 f64.const 0 call $std/math/check @@ -30033,7 +30033,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -30056,7 +30056,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const inf f64.const 0 call $std/math/check @@ -30079,7 +30079,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -30102,7 +30102,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/log + call $~lib/bindings/dom/Math.log f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -30817,7 +30817,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -30840,7 +30840,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const 1.6762064170601734 f64.const 0.46188199520111084 call $std/math/check @@ -30863,7 +30863,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -30886,7 +30886,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -30909,7 +30909,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const 2.3289404168523826 f64.const -0.411114901304245 call $std/math/check @@ -30932,7 +30932,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const 0.5080132114992477 f64.const -0.29306045174598694 call $std/math/check @@ -30955,7 +30955,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const -0.5218931811663979 f64.const -0.25825726985931396 call $std/math/check @@ -30978,7 +30978,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const 0.4458132279488102 f64.const -0.13274887204170227 call $std/math/check @@ -31001,7 +31001,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const 0.5733227294648414 f64.const 0.02716583013534546 call $std/math/check @@ -31024,7 +31024,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const -1.1355782978128564 f64.const 0.2713092863559723 call $std/math/check @@ -31047,7 +31047,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const 0 f64.const 0 call $std/math/check @@ -31070,7 +31070,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const -0 f64.const 0 call $std/math/check @@ -31093,7 +31093,7 @@ call $std/math/check if (result i32) f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const -7.888609052210118e-31 f64.const 1.7763568394002505e-15 call $std/math/check @@ -31116,7 +31116,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const 0.6931471805599453 f64.const -0.2088811695575714 call $std/math/check @@ -31139,7 +31139,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const -inf f64.const 0 call $std/math/check @@ -31162,7 +31162,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const inf f64.const 0 call $std/math/check @@ -31185,7 +31185,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -31208,7 +31208,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/log1p + call $~lib/bindings/dom/Math.log1p f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -31497,7 +31497,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -31520,7 +31520,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const 2.1194358133804485 f64.const -0.10164877772331238 call $std/math/check @@ -31543,7 +31543,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -31566,7 +31566,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -31589,7 +31589,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const 3.2121112403298744 f64.const -0.15739446878433228 call $std/math/check @@ -31612,7 +31612,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const -0.5951276104207402 f64.const 0.3321485221385956 call $std/math/check @@ -31635,7 +31635,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -31658,7 +31658,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const -0.8319748453044644 f64.const 0.057555437088012695 call $std/math/check @@ -31681,7 +31681,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const -0.36931068365537134 f64.const -0.19838279485702515 call $std/math/check @@ -31704,7 +31704,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -31727,7 +31727,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const -inf f64.const 0 call $std/math/check @@ -31750,7 +31750,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const -inf f64.const 0 call $std/math/check @@ -31773,7 +31773,7 @@ call $std/math/check if (result i32) f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -31796,7 +31796,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const 0 f64.const 0 call $std/math/check @@ -31819,7 +31819,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -31842,7 +31842,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const inf f64.const 0 call $std/math/check @@ -31865,7 +31865,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -31888,7 +31888,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/log2 + call $~lib/bindings/dom/Math.log2 f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -43955,7 +43955,7 @@ call $~lib/builtins/abort unreachable end - call $~lib/bindings/Math/random + call $~lib/bindings/dom/Math.random i64.reinterpret_f64 call $~lib/math/NativeMath.seedRandom loop $for-loop|0 @@ -44024,7 +44024,7 @@ br $for-loop|0 end end - call $~lib/bindings/Math/random + call $~lib/bindings/dom/Math.random i64.reinterpret_f64 call $~lib/math/NativeMath.seedRandom i32.const 0 @@ -47278,7 +47278,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -0.9774292928781227 f64.const -0.14564912021160126 call $std/math/check @@ -47301,7 +47301,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -0.9333544736965718 f64.const -0.08813747018575668 call $std/math/check @@ -47324,7 +47324,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -0.8640924711706304 f64.const -0.11743883043527603 call $std/math/check @@ -47347,7 +47347,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -0.24593894772615374 f64.const -0.12697851657867432 call $std/math/check @@ -47370,7 +47370,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 0.15706789772028007 f64.const -0.029550159350037575 call $std/math/check @@ -47393,7 +47393,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 0.6146844860113447 f64.const -0.09976737946271896 call $std/math/check @@ -47416,7 +47416,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -0.39549242182823696 f64.const -0.3668774962425232 call $std/math/check @@ -47439,7 +47439,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 0.5326763286672376 f64.const -0.3550407588481903 call $std/math/check @@ -47462,7 +47462,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 0.6991102068649779 f64.const -0.427672415971756 call $std/math/check @@ -47485,7 +47485,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -0.6278312326301215 f64.const -0.3828115463256836 call $std/math/check @@ -47508,7 +47508,7 @@ call $std/math/check if (result i32) f64.const 9.313225746154785e-10 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 9.313225746154785e-10 f64.const 6.510416860692203e-04 call $std/math/check @@ -47531,7 +47531,7 @@ call $std/math/check if (result i32) f64.const -9.313225746154785e-10 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -9.313225746154785e-10 f64.const -6.510416860692203e-04 call $std/math/check @@ -47554,7 +47554,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072014e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 2.2250738585072014e-308 f64.const 0 call $std/math/check @@ -47577,7 +47577,7 @@ call $std/math/check if (result i32) f64.const -2.2250738585072014e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -2.2250738585072014e-308 f64.const 0 call $std/math/check @@ -47600,7 +47600,7 @@ call $std/math/check if (result i32) f64.const 5e-324 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 5e-324 f64.const 0 call $std/math/check @@ -47623,7 +47623,7 @@ call $std/math/check if (result i32) f64.const -5e-324 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -5e-324 f64.const 0 call $std/math/check @@ -47646,7 +47646,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 0 f64.const 0 call $std/math/check @@ -47669,7 +47669,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -0 f64.const 0 call $std/math/check @@ -47692,7 +47692,7 @@ call $std/math/check if (result i32) f64.const 2.225073858507202e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 2.225073858507202e-308 f64.const 0 call $std/math/check @@ -47715,7 +47715,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072024e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 2.2250738585072024e-308 f64.const 0 call $std/math/check @@ -47738,7 +47738,7 @@ call $std/math/check if (result i32) f64.const 4.4501477170144003e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 4.4501477170144003e-308 f64.const 0 call $std/math/check @@ -47761,7 +47761,7 @@ call $std/math/check if (result i32) f64.const 4.450147717014403e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 4.450147717014403e-308 f64.const 0 call $std/math/check @@ -47784,7 +47784,7 @@ call $std/math/check if (result i32) f64.const 4.450147717014406e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 4.450147717014406e-308 f64.const 0 call $std/math/check @@ -47807,7 +47807,7 @@ call $std/math/check if (result i32) f64.const 8.900295434028806e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 8.900295434028806e-308 f64.const 0 call $std/math/check @@ -47830,7 +47830,7 @@ call $std/math/check if (result i32) f64.const 1.1175870895385742e-08 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 1.1175870895385742e-08 f64.const 0.140625 call $std/math/check @@ -47853,7 +47853,7 @@ call $std/math/check if (result i32) f64.const 1.4901161193847656e-08 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 1.4901161193847656e-08 f64.const 0.1666666716337204 call $std/math/check @@ -47876,7 +47876,7 @@ call $std/math/check if (result i32) f64.const -2.225073858507202e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -2.225073858507202e-308 f64.const 0 call $std/math/check @@ -47899,7 +47899,7 @@ call $std/math/check if (result i32) f64.const -2.2250738585072024e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -2.2250738585072024e-308 f64.const 0 call $std/math/check @@ -47922,7 +47922,7 @@ call $std/math/check if (result i32) f64.const -4.4501477170144003e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -4.4501477170144003e-308 f64.const 0 call $std/math/check @@ -47945,7 +47945,7 @@ call $std/math/check if (result i32) f64.const -4.450147717014403e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -4.450147717014403e-308 f64.const 0 call $std/math/check @@ -47968,7 +47968,7 @@ call $std/math/check if (result i32) f64.const -4.450147717014406e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -4.450147717014406e-308 f64.const 0 call $std/math/check @@ -47991,7 +47991,7 @@ call $std/math/check if (result i32) f64.const -8.900295434028806e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -8.900295434028806e-308 f64.const 0 call $std/math/check @@ -48014,7 +48014,7 @@ call $std/math/check if (result i32) f64.const -1.1175870895385742e-08 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -1.1175870895385742e-08 f64.const -0.140625 call $std/math/check @@ -48037,7 +48037,7 @@ call $std/math/check if (result i32) f64.const -1.4901161193847656e-08 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -1.4901161193847656e-08 f64.const -0.1666666716337204 call $std/math/check @@ -48060,7 +48060,7 @@ call $std/math/check if (result i32) f64.const -1.4901161193847656e-08 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -1.4901161193847656e-08 f64.const -0.1666666716337204 call $std/math/check @@ -48083,7 +48083,7 @@ call $std/math/check if (result i32) f64.const 1e-323 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 1e-323 f64.const 0 call $std/math/check @@ -48106,7 +48106,7 @@ call $std/math/check if (result i32) f64.const 4.4e-323 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 4.4e-323 f64.const 0 call $std/math/check @@ -48129,7 +48129,7 @@ call $std/math/check if (result i32) f64.const 5.562684646268003e-309 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 5.562684646268003e-309 f64.const 0 call $std/math/check @@ -48152,7 +48152,7 @@ call $std/math/check if (result i32) f64.const 1.1125369292536007e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 1.1125369292536007e-308 f64.const 0 call $std/math/check @@ -48175,7 +48175,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072004e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 2.2250738585072004e-308 f64.const 0 call $std/math/check @@ -48198,7 +48198,7 @@ call $std/math/check if (result i32) f64.const 2.225073858507201e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 2.225073858507201e-308 f64.const 0 call $std/math/check @@ -48221,7 +48221,7 @@ call $std/math/check if (result i32) f64.const -1e-323 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -1e-323 f64.const 0 call $std/math/check @@ -48244,7 +48244,7 @@ call $std/math/check if (result i32) f64.const -4.4e-323 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -4.4e-323 f64.const 0 call $std/math/check @@ -48267,7 +48267,7 @@ call $std/math/check if (result i32) f64.const -5.562684646268003e-309 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -5.562684646268003e-309 f64.const 0 call $std/math/check @@ -48290,7 +48290,7 @@ call $std/math/check if (result i32) f64.const -1.1125369292536007e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -1.1125369292536007e-308 f64.const 0 call $std/math/check @@ -48313,7 +48313,7 @@ call $std/math/check if (result i32) f64.const -2.2250738585072004e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -2.2250738585072004e-308 f64.const 0 call $std/math/check @@ -48336,7 +48336,7 @@ call $std/math/check if (result i32) f64.const -2.225073858507201e-308 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -2.225073858507201e-308 f64.const 0 call $std/math/check @@ -48359,7 +48359,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const 0 f64.const 0 call $std/math/check @@ -48382,7 +48382,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const -0 f64.const 0 call $std/math/check @@ -48405,7 +48405,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -48428,7 +48428,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -48451,7 +48451,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -48470,7 +48470,7 @@ f64.const 1.5707963267948966 call $~lib/math/NativeMath.sin f64.const 1.5707963267948966 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.ne if i32.const 0 @@ -48483,7 +48483,7 @@ f64.const 3.141592653589793 call $~lib/math/NativeMath.sin f64.const 3.141592653589793 - call $~lib/bindings/Math/sin + call $~lib/bindings/dom/Math.sin f64.ne if i32.const 0 @@ -50031,7 +50031,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -50053,7 +50053,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 2.0845238903256313 f64.const -0.07180261611938477 call $std/math/check @@ -50075,7 +50075,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -50097,7 +50097,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -50119,7 +50119,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 3.0441841217266385 f64.const -0.01546262577176094 call $std/math/check @@ -50141,7 +50141,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 0.8136251582267503 f64.const -0.08618157356977463 call $std/math/check @@ -50163,7 +50163,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -50185,7 +50185,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 0.7495063350104014 f64.const -0.0981396734714508 call $std/math/check @@ -50207,7 +50207,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 0.879859248170583 f64.const -0.37124353647232056 call $std/math/check @@ -50229,7 +50229,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -50251,7 +50251,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -50273,7 +50273,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const inf f64.const 0 call $std/math/check @@ -50295,7 +50295,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -50317,7 +50317,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 0 f64.const 0 call $std/math/check @@ -50339,7 +50339,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const -0 f64.const 0 call $std/math/check @@ -50361,7 +50361,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1 f64.const 0 call $std/math/check @@ -50383,7 +50383,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -50405,7 +50405,7 @@ call $std/math/check if (result i32) f64.const 4 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 2 f64.const 0 call $std/math/check @@ -50427,7 +50427,7 @@ call $std/math/check if (result i32) f64.const 1e-323 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 3.1434555694052576e-162 f64.const 0.43537619709968567 call $std/math/check @@ -50449,7 +50449,7 @@ call $std/math/check if (result i32) f64.const 1.5e-323 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 3.849931087076416e-162 f64.const -0.45194002985954285 call $std/math/check @@ -50471,7 +50471,7 @@ call $std/math/check if (result i32) f64.const 5e-324 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 2.2227587494850775e-162 f64.const 0 call $std/math/check @@ -50493,7 +50493,7 @@ call $std/math/check if (result i32) f64.const -5e-324 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -50515,7 +50515,7 @@ call $std/math/check if (result i32) f64.const 0.9999999999999999 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 0.9999999999999999 f64.const -0.5 call $std/math/check @@ -50537,7 +50537,7 @@ call $std/math/check if (result i32) f64.const 1.9999999999999998 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.414213562373095 f64.const -0.21107041835784912 call $std/math/check @@ -50559,7 +50559,7 @@ call $std/math/check if (result i32) f64.const 1.0000000000000002 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1 f64.const -0.5 call $std/math/check @@ -50581,7 +50581,7 @@ call $std/math/check if (result i32) f64.const 2.0000000000000004 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.4142135623730951 f64.const -0.27173060178756714 call $std/math/check @@ -50603,7 +50603,7 @@ call $std/math/check if (result i32) f64.const 1.0000000000000002 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1 f64.const -0.5 call $std/math/check @@ -50625,7 +50625,7 @@ call $std/math/check if (result i32) f64.const 0.9999999999999999 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 0.9999999999999999 f64.const -0.5 call $std/math/check @@ -50647,7 +50647,7 @@ call $std/math/check if (result i32) f64.const -1797693134862315708145274e284 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -50669,7 +50669,7 @@ call $std/math/check if (result i32) f64.const 1797693134862315708145274e284 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1340780792994259561100831e130 f64.const -0.5 call $std/math/check @@ -50691,7 +50691,7 @@ call $std/math/check if (result i32) f64.const 179769313486231490980915e285 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 134078079299425926338769e131 f64.const -0.5 call $std/math/check @@ -50713,7 +50713,7 @@ call $std/math/check if (result i32) f64.const 1797693134862314111473026e284 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1340780792994258965674548e130 f64.const -0.5 call $std/math/check @@ -50735,7 +50735,7 @@ call $std/math/check if (result i32) f64.const 1797693134862313313136902e284 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1340780792994258667961407e130 f64.const -0.5 call $std/math/check @@ -50757,7 +50757,7 @@ call $std/math/check if (result i32) f64.const 1797693134862312514800778e284 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1340780792994258370248265e130 f64.const -0.5 call $std/math/check @@ -50779,7 +50779,7 @@ call $std/math/check if (result i32) f64.const 1797693134862311716464655e284 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1340780792994258072535124e130 f64.const -0.5 call $std/math/check @@ -50801,7 +50801,7 @@ call $std/math/check if (result i32) f64.const 1797693134862310918128531e284 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1340780792994257774821982e130 f64.const -0.5 call $std/math/check @@ -50823,7 +50823,7 @@ call $std/math/check if (result i32) f64.const 1797693134862310119792407e284 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1340780792994257477108841e130 f64.const -0.5 call $std/math/check @@ -50845,7 +50845,7 @@ call $std/math/check if (result i32) f64.const 1797693134862309321456283e284 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1340780792994257179395699e130 f64.const -0.5 call $std/math/check @@ -50867,7 +50867,7 @@ call $std/math/check if (result i32) f64.const 1797693134862308523120159e284 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1340780792994256881682558e130 f64.const -0.5 call $std/math/check @@ -50889,7 +50889,7 @@ call $std/math/check if (result i32) f64.const 1797693134862307724784036e284 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1340780792994256583969417e130 f64.const -0.5 call $std/math/check @@ -50911,7 +50911,7 @@ call $std/math/check if (result i32) f64.const 2.225073858507203e-308 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.4916681462400417e-154 f64.const -0.5 call $std/math/check @@ -50933,7 +50933,7 @@ call $std/math/check if (result i32) f64.const 2.225073858507205e-308 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.4916681462400423e-154 f64.const -0.5 call $std/math/check @@ -50955,7 +50955,7 @@ call $std/math/check if (result i32) f64.const 2.225073858507207e-308 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.491668146240043e-154 f64.const -0.5 call $std/math/check @@ -50977,7 +50977,7 @@ call $std/math/check if (result i32) f64.const 2.225073858507209e-308 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.4916681462400437e-154 f64.const -0.5 call $std/math/check @@ -50999,7 +50999,7 @@ call $std/math/check if (result i32) f64.const 2.225073858507211e-308 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.4916681462400443e-154 f64.const -0.5 call $std/math/check @@ -51021,7 +51021,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072127e-308 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.491668146240045e-154 f64.const -0.5 call $std/math/check @@ -51043,7 +51043,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072147e-308 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.4916681462400457e-154 f64.const -0.5 call $std/math/check @@ -51065,7 +51065,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072167e-308 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.4916681462400463e-154 f64.const -0.5 call $std/math/check @@ -51087,7 +51087,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072187e-308 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.491668146240047e-154 f64.const -0.5 call $std/math/check @@ -51109,7 +51109,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072207e-308 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.4916681462400476e-154 f64.const -0.5 call $std/math/check @@ -51131,7 +51131,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072226e-308 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.4916681462400483e-154 f64.const -0.5 call $std/math/check @@ -51153,7 +51153,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072246e-308 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.491668146240049e-154 f64.const -0.5 call $std/math/check @@ -51175,7 +51175,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072266e-308 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.4916681462400496e-154 f64.const -0.5 call $std/math/check @@ -51197,7 +51197,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072286e-308 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.4916681462400503e-154 f64.const -0.5 call $std/math/check @@ -51219,7 +51219,7 @@ call $std/math/check if (result i32) f64.const 92.35130391890645 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 9.609958580499006 f64.const 0.4998137056827545 call $std/math/check @@ -51241,7 +51241,7 @@ call $std/math/check if (result i32) f64.const 93.3599596388916 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 9.662295774757238 f64.const -0.49979978799819946 call $std/math/check @@ -51263,7 +51263,7 @@ call $std/math/check if (result i32) f64.const 95.42049628886124 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 9.76834153215689 f64.const -0.49997270107269287 call $std/math/check @@ -51285,7 +51285,7 @@ call $std/math/check if (result i32) f64.const 95.87916941885449 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 9.791790919890728 f64.const 0.4998766779899597 call $std/math/check @@ -51307,7 +51307,7 @@ call $std/math/check if (result i32) f64.const 96.84804174884022 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 9.841140266698785 f64.const 0.499801903963089 call $std/math/check @@ -51329,7 +51329,7 @@ call $std/math/check if (result i32) f64.const 97.43639050883155 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 9.87098731175517 f64.const 0.4997696280479431 call $std/math/check @@ -51351,7 +51351,7 @@ call $std/math/check if (result i32) f64.const 97.50957979883047 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 9.874693909120955 f64.const 0.49999818205833435 call $std/math/check @@ -51373,7 +51373,7 @@ call $std/math/check if (result i32) f64.const 97.80496893882612 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 9.88963947466368 f64.const -0.4999580681324005 call $std/math/check @@ -51395,7 +51395,7 @@ call $std/math/check if (result i32) f64.const 98.2751822888192 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 9.913383997849534 f64.const 0.49979931116104126 call $std/math/check @@ -51417,7 +51417,7 @@ call $std/math/check if (result i32) f64.const 99.47293564880155 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 9.973611966023219 f64.const -0.4999540448188782 call $std/math/check @@ -51439,7 +51439,7 @@ call $std/math/check if (result i32) f64.const 100.57047130878539 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 10.028483001370914 f64.const -0.49996453523635864 call $std/math/check @@ -51461,7 +51461,7 @@ call $std/math/check if (result i32) f64.const 100.60954608878481 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 10.030431002144665 f64.const 0.49975672364234924 call $std/math/check @@ -51483,7 +51483,7 @@ call $std/math/check if (result i32) f64.const 100.67909109878379 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 10.033897104255344 f64.const -0.4997771382331848 call $std/math/check @@ -51505,7 +51505,7 @@ call $std/math/check if (result i32) f64.const 101.12268095877725 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 10.055977374615422 f64.const 0.49988678097724915 call $std/math/check @@ -51527,7 +51527,7 @@ call $std/math/check if (result i32) f64.const 101.3027691287746 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 10.064927676281366 f64.const 0.4999105632305145 call $std/math/check @@ -51549,7 +51549,7 @@ call $std/math/check if (result i32) f64.const 2.45932313565507e-307 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 4.9591563149945874e-154 f64.const -0.4998999834060669 call $std/math/check @@ -51571,7 +51571,7 @@ call $std/math/check if (result i32) f64.const 5.610957305180409e-307 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 7.490632353266584e-154 f64.const -0.4999343752861023 call $std/math/check @@ -51593,7 +51593,7 @@ call $std/math/check if (result i32) f64.const 5.8073887977408524e-307 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 7.62062254526548e-154 f64.const -0.49989569187164307 call $std/math/check @@ -51615,7 +51615,7 @@ call $std/math/check if (result i32) f64.const 7.026137080471427e-307 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 8.382205605013174e-154 f64.const 0.49980640411376953 call $std/math/check @@ -51637,7 +51637,7 @@ call $std/math/check if (result i32) f64.const 8.438697769194972e-307 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 9.186238495268328e-154 f64.const -0.4999065697193146 call $std/math/check @@ -51659,7 +51659,7 @@ call $std/math/check if (result i32) f64.const 1.1607792515836795e-306 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.0773946591586944e-153 f64.const -0.49997684359550476 call $std/math/check @@ -51681,7 +51681,7 @@ call $std/math/check if (result i32) f64.const 1.2827413827423193e-306 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.1325817333606962e-153 f64.const -0.4999513030052185 call $std/math/check @@ -51703,7 +51703,7 @@ call $std/math/check if (result i32) f64.const 1.7116604596087457e-306 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.3083044216117078e-153 f64.const -0.49986395239830017 call $std/math/check @@ -51725,7 +51725,7 @@ call $std/math/check if (result i32) f64.const 2.038173251686994e-306 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.4276460526639628e-153 f64.const 0.4998403787612915 call $std/math/check @@ -51747,7 +51747,7 @@ call $std/math/check if (result i32) f64.const 2.171572060856931e-306 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.4736254818836879e-153 f64.const 0.4999290406703949 call $std/math/check @@ -51769,7 +51769,7 @@ call $std/math/check if (result i32) f64.const 2.4681399631804094e-306 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.5710314965589996e-153 f64.const 0.49989044666290283 call $std/math/check @@ -51791,7 +51791,7 @@ call $std/math/check if (result i32) f64.const 2.5175533964200588e-306 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.5866799918131124e-153 f64.const -0.4997701048851013 call $std/math/check @@ -51813,7 +51813,7 @@ call $std/math/check if (result i32) f64.const 2.6461505468829625e-306 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.6266992797941982e-153 f64.const 0.4998672902584076 call $std/math/check @@ -51835,7 +51835,7 @@ call $std/math/check if (result i32) f64.const 3.8167076367720413e-306 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 1.9536395872248397e-153 f64.const 0.49983471632003784 call $std/math/check @@ -51857,7 +51857,7 @@ call $std/math/check if (result i32) f64.const 4.5743220778562766e-306 - call $~lib/bindings/Math/sqrt + call $~lib/bindings/dom/Math.sqrt f64.const 2.1387664851161936e-153 f64.const 0.49985939264297485 call $std/math/check @@ -52296,7 +52296,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 4.626603542401633 f64.const -0.2727603316307068 call $std/math/check @@ -52319,7 +52319,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 2.600191705822202 f64.const 0.2651003301143646 call $std/math/check @@ -52342,7 +52342,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 1.7167408328741052 f64.const -0.24687519669532776 call $std/math/check @@ -52365,7 +52365,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -0.2537322523453725 f64.const -0.4679703712463379 call $std/math/check @@ -52388,7 +52388,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -0.15904195727191958 f64.const -0.06704077869653702 call $std/math/check @@ -52411,7 +52411,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 0.7792919106910434 f64.const -0.038056135177612305 call $std/math/check @@ -52434,7 +52434,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -0.43059952879543656 f64.const -0.09242714196443558 call $std/math/check @@ -52457,7 +52457,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 0.62940368731874 f64.const -0.321913480758667 call $std/math/check @@ -52480,7 +52480,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 0.9777574652949645 f64.const -0.1966651827096939 call $std/math/check @@ -52503,7 +52503,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -0.8066186630209123 f64.const -0.067665696144104 call $std/math/check @@ -52526,7 +52526,7 @@ call $std/math/check if (result i32) f64.const 9.313225746154785e-10 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 9.313225746154785e-10 f64.const -1.3020833721384406e-03 call $std/math/check @@ -52549,7 +52549,7 @@ call $std/math/check if (result i32) f64.const -9.313225746154785e-10 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -9.313225746154785e-10 f64.const 1.3020833721384406e-03 call $std/math/check @@ -52572,7 +52572,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072014e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 2.2250738585072014e-308 f64.const 0 call $std/math/check @@ -52595,7 +52595,7 @@ call $std/math/check if (result i32) f64.const -2.2250738585072014e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -2.2250738585072014e-308 f64.const 0 call $std/math/check @@ -52618,7 +52618,7 @@ call $std/math/check if (result i32) f64.const 5e-324 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 5e-324 f64.const 0 call $std/math/check @@ -52641,7 +52641,7 @@ call $std/math/check if (result i32) f64.const -5e-324 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -5e-324 f64.const 0 call $std/math/check @@ -52664,7 +52664,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 0 f64.const 0 call $std/math/check @@ -52687,7 +52687,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -0 f64.const 0 call $std/math/check @@ -52710,7 +52710,7 @@ call $std/math/check if (result i32) f64.const 0.7853981633974483 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 0.9999999999999999 f64.const -0.4484681189060211 call $std/math/check @@ -52733,7 +52733,7 @@ call $std/math/check if (result i32) f64.const -0.7853981633974483 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -0.9999999999999999 f64.const 0.4484681189060211 call $std/math/check @@ -52756,7 +52756,7 @@ call $std/math/check if (result i32) f64.const 2.225073858507202e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 2.225073858507202e-308 f64.const 0 call $std/math/check @@ -52779,7 +52779,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072024e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 2.2250738585072024e-308 f64.const 0 call $std/math/check @@ -52802,7 +52802,7 @@ call $std/math/check if (result i32) f64.const 4.4501477170144003e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 4.4501477170144003e-308 f64.const 0 call $std/math/check @@ -52825,7 +52825,7 @@ call $std/math/check if (result i32) f64.const 4.450147717014403e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 4.450147717014403e-308 f64.const 0 call $std/math/check @@ -52848,7 +52848,7 @@ call $std/math/check if (result i32) f64.const 4.450147717014406e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 4.450147717014406e-308 f64.const 0 call $std/math/check @@ -52871,7 +52871,7 @@ call $std/math/check if (result i32) f64.const 8.900295434028806e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 8.900295434028806e-308 f64.const 0 call $std/math/check @@ -52894,7 +52894,7 @@ call $std/math/check if (result i32) f64.const 1.1175870895385742e-08 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 1.1175870895385742e-08 f64.const -0.28125 call $std/math/check @@ -52917,7 +52917,7 @@ call $std/math/check if (result i32) f64.const 1.4901161193847656e-08 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 1.4901161193847656e-08 f64.const -0.3333333432674408 call $std/math/check @@ -52940,7 +52940,7 @@ call $std/math/check if (result i32) f64.const -2.225073858507202e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -2.225073858507202e-308 f64.const 0 call $std/math/check @@ -52963,7 +52963,7 @@ call $std/math/check if (result i32) f64.const -2.2250738585072024e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -2.2250738585072024e-308 f64.const 0 call $std/math/check @@ -52986,7 +52986,7 @@ call $std/math/check if (result i32) f64.const -4.4501477170144003e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -4.4501477170144003e-308 f64.const 0 call $std/math/check @@ -53009,7 +53009,7 @@ call $std/math/check if (result i32) f64.const -4.450147717014403e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -4.450147717014403e-308 f64.const 0 call $std/math/check @@ -53032,7 +53032,7 @@ call $std/math/check if (result i32) f64.const -4.450147717014406e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -4.450147717014406e-308 f64.const 0 call $std/math/check @@ -53055,7 +53055,7 @@ call $std/math/check if (result i32) f64.const -8.900295434028806e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -8.900295434028806e-308 f64.const 0 call $std/math/check @@ -53078,7 +53078,7 @@ call $std/math/check if (result i32) f64.const -1.1175870895385742e-08 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -1.1175870895385742e-08 f64.const 0.28125 call $std/math/check @@ -53101,7 +53101,7 @@ call $std/math/check if (result i32) f64.const -1.4901161193847656e-08 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -1.4901161193847656e-08 f64.const 0.3333333432674408 call $std/math/check @@ -53124,7 +53124,7 @@ call $std/math/check if (result i32) f64.const 1e-323 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 1e-323 f64.const 0 call $std/math/check @@ -53147,7 +53147,7 @@ call $std/math/check if (result i32) f64.const 4.4e-323 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 4.4e-323 f64.const 0 call $std/math/check @@ -53170,7 +53170,7 @@ call $std/math/check if (result i32) f64.const 5.562684646268003e-309 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 5.562684646268003e-309 f64.const 0 call $std/math/check @@ -53193,7 +53193,7 @@ call $std/math/check if (result i32) f64.const 1.1125369292536007e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 1.1125369292536007e-308 f64.const 0 call $std/math/check @@ -53216,7 +53216,7 @@ call $std/math/check if (result i32) f64.const 2.2250738585072004e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 2.2250738585072004e-308 f64.const 0 call $std/math/check @@ -53239,7 +53239,7 @@ call $std/math/check if (result i32) f64.const 2.225073858507201e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 2.225073858507201e-308 f64.const 0 call $std/math/check @@ -53262,7 +53262,7 @@ call $std/math/check if (result i32) f64.const -1e-323 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -1e-323 f64.const 0 call $std/math/check @@ -53285,7 +53285,7 @@ call $std/math/check if (result i32) f64.const -4.4e-323 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -4.4e-323 f64.const 0 call $std/math/check @@ -53308,7 +53308,7 @@ call $std/math/check if (result i32) f64.const -5.562684646268003e-309 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -5.562684646268003e-309 f64.const 0 call $std/math/check @@ -53331,7 +53331,7 @@ call $std/math/check if (result i32) f64.const -1.1125369292536007e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -1.1125369292536007e-308 f64.const 0 call $std/math/check @@ -53354,7 +53354,7 @@ call $std/math/check if (result i32) f64.const -2.2250738585072004e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -2.2250738585072004e-308 f64.const 0 call $std/math/check @@ -53377,7 +53377,7 @@ call $std/math/check if (result i32) f64.const -2.225073858507201e-308 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -2.225073858507201e-308 f64.const 0 call $std/math/check @@ -53396,7 +53396,7 @@ f64.const 2.3283064365386963e-10 call $~lib/math/NativeMath.tan f64.const 2.3283064365386963e-10 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53409,7 +53409,7 @@ f64.const -2.3283064365386963e-10 call $~lib/math/NativeMath.tan f64.const -2.3283064365386963e-10 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53422,7 +53422,7 @@ f64.const 0.6875 call $~lib/math/NativeMath.tan f64.const 0.6875 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53435,7 +53435,7 @@ f64.const -0.6875 call $~lib/math/NativeMath.tan f64.const -0.6875 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53448,7 +53448,7 @@ f64.const 0.39269908169872414 call $~lib/math/NativeMath.tan f64.const 0.39269908169872414 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53461,7 +53461,7 @@ f64.const 0.6743358 call $~lib/math/NativeMath.tan f64.const 0.6743358 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53474,7 +53474,7 @@ f64.const 3.725290298461914e-09 call $~lib/math/NativeMath.tan f64.const 3.725290298461914e-09 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53487,7 +53487,7 @@ f64.const 1.5707963267948966 call $~lib/math/NativeMath.tan f64.const 1.5707963267948966 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53500,7 +53500,7 @@ f64.const 0.5 call $~lib/math/NativeMath.tan f64.const 0.5 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53513,7 +53513,7 @@ f64.const 1.107148717794091 call $~lib/math/NativeMath.tan f64.const 1.107148717794091 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53526,7 +53526,7 @@ f64.const 5.497787143782138 call $~lib/math/NativeMath.tan f64.const 5.497787143782138 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53539,7 +53539,7 @@ f64.const 7.0685834705770345 call $~lib/math/NativeMath.tan f64.const 7.0685834705770345 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53552,7 +53552,7 @@ f64.const 1647099.3291652855 call $~lib/math/NativeMath.tan f64.const 1647099.3291652855 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53565,7 +53565,7 @@ f64.const 1647097.7583689587 call $~lib/math/NativeMath.tan f64.const 1647097.7583689587 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53578,7 +53578,7 @@ f64.const 1329227995784915872903807e12 call $~lib/math/NativeMath.tan f64.const 1329227995784915872903807e12 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53591,7 +53591,7 @@ f64.const -1329227995784915872903807e12 call $~lib/math/NativeMath.tan f64.const -1329227995784915872903807e12 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.ne if i32.const 0 @@ -53608,7 +53608,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const 0 f64.const 0 call $std/math/check @@ -53631,7 +53631,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const -0 f64.const 0 call $std/math/check @@ -53654,7 +53654,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -53677,7 +53677,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -53700,7 +53700,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/tan + call $~lib/bindings/dom/Math.tan f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -54826,7 +54826,7 @@ call $std/math/check if (result i32) f64.const -8.06684839057968 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const -8 f64.const 0 call $std/math/check @@ -54848,7 +54848,7 @@ call $std/math/check if (result i32) f64.const 4.345239849338305 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const 4 f64.const 0 call $std/math/check @@ -54870,7 +54870,7 @@ call $std/math/check if (result i32) f64.const -8.38143342755525 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const -8 f64.const 0 call $std/math/check @@ -54892,7 +54892,7 @@ call $std/math/check if (result i32) f64.const -6.531673581913484 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const -6 f64.const 0 call $std/math/check @@ -54914,7 +54914,7 @@ call $std/math/check if (result i32) f64.const 9.267056966972586 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const 9 f64.const 0 call $std/math/check @@ -54936,7 +54936,7 @@ call $std/math/check if (result i32) f64.const 0.6619858980995045 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const 0 f64.const 0 call $std/math/check @@ -54958,7 +54958,7 @@ call $std/math/check if (result i32) f64.const -0.4066039223853553 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const -0 f64.const 0 call $std/math/check @@ -54980,7 +54980,7 @@ call $std/math/check if (result i32) f64.const 0.5617597462207241 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const 0 f64.const 0 call $std/math/check @@ -55002,7 +55002,7 @@ call $std/math/check if (result i32) f64.const 0.7741522965913037 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const 0 f64.const 0 call $std/math/check @@ -55024,7 +55024,7 @@ call $std/math/check if (result i32) f64.const -0.6787637026394024 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const -0 f64.const 0 call $std/math/check @@ -55046,7 +55046,7 @@ call $std/math/check if (result i32) f64.const nan:0x8000000000000 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const nan:0x8000000000000 f64.const 0 call $std/math/check @@ -55068,7 +55068,7 @@ call $std/math/check if (result i32) f64.const inf - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const inf f64.const 0 call $std/math/check @@ -55090,7 +55090,7 @@ call $std/math/check if (result i32) f64.const -inf - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const -inf f64.const 0 call $std/math/check @@ -55112,7 +55112,7 @@ call $std/math/check if (result i32) f64.const 0 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const 0 f64.const 0 call $std/math/check @@ -55134,7 +55134,7 @@ call $std/math/check if (result i32) f64.const -0 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const -0 f64.const 0 call $std/math/check @@ -55156,7 +55156,7 @@ call $std/math/check if (result i32) f64.const 1 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const 1 f64.const 0 call $std/math/check @@ -55178,7 +55178,7 @@ call $std/math/check if (result i32) f64.const -1 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const -1 f64.const 0 call $std/math/check @@ -55200,7 +55200,7 @@ call $std/math/check if (result i32) f64.const 0.5 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const 0 f64.const 0 call $std/math/check @@ -55222,7 +55222,7 @@ call $std/math/check if (result i32) f64.const -0.5 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const -0 f64.const 0 call $std/math/check @@ -55244,7 +55244,7 @@ call $std/math/check if (result i32) f64.const 1.0000152587890625 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const 1 f64.const 0 call $std/math/check @@ -55266,7 +55266,7 @@ call $std/math/check if (result i32) f64.const -1.0000152587890625 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const -1 f64.const 0 call $std/math/check @@ -55288,7 +55288,7 @@ call $std/math/check if (result i32) f64.const 0.9999923706054688 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const 0 f64.const 0 call $std/math/check @@ -55310,7 +55310,7 @@ call $std/math/check if (result i32) f64.const -0.9999923706054688 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const -0 f64.const 0 call $std/math/check @@ -55332,7 +55332,7 @@ call $std/math/check if (result i32) f64.const 7.888609052210118e-31 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const 0 f64.const 0 call $std/math/check @@ -55354,7 +55354,7 @@ call $std/math/check if (result i32) f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/trunc + call $~lib/bindings/dom/Math.trunc f64.const -0 f64.const 0 call $std/math/check From 4721a2c979b4dd90692bc6c384f44faee4fb055e Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 6 Mar 2022 01:06:03 +0100 Subject: [PATCH 173/175] update dependencies --- package-lock.json | 1002 +++++++++++++++++++++++++-------------------- package.json | 2 +- 2 files changed, 550 insertions(+), 454 deletions(-) diff --git a/package-lock.json b/package-lock.json index 14eda67bcd..16ac99fbd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "binaryen": "105.0.0-nightly.20220127", + "binaryen": "105.0.0-nightly.20220305", "long": "^5.2.0" }, "bin": { @@ -31,14 +31,14 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", - "integrity": "sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz", + "integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.0.0", + "espree": "^9.3.1", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", @@ -60,12 +60,12 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", - "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" }, @@ -121,19 +121,20 @@ "dev": true }, "node_modules/@types/node": { - "version": "16.11.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.11.tgz", - "integrity": "sha512-KB0sixD67CeecHC33MYn+eYARkqTheIRNuu97y2XMjR7Wu3XibO1vaY6VBV6O/a89SPI81cEUIYT87UqUWlZNw==", + "version": "16.11.26", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.26.tgz", + "integrity": "sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.5.0.tgz", - "integrity": "sha512-4bV6fulqbuaO9UMXU0Ia0o6z6if+kmMRW8rMRyfqXj/eGrZZRGedS4n0adeGNnjr8LKAM495hrQ7Tea52UWmQA==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.13.0.tgz", + "integrity": "sha512-vLktb2Uec81fxm/cfz2Hd6QaWOs8qdmVAZXLdOBX6JFJDhf6oDZpMzZ4/LZ6SFM/5DgDcxIMIvy3F+O9yZBuiQ==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "5.5.0", - "@typescript-eslint/scope-manager": "5.5.0", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/type-utils": "5.13.0", + "@typescript-eslint/utils": "5.13.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -158,18 +159,16 @@ } } }, - "node_modules/@typescript-eslint/experimental-utils": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.5.0.tgz", - "integrity": "sha512-kjWeeVU+4lQ1SLYErRKV5yDXbWDPkpbzTUUlfAUifPYvpX0qZlrcCZ96/6oWxt3QxtK5WVhXz+KsnwW9cIW+3A==", + "node_modules/@typescript-eslint/parser": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.13.0.tgz", + "integrity": "sha512-GdrU4GvBE29tm2RqWOM0P5QfCtgCyN4hXICj/X9ibKED16136l9ZpoJvCL5pSKtmJzA+NRDzQ312wWMejCVVfg==", "dev": true, "dependencies": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.5.0", - "@typescript-eslint/types": "5.5.0", - "@typescript-eslint/typescript-estree": "5.5.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/typescript-estree": "5.13.0", + "debug": "^4.3.2" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -179,19 +178,22 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@typescript-eslint/parser": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.5.0.tgz", - "integrity": "sha512-JsXBU+kgQOAgzUn2jPrLA+Rd0Y1dswOlX3hp8MuRO1hQDs6xgHtbCXEiAu7bz5hyVURxbXcA2draasMbNqrhmg==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz", + "integrity": "sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.5.0", - "@typescript-eslint/types": "5.5.0", - "@typescript-eslint/typescript-estree": "5.5.0", - "debug": "^4.3.2" + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -199,24 +201,17 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } } }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.5.0.tgz", - "integrity": "sha512-0/r656RmRLo7CbN4Mdd+xZyPJ/fPCKhYdU6mnZx+8msAD8nJSP8EyCFkzbd6vNVZzZvWlMYrSNekqGrCBqFQhg==", + "node_modules/@typescript-eslint/type-utils": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.13.0.tgz", + "integrity": "sha512-/nz7qFizaBM1SuqAKb7GLkcNn2buRdDgZraXlkhz+vUGiN1NZ9LzkA595tHHeduAiS2MsHqMNhE2zNzGdw43Yg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.5.0", - "@typescript-eslint/visitor-keys": "5.5.0" + "@typescript-eslint/utils": "5.13.0", + "debug": "^4.3.2", + "tsutils": "^3.21.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -224,12 +219,20 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/types": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.5.0.tgz", - "integrity": "sha512-OaYTqkW3GnuHxqsxxJ6KypIKd5Uw7bFiQJZRyNi1jbMJnK3Hc/DR4KwB6KJj6PBRkJJoaNwzMNv9vtTk87JhOg==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.13.0.tgz", + "integrity": "sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -240,13 +243,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.5.0.tgz", - "integrity": "sha512-pVn8btYUiYrjonhMAO0yG8lm7RApzy2L4RC7Td/mC/qFkyf6vRbGyZozoA94+w6D2Y2GRqpMoCWcwx/EUOzyoQ==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz", + "integrity": "sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.5.0", - "@typescript-eslint/visitor-keys": "5.5.0", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -266,13 +269,37 @@ } } }, + "node_modules/@typescript-eslint/utils": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.13.0.tgz", + "integrity": "sha512-+9oHlPWYNl6AwwoEt5TQryEHwiKRVjz7Vk6kaBeD3/kwHE5YqTGHtm/JZY8Bo9ITOeKutFaXnBlMgSATMJALUQ==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/typescript-estree": "5.13.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.5.0.tgz", - "integrity": "sha512-4GzJ1kRtsWzHhdM40tv0ZKHNSbkDhF0Woi/TDwVJX6UICwJItvP7ZTXbjTkCdrors7ww0sYe0t+cIKDAJwZ7Kw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz", + "integrity": "sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.5.0", + "@typescript-eslint/types": "5.13.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -284,9 +311,9 @@ } }, "node_modules/acorn": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", - "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -320,15 +347,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -375,9 +393,9 @@ "dev": true }, "node_modules/binaryen": { - "version": "105.0.0-nightly.20220127", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-105.0.0-nightly.20220127.tgz", - "integrity": "sha512-saXUrw8yoY8PtgHue7Tr4F4QTYFZGDNNEhEjI7cYkeZzCCw3pcL0haj8D9c2OaWFyqvHj3q6siRNBVpp/TC4AQ==", + "version": "105.0.0-nightly.20220305", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-105.0.0-nightly.20220305.tgz", + "integrity": "sha512-0oYn8v9dVkfhdb9xLnn2vivCu7jZS1ky70sZp1UjLV6AWXN/mu8K8B7GIO8aiLLTqVEoXwh3fHhkWp1RMGN48w==", "bin": { "wasm-opt": "bin/wasm-opt", "wasm2js": "bin/wasm2js" @@ -524,51 +542,61 @@ "node": ">=6.0.0" } }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/esbuild": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.1.tgz", - "integrity": "sha512-J/LhUwELcmz0+CJfiaKzu7Rnj9ffWFLvMx+dKvdOfg+fQmoP6q9glla26LCm9BxpnPUjXChHeubLiMlKab/PYg==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.25.tgz", + "integrity": "sha512-4JHEIOMNFvK09ziiL+iVmldIhLbn49V4NAVo888tcGFKedEZY/Y8YapfStJ6zSE23tzYPKxqKwQBnQoIO0BI/Q==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, + "engines": { + "node": ">=12" + }, "optionalDependencies": { - "esbuild-android-arm64": "0.14.1", - "esbuild-darwin-64": "0.14.1", - "esbuild-darwin-arm64": "0.14.1", - "esbuild-freebsd-64": "0.14.1", - "esbuild-freebsd-arm64": "0.14.1", - "esbuild-linux-32": "0.14.1", - "esbuild-linux-64": "0.14.1", - "esbuild-linux-arm": "0.14.1", - "esbuild-linux-arm64": "0.14.1", - "esbuild-linux-mips64le": "0.14.1", - "esbuild-linux-ppc64le": "0.14.1", - "esbuild-netbsd-64": "0.14.1", - "esbuild-openbsd-64": "0.14.1", - "esbuild-sunos-64": "0.14.1", - "esbuild-windows-32": "0.14.1", - "esbuild-windows-64": "0.14.1", - "esbuild-windows-arm64": "0.14.1" + "esbuild-android-64": "0.14.25", + "esbuild-android-arm64": "0.14.25", + "esbuild-darwin-64": "0.14.25", + "esbuild-darwin-arm64": "0.14.25", + "esbuild-freebsd-64": "0.14.25", + "esbuild-freebsd-arm64": "0.14.25", + "esbuild-linux-32": "0.14.25", + "esbuild-linux-64": "0.14.25", + "esbuild-linux-arm": "0.14.25", + "esbuild-linux-arm64": "0.14.25", + "esbuild-linux-mips64le": "0.14.25", + "esbuild-linux-ppc64le": "0.14.25", + "esbuild-linux-riscv64": "0.14.25", + "esbuild-linux-s390x": "0.14.25", + "esbuild-netbsd-64": "0.14.25", + "esbuild-openbsd-64": "0.14.25", + "esbuild-sunos-64": "0.14.25", + "esbuild-windows-32": "0.14.25", + "esbuild-windows-64": "0.14.25", + "esbuild-windows-arm64": "0.14.25" + } + }, + "node_modules/esbuild-android-64": { + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.25.tgz", + "integrity": "sha512-L5vCUk7TzFbBnoESNoXjU3x9+/+7TDIE/1mTfy/erAfvZAqC+S3sp/Qa9wkypFMcFvN9FzvESkTlpeQDolREtQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, "node_modules/esbuild-android-arm64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.1.tgz", - "integrity": "sha512-elQd3hTg93nU2GQ5PPCDAFe5+utxZX96RG8RixqIPxf8pzmyIzcpKG76L/9FabPf3LT1z+nLF1sajCU8eVRDyg==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.25.tgz", + "integrity": "sha512-4jv5xPjM/qNm27T5j3ZEck0PvjgQtoMHnz4FzwF5zNP56PvY2CT0WStcAIl6jNlsuDdN63rk2HRBIsO6xFbcFw==", "cpu": [ "arm64" ], @@ -576,12 +604,15 @@ "optional": true, "os": [ "android" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-darwin-64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.1.tgz", - "integrity": "sha512-PR3HZgbPRwsQbbOR1fJrfkt/Cs0JDyI3yzOKg2PPWk0H1AseZDBqPUY9b/0+BIjFwA5Jz/aAiq832hppsuJtNw==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.25.tgz", + "integrity": "sha512-TGp8tuudIxOyWd1+8aYPxQmC1ZQyvij/AfNBa35RubixD0zJ1vkKHVAzo0Zao1zcG6pNqiSyzfPto8vmg0s7oA==", "cpu": [ "x64" ], @@ -589,12 +620,15 @@ "optional": true, "os": [ "darwin" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-darwin-arm64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.1.tgz", - "integrity": "sha512-/fiSSOkOEa3co6yYtwgXouz8jZrG0qnXPEKiktFf2BQE8NON3ARTw43ZegaH+xMRFNgYBJEOOZIdzI3sIFEAxw==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.25.tgz", + "integrity": "sha512-oTcDgdm0MDVEmw2DWu8BV68pYuImpFgvWREPErBZmNA4MYKGuBRaCiJqq6jZmBR1x+3y1DWCjez+5uLtuAm6mw==", "cpu": [ "arm64" ], @@ -602,12 +636,15 @@ "optional": true, "os": [ "darwin" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-freebsd-64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.1.tgz", - "integrity": "sha512-ZJV+nfa8E8PdXnRc05PO3YMfgSj7Ko+kdHyGDE6OaNo1cO8ZyfacqLaWkY35shDDaeacklhD8ZR4qq5nbJKX1A==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.25.tgz", + "integrity": "sha512-ueAqbnMZ8arnuLH8tHwTCQYeptnHOUV7vA6px6j4zjjQwDx7TdP7kACPf3TLZLdJQ3CAD1XCvQ2sPhX+8tacvQ==", "cpu": [ "x64" ], @@ -615,12 +652,15 @@ "optional": true, "os": [ "freebsd" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-freebsd-arm64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.1.tgz", - "integrity": "sha512-6N9zTD+SecJr2g9Ohl9C10WIk5FpQ+52bNamRy0sJoHwP31G5ObzKzq8jAtg1Jeggpu6P8auz3P/UL+3YioSwQ==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.25.tgz", + "integrity": "sha512-+ZVWud2HKh+Ob6k/qiJWjBtUg4KmJGGmbvEXXW1SNKS7hW7HU+Zq2ZCcE1akFxOPkVB+EhOty/sSek30tkCYug==", "cpu": [ "arm64" ], @@ -628,12 +668,15 @@ "optional": true, "os": [ "freebsd" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-linux-32": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.1.tgz", - "integrity": "sha512-RtPgE6e7WefbAxRjVryisKFJ0nUwR2DMjwmYW/a1a0F1+Ge6FR+RqvgiY0DrM9TtxSUU0eryDXNF4n3UfxX3mg==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.25.tgz", + "integrity": "sha512-3OP/lwV3kCzEz45tobH9nj+uE4ubhGsfx+tn0L26WAGtUbmmcRpqy7XRG/qK7h1mClZ+eguIANcQntYMdYklfw==", "cpu": [ "ia32" ], @@ -641,12 +684,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-linux-64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.1.tgz", - "integrity": "sha512-JpxM0ar6Z+2v3vfFrxP7bFb8Wzb6gcGL9MxRqAJplDfGnee8HbfPge6svaazXeX9XJceeEqwxwWGB0qyCcxo7A==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.25.tgz", + "integrity": "sha512-+aKHdHZmX9qwVlQmu5xYXh7GsBFf4TWrePgeJTalhXHOG7NNuUwoHmketGiZEoNsWyyqwH9rE5BC+iwcLY30Ug==", "cpu": [ "x64" ], @@ -654,12 +700,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-linux-arm": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.1.tgz", - "integrity": "sha512-eBRHexCijAYWzcvQLGHxyxIlYOkYhXvcb/O7HvzJfCAVWCnTx9TxxYJ3UppBC6dDFbAq4HwKhskvmesQdKMeBg==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.25.tgz", + "integrity": "sha512-aTLcE2VBoLydL943REcAcgnDi3bHtmULSXWLbjtBdtykRatJVSxKMjK9YlBXUZC4/YcNQfH7AxwVeQr9fNxPhw==", "cpu": [ "arm" ], @@ -667,12 +716,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-linux-arm64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.1.tgz", - "integrity": "sha512-cFbeZf171bIf+PPLlQDBzagK85lCCxxVdMV1IVUA96Y3kvEgqcy2n9mha+QE1M/T+lIOPDsmLRgH1XqMFwLTSg==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.25.tgz", + "integrity": "sha512-UxfenPx/wSZx55gScCImPtXekvZQLI2GW3qe5dtlmU7luiqhp5GWPzGeQEbD3yN3xg/pHc671m5bma5Ns7lBHw==", "cpu": [ "arm64" ], @@ -680,12 +732,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-linux-mips64le": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.1.tgz", - "integrity": "sha512-UGb+sqHkL7wOQFLH0RoFhcRAlJNqbqs6GtJd1It5jJ2juOGqAkCv8V12aGDX9oRB6a+Om7cdHcH+6AMZ+qlaww==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.25.tgz", + "integrity": "sha512-wLWYyqVfYx9Ur6eU5RT92yJVsaBGi5RdkoWqRHOqcJ38Kn60QMlcghsKeWfe9jcYut8LangYZ98xO1LxIoSXrQ==", "cpu": [ "mips64el" ], @@ -693,12 +748,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-linux-ppc64le": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.1.tgz", - "integrity": "sha512-LIHGkGdy9wYlmkkoVHm6feWhkoi4VBXDiEVyNjXEhlzsBcP/CaRy+B8IJulzaU1ALLiGcsCQ2MC5UbFn/iTvmA==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.25.tgz", + "integrity": "sha512-0dR6Csl6Zas3g4p9ULckEl8Mo8IInJh33VCJ3eaV1hj9+MHGdmDOakYMN8MZP9/5nl+NU/0ygpd14cWgy8uqRw==", "cpu": [ "ppc64" ], @@ -706,12 +764,47 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-riscv64": { + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.25.tgz", + "integrity": "sha512-J4d20HDmTrgvhR0bdkDhvvJGaikH3LzXQnNaseo8rcw9Yqby9A90gKUmWpfwqLVNRILvNnAmKLfBjCKU9ajg8w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-s390x": { + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.25.tgz", + "integrity": "sha512-YI2d5V6nTE73ZnhEKQD7MtsPs1EtUZJ3obS21oxQxGbbRw1G+PtJKjNyur+3t6nzHP9oTg6GHQ3S3hOLLmbDIQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-netbsd-64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.1.tgz", - "integrity": "sha512-TWc1QIgtPwaK5nC1GT2ASTuy/CJhNKHN4h5PJRP1186VfI+k2uvXakS7bqO/M26F6jAMy8jDeCtilacqpwsvfA==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.25.tgz", + "integrity": "sha512-TKIVgNWLUOkr+Exrye70XTEE1lJjdQXdM4tAXRzfHE9iBA7LXWcNtVIuSnphTqpanPzTDFarF0yqq4kpbC6miA==", "cpu": [ "x64" ], @@ -719,12 +812,15 @@ "optional": true, "os": [ "netbsd" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-openbsd-64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.1.tgz", - "integrity": "sha512-Z9/Zb77K+pK9s7mAsvwS56K8tCbLvNZ9UI4QVJSYqDgOmmDJOBT4owWnCqZ5cJI+2y4/F9KwCpFFTNUdPglPKA==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.25.tgz", + "integrity": "sha512-QgFJ37A15D7NIXBTYEqz29+uw3nNBOIyog+3kFidANn6kjw0GHZ0lEYQn+cwjyzu94WobR+fes7cTl/ZYlHb1A==", "cpu": [ "x64" ], @@ -732,12 +828,15 @@ "optional": true, "os": [ "openbsd" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-sunos-64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.1.tgz", - "integrity": "sha512-c4sF8146kNW8529wfkB6vO0ZqPgokyS2hORqKa4p/QKZdp+xrF2NPmvX5aN+Zt14oe6wVZuhYo6LGv7V4Gg04g==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.25.tgz", + "integrity": "sha512-rmWfjUItYIVlqr5EnTH1+GCxXiBOC42WBZ3w++qh7n2cS9Xo0lO5pGSG2N+huOU2fX5L+6YUuJ78/vOYvefeFw==", "cpu": [ "x64" ], @@ -745,12 +844,15 @@ "optional": true, "os": [ "sunos" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-windows-32": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.1.tgz", - "integrity": "sha512-XP8yElaJtLGGjH7D72t5IWtP0jmc1Jqm4IjQARB17l0LTJO/n+N2X64rDWePJv6qimYxa5p2vTjkZc5v+YZTSQ==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.25.tgz", + "integrity": "sha512-HGAxVUofl3iUIz9W10Y9XKtD0bNsK9fBXv1D55N/ljNvkrAYcGB8YCm0v7DjlwtyS6ws3dkdQyXadbxkbzaKOA==", "cpu": [ "ia32" ], @@ -758,12 +860,15 @@ "optional": true, "os": [ "win32" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-windows-64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.1.tgz", - "integrity": "sha512-fe+ShdyfiuGcCEdVKW//6MaM4MwikiWBWSBn8mebNAbjRqicH0injDOFVI7aUovAfrEt7+FGkf402s//hi0BVg==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.25.tgz", + "integrity": "sha512-TirEohRkfWU9hXLgoDxzhMQD1g8I2mOqvdQF2RS9E/wbkORTAqJHyh7wqGRCQAwNzdNXdg3JAyhQ9/177AadWA==", "cpu": [ "x64" ], @@ -771,12 +876,15 @@ "optional": true, "os": [ "win32" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-windows-arm64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.1.tgz", - "integrity": "sha512-wBVakhcIzQ3NZ33DFM6TjIObXPHaXOsqzvPwefXHvwBSC/N/e/g6fBeM7N/Moj3AmxLjKaB+vePvTGdxk6RPCg==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.25.tgz", + "integrity": "sha512-4ype9ERiI45rSh+R8qUoBtaj6kJvUOI7oVLhKqPEpcF4Pa5PpT3hm/mXAyotJHREkHpM87PAJcA442mLnbtlNA==", "cpu": [ "arm64" ], @@ -784,7 +892,10 @@ "optional": true, "os": [ "win32" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/escape-string-regexp": { "version": "4.0.0", @@ -799,24 +910,23 @@ } }, "node_modules/eslint": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.3.0.tgz", - "integrity": "sha512-aIay56Ph6RxOTC7xyr59Kt3ewX185SaGnAr8eWukoPLeriCrvGjvAubxuvaXOfsxhtwV5g0uBOsyhAom4qJdww==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz", + "integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.0.4", - "@humanwhocodes/config-array": "^0.6.0", + "@eslint/eslintrc": "^1.2.0", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", + "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.1.0", - "espree": "^9.1.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -824,7 +934,7 @@ "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.6.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", @@ -835,9 +945,7 @@ "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", "regexpp": "^3.2.0", - "semver": "^7.2.1", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0", @@ -894,18 +1002,18 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -924,24 +1032,15 @@ "node": ">=4.0" } }, - "node_modules/eslint/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/espree": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.1.0.tgz", - "integrity": "sha512-ZgYLvCS1wxOczBYGcQT9DDWgicXwJ4dbocr9uYN+/eresBAUuBu+O4WzB21ufQ/JqQT8gyp7hJ3z8SHii32mTQ==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", + "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", "dev": true, "dependencies": { - "acorn": "^8.6.0", + "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" + "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1014,9 +1113,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -1026,7 +1125,7 @@ "micromatch": "^4.0.4" }, "engines": { - "node": ">=8" + "node": ">=8.6.0" } }, "node_modules/fast-glob/node_modules/glob-parent": { @@ -1100,9 +1199,9 @@ } }, "node_modules/flatted": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", - "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", "dev": true }, "node_modules/fs.realpath": { @@ -1150,9 +1249,9 @@ } }, "node_modules/globals": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", - "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1165,16 +1264,16 @@ } }, "node_modules/globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" }, "engines": { @@ -1194,9 +1293,9 @@ } }, "node_modules/ignore": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, "engines": { "node": ">= 4" @@ -1362,9 +1461,9 @@ } }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -1451,9 +1550,9 @@ } }, "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { "node": ">=8.6" @@ -1471,15 +1570,6 @@ "node": ">= 0.8.0" } }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -1723,9 +1813,9 @@ } }, "node_modules/typescript": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", - "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -1789,14 +1879,14 @@ }, "dependencies": { "@eslint/eslintrc": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", - "integrity": "sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz", + "integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.0.0", + "espree": "^9.3.1", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", @@ -1814,12 +1904,12 @@ } }, "@humanwhocodes/config-array": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", - "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" } @@ -1863,19 +1953,20 @@ "dev": true }, "@types/node": { - "version": "16.11.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.11.tgz", - "integrity": "sha512-KB0sixD67CeecHC33MYn+eYARkqTheIRNuu97y2XMjR7Wu3XibO1vaY6VBV6O/a89SPI81cEUIYT87UqUWlZNw==", + "version": "16.11.26", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.26.tgz", + "integrity": "sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==", "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.5.0.tgz", - "integrity": "sha512-4bV6fulqbuaO9UMXU0Ia0o6z6if+kmMRW8rMRyfqXj/eGrZZRGedS4n0adeGNnjr8LKAM495hrQ7Tea52UWmQA==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.13.0.tgz", + "integrity": "sha512-vLktb2Uec81fxm/cfz2Hd6QaWOs8qdmVAZXLdOBX6JFJDhf6oDZpMzZ4/LZ6SFM/5DgDcxIMIvy3F+O9yZBuiQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "5.5.0", - "@typescript-eslint/scope-manager": "5.5.0", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/type-utils": "5.13.0", + "@typescript-eslint/utils": "5.13.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1884,56 +1975,53 @@ "tsutils": "^3.21.0" } }, - "@typescript-eslint/experimental-utils": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.5.0.tgz", - "integrity": "sha512-kjWeeVU+4lQ1SLYErRKV5yDXbWDPkpbzTUUlfAUifPYvpX0qZlrcCZ96/6oWxt3QxtK5WVhXz+KsnwW9cIW+3A==", + "@typescript-eslint/parser": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.13.0.tgz", + "integrity": "sha512-GdrU4GvBE29tm2RqWOM0P5QfCtgCyN4hXICj/X9ibKED16136l9ZpoJvCL5pSKtmJzA+NRDzQ312wWMejCVVfg==", "dev": true, "requires": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.5.0", - "@typescript-eslint/types": "5.5.0", - "@typescript-eslint/typescript-estree": "5.5.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/typescript-estree": "5.13.0", + "debug": "^4.3.2" } }, - "@typescript-eslint/parser": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.5.0.tgz", - "integrity": "sha512-JsXBU+kgQOAgzUn2jPrLA+Rd0Y1dswOlX3hp8MuRO1hQDs6xgHtbCXEiAu7bz5hyVURxbXcA2draasMbNqrhmg==", + "@typescript-eslint/scope-manager": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz", + "integrity": "sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.5.0", - "@typescript-eslint/types": "5.5.0", - "@typescript-eslint/typescript-estree": "5.5.0", - "debug": "^4.3.2" + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0" } }, - "@typescript-eslint/scope-manager": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.5.0.tgz", - "integrity": "sha512-0/r656RmRLo7CbN4Mdd+xZyPJ/fPCKhYdU6mnZx+8msAD8nJSP8EyCFkzbd6vNVZzZvWlMYrSNekqGrCBqFQhg==", + "@typescript-eslint/type-utils": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.13.0.tgz", + "integrity": "sha512-/nz7qFizaBM1SuqAKb7GLkcNn2buRdDgZraXlkhz+vUGiN1NZ9LzkA595tHHeduAiS2MsHqMNhE2zNzGdw43Yg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.5.0", - "@typescript-eslint/visitor-keys": "5.5.0" + "@typescript-eslint/utils": "5.13.0", + "debug": "^4.3.2", + "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.5.0.tgz", - "integrity": "sha512-OaYTqkW3GnuHxqsxxJ6KypIKd5Uw7bFiQJZRyNi1jbMJnK3Hc/DR4KwB6KJj6PBRkJJoaNwzMNv9vtTk87JhOg==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.13.0.tgz", + "integrity": "sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.5.0.tgz", - "integrity": "sha512-pVn8btYUiYrjonhMAO0yG8lm7RApzy2L4RC7Td/mC/qFkyf6vRbGyZozoA94+w6D2Y2GRqpMoCWcwx/EUOzyoQ==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz", + "integrity": "sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.5.0", - "@typescript-eslint/visitor-keys": "5.5.0", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1941,20 +2029,34 @@ "tsutils": "^3.21.0" } }, + "@typescript-eslint/utils": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.13.0.tgz", + "integrity": "sha512-+9oHlPWYNl6AwwoEt5TQryEHwiKRVjz7Vk6kaBeD3/kwHE5YqTGHtm/JZY8Bo9ITOeKutFaXnBlMgSATMJALUQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/typescript-estree": "5.13.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, "@typescript-eslint/visitor-keys": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.5.0.tgz", - "integrity": "sha512-4GzJ1kRtsWzHhdM40tv0ZKHNSbkDhF0Woi/TDwVJX6UICwJItvP7ZTXbjTkCdrors7ww0sYe0t+cIKDAJwZ7Kw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz", + "integrity": "sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==", "dev": true, "requires": { - "@typescript-eslint/types": "5.5.0", + "@typescript-eslint/types": "5.13.0", "eslint-visitor-keys": "^3.0.0" } }, "acorn": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", - "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "dev": true }, "acorn-jsx": { @@ -1976,12 +2078,6 @@ "uri-js": "^4.2.2" } }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -2016,9 +2112,9 @@ "dev": true }, "binaryen": { - "version": "105.0.0-nightly.20220127", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-105.0.0-nightly.20220127.tgz", - "integrity": "sha512-saXUrw8yoY8PtgHue7Tr4F4QTYFZGDNNEhEjI7cYkeZzCCw3pcL0haj8D9c2OaWFyqvHj3q6siRNBVpp/TC4AQ==" + "version": "105.0.0-nightly.20220305", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-105.0.0-nightly.20220305.tgz", + "integrity": "sha512-0oYn8v9dVkfhdb9xLnn2vivCu7jZS1ky70sZp1UjLV6AWXN/mu8K8B7GIO8aiLLTqVEoXwh3fHhkWp1RMGN48w==" }, "brace-expansion": { "version": "1.1.11", @@ -2126,156 +2222,171 @@ "esutils": "^2.0.2" } }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, "esbuild": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.1.tgz", - "integrity": "sha512-J/LhUwELcmz0+CJfiaKzu7Rnj9ffWFLvMx+dKvdOfg+fQmoP6q9glla26LCm9BxpnPUjXChHeubLiMlKab/PYg==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.25.tgz", + "integrity": "sha512-4JHEIOMNFvK09ziiL+iVmldIhLbn49V4NAVo888tcGFKedEZY/Y8YapfStJ6zSE23tzYPKxqKwQBnQoIO0BI/Q==", "dev": true, "requires": { - "esbuild-android-arm64": "0.14.1", - "esbuild-darwin-64": "0.14.1", - "esbuild-darwin-arm64": "0.14.1", - "esbuild-freebsd-64": "0.14.1", - "esbuild-freebsd-arm64": "0.14.1", - "esbuild-linux-32": "0.14.1", - "esbuild-linux-64": "0.14.1", - "esbuild-linux-arm": "0.14.1", - "esbuild-linux-arm64": "0.14.1", - "esbuild-linux-mips64le": "0.14.1", - "esbuild-linux-ppc64le": "0.14.1", - "esbuild-netbsd-64": "0.14.1", - "esbuild-openbsd-64": "0.14.1", - "esbuild-sunos-64": "0.14.1", - "esbuild-windows-32": "0.14.1", - "esbuild-windows-64": "0.14.1", - "esbuild-windows-arm64": "0.14.1" - } + "esbuild-android-64": "0.14.25", + "esbuild-android-arm64": "0.14.25", + "esbuild-darwin-64": "0.14.25", + "esbuild-darwin-arm64": "0.14.25", + "esbuild-freebsd-64": "0.14.25", + "esbuild-freebsd-arm64": "0.14.25", + "esbuild-linux-32": "0.14.25", + "esbuild-linux-64": "0.14.25", + "esbuild-linux-arm": "0.14.25", + "esbuild-linux-arm64": "0.14.25", + "esbuild-linux-mips64le": "0.14.25", + "esbuild-linux-ppc64le": "0.14.25", + "esbuild-linux-riscv64": "0.14.25", + "esbuild-linux-s390x": "0.14.25", + "esbuild-netbsd-64": "0.14.25", + "esbuild-openbsd-64": "0.14.25", + "esbuild-sunos-64": "0.14.25", + "esbuild-windows-32": "0.14.25", + "esbuild-windows-64": "0.14.25", + "esbuild-windows-arm64": "0.14.25" + } + }, + "esbuild-android-64": { + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.25.tgz", + "integrity": "sha512-L5vCUk7TzFbBnoESNoXjU3x9+/+7TDIE/1mTfy/erAfvZAqC+S3sp/Qa9wkypFMcFvN9FzvESkTlpeQDolREtQ==", + "dev": true, + "optional": true }, "esbuild-android-arm64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.1.tgz", - "integrity": "sha512-elQd3hTg93nU2GQ5PPCDAFe5+utxZX96RG8RixqIPxf8pzmyIzcpKG76L/9FabPf3LT1z+nLF1sajCU8eVRDyg==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.25.tgz", + "integrity": "sha512-4jv5xPjM/qNm27T5j3ZEck0PvjgQtoMHnz4FzwF5zNP56PvY2CT0WStcAIl6jNlsuDdN63rk2HRBIsO6xFbcFw==", "dev": true, "optional": true }, "esbuild-darwin-64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.1.tgz", - "integrity": "sha512-PR3HZgbPRwsQbbOR1fJrfkt/Cs0JDyI3yzOKg2PPWk0H1AseZDBqPUY9b/0+BIjFwA5Jz/aAiq832hppsuJtNw==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.25.tgz", + "integrity": "sha512-TGp8tuudIxOyWd1+8aYPxQmC1ZQyvij/AfNBa35RubixD0zJ1vkKHVAzo0Zao1zcG6pNqiSyzfPto8vmg0s7oA==", "dev": true, "optional": true }, "esbuild-darwin-arm64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.1.tgz", - "integrity": "sha512-/fiSSOkOEa3co6yYtwgXouz8jZrG0qnXPEKiktFf2BQE8NON3ARTw43ZegaH+xMRFNgYBJEOOZIdzI3sIFEAxw==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.25.tgz", + "integrity": "sha512-oTcDgdm0MDVEmw2DWu8BV68pYuImpFgvWREPErBZmNA4MYKGuBRaCiJqq6jZmBR1x+3y1DWCjez+5uLtuAm6mw==", "dev": true, "optional": true }, "esbuild-freebsd-64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.1.tgz", - "integrity": "sha512-ZJV+nfa8E8PdXnRc05PO3YMfgSj7Ko+kdHyGDE6OaNo1cO8ZyfacqLaWkY35shDDaeacklhD8ZR4qq5nbJKX1A==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.25.tgz", + "integrity": "sha512-ueAqbnMZ8arnuLH8tHwTCQYeptnHOUV7vA6px6j4zjjQwDx7TdP7kACPf3TLZLdJQ3CAD1XCvQ2sPhX+8tacvQ==", "dev": true, "optional": true }, "esbuild-freebsd-arm64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.1.tgz", - "integrity": "sha512-6N9zTD+SecJr2g9Ohl9C10WIk5FpQ+52bNamRy0sJoHwP31G5ObzKzq8jAtg1Jeggpu6P8auz3P/UL+3YioSwQ==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.25.tgz", + "integrity": "sha512-+ZVWud2HKh+Ob6k/qiJWjBtUg4KmJGGmbvEXXW1SNKS7hW7HU+Zq2ZCcE1akFxOPkVB+EhOty/sSek30tkCYug==", "dev": true, "optional": true }, "esbuild-linux-32": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.1.tgz", - "integrity": "sha512-RtPgE6e7WefbAxRjVryisKFJ0nUwR2DMjwmYW/a1a0F1+Ge6FR+RqvgiY0DrM9TtxSUU0eryDXNF4n3UfxX3mg==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.25.tgz", + "integrity": "sha512-3OP/lwV3kCzEz45tobH9nj+uE4ubhGsfx+tn0L26WAGtUbmmcRpqy7XRG/qK7h1mClZ+eguIANcQntYMdYklfw==", "dev": true, "optional": true }, "esbuild-linux-64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.1.tgz", - "integrity": "sha512-JpxM0ar6Z+2v3vfFrxP7bFb8Wzb6gcGL9MxRqAJplDfGnee8HbfPge6svaazXeX9XJceeEqwxwWGB0qyCcxo7A==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.25.tgz", + "integrity": "sha512-+aKHdHZmX9qwVlQmu5xYXh7GsBFf4TWrePgeJTalhXHOG7NNuUwoHmketGiZEoNsWyyqwH9rE5BC+iwcLY30Ug==", "dev": true, "optional": true }, "esbuild-linux-arm": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.1.tgz", - "integrity": "sha512-eBRHexCijAYWzcvQLGHxyxIlYOkYhXvcb/O7HvzJfCAVWCnTx9TxxYJ3UppBC6dDFbAq4HwKhskvmesQdKMeBg==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.25.tgz", + "integrity": "sha512-aTLcE2VBoLydL943REcAcgnDi3bHtmULSXWLbjtBdtykRatJVSxKMjK9YlBXUZC4/YcNQfH7AxwVeQr9fNxPhw==", "dev": true, "optional": true }, "esbuild-linux-arm64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.1.tgz", - "integrity": "sha512-cFbeZf171bIf+PPLlQDBzagK85lCCxxVdMV1IVUA96Y3kvEgqcy2n9mha+QE1M/T+lIOPDsmLRgH1XqMFwLTSg==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.25.tgz", + "integrity": "sha512-UxfenPx/wSZx55gScCImPtXekvZQLI2GW3qe5dtlmU7luiqhp5GWPzGeQEbD3yN3xg/pHc671m5bma5Ns7lBHw==", "dev": true, "optional": true }, "esbuild-linux-mips64le": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.1.tgz", - "integrity": "sha512-UGb+sqHkL7wOQFLH0RoFhcRAlJNqbqs6GtJd1It5jJ2juOGqAkCv8V12aGDX9oRB6a+Om7cdHcH+6AMZ+qlaww==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.25.tgz", + "integrity": "sha512-wLWYyqVfYx9Ur6eU5RT92yJVsaBGi5RdkoWqRHOqcJ38Kn60QMlcghsKeWfe9jcYut8LangYZ98xO1LxIoSXrQ==", "dev": true, "optional": true }, "esbuild-linux-ppc64le": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.1.tgz", - "integrity": "sha512-LIHGkGdy9wYlmkkoVHm6feWhkoi4VBXDiEVyNjXEhlzsBcP/CaRy+B8IJulzaU1ALLiGcsCQ2MC5UbFn/iTvmA==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.25.tgz", + "integrity": "sha512-0dR6Csl6Zas3g4p9ULckEl8Mo8IInJh33VCJ3eaV1hj9+MHGdmDOakYMN8MZP9/5nl+NU/0ygpd14cWgy8uqRw==", + "dev": true, + "optional": true + }, + "esbuild-linux-riscv64": { + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.25.tgz", + "integrity": "sha512-J4d20HDmTrgvhR0bdkDhvvJGaikH3LzXQnNaseo8rcw9Yqby9A90gKUmWpfwqLVNRILvNnAmKLfBjCKU9ajg8w==", + "dev": true, + "optional": true + }, + "esbuild-linux-s390x": { + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.25.tgz", + "integrity": "sha512-YI2d5V6nTE73ZnhEKQD7MtsPs1EtUZJ3obS21oxQxGbbRw1G+PtJKjNyur+3t6nzHP9oTg6GHQ3S3hOLLmbDIQ==", "dev": true, "optional": true }, "esbuild-netbsd-64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.1.tgz", - "integrity": "sha512-TWc1QIgtPwaK5nC1GT2ASTuy/CJhNKHN4h5PJRP1186VfI+k2uvXakS7bqO/M26F6jAMy8jDeCtilacqpwsvfA==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.25.tgz", + "integrity": "sha512-TKIVgNWLUOkr+Exrye70XTEE1lJjdQXdM4tAXRzfHE9iBA7LXWcNtVIuSnphTqpanPzTDFarF0yqq4kpbC6miA==", "dev": true, "optional": true }, "esbuild-openbsd-64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.1.tgz", - "integrity": "sha512-Z9/Zb77K+pK9s7mAsvwS56K8tCbLvNZ9UI4QVJSYqDgOmmDJOBT4owWnCqZ5cJI+2y4/F9KwCpFFTNUdPglPKA==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.25.tgz", + "integrity": "sha512-QgFJ37A15D7NIXBTYEqz29+uw3nNBOIyog+3kFidANn6kjw0GHZ0lEYQn+cwjyzu94WobR+fes7cTl/ZYlHb1A==", "dev": true, "optional": true }, "esbuild-sunos-64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.1.tgz", - "integrity": "sha512-c4sF8146kNW8529wfkB6vO0ZqPgokyS2hORqKa4p/QKZdp+xrF2NPmvX5aN+Zt14oe6wVZuhYo6LGv7V4Gg04g==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.25.tgz", + "integrity": "sha512-rmWfjUItYIVlqr5EnTH1+GCxXiBOC42WBZ3w++qh7n2cS9Xo0lO5pGSG2N+huOU2fX5L+6YUuJ78/vOYvefeFw==", "dev": true, "optional": true }, "esbuild-windows-32": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.1.tgz", - "integrity": "sha512-XP8yElaJtLGGjH7D72t5IWtP0jmc1Jqm4IjQARB17l0LTJO/n+N2X64rDWePJv6qimYxa5p2vTjkZc5v+YZTSQ==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.25.tgz", + "integrity": "sha512-HGAxVUofl3iUIz9W10Y9XKtD0bNsK9fBXv1D55N/ljNvkrAYcGB8YCm0v7DjlwtyS6ws3dkdQyXadbxkbzaKOA==", "dev": true, "optional": true }, "esbuild-windows-64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.1.tgz", - "integrity": "sha512-fe+ShdyfiuGcCEdVKW//6MaM4MwikiWBWSBn8mebNAbjRqicH0injDOFVI7aUovAfrEt7+FGkf402s//hi0BVg==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.25.tgz", + "integrity": "sha512-TirEohRkfWU9hXLgoDxzhMQD1g8I2mOqvdQF2RS9E/wbkORTAqJHyh7wqGRCQAwNzdNXdg3JAyhQ9/177AadWA==", "dev": true, "optional": true }, "esbuild-windows-arm64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.1.tgz", - "integrity": "sha512-wBVakhcIzQ3NZ33DFM6TjIObXPHaXOsqzvPwefXHvwBSC/N/e/g6fBeM7N/Moj3AmxLjKaB+vePvTGdxk6RPCg==", + "version": "0.14.25", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.25.tgz", + "integrity": "sha512-4ype9ERiI45rSh+R8qUoBtaj6kJvUOI7oVLhKqPEpcF4Pa5PpT3hm/mXAyotJHREkHpM87PAJcA442mLnbtlNA==", "dev": true, "optional": true }, @@ -2286,24 +2397,23 @@ "dev": true }, "eslint": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.3.0.tgz", - "integrity": "sha512-aIay56Ph6RxOTC7xyr59Kt3ewX185SaGnAr8eWukoPLeriCrvGjvAubxuvaXOfsxhtwV5g0uBOsyhAom4qJdww==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz", + "integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.0.4", - "@humanwhocodes/config-array": "^0.6.0", + "@eslint/eslintrc": "^1.2.0", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", + "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.1.0", - "espree": "^9.1.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2311,7 +2421,7 @@ "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.6.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", @@ -2322,9 +2432,7 @@ "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", "regexpp": "^3.2.0", - "semver": "^7.2.1", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0", @@ -2332,9 +2440,9 @@ }, "dependencies": { "eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -2346,12 +2454,6 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true } } }, @@ -2383,20 +2485,20 @@ } }, "eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true }, "espree": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.1.0.tgz", - "integrity": "sha512-ZgYLvCS1wxOczBYGcQT9DDWgicXwJ4dbocr9uYN+/eresBAUuBu+O4WzB21ufQ/JqQT8gyp7hJ3z8SHii32mTQ==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", + "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", "dev": true, "requires": { - "acorn": "^8.6.0", + "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" + "eslint-visitor-keys": "^3.3.0" } }, "esquery": { @@ -2452,9 +2554,9 @@ "dev": true }, "fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -2525,9 +2627,9 @@ } }, "flatted": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", - "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", "dev": true }, "fs.realpath": { @@ -2566,25 +2668,25 @@ } }, "globals": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", - "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "dev": true, "requires": { "type-fest": "^0.20.2" } }, "globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "requires": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" } }, @@ -2595,9 +2697,9 @@ "dev": true }, "ignore": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, "import-fresh": { @@ -2727,9 +2829,9 @@ } }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -2798,9 +2900,9 @@ "dev": true }, "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "prelude-ls": { @@ -2809,12 +2911,6 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -2963,9 +3059,9 @@ "dev": true }, "typescript": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", - "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", "dev": true }, "uri-js": { diff --git a/package.json b/package.json index 50cf1830c5..a1788c6cfb 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "105.0.0-nightly.20220127", + "binaryen": "105.0.0-nightly.20220305", "long": "^5.2.0" }, "devDependencies": { From ef60e80ea0c59ae828ff25fa514b5c5968753ad1 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 20 Mar 2022 20:12:52 +0100 Subject: [PATCH 174/175] bindings fixes --- lib/loader/README.md | 2 +- src/bindings/js.ts | 37 +++++++++++++++++++------ src/glue/js/i64.js | 4 +-- tests/compiler/bindings/esm.debug.js | 14 ++++++++-- tests/compiler/bindings/esm.debug.wat | 6 ++++ tests/compiler/bindings/esm.release.js | 14 ++++++++-- tests/compiler/bindings/esm.release.wat | 6 ++++ tests/compiler/bindings/esm.ts | 4 ++- tests/compiler/bindings/raw.debug.js | 9 ++++-- tests/compiler/bindings/raw.debug.wat | 6 ++++ tests/compiler/bindings/raw.release.js | 9 ++++-- tests/compiler/bindings/raw.release.wat | 6 ++++ 12 files changed, 94 insertions(+), 23 deletions(-) diff --git a/lib/loader/README.md b/lib/loader/README.md index 9f7e65cf92..ff1e805977 100644 --- a/lib/loader/README.md +++ b/lib/loader/README.md @@ -2,7 +2,7 @@ A tiny module loader that makes working with AssemblyScript modules as convenient as it gets without sacrificing efficiency. It about mirrors the relevant parts of the WebAssembly API while also providing utility to allocate and read strings, arrays and classes. -**DEPRECATION NOTICE:** The loader has been deprecated in AssemblyScript 0.20. It will likely continue to work for a while, but it is recommended to switch to the new static bindings generation. +**DEPRECATION NOTICE:** The loader has been deprecated in AssemblyScript 0.20. It will likely continue to work for a while, but it is recommended to switch to the new [static bindings](https://www.assemblyscript.org/compiler.html#host-bindings) generation. ## Example diff --git a/src/bindings/js.ts b/src/bindings/js.ts index 4a99a28151..768a435ec8 100644 --- a/src/bindings/js.ts +++ b/src/bindings/js.ts @@ -227,7 +227,7 @@ export class JSBuilder extends ExportsWalker { } let moduleId = this.ensureModuleId(moduleName); if (isPlainValue(type, Mode.IMPORT)) { - sb.push("(() =>\n"); + sb.push("(\n"); indent(sb, this.indentLevel + 1); sb.push("// "); sb.push(element.internalName); @@ -243,7 +243,7 @@ export class JSBuilder extends ExportsWalker { sb.push(name); sb.push("\n"); indent(sb, this.indentLevel); - sb.push(")()"); + sb.push(")"); } else { sb.push("{\n"); indent(sb, ++this.indentLevel); @@ -272,10 +272,21 @@ export class JSBuilder extends ExportsWalker { sb.push("\""); } if (isPlainFunction(signature, Mode.IMPORT) && !code) { - sb.push(": "); - sb.push(moduleName); - sb.push("."); + sb.push(": (\n"); + indent(sb, this.indentLevel + 1); + sb.push("// "); + sb.push(element.internalName); + sb.push(element.signature.toString()); + sb.push("\n"); + indent(sb, this.indentLevel + 1); + if (moduleName != "env") { + sb.push(moduleName); + sb.push("."); + } sb.push(name); + sb.push("\n"); + indent(sb, this.indentLevel); + sb.push(")"); } else { sb.push("("); let parameterTypes = signature.parameterTypes; @@ -514,7 +525,11 @@ export class JSBuilder extends ExportsWalker { sb.push("__module"); sb.push(moduleId.toString()); } - sb.push("), {\n"); + sb.push("), "); + if (moduleName == "env") { + sb.push("imports.env || {}, "); + } + sb.push("{\n"); ++this.indentLevel; let numInstrumented = 0; for (let _keys2 = Map_keys(module), j = 0, l = _keys2.length; j < l; ++j) { @@ -523,7 +538,7 @@ export class JSBuilder extends ExportsWalker { if (elem.kind == ElementKind.FUNCTION) { let func = elem; let code = this.getExternalCode(func); - if (!isPlainFunction(func.signature, Mode.IMPORT) || code) { + if (!isPlainFunction(func.signature, Mode.IMPORT) || !isIdentifier(name) || code) { this.makeFunctionImport(moduleName, name, elem, code); ++numInstrumented; } @@ -538,8 +553,12 @@ export class JSBuilder extends ExportsWalker { --this.indentLevel; if (!numInstrumented) { sb.length = resetPos; - sb.push(": __module"); - sb.push(moduleId.toString()); + if (moduleName == "env") { + sb.push(": Object.assign(Object.create(globalThis), imports.env || {})"); + } else { + sb.push(": __module"); + sb.push(moduleId.toString()); + } sb.push(",\n"); } else { indent(sb, this.indentLevel); diff --git a/src/glue/js/i64.js b/src/glue/js/i64.js index 56c949212d..78a2fc06e4 100644 --- a/src/glue/js/i64.js +++ b/src/glue/js/i64.js @@ -56,7 +56,7 @@ globalThis.i64_pow = function i64_pow(left, right) { var rightHi = right.high; if (rightHi <= 0) { if (rightHi < 0) { - if (left.eq(global.i64_neg_one)) { + if (left.eq(globalThis.i64_neg_one)) { return rightLo & 1 ? left : Long.ONE; } return left.eq(Long.ONE) ? left : Long.ZERO; @@ -180,7 +180,7 @@ globalThis.i64_is_f64 = function i64_is_f64(value) { }; globalThis.i64_to_f32 = function i64_to_f32(value) { - return global.Math.fround(value.toNumber()); + return globalThis.Math.fround(value.toNumber()); }; globalThis.i64_to_f64 = function i64_to_f64(value) { diff --git a/tests/compiler/bindings/esm.debug.js b/tests/compiler/bindings/esm.debug.js index b9f1a03a29..639841f351 100644 --- a/tests/compiler/bindings/esm.debug.js +++ b/tests/compiler/bindings/esm.debug.js @@ -1,6 +1,6 @@ async function instantiate(module, imports = {}) { const adaptedImports = { - env: Object.assign(Object.create(globalThis), { + env: Object.assign(Object.create(globalThis), imports.env || {}, { trace(message, n, a0, a1, a2, a3, a4) { // ~lib/builtins/trace(~lib/string/String, i32?, f64?, f64?, f64?, f64?, f64?) => void message = __liftString(message >>> 0); @@ -14,10 +14,18 @@ async function instantiate(module, imports = {}) { text = __liftString(text >>> 0); console.log(text); }, - "globalThis.globalThis": (() => + "Math.E": ( + // ~lib/bindings/dom/Math.E: f64 + Math.E + ), + "Math.log": ( + // ~lib/bindings/dom/Math.log(f64) => f64 + Math.log + ), + "globalThis.globalThis": ( // bindings/esm/immutableGlobalNested: externref globalThis.globalThis - )(), + ), "Date.getTimezoneOffset"() { // bindings/esm/Date_getTimezoneOffset() => i32 return (() => { diff --git a/tests/compiler/bindings/esm.debug.wat b/tests/compiler/bindings/esm.debug.wat index bffd1a2eb9..36c49932a1 100644 --- a/tests/compiler/bindings/esm.debug.wat +++ b/tests/compiler/bindings/esm.debug.wat @@ -10,15 +10,18 @@ (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) + (import "env" "Math.E" (global $~lib/bindings/dom/Math.E f64)) (import "env" "globalThis" (global $bindings/esm/immutableGlobal externref)) (import "env" "globalThis.globalThis" (global $bindings/esm/immutableGlobalNested externref)) (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (import "env" "console.log" (func $~lib/bindings/dom/console.log (param i32))) + (import "env" "Math.log" (func $~lib/bindings/dom/Math.log (param f64) (result f64))) (import "env" "Date.getTimezoneOffset" (func $bindings/esm/Date_getTimezoneOffset (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $bindings/esm/plainGlobal i32 (i32.const 1)) @@ -3197,6 +3200,9 @@ i32.store local.get $0 call $~lib/bindings/dom/console.log + global.get $~lib/bindings/dom/Math.E + call $~lib/bindings/dom/Math.log + drop global.get $bindings/esm/immutableGlobal drop global.get $bindings/esm/immutableGlobalNested diff --git a/tests/compiler/bindings/esm.release.js b/tests/compiler/bindings/esm.release.js index f531cf96da..4f5fde306c 100644 --- a/tests/compiler/bindings/esm.release.js +++ b/tests/compiler/bindings/esm.release.js @@ -1,6 +1,6 @@ async function instantiate(module, imports = {}) { const adaptedImports = { - env: Object.assign(Object.create(globalThis), { + env: Object.assign(Object.create(globalThis), imports.env || {}, { trace(message, n, a0, a1, a2, a3, a4) { // ~lib/builtins/trace(~lib/string/String, i32?, f64?, f64?, f64?, f64?, f64?) => void message = __liftString(message >>> 0); @@ -14,10 +14,18 @@ async function instantiate(module, imports = {}) { text = __liftString(text >>> 0); console.log(text); }, - "globalThis.globalThis": (() => + "Math.E": ( + // ~lib/bindings/dom/Math.E: f64 + Math.E + ), + "Math.log": ( + // ~lib/bindings/dom/Math.log(f64) => f64 + Math.log + ), + "globalThis.globalThis": ( // bindings/esm/immutableGlobalNested: externref globalThis.globalThis - )(), + ), "Date.getTimezoneOffset"() { // bindings/esm/Date_getTimezoneOffset() => i32 return (() => { diff --git a/tests/compiler/bindings/esm.release.wat b/tests/compiler/bindings/esm.release.wat index 623031690b..16ce5b8eaa 100644 --- a/tests/compiler/bindings/esm.release.wat +++ b/tests/compiler/bindings/esm.release.wat @@ -6,12 +6,15 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_=>_i32 (func (param i32) (result i32))) + (import "env" "Math.E" (global $~lib/bindings/dom/Math.E f64)) (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (import "env" "console.log" (func $~lib/bindings/dom/console.log (param i32))) + (import "env" "Math.log" (func $~lib/bindings/dom/Math.log (param f64) (result f64))) (import "env" "Date.getTimezoneOffset" (func $bindings/esm/Date_getTimezoneOffset (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $bindings/esm/plainGlobal i32 (i32.const 1)) @@ -2230,6 +2233,9 @@ i32.store i32.const 1152 call $~lib/bindings/dom/console.log + global.get $~lib/bindings/dom/Math.E + call $~lib/bindings/dom/Math.log + drop call $bindings/esm/Date_getTimezoneOffset drop global.get $~lib/memory/__stack_pointer diff --git a/tests/compiler/bindings/esm.ts b/tests/compiler/bindings/esm.ts index d19e3ee6e2..944e35d859 100644 --- a/tests/compiler/bindings/esm.ts +++ b/tests/compiler/bindings/esm.ts @@ -116,10 +116,12 @@ export function internrefFunction(a: NonPlainObject, b: NonPlainObject): NonPlai trace("trace", 1, 42); -import { console } from "bindings/dom"; +import { console, Math } from "bindings/dom"; console.log("42 from console.log"); +Math.log(Math.E); + // @ts-ignore @external("env", "globalThis") declare const immutableGlobal: externref; immutableGlobal; diff --git a/tests/compiler/bindings/raw.debug.js b/tests/compiler/bindings/raw.debug.js index 0708464670..6f5bd1c6d3 100644 --- a/tests/compiler/bindings/raw.debug.js +++ b/tests/compiler/bindings/raw.debug.js @@ -14,10 +14,15 @@ export async function instantiate(module, imports = {}) { text = __liftString(text >>> 0); console.log(text); }, - "globalThis.globalThis": (() => + "Math.E": ( + // ~lib/bindings/dom/Math.E: f64 + Math.E + ), + "Math.log": Math.log, + "globalThis.globalThis": ( // bindings/esm/immutableGlobalNested: externref globalThis.globalThis - )(), + ), "Date.getTimezoneOffset"() { // bindings/esm/Date_getTimezoneOffset() => i32 return (() => { diff --git a/tests/compiler/bindings/raw.debug.wat b/tests/compiler/bindings/raw.debug.wat index b8b0a36c97..415f7c15c1 100644 --- a/tests/compiler/bindings/raw.debug.wat +++ b/tests/compiler/bindings/raw.debug.wat @@ -10,15 +10,18 @@ (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) + (import "env" "Math.E" (global $~lib/bindings/dom/Math.E f64)) (import "env" "globalThis" (global $bindings/esm/immutableGlobal externref)) (import "env" "globalThis.globalThis" (global $bindings/esm/immutableGlobalNested externref)) (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (import "env" "console.log" (func $~lib/bindings/dom/console.log (param i32))) + (import "env" "Math.log" (func $~lib/bindings/dom/Math.log (param f64) (result f64))) (import "env" "Date.getTimezoneOffset" (func $bindings/esm/Date_getTimezoneOffset (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $bindings/esm/plainGlobal i32 (i32.const 1)) @@ -3200,6 +3203,9 @@ i32.store local.get $0 call $~lib/bindings/dom/console.log + global.get $~lib/bindings/dom/Math.E + call $~lib/bindings/dom/Math.log + drop global.get $bindings/esm/immutableGlobal drop global.get $bindings/esm/immutableGlobalNested diff --git a/tests/compiler/bindings/raw.release.js b/tests/compiler/bindings/raw.release.js index 0708464670..6f5bd1c6d3 100644 --- a/tests/compiler/bindings/raw.release.js +++ b/tests/compiler/bindings/raw.release.js @@ -14,10 +14,15 @@ export async function instantiate(module, imports = {}) { text = __liftString(text >>> 0); console.log(text); }, - "globalThis.globalThis": (() => + "Math.E": ( + // ~lib/bindings/dom/Math.E: f64 + Math.E + ), + "Math.log": Math.log, + "globalThis.globalThis": ( // bindings/esm/immutableGlobalNested: externref globalThis.globalThis - )(), + ), "Date.getTimezoneOffset"() { // bindings/esm/Date_getTimezoneOffset() => i32 return (() => { diff --git a/tests/compiler/bindings/raw.release.wat b/tests/compiler/bindings/raw.release.wat index 84c687adb6..3d2254e47d 100644 --- a/tests/compiler/bindings/raw.release.wat +++ b/tests/compiler/bindings/raw.release.wat @@ -6,12 +6,15 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_=>_i32 (func (param i32) (result i32))) + (import "env" "Math.E" (global $~lib/bindings/dom/Math.E f64)) (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (import "env" "console.log" (func $~lib/bindings/dom/console.log (param i32))) + (import "env" "Math.log" (func $~lib/bindings/dom/Math.log (param f64) (result f64))) (import "env" "Date.getTimezoneOffset" (func $bindings/esm/Date_getTimezoneOffset (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $bindings/esm/plainGlobal i32 (i32.const 1)) @@ -2230,6 +2233,9 @@ i32.store i32.const 1152 call $~lib/bindings/dom/console.log + global.get $~lib/bindings/dom/Math.E + call $~lib/bindings/dom/Math.log + drop call $bindings/esm/Date_getTimezoneOffset drop global.get $~lib/memory/__stack_pointer From ded520abb19b9cafdd636cc723aef2d11187d25b Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 21 Mar 2022 00:06:09 +0100 Subject: [PATCH 175/175] update features --- cli/options.json | 5 ++++- package-lock.json | 14 +++++++------- package.json | 2 +- src/common.ts | 3 +++ src/compiler.ts | 3 +++ src/index-wasm.ts | 6 ++++++ src/module.ts | 5 +++-- src/program.ts | 6 ++++++ std/assembly/index.d.ts | 6 ++++++ std/assembly/shared/feature.ts | 8 +++++++- tests/compiler/asc-constants.debug.wat | 9 +++++++++ tests/compiler/asc-constants.ts | 3 +++ tests/compiler/bindings/raw.debug.js | 7 +++++-- tests/compiler/bindings/raw.release.js | 7 +++++-- 14 files changed, 68 insertions(+), 16 deletions(-) diff --git a/cli/options.json b/cli/options.json index 4ca455b19c..c68bc7e72a 100644 --- a/cli/options.json +++ b/cli/options.json @@ -207,7 +207,10 @@ " exception-handling Exception handling.", " tail-calls Tail call operations.", " multi-value Multi value types.", - " memory64 Memory64 operations." + " memory64 Memory64 operations.", + " function-references Function reference types.", + " relaxed-simd Relaxed SIMD operations.", + " extended-const Extended const expressions." ], "type": "S", "mutuallyExclusive": "disable" diff --git a/package-lock.json b/package-lock.json index 16ac99fbd8..4dd6cb69ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "binaryen": "105.0.0-nightly.20220305", + "binaryen": "106.0.0-nightly.20220320", "long": "^5.2.0" }, "bin": { @@ -393,9 +393,9 @@ "dev": true }, "node_modules/binaryen": { - "version": "105.0.0-nightly.20220305", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-105.0.0-nightly.20220305.tgz", - "integrity": "sha512-0oYn8v9dVkfhdb9xLnn2vivCu7jZS1ky70sZp1UjLV6AWXN/mu8K8B7GIO8aiLLTqVEoXwh3fHhkWp1RMGN48w==", + "version": "106.0.0-nightly.20220320", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-106.0.0-nightly.20220320.tgz", + "integrity": "sha512-9Jzp9aOJ2uk2+viAiPr6+wi1BZKlxO4paTVm481RUEq3PIY63kdw78JoThrROt1s1qpCMuz0Oml6YqPJ7tep4w==", "bin": { "wasm-opt": "bin/wasm-opt", "wasm2js": "bin/wasm2js" @@ -2112,9 +2112,9 @@ "dev": true }, "binaryen": { - "version": "105.0.0-nightly.20220305", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-105.0.0-nightly.20220305.tgz", - "integrity": "sha512-0oYn8v9dVkfhdb9xLnn2vivCu7jZS1ky70sZp1UjLV6AWXN/mu8K8B7GIO8aiLLTqVEoXwh3fHhkWp1RMGN48w==" + "version": "106.0.0-nightly.20220320", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-106.0.0-nightly.20220320.tgz", + "integrity": "sha512-9Jzp9aOJ2uk2+viAiPr6+wi1BZKlxO4paTVm481RUEq3PIY63kdw78JoThrROt1s1qpCMuz0Oml6YqPJ7tep4w==" }, "brace-expansion": { "version": "1.1.11", diff --git a/package.json b/package.json index a1788c6cfb..5ad413229d 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "105.0.0-nightly.20220305", + "binaryen": "106.0.0-nightly.20220320", "long": "^5.2.0" }, "devDependencies": { diff --git a/src/common.ts b/src/common.ts index 10ef6265de..c48f5e7005 100644 --- a/src/common.ts +++ b/src/common.ts @@ -179,6 +179,9 @@ export namespace CommonNames { export const ASC_FEATURE_MULTI_VALUE = "ASC_FEATURE_MULTI_VALUE"; export const ASC_FEATURE_GC = "ASC_FEATURE_GC"; export const ASC_FEATURE_MEMORY64 = "ASC_FEATURE_MEMORY64"; + export const ASC_FEATURE_FUNCTION_REFERENCES = "ASC_FEATURE_FUNCTION_REFERENCES"; + export const ASC_FEATURE_RELAXED_SIMD = "ASC_FEATURE_RELAXED_SIMD"; + export const ASC_FEATURE_EXTENDED_CONST = "ASC_FEATURE_EXTENDED_CONST"; export const ASC_VERSION_MAJOR = "ASC_VERSION_MAJOR"; export const ASC_VERSION_MINOR = "ASC_VERSION_MINOR"; export const ASC_VERSION_PATCH = "ASC_VERSION_PATCH"; diff --git a/src/compiler.ts b/src/compiler.ts index 4f0bd150ef..454720221d 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -445,6 +445,9 @@ export class Compiler extends DiagnosticEmitter { if (options.hasFeature(Feature.MULTI_VALUE)) featureFlags |= FeatureFlags.MultiValue; if (options.hasFeature(Feature.GC)) featureFlags |= FeatureFlags.GC; if (options.hasFeature(Feature.MEMORY64)) featureFlags |= FeatureFlags.Memory64; + if (options.hasFeature(Feature.FUNCTION_REFERENCES)) featureFlags |= FeatureFlags.FunctionReferences; + if (options.hasFeature(Feature.RELAXED_SIMD)) featureFlags |= FeatureFlags.RelaxedSIMD; + if (options.hasFeature(Feature.EXTENDED_CONST)) featureFlags |= FeatureFlags.ExtendedConst; module.setFeatures(featureFlags); // set up the main start function diff --git a/src/index-wasm.ts b/src/index-wasm.ts index 9417e25a9f..f005d242a5 100644 --- a/src/index-wasm.ts +++ b/src/index-wasm.ts @@ -171,6 +171,12 @@ export const FEATURE_MULTI_VALUE = Feature.MULTI_VALUE; export const FEATURE_GC = Feature.GC; /** Memory64. */ export const FEATURE_MEMORY64 = Feature.MEMORY64; +/** Function references. */ +export const FEATURE_FUNCTION_REFERENCES = Feature.FUNCTION_REFERENCES; +/** Relaxed SIMD. */ +export const FEATURE_RELAXED_SIMD = Feature.RELAXED_SIMD; +/** Extended const expressions. */ +export const FEATURE_EXTENDED_CONST = Feature.EXTENDED_CONST; /** Enables a specific feature. */ export function enableFeature(options: Options, feature: Feature): void { diff --git a/src/module.ts b/src/module.ts index 040b3c8845..f002621e80 100644 --- a/src/module.ts +++ b/src/module.ts @@ -82,9 +82,10 @@ export enum FeatureFlags { MultiValue = 512 /* _BinaryenFeatureMultivalue */, GC = 1024 /* _BinaryenFeatureGC */, Memory64 = 2048 /* _BinaryenFeatureMemory64 */, - TypedFunctionReferences = 4096 /* _BinaryenFeatureTypedFunctionReferences */, + FunctionReferences = 4096 /* _BinaryenFeatureTypedFunctionReferences */, RelaxedSIMD = 16384 /* _BinaryenFeatureRelaxedSIMD */, - All = 32767 /* _BinaryenFeatureAll */ + ExtendedConst = 32768 /* _BinaryenFeatureExtendedConst */, + All = 65535 /* _BinaryenFeatureAll */ } /** Binaryen expression id constants. */ diff --git a/src/program.ts b/src/program.ts index 0ac5259a5a..6bb1dea523 100644 --- a/src/program.ts +++ b/src/program.ts @@ -1064,6 +1064,12 @@ export class Program extends DiagnosticEmitter { i64_new(options.hasFeature(Feature.GC) ? 1 : 0, 0)); this.registerConstantInteger(CommonNames.ASC_FEATURE_MEMORY64, Type.bool, i64_new(options.hasFeature(Feature.MEMORY64) ? 1 : 0, 0)); + this.registerConstantInteger(CommonNames.ASC_FEATURE_FUNCTION_REFERENCES, Type.bool, + i64_new(options.hasFeature(Feature.FUNCTION_REFERENCES) ? 1 : 0, 0)); + this.registerConstantInteger(CommonNames.ASC_FEATURE_RELAXED_SIMD, Type.bool, + i64_new(options.hasFeature(Feature.RELAXED_SIMD) ? 1 : 0, 0)); + this.registerConstantInteger(CommonNames.ASC_FEATURE_EXTENDED_CONST, Type.bool, + i64_new(options.hasFeature(Feature.EXTENDED_CONST)? 1 : 0, 0)); // remember deferred elements var queuedImports = new Array(); diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index 54d47259f9..d51ebf5c91 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -92,6 +92,12 @@ declare const ASC_FEATURE_MULTI_VALUE: bool; declare const ASC_FEATURE_GC: bool; /** Whether the memory64 feature is enabled. */ declare const ASC_FEATURE_MEMORY64: bool; +/** Whether the function references feature is enabled. */ +declare const ASC_FEATURE_FUNCTION_REFERENCES: bool; +/** Whether the relaxed SIMD feature is enabled. */ +declare const ASC_FEATURE_RELAXED_SIMD: bool; +/** Whether the extended const expression feature is enabled. */ +declare const ASC_FEATURE_EXTENDED_CONST: bool; /** Major version of the compiler. */ declare const ASC_VERSION_MAJOR: i32; /** Minor version of the compiler. */ diff --git a/std/assembly/shared/feature.ts b/std/assembly/shared/feature.ts index 0b36c644eb..c8ca417a25 100644 --- a/std/assembly/shared/feature.ts +++ b/std/assembly/shared/feature.ts @@ -27,7 +27,13 @@ export const enum Feature { /** Garbage collection. */ GC = 1 << 10, // see: https://github.com/WebAssembly/gc /** Memory64. */ - MEMORY64 = 1 << 11 // see: https://github.com/WebAssembly/memory64 + MEMORY64 = 1 << 11, // see: https://github.com/WebAssembly/memory64 + /** Function references. */ + FUNCTION_REFERENCES = 1 << 12, // see: https://github.com/WebAssembly/function-references + /** Relaxed SIMD. */ + RELAXED_SIMD = 1 << 13, // see: https://github.com/WebAssembly/relaxed-simd + /** Extended const expressions. */ + EXTENDED_CONST = 1 << 14 // see: https://github.com/WebAssembly/extended-const } /** Gets the name of the specified feature one would specify on the command line. */ diff --git a/tests/compiler/asc-constants.debug.wat b/tests/compiler/asc-constants.debug.wat index 8bd868089a..9ef4c1f725 100644 --- a/tests/compiler/asc-constants.debug.wat +++ b/tests/compiler/asc-constants.debug.wat @@ -18,6 +18,9 @@ (global $~lib/native/ASC_FEATURE_MULTI_VALUE i32 (i32.const 0)) (global $~lib/native/ASC_FEATURE_GC i32 (i32.const 0)) (global $~lib/native/ASC_FEATURE_MEMORY64 i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_FUNCTION_REFERENCES i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_RELAXED_SIMD i32 (i32.const 0)) + (global $~lib/native/ASC_FEATURE_EXTENDED_CONST i32 (i32.const 0)) (global $~lib/memory/__data_end i32 (i32.const 8)) (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16392)) (global $~lib/memory/__heap_base i32 (i32.const 16392)) @@ -63,6 +66,12 @@ drop i32.const 0 drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop i32.const 1 drop i32.const 1 diff --git a/tests/compiler/asc-constants.ts b/tests/compiler/asc-constants.ts index 34716332ba..d4a59697a7 100644 --- a/tests/compiler/asc-constants.ts +++ b/tests/compiler/asc-constants.ts @@ -17,6 +17,9 @@ ASC_FEATURE_REFERENCE_TYPES; ASC_FEATURE_MULTI_VALUE; ASC_FEATURE_GC; ASC_FEATURE_MEMORY64; +ASC_FEATURE_FUNCTION_REFERENCES; +ASC_FEATURE_RELAXED_SIMD; +ASC_FEATURE_EXTENDED_CONST; // versions vary between builds isDefined(ASC_VERSION_MAJOR); diff --git a/tests/compiler/bindings/raw.debug.js b/tests/compiler/bindings/raw.debug.js index 6f5bd1c6d3..dabcb032b9 100644 --- a/tests/compiler/bindings/raw.debug.js +++ b/tests/compiler/bindings/raw.debug.js @@ -1,6 +1,6 @@ export async function instantiate(module, imports = {}) { const adaptedImports = { - env: Object.assign(Object.create(globalThis), { + env: Object.assign(Object.create(globalThis), imports.env || {}, { trace(message, n, a0, a1, a2, a3, a4) { // ~lib/builtins/trace(~lib/string/String, i32?, f64?, f64?, f64?, f64?, f64?) => void message = __liftString(message >>> 0); @@ -18,7 +18,10 @@ export async function instantiate(module, imports = {}) { // ~lib/bindings/dom/Math.E: f64 Math.E ), - "Math.log": Math.log, + "Math.log": ( + // ~lib/bindings/dom/Math.log(f64) => f64 + Math.log + ), "globalThis.globalThis": ( // bindings/esm/immutableGlobalNested: externref globalThis.globalThis diff --git a/tests/compiler/bindings/raw.release.js b/tests/compiler/bindings/raw.release.js index 6f5bd1c6d3..dabcb032b9 100644 --- a/tests/compiler/bindings/raw.release.js +++ b/tests/compiler/bindings/raw.release.js @@ -1,6 +1,6 @@ export async function instantiate(module, imports = {}) { const adaptedImports = { - env: Object.assign(Object.create(globalThis), { + env: Object.assign(Object.create(globalThis), imports.env || {}, { trace(message, n, a0, a1, a2, a3, a4) { // ~lib/builtins/trace(~lib/string/String, i32?, f64?, f64?, f64?, f64?, f64?) => void message = __liftString(message >>> 0); @@ -18,7 +18,10 @@ export async function instantiate(module, imports = {}) { // ~lib/bindings/dom/Math.E: f64 Math.E ), - "Math.log": Math.log, + "Math.log": ( + // ~lib/bindings/dom/Math.log(f64) => f64 + Math.log + ), "globalThis.globalThis": ( // bindings/esm/immutableGlobalNested: externref globalThis.globalThis