diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index bb97247b6a..0000000000
--- a/.eslintignore
+++ /dev/null
@@ -1,9 +0,0 @@
-dist/
-lib/binaryen.js
-lib/parse/index.js
-build/
-raw/
-tests/parser/
-
-# FIXME: Tagged template literal tests with invalid escapes
-tests/compiler/templateliteral.ts
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
deleted file mode 100644
index 3ba62e3992..0000000000
--- a/.eslintrc.cjs
+++ /dev/null
@@ -1,268 +0,0 @@
-/* global module */
-
-module.exports = {
- root: true,
- parser: "@typescript-eslint/parser",
- plugins: [
- "@typescript-eslint",
- ],
- extends: [
- "eslint:recommended",
- "plugin:@typescript-eslint/eslint-recommended",
- "plugin:@typescript-eslint/recommended",
- ],
- parserOptions: {
- ecmaVersion: 2020,
- sourceType: "module",
- ecmaFeatures: {}
- },
- globals: {
- "globalThis": "readonly",
- "BigInt64Array": "readonly",
- "BigUint64Array": "readonly",
- "WebAssembly": "readonly",
- "FinalizationRegistry": "readonly",
- "fetch": "readonly",
- "URL": "readonly",
- "console": "readonly"
- },
-
- // === General rules =========================================================
-
- rules: {
- // Omitted semicolons are hugely popular, yet within the compiler it makes
- // sense to be better safe than sorry.
- "semi": "error",
-
- // Our code bases uses 2 spaces for indentation, and we enforce it here so
- // files don't mix spaces, tabs or different indentation levels.
- "indent": ["error", 2, {
- "SwitchCase": 1,
- "VariableDeclarator": "first",
- "offsetTernaryExpressions": true,
- "ignoredNodes": [ // FIXME: something's odd here
- "ConditionalExpression > *",
- "ConditionalExpression > * > *",
- "ConditionalExpression > * > * > *"
- ]
- }],
-
- // This is mostly visual style, making comments look uniform.
- "spaced-comment": ["error", "always", {
- "markers": ["/"], // triple-slash
- "exceptions": ["/"] // all slashes
- }],
-
- // This tends to be annoying as it encourages developers to make everything
- // that is never reassigned a 'const', sometimes semantically incorrect so,
- // typically leading to huge diffs in follow-up PRs modifying affected code.
- "prefer-const": "off",
-
- // It is perfectly fine to declare top-level variables with `var`, yet this
- // rule doesn't provide configuration options that would help.
- "no-var": "off",
-
- // Quite often, dealing with multiple related cases at once or otherwise
- // falling through is exactly the point of using a switch.
- "no-fallthrough": "off",
-
- // Typical false-positives here are `do { ... } while (true)` statements or
- // similar, but the only option provided here is not checking any loops.
- "no-constant-condition": ["error", { checkLoops: false }],
-
- // Functions are nested in blocks occasionally, and there haven't been any
- // problems with this so far, so turning the check off.
- "no-inner-declarations": "off",
-
- // Quite common in scenarios where an iteration starts at `current = this`.
- "@typescript-eslint/no-this-alias": "off",
-
- // Interferes with tests and 64-bit literals
- "@typescript-eslint/no-loss-of-precision": "off",
-
- // Disabled here, but enabled again for JavaScript files.
- "no-unused-vars": "off",
-
- // Disabled here, but enabled again for TypeScript files.
- "@typescript-eslint/no-unused-vars": "off"
- },
- overrides: [
-
- // === JavaScript rules ====================================================
-
- {
- env: {
- "browser": true,
- "amd": true,
- "node": true,
- "es6": true
- },
- files: [
- "**/*.js",
- "bin/*"
- ],
- rules: {
- // We are testing both ESM and UMD, so don't limit us.
- "@typescript-eslint/no-var-requires": "off",
-
- // This rule does not behave well in JS files.
- "@typescript-eslint/explicit-module-boundary-types": "off",
-
- // Enforcing to remove function parameters on stubs makes code less
- // maintainable, so we instead allow unused function parameters.
- "no-unused-vars": [
- "warn", {
- "vars": "local",
- "args": "none",
- "ignoreRestSiblings": false
- }
- ],
-
- "@typescript-eslint/no-loss-of-precision": "error",
- }
- },
-
- // === TypeScript rules ====================================================
-
- {
- files: [
- "**/*.ts"
- ],
- rules: {
- // Enforcing to remove function parameters on stubs makes code less
- // maintainable, so we instead allow unused function parameters.
- "@typescript-eslint/no-unused-vars": [
- "warn", {
- "vars": "local",
- "varsIgnorePattern": "^[A-Z](?:From|To)?$", // ignore type params
- "args": "none",
- "ignoreRestSiblings": false
- }
- ]
- }
- },
-
- // === AssemblyScript rules (extends TypeScript rules) =====================
-
- {
- files: [
- "**/assembly/**/*.ts",
- "src/**/*.ts",
- "lib/parse/src/**/*.ts"
- ],
- rules: {
- // Namespaces are quite useful in AssemblyScript
- "@typescript-eslint/no-namespace": "off",
-
- // There is actually codegen difference here
- "@typescript-eslint/no-array-constructor": "off",
-
- // Sometimes it can't be avoided to add a @ts-ignore
- "@typescript-eslint/ban-ts-comment": "off",
-
- // Utilized to achieve portability in some cases
- "@typescript-eslint/no-non-null-assertion": "off",
- }
- },
-
- // === Compiler rules (extends AssemblyScript rules) =======================
-
- {
- files: [
- "src/**/*.ts",
- "std/assembly/**/*.ts"
- ],
- rules: {
- // There is an actual codegen difference here - TODO: revisit
- "no-cond-assign": "off",
-
- // Not all types can be omitted in AS yet - TODO: revisit
- "@typescript-eslint/no-inferrable-types": "off",
-
- // Used rarely to reference internals that are not user-visible
- "@typescript-eslint/triple-slash-reference": "off",
-
- // The compiler has its own `Function` class for example
- "no-shadow-restricted-names": "off",
- "@typescript-eslint/ban-types": "off"
- }
- },
-
- // === Standard Library rules (extends AssemblyScript rules) ===============
-
- {
- files: [
- "std/assembly/**/*.ts"
- ],
- rules: {
- // We are implementing with --noLib, so we shadow all the time
- "no-shadow-restricted-names": "off",
-
- // Similarly, sometimes we need the return type to be String, not string
- "@typescript-eslint/ban-types": "off"
- }
- },
-
- // === Standard Definition rules (extends TypeScript rules) ================
-
- {
- files: [
- "std/**/*.d.ts"
- ],
- rules: {
- // Often required to achieve compatibility with TypeScript
- "@typescript-eslint/no-explicit-any": "off",
-
- // Interfaces can be stubs here, i.e. not yet fully implemented
- "@typescript-eslint/no-empty-interface": "off",
-
- // Definitions make use of `object` to model rather unusual constraints
- "@typescript-eslint/ban-types": "off"
- }
- },
-
- // === Compiler Definition rules (extends TypeScript rules) ================
-
- {
- files: [
- "./dist/*.d.ts"
- ],
- rules: {
- // Our definitions are complicated, and all attempts to describe them
- // as modules have failed so far. As such, we re-export namespaces.
- "@typescript-eslint/no-namespace": "off",
- "@typescript-eslint/triple-slash-reference": "off"
- }
- },
-
- // === Test rules (extends TypeScript rules) ===============================
-
- {
- files: [
- "./tests/compiler/**/*.ts",
- "./lib/loader/tests/assembly/**/*.ts"
- ],
- rules: {
- // Tests typically include unusual code patterns on purpose. This is
- // very likely not an extensive list, but covers what's there so far.
- "no-empty": "off",
- "no-cond-assign": "off",
- "no-compare-neg-zero": "off",
- "no-inner-declarations": "off",
- "no-constant-condition": "off",
- "use-isnan": "off",
- "@typescript-eslint/no-namespace": "off",
- "@typescript-eslint/no-unused-vars": "off",
- "@typescript-eslint/no-empty-function": "off",
- "@typescript-eslint/no-non-null-assertion": "off",
- "@typescript-eslint/no-extra-semi": "off",
- "@typescript-eslint/no-inferrable-types": "off",
- "@typescript-eslint/ban-types": "off",
- "@typescript-eslint/triple-slash-reference": "off",
- "@typescript-eslint/ban-ts-comment": "off",
- "@typescript-eslint/no-extra-non-null-assertion": "off",
- "@typescript-eslint/no-empty-interface": "off"
- }
- },
- ]
-};
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
new file mode 100644
index 0000000000..9002e311df
--- /dev/null
+++ b/.github/workflows/pr.yml
@@ -0,0 +1,20 @@
+name: PR
+
+on:
+ pull_request:
+ types: [opened, edited, synchronize]
+
+jobs:
+ check-title:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check PR Title Prefix
+ id: title-check
+ uses: actions/github-script@v9
+ with:
+ script: |
+ const prefs = ["feat", "fix", "breaking", "chore"];
+ const title = context.payload.pull_request.title.toLowerCase();
+ const hasValidPrefix = prefs.some(prefix => title.startsWith(`${prefix}:`));
+ if (!hasValidPrefix)
+ core.setFailed("PR title must start with 'feat:', 'fix:', 'breaking:' or 'chore:'");
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index a8b2d99a46..269112457d 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -10,19 +10,19 @@ jobs:
name: Packages
if: github.repository == 'AssemblyScript/assemblyscript'
runs-on: ubuntu-latest
+ permissions:
+ id-token: write
+ contents: write
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v6
with:
ref: main
fetch-depth: 0
- - uses: actions/setup-node@v3
+ - uses: actions/setup-node@v6
with:
node-version: current
- name: Install dependencies
- run: | # npm>=7 is currently broken: https://github.com/npm/cli/issues/1973
- npm -g install npm@6
- npm -v
- npm ci
+ run: npm ci
- name: Build packages
run: |
VERSION=$(npx aspublish --version)
@@ -49,7 +49,6 @@ jobs:
- name: Publish packages
env:
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
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 86853b6993..9278bfd6aa 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -6,7 +6,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- - uses: actions/stale@v8
+ - uses: actions/stale@v10
with:
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions!'
stale-issue-label: 'stale'
@@ -17,6 +17,6 @@ jobs:
exempt-draft-pr: true
exempt-all-milestones: true
exempt-all-assignees: true
- days-before-issue-stale: 30
- days-before-pr-stale: 60
+ days-before-issue-stale: 60
+ days-before-pr-stale: 120
days-before-close: 7
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 4ccc5889bd..f9d2f7db0a 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -4,12 +4,15 @@ on:
branches:
- main
pull_request:
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
jobs:
check:
name: "Check"
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v6
- name: "Check that distribution files are unmodified"
if: github.event_name == 'pull_request'
run: |
@@ -29,8 +32,8 @@ jobs:
os: ["ubuntu", "macos", "windows"]
node_version: ["current", "lts/*"]
steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-node@v3
+ - uses: actions/checkout@v6
+ - uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node_version }}
- name: Install dependencies
@@ -49,8 +52,8 @@ jobs:
matrix:
target: ["debug", "release"]
steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-node@v3
+ - uses: actions/checkout@v6
+ - uses: actions/setup-node@v6
with:
node-version: current
- name: Install dependencies
@@ -70,10 +73,8 @@ jobs:
runs-on: ubuntu-latest
needs: check
steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-node@v3
- with:
- node-version: 21-v8-canary
+ - uses: actions/checkout@v6
+ - uses: actions/setup-node@v6
- name: Install dependencies
run: npm ci --no-audit
- name: Build
@@ -88,8 +89,8 @@ jobs:
runs-on: ubuntu-latest
needs: check
steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-node@v3
+ - uses: actions/checkout@v6
+ - uses: actions/setup-node@v6
with:
node-version: current
- name: Install dependencies
@@ -113,8 +114,8 @@ jobs:
runs-on: ubuntu-latest
needs: check
steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-node@v3
+ - uses: actions/checkout@v6
+ - uses: actions/setup-node@v6
with:
node-version: current
- name: Install dependencies
@@ -131,10 +132,10 @@ jobs:
runs-on: ubuntu-latest
needs: check
steps:
- - uses: actions/checkout@v3
- - uses: dcodeIO/setup-node-nvm@master
+ - uses: actions/checkout@v6
+ - uses: actions/setup-node@v6
with:
- node-version: current
+ node-version: 24
- name: Install dependencies
run: npm ci --no-audit
- name: Build
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index aed33dc531..57b2125939 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -51,4 +51,15 @@ Before submitting your pull request, also make sure that the following condition
Please note that if a pull request is rather complicated, i.e. touches lots of internals, or became stale, it is not uncommon that a core contributor performs the final integration to get it done in good conscience while naming you as a co-author.
+Guidelines for **AI**-assisted Contributions
+--------------------------------------------
+
+**AI** tools are welcome as helpers, not authors. Keep these practices in mind:
+
+* Stay accountable: only submit changes you understand and can justify; be ready to explain behavior, edge cases. If an **AI** suggestion feels unclear, rewrite or drop it.
+* Keep humans in the loop: discuss non-trivial ideas early via [Issues](https://github.com/AssemblyScript/assemblyscript/issues) or [Discord](https://discord.gg/assemblyscript), especially when you are unsure about design or impact.
+* Use **AI** for acceleration, optimization and verification: treat **AI** output as a draft for code, tests, or docs; run linters/tests and review the logic **yourself**.
+* Be transparent in PRs: note briefly if **AI** was used and for what (e.g., initial draft, test scaffolding), and call out any parts where you want extra review.
+* Prefer small patches over large dumps; if you cannot confidently explain an **AI**-produced change, open a well-described issue instead.
+
Thank you!
diff --git a/NOTICE b/NOTICE
index 4962c2400e..da2cb563d4 100644
--- a/NOTICE
+++ b/NOTICE
@@ -51,11 +51,18 @@ under the licensing terms detailed in LICENSE:
* Adrien Zinger
* Ruixiang Chen
* Daniel Salvadori
-* Jairus Tanaka
+* Jairus Tanaka
* CountBleck
* Abdul Rauf
* Bach Le
* Xinquan Xu
+* Matt Johnson-Pint
+* Fabián Heredia Montiel
+* Jonas Minnberg
+* Kam Chehresa
+* Mopsgamer <79159094+Mopsgamer@users.noreply.github.com>
+* EDM115
+* Weixie Cui
Portions of this software are derived from third-party works licensed under
the following terms:
diff --git a/bin/asinit.js b/bin/asinit.js
old mode 100644
new mode 100755
index 5023e5c09a..5e3566ddc1
--- a/bin/asinit.js
+++ b/bin/asinit.js
@@ -55,11 +55,20 @@ const asinitOptions = {
],
"type": "b",
"alias": "y"
- }
+ },
+ "noColors": {
+ "description": "Disables terminal colors.",
+ "type": "b",
+ "default": false
+ },
};
const cliOptions = optionsUtil.parse(process.argv.slice(2), asinitOptions);
+if (cliOptions.options.noColors) {
+ stdoutColors.enabled = false;
+}
+
if (cliOptions.options.help || cliOptions.arguments.length === 0) printHelp();
function printHelp() {
@@ -91,7 +100,7 @@ if (/^(\.\.[/\\])*node_modules[/\\]assemblyscript[/\\]/.test(tsconfigBase)) {
}
const entryFile = path.join(assemblyDir, "index.ts");
const buildDir = path.join(projectDir, "build");
-const testsDir = path.join(projectDir, "tests");
+const testsDir = path.join(projectDir, "test");
const gitignoreFile = path.join(buildDir, ".gitignore");
const packageFile = path.join(projectDir, "package.json");
@@ -106,12 +115,23 @@ const paths = [
[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."],
- [testsIndexFile, "Stater test to check that the module is functioning."],
+ [testsIndexFile, "Starter test to check that the module is functioning."],
[indexHtmlFile, "Starter HTML file that loads the module in a browser."]
];
const formatPath = filePath => "./" + path.relative(projectDir, filePath).replace(/\\/g, "/");
+if (fs.existsSync(packageFile)) {
+ const pkg = JSON.parse(fs.readFileSync(packageFile));
+ if ("type" in pkg && pkg["type"] !== "module") {
+ console.error(stdoutColors.red([
+ `Error: The "type" field in ${formatPath(packageFile)} is set to "${pkg["type"]}".`,
+ ` asinit requires the "type" field to be set to "module" (ES modules).`
+ ].join("\n")));
+ process.exit(1);
+ }
+}
+
console.log([
"Version: " + version,
"",
@@ -338,7 +358,7 @@ function ensurePackageJson() {
"asbuild:debug": buildDebug,
"asbuild:release": buildRelease,
"asbuild": buildAll,
- "test": "node tests",
+ "test": "node --test",
"start": "npx serve ."
},
"devDependencies": {
@@ -370,12 +390,12 @@ function ensurePackageJson() {
updated = true;
}
if (!scripts["test"] || scripts["test"] == npmDefaultTest) {
- scripts["test"] = "node tests";
+ scripts["test"] = "node --test";
pkg["scripts"] = scripts;
updated = true;
}
if (!scripts["start"]) {
- scripts["start"] = "npx serve .",
+ scripts["start"] = "npx serve .";
pkg["scripts"] = scripts;
updated = true;
}
@@ -396,7 +416,7 @@ function ensurePackageJson() {
}
function ensureTestsDirectory() {
- console.log("- Making sure that the 'tests' directory exists...");
+ console.log("- Making sure that the 'test' directory exists...");
if (!fs.existsSync(testsDir)) {
fs.mkdirSync(testsDir);
console.log(stdoutColors.green(" Created: ") + testsDir);
@@ -407,13 +427,16 @@ function ensureTestsDirectory() {
}
function ensureTestsIndexJs() {
- console.log("- Making sure that 'tests/index.js' exists...");
+ console.log("- Making sure that 'test/index.js' exists...");
if (!fs.existsSync(testsIndexFile)) {
fs.writeFileSync(testsIndexFile, [
- "import assert from \"assert\";",
+ "import assert from \"node:assert/strict\";",
+ "import { it } from \"node:test\";",
"import { add } from \"../build/debug.js\";",
- "assert.strictEqual(add(1, 2), 3);",
- "console.log(\"ok\");"
+ "",
+ "it(\"add\", () => {",
+ " assert.equal(add(1, 2), 3);",
+ "});"
].join("\n") + "\n");
console.log(stdoutColors.green(" Created: ") + testsIndexFile);
} else {
diff --git a/cli/index.d.ts b/cli/index.d.ts
index 16e070529e..58c7fb4ef6 100644
--- a/cli/index.d.ts
+++ b/cli/index.d.ts
@@ -240,7 +240,8 @@ 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 "../src";
+import binaryen from "../lib/binaryen";
+import { Program, Parser } from "../src";
/** Compiler transform base class. */
export abstract class Transform {
@@ -248,6 +249,9 @@ export abstract class Transform {
/** Program reference. */
readonly program: Program;
+ /** Binaryen reference. */
+ readonly binaryen: typeof binaryen;
+
/** Base directory. */
readonly baseDir: string;
@@ -276,5 +280,5 @@ export abstract class Transform {
afterInitialize?(program: Program): void | Promise;
/** Called when compilation is complete, before the module is being validated. */
- afterCompile?(module: Module): void | Promise;
+ afterCompile?(module: binaryen.Module): void | Promise;
}
diff --git a/cli/index.js b/cli/index.js
index 91634a8c01..7e202e4f61 100644
--- a/cli/index.js
+++ b/cli/index.js
@@ -425,7 +425,7 @@ export async function main(argv, options) {
} catch (e1) {
try {
transform = require(resolved);
- } catch (e2) {
+ } catch {
return prepareResult(e1);
}
}
@@ -450,6 +450,7 @@ export async function main(argv, options) {
if (typeof transform === "function") {
Object.assign(transform.prototype, {
program,
+ binaryen,
baseDir,
stdout,
stderr,
@@ -597,7 +598,7 @@ export async function main(argv, options) {
return { sourceText, sourcePath };
}
- // Gets all pending imported files from the the backlog
+ // Gets all pending imported files from the backlog
function getBacklog(paths = []) {
do {
let internalPath = assemblyscript.nextFile(program);
@@ -669,7 +670,7 @@ export async function main(argv, options) {
.replace(/\\/g, "/")
.replace(extension_re, "")
.replace(/\/$/, "");
-
+
// Try entryPath.ext, then entryPath/index.ext
let sourceText = await readFile(sourcePath + extension, baseDir);
if (sourceText == null) {
@@ -866,7 +867,7 @@ export async function main(argv, options) {
// Prepare output
if (!opts.noEmit) {
if (opts.binaryFile) {
- // We catched lagacy field for binary output (before 0.20)
+ // We caught legacy field for binary output (before 0.20)
return prepareResult(Error("Usage of the --binaryFile compiler option is no longer supported. Use --outFile instead."));
}
let bindings = opts.bindings || [];
@@ -944,9 +945,10 @@ export async function main(argv, options) {
try {
// use superset text format when extension is `.wast`.
// Otherwise use official stack IR format (wat).
+ binaryen.setOptimizeStackIR(true);
out = opts.textFile?.endsWith(".wast")
? binaryenModule.emitText()
- : binaryenModule.emitStackIR(true);
+ : binaryenModule.emitStackIR();
} catch (e) {
crash("emitText", e);
}
@@ -957,7 +959,7 @@ export async function main(argv, options) {
writeFile(opts.textFile, out, baseDir)
);
} else if (!hasStdout) {
- hasStdout = true;
+ // hasStdout = true;
writeStdout(out);
}
}
@@ -1022,7 +1024,7 @@ export async function main(argv, options) {
try {
stats.readCount++;
return await fs.promises.readFile(name, "utf8");
- } catch (e) {
+ } catch {
return null;
}
}
@@ -1036,7 +1038,7 @@ export async function main(argv, options) {
await fs.promises.mkdir(dirPath, { recursive: true });
await fs.promises.writeFile(filePath, contents);
return true;
- } catch (e) {
+ } catch {
return false;
}
}
@@ -1047,7 +1049,7 @@ export async function main(argv, options) {
stats.readCount++;
return (await fs.promises.readdir(path.join(baseDir, dirname)))
.filter(file => extension_re_except_d.test(file));
- } catch (e) {
+ } catch {
return null;
}
}
@@ -1104,7 +1106,7 @@ async function getConfig(file, baseDir, readFile) {
try {
config = JSON.parse(contents);
} catch(ex) {
- throw new Error(`Asconfig is not valid json: ${location}`);
+ throw new Error(`Asconfig is not valid json: ${location}`, { cause: ex });
}
// validate asconfig shape
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 0000000000..4c53f86f2b
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,231 @@
+import { defineConfig, globalIgnores } from "eslint/config";
+
+import js from "@eslint/js";
+import tseslint from "typescript-eslint";
+import globals from "globals";
+
+export default defineConfig([
+ globalIgnores([
+ "**/*.d.ts",
+
+ "dist/**",
+ "lib/binaryen.js",
+ "lib/parse/index.js",
+ "build/**",
+ "raw/**",
+
+ // Exclude AS sources with non-standard decorators
+ "src/glue/wasm/**/*.ts",
+ "std/assembly/**/*.ts",
+
+ "tests/parser/**",
+ "tests/compiler/**",
+ "tests/asconfig/**",
+ "lib/loader/tests/**",
+
+ // FIXME: Tagged template literal tests with invalid escapes
+ "tests/compiler/templateliteral.ts",
+ ]),
+
+ js.configs.recommended,
+ ...tseslint.configs.recommended,
+
+ {
+ files: ["**/*.{js,ts}"],
+
+ languageOptions: {
+ parser: tseslint.parser,
+ ecmaVersion: 2024,
+ sourceType: "module",
+ globals: {
+ ...globals.es2024,
+ globalThis: "readonly",
+ BigInt64Array: "readonly",
+ BigUint64Array: "readonly",
+ WebAssembly: "readonly",
+ FinalizationRegistry: "readonly",
+ fetch: "readonly",
+ URL: "readonly",
+ console: "readonly",
+ },
+ },
+
+ plugins: {
+ "@typescript-eslint": tseslint.plugin,
+ },
+
+ rules: {
+ semi: "error",
+
+ indent: ["error", 2, {
+ SwitchCase: 1,
+ VariableDeclarator: "first",
+ offsetTernaryExpressions: true,
+ ignoredNodes: [
+ "ConditionalExpression > *",
+ "ConditionalExpression > * > *",
+ "ConditionalExpression > * > * > *",
+ ],
+ }],
+
+ "spaced-comment": ["error", "always", {
+ markers: ["/"],
+ exceptions: ["/"],
+ }],
+
+ "prefer-const": "off",
+ "no-var": "off",
+ "no-fallthrough": "off",
+
+ "no-constant-condition": ["error", { checkLoops: false }],
+ "no-inner-declarations": "off",
+
+ "no-loss-of-precision": "off",
+ "no-unused-vars": "off",
+ "no-useless-assignment": "off",
+
+ "@typescript-eslint/no-this-alias": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ },
+ },
+
+ // === JavaScript ===
+ {
+ files: ["**/*.js", "bin/*"],
+
+ languageOptions: {
+ globals: {
+ ...globals.browser,
+ ...globals.amd,
+ ...globals.node,
+ ...globals.es6,
+ },
+ },
+
+ rules: {
+ "@typescript-eslint/no-var-requires": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off",
+
+ "no-unused-vars": ["warn", {
+ vars: "local",
+ args: "none",
+ ignoreRestSiblings: false,
+ }],
+
+ "@typescript-eslint/no-loss-of-precision": "error",
+ },
+ },
+
+ // === TypeScript ===
+ {
+ files: ["**/*.ts"],
+
+ rules: {
+ "@typescript-eslint/no-unused-vars": ["warn", {
+ vars: "local",
+ varsIgnorePattern: "^[A-Z](?:From|To)?$",
+ args: "none",
+ ignoreRestSiblings: false,
+ }],
+ },
+ },
+
+ // === AssemblyScript ===
+ {
+ files: [
+ "**/assembly/**/*.ts",
+ "src/**/*.ts",
+ "lib/parse/src/**/*.ts",
+ ],
+
+ rules: {
+ "@typescript-eslint/no-namespace": "off",
+ "@typescript-eslint/no-array-constructor": "off",
+ "@typescript-eslint/ban-ts-comment": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ },
+ },
+
+ // === Compiler ===
+ {
+ files: [
+ "src/**/*.ts",
+ "std/assembly/**/*.ts",
+ ],
+
+ rules: {
+ "no-cond-assign": "off",
+ "@typescript-eslint/no-inferrable-types": "off",
+ "@typescript-eslint/triple-slash-reference": "off",
+ "no-shadow-restricted-names": "off",
+ "@typescript-eslint/ban-types": "off",
+ },
+ },
+
+ // === Standard Library ===
+ {
+ files: ["std/assembly/**/*.ts"],
+
+ rules: {
+ "no-shadow-restricted-names": "off",
+ "@typescript-eslint/ban-types": "off",
+ },
+ },
+
+ // === Definition files ===
+ {
+ files: ["std/**/*.d.ts"],
+
+ rules: {
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-empty-interface": "off",
+ "@typescript-eslint/ban-types": "off",
+ },
+ },
+
+ // === Dist definitions ===
+ {
+ files: ["./dist/*.d.ts"],
+
+ rules: {
+ "@typescript-eslint/no-namespace": "off",
+ "@typescript-eslint/triple-slash-reference": "off",
+ },
+ },
+
+ // === Tests ===
+ {
+ files: [
+ "./tests/compiler/**/*.ts",
+ "./lib/loader/tests/assembly/**/*.ts",
+ ],
+
+ rules: {
+ "no-empty": "off",
+ "no-cond-assign": "off",
+ "no-compare-neg-zero": "off",
+ "no-inner-declarations": "off",
+ "no-constant-condition": "off",
+ "use-isnan": "off",
+
+ "@typescript-eslint/no-namespace": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ "@typescript-eslint/no-empty-function": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ "@typescript-eslint/no-extra-semi": "off",
+ "@typescript-eslint/no-inferrable-types": "off",
+ "@typescript-eslint/ban-types": "off",
+ "@typescript-eslint/triple-slash-reference": "off",
+ "@typescript-eslint/ban-ts-comment": "off",
+ "@typescript-eslint/no-extra-non-null-assertion": "off",
+ "@typescript-eslint/no-empty-interface": "off",
+ },
+ },
+
+ {
+ files: ["tests/transform/cjs/**/*.js"],
+ rules: {
+ "@typescript-eslint/no-require-imports": "off",
+ },
+ },
+]);
diff --git a/lib/rtrace/tlsfvis.html b/lib/rtrace/tlsfvis.html
index ab3f6548a6..16c022b270 100644
--- a/lib/rtrace/tlsfvis.html
+++ b/lib/rtrace/tlsfvis.html
@@ -169,8 +169,8 @@
TLSF visualizer
-
- Notes:
+
+
Notes:
It is expected that there is exactly one block on initialization. This is the remaining space (< 64K) within the last page after static data.
It is expected that if two adjacent blocks of size K are freed, the merged block doesn't go into the first level list for K*2 because its size is actually larger than that (K + OVERHEAD + K).
@@ -178,7 +178,7 @@ TLSF visualizer
It is expected that after other operations have already been performed, being able to allocate 1GB can't be guaranteed anymore, even if there should be enough space left in absolute terms, if prior subdivision prevents it.
It is expected that the second level 0 in first level 0 isn't ever used due to alignment guarantees. Smallest block is 32 bytes (16 bytes overhead + 16 bytes payload if used, respectively linking information if free) in this implementation.
-
+
Implementation constants: ? bits alignment, ? bits first level, ? bits second level, ? B overhead
First level bitmap
@@ -229,7 +229,6 @@ Allocator
512 MB - δ fl=MSB-1 sl=MSB
1 GB - δ fl=MSB sl=MSB
-
Segments
Allocations performed above are tracked here so you can free them again. Note that TLSF alone does not keep track of used blocks (unless free'd and put in a free list again). It is expected that adjacent free blocks become merged automatically.
diff --git a/package-lock.json b/package-lock.json
index db21ae7902..535ad8a747 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,7 +1,7 @@
{
"name": "assemblyscript",
"version": "0.0.0",
- "lockfileVersion": 2,
+ "lockfileVersion": 3,
"requires": true,
"packages": {
"": {
@@ -9,704 +9,828 @@
"version": "0.0.0",
"license": "Apache-2.0",
"dependencies": {
- "binaryen": "116.0.0-nightly.20231102",
- "long": "^5.2.1"
+ "binaryen": "131.0.0-nightly.20260721",
+ "long": "^5.2.4"
},
"bin": {
"asc": "bin/asc.js",
"asinit": "bin/asinit.js"
},
"devDependencies": {
- "@types/node": "^18.13.0",
- "@typescript-eslint/eslint-plugin": "^5.51.0",
- "@typescript-eslint/parser": "^5.51.0",
- "diff": "^5.1.0",
- "esbuild": "^0.19.4",
- "eslint": "^8.33.0",
- "glob": "^10.3.0",
- "typescript": "~4.7.4"
+ "@eslint/js": "^10.0.1",
+ "@types/node": "^26.1.1",
+ "as-float": "^1.0.1",
+ "diff": "^9.0.0",
+ "esbuild": "^0.28.1",
+ "eslint": "^10.7.0",
+ "glob": "^13.0.6",
+ "globals": "^17.7.0",
+ "typescript": "^6.0.3",
+ "typescript-eslint": "^8.65.0"
},
"engines": {
- "node": ">=16",
- "npm": ">=7"
+ "node": ">=20",
+ "npm": ">=10"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/assemblyscript"
}
},
- "node_modules/@aashutoshrathi/word-wrap": {
- "version": "1.2.6",
- "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",
- "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz",
+ "integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==",
+ "cpu": [
+ "ppc64"
+ ],
"dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
"engines": {
- "node": ">=0.10.0"
+ "node": ">=18"
}
},
"node_modules/@esbuild/android-arm": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz",
- "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz",
+ "integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==",
"cpu": [
"arm"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"android"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/android-arm64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz",
- "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz",
+ "integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==",
"cpu": [
"arm64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"android"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/android-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz",
- "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz",
+ "integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"android"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/darwin-arm64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz",
- "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz",
+ "integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==",
"cpu": [
"arm64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/darwin-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz",
- "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz",
+ "integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/freebsd-arm64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz",
- "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz",
+ "integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==",
"cpu": [
"arm64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"freebsd"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/freebsd-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz",
- "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz",
+ "integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"freebsd"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-arm": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz",
- "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz",
+ "integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==",
"cpu": [
"arm"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-arm64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz",
- "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz",
+ "integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==",
"cpu": [
"arm64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-ia32": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz",
- "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz",
+ "integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==",
"cpu": [
"ia32"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-loong64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz",
- "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz",
+ "integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==",
"cpu": [
"loong64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-mips64el": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz",
- "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz",
+ "integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==",
"cpu": [
"mips64el"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-ppc64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz",
- "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz",
+ "integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==",
"cpu": [
"ppc64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-riscv64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz",
- "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz",
+ "integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==",
"cpu": [
"riscv64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-s390x": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz",
- "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz",
+ "integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==",
"cpu": [
"s390x"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz",
- "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz",
+ "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz",
+ "integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
}
},
"node_modules/@esbuild/netbsd-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz",
- "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz",
+ "integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"netbsd"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz",
+ "integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
}
},
"node_modules/@esbuild/openbsd-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz",
- "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz",
+ "integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"openbsd"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz",
+ "integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": ">=18"
}
},
"node_modules/@esbuild/sunos-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz",
- "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz",
+ "integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"sunos"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/win32-arm64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz",
- "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz",
+ "integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==",
"cpu": [
"arm64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/win32-ia32": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz",
- "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz",
+ "integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==",
"cpu": [
"ia32"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/win32-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz",
- "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==",
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz",
+ "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@eslint-community/eslint-utils": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
- "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
+ "version": "4.9.1",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz",
+ "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "eslint-visitor-keys": "^3.3.0"
+ "eslint-visitor-keys": "^3.4.3"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ },
"peerDependencies": {
"eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
}
},
"node_modules/@eslint-community/regexpp": {
- "version": "4.10.0",
- "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz",
- "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==",
+ "version": "4.12.2",
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz",
+ "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": "^12.0.0 || ^14.0.0 || >=16.0.0"
}
},
- "node_modules/@eslint/eslintrc": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz",
- "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==",
+ "node_modules/@eslint/config-array": {
+ "version": "0.23.5",
+ "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz",
+ "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
- "ajv": "^6.12.4",
- "debug": "^4.3.2",
- "espree": "^9.6.0",
- "globals": "^13.19.0",
- "ignore": "^5.2.0",
- "import-fresh": "^3.2.1",
- "js-yaml": "^4.1.0",
- "minimatch": "^3.1.2",
- "strip-json-comments": "^3.1.1"
+ "@eslint/object-schema": "^3.0.5",
+ "debug": "^4.3.1",
+ "minimatch": "^10.2.4"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
}
},
- "node_modules/@eslint/js": {
- "version": "8.52.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz",
- "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==",
+ "node_modules/@eslint/config-helpers": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.6.0.tgz",
+ "integrity": "sha512-ii6Bw9jJ2zi2cWA2Z+9/QZ/+3DX6kwaV5Q986D/CdP3Lap3w/pgQZ373FV7byY/i7L4IRH/G43I5dz1ClsCbpA==",
"dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@eslint/core": "^1.2.1"
+ },
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
}
},
- "node_modules/@humanwhocodes/config-array": {
- "version": "0.11.13",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz",
- "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==",
+ "node_modules/@eslint/core": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz",
+ "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
- "@humanwhocodes/object-schema": "^2.0.1",
- "debug": "^4.1.1",
- "minimatch": "^3.0.5"
+ "@types/json-schema": "^7.0.15"
},
"engines": {
- "node": ">=10.10.0"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
}
},
- "node_modules/@humanwhocodes/module-importer": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
- "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
+ "node_modules/@eslint/js": {
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz",
+ "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=12.22"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
},
"funding": {
- "type": "github",
- "url": "https://github.com/sponsors/nzakas"
+ "url": "https://eslint.org/donate"
+ },
+ "peerDependencies": {
+ "eslint": "^10.0.0"
+ },
+ "peerDependenciesMeta": {
+ "eslint": {
+ "optional": true
+ }
}
},
- "node_modules/@humanwhocodes/object-schema": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz",
- "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==",
- "dev": true
+ "node_modules/@eslint/object-schema": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz",
+ "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ }
},
- "node_modules/@isaacs/cliui": {
- "version": "8.0.2",
- "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
- "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
+ "node_modules/@eslint/plugin-kit": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.2.tgz",
+ "integrity": "sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
- "string-width": "^5.1.2",
- "string-width-cjs": "npm:string-width@^4.2.0",
- "strip-ansi": "^7.0.1",
- "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
- "wrap-ansi": "^8.1.0",
- "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
+ "@eslint/core": "^1.2.1",
+ "levn": "^0.4.1"
},
"engines": {
- "node": ">=12"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
}
},
- "node_modules/@isaacs/cliui/node_modules/ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "node_modules/@humanfs/core": {
+ "version": "0.19.1",
+ "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
+ "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==",
"dev": true,
+ "license": "Apache-2.0",
"engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ "node": ">=18.18.0"
}
},
- "node_modules/@isaacs/cliui/node_modules/strip-ansi": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
- "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "node_modules/@humanfs/node": {
+ "version": "0.16.7",
+ "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz",
+ "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
- "ansi-regex": "^6.0.1"
+ "@humanfs/core": "^0.19.1",
+ "@humanwhocodes/retry": "^0.4.0"
},
"engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ "node": ">=18.18.0"
}
},
- "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==",
+ "node_modules/@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
"dev": true,
- "dependencies": {
- "@nodelib/fs.stat": "2.0.5",
- "run-parallel": "^1.1.9"
- },
+ "license": "Apache-2.0",
"engines": {
- "node": ">= 8"
+ "node": ">=12.22"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
}
},
- "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==",
+ "node_modules/@humanwhocodes/retry": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",
+ "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==",
"dev": true,
+ "license": "Apache-2.0",
"engines": {
- "node": ">= 8"
+ "node": ">=18.18"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
}
},
- "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==",
+ "node_modules/@types/esrecurse": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz",
+ "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==",
"dev": true,
- "dependencies": {
- "@nodelib/fs.scandir": "2.1.5",
- "fastq": "^1.6.0"
- },
- "engines": {
- "node": ">= 8"
- }
+ "license": "MIT"
},
- "node_modules/@pkgjs/parseargs": {
- "version": "0.11.0",
- "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
- "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
+ "node_modules/@types/estree": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
+ "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
"dev": true,
- "optional": true,
- "engines": {
- "node": ">=14"
- }
+ "license": "MIT"
},
"node_modules/@types/json-schema": {
- "version": "7.0.14",
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.14.tgz",
- "integrity": "sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==",
- "dev": true
+ "version": "7.0.15",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@types/node": {
- "version": "18.18.8",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.8.tgz",
- "integrity": "sha512-OLGBaaK5V3VRBS1bAkMVP2/W9B+H8meUfl866OrMNQqt7wDgdpWPp5o6gmIc9pB+lIQHSq4ZL8ypeH1vPxcPaQ==",
+ "version": "26.1.1",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.1.tgz",
+ "integrity": "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "undici-types": "~5.26.4"
+ "undici-types": "~8.3.0"
}
},
- "node_modules/@types/semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==",
- "dev": true
- },
"node_modules/@typescript-eslint/eslint-plugin": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz",
- "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==",
- "dev": true,
- "dependencies": {
- "@eslint-community/regexpp": "^4.4.0",
- "@typescript-eslint/scope-manager": "5.62.0",
- "@typescript-eslint/type-utils": "5.62.0",
- "@typescript-eslint/utils": "5.62.0",
- "debug": "^4.3.4",
- "graphemer": "^1.4.0",
- "ignore": "^5.2.0",
- "natural-compare-lite": "^1.4.0",
- "semver": "^7.3.7",
- "tsutils": "^3.21.0"
+ "version": "8.65.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.65.0.tgz",
+ "integrity": "sha512-IEgob78X12rHpUmtcwFsXhZdVGJtwTVP8FiCLZkR6GlYVrl2PcuB+KhCE5BlVC/eQpQnu8WXRtkHZuPar+gCRA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/regexpp": "^4.12.2",
+ "@typescript-eslint/scope-manager": "8.65.0",
+ "@typescript-eslint/type-utils": "8.65.0",
+ "@typescript-eslint/utils": "8.65.0",
+ "@typescript-eslint/visitor-keys": "8.65.0",
+ "ignore": "^7.0.5",
+ "natural-compare": "^1.4.0",
+ "ts-api-utils": "^2.5.0"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "@typescript-eslint/parser": "^5.0.0",
- "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
+ "@typescript-eslint/parser": "^8.65.0",
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.6.tgz",
+ "integrity": "sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
}
},
"node_modules/@typescript-eslint/parser": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz",
- "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==",
+ "version": "8.65.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.65.0.tgz",
+ "integrity": "sha512-CZ4nMxWwgu1HEEFNkeaCptra9QCtkmKdgf3sWh1rl1trIhmxLilgTV4cwcbQ4wemnT4sWQN8CaKOmdYx+g2gMA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@typescript-eslint/scope-manager": "5.62.0",
- "@typescript-eslint/types": "5.62.0",
- "@typescript-eslint/typescript-estree": "5.62.0",
- "debug": "^4.3.4"
+ "@typescript-eslint/scope-manager": "8.65.0",
+ "@typescript-eslint/types": "8.65.0",
+ "@typescript-eslint/typescript-estree": "8.65.0",
+ "@typescript-eslint/visitor-keys": "8.65.0",
+ "debug": "^4.4.3"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/project-service": {
+ "version": "8.65.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.65.0.tgz",
+ "integrity": "sha512-SxnPhbTsGahizDgbu7oqFH/xVtzIqMd/s+WtnSxNxJZJpLbdT5IPdzg8EZxO3+PoKahXmwJLeNQOpKJb3/bi7Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/tsconfig-utils": "^8.65.0",
+ "@typescript-eslint/types": "^8.65.0",
+ "debug": "^4.4.3"
},
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.1.0"
}
},
"node_modules/@typescript-eslint/scope-manager": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz",
- "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==",
+ "version": "8.65.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.65.0.tgz",
+ "integrity": "sha512-Esbl8OSYiVxBokYgWPf7VVWg/BE798wXhimnn9ML9Pt5qoDf8bfQlgjlKXR/k98+AcNzlLKYrpCcrcuZ9DZLgg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "5.62.0",
- "@typescript-eslint/visitor-keys": "5.62.0"
+ "@typescript-eslint/types": "8.65.0",
+ "@typescript-eslint/visitor-keys": "8.65.0"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/tsconfig-utils": {
+ "version": "8.65.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.65.0.tgz",
+ "integrity": "sha512-j6GzGqCiRdA7Qhur2VVmKZAkBLfnHFQfx4TaJGL9RMveZqCo48jSHHO0DTgizEnGhtWnqmbtCUSrqSkdiY/0Hg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.1.0"
}
},
"node_modules/@typescript-eslint/type-utils": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz",
- "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==",
+ "version": "8.65.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.65.0.tgz",
+ "integrity": "sha512-YjaZ7PRI5qY7ax2L3PbvX0rRyGtipAReCWs0mhhDBHjH/vl0g0BonaGXrKdKpMbIIsMIwDgbk/xzkBTyAltS5g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@typescript-eslint/typescript-estree": "5.62.0",
- "@typescript-eslint/utils": "5.62.0",
- "debug": "^4.3.4",
- "tsutils": "^3.21.0"
+ "@typescript-eslint/types": "8.65.0",
+ "@typescript-eslint/typescript-estree": "8.65.0",
+ "@typescript-eslint/utils": "8.65.0",
+ "debug": "^4.4.3",
+ "ts-api-utils": "^2.5.0"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "eslint": "*"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
}
},
"node_modules/@typescript-eslint/types": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz",
- "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==",
+ "version": "8.65.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.65.0.tgz",
+ "integrity": "sha512-JSSwWNy+H0E/01jJEM+hrX6N0OFDzFzeIhHFSAS01tlVaevpG8cFyYRPhS5yjGOvBUx3sqQHVMjCL1CAZZMxBg==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
@@ -714,86 +838,94 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz",
- "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==",
+ "version": "8.65.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.65.0.tgz",
+ "integrity": "sha512-JboAE2swaYt4tb1fHhHTABE2K+OLy09XfcTbhnk4Pw96f9dd2e9iYsJ28gBggHlo5z5x1rkyWvcPoTuNTd4oGg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "5.62.0",
- "@typescript-eslint/visitor-keys": "5.62.0",
- "debug": "^4.3.4",
- "globby": "^11.1.0",
- "is-glob": "^4.0.3",
- "semver": "^7.3.7",
- "tsutils": "^3.21.0"
+ "@typescript-eslint/project-service": "8.65.0",
+ "@typescript-eslint/tsconfig-utils": "8.65.0",
+ "@typescript-eslint/types": "8.65.0",
+ "@typescript-eslint/visitor-keys": "8.65.0",
+ "debug": "^4.4.3",
+ "minimatch": "^10.2.2",
+ "semver": "^7.7.3",
+ "tinyglobby": "^0.2.15",
+ "ts-api-utils": "^2.5.0"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.1.0"
}
},
"node_modules/@typescript-eslint/utils": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz",
- "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==",
+ "version": "8.65.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.65.0.tgz",
+ "integrity": "sha512-gXiwIHsYreboxeJucHKPvgwl7dXt50mF8s1/c00cP/WoVTyWKFdtfhRWwZiXYFU5H2O8vVoSLNrexFZjYS/SGA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@eslint-community/eslint-utils": "^4.2.0",
- "@types/json-schema": "^7.0.9",
- "@types/semver": "^7.3.12",
- "@typescript-eslint/scope-manager": "5.62.0",
- "@typescript-eslint/types": "5.62.0",
- "@typescript-eslint/typescript-estree": "5.62.0",
- "eslint-scope": "^5.1.1",
- "semver": "^7.3.7"
+ "@eslint-community/eslint-utils": "^4.9.1",
+ "@typescript-eslint/scope-manager": "8.65.0",
+ "@typescript-eslint/types": "8.65.0",
+ "@typescript-eslint/typescript-estree": "8.65.0"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
}
},
"node_modules/@typescript-eslint/visitor-keys": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz",
- "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==",
+ "version": "8.65.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.65.0.tgz",
+ "integrity": "sha512-8C71BQkGjiMmXtop7pHVJu1l2NNShFdkCyD6a2ezzs5vU/L3LRtb69EtcteFwz0mYMPzIgOw0n6OV4VBUWZd7A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "5.62.0",
- "eslint-visitor-keys": "^3.3.0"
+ "@typescript-eslint/types": "8.65.0",
+ "eslint-visitor-keys": "^5.0.0"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
- "node_modules/@ungap/structured-clone": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
- "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
- "dev": true
+ "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",
+ "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
},
"node_modules/acorn": {
- "version": "8.11.2",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz",
- "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==",
+ "version": "8.16.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",
+ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
"dev": true,
+ "license": "MIT",
"bin": {
"acorn": "bin/acorn"
},
@@ -806,15 +938,17 @@
"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==",
+ "version": "6.14.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz",
+ "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
@@ -826,136 +960,59 @@
"url": "https://github.com/sponsors/epoberezkin"
}
},
- "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,
- "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==",
+ "node_modules/as-float": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/as-float/-/as-float-1.0.1.tgz",
+ "integrity": "sha512-TsN1UpoFdtzuKXqqpdnGbFuMYnK/eqMEjd2xVvACG29H/v4KLx+UD+tHRz9v6zO+Ge/AR/uskSruBIPZrchhHw==",
"dev": true,
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
+ "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
- },
- "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==",
+ "node_modules/balanced-match": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": "18 || 20 || >=22"
}
},
- "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
- },
"node_modules/binaryen": {
- "version": "116.0.0-nightly.20231102",
- "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-116.0.0-nightly.20231102.tgz",
- "integrity": "sha512-aPU9tlKdw/gcXx6u4PxtDgOtGjg/ZKnYdk23ctYb70GxZgPhWnGWmnBt01aV5dt5yFFo2V4rbB7SzpSFhViFQA==",
+ "version": "131.0.0-nightly.20260721",
+ "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-131.0.0-nightly.20260721.tgz",
+ "integrity": "sha512-AAQIkhfbYXh4FBObwBrlO+5L+6Rp6OOMOjh6AdT0M+GLNLyrwKWgtW+EzmizNgx9CWDfTJPfDtKoZi62QESbtg==",
+ "license": "Apache-2.0",
"bin": {
+ "wasm-as": "bin/wasm-as",
+ "wasm-ctor-eval": "bin/wasm-ctor-eval",
+ "wasm-dis": "bin/wasm-dis",
+ "wasm-merge": "bin/wasm-merge",
+ "wasm-metadce": "bin/wasm-metadce",
"wasm-opt": "bin/wasm-opt",
+ "wasm-reduce": "bin/wasm-reduce",
+ "wasm-shell": "bin/wasm-shell",
"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,
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "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,
- "dependencies": {
- "fill-range": "^7.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "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,
- "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,
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "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==",
+ "version": "5.0.7",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
+ "integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "color-name": "~1.1.4"
+ "balanced-match": "^4.0.2"
},
"engines": {
- "node": ">=7.0.0"
+ "node": "18 || 20 || >=22"
}
},
- "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/concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
- "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==",
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
@@ -966,12 +1023,13 @@
}
},
"node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ms": "2.1.2"
+ "ms": "^2.1.3"
},
"engines": {
"node": ">=6.0"
@@ -986,88 +1044,59 @@
"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.1.0",
- "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz",
- "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==",
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-9.0.0.tgz",
+ "integrity": "sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw==",
"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==",
+ "node_modules/esbuild": {
+ "version": "0.28.1",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz",
+ "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==",
"dev": true,
- "dependencies": {
- "path-type": "^4.0.0"
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
},
"engines": {
- "node": ">=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,
- "dependencies": {
- "esutils": "^2.0.2"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/eastasianwidth": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
- "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
- "dev": true
- },
- "node_modules/emoji-regex": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
- "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
- "dev": true
- },
- "node_modules/esbuild": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz",
- "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==",
- "dev": true,
- "hasInstallScript": true,
- "bin": {
- "esbuild": "bin/esbuild"
- },
- "engines": {
- "node": ">=12"
+ "node": ">=18"
},
"optionalDependencies": {
- "@esbuild/android-arm": "0.19.5",
- "@esbuild/android-arm64": "0.19.5",
- "@esbuild/android-x64": "0.19.5",
- "@esbuild/darwin-arm64": "0.19.5",
- "@esbuild/darwin-x64": "0.19.5",
- "@esbuild/freebsd-arm64": "0.19.5",
- "@esbuild/freebsd-x64": "0.19.5",
- "@esbuild/linux-arm": "0.19.5",
- "@esbuild/linux-arm64": "0.19.5",
- "@esbuild/linux-ia32": "0.19.5",
- "@esbuild/linux-loong64": "0.19.5",
- "@esbuild/linux-mips64el": "0.19.5",
- "@esbuild/linux-ppc64": "0.19.5",
- "@esbuild/linux-riscv64": "0.19.5",
- "@esbuild/linux-s390x": "0.19.5",
- "@esbuild/linux-x64": "0.19.5",
- "@esbuild/netbsd-x64": "0.19.5",
- "@esbuild/openbsd-x64": "0.19.5",
- "@esbuild/sunos-x64": "0.19.5",
- "@esbuild/win32-arm64": "0.19.5",
- "@esbuild/win32-ia32": "0.19.5",
- "@esbuild/win32-x64": "0.19.5"
+ "@esbuild/aix-ppc64": "0.28.1",
+ "@esbuild/android-arm": "0.28.1",
+ "@esbuild/android-arm64": "0.28.1",
+ "@esbuild/android-x64": "0.28.1",
+ "@esbuild/darwin-arm64": "0.28.1",
+ "@esbuild/darwin-x64": "0.28.1",
+ "@esbuild/freebsd-arm64": "0.28.1",
+ "@esbuild/freebsd-x64": "0.28.1",
+ "@esbuild/linux-arm": "0.28.1",
+ "@esbuild/linux-arm64": "0.28.1",
+ "@esbuild/linux-ia32": "0.28.1",
+ "@esbuild/linux-loong64": "0.28.1",
+ "@esbuild/linux-mips64el": "0.28.1",
+ "@esbuild/linux-ppc64": "0.28.1",
+ "@esbuild/linux-riscv64": "0.28.1",
+ "@esbuild/linux-s390x": "0.28.1",
+ "@esbuild/linux-x64": "0.28.1",
+ "@esbuild/netbsd-arm64": "0.28.1",
+ "@esbuild/netbsd-x64": "0.28.1",
+ "@esbuild/openbsd-arm64": "0.28.1",
+ "@esbuild/openbsd-x64": "0.28.1",
+ "@esbuild/openharmony-arm64": "0.28.1",
+ "@esbuild/sunos-x64": "0.28.1",
+ "@esbuild/win32-arm64": "0.28.1",
+ "@esbuild/win32-ia32": "0.28.1",
+ "@esbuild/win32-x64": "0.28.1"
}
},
"node_modules/escape-string-regexp": {
@@ -1075,6 +1104,7 @@
"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"
},
@@ -1083,71 +1113,81 @@
}
},
"node_modules/eslint": {
- "version": "8.52.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz",
- "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==",
+ "version": "10.7.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.7.0.tgz",
+ "integrity": "sha512-GVTD7s1vdIl6UYvAfriOPeY1Df8LIZjfofLvHwde+erDHGGuHyuM6xoxRxmHiebhYuD2p1vN4wWh0XzPARSGDQ==",
"dev": true,
+ "license": "MIT",
+ "workspaces": [
+ "packages/*"
+ ],
"dependencies": {
- "@eslint-community/eslint-utils": "^4.2.0",
- "@eslint-community/regexpp": "^4.6.1",
- "@eslint/eslintrc": "^2.1.2",
- "@eslint/js": "8.52.0",
- "@humanwhocodes/config-array": "^0.11.13",
+ "@eslint-community/eslint-utils": "^4.8.0",
+ "@eslint-community/regexpp": "^4.12.2",
+ "@eslint/config-array": "^0.23.5",
+ "@eslint/config-helpers": "^0.6.0",
+ "@eslint/core": "^1.2.1",
+ "@eslint/plugin-kit": "^0.7.2",
+ "@humanfs/node": "^0.16.6",
"@humanwhocodes/module-importer": "^1.0.1",
- "@nodelib/fs.walk": "^1.2.8",
- "@ungap/structured-clone": "^1.2.0",
- "ajv": "^6.12.4",
- "chalk": "^4.0.0",
- "cross-spawn": "^7.0.2",
+ "@humanwhocodes/retry": "^0.4.2",
+ "@types/estree": "^1.0.6",
+ "ajv": "^6.14.0",
+ "cross-spawn": "^7.0.6",
"debug": "^4.3.2",
- "doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0",
- "eslint-scope": "^7.2.2",
- "eslint-visitor-keys": "^3.4.3",
- "espree": "^9.6.1",
- "esquery": "^1.4.2",
+ "eslint-scope": "^9.1.2",
+ "eslint-visitor-keys": "^5.0.1",
+ "espree": "^11.2.0",
+ "esquery": "^1.7.0",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
- "file-entry-cache": "^6.0.1",
+ "file-entry-cache": "^8.0.0",
"find-up": "^5.0.0",
"glob-parent": "^6.0.2",
- "globals": "^13.19.0",
- "graphemer": "^1.4.0",
"ignore": "^5.2.0",
"imurmurhash": "^0.1.4",
"is-glob": "^4.0.0",
- "is-path-inside": "^3.0.3",
- "js-yaml": "^4.1.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
- "levn": "^0.4.1",
- "lodash.merge": "^4.6.2",
- "minimatch": "^3.1.2",
+ "minimatch": "^10.2.4",
"natural-compare": "^1.4.0",
- "optionator": "^0.9.3",
- "strip-ansi": "^6.0.1",
- "text-table": "^0.2.0"
+ "optionator": "^0.9.3"
},
"bin": {
"eslint": "bin/eslint.js"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
},
"funding": {
- "url": "https://opencollective.com/eslint"
+ "url": "https://eslint.org/donate"
+ },
+ "peerDependencies": {
+ "jiti": "*"
+ },
+ "peerDependenciesMeta": {
+ "jiti": {
+ "optional": true
+ }
}
},
"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==",
+ "version": "9.1.2",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz",
+ "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==",
"dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
+ "@types/esrecurse": "^4.3.1",
+ "@types/estree": "^1.0.8",
"esrecurse": "^4.3.0",
- "estraverse": "^4.1.1"
+ "estraverse": "^5.2.0"
},
"engines": {
- "node": ">=8.0.0"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
}
},
"node_modules/eslint-visitor-keys": {
@@ -1155,6 +1195,7 @@
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
"integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
"dev": true,
+ "license": "Apache-2.0",
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
@@ -1162,53 +1203,56 @@
"url": "https://opencollective.com/eslint"
}
},
- "node_modules/eslint/node_modules/eslint-scope": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
- "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
+ "node_modules/eslint/node_modules/eslint-visitor-keys": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",
+ "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",
"dev": true,
- "dependencies": {
- "esrecurse": "^4.3.0",
- "estraverse": "^5.2.0"
- },
+ "license": "Apache-2.0",
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
},
"funding": {
"url": "https://opencollective.com/eslint"
}
},
- "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,
- "engines": {
- "node": ">=4.0"
- }
- },
"node_modules/espree": {
- "version": "9.6.1",
- "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
- "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
+ "version": "11.2.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz",
+ "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==",
"dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
- "acorn": "^8.9.0",
+ "acorn": "^8.16.0",
"acorn-jsx": "^5.3.2",
- "eslint-visitor-keys": "^3.4.1"
+ "eslint-visitor-keys": "^5.0.1"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/espree/node_modules/eslint-visitor-keys": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",
+ "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
},
"funding": {
"url": "https://opencollective.com/eslint"
}
},
"node_modules/esquery": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz",
- "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==",
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz",
+ "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==",
"dev": true,
+ "license": "BSD-3-Clause",
"dependencies": {
"estraverse": "^5.1.0"
},
@@ -1216,20 +1260,12 @@
"node": ">=0.10"
}
},
- "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,
- "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"
},
@@ -1237,20 +1273,12 @@
"node": ">=4.0"
}
},
- "node_modules/esrecurse/node_modules/estraverse": {
+ "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,
- "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"
}
@@ -1260,6 +1288,7 @@
"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"
}
@@ -1268,79 +1297,52 @@
"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
- },
- "node_modules/fast-glob": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
- "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
- "dev": true,
- "dependencies": {
- "@nodelib/fs.stat": "^2.0.2",
- "@nodelib/fs.walk": "^1.2.3",
- "glob-parent": "^5.1.2",
- "merge2": "^1.3.0",
- "micromatch": "^4.0.4"
- },
- "engines": {
- "node": ">=8.6.0"
- }
- },
- "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,
- "dependencies": {
- "is-glob": "^4.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
+ "license": "MIT"
},
"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": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
- "dev": true
- },
- "node_modules/fastq": {
- "version": "1.15.0",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
- "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
"dev": true,
- "dependencies": {
- "reusify": "^1.0.4"
- }
+ "license": "MIT"
},
- "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==",
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
"dev": true,
- "dependencies": {
- "flat-cache": "^3.0.4"
- },
+ "license": "MIT",
"engines": {
- "node": "^10.12.0 || >=12.0.0"
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
}
},
- "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==",
+ "node_modules/file-entry-cache": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",
+ "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "to-regex-range": "^5.0.1"
+ "flat-cache": "^4.0.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=16.0.0"
}
},
"node_modules/find-up": {
@@ -1348,6 +1350,7 @@
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
"integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"locate-path": "^6.0.0",
"path-exists": "^4.0.0"
@@ -1360,64 +1363,39 @@
}
},
"node_modules/flat-cache": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz",
- "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz",
+ "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"flatted": "^3.2.9",
- "keyv": "^4.5.3",
- "rimraf": "^3.0.2"
+ "keyv": "^4.5.4"
},
"engines": {
- "node": ">=12.0.0"
+ "node": ">=16"
}
},
"node_modules/flatted": {
- "version": "3.2.9",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz",
- "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==",
- "dev": true
- },
- "node_modules/foreground-child": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz",
- "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==",
+ "version": "3.4.2",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz",
+ "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==",
"dev": true,
- "dependencies": {
- "cross-spawn": "^7.0.0",
- "signal-exit": "^4.0.1"
- },
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
- "dev": true
+ "license": "ISC"
},
"node_modules/glob": {
- "version": "10.3.10",
- "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
- "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
+ "version": "13.0.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
+ "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
"dev": true,
+ "license": "BlueOak-1.0.0",
"dependencies": {
- "foreground-child": "^3.1.0",
- "jackspeak": "^2.3.5",
- "minimatch": "^9.0.1",
- "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
- "path-scurry": "^1.10.1"
- },
- "bin": {
- "glob": "dist/esm/bin.mjs"
+ "minimatch": "^10.2.2",
+ "minipass": "^7.1.3",
+ "path-scurry": "^2.0.2"
},
"engines": {
- "node": ">=16 || 14 >=14.17"
+ "node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
@@ -1428,6 +1406,7 @@
"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"
},
@@ -1435,153 +1414,55 @@
"node": ">=10.13.0"
}
},
- "node_modules/glob/node_modules/brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
- "dev": true,
- "dependencies": {
- "balanced-match": "^1.0.0"
- }
- },
- "node_modules/glob/node_modules/minimatch": {
- "version": "9.0.3",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
- "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
- "dev": true,
- "dependencies": {
- "brace-expansion": "^2.0.1"
- },
- "engines": {
- "node": ">=16 || 14 >=14.17"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/globals": {
- "version": "13.23.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz",
- "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==",
- "dev": true,
- "dependencies": {
- "type-fest": "^0.20.2"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/globby": {
- "version": "11.1.0",
- "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
- "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
+ "version": "17.7.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-17.7.0.tgz",
+ "integrity": "sha512-Czmyns5dUsq4seFBR/Kdydhmo8y9kC79hiSkPn0YcGtNnYWnrgt0vjrSjx9tspoDGWm2CMarffRuLjM4xUz8xg==",
"dev": true,
- "dependencies": {
- "array-union": "^2.1.0",
- "dir-glob": "^3.0.1",
- "fast-glob": "^3.2.9",
- "ignore": "^5.2.0",
- "merge2": "^1.4.1",
- "slash": "^3.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=10"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/graphemer": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
- "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
- "dev": true
- },
- "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,
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/ignore": {
- "version": "5.2.4",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
- "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
"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,
- "dependencies": {
- "parent-module": "^1.0.0",
- "resolve-from": "^4.0.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/imurmurhash": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
"integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
"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": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
- "dev": true,
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "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/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
- "node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
"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"
},
@@ -1589,83 +1470,40 @@
"node": ">=0.10.0"
}
},
- "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,
- "engines": {
- "node": ">=0.12.0"
- }
- },
- "node_modules/is-path-inside": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
- "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
- "dev": true
- },
- "node_modules/jackspeak": {
- "version": "2.3.6",
- "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz",
- "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==",
- "dev": true,
- "dependencies": {
- "@isaacs/cliui": "^8.0.2"
- },
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- },
- "optionalDependencies": {
- "@pkgjs/parseargs": "^0.11.0"
- }
- },
- "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,
- "dependencies": {
- "argparse": "^2.0.1"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
- }
+ "license": "ISC"
},
"node_modules/json-buffer": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
"integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"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": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/keyv": {
"version": "4.5.4",
"resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
"integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"json-buffer": "3.0.1"
}
@@ -1675,6 +1513,7 @@
"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"
@@ -1688,6 +1527,7 @@
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
"integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"p-locate": "^5.0.0"
},
@@ -1698,108 +1538,75 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "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
- },
"node_modules/long": {
- "version": "5.2.3",
- "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
- "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q=="
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz",
+ "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==",
+ "license": "Apache-2.0"
},
"node_modules/lru-cache": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz",
- "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==",
- "dev": true,
- "engines": {
- "node": "14 || >=16.14"
- }
- },
- "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,
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/micromatch": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
- "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "version": "11.2.7",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.7.tgz",
+ "integrity": "sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA==",
"dev": true,
- "dependencies": {
- "braces": "^3.0.2",
- "picomatch": "^2.3.1"
- },
+ "license": "BlueOak-1.0.0",
"engines": {
- "node": ">=8.6"
+ "node": "20 || >=22"
}
},
"node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "version": "10.2.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz",
+ "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==",
"dev": true,
+ "license": "BlueOak-1.0.0",
"dependencies": {
- "brace-expansion": "^1.1.7"
+ "brace-expansion": "^5.0.2"
},
"engines": {
- "node": "*"
+ "node": "18 || 20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/minipass": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz",
- "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==",
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
+ "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
"dev": true,
+ "license": "BlueOak-1.0.0",
"engines": {
"node": ">=16 || 14 >=14.17"
}
},
"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
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "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": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
- "dev": true
- },
- "node_modules/natural-compare-lite": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz",
- "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==",
- "dev": true
- },
- "node_modules/once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dev": true,
- "dependencies": {
- "wrappy": "1"
- }
+ "license": "MIT"
},
"node_modules/optionator": {
- "version": "0.9.3",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
- "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==",
+ "version": "0.9.4",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
+ "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@aashutoshrathi/word-wrap": "^1.2.3",
"deep-is": "^0.1.3",
"fast-levenshtein": "^2.0.6",
"levn": "^0.4.1",
"prelude-ls": "^1.2.1",
- "type-check": "^0.4.0"
+ "type-check": "^0.4.0",
+ "word-wrap": "^1.2.5"
},
"engines": {
"node": ">= 0.8.0"
@@ -1810,6 +1617,7 @@
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"yocto-queue": "^0.1.0"
},
@@ -1825,6 +1633,7 @@
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"p-limit": "^3.0.2"
},
@@ -1835,77 +1644,51 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "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,
- "dependencies": {
- "callsites": "^3.0.0"
- },
- "engines": {
- "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,
+ "license": "MIT",
"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": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
- "dev": true,
- "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-scurry": {
- "version": "1.10.1",
- "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",
- "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
+ "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==",
"dev": true,
+ "license": "BlueOak-1.0.0",
"dependencies": {
- "lru-cache": "^9.1.1 || ^10.0.0",
- "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
+ "lru-cache": "^11.0.0",
+ "minipass": "^7.1.2"
},
"engines": {
- "node": ">=16 || 14 >=14.17"
+ "node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
- "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,
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz",
+ "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8.6"
+ "node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
@@ -1916,6 +1699,7 @@
"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"
}
@@ -1925,115 +1709,17 @@
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
"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": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ]
- },
- "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,
- "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,
- "engines": {
- "iojs": ">=1.0.0",
- "node": ">=0.10.0"
- }
- },
- "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,
- "dependencies": {
- "glob": "^7.1.3"
- },
- "bin": {
- "rimraf": "bin.js"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/rimraf/node_modules/glob": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "dev": true,
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.1.1",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "engines": {
- "node": "*"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "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": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "dependencies": {
- "queue-microtask": "^1.2.2"
- }
- },
"node_modules/semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "version": "7.8.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
+ "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
"dev": true,
- "dependencies": {
- "lru-cache": "^6.0.0"
- },
+ "license": "ISC",
"bin": {
"semver": "bin/semver.js"
},
@@ -2041,23 +1727,12 @@
"node": ">=10"
}
},
- "node_modules/semver/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,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
"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"
},
@@ -2070,182 +1745,39 @@
"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": "4.1.0",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
- "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
- "dev": true,
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/slash": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/string-width": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
- "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
- "dev": true,
- "dependencies": {
- "eastasianwidth": "^0.2.0",
- "emoji-regex": "^9.2.2",
- "strip-ansi": "^7.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/string-width-cjs": {
- "name": "string-width",
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dev": true,
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/string-width-cjs/node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
- "node_modules/string-width/node_modules/ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
- }
- },
- "node_modules/string-width/node_modules/strip-ansi": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
- "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^6.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/strip-ansi?sponsor=1"
- }
- },
- "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,
- "dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-ansi-cjs": {
- "name": "strip-ansi",
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "node_modules/tinyglobby": {
+ "version": "0.2.17",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
+ "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-regex": "^5.0.1"
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.4"
},
"engines": {
- "node": ">=8"
- }
- },
- "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,
- "engines": {
- "node": ">=8"
+ "node": ">=12.0.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "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,
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "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": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
- "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,
- "dependencies": {
- "is-number": "^7.0.0"
- },
- "engines": {
- "node": ">=8.0"
+ "url": "https://github.com/sponsors/SuperchupuDev"
}
},
- "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
- },
- "node_modules/tsutils": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
- "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
+ "node_modules/ts-api-utils": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz",
+ "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==",
"dev": true,
- "dependencies": {
- "tslib": "^1.8.1"
- },
+ "license": "MIT",
"engines": {
- "node": ">= 6"
+ "node": ">=18.12"
},
"peerDependencies": {
- "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
+ "typescript": ">=4.8.4"
}
},
"node_modules/type-check": {
@@ -2253,6 +1785,7 @@
"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"
},
@@ -2260,42 +1793,57 @@
"node": ">= 0.8.0"
}
},
- "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,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/typescript": {
- "version": "4.7.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
- "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",
+ "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",
"dev": true,
+ "license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
- "node": ">=4.2.0"
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/typescript-eslint": {
+ "version": "8.65.0",
+ "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.65.0.tgz",
+ "integrity": "sha512-/ggrHAwyjENDusvyxbuqxAC2dTnZg/Z8F+fgQtYIz+L6n/9HfSlEZcFGV/NsMNa6CkGk0xUjUAFwC0vHOflvIA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/eslint-plugin": "8.65.0",
+ "@typescript-eslint/parser": "8.65.0",
+ "@typescript-eslint/typescript-estree": "8.65.0",
+ "@typescript-eslint/utils": "8.65.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
}
},
"node_modules/undici-types": {
- "version": "5.26.5",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
- "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
- "dev": true
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
+ "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",
+ "dev": true,
+ "license": "MIT"
},
"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"
}
@@ -2305,6 +1853,7 @@
"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"
},
@@ -2315,117 +1864,22 @@
"node": ">= 8"
}
},
- "node_modules/wrap-ansi": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
- "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
- "dev": true,
- "dependencies": {
- "ansi-styles": "^6.1.0",
- "string-width": "^5.0.1",
- "strip-ansi": "^7.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
- }
- },
- "node_modules/wrap-ansi-cjs": {
- "name": "wrap-ansi",
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
- "dev": true,
- "dependencies": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
- }
- },
- "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
- "node_modules/wrap-ansi-cjs/node_modules/string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dev": true,
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/wrap-ansi/node_modules/ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
- }
- },
- "node_modules/wrap-ansi/node_modules/ansi-styles": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
- "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/wrap-ansi/node_modules/strip-ansi": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
- "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "node_modules/word-wrap": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
+ "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
"dev": true,
- "dependencies": {
- "ansi-regex": "^6.0.1"
- },
+ "license": "MIT",
"engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ "node": ">=0.10.0"
}
},
- "node_modules/wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
- "dev": true
- },
- "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
- },
"node_modules/yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=10"
},
@@ -2433,1607 +1887,5 @@
"url": "https://github.com/sponsors/sindresorhus"
}
}
- },
- "dependencies": {
- "@aashutoshrathi/word-wrap": {
- "version": "1.2.6",
- "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",
- "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",
- "dev": true
- },
- "@esbuild/android-arm": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz",
- "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==",
- "dev": true,
- "optional": true
- },
- "@esbuild/android-arm64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz",
- "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==",
- "dev": true,
- "optional": true
- },
- "@esbuild/android-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz",
- "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==",
- "dev": true,
- "optional": true
- },
- "@esbuild/darwin-arm64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz",
- "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==",
- "dev": true,
- "optional": true
- },
- "@esbuild/darwin-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz",
- "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==",
- "dev": true,
- "optional": true
- },
- "@esbuild/freebsd-arm64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz",
- "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==",
- "dev": true,
- "optional": true
- },
- "@esbuild/freebsd-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz",
- "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-arm": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz",
- "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-arm64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz",
- "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-ia32": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz",
- "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-loong64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz",
- "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-mips64el": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz",
- "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-ppc64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz",
- "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-riscv64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz",
- "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-s390x": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz",
- "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz",
- "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==",
- "dev": true,
- "optional": true
- },
- "@esbuild/netbsd-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz",
- "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==",
- "dev": true,
- "optional": true
- },
- "@esbuild/openbsd-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz",
- "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==",
- "dev": true,
- "optional": true
- },
- "@esbuild/sunos-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz",
- "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==",
- "dev": true,
- "optional": true
- },
- "@esbuild/win32-arm64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz",
- "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==",
- "dev": true,
- "optional": true
- },
- "@esbuild/win32-ia32": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz",
- "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==",
- "dev": true,
- "optional": true
- },
- "@esbuild/win32-x64": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz",
- "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==",
- "dev": true,
- "optional": true
- },
- "@eslint-community/eslint-utils": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
- "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
- "dev": true,
- "requires": {
- "eslint-visitor-keys": "^3.3.0"
- }
- },
- "@eslint-community/regexpp": {
- "version": "4.10.0",
- "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz",
- "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==",
- "dev": true
- },
- "@eslint/eslintrc": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz",
- "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==",
- "dev": true,
- "requires": {
- "ajv": "^6.12.4",
- "debug": "^4.3.2",
- "espree": "^9.6.0",
- "globals": "^13.19.0",
- "ignore": "^5.2.0",
- "import-fresh": "^3.2.1",
- "js-yaml": "^4.1.0",
- "minimatch": "^3.1.2",
- "strip-json-comments": "^3.1.1"
- }
- },
- "@eslint/js": {
- "version": "8.52.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz",
- "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==",
- "dev": true
- },
- "@humanwhocodes/config-array": {
- "version": "0.11.13",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz",
- "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==",
- "dev": true,
- "requires": {
- "@humanwhocodes/object-schema": "^2.0.1",
- "debug": "^4.1.1",
- "minimatch": "^3.0.5"
- }
- },
- "@humanwhocodes/module-importer": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
- "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
- "dev": true
- },
- "@humanwhocodes/object-schema": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz",
- "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==",
- "dev": true
- },
- "@isaacs/cliui": {
- "version": "8.0.2",
- "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
- "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
- "dev": true,
- "requires": {
- "string-width": "^5.1.2",
- "string-width-cjs": "npm:string-width@^4.2.0",
- "strip-ansi": "^7.0.1",
- "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
- "wrap-ansi": "^8.1.0",
- "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "dev": true
- },
- "strip-ansi": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
- "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
- "dev": true,
- "requires": {
- "ansi-regex": "^6.0.1"
- }
- }
- }
- },
- "@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",
- "run-parallel": "^1.1.9"
- }
- },
- "@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",
- "fastq": "^1.6.0"
- }
- },
- "@pkgjs/parseargs": {
- "version": "0.11.0",
- "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
- "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
- "dev": true,
- "optional": true
- },
- "@types/json-schema": {
- "version": "7.0.14",
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.14.tgz",
- "integrity": "sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==",
- "dev": true
- },
- "@types/node": {
- "version": "18.18.8",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.8.tgz",
- "integrity": "sha512-OLGBaaK5V3VRBS1bAkMVP2/W9B+H8meUfl866OrMNQqt7wDgdpWPp5o6gmIc9pB+lIQHSq4ZL8ypeH1vPxcPaQ==",
- "dev": true,
- "requires": {
- "undici-types": "~5.26.4"
- }
- },
- "@types/semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==",
- "dev": true
- },
- "@typescript-eslint/eslint-plugin": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz",
- "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==",
- "dev": true,
- "requires": {
- "@eslint-community/regexpp": "^4.4.0",
- "@typescript-eslint/scope-manager": "5.62.0",
- "@typescript-eslint/type-utils": "5.62.0",
- "@typescript-eslint/utils": "5.62.0",
- "debug": "^4.3.4",
- "graphemer": "^1.4.0",
- "ignore": "^5.2.0",
- "natural-compare-lite": "^1.4.0",
- "semver": "^7.3.7",
- "tsutils": "^3.21.0"
- }
- },
- "@typescript-eslint/parser": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz",
- "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==",
- "dev": true,
- "requires": {
- "@typescript-eslint/scope-manager": "5.62.0",
- "@typescript-eslint/types": "5.62.0",
- "@typescript-eslint/typescript-estree": "5.62.0",
- "debug": "^4.3.4"
- }
- },
- "@typescript-eslint/scope-manager": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz",
- "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==",
- "dev": true,
- "requires": {
- "@typescript-eslint/types": "5.62.0",
- "@typescript-eslint/visitor-keys": "5.62.0"
- }
- },
- "@typescript-eslint/type-utils": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz",
- "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==",
- "dev": true,
- "requires": {
- "@typescript-eslint/typescript-estree": "5.62.0",
- "@typescript-eslint/utils": "5.62.0",
- "debug": "^4.3.4",
- "tsutils": "^3.21.0"
- }
- },
- "@typescript-eslint/types": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz",
- "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==",
- "dev": true
- },
- "@typescript-eslint/typescript-estree": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz",
- "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==",
- "dev": true,
- "requires": {
- "@typescript-eslint/types": "5.62.0",
- "@typescript-eslint/visitor-keys": "5.62.0",
- "debug": "^4.3.4",
- "globby": "^11.1.0",
- "is-glob": "^4.0.3",
- "semver": "^7.3.7",
- "tsutils": "^3.21.0"
- }
- },
- "@typescript-eslint/utils": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz",
- "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==",
- "dev": true,
- "requires": {
- "@eslint-community/eslint-utils": "^4.2.0",
- "@types/json-schema": "^7.0.9",
- "@types/semver": "^7.3.12",
- "@typescript-eslint/scope-manager": "5.62.0",
- "@typescript-eslint/types": "5.62.0",
- "@typescript-eslint/typescript-estree": "5.62.0",
- "eslint-scope": "^5.1.1",
- "semver": "^7.3.7"
- }
- },
- "@typescript-eslint/visitor-keys": {
- "version": "5.62.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz",
- "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==",
- "dev": true,
- "requires": {
- "@typescript-eslint/types": "5.62.0",
- "eslint-visitor-keys": "^3.3.0"
- }
- },
- "@ungap/structured-clone": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
- "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
- "dev": true
- },
- "acorn": {
- "version": "8.11.2",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz",
- "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==",
- "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",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
- }
- },
- "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"
- }
- },
- "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": "116.0.0-nightly.20231102",
- "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-116.0.0-nightly.20231102.tgz",
- "integrity": "sha512-aPU9tlKdw/gcXx6u4PxtDgOtGjg/ZKnYdk23ctYb70GxZgPhWnGWmnBt01aV5dt5yFFo2V4rbB7SzpSFhViFQA=="
- },
- "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",
- "concat-map": "0.0.1"
- }
- },
- "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"
- }
- },
- "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",
- "supports-color": "^7.1.0"
- }
- },
- "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"
- }
- },
- "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": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
- "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",
- "shebang-command": "^2.0.0",
- "which": "^2.0.1"
- }
- },
- "debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
- "dev": true,
- "requires": {
- "ms": "2.1.2"
- }
- },
- "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.1.0",
- "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz",
- "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==",
- "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"
- }
- },
- "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"
- }
- },
- "eastasianwidth": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
- "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
- "dev": true
- },
- "emoji-regex": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
- "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
- "dev": true
- },
- "esbuild": {
- "version": "0.19.5",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz",
- "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==",
- "dev": true,
- "requires": {
- "@esbuild/android-arm": "0.19.5",
- "@esbuild/android-arm64": "0.19.5",
- "@esbuild/android-x64": "0.19.5",
- "@esbuild/darwin-arm64": "0.19.5",
- "@esbuild/darwin-x64": "0.19.5",
- "@esbuild/freebsd-arm64": "0.19.5",
- "@esbuild/freebsd-x64": "0.19.5",
- "@esbuild/linux-arm": "0.19.5",
- "@esbuild/linux-arm64": "0.19.5",
- "@esbuild/linux-ia32": "0.19.5",
- "@esbuild/linux-loong64": "0.19.5",
- "@esbuild/linux-mips64el": "0.19.5",
- "@esbuild/linux-ppc64": "0.19.5",
- "@esbuild/linux-riscv64": "0.19.5",
- "@esbuild/linux-s390x": "0.19.5",
- "@esbuild/linux-x64": "0.19.5",
- "@esbuild/netbsd-x64": "0.19.5",
- "@esbuild/openbsd-x64": "0.19.5",
- "@esbuild/sunos-x64": "0.19.5",
- "@esbuild/win32-arm64": "0.19.5",
- "@esbuild/win32-ia32": "0.19.5",
- "@esbuild/win32-x64": "0.19.5"
- }
- },
- "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.52.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz",
- "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==",
- "dev": true,
- "requires": {
- "@eslint-community/eslint-utils": "^4.2.0",
- "@eslint-community/regexpp": "^4.6.1",
- "@eslint/eslintrc": "^2.1.2",
- "@eslint/js": "8.52.0",
- "@humanwhocodes/config-array": "^0.11.13",
- "@humanwhocodes/module-importer": "^1.0.1",
- "@nodelib/fs.walk": "^1.2.8",
- "@ungap/structured-clone": "^1.2.0",
- "ajv": "^6.12.4",
- "chalk": "^4.0.0",
- "cross-spawn": "^7.0.2",
- "debug": "^4.3.2",
- "doctrine": "^3.0.0",
- "escape-string-regexp": "^4.0.0",
- "eslint-scope": "^7.2.2",
- "eslint-visitor-keys": "^3.4.3",
- "espree": "^9.6.1",
- "esquery": "^1.4.2",
- "esutils": "^2.0.2",
- "fast-deep-equal": "^3.1.3",
- "file-entry-cache": "^6.0.1",
- "find-up": "^5.0.0",
- "glob-parent": "^6.0.2",
- "globals": "^13.19.0",
- "graphemer": "^1.4.0",
- "ignore": "^5.2.0",
- "imurmurhash": "^0.1.4",
- "is-glob": "^4.0.0",
- "is-path-inside": "^3.0.3",
- "js-yaml": "^4.1.0",
- "json-stable-stringify-without-jsonify": "^1.0.1",
- "levn": "^0.4.1",
- "lodash.merge": "^4.6.2",
- "minimatch": "^3.1.2",
- "natural-compare": "^1.4.0",
- "optionator": "^0.9.3",
- "strip-ansi": "^6.0.1",
- "text-table": "^0.2.0"
- },
- "dependencies": {
- "eslint-scope": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
- "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
- "dev": true,
- "requires": {
- "esrecurse": "^4.3.0",
- "estraverse": "^5.2.0"
- }
- },
- "estraverse": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
- "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
- "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",
- "estraverse": "^4.1.1"
- }
- },
- "eslint-visitor-keys": {
- "version": "3.4.3",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
- "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
- "dev": true
- },
- "espree": {
- "version": "9.6.1",
- "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
- "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
- "dev": true,
- "requires": {
- "acorn": "^8.9.0",
- "acorn-jsx": "^5.3.2",
- "eslint-visitor-keys": "^3.4.1"
- }
- },
- "esquery": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz",
- "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==",
- "dev": true,
- "requires": {
- "estraverse": "^5.1.0"
- },
- "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"
- },
- "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": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
- "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
- "dev": true,
- "requires": {
- "@nodelib/fs.stat": "^2.0.2",
- "@nodelib/fs.walk": "^1.2.3",
- "glob-parent": "^5.1.2",
- "merge2": "^1.3.0",
- "micromatch": "^4.0.4"
- },
- "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"
- }
- }
- }
- },
- "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": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
- "dev": true
- },
- "fastq": {
- "version": "1.15.0",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
- "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
- "dev": true,
- "requires": {
- "reusify": "^1.0.4"
- }
- },
- "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"
- }
- },
- "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": "5.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
- "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
- "dev": true,
- "requires": {
- "locate-path": "^6.0.0",
- "path-exists": "^4.0.0"
- }
- },
- "flat-cache": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz",
- "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==",
- "dev": true,
- "requires": {
- "flatted": "^3.2.9",
- "keyv": "^4.5.3",
- "rimraf": "^3.0.2"
- }
- },
- "flatted": {
- "version": "3.2.9",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz",
- "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==",
- "dev": true
- },
- "foreground-child": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz",
- "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==",
- "dev": true,
- "requires": {
- "cross-spawn": "^7.0.0",
- "signal-exit": "^4.0.1"
- }
- },
- "fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
- "dev": true
- },
- "glob": {
- "version": "10.3.10",
- "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
- "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
- "dev": true,
- "requires": {
- "foreground-child": "^3.1.0",
- "jackspeak": "^2.3.5",
- "minimatch": "^9.0.1",
- "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
- "path-scurry": "^1.10.1"
- },
- "dependencies": {
- "brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
- "dev": true,
- "requires": {
- "balanced-match": "^1.0.0"
- }
- },
- "minimatch": {
- "version": "9.0.3",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
- "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
- "dev": true,
- "requires": {
- "brace-expansion": "^2.0.1"
- }
- }
- }
- },
- "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"
- }
- },
- "globals": {
- "version": "13.23.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz",
- "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==",
- "dev": true,
- "requires": {
- "type-fest": "^0.20.2"
- }
- },
- "globby": {
- "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.2.9",
- "ignore": "^5.2.0",
- "merge2": "^1.4.1",
- "slash": "^3.0.0"
- }
- },
- "graphemer": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
- "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
- "dev": true
- },
- "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.2.4",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
- "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
- "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"
- }
- },
- "imurmurhash": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
- "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
- "dev": true
- },
- "inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
- "dev": true,
- "requires": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "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": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "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"
- }
- },
- "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-path-inside": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
- "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
- "dev": true
- },
- "isexe": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
- "dev": true
- },
- "jackspeak": {
- "version": "2.3.6",
- "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz",
- "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==",
- "dev": true,
- "requires": {
- "@isaacs/cliui": "^8.0.2",
- "@pkgjs/parseargs": "^0.11.0"
- }
- },
- "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"
- }
- },
- "json-buffer": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
- "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
- "dev": 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": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
- "dev": true
- },
- "keyv": {
- "version": "4.5.4",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
- "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
- "dev": true,
- "requires": {
- "json-buffer": "3.0.1"
- }
- },
- "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",
- "type-check": "~0.4.0"
- }
- },
- "locate-path": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
- "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
- "dev": true,
- "requires": {
- "p-locate": "^5.0.0"
- }
- },
- "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.2.3",
- "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
- "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q=="
- },
- "lru-cache": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz",
- "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==",
- "dev": 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.5",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
- "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
- "dev": true,
- "requires": {
- "braces": "^3.0.2",
- "picomatch": "^2.3.1"
- }
- },
- "minimatch": {
- "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"
- }
- },
- "minipass": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz",
- "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==",
- "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": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
- "dev": true
- },
- "natural-compare-lite": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz",
- "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==",
- "dev": true
- },
- "once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "dev": true,
- "requires": {
- "wrappy": "1"
- }
- },
- "optionator": {
- "version": "0.9.3",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
- "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==",
- "dev": true,
- "requires": {
- "@aashutoshrathi/word-wrap": "^1.2.3",
- "deep-is": "^0.1.3",
- "fast-levenshtein": "^2.0.6",
- "levn": "^0.4.1",
- "prelude-ls": "^1.2.1",
- "type-check": "^0.4.0"
- }
- },
- "p-limit": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
- "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
- "dev": true,
- "requires": {
- "yocto-queue": "^0.1.0"
- }
- },
- "p-locate": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
- "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
- "dev": true,
- "requires": {
- "p-limit": "^3.0.2"
- }
- },
- "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": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
- "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-scurry": {
- "version": "1.10.1",
- "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",
- "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",
- "dev": true,
- "requires": {
- "lru-cache": "^9.1.1 || ^10.0.0",
- "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
- }
- },
- "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
- },
- "picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "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
- },
- "punycode": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
- "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
- "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
- },
- "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"
- },
- "dependencies": {
- "glob": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.1.1",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- }
- }
- },
- "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"
- }
- },
- "semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
- "dev": true,
- "requires": {
- "lru-cache": "^6.0.0"
- },
- "dependencies": {
- "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"
- }
- }
- }
- },
- "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"
- }
- },
- "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": "4.1.0",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
- "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
- "dev": true
- },
- "slash": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
- "dev": true
- },
- "string-width": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
- "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
- "dev": true,
- "requires": {
- "eastasianwidth": "^0.2.0",
- "emoji-regex": "^9.2.2",
- "strip-ansi": "^7.0.1"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "dev": true
- },
- "strip-ansi": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
- "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
- "dev": true,
- "requires": {
- "ansi-regex": "^6.0.1"
- }
- }
- }
- },
- "string-width-cjs": {
- "version": "npm:string-width@4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dev": true,
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "dependencies": {
- "emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- }
- }
- },
- "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-ansi-cjs": {
- "version": "npm:strip-ansi@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-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"
- }
- },
- "text-table": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
- "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
- "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"
- }
- },
- "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"
- }
- },
- "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"
- }
- },
- "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.7.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
- "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
- "dev": true
- },
- "undici-types": {
- "version": "5.26.5",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
- "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
- "dev": true
- },
- "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"
- }
- },
- "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"
- }
- },
- "wrap-ansi": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
- "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
- "dev": true,
- "requires": {
- "ansi-styles": "^6.1.0",
- "string-width": "^5.0.1",
- "strip-ansi": "^7.0.1"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "dev": true
- },
- "ansi-styles": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
- "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
- "dev": true
- },
- "strip-ansi": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
- "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
- "dev": true,
- "requires": {
- "ansi-regex": "^6.0.1"
- }
- }
- }
- },
- "wrap-ansi-cjs": {
- "version": "npm:wrap-ansi@7.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- },
- "dependencies": {
- "emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
- "string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dev": true,
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- }
- }
- }
- },
- "wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
- "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
- },
- "yocto-queue": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
- "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
- "dev": true
- }
}
}
diff --git a/package.json b/package.json
index 38e4f49ab1..869f93b294 100644
--- a/package.json
+++ b/package.json
@@ -20,23 +20,25 @@
"url": "https://github.com/AssemblyScript/assemblyscript/issues"
},
"engines": {
- "node": ">=16",
- "npm": ">=7"
+ "node": ">=20",
+ "npm": ">=10"
},
"engineStrict": true,
"dependencies": {
- "binaryen": "116.0.0-nightly.20231102",
- "long": "^5.2.1"
+ "binaryen": "131.0.0-nightly.20260721",
+ "long": "^5.2.4"
},
"devDependencies": {
- "@types/node": "^18.13.0",
- "@typescript-eslint/eslint-plugin": "^5.51.0",
- "@typescript-eslint/parser": "^5.51.0",
- "diff": "^5.1.0",
- "esbuild": "^0.19.4",
- "eslint": "^8.33.0",
- "glob": "^10.3.0",
- "typescript": "~4.7.4"
+ "@eslint/js": "^10.0.1",
+ "@types/node": "^26.1.1",
+ "as-float": "^1.0.1",
+ "diff": "^9.0.0",
+ "esbuild": "^0.28.1",
+ "eslint": "^10.7.0",
+ "glob": "^13.0.6",
+ "globals": "^17.7.0",
+ "typescript": "^6.0.3",
+ "typescript-eslint": "^8.65.0"
},
"type": "module",
"exports": {
@@ -50,8 +52,8 @@
},
"./transform": {
"import": "./dist/transform.js",
- "require": "./dist/transform.cjs",
- "types": "./dist/transform.d.ts"
+ "types": "./dist/transform.d.ts",
+ "require": "./dist/transform.cjs"
},
"./binaryen": {
"import": "./lib/binaryen.js",
@@ -72,12 +74,12 @@
"scripts": {
"check": "npm run check:config && npm run check:import && npm run lint",
"check:config": "tsc --noEmit -p src --diagnostics --listFiles",
- "check:import": "tsc --noEmit --target ESNEXT --module nodenext --moduleResolution nodenext --experimentalDecorators tests/import/index",
+ "check:import": "tsc --noEmit --skipLibCheck --target ESNEXT --module nodenext --moduleResolution nodenext --experimentalDecorators tests/import/index",
"lint": "eslint --max-warnings 0 --ext js . && eslint --max-warnings 0 --ext ts .",
"build": "node scripts/build",
"watch": "node scripts/build --watch",
"coverage": "npx c8 -- npm test",
- "test": "npm run test:parser && npm run test:compiler -- --parallel && npm run test:browser && 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 && npm run test:cli",
"test:parser": "node --enable-source-maps tests/parser",
"test:compiler": "node --enable-source-maps --no-warnings tests/compiler",
"test:browser": "node --enable-source-maps tests/browser",
@@ -85,6 +87,7 @@
"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",
+ "test:cli": "node tests/cli/options.js",
"asbuild": "npm run asbuild:debug && npm run asbuild:release",
"asbuild:debug": "node bin/asc --config src/asconfig.json --target debug",
"asbuild:release": "node bin/asc --config src/asconfig.json --target release",
diff --git a/scripts/build-dts.js b/scripts/build-dts.js
index 07215c9be9..979db546a9 100644
--- a/scripts/build-dts.js
+++ b/scripts/build-dts.js
@@ -319,9 +319,11 @@ const prefix = "types:assemblyscript";
export function generateSrc() {
const stdout = [];
+ const pathToSources = pathUtil.resolve(__dirname, "..", "src");
generate({
- project: pathUtil.resolve(__dirname, "..", "src"),
+ project: pathToSources,
+ baseDir: pathToSources,
prefix,
exclude: [
"glue/**",
@@ -373,9 +375,13 @@ export function generateCli() {
prefix,
stdout,
resolveModuleImport: ({ importedModuleId, currentModuleId }) => {
- return currentModuleId == "cli/index" && importedModuleId == "../src"
- ? prefix + "/src/index"
- : null;
+ if (currentModuleId == "cli/index" && importedModuleId == "../src")
+ return prefix + "/src/index";
+
+ if (importedModuleId == "binaryen")
+ return "binaryen";
+
+ return null;
},
});
diff --git a/scripts/build-web.js b/scripts/build-web.js
index fb703a7e24..8ffb3765d9 100644
--- a/scripts/build-web.js
+++ b/scripts/build-web.js
@@ -8,8 +8,8 @@ export function buildWeb() {
const pkg = JSON.parse(fs.readFileSync(join(__dirname, "../package-lock.json")));
const mainVersion = pkg.version;
- const binaryenVersion = pkg.dependencies.binaryen.version;
- const longVersion = pkg.dependencies.long.version;
+ const binaryenVersion = pkg.packages["node_modules/binaryen"].version || pkg.dependencies.binaryen.version;
+ const longVersion = pkg.packages["node_modules/long"].version || pkg.dependencies.long.version;
const distUrl = mainVersion === "0.0.0" ? `./` : `https://cdn.jsdelivr.net/npm/assemblyscript@${mainVersion}/dist/`;
const binaryenUrl = `https://cdn.jsdelivr.net/npm/binaryen@${binaryenVersion}/index.js`;
diff --git a/scripts/build.js b/scripts/build.js
index ecf0a0f0b3..e8496cff23 100644
--- a/scripts/build.js
+++ b/scripts/build.js
@@ -182,7 +182,6 @@ const webPlugin = {
const duration = Date.now() - startTime;
console.log(`${time()} - web - ${stdoutColors.green("SUCCESS")} (no errors, ${duration} ms)`);
- process.exitCode = 0;
} catch (e) {
const duration = Date.now() - startTime;
console.error(e);
@@ -256,7 +255,6 @@ function buildDefinitions() {
const duration = Date.now() - startTime;
console.log(`${time()} - dts - ${stdoutColors.green("SUCCESS")} (no errors, ${duration} ms)`);
- process.exitCode = 0;
} catch (e) {
const duration = Date.now() - startTime;
console.error(e);
diff --git a/scripts/unicode-identifier.js b/scripts/unicode-identifier.js
index 5984ff8708..d9788b9502 100644
--- a/scripts/unicode-identifier.js
+++ b/scripts/unicode-identifier.js
@@ -1,4 +1,4 @@
-// see https://github.com/microsoft/TypeScript/blob/main/scripts/regenerate-unicode-identifier-parts.js
+// see https://github.com/microsoft/TypeScript/blob/main/scripts/regenerate-unicode-identifier-parts.mjs
const MAX_UNICODE_CODEPOINT = 0x10FFFF;
const isStart = c => /[\p{ID_Start}\u{2118}\u{212E}\u{309B}\u{309C}]/u.test(c); // Other_ID_Start explicitly included for back compat - see http://www.unicode.org/reports/tr31/#Introduction
diff --git a/src/ast.ts b/src/ast.ts
index da2271ef3d..da649de549 100644
--- a/src/ast.ts
+++ b/src/ast.ts
@@ -18,7 +18,6 @@ import {
CommonFlags,
PATH_DELIMITER,
LIBRARY_PREFIX,
- LIBRARY_SUBST
} from "./common";
import {
@@ -51,6 +50,7 @@ export const enum NodeKind {
// types
NamedType,
FunctionType,
+ TupleType,
TypeName,
TypeParameter,
Parameter,
@@ -162,6 +162,15 @@ export abstract class Node {
return new FunctionTypeNode(parameters, returnType, explicitThisType, isNullable, range);
}
+ static createTupleType(
+ elements: TypeNode[],
+ elementNames: (IdentifierExpression | null)[] | null,
+ isNullable: bool,
+ range: Range
+ ): TupleTypeNode {
+ return new TupleTypeNode(elements, elementNames, isNullable, range);
+ }
+
static createOmittedType(
range: Range
): NamedTypeNode {
@@ -863,6 +872,12 @@ export abstract class TypeNode extends Node {
if (functionTypeNode.returnType.hasGenericComponent(typeParameterNodes)) return true;
let explicitThisType = functionTypeNode.explicitThisType;
if (explicitThisType && explicitThisType.hasGenericComponent(typeParameterNodes)) return true;
+ } else if (this.kind == NodeKind.TupleType) {
+ let tupleTypeNode = changetype(this);
+ let elements = tupleTypeNode.elements;
+ for (let i = 0, k = elements.length; i < k; ++i) {
+ if (elements[i].hasGenericComponent(typeParameterNodes)) return true;
+ }
} else {
assert(false);
}
@@ -929,6 +944,22 @@ export class FunctionTypeNode extends TypeNode {
}
}
+/** Represents a tuple type. */
+export class TupleTypeNode extends TypeNode {
+ constructor(
+ /** Tuple elements. */
+ public elements: TypeNode[],
+ /** Tuple element names, if any. */
+ public elementNames: (IdentifierExpression | null)[] | null,
+ /** Whether nullable or not. */
+ isNullable: bool,
+ /** Source range. */
+ range: Range
+ ) {
+ super(NodeKind.TupleType, isNullable, range);
+ }
+}
+
/** Represents a type parameter. */
export class TypeParameterNode extends Node {
constructor(
@@ -1668,7 +1699,7 @@ export class Source extends Node {
/** Checks if this source represents native code. */
get isNative(): bool {
- return this.internalPath == LIBRARY_SUBST;
+ return this == Source._native;
}
/** Checks if this source is part of the (standard) library. */
diff --git a/src/bindings/js.ts b/src/bindings/js.ts
index a86f77dec4..456b2f79ac 100644
--- a/src/bindings/js.ts
+++ b/src/bindings/js.ts
@@ -554,18 +554,10 @@ export class JSBuilder extends ExportsWalker {
continue;
}
let resetPos = sb.length;
- sb.push(": Object.assign(Object.create(");
- if (moduleName == "env") {
- sb.push("globalThis");
- } else {
- sb.push("__module");
- sb.push(moduleId.toString());
- }
- sb.push("), ");
- if (moduleName == "env") {
- sb.push("imports.env || {}, ");
- }
- sb.push("{\n");
+
+ // Use Object.setPrototypeOf to avoid issues with read-only properties
+ // on module objects created by bundlers (issue #2659)
+ sb.push(": Object.setPrototypeOf({\n");
++this.indentLevel;
let numInstrumented = 0;
for (let _keys2 = Map_keys(module), j = 0, l = _keys2.length; j < l; ++j) {
@@ -598,7 +590,15 @@ export class JSBuilder extends ExportsWalker {
sb.push(",\n");
} else {
indent(sb, this.indentLevel);
- sb.push("}),\n");
+ sb.push("}, ");
+ if (moduleName == "env") {
+ // TODO: If necessary, use "Object.setPrototypeOf(Object.assign({}, imports.env || {}), globalThis)"
+ sb.push("Object.assign(Object.create(globalThis), imports.env || {})");
+ } else {
+ sb.push("__module");
+ sb.push(moduleId.toString());
+ }
+ sb.push("),\n");
}
}
--this.indentLevel;
@@ -976,8 +976,9 @@ export class JSBuilder extends ExportsWalker {
}
sb.push(`} = await (async url => instantiate(
await (async () => {
- try { return await globalThis.WebAssembly.compileStreaming(globalThis.fetch(url)); }
- catch { return globalThis.WebAssembly.compile(await (await import("node:fs/promises")).readFile(url)); }
+ const isNodeOrBun = typeof process != "undefined" && process.versions != null && (process.versions.node != null || process.versions.bun != null);
+ if (isNodeOrBun) { return globalThis.WebAssembly.compile(await (await import("node:fs/promises")).readFile(url)); }
+ else { return await globalThis.WebAssembly.compileStreaming(globalThis.fetch(url)); }
})(), {
`);
let needsMaybeDefault = false;
diff --git a/src/builtins.ts b/src/builtins.ts
index e9f563e1e6..f876049603 100644
--- a/src/builtins.ts
+++ b/src/builtins.ts
@@ -43,7 +43,8 @@ import {
NodeKind,
LiteralExpression,
ArrayLiteralExpression,
- IdentifierExpression
+ IdentifierExpression,
+ NamedTypeNode
} from "./ast";
import {
@@ -85,7 +86,9 @@ import {
DecoratorFlags,
Class,
PropertyPrototype,
- VariableLikeElement
+ VariableLikeElement,
+ Element,
+ OperatorKind
} from "./program";
import {
@@ -94,11 +97,13 @@ import {
} from "./flow";
import {
- ReportMode
+ ReportMode,
+ Resolver
} from "./resolver";
import {
CommonFlags,
+ CommonNames,
Feature,
featureToString,
TypeinfoFlags
@@ -191,6 +196,7 @@ export namespace BuiltinNames {
export const assert = "~lib/builtins/assert";
export const call_indirect = "~lib/builtins/call_indirect";
export const unchecked = "~lib/builtins/unchecked";
+ export const inline_always = "~lib/builtins/inline.always";
export const instantiate = "~lib/builtins/instantiate";
export const idof = "~lib/builtins/idof";
@@ -767,6 +773,17 @@ export namespace BuiltinNames {
export const Object = "~lib/object/Object";
}
+/** Builtin types context. */
+export class BuiltinTypesContext {
+ constructor(
+ public resolver: Resolver,
+ public node: NamedTypeNode,
+ public ctxElement: Element,
+ public ctxTypes: Map | null,
+ public reportMode: ReportMode
+ ) {}
+}
+
/** Builtin variable compilation context. */
export class BuiltinVariableContext {
constructor(
@@ -803,6 +820,9 @@ export class BuiltinFunctionContext {
) {}
}
+/** Builtin types map. */
+export const builtinTypes = new Map Type | null>();
+
/** Builtin functions map. */
export const builtinFunctions = new Map ExpressionRef>();
@@ -810,6 +830,142 @@ export const builtinFunctions = new Map
export const builtinVariables_onCompile = new Map void>();
export const builtinVariables_onAccess = new Map ExpressionRef>();
+// === Builtin Types ==========================================================================
+function builtin_resolveNativeType(ctx: BuiltinTypesContext): Type | null {
+ let resolver = ctx.resolver;
+ let node = ctx.node;
+ let ctxElement = ctx.ctxElement;
+ let ctxTypes = ctx.ctxTypes;
+ let reportMode = ctx.reportMode;
+ const typeArgumentNode = resolver.ensureOneTypeArgument(node, reportMode);
+ if (!typeArgumentNode) return null;
+ let typeArgument = resolver.resolveType(typeArgumentNode, null, ctxElement, ctxTypes, reportMode);
+ if (!typeArgument) return null;
+ switch (typeArgument.kind) {
+ case TypeKind.I8:
+ case TypeKind.I16:
+ case TypeKind.I32: return Type.i32;
+ case TypeKind.Isize: if (!resolver.program.options.isWasm64) return Type.i32;
+ case TypeKind.I64: return Type.i64;
+ case TypeKind.U8:
+ case TypeKind.U16:
+ case TypeKind.U32:
+ case TypeKind.Bool: return Type.u32;
+ case TypeKind.Usize: if (!resolver.program.options.isWasm64) return Type.u32;
+ case TypeKind.U64: return Type.u64;
+ case TypeKind.F32: return Type.f32;
+ case TypeKind.F64: return Type.f64;
+ case TypeKind.V128: return Type.v128;
+ case TypeKind.Void: return Type.void;
+ default: assert(false);
+ }
+ return null;
+}
+builtinTypes.set(CommonNames.native, builtin_resolveNativeType);
+
+function builtin_resolveIndexOfType(ctx: BuiltinTypesContext): Type | null {
+ let resolver = ctx.resolver;
+ let node = ctx.node;
+ let ctxElement = ctx.ctxElement;
+ let ctxTypes = ctx.ctxTypes;
+ let reportMode = ctx.reportMode;
+ const typeArgumentNode = resolver.ensureOneTypeArgument(node, reportMode);
+ if (!typeArgumentNode) return null;
+ let typeArgument = resolver.resolveType(typeArgumentNode, null, ctxElement, ctxTypes, reportMode);
+ if (!typeArgument) return null;
+ let classReference = typeArgument.classReference;
+ if (!classReference) {
+ if (reportMode == ReportMode.Report) {
+ resolver.error(
+ DiagnosticCode.Index_signature_is_missing_in_type_0,
+ typeArgumentNode.range, typeArgument.toString()
+ );
+ }
+ return null;
+ }
+ let overload = classReference.lookupOverload(OperatorKind.IndexedGet);
+ if (overload) {
+ let parameterTypes = overload.signature.parameterTypes;
+ if (overload.is(CommonFlags.Static)) {
+ assert(parameterTypes.length == 2);
+ return parameterTypes[1];
+ } else {
+ assert(parameterTypes.length == 1);
+ return parameterTypes[0];
+ }
+ }
+ if (reportMode == ReportMode.Report) {
+ resolver.error(
+ DiagnosticCode.Index_signature_is_missing_in_type_0,
+ typeArgumentNode.range, typeArgument.toString()
+ );
+ }
+ return null;
+}
+builtinTypes.set(CommonNames.indexof, builtin_resolveIndexOfType);
+
+function builtin_resolveValueOfType(ctx: BuiltinTypesContext): Type | null {
+ let resolver = ctx.resolver;
+ let node = ctx.node;
+ let ctxElement = ctx.ctxElement;
+ let ctxTypes = ctx.ctxTypes;
+ let reportMode = ctx.reportMode;
+ const typeArgumentNode = resolver.ensureOneTypeArgument(node, reportMode);
+ if (!typeArgumentNode) return null;
+ let typeArgument = resolver.resolveType(typeArgumentNode, null, ctxElement, ctxTypes, reportMode);
+ if (!typeArgument) return null;
+ let classReference = typeArgument.getClassOrWrapper(resolver.program);
+ if (classReference) {
+ let overload = classReference.lookupOverload(OperatorKind.IndexedGet);
+ if (overload) return overload.signature.returnType;
+ }
+ if (reportMode == ReportMode.Report) {
+ resolver.error(
+ DiagnosticCode.Index_signature_is_missing_in_type_0,
+ typeArgumentNode.range, typeArgument.toString()
+ );
+ }
+ return null;
+}
+builtinTypes.set(CommonNames.valueof, builtin_resolveValueOfType);
+
+function builtin_resolveReturnOfType(ctx: BuiltinTypesContext): Type | null {
+ let resolver = ctx.resolver;
+ let node = ctx.node;
+ let ctxElement = ctx.ctxElement;
+ let ctxTypes = ctx.ctxTypes;
+ let reportMode = ctx.reportMode;
+ const typeArgumentNode = resolver.ensureOneTypeArgument(node, reportMode);
+ if (!typeArgumentNode) return null;
+ let typeArgument = resolver.resolveType(typeArgumentNode, null, ctxElement, ctxTypes, reportMode);
+ if (!typeArgument) return null;
+ let signatureReference = typeArgument.getSignature();
+ if (signatureReference) return signatureReference.returnType;
+ if (reportMode == ReportMode.Report) {
+ resolver.error(
+ DiagnosticCode.Type_0_has_no_call_signatures,
+ typeArgumentNode.range, typeArgument.toString()
+ );
+ }
+ return null;
+}
+builtinTypes.set(CommonNames.returnof, builtin_resolveReturnOfType);
+
+function builtin_resolveNonnullableType(ctx: BuiltinTypesContext): Type | null {
+ let resolver = ctx.resolver;
+ let node = ctx.node;
+ let ctxElement = ctx.ctxElement;
+ let ctxTypes = ctx.ctxTypes;
+ let reportMode = ctx.reportMode;
+ const typeArgumentNode = resolver.ensureOneTypeArgument(node, reportMode);
+ if (!typeArgumentNode) return null;
+ let typeArgument = resolver.resolveType(typeArgumentNode, null, ctxElement, ctxTypes, reportMode);
+ if (!typeArgument) return null;
+ if (!typeArgument.isNullableReference) return typeArgument;
+ return typeArgument.nonNullableType;
+}
+builtinTypes.set(CommonNames.nonnull, builtin_resolveNonnullableType);
+
// === Static type evaluation =================================================================
// helper global used by checkConstantType
@@ -1623,6 +1779,7 @@ function builtin_max(ctx: BuiltinFunctionContext): ExpressionRef {
} else {
arg1 = compiler.compileExpression(operands[1], type, Constraints.ConvImplicit | Constraints.MustWrap);
}
+ // @ts-expect-error
let op: BinaryOp = -1;
switch (type.kind) {
case TypeKind.I8:
@@ -1652,8 +1809,7 @@ function builtin_max(ctx: BuiltinFunctionContext): ExpressionRef {
module.binary(op,
module.local_get(temp1.index, typeRef),
module.local_get(temp2.index, typeRef)
- ),
- typeRef
+ )
);
return ret;
}
@@ -1691,6 +1847,7 @@ function builtin_min(ctx: BuiltinFunctionContext): ExpressionRef {
} else {
arg1 = compiler.compileExpression(operands[1], type, Constraints.ConvImplicit | Constraints.MustWrap);
}
+ // @ts-expect-error
let op: BinaryOp = -1;
switch (type.kind) {
case TypeKind.I8:
@@ -1720,8 +1877,7 @@ function builtin_min(ctx: BuiltinFunctionContext): ExpressionRef {
module.binary(op,
module.local_get(temp1.index, typeRef),
module.local_get(temp2.index, typeRef)
- ),
- typeRef
+ )
);
return ret;
}
@@ -3130,7 +3286,7 @@ function builtin_select(ctx: BuiltinFunctionContext): ExpressionRef {
operands[2]
);
compiler.currentType = type;
- return module.select(arg0, arg1, arg2, type.toRef());
+ return module.select(arg0, arg1, arg2);
}
builtinFunctions.set(BuiltinNames.select, builtin_select);
@@ -3609,6 +3765,24 @@ function builtin_unchecked(ctx: BuiltinFunctionContext): ExpressionRef {
}
builtinFunctions.set(BuiltinNames.unchecked, builtin_unchecked);
+// inline.always(expr: *) -> *
+function builtin_inline_always(ctx: BuiltinFunctionContext): ExpressionRef {
+ let compiler = ctx.compiler;
+ let module = compiler.module;
+ if (
+ checkTypeAbsent(ctx) |
+ checkArgsRequired(ctx, 1)
+ ) return module.unreachable();
+ let flow = compiler.currentFlow;
+ let alreadyInline = flow.is(FlowFlags.InlineContext);
+ if (!alreadyInline) flow.set(FlowFlags.InlineContext);
+ // eliminate unnecessary tees by preferring contextualType(=void)
+ let expr = compiler.compileExpression(ctx.operands[0], ctx.contextualType);
+ if (!alreadyInline) flow.unset(FlowFlags.InlineContext);
+ return expr;
+}
+builtinFunctions.set(BuiltinNames.inline_always, builtin_inline_always);
+
// call_indirect(index: u32, ...args: *[]) -> T
function builtin_call_indirect(ctx: BuiltinFunctionContext): ExpressionRef {
let compiler = ctx.compiler;
@@ -3632,6 +3806,9 @@ function builtin_call_indirect(ctx: BuiltinFunctionContext): ExpressionRef {
let paramTypeRefs = new Array(numOperands);
for (let i = 0; i < numOperands; ++i) {
operandExprs[i] = compiler.compileExpression(operands[1 + i], Type.auto);
+ if (compiler.currentType.isManaged) {
+ operandExprs[i] = module.tostack(operandExprs[i]);
+ }
paramTypeRefs[i] = compiler.currentType.toRef();
}
compiler.currentType = returnType;
@@ -10786,20 +10963,14 @@ function ensureVisitMembersOf(compiler: Compiler, instance: Class): void {
assert(fieldOffset >= 0);
needsTempValue = true;
body.push(
- // if ($2 = value) __visit($2, $1)
- module.if(
- module.local_tee(2,
- module.load(sizeTypeSize, false,
- module.local_get(0, sizeTypeRef),
- sizeTypeRef, fieldOffset
- ),
- false // internal
- ),
- module.call(visitInstance.internalName, [
- module.local_get(2, sizeTypeRef), // value
- module.local_get(1, TypeRef.I32) // cookie
- ], TypeRef.None)
- )
+ // __visit(load($this, fieldOffset), $cookie)
+ module.call(visitInstance.internalName, [
+ module.load(sizeTypeSize, false,
+ module.local_get(0, sizeTypeRef),
+ sizeTypeRef, fieldOffset
+ ), // value
+ module.local_get(1, TypeRef.I32) // cookie
+ ], TypeRef.None)
);
}
}
diff --git a/src/common.ts b/src/common.ts
index f5d6675edd..f5336f0479 100644
--- a/src/common.ts
+++ b/src/common.ts
@@ -191,9 +191,12 @@ export namespace CommonNames {
export const ASC_FEATURE_RELAXED_SIMD = "ASC_FEATURE_RELAXED_SIMD";
export const ASC_FEATURE_EXTENDED_CONST = "ASC_FEATURE_EXTENDED_CONST";
export const ASC_FEATURE_STRINGREF = "ASC_FEATURE_STRINGREF";
+ export const ASC_FEATURE_SHARED_EVERYTHING = "ASC_FEATURE_SHARED_EVERYTHING";
export const ASC_VERSION_MAJOR = "ASC_VERSION_MAJOR";
export const ASC_VERSION_MINOR = "ASC_VERSION_MINOR";
export const ASC_VERSION_PATCH = "ASC_VERSION_PATCH";
+ // enums
+ export const EnumToString = "__enum_to_string";
// classes
export const I8 = "I8";
export const I16 = "I16";
diff --git a/src/compiler.ts b/src/compiler.ts
index 6508090626..f99bd5a049 100644
--- a/src/compiler.ts
+++ b/src/compiler.ts
@@ -48,18 +48,17 @@ import {
getBlockChildCount,
getBlockChildAt,
getBlockName,
- getLocalSetValue,
getGlobalGetName,
isGlobalMutable,
getSideEffects,
SideEffects,
SwitchBuilder,
ExpressionRunnerFlags,
- isConstZero,
isConstNegZero,
isConstExpressionNaN,
ensureType,
- createType
+ createType,
+ getConstValueInteger
} from "./module";
import {
@@ -93,7 +92,8 @@ import {
PropertyPrototype,
IndexSignature,
File,
- mangleInternalName
+ mangleInternalName,
+ TypeDefinition
} from "./program";
import {
@@ -180,7 +180,9 @@ import {
findDecorator,
isTypeOmitted,
- Source
+ Source,
+ TypeDeclaration,
+ ParameterKind
} from "./ast";
import {
@@ -323,8 +325,10 @@ export class Options {
/** Sets whether a feature is enabled. */
setFeature(feature: Feature, on: bool = true): void {
if (on) {
+ // Enabling Shared Everything also enables Threads and GC
+ if (feature & Feature.SharedEverything) feature |= Feature.Threads | Feature.GC;
// Enabling Stringref also enables GC
- if (feature & Feature.Stringref) feature |= Feature.GC;
+ if (feature & Feature.Strings) feature |= Feature.GC;
// Enabling GC also enables Reference Types
if (feature & Feature.GC) feature |= Feature.ReferenceTypes;
// Enabling Relaxed SIMD also enables SIMD
@@ -334,9 +338,11 @@ export class Options {
// Disabling Reference Types also disables GC
if (feature & Feature.ReferenceTypes) feature |= Feature.GC;
// Disabling GC also disables Stringref
- if (feature & Feature.GC) feature |= Feature.Stringref;
+ if (feature & Feature.GC) feature |= Feature.Strings;
// Disabling SIMD also disables Relaxed SIMD
if (feature & Feature.Simd) feature |= Feature.RelaxedSimd;
+ // Disabling Threads or GC also disables Shared Everything
+ if (feature & (Feature.Threads | Feature.GC)) feature |= Feature.SharedEverything;
this.features &= ~feature;
}
}
@@ -448,6 +454,8 @@ export class Compiler extends DiagnosticEmitter {
memorySegments: MemorySegment[] = [];
/** Map of already compiled static string segments. */
stringSegments: Map = new Map();
+ /** Set of static GC object offsets. tostack is unnecessary for them. */
+ staticGcObjectOffsets: Map> = new Map();
/** Function table being compiled. First elem is blank. */
functionTable: Function[] = [];
/** Arguments length helper global. */
@@ -511,7 +519,8 @@ export class Compiler extends DiagnosticEmitter {
if (options.hasFeature(Feature.Memory64)) featureFlags |= FeatureFlags.Memory64;
if (options.hasFeature(Feature.RelaxedSimd)) featureFlags |= FeatureFlags.RelaxedSIMD;
if (options.hasFeature(Feature.ExtendedConst)) featureFlags |= FeatureFlags.ExtendedConst;
- if (options.hasFeature(Feature.Stringref)) featureFlags |= FeatureFlags.Stringref;
+ if (options.hasFeature(Feature.Strings)) featureFlags |= FeatureFlags.Strings;
+ if (options.hasFeature(Feature.SharedEverything)) featureFlags |= FeatureFlags.SharedEverything;
module.setFeatures(featureFlags);
// set up the main start function
@@ -530,9 +539,21 @@ export class Compiler extends DiagnosticEmitter {
let resolver = this.resolver;
let hasShadowStack = options.stackSize > 0; // implies runtime=incremental
+ // Register a dummy memory so Binaryen's EffectAnalyzer can read
+ // memory.shared on loads/stores emitted during compilation. The real
+ // memory is installed by `initDefaultMemory` below, which can't run
+ // here: it needs `memoryOffset` (known only after data layout) and
+ // emits diagnostics / exports that must happen exactly once.
+ this.initDummyMemory();
+
// initialize lookup maps, built-ins, imports, exports, etc.
this.program.initialize();
+ // Binaryen treats all function references as being leaked to the outside world when
+ // the module isn't marked as closed-world (see WebAssembly/binaryen#7135). Therefore,
+ // we should mark the module as closed-world when we're definitely sure it is.
+ module.setClosedWorld(true);
+
// obtain the main start function
let startFunctionInstance = this.currentFlow.targetFunction;
assert(startFunctionInstance.internalName == BuiltinNames.start);
@@ -752,6 +773,19 @@ export class Compiler extends DiagnosticEmitter {
return module;
}
+ private initDummyMemory(): void {
+ let options = this.options;
+ this.module.setMemory(
+ 0,
+ Module.UNLIMITED_MEMORY,
+ [],
+ options.target,
+ null,
+ CommonNames.DefaultMemory,
+ options.sharedMemory
+ );
+ }
+
private initDefaultMemory(memoryOffset: i64): void {
this.memoryOffset = memoryOffset;
@@ -847,13 +881,15 @@ export class Compiler extends DiagnosticEmitter {
let options = this.options;
let module = this.module;
- // import and/or export table if requested (default table is named '0' by Binaryen)
+ // import and/or export table if requested (default table is named '0' by Binaryen).
+ // non-imported tables are declared lazily on first indirect call, see ensureFunctionTable
if (options.importTable) {
module.addTableImport(
CommonNames.DefaultTable,
ImportNames.DefaultNamespace,
ImportNames.Table
);
+ module.setClosedWorld(false);
if (options.pedantic && options.willOptimize) {
this.pedantic(
DiagnosticCode.Importing_the_table_disables_some_indirect_call_optimizations,
@@ -863,6 +899,7 @@ export class Compiler extends DiagnosticEmitter {
}
if (options.exportTable) {
module.addTableExport(CommonNames.DefaultTable, ExportNames.Table);
+ module.setClosedWorld(false);
if (options.pedantic && options.willOptimize) {
this.pedantic(
DiagnosticCode.Exporting_the_table_disables_some_indirect_call_optimizations,
@@ -974,6 +1011,7 @@ export class Compiler extends DiagnosticEmitter {
}
}
}
+ if (functionInstance.signature.returnType.kind == TypeKind.Func) this.module.setClosedWorld(false);
}
return;
}
@@ -1004,6 +1042,7 @@ export class Compiler extends DiagnosticEmitter {
this.desiresExportRuntime = true;
}
}
+ if (global.type.kind == TypeKind.Func) this.module.setClosedWorld(false);
}
if (global.type == Type.v128) {
this.warning(
@@ -1156,7 +1195,7 @@ export class Compiler extends DiagnosticEmitter {
// Resolve type if annotated
if (typeNode) {
- let resolvedType = this.resolver.resolveType(typeNode, global.parent); // reports
+ let resolvedType = this.resolver.resolveType(typeNode, null, global.parent); // reports
if (!resolvedType) {
global.set(CommonFlags.Errored);
pendingElements.delete(global);
@@ -1508,6 +1547,49 @@ export class Compiler extends DiagnosticEmitter {
return true;
}
+ private ensureEnumToString(enumElement: Enum, reportNode: Node): string | null {
+ if (enumElement.toStringFunctionName) return enumElement.toStringFunctionName;
+
+ if (!this.compileEnum(enumElement)) return null;
+ if (enumElement.is(CommonFlags.Const)) {
+ this.errorRelated(
+ DiagnosticCode.A_const_enum_member_can_only_be_accessed_using_a_string_literal,
+ reportNode.range, enumElement.identifierNode.range
+ );
+ return null;
+ }
+
+ let members = enumElement.members;
+ if (!members) return null;
+
+ let module = this.module;
+ const isInline = enumElement.hasDecorator(DecoratorFlags.Inline);
+
+ const functionName = `${enumElement.internalName}#${CommonNames.EnumToString}`;
+ enumElement.toStringFunctionName = functionName;
+
+ let exprs = new Array();
+ // when the values are the same, TS returns the last enum value name that appears
+ for (let _keys = Map_keys(members), _values = Map_values(members), i = 1, k = _keys.length; i <= k; ++i) {
+ let enumValueName = unchecked(_keys[k - i]);
+ let member = unchecked(_values[k - i]);
+ if (member.kind != ElementKind.EnumValue) continue;
+ let enumValue = member;
+ const enumValueExpr = isInline
+ ? module.i32(i64_low(enumValue.constantIntegerValue))
+ : module.global_get(enumValue.internalName, TypeRef.I32);
+ let expr = module.if(
+ module.binary(BinaryOp.EqI32, enumValueExpr, module.local_get(0, TypeRef.I32)),
+ module.return(this.ensureStaticString(enumValueName))
+ );
+ exprs.push(expr);
+ }
+ exprs.push(module.unreachable());
+ module.addFunction(functionName, TypeRef.I32, TypeRef.I32, null, module.block(null, exprs, TypeRef.I32));
+
+ return functionName;
+ }
+
// === Functions ================================================================================
/** Compiles a priorly resolved function. */
@@ -1517,7 +1599,8 @@ export class Compiler extends DiagnosticEmitter {
/** Force compilation of stdlib alternative if a builtin. */
forceStdAlternative: bool = false
): bool {
- if (instance.is(CommonFlags.Compiled)) return !instance.is(CommonFlags.Errored);
+ if (instance.is(CommonFlags.Errored)) return false;
+ if (instance.is(CommonFlags.Compiled)) return true;
if (!forceStdAlternative) {
if (instance.hasDecorator(DecoratorFlags.Builtin)) return true;
@@ -1926,7 +2009,16 @@ export class Compiler extends DiagnosticEmitter {
stringSegment = this.addRuntimeMemorySegment(buf);
segments.set(stringValue, stringSegment);
}
- return i64_add(stringSegment.offset, i64_new(totalOverhead));
+ let stringOffset = i64_add(stringSegment.offset, i64_new(totalOverhead));
+ let staticGcObjectOffsets = this.staticGcObjectOffsets;
+ if (staticGcObjectOffsets.has(i64_high(stringOffset))) {
+ assert(staticGcObjectOffsets.get(i64_high(stringOffset))).add(i64_low(stringOffset));
+ } else {
+ let s = new Set();
+ s.add(i64_low(stringOffset));
+ staticGcObjectOffsets.set(i64_high(stringOffset), s);
+ }
+ return stringOffset;
}
/** Writes a series of static values of the specified type to a buffer. */
@@ -2061,7 +2153,11 @@ export class Compiler extends DiagnosticEmitter {
let memorySegment = instance.memorySegment;
if (!memorySegment) {
- // Add to the function table
+ // Add to the function table, declaring it on first use so effect analysis works
+ if (!this.options.importTable) {
+ this.module.ensureFunctionTable(CommonNames.DefaultTable);
+ }
+
let functionTable = this.functionTable;
let tableBase = this.options.tableBase;
if (!tableBase) tableBase = 1; // leave first elem blank
@@ -2238,13 +2334,7 @@ export class Compiler extends DiagnosticEmitter {
break;
}
case NodeKind.TypeDeclaration: {
- // TODO: integrate inner type declaration into flow
- this.error(
- DiagnosticCode.Not_implemented_0,
- statement.range,
- "Inner type alias"
- );
- stmt = module.unreachable();
+ stmt = this.compileTypeDeclaration(statement);
break;
}
case NodeKind.Module: {
@@ -2305,6 +2395,24 @@ export class Compiler extends DiagnosticEmitter {
return this.module.flatten(stmts);
}
+ private compileTypeDeclaration(statement: TypeDeclaration): ExpressionRef {
+ let flow = this.currentFlow;
+ let name = statement.name.text;
+ let existedTypeAlias = flow.lookupScopedTypeAlias(name);
+ if (existedTypeAlias) {
+ this.errorRelated(
+ DiagnosticCode.Duplicate_identifier_0,
+ statement.range,
+ existedTypeAlias.declaration.range,
+ name
+ );
+ return this.module.unreachable();
+ }
+ let element = new TypeDefinition(name, flow.sourceFunction, statement, DecoratorFlags.None);
+ flow.addScopedTypeAlias(name, element);
+ return this.module.nop();
+ }
+
private compileBreakStatement(
statement: BreakStatement
): ExpressionRef {
@@ -2504,7 +2612,7 @@ export class Compiler extends DiagnosticEmitter {
// (then │ │ (body) │
// (?block $continue │ │ if loops: (incrementor) ─────┘
// (body) │ │ recompile body?
- // ) ├◄┘
+ // ) ├◄┘
// (incrementor) ┌◄┘
// (br $loop)
// )
@@ -2581,11 +2689,20 @@ export class Compiler extends DiagnosticEmitter {
bodyStmts.length = 1;
}
+ if (condKind == ConditionKind.True) {
+ // Body executes at least once
+ flow.inherit(bodyFlow);
+ } else {
+ // Otherwise executes conditionally
+ flow.mergeBranch(bodyFlow);
+ }
+
// Compile the incrementor if it possibly executes
let possiblyLoops = possiblyContinues || possiblyFallsThrough;
if (possiblyLoops) {
let incrementor = statement.incrementor;
if (incrementor) {
+ this.currentFlow = flow;
bodyStmts.push(
this.compileExpression(incrementor, Type.void, Constraints.ConvImplicit | Constraints.WillDrop)
);
@@ -2603,14 +2720,6 @@ export class Compiler extends DiagnosticEmitter {
}
}
- // Body executes at least once
- if (condKind == ConditionKind.True) {
- flow.inherit(bodyFlow);
-
- // Otherwise executes conditionally
- } else {
- flow.mergeBranch(bodyFlow);
- }
// Finalize
outerFlow.inherit(flow);
@@ -2790,20 +2899,19 @@ export class Compiler extends DiagnosticEmitter {
let numCases = cases.length;
// Compile the condition (always executes)
- let condExpr = this.compileExpression(statement.condition, Type.u32,
- Constraints.ConvImplicit
- );
+ let condExpr = this.compileExpression(statement.condition, Type.auto);
+ let condType = this.currentType;
// Shortcut if there are no cases
if (!numCases) return module.drop(condExpr);
-
+
// Assign the condition to a temporary local as we compare it multiple times
let outerFlow = this.currentFlow;
- let tempLocal = outerFlow.getTempLocal(Type.u32);
+ let tempLocal = outerFlow.getTempLocal(condType);
let tempLocalIndex = tempLocal.index;
let breaks = new Array(1 + numCases);
- breaks[0] = module.local_set(tempLocalIndex, condExpr, false); // u32
-
+ breaks[0] = module.local_set(tempLocalIndex, condExpr, condType.isManaged);
+
// Make one br_if per labeled case and leave it to Binaryen to optimize the
// sequence of br_ifs to a br_table according to optimization levels
let breakIndex = 1;
@@ -2815,14 +2923,24 @@ export class Compiler extends DiagnosticEmitter {
defaultIndex = i;
continue;
}
- breaks[breakIndex++] = module.br(`case${i}|${label}`,
- module.binary(BinaryOp.EqI32,
- module.local_get(tempLocalIndex, TypeRef.I32),
- this.compileExpression(assert(case_.label), Type.u32,
- Constraints.ConvImplicit
- )
- )
+
+ // Compile the equality expression for this case
+ const left = statement.condition;
+ const leftExpr = module.local_get(tempLocalIndex, condType.toRef());
+ const leftType = condType;
+ const right = case_.label!;
+ const rightExpr = this.compileExpression(assert(case_.label), condType, Constraints.ConvImplicit);
+ const rightType = this.currentType;
+ const equalityExpr = this.compileCommutativeCompareBinaryExpressionFromParts(
+ Token.Equals_Equals,
+ left, leftExpr, leftType,
+ right, rightExpr, rightType,
+ condType,
+ statement
);
+
+ // Add it to the list of breaks
+ breaks[breakIndex++] = module.br(`case${i}|${label}`, equalityExpr);
}
// If there is a default case, break to it, otherwise break out of the switch
@@ -2962,7 +3080,7 @@ export class Compiler extends DiagnosticEmitter {
let initializerNode = declaration.initializer;
if (typeNode) {
type = resolver.resolveType( // reports
- typeNode,
+ typeNode, flow,
flow.sourceFunction,
cloneMap(flow.contextualTypeArguments)
);
@@ -3633,43 +3751,29 @@ export class Compiler extends DiagnosticEmitter {
// int to float
} else if (fromType.isIntegerValue && toType.isFloatValue) {
-
+ // Clear extra bits.
+ expr = this.ensureSmallIntegerWrap(expr, fromType);
+ let op: UnaryOp;
// int to f32
if (toType.kind == TypeKind.F32) {
if (fromType.isLongIntegerValue) {
- expr = module.unary(
- fromType.isSignedIntegerValue
- ? UnaryOp.ConvertI64ToF32
- : UnaryOp.ConvertU64ToF32,
- expr
- );
+ if (fromType.isSignedIntegerValue) op = UnaryOp.ConvertI64ToF32;
+ else op = UnaryOp.ConvertU64ToF32;
} else {
- expr = module.unary(
- fromType.isSignedIntegerValue
- ? UnaryOp.ConvertI32ToF32
- : UnaryOp.ConvertU32ToF32,
- expr
- );
+ if (fromType.isSignedIntegerValue) op = UnaryOp.ConvertI32ToF32;
+ else op = UnaryOp.ConvertU32ToF32;
}
-
// int to f64
} else {
if (fromType.isLongIntegerValue) {
- expr = module.unary(
- fromType.isSignedIntegerValue
- ? UnaryOp.ConvertI64ToF64
- : UnaryOp.ConvertU64ToF64,
- expr
- );
+ if (fromType.isSignedIntegerValue) op = UnaryOp.ConvertI64ToF64;
+ else op = UnaryOp.ConvertU64ToF64;
} else {
- expr = module.unary(
- fromType.isSignedIntegerValue
- ? UnaryOp.ConvertI32ToF64
- : UnaryOp.ConvertU32ToF64,
- expr
- );
+ if (fromType.isSignedIntegerValue) op = UnaryOp.ConvertI32ToF64;
+ else op = UnaryOp.ConvertU32ToF64;
}
}
+ expr = module.unary(op, expr);
// v128 to bool
} else if (fromType == Type.v128 && toType.isBooleanValue) {
@@ -3729,7 +3833,7 @@ export class Compiler extends DiagnosticEmitter {
case AssertionKind.As: {
let flow = this.currentFlow;
let toType = this.resolver.resolveType( // reports
- assert(expression.toType),
+ assert(expression.toType), flow,
flow.sourceFunction,
cloneMap(flow.contextualTypeArguments)
);
@@ -3783,270 +3887,222 @@ export class Compiler extends DiagnosticEmitter {
private i32PowInstance: Function | null = null;
private i64PowInstance: Function | null = null;
- private compileBinaryExpression(
+ /** compile `==` `===` `!=` `!==` BinaryExpression */
+ private compileCommutativeCompareBinaryExpression(
expression: BinaryExpression,
contextualType: Type,
- constraints: Constraints
): ExpressionRef {
- let module = this.module;
- let left = expression.left;
- let right = expression.right;
- let leftExpr: ExpressionRef;
- let leftType: Type;
- let rightExpr: ExpressionRef;
- let rightType: Type;
- let commonType: Type | null;
+ const left = expression.left;
+ const leftExpr = this.compileExpression(left, contextualType);
+ const leftType = this.currentType;
- let expr: ExpressionRef;
- let compound = false;
+ const right = expression.right;
+ const rightExpr = this.compileExpression(right, leftType);
+ const rightType = this.currentType;
- let operator = expression.operator;
- switch (operator) {
- case Token.LessThan: {
- leftExpr = this.compileExpression(left, contextualType);
- leftType = this.currentType;
+ return this.compileCommutativeCompareBinaryExpressionFromParts(
+ expression.operator,
+ left, leftExpr, leftType,
+ right, rightExpr, rightType,
+ contextualType,
+ expression
+ );
+ }
- // check operator overload
- let classReference = leftType.getClassOrWrapper(this.program);
- if (classReference) {
- let overload = classReference.lookupOverload(OperatorKind.Lt);
- if (overload) {
- expr = this.compileBinaryOverload(overload, left, leftExpr, leftType, right, expression);
- break;
- }
- }
+ /**
+ * compile `==` `===` `!=` `!==` BinaryExpression, from previously compiled left and right expressions.
+ *
+ * This is split from `compileCommutativeCompareBinaryExpression` so that the logic can be reused
+ * for switch cases in `compileSwitchStatement`, where the left expression only should be compiled once.
+ */
+ private compileCommutativeCompareBinaryExpressionFromParts(
+ operator: Token,
+ left: Expression,
+ leftExpr: ExpressionRef,
+ leftType: Type,
+ right: Expression,
+ rightExpr: ExpressionRef,
+ rightType: Type,
+ contextualType: Type,
+ reportNode: Node
+ ): ExpressionRef {
- rightExpr = this.compileExpression(right, leftType);
- rightType = this.currentType;
- commonType = Type.commonType(leftType, rightType, contextualType, true);
- if (!commonType || !commonType.isNumericValue) {
- this.error(
- DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2,
- expression.range, "<", leftType.toString(), rightType.toString()
- );
- this.currentType = contextualType;
- return module.unreachable();
- }
+ let module = this.module;
+ let operatorString = operatorTokenToString(operator);
- leftExpr = this.convertExpression(leftExpr, leftType, commonType, false, left);
- leftType = commonType;
- rightExpr = this.convertExpression(rightExpr, rightType, commonType, false, right);
- rightType = commonType;
+ // check operator overload
+ const operatorKind = OperatorKind.fromBinaryToken(operator);
+ const leftOverload = leftType.lookupOverload(operatorKind, this.program);
+ const rightOverload = rightType.lookupOverload(operatorKind, this.program);
+ if (leftOverload && rightOverload && leftOverload != rightOverload) {
+ this.error(
+ DiagnosticCode.Ambiguous_operator_overload_0_conflicting_overloads_1_and_2,
+ reportNode.range,
+ operatorString,
+ leftOverload.internalName,
+ rightOverload.internalName
+ );
+ this.currentType = contextualType;
+ return module.unreachable();
+ }
+ if (leftOverload) {
+ return this.compileCommutativeBinaryOverload(
+ leftOverload,
+ left, leftExpr, leftType,
+ right, rightExpr, rightType,
+ reportNode
+ );
+ }
+ if (rightOverload) {
+ return this.compileCommutativeBinaryOverload(
+ rightOverload,
+ right, rightExpr, rightType,
+ left, leftExpr, leftType,
+ reportNode
+ );
+ }
+ const signednessIsRelevant = false;
+ const commonType = Type.commonType(leftType, rightType, contextualType, signednessIsRelevant);
+ if (!commonType) {
+ this.error(
+ DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2,
+ reportNode.range,
+ operatorString,
+ leftType.toString(),
+ rightType.toString()
+ );
+ this.currentType = contextualType;
+ return module.unreachable();
+ }
- expr = this.makeLt(leftExpr, rightExpr, commonType);
- this.currentType = Type.bool;
- break;
+ if (commonType.isFloatValue) {
+ if (isConstExpressionNaN(module, rightExpr) || isConstExpressionNaN(module, leftExpr)) {
+ this.warning(
+ DiagnosticCode._NaN_does_not_compare_equal_to_any_other_value_including_itself_Use_isNaN_x_instead,
+ reportNode.range
+ );
}
- case Token.GreaterThan: {
- leftExpr = this.compileExpression(left, contextualType);
- leftType = this.currentType;
-
- // check operator overload
- let classReference = leftType.getClassOrWrapper(this.program);
- if (classReference) {
- let overload = classReference.lookupOverload(OperatorKind.Gt);
- if (overload) {
- expr = this.compileBinaryOverload(overload, left, leftExpr, leftType, right, expression);
- break;
- }
- }
-
- rightExpr = this.compileExpression(right, leftType);
- rightType = this.currentType;
- commonType = Type.commonType(leftType, rightType, contextualType, true);
- if (!commonType || !commonType.isNumericValue) {
- this.error(
- DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2,
- expression.range, ">", leftType.toString(), rightType.toString()
- );
- this.currentType = contextualType;
- return module.unreachable();
- }
-
- leftExpr = this.convertExpression(leftExpr, leftType, commonType, false, left);
- leftType = commonType;
- rightExpr = this.convertExpression(rightExpr, rightType, commonType, false, right);
- rightType = commonType;
-
- expr = this.makeGt(leftExpr, rightExpr, commonType);
- this.currentType = Type.bool;
- break;
+ if (isConstNegZero(rightExpr) || isConstNegZero(leftExpr)) {
+ this.warning(
+ DiagnosticCode.Comparison_with_0_0_is_sign_insensitive_Use_Object_is_x_0_0_if_the_sign_matters,
+ reportNode.range
+ );
}
- case Token.LessThan_Equals: {
- leftExpr = this.compileExpression(left, contextualType);
- leftType = this.currentType;
+ }
- // check operator overload
- let classReference = leftType.getClassOrWrapper(this.program);
- if (classReference) {
- let overload = classReference.lookupOverload(OperatorKind.Le);
- if (overload) {
- expr = this.compileBinaryOverload(overload, left, leftExpr, leftType, right, expression);
- break;
- }
- }
+ leftExpr = this.convertExpression(leftExpr, leftType, commonType, false, left);
+ leftType = commonType;
+ rightExpr = this.convertExpression(rightExpr, rightType, commonType, false, right);
+ rightType = commonType;
- rightExpr = this.compileExpression(right, leftType);
- rightType = this.currentType;
- commonType = Type.commonType(leftType, rightType, contextualType, true);
- if (!commonType || !commonType.isNumericValue) {
- this.error(
- DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2,
- expression.range, "<=", leftType.toString(), rightType.toString()
- );
- this.currentType = contextualType;
- return module.unreachable();
- }
+ this.currentType = Type.bool;
+ switch (operator) {
+ case Token.Equals_Equals_Equals:
+ case Token.Equals_Equals:
+ return this.makeEq(leftExpr, rightExpr, commonType, reportNode);
+ case Token.Exclamation_Equals_Equals:
+ case Token.Exclamation_Equals:
+ return this.makeNe(leftExpr, rightExpr, commonType, reportNode);
+ default:
+ assert(false);
+ return module.unreachable();
+ }
+ }
- leftExpr = this.convertExpression(leftExpr, leftType, commonType, false, left);
- leftType = commonType;
- rightExpr = this.convertExpression(rightExpr, rightType, commonType, false, right);
- rightType = commonType;
+ /** compile `>` `>=` `<` `<=` BinaryExpression */
+ private compileNonCommutativeCompareBinaryExpression(
+ expression: BinaryExpression,
+ contextualType: Type,
+ ): ExpressionRef {
+ let module = this.module;
+ let left = expression.left;
+ let right = expression.right;
+ let leftExpr: ExpressionRef;
+ let leftType: Type;
+ let rightExpr: ExpressionRef;
+ let rightType: Type;
+ let commonType: Type | null;
+ let operator = expression.operator;
+ let operatorString = operatorTokenToString(operator);
- expr = this.makeLe(leftExpr, rightExpr, commonType);
- this.currentType = Type.bool;
- break;
- }
- case Token.GreaterThan_Equals: {
- leftExpr = this.compileExpression(left, contextualType);
- leftType = this.currentType;
+ leftExpr = this.compileExpression(left, contextualType);
+ leftType = this.currentType;
- // check operator overload
- let classReference = leftType.getClassOrWrapper(this.program);
- if (classReference) {
- let overload = classReference.lookupOverload(OperatorKind.Ge);
- if (overload) {
- expr = this.compileBinaryOverload(overload, left, leftExpr, leftType, right, expression);
- break;
- }
- }
+ // check operator overload
+ const operatorKind = OperatorKind.fromBinaryToken(operator);
+ const leftOverload = leftType.lookupOverload(operatorKind, this.program);
+ if (leftOverload) return this.compileBinaryOverload(leftOverload, left, leftExpr, leftType, right, expression);
- rightExpr = this.compileExpression(right, leftType);
- rightType = this.currentType;
- commonType = Type.commonType(leftType, rightType, contextualType, true);
- if (!commonType || !commonType.isNumericValue) {
- this.error(
- DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2,
- expression.range, ">=", leftType.toString(), rightType.toString()
- );
- this.currentType = contextualType;
- return module.unreachable();
- }
+ rightExpr = this.compileExpression(right, leftType);
+ rightType = this.currentType;
- leftExpr = this.convertExpression(leftExpr, leftType, commonType, false, left);
- leftType = commonType;
- rightExpr = this.convertExpression(rightExpr, rightType, commonType, false, right);
- rightType = commonType;
+ const signednessIsRelevant = true;
+ commonType = Type.commonType(leftType, rightType, contextualType, signednessIsRelevant);
+ if (!commonType || !commonType.isNumericValue) {
+ this.error(
+ DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2,
+ expression.range,
+ operatorString,
+ leftType.toString(),
+ rightType.toString()
+ );
+ this.currentType = contextualType;
+ return module.unreachable();
+ }
- expr = this.makeGe(leftExpr, rightExpr, commonType);
- this.currentType = Type.bool;
- break;
- }
+ leftExpr = this.convertExpression(leftExpr, leftType, commonType, false, left);
+ leftType = commonType;
+ rightExpr = this.convertExpression(rightExpr, rightType, commonType, false, right);
+ rightType = commonType;
- case Token.Equals_Equals_Equals:
- case Token.Equals_Equals: {
- leftExpr = this.compileExpression(left, contextualType);
- leftType = this.currentType;
+ this.currentType = Type.bool;
+ switch (operator) {
+ case Token.LessThan:
+ return this.makeLt(leftExpr, rightExpr, commonType);
+ case Token.GreaterThan:
+ return this.makeGt(leftExpr, rightExpr, commonType);
+ case Token.LessThan_Equals:
+ return this.makeLe(leftExpr, rightExpr, commonType);
+ case Token.GreaterThan_Equals:
+ return this.makeGe(leftExpr, rightExpr, commonType);
+ default:
+ assert(false);
+ return module.unreachable();
+ }
+ }
- // check operator 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;
- }
- }
+ private compileBinaryExpression(
+ expression: BinaryExpression,
+ contextualType: Type,
+ constraints: Constraints
+ ): ExpressionRef {
+ let module = this.module;
+ let left = expression.left;
+ let right = expression.right;
- rightExpr = this.compileExpression(right, leftType);
- rightType = this.currentType;
- commonType = Type.commonType(leftType, rightType, contextualType);
- if (!commonType) {
- this.error(
- DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2,
- expression.range, operatorTokenToString(expression.operator), leftType.toString(), rightType.toString()
- );
- this.currentType = contextualType;
- return module.unreachable();
- }
- if (commonType.isFloatValue) {
- if (
- isConstExpressionNaN(module, rightExpr) ||
- isConstExpressionNaN(module, leftExpr)
- ) {
- this.warning(
- DiagnosticCode._NaN_does_not_compare_equal_to_any_other_value_including_itself_Use_isNaN_x_instead,
- expression.range
- );
- }
- if (isConstNegZero(rightExpr) || isConstNegZero(leftExpr)) {
- this.warning(
- DiagnosticCode.Comparison_with_0_0_is_sign_insensitive_Use_Object_is_x_0_0_if_the_sign_matters,
- expression.range
- );
- }
- }
- leftExpr = this.convertExpression(leftExpr, leftType, commonType, false, left);
- leftType = commonType;
- rightExpr = this.convertExpression(rightExpr, rightType, commonType, false, right);
- rightType = commonType;
+ let leftExpr: ExpressionRef;
+ let leftType: Type;
+ let rightExpr: ExpressionRef;
+ let rightType: Type;
+ let commonType: Type | null;
- expr = this.makeEq(leftExpr, rightExpr, commonType, expression);
- this.currentType = Type.bool;
- break;
+ let expr: ExpressionRef;
+ let compound = false;
+
+ let operator = expression.operator;
+ switch (operator) {
+ case Token.LessThan:
+ case Token.GreaterThan:
+ case Token.LessThan_Equals:
+ case Token.GreaterThan_Equals:{
+ return this.compileNonCommutativeCompareBinaryExpression(expression, contextualType);
}
+ case Token.Equals_Equals_Equals:
+ case Token.Equals_Equals:
case Token.Exclamation_Equals_Equals:
case Token.Exclamation_Equals: {
- leftExpr = this.compileExpression(left, contextualType);
- leftType = this.currentType;
-
- // check operator 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;
- }
- }
-
- rightExpr = this.compileExpression(right, leftType);
- rightType = this.currentType;
- commonType = Type.commonType(leftType, rightType, contextualType);
- if (!commonType) {
- this.error(
- DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2,
- expression.range, operatorTokenToString(expression.operator), leftType.toString(), rightType.toString()
- );
- this.currentType = contextualType;
- return module.unreachable();
- }
- if (commonType.isFloatValue) {
- if (
- isConstExpressionNaN(module, rightExpr) ||
- isConstExpressionNaN(module, leftExpr)
- ) {
- this.warning(
- DiagnosticCode._NaN_does_not_compare_equal_to_any_other_value_including_itself_Use_isNaN_x_instead,
- expression.range
- );
- }
- if (isConstNegZero(rightExpr) || isConstNegZero(leftExpr)) {
- this.warning(
- DiagnosticCode.Comparison_with_0_0_is_sign_insensitive_Use_Object_is_x_0_0_if_the_sign_matters,
- expression.range
- );
- }
- }
- leftExpr = this.convertExpression(leftExpr, leftType, commonType, false, left);
- leftType = commonType;
- rightExpr = this.convertExpression(rightExpr, rightType, commonType, false, right);
- rightType = commonType;
-
- expr = this.makeNe(leftExpr, rightExpr, commonType, expression);
- this.currentType = Type.bool;
- break;
+ return this.compileCommutativeCompareBinaryExpression(expression, contextualType);
}
case Token.Equals: {
return this.compileAssignment(left, right, contextualType);
@@ -4124,7 +4180,7 @@ export class Compiler extends DiagnosticEmitter {
rightExpr = this.compileExpression(right, leftType);
rightType = this.currentType;
commonType = Type.commonType(leftType, rightType, contextualType);
- if (!commonType || !leftType.isNumericValue) {
+ if (!commonType || !commonType.isNumericValue) {
this.error(
DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2,
expression.range, "-", leftType.toString(), rightType.toString()
@@ -4590,19 +4646,31 @@ export class Compiler extends DiagnosticEmitter {
}
leftExpr = this.convertExpression(leftExpr, leftType, commonType, false, left);
leftType = commonType;
+
+ // This is sometimes needed to make the left trivial
+ let leftPrecompExpr = module.runExpression(leftExpr, ExpressionRunnerFlags.PreserveSideeffects);
+ if (leftPrecompExpr) leftExpr = leftPrecompExpr;
+
rightExpr = this.convertExpression(rightExpr, rightType, commonType, false, right);
rightType = commonType;
- // simplify if copying left is trivial
- if (expr = module.tryCopyTrivialExpression(leftExpr)) {
+ let condExpr = this.makeIsTrueish(leftExpr, this.currentType, left);
+ let condKind = this.evaluateCondition(condExpr);
+
+ if (condKind != ConditionKind.Unknown) {
+ // simplify if left is a constant
+ expr = condKind == ConditionKind.True
+ ? rightExpr
+ : leftExpr;
+ } else if (expr = module.tryCopyTrivialExpression(leftExpr)) {
+ // simplify if copying left is trivial
expr = module.if(
- this.makeIsTrueish(leftExpr, this.currentType, left),
+ condExpr,
rightExpr,
expr
);
-
- // if not possible, tee left to a temp
} else {
+ // if not possible, tee left to a temp
let tempLocal = flow.getTempLocal(leftType);
if (!flow.canOverflow(leftExpr, leftType)) flow.setLocalFlag(tempLocal.index, LocalFlags.Wrapped);
if (flow.isNonnull(leftExpr, leftType)) flow.setLocalFlag(tempLocal.index, LocalFlags.NonNull);
@@ -4670,19 +4738,31 @@ export class Compiler extends DiagnosticEmitter {
let possiblyNull = leftType.is(TypeFlags.Nullable) && rightType.is(TypeFlags.Nullable);
leftExpr = this.convertExpression(leftExpr, leftType, commonType, false, left);
leftType = commonType;
+
+ // This is sometimes needed to make the left trivial
+ let leftPrecompExpr = module.runExpression(leftExpr, ExpressionRunnerFlags.PreserveSideeffects);
+ if (leftPrecompExpr) leftExpr = leftPrecompExpr;
+
rightExpr = this.convertExpression(rightExpr, rightType, commonType, false, right);
rightType = commonType;
- // simplify if copying left is trivial
- if (expr = module.tryCopyTrivialExpression(leftExpr)) {
+ let condExpr = this.makeIsTrueish(leftExpr, this.currentType, left);
+ let condKind = this.evaluateCondition(condExpr);
+
+ if (condKind != ConditionKind.Unknown) {
+ // simplify if left is a constant
+ expr = condKind == ConditionKind.True
+ ? leftExpr
+ : rightExpr;
+ } else if (expr = module.tryCopyTrivialExpression(leftExpr)) {
+ // otherwise, simplify if copying left is trivial
expr = module.if(
- this.makeIsTrueish(leftExpr, leftType, left),
+ condExpr,
expr,
rightExpr
);
-
- // if not possible, tee left to a temp. local
} else {
+ // if not possible, tee left to a temp. local
let temp = flow.getTempLocal(leftType);
let tempIndex = temp.index;
if (!flow.canOverflow(leftExpr, leftType)) flow.setLocalFlag(tempIndex, LocalFlags.Wrapped);
@@ -4713,6 +4793,7 @@ export class Compiler extends DiagnosticEmitter {
default: {
assert(false);
expr = this.module.unreachable();
+ break;
}
}
if (!compound) return expr;
@@ -5041,8 +5122,7 @@ export class Compiler extends DiagnosticEmitter {
return module.select(
module.i32(1),
module.binary(BinaryOp.EqI32, rightExpr, module.i32(0)),
- leftExpr,
- TypeRef.I32
+ leftExpr
);
}
case TypeKind.I8:
@@ -5580,6 +5660,29 @@ export class Compiler extends DiagnosticEmitter {
return this.makeCallDirect(operatorInstance, [ leftExpr, rightExpr ], reportNode);
}
+
+ private compileCommutativeBinaryOverload(
+ operatorInstance: Function,
+ first: Expression,
+ firstExpr: ExpressionRef,
+ firstType: Type,
+ second: Expression,
+ secondExpr: ExpressionRef,
+ secondType: Type,
+ reportNode: Node
+ ): ExpressionRef {
+ let signature = operatorInstance.signature;
+ let parameterTypes = signature.parameterTypes;
+ if (operatorInstance.is(CommonFlags.Instance)) {
+ firstExpr = this.convertExpression(firstExpr, firstType, assert(signature.thisType), false, first);
+ secondExpr = this.convertExpression(secondExpr, secondType, parameterTypes[0], false, second);
+ } else {
+ firstExpr = this.convertExpression(firstExpr, firstType, parameterTypes[0], false, first);
+ secondExpr = this.convertExpression(secondExpr, secondType, parameterTypes[1], false, second);
+ }
+ return this.makeCallDirect(operatorInstance, [ firstExpr, secondExpr ], reportNode);
+ }
+
private compileAssignment(
expression: Expression,
valueExpression: Expression,
@@ -6162,6 +6265,7 @@ export class Compiler extends DiagnosticEmitter {
typeArguments = this.resolver.resolveTypeArguments(
assert(typeParameterNodes),
typeArgumentNodes,
+ this.currentFlow,
this.currentFlow.sourceFunction.parent,
cloneMap(this.currentFlow.contextualTypeArguments), // don't update
expression
@@ -6214,16 +6318,7 @@ export class Compiler extends DiagnosticEmitter {
return false;
}
- // not yet implemented (TODO: maybe some sort of an unmanaged/lightweight array?)
let hasRest = signature.hasRest;
- if (hasRest) {
- this.error(
- DiagnosticCode.Not_implemented_0,
- reportNode.range, "Rest parameters"
- );
- return false;
- }
-
let minimum = signature.requiredParameters;
let maximum = signature.parameterTypes.length;
@@ -6268,6 +6363,37 @@ export class Compiler extends DiagnosticEmitter {
}
}
+ private adjustArgumentsForRestParams(
+ argumentExpressions: Expression[],
+ signature: Signature,
+ reportNode: Node
+ ) : Expression[] {
+
+ // if no rest args, return the original args
+ if (!signature.hasRest) {
+ return argumentExpressions;
+ }
+
+ // if there are fewer args than params, then the rest args were not provided
+ // so return the original args
+ const numArguments = argumentExpressions.length;
+ const numParams = signature.parameterTypes.length;
+ if (numArguments < numParams) {
+ return argumentExpressions;
+ }
+
+ // make an array literal expression from the rest args
+ let elements = argumentExpressions.slice(numParams - 1);
+ let range = new Range(elements[0].range.start, elements[elements.length - 1].range.end);
+ range.source = reportNode.range.source;
+ let arrExpr = new ArrayLiteralExpression(elements, range);
+
+ // return the original args, but replace the rest args with the array
+ const exprs = argumentExpressions.slice(0, numParams - 1);
+ exprs.push(arrExpr);
+ return exprs;
+ }
+
/** Compiles a direct call to a concrete function. */
compileCallDirect(
instance: Function,
@@ -6289,6 +6415,9 @@ export class Compiler extends DiagnosticEmitter {
}
if (instance.hasDecorator(DecoratorFlags.Unsafe)) this.checkUnsafe(reportNode);
+ argumentExpressions = this.adjustArgumentsForRestParams(argumentExpressions, signature, reportNode);
+ numArguments = argumentExpressions.length;
+
// handle call on `this` in constructors
let sourceFunction = this.currentFlow.sourceFunction;
if (sourceFunction.is(CommonFlags.Constructor) && reportNode.isAccessOnThis) {
@@ -6298,7 +6427,8 @@ export class Compiler extends DiagnosticEmitter {
}
// Inline if explicitly requested
- if (instance.hasDecorator(DecoratorFlags.Inline) && (!instance.is(CommonFlags.Overridden) || reportNode.isAccessOnSuper)) {
+ let inlineRequested = instance.hasDecorator(DecoratorFlags.Inline) || this.currentFlow.is(FlowFlags.InlineContext);
+ if (inlineRequested && (!instance.is(CommonFlags.Overridden) || reportNode.isAccessOnSuper)) {
assert(!instance.is(CommonFlags.Stub)); // doesn't make sense
let inlineStack = this.inlineStack;
if (inlineStack.includes(instance)) {
@@ -6520,7 +6650,11 @@ export class Compiler extends DiagnosticEmitter {
let declaration = originalParameterDeclarations[minArguments + i];
let initializer = declaration.initializer;
let initExpr: ExpressionRef;
- if (initializer) {
+ if (declaration.parameterKind === ParameterKind.Rest) {
+ const arrExpr = new ArrayLiteralExpression([], declaration.range.atEnd);
+ initExpr = this.compileArrayLiteral(arrExpr, type, Constraints.ConvExplicit);
+ initExpr = module.local_set(operandIndex, initExpr, type.isManaged);
+ } else if (initializer) {
initExpr = this.compileExpression(
initializer,
type,
@@ -6617,6 +6751,7 @@ export class Compiler extends DiagnosticEmitter {
);
let overrideInstances = this.resolver.resolveOverrides(instance);
if (overrideInstances) {
+ let mostRecentInheritanceMapping = new Map();
for (let i = 0, k = overrideInstances.length; i < k; ++i) {
let overrideInstance = overrideInstances[i];
if (!overrideInstance.is(CommonFlags.Compiled)) continue; // errored
@@ -6679,7 +6814,13 @@ export class Compiler extends DiagnosticEmitter {
if (instanceMembers && instanceMembers.has(instance.declaration.name.text)) {
continue; // skip those not inheriting
}
- builder.addCase(extender.id, stmts);
+ if (
+ !mostRecentInheritanceMapping.has(extender) ||
+ !assert(mostRecentInheritanceMapping.get(extender)).extends(classInstance)
+ ) {
+ mostRecentInheritanceMapping.set(extender, classInstance);
+ builder.addOrReplaceCase(extender.id, stmts);
+ }
}
}
}
@@ -6720,6 +6861,21 @@ export class Compiler extends DiagnosticEmitter {
stub.set(CommonFlags.Compiled);
}
+ private needToStack(expr: ExpressionRef): bool {
+ const precomp = this.module.runExpression(expr, ExpressionRunnerFlags.Default);
+ // cannot precompute, so must go to stack
+ if (precomp == 0) return true;
+ const value = getConstValueInteger(precomp, this.options.isWasm64);
+ // zero constant doesn't need to go to stack
+ if (i64_eq(value, i64_zero)) return false;
+ // static GC objects doesn't need to go to stack
+ let staticGcObjectOffsets = this.staticGcObjectOffsets;
+ if (staticGcObjectOffsets.has(i64_high(value))) {
+ if (assert(staticGcObjectOffsets.get(i64_high(value))).has(i64_low(value))) return false;
+ }
+ return true;
+ }
+
/** Marks managed call operands for the shadow stack. */
private operandsTostack(signature: Signature, operands: ExpressionRef[]): void {
if (!this.options.stackSize) return;
@@ -6729,8 +6885,7 @@ export class Compiler extends DiagnosticEmitter {
if (thisType) {
if (thisType.isManaged) {
let operand = operands[0];
- let precomp = module.runExpression(operand, ExpressionRunnerFlags.Default);
- if (!isConstZero(precomp)) { // otherwise unnecessary
+ if (this.needToStack(operand)) {
operands[operandIndex] = module.tostack(operand);
}
}
@@ -6743,8 +6898,7 @@ export class Compiler extends DiagnosticEmitter {
let paramType = parameterTypes[parameterIndex];
if (paramType.isManaged) {
let operand = operands[operandIndex];
- let precomp = module.runExpression(operand, ExpressionRunnerFlags.Default);
- if (!isConstZero(precomp)) { // otherwise unnecessary
+ if (this.needToStack(operand)) {
operands[operandIndex] = module.tostack(operand);
}
}
@@ -6899,6 +7053,9 @@ export class Compiler extends DiagnosticEmitter {
return this.module.unreachable();
}
+ argumentExpressions = this.adjustArgumentsForRestParams(argumentExpressions, signature, reportNode);
+ numArguments = argumentExpressions.length;
+
let numArgumentsInclThis = thisArg ? numArguments + 1 : numArguments;
let operands = new Array(numArgumentsInclThis);
let index = 0;
@@ -6952,36 +7109,46 @@ export class Compiler extends DiagnosticEmitter {
}
}
+ let allTrivial = (getSideEffects(functionArg, module.ref) & SideEffects.WritesGlobal) == 0;
+ if (operands && allTrivial) {
+ for (let i = 0; i < numOperands; ++i) {
+ if (!module.isTrivialExpression(operands[i])) {
+ allTrivial = false;
+ break;
+ }
+ }
+ }
+
+ let stmts = new Array();
+ let sizeTypeRef = this.options.sizeTypeRef;
+
+ if (!allTrivial) {
+ let functionArgLocal = this.currentFlow.getTempLocal(this.options.usizeType);
+ let functionArgSetExpr = module.local_set(functionArgLocal.index, functionArg, true);
+ stmts.push(functionArgSetExpr);
+ functionArg = module.local_get(functionArgLocal.index, sizeTypeRef);
+ }
+
// We might be calling a varargs stub here, even if all operands have been
// provided, so we must set `argumentsLength` in any case. Inject setting it
// into the index argument, which becomes executed last after any operands.
let argumentsLength = this.ensureArgumentsLength();
- let sizeTypeRef = this.options.sizeTypeRef;
- if (getSideEffects(functionArg, module.ref) & SideEffects.WritesGlobal) {
- let flow = this.currentFlow;
- let temp = flow.getTempLocal(this.options.usizeType);
- let tempIndex = temp.index;
- functionArg = module.block(null, [
- module.local_set(tempIndex, functionArg, true), // Function
- module.global_set(argumentsLength, module.i32(numArguments)),
- module.local_get(tempIndex, sizeTypeRef)
- ], sizeTypeRef);
- } else { // simplify
- functionArg = module.block(null, [
- module.global_set(argumentsLength, module.i32(numArguments)),
- functionArg
- ], sizeTypeRef);
- }
+ let functionArgWithVararg = module.block(null, [
+ module.global_set(argumentsLength, module.i32(numArguments)),
+ functionArg
+ ], sizeTypeRef);
+
if (operands) this.operandsTostack(signature, operands);
let expr = module.call_indirect(
null, // TODO: handle multiple tables
- module.load(4, false, functionArg, TypeRef.I32), // ._index
+ module.load(4, false, functionArgWithVararg, TypeRef.I32), // ._index
operands,
signature.paramRefs,
signature.resultRefs
);
this.currentType = returnType;
- return expr;
+ stmts.push(expr);
+ return module.flatten(stmts, returnType.toRef());
}
private compileCommaExpression(
@@ -7008,7 +7175,17 @@ export class Compiler extends DiagnosticEmitter {
): ExpressionRef {
let module = this.module;
let targetExpression = expression.expression;
- let targetType = this.resolver.resolveExpression(targetExpression, this.currentFlow); // reports
+ let resolver = this.resolver;
+ let targetElement = resolver.lookupExpression(targetExpression, this.currentFlow, Type.auto, ReportMode.Swallow);
+ if (targetElement && targetElement.kind == ElementKind.Enum) {
+ const elementExpr = this.compileExpression(expression.elementExpression, Type.i32, Constraints.ConvImplicit);
+ const toStringFunctionName = this.ensureEnumToString(targetElement, expression);
+ this.currentType = this.program.stringInstance.type;
+ if (toStringFunctionName == null) return module.unreachable();
+ return module.call(toStringFunctionName, [ elementExpr ], TypeRef.I32);
+ }
+
+ let targetType = resolver.resolveExpression(targetExpression, this.currentFlow);
if (targetType) {
let classReference = targetType.getClassOrWrapper(this.program);
if (classReference) {
@@ -7085,7 +7262,7 @@ export class Compiler extends DiagnosticEmitter {
let parameterNode = parameterNodes[i];
if (!isTypeOmitted(parameterNode.type)) {
let resolvedType = this.resolver.resolveType(
- parameterNode.type,
+ parameterNode.type, flow,
sourceFunction.parent,
contextualTypeArguments
);
@@ -7105,7 +7282,7 @@ export class Compiler extends DiagnosticEmitter {
let returnType = contextualSignature.returnType;
if (!isTypeOmitted(signatureNode.returnType)) {
let resolvedType = this.resolver.resolveType(
- signatureNode.returnType,
+ signatureNode.returnType, flow,
sourceFunction.parent,
contextualTypeArguments
);
@@ -7135,7 +7312,7 @@ export class Compiler extends DiagnosticEmitter {
return module.unreachable();
}
let resolvedType = this.resolver.resolveType(
- thisTypeNode,
+ thisTypeNode, flow,
sourceFunction.parent,
contextualTypeArguments
);
@@ -7522,7 +7699,7 @@ export class Compiler extends DiagnosticEmitter {
if (isType.kind == NodeKind.NamedType) {
let namedType = isType;
if (!(namedType.isNullable || namedType.hasTypeArguments)) {
- let element = this.resolver.resolveTypeName(namedType.name, flow.sourceFunction, ReportMode.Swallow);
+ let element = this.resolver.resolveTypeName(namedType.name, flow, flow.sourceFunction, ReportMode.Swallow);
if (element && element.kind == ElementKind.ClassPrototype) {
let prototype = element;
if (prototype.is(CommonFlags.Generic)) {
@@ -7534,7 +7711,7 @@ export class Compiler extends DiagnosticEmitter {
// Fall back to `instanceof TYPE`
let expectedType = this.resolver.resolveType(
- expression.isType,
+ expression.isType, flow,
flow.sourceFunction,
cloneMap(flow.contextualTypeArguments)
);
@@ -7731,7 +7908,7 @@ export class Compiler extends DiagnosticEmitter {
stmts.length = 1;
stmts.push(
module.i32(1)
- );
+ );
module.removeFunction(name);
module.addFunction(name, sizeType, TypeRef.I32, [ TypeRef.I32 ], module.block(null, stmts, TypeRef.I32));
}
@@ -8191,11 +8368,9 @@ export class Compiler extends DiagnosticEmitter {
let arrayInstance = element;
let arrayType = arrayInstance.type;
let elementType = arrayInstance.getTypeArgumentsTo(program.arrayPrototype)![0];
- let arrayBufferInstance = assert(program.arrayBufferInstance);
// block those here so compiling expressions doesn't conflict
let tempThis = flow.getTempLocal(this.options.usizeType);
- let tempDataStart = flow.getTempLocal(arrayBufferInstance.type);
// compile value expressions and find out whether all are constant
let expressions = expression.elementExpressions;
@@ -8271,16 +8446,6 @@ export class Compiler extends DiagnosticEmitter {
let dataStartProperty = (dataStartMember).instance;
if (!dataStartProperty) return module.unreachable();
assert(dataStartProperty.isField && dataStartProperty.memoryOffset >= 0);
- stmts.push(
- module.local_set(tempDataStart.index,
- module.load(arrayType.byteSize, false,
- module.local_get(tempThis.index, arrayTypeRef),
- arrayTypeRef,
- dataStartProperty.memoryOffset
- ),
- true // ArrayBuffer
- )
- );
for (let i = 0; i < length; ++i) {
// this[i] = value
stmts.push(
@@ -8686,7 +8851,7 @@ export class Compiler extends DiagnosticEmitter {
let flow = this.currentFlow;
// obtain the class being instantiated
- let target = this.resolver.resolveTypeName(expression.typeName, flow.sourceFunction);
+ let target = this.resolver.resolveTypeName(expression.typeName, flow, flow.sourceFunction);
if (!target) return module.unreachable();
if (target.kind != ElementKind.ClassPrototype) {
this.error(
@@ -8722,6 +8887,7 @@ export class Compiler extends DiagnosticEmitter {
classInstance = this.resolver.resolveClassInclTypeArguments(
classPrototype,
typeArguments,
+ flow,
flow.sourceFunction.parent, // relative to caller
cloneMap(flow.contextualTypeArguments),
expression
@@ -8804,7 +8970,7 @@ export class Compiler extends DiagnosticEmitter {
classInstance.constructorInstance = instance;
let members = classInstance.members;
if (!members) classInstance.members = members = new Map();
- members.set("constructor", instance.prototype);
+ members.set(CommonNames.constructor, instance.prototype);
let previousFlow = this.currentFlow;
let flow = instance.flow;
@@ -9157,11 +9323,12 @@ export class Compiler extends DiagnosticEmitter {
let flow = this.currentFlow;
// make a getter for the expression (also obtains the type)
- let getValue = this.compileExpression( // reports
+ const getValueOriginal = this.compileExpression( // reports
expression.operand,
contextualType.exceptVoid,
Constraints.None
);
+ let getValue: ExpressionRef;
// if the value isn't dropped, a temp. local is required to remember the original value,
// except if a static overload is found, which reverses the use of a temp. (see below)
@@ -9170,16 +9337,17 @@ export class Compiler extends DiagnosticEmitter {
tempLocal = flow.getTempLocal(this.currentType);
getValue = module.local_tee(
tempLocal.index,
- getValue,
+ getValueOriginal,
this.currentType.isManaged
);
+ } else {
+ getValue = getValueOriginal;
}
let expr: ExpressionRef;
switch (expression.operator) {
case Token.Plus_Plus: {
-
// check operator overload
let classReference = this.currentType.getClassOrWrapper(this.program);
if (classReference) {
@@ -9187,7 +9355,7 @@ export class Compiler extends DiagnosticEmitter {
if (overload) {
let isInstance = overload.is(CommonFlags.Instance);
if (tempLocal && !isInstance) { // revert: static overload simply returns
- getValue = getLocalSetValue(getValue);
+ getValue = getValueOriginal;
tempLocal = null;
}
expr = this.compileUnaryOverload(overload, expression.operand, getValue, expression);
@@ -9263,7 +9431,6 @@ export class Compiler extends DiagnosticEmitter {
break;
}
case Token.Minus_Minus: {
-
// check operator overload
let classReference = this.currentType.getClassOrWrapper(this.program);
if (classReference) {
@@ -9271,11 +9438,11 @@ export class Compiler extends DiagnosticEmitter {
if (overload) {
let isInstance = overload.is(CommonFlags.Instance);
if (tempLocal && !isInstance) { // revert: static overload simply returns
- getValue = getLocalSetValue(getValue);
+ getValue = getValueOriginal;
tempLocal = null;
}
expr = this.compileUnaryOverload(overload, expression.operand, getValue, expression);
- if (overload.is(CommonFlags.Instance)) break;
+ if (isInstance) break;
return expr; // here
}
}
@@ -10158,6 +10325,7 @@ export class Compiler extends DiagnosticEmitter {
/** Makes a string conversion of the given expression. */
makeToString(expr: ExpressionRef, type: Type, reportNode: Node): ExpressionRef {
+ let module = this.module;
let stringType = this.program.stringInstance.type;
if (type == stringType) {
return expr;
@@ -10174,15 +10342,30 @@ export class Compiler extends DiagnosticEmitter {
reportNode
)) {
this.currentType = stringType;
- return this.module.unreachable();
+ return module.unreachable();
}
if (!type.isStrictlyAssignableTo(assert(toStringSignature.thisType))) {
- this.errorRelated(
- DiagnosticCode.The_this_types_of_each_signature_are_incompatible,
- reportNode.range, toStringInstance.identifierAndSignatureRange
+ if (!type.is(TypeFlags.Nullable)) {
+ this.errorRelated(
+ DiagnosticCode.The_this_types_of_each_signature_are_incompatible,
+ reportNode.range, toStringInstance.identifierAndSignatureRange
+ );
+ this.currentType = stringType;
+ return module.unreachable();
+ }
+
+ // Attempt to retry on the non-nullable form of the type, wrapped in a ternary:
+ // `expr ? expr.toString() : "null"`
+ const tempLocal = this.currentFlow.getTempLocal(type);
+ return module.if(
+ module.local_tee(tempLocal.index, expr, type.isManaged),
+ this.makeToString(
+ module.local_get(tempLocal.index, type.toRef()),
+ type.nonNullableType,
+ reportNode
+ ),
+ this.ensureStaticString("null")
);
- this.currentType = stringType;
- return this.module.unreachable();
}
let toStringReturnType = toStringSignature.returnType;
if (!toStringReturnType.isStrictlyAssignableTo(stringType)) {
@@ -10191,7 +10374,7 @@ export class Compiler extends DiagnosticEmitter {
reportNode.range, toStringInstance.identifierAndSignatureRange, toStringReturnType.toString(), stringType.toString()
);
this.currentType = stringType;
- return this.module.unreachable();
+ return module.unreachable();
}
return this.makeCallDirect(toStringInstance, [ expr ], reportNode);
}
@@ -10201,7 +10384,7 @@ export class Compiler extends DiagnosticEmitter {
reportNode.range, type.toString(), stringType.toString()
);
this.currentType = stringType;
- return this.module.unreachable();
+ return module.unreachable();
}
/** Makes an allocation suitable to hold the data of an instance of the given class. */
diff --git a/src/diagnosticMessages.json b/src/diagnosticMessages.json
index e15946207a..016ba4ec3f 100644
--- a/src/diagnosticMessages.json
+++ b/src/diagnosticMessages.json
@@ -51,6 +51,9 @@
"Index signature accessors in type '{0}' differ in types.": 237,
"Initializer, definitive assignment or nullable type expected.": 238,
"Definitive assignment has no effect on local variables.": 239,
+ "Ambiguous operator overload '{0}' (conflicting overloads '{1}' and '{2}').": 240,
+ "An interface or abstract method '{0}' cannot have type parameters.": 241,
+ "Cannot override generic method '{0}' with a non-generic method or vice versa.": 242,
"Importing the table disables some indirect call optimizations.": 901,
"Exporting the table disables some indirect call optimizations.": 902,
@@ -119,6 +122,7 @@
"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,
+ "An interface property cannot have an initializer.": 1246,
"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,
@@ -150,7 +154,6 @@
"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,
@@ -173,6 +176,7 @@
"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,
+ "A const enum member can only be accessed using a string literal.": 2476,
"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,
@@ -199,6 +203,7 @@
"Duplicate property '{0}'.": 2718,
"Property '{0}' is missing in type '{1}' but required in type '{2}'.": 2741,
"Type '{0}' has no call signatures.": 2757,
+ "Get accessor '{0}' must be at least as accessible as the setter.": 2808,
"This member cannot have an 'override' modifier because it is not declared in the base class '{0}'.": 4117,
"File '{0}' not found.": 6054,
diff --git a/src/extra/ast.ts b/src/extra/ast.ts
index ebe9217f90..699b2e0c71 100644
--- a/src/extra/ast.ts
+++ b/src/extra/ast.ts
@@ -15,6 +15,7 @@ import {
TypeNode,
NamedTypeNode,
FunctionTypeNode,
+ TupleTypeNode,
TypeName,
TypeParameterNode,
@@ -134,6 +135,10 @@ export class ASTBuilder {
this.visitFunctionTypeNode(node);
break;
}
+ case NodeKind.TupleType: {
+ this.visitTupleTypeNode(node);
+ break;
+ }
case NodeKind.TypeParameter: {
this.visitTypeParameter(node);
break;
@@ -387,6 +392,10 @@ export class ASTBuilder {
this.visitFunctionTypeNode(node);
break;
}
+ case NodeKind.TupleType: {
+ this.visitTupleTypeNode(node);
+ break;
+ }
default: assert(false);
}
}
@@ -450,6 +459,33 @@ export class ASTBuilder {
if (isNullable) sb.push(") | null");
}
+ visitTupleTypeNode(node: TupleTypeNode): void {
+ let sb = this.sb;
+ sb.push("[");
+ let elements = node.elements;
+ let elementNames = node.elementNames;
+ let numElements = elements.length;
+ if (numElements) {
+ let name = elementNames ? elementNames[0] : null;
+ if (name) {
+ this.visitIdentifierExpression(name);
+ sb.push(": ");
+ }
+ this.visitTypeNode(elements[0]);
+ for (let i = 1; i < numElements; ++i) {
+ sb.push(", ");
+ name = elementNames ? elementNames[i] : null;
+ if (name) {
+ this.visitIdentifierExpression(name);
+ sb.push(": ");
+ }
+ this.visitTypeNode(elements[i]);
+ }
+ }
+ sb.push("]");
+ if (node.isNullable) sb.push(" | null");
+ }
+
visitTypeParameter(node: TypeParameterNode): void {
this.visitIdentifierExpression(node.name);
let extendsType = node.extendsType;
diff --git a/src/flow.ts b/src/flow.ts
index 3f4838ab3d..ddc7941916 100644
--- a/src/flow.ts
+++ b/src/flow.ts
@@ -31,7 +31,8 @@ import {
TypedElement,
mangleInternalName,
Property,
- PropertyPrototype
+ PropertyPrototype,
+ TypeDefinition
} from "./program";
import {
@@ -145,6 +146,8 @@ export const enum FlowFlags {
UncheckedContext = 1 << 15,
/** This is a flow compiling a constructor parameter. */
CtorParamContext = 1 << 16,
+ /** This is a flow where all function calls are inlined if possible. */
+ InlineContext = 1 << 17,
// masks
@@ -250,6 +253,8 @@ export class Flow {
breakLabel: string | null = null;
/** Scoped local variables. */
scopedLocals: Map | null = null;
+ /** Scoped type alias. */
+ scopedTypeAlias: Map | null = null;
/** Local flags. */
localFlags: LocalFlags[] = [];
/** Field flags on `this`. Constructors only. */
@@ -405,6 +410,38 @@ export class Flow {
falseFlows.set(condExpr, falseFlow);
}
+ addScopedTypeAlias(name: string, definition: TypeDefinition): void {
+ let scopedTypeAlias = this.scopedTypeAlias;
+ if (!scopedTypeAlias) this.scopedTypeAlias = scopedTypeAlias = new Map();
+ scopedTypeAlias.set(name, definition);
+ }
+
+ lookupScopedTypeAlias(name: string): TypeDefinition | null {
+ let current: Flow | null = this;
+ do {
+ let scopedTypeAlias = current.scopedTypeAlias;
+ if (scopedTypeAlias && scopedTypeAlias.has(name)) {
+ return assert(scopedTypeAlias.get(name));
+ }
+ current = current.parent;
+ } while (current);
+ return null;
+ }
+
+ lookupTypeAlias(name: string): TypeDefinition | null {
+ let definition: TypeDefinition | null = null;
+ if (definition = this.lookupScopedTypeAlias(name)) return definition;
+
+ let sourceParent = this.sourceFunction.parent;
+ if (sourceParent.kind == ElementKind.Function) {
+ // lookup parent function.
+ let parentFunction = sourceParent;
+ return parentFunction.flow.lookupTypeAlias(name);
+ }
+
+ return null;
+ }
+
/** Gets a free temporary local of the specified type. */
getTempLocal(type: Type): Local {
let local = this.targetFunction.addLocal(type);
diff --git a/src/glue/binaryen.d.ts b/src/glue/binaryen.d.ts
index 0c0481d263..5b693f8fa0 100644
--- a/src/glue/binaryen.d.ts
+++ b/src/glue/binaryen.d.ts
@@ -18,6 +18,7 @@ export type Op = i32;
export type ExternalKind = u32;
export type SideEffects = u32;
export type ExpressionRunnerFlags = u32;
+export type MemoryOrder = u32;
export type StringRef = Ref;
export type Pointer = Ref;
@@ -57,9 +58,6 @@ export declare function _BinaryenTypeStructref(): TypeRef;
export declare function _BinaryenTypeArrayref(): TypeRef;
export declare function _BinaryenTypeI31ref(): TypeRef;
export declare function _BinaryenTypeStringref(): TypeRef;
-export declare function _BinaryenTypeStringviewWTF8(): TypeRef;
-export declare function _BinaryenTypeStringviewWTF16(): TypeRef;
-export declare function _BinaryenTypeStringviewIter(): TypeRef;
export declare function _BinaryenTypeNullref(): TypeRef;
export declare function _BinaryenTypeNullExternref(): TypeRef;
export declare function _BinaryenTypeNullFuncref(): TypeRef;
@@ -72,9 +70,6 @@ export declare function _BinaryenHeapTypeI31(): HeapTypeRef;
export declare function _BinaryenHeapTypeStruct(): HeapTypeRef;
export declare function _BinaryenHeapTypeArray(): HeapTypeRef;
export declare function _BinaryenHeapTypeString(): HeapTypeRef;
-export declare function _BinaryenHeapTypeStringviewWTF8(): HeapTypeRef;
-export declare function _BinaryenHeapTypeStringviewWTF16(): HeapTypeRef;
-export declare function _BinaryenHeapTypeStringviewIter(): HeapTypeRef;
export declare function _BinaryenHeapTypeNone(): HeapTypeRef;
export declare function _BinaryenHeapTypeNoext(): HeapTypeRef;
export declare function _BinaryenHeapTypeNofunc(): HeapTypeRef;
@@ -101,12 +96,12 @@ export declare function _BinaryenModuleDispose(module: ModuleRef): void;
export declare function _BinaryenSizeofLiteral(): usize;
export declare function _BinaryenLiteralInt32(literalOut: LiteralRef, x: i32): void;
-export declare function _BinaryenLiteralInt64(literalOut: LiteralRef, x: i32, y: i32): void;
+export declare function _BinaryenLiteralInt64(literalOut: LiteralRef, value: i64): void;
export declare function _BinaryenLiteralFloat32(literalOut: LiteralRef, x: f32): void;
export declare function _BinaryenLiteralFloat64(literalOut: LiteralRef, x: f64): void;
export declare function _BinaryenLiteralVec128(literalOut: LiteralRef, x: ArrayRef): void;
export declare function _BinaryenLiteralFloat32Bits(literalOut: LiteralRef, x: i32): void;
-export declare function _BinaryenLiteralFloat64Bits(literalOut: LiteralRef, x: i32, y: i32): void;
+export declare function _BinaryenLiteralFloat64Bits(literalOut: LiteralRef, value: i64): void;
export declare function _BinaryenExpressionGetId(expr: ExpressionRef): ExpressionId;
export declare function _BinaryenExpressionGetType(expr: ExpressionRef): TypeRef;
@@ -234,7 +229,7 @@ export declare function _BinaryenLoadSetAlign(expr: ExpressionRef, align: u32):
export declare function _BinaryenLoadGetPtr(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenLoadSetPtr(expr: ExpressionRef, ptrExpr: ExpressionRef): void;
// ^ with atomic = true
-export declare function _BinaryenAtomicLoad(module: ModuleRef, bytes: Index, offset: Index, type: TypeRef, ptrExpr: ExpressionRef, memoryName: StringRef): ExpressionRef;
+export declare function _BinaryenAtomicLoad(module: ModuleRef, bytes: Index, offset: Index, type: TypeRef, ptrExpr: ExpressionRef, memoryName: StringRef, memoryOrder: MemoryOrder): ExpressionRef;
export declare function _BinaryenStore(module: ModuleRef, bytes: u32, offset: u32, align: u32, ptrExpr: ExpressionRef, valueExpr: ExpressionRef, type: TypeRef, memoryName: StringRef): ExpressionRef;
export declare function _BinaryenStoreIsAtomic(expr: ExpressionRef): bool;
@@ -252,15 +247,13 @@ export declare function _BinaryenStoreSetValue(expr: ExpressionRef, valueExpr: E
export declare function _BinaryenStoreGetValueType(expr: ExpressionRef): TypeRef;
export declare function _BinaryenStoreSetValueType(expr: ExpressionRef, valueType: TypeRef): void;
// ^ with atomic = true
-export declare function _BinaryenAtomicStore(module: ModuleRef, bytes: Index, offset: Index, ptrExpr: ExpressionRef, valueExpr: ExpressionRef, type: TypeRef, memoryName: StringRef): ExpressionRef;
+export declare function _BinaryenAtomicStore(module: ModuleRef, bytes: Index, offset: Index, ptrExpr: ExpressionRef, valueExpr: ExpressionRef, type: TypeRef, memoryName: StringRef, memoryOrder: MemoryOrder): ExpressionRef;
export declare function _BinaryenConst(module: ModuleRef, value: LiteralRef): ExpressionRef;
export declare function _BinaryenConstGetValueI32(expr: ExpressionRef): i32;
export declare function _BinaryenConstSetValueI32(expr: ExpressionRef, value: i32): void;
-export declare function _BinaryenConstGetValueI64Low(expr: ExpressionRef): i32;
-export declare function _BinaryenConstSetValueI64Low(expr: ExpressionRef, value: i32): void;
-export declare function _BinaryenConstGetValueI64High(expr: ExpressionRef): i32;
-export declare function _BinaryenConstSetValueI64High(expr: ExpressionRef, value: i32): void;
+export declare function _BinaryenConstGetValueI64(expr: ExpressionRef): i64;
+export declare function _BinaryenConstSetValueI64(expr: ExpressionRef, value: i64): void;
export declare function _BinaryenConstGetValueF32(expr: ExpressionRef): f32;
export declare function _BinaryenConstSetValueF32(expr: ExpressionRef, value: f32): void;
export declare function _BinaryenConstGetValueF64(expr: ExpressionRef): f64;
@@ -274,6 +267,9 @@ export declare function _BinaryenUnarySetOp(expr: ExpressionRef, op: Op): void;
export declare function _BinaryenUnaryGetValue(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenUnarySetValue(expr: ExpressionRef, valueExpr: ExpressionRef): void;
+export declare function _BinaryenWideIntAddSub(module: ModuleRef, op: Op, leftLowExpr: ExpressionRef, leftHighExpr: ExpressionRef, rightLowExpr: ExpressionRef, rightHighExpr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenWideIntMul(module: ModuleRef, op: Op, leftExpr: ExpressionRef, rightExpr: ExpressionRef): ExpressionRef;
+
export declare function _BinaryenBinary(module: ModuleRef, op: Op, leftExpr: ExpressionRef, rightExpr: ExpressionRef): ExpressionRef;
export declare function _BinaryenBinaryGetOp(expr: ExpressionRef): Op;
export declare function _BinaryenBinarySetOp(expr: ExpressionRef, op: Op): void;
@@ -282,7 +278,7 @@ export declare function _BinaryenBinarySetLeft(expr: ExpressionRef, leftExpr: Ex
export declare function _BinaryenBinaryGetRight(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenBinarySetRight(expr: ExpressionRef, rightExpr: ExpressionRef): void;
-export declare function _BinaryenSelect(module: ModuleRef, conditionExpr: ExpressionRef, ifTrueExpr: ExpressionRef, ifFalseExpr: ExpressionRef, type: TypeRef): ExpressionRef;
+export declare function _BinaryenSelect(module: ModuleRef, conditionExpr: ExpressionRef, ifTrueExpr: ExpressionRef, ifFalseExpr: ExpressionRef): ExpressionRef;
export declare function _BinaryenSelectGetIfTrue(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenSelectSetIfTrue(expr: ExpressionRef, ifTrueExpr: ExpressionRef): void;
export declare function _BinaryenSelectGetIfFalse(expr: ExpressionRef): ExpressionRef;
@@ -302,7 +298,7 @@ export declare function _BinaryenNop(module: ModuleRef): ExpressionRef;
export declare function _BinaryenUnreachable(module: ModuleRef): ExpressionRef;
-export declare function _BinaryenAtomicRMW(module: ModuleRef, op: Op, bytes: u32, offset: u32, ptrExpr: ExpressionRef, valueExpr: ExpressionRef, type: TypeRef, memoryName: StringRef): ExpressionRef;
+export declare function _BinaryenAtomicRMW(module: ModuleRef, op: Op, bytes: u32, offset: u32, ptrExpr: ExpressionRef, valueExpr: ExpressionRef, type: TypeRef, memoryName: StringRef, memoryOrder: MemoryOrder): ExpressionRef;
export declare function _BinaryenAtomicRMWGetOp(expr: ExpressionRef): Op;
export declare function _BinaryenAtomicRMWSetOp(expr: ExpressionRef, op: Op): void;
export declare function _BinaryenAtomicRMWGetBytes(expr: ExpressionRef): u32;
@@ -314,7 +310,7 @@ export declare function _BinaryenAtomicRMWSetPtr(expr: ExpressionRef, ptrExpr: E
export declare function _BinaryenAtomicRMWGetValue(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenAtomicRMWSetValue(expr: ExpressionRef, valueExpr: ExpressionRef): void;
-export declare function _BinaryenAtomicCmpxchg(module: ModuleRef, bytes: u32, offset: u32, ptrExpr: ExpressionRef, expectedExpr: ExpressionRef, replacementExpr: ExpressionRef, type: TypeRef, memoryName: StringRef): ExpressionRef;
+export declare function _BinaryenAtomicCmpxchg(module: ModuleRef, bytes: u32, offset: u32, ptrExpr: ExpressionRef, expectedExpr: ExpressionRef, replacementExpr: ExpressionRef, type: TypeRef, memoryName: StringRef, memoryOrder: MemoryOrder): ExpressionRef;
export declare function _BinaryenAtomicCmpxchgGetBytes(expr: ExpressionRef): u32;
export declare function _BinaryenAtomicCmpxchgSetBytes(expr: ExpressionRef, bytes: u32): void;
export declare function _BinaryenAtomicCmpxchgGetOffset(expr: ExpressionRef): u32;
@@ -457,7 +453,7 @@ export declare function _BinaryenRefAsSetOp(expr: ExpressionRef, op: Op): void;
export declare function _BinaryenRefAsGetValue(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenRefAsSetValue(expr: ExpressionRef, valueExpr: ExpressionRef): void;
-export declare function _BinaryenRefFunc(module: ModuleRef, funcName: StringRef, type: TypeRef): ExpressionRef;
+export declare function _BinaryenRefFunc(module: ModuleRef, funcName: StringRef, type: HeapTypeRef): ExpressionRef;
export declare function _BinaryenRefFuncGetFunc(expr: ExpressionRef): StringRef;
export declare function _BinaryenRefFuncSetFunc(expr: ExpressionRef, funcName: StringRef): void;
@@ -617,8 +613,6 @@ export declare function _BinaryenArrayNewSetInit(expr: ExpressionRef, initExpr:
export declare function _BinaryenArrayNewGetSize(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenArrayNewSetSize(expr: ExpressionRef, sizeExpr: ExpressionRef): void;
-// TODO: BinaryenArrayNewSeg
-
export declare function _BinaryenArrayNewFixed(module: ModuleRef, type: HeapTypeRef, values: ArrayRef, numValues: Index): ExpressionRef;
export declare function _BinaryenArrayNewFixedGetNumValues(expr: ExpressionRef): Index;
export declare function _BinaryenArrayNewFixedGetValueAt(expr: ExpressionRef, index: Index): ExpressionRef;
@@ -627,6 +621,22 @@ export declare function _BinaryenArrayNewFixedAppendValue(expr: ExpressionRef, v
export declare function _BinaryenArrayNewFixedInsertValueAt(expr: ExpressionRef, index: Index, valueExpr: ExpressionRef): void;
export declare function _BinaryenArrayNewFixedRemoveValueAt(expr: ExpressionRef, index: Index): ExpressionRef;
+export declare function _BinaryenArrayNewData(module: ModuleRef, type: HeapTypeRef, name: StringRef, offset: ExpressionRef, size: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayNewDataGetSegment(expr: ExpressionRef): StringRef;
+export declare function _BinaryenArrayNewDataSetSegment(expr: ExpressionRef, segment: StringRef): void;
+export declare function _BinaryenArrayNewDataGetOffset(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayNewDataSetOffset(expr: ExpressionRef, offset: ExpressionRef): void;
+export declare function _BinaryenArrayNewDataGetSize(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayNewDataSetSize(expr: ExpressionRef, size: ExpressionRef): void;
+
+export declare function _BinaryenArrayNewElem(module: ModuleRef, type: HeapTypeRef, seg: StringRef, offset: ExpressionRef, size: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayNewElemGetSegment(expr: ExpressionRef): StringRef;
+export declare function _BinaryenArrayNewElemSetSegment(expr: ExpressionRef, segment: StringRef): void;
+export declare function _BinaryenArrayNewElemGetOffset(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayNewElemSetOffset(expr: ExpressionRef, offset: ExpressionRef): void;
+export declare function _BinaryenArrayNewElemGetSize(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayNewElemSetSize(expr: ExpressionRef, size: ExpressionRef): void;
+
export declare function _BinaryenArrayGet(module: ModuleRef, ref: ExpressionRef, index: ExpressionRef, type: TypeRef, signed: bool): ExpressionRef;
export declare function _BinaryenArrayGetGetRef(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenArrayGetSetRef(expr: ExpressionRef, refExpr: ExpressionRef): void;
@@ -647,6 +657,16 @@ export declare function _BinaryenArrayLen(module: ModuleRef, ref: ExpressionRef)
export declare function _BinaryenArrayLenGetRef(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenArrayLenSetRef(expr: ExpressionRef, refExpr: ExpressionRef): void;
+export declare function _BinaryenArrayFill(module: ModuleRef, ref: ExpressionRef, index: ExpressionRef, value: ExpressionRef, size: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayFillGetRef(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayFillSetRef(expr: ExpressionRef, refExpr: ExpressionRef): void;
+export declare function _BinaryenArrayFillGetIndex(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayFillSetIndex(expr: ExpressionRef, indexExpr: ExpressionRef): void;
+export declare function _BinaryenArrayFillGetValue(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayFillSetValue(expr: ExpressionRef, valueExpr: ExpressionRef): void;
+export declare function _BinaryenArrayFillGetSize(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayFillSetSize(expr: ExpressionRef, sizeExpr: ExpressionRef): void;
+
export declare function _BinaryenArrayCopy(module: ModuleRef, destRef: ExpressionRef, destIndex: ExpressionRef, srcRef: ExpressionRef, srcIndex: ExpressionRef, length: ExpressionRef): ExpressionRef;
export declare function _BinaryenArrayCopyGetDestRef(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenArrayCopySetDestRef(expr: ExpressionRef, destRefExpr: ExpressionRef): void;
@@ -659,22 +679,39 @@ export declare function _BinaryenArrayCopySetSrcIndex(expr: ExpressionRef, srcIn
export declare function _BinaryenArrayCopyGetLength(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenArrayCopySetLength(expr: ExpressionRef, lengthExpr: ExpressionRef): void;
-// TODO: BinaryenArrayFill
-// TODO: BinaryenArrayNewFixed
-
-export declare function _BinaryenStringNew(module: ModuleRef, op: Op, ptr: ExpressionRef, length: ExpressionRef, start: ExpressionRef, end: ExpressionRef, isTry: bool): ExpressionRef;
+export declare function _BinaryenArrayInitData(module: ModuleRef, name: StringRef, ref: ExpressionRef, index: ExpressionRef, offset: ExpressionRef, size: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayInitDataGetSegment(expr: ExpressionRef): StringRef;
+export declare function _BinaryenArrayInitDataSetSegment(expr: ExpressionRef, segment: StringRef): void;
+export declare function _BinaryenArrayInitDataGetRef(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayInitDataSetRef(expr: ExpressionRef, ref: ExpressionRef): void;
+export declare function _BinaryenArrayInitDataGetIndex(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayInitDataSetIndex(expr: ExpressionRef, index: ExpressionRef): void;
+export declare function _BinaryenArrayInitDataGetOffset(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayInitDataSetOffset(expr: ExpressionRef, offset: ExpressionRef): void;
+export declare function _BinaryenArrayInitDataGetSize(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayInitDataSetSize(expr: ExpressionRef, size: ExpressionRef): void;
+
+export declare function _BinaryenArrayInitElem(module: ModuleRef, seg: StringRef, ref: ExpressionRef, index: ExpressionRef, offset: ExpressionRef, size: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayInitElemGetSegment(expr: ExpressionRef): StringRef;
+export declare function _BinaryenArrayInitElemSetSegment(expr: ExpressionRef, segment: StringRef): void;
+export declare function _BinaryenArrayInitElemGetRef(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayInitElemSetRef(expr: ExpressionRef, ref: ExpressionRef): void;
+export declare function _BinaryenArrayInitElemGetIndex(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayInitElemSetIndex(expr: ExpressionRef, index: ExpressionRef): void;
+export declare function _BinaryenArrayInitElemGetOffset(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayInitElemSetOffset(expr: ExpressionRef, offset: ExpressionRef): void;
+export declare function _BinaryenArrayInitElemGetSize(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenArrayInitElemSetSize(expr: ExpressionRef, size: ExpressionRef): void;
+
+export declare function _BinaryenStringNew(module: ModuleRef, op: Op, ref: ExpressionRef, start: ExpressionRef): ExpressionRef;
export declare function _BinaryenStringNewGetOp(expr: ExpressionRef): Op;
export declare function _BinaryenStringNewSetOp(expr: ExpressionRef, op: Op): void;
-export declare function _BinaryenStringNewGetPtr(expr: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringNewSetPtr(expr: ExpressionRef, ptrExpr: ExpressionRef): void;
-export declare function _BinaryenStringNewGetLength(expr: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringNewSetLength(expr: ExpressionRef, lengthExpr: ExpressionRef): void;
+export declare function _BinaryenStringNewGetRef(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenStringNewSetRef(expr: ExpressionRef, ptrExpr: ExpressionRef): void;
export declare function _BinaryenStringNewGetStart(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenStringNewSetStart(expr: ExpressionRef, startExpr: ExpressionRef): void;
export declare function _BinaryenStringNewGetEnd(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenStringNewSetEnd(expr: ExpressionRef, endExpr: ExpressionRef): void;
-export declare function _BinaryenStringNewIsTry(expr: ExpressionRef): bool;
-export declare function _BinaryenStringNewSetTry(expr: ExpressionRef, isTry: bool): void;
export declare function _BinaryenStringConst(module: ExpressionRef, name: StringRef): ExpressionRef;
export declare function _BinaryenStringConstGetString(expr: ExpressionRef): StringRef;
@@ -689,10 +726,10 @@ export declare function _BinaryenStringMeasureSetRef(expr: ExpressionRef, refExp
export declare function _BinaryenStringEncode(module: ExpressionRef, op: Op, ref: ExpressionRef, ptr: ExpressionRef, start: ExpressionRef): ExpressionRef;
export declare function _BinaryenStringEncodeGetOp(expr: ExpressionRef): Op;
export declare function _BinaryenStringEncodeSetOp(expr: ExpressionRef, op: Op): void;
-export declare function _BinaryenStringEncodeGetRef(expr: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringEncodeSetRef(expr: ExpressionRef, refExpr: ExpressionRef): void;
-export declare function _BinaryenStringEncodeGetPtr(expr: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringEncodeSetPtr(expr: ExpressionRef, ptrExpr: ExpressionRef): void;
+export declare function _BinaryenStringEncodeGetStr(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenStringEncodeSetStr(expr: ExpressionRef, refExpr: ExpressionRef): void;
+export declare function _BinaryenStringEncodeGetArray(expr: ExpressionRef): ExpressionRef;
+export declare function _BinaryenStringEncodeSetArray(expr: ExpressionRef, ptrExpr: ExpressionRef): void;
export declare function _BinaryenStringEncodeGetStart(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenStringEncodeSetStart(expr: ExpressionRef, startExpr: ExpressionRef): void;
@@ -710,41 +747,13 @@ export declare function _BinaryenStringEqSetLeft(expr: ExpressionRef, leftExpr:
export declare function _BinaryenStringEqGetRight(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenStringEqSetRight(expr: ExpressionRef, rightExpr: ExpressionRef): void;
-export declare function _BinaryenStringAs(module: ExpressionRef, op: Op, ref: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringAsGetOp(expr: ExpressionRef): Op;
-export declare function _BinaryenStringAsSetOp(expr: ExpressionRef, op: Op): void;
-export declare function _BinaryenStringAsGetRef(expr: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringAsSetRef(expr: ExpressionRef, refExpr: ExpressionRef): void;
-
-export declare function _BinaryenStringWTF8Advance(module: ExpressionRef, ref: ExpressionRef, pos: ExpressionRef, bytes: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringWTF8AdvanceGetRef(expr: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringWTF8AdvanceSetRef(expr: ExpressionRef, refExpr: ExpressionRef): void;
-export declare function _BinaryenStringWTF8AdvanceGetPos(expr: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringWTF8AdvanceSetPos(expr: ExpressionRef, posExpr: ExpressionRef): void;
-export declare function _BinaryenStringWTF8AdvanceGetBytes(expr: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringWTF8AdvanceSetBytes(expr: ExpressionRef, bytesExpr: ExpressionRef): void;
-
export declare function _BinaryenStringWTF16Get(module: ExpressionRef, ref: ExpressionRef, pos: ExpressionRef): ExpressionRef;
export declare function _BinaryenStringWTF16GetGetRef(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenStringWTF16GetSetRef(expr: ExpressionRef, refExpr: ExpressionRef): void;
export declare function _BinaryenStringWTF16GetGetPos(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenStringWTF16GetSetPos(expr: ExpressionRef, posExpr: ExpressionRef): void;
-export declare function _BinaryenStringIterNext(module: ExpressionRef, ref: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringIterNextGetRef(expr: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringIterNextSetRef(expr: ExpressionRef, refExpr: ExpressionRef): void;
-
-export declare function _BinaryenStringIterMove(module: ExpressionRef, op: Op, ref: ExpressionRef, num: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringIterMoveGetOp(expr: ExpressionRef): Op;
-export declare function _BinaryenStringIterMoveSetOp(expr: ExpressionRef, op: Op): void;
-export declare function _BinaryenStringIterMoveGetRef(expr: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringIterMoveSetRef(expr: ExpressionRef, refExpr: ExpressionRef): void;
-export declare function _BinaryenStringIterMoveGetNum(expr: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringIterMoveSetNum(expr: ExpressionRef, numExpr: ExpressionRef): void;
-
-export declare function _BinaryenStringSliceWTF(module: ExpressionRef, op: Op, ref: ExpressionRef, start: ExpressionRef, end: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringSliceWTFGetOp(expr: ExpressionRef): Op;
-export declare function _BinaryenStringSliceWTFSetOp(expr: ExpressionRef, op: Op): void;
+export declare function _BinaryenStringSliceWTF(module: ExpressionRef, ref: ExpressionRef, start: ExpressionRef, end: ExpressionRef): ExpressionRef;
export declare function _BinaryenStringSliceWTFGetRef(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenStringSliceWTFSetRef(expr: ExpressionRef, refExpr: ExpressionRef): void;
export declare function _BinaryenStringSliceWTFGetStart(expr: ExpressionRef): ExpressionRef;
@@ -752,12 +761,6 @@ export declare function _BinaryenStringSliceWTFSetStart(expr: ExpressionRef, sta
export declare function _BinaryenStringSliceWTFGetEnd(expr: ExpressionRef): ExpressionRef;
export declare function _BinaryenStringSliceWTFSetEnd(expr: ExpressionRef, endExpr: ExpressionRef): void;
-export declare function _BinaryenStringSliceIter(module: ExpressionRef, ref: ExpressionRef, num: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringSliceIterGetRef(expr: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringSliceIterSetRef(expr: ExpressionRef, refExpr: ExpressionRef): void;
-export declare function _BinaryenStringSliceIterGetNum(expr: ExpressionRef): ExpressionRef;
-export declare function _BinaryenStringSliceIterSetNum(expr: ExpressionRef, numExpr: ExpressionRef): void;
-
export declare function _BinaryenAddFunction(module: ModuleRef, name: StringRef, params: TypeRef, results: TypeRef, varTypes: ArrayRef, numVarTypes: Index, body: ExpressionRef): FunctionRef;
export declare function _BinaryenGetFunction(module: ModuleRef, name: StringRef): FunctionRef;
export declare function _BinaryenRemoveFunction(module: ModuleRef, name: StringRef): void;
@@ -769,12 +772,15 @@ export declare function _BinaryenFunctionGetParams(func: FunctionRef): TypeRef;
export declare function _BinaryenFunctionGetResults(func: FunctionRef): TypeRef;
export declare function _BinaryenFunctionGetNumVars(func: FunctionRef): Index;
export declare function _BinaryenFunctionGetVar(func: FunctionRef, index: Index): TypeRef;
+export declare function _BinaryenFunctionAddVar(func: FunctionRef, type: TypeRef): Index;
export declare function _BinaryenFunctionGetNumLocals(func: FunctionRef): Index;
export declare function _BinaryenFunctionHasLocalName(func: FunctionRef, index: Index): bool;
export declare function _BinaryenFunctionGetLocalName(func: FunctionRef, index: Index): StringRef;
export declare function _BinaryenFunctionSetLocalName(func: FunctionRef, index: Index, name: StringRef): void;
export declare function _BinaryenFunctionGetBody(func: FunctionRef): ExpressionRef;
export declare function _BinaryenFunctionSetBody(func: FunctionRef, bodyExpr: ExpressionRef): void;
+export declare function _BinaryenFunctionGetType(func: FunctionRef): HeapTypeRef;
+export declare function _BinaryenFunctionSetType(func: FunctionRef, type: HeapTypeRef): void;
export declare function _BinaryenFunctionOptimize(func: FunctionRef, module: ModuleRef): void;
export declare function _BinaryenFunctionRunPasses(func: FunctionRef, module: ModuleRef, passes: ArrayRef, numPasses: Index): void;
export declare function _BinaryenFunctionSetDebugLocation(func: FunctionRef, expr: ExpressionRef, fileIndex: Index, lineNumber: Index, columnNumber: Index): void;
@@ -830,6 +836,8 @@ export declare function _BinaryenTableSetInitial(table: TableRef, initial: Index
export declare function _BinaryenTableHasMax(table: TableRef): bool;
export declare function _BinaryenTableGetMax(table: TableRef): Index;
export declare function _BinaryenTableSetMax(table: TableRef, max: Index): void;
+export declare function _BinaryenTableGetType(table: TableRef): TypeRef;
+export declare function _BinaryenTableSetType(table: TableRef, type: TypeRef): void;
export declare function _BinaryenAddActiveElementSegment(module: ModuleRef, table: StringRef, name: StringRef, funcNames: ArrayRef, numFuncNames: Index, offset: ExpressionRef): ElementSegmentRef;
export declare function _BinaryenAddPassiveElementSegment(module: ModuleRef, name: StringRef, funcNames: ArrayRef, numFuncNames: Index): ElementSegmentRef;
@@ -838,13 +846,15 @@ export declare function _BinaryenGetNumElementSegments(module: ModuleRef, name:
export declare function _BinaryenGetElementSegment(module: ModuleRef, name: StringRef): ElementSegmentRef;
export declare function _BinaryenGetElementSegmentByIndex(module: ModuleRef, index: Index): ElementSegmentRef;
-export declare function _BinaryenSetMemory(module: ModuleRef, initial: Index, maximum: Index, exportName: StringRef, segments: ArrayRef>, segmentPassive: ArrayRef, segmentOffsets: ArrayRef, segmentSizes: ArrayRef, numSegments: Index, shared: bool, memory64: bool, name: StringRef): void;
+export declare function _BinaryenSetMemory(module: ModuleRef, initial: Index, maximum: Index, exportName: StringRef, segmentNames: ArrayRef, segmentDatas: ArrayRef>, segmentPassive: ArrayRef, segmentOffsets: ArrayRef, segmentSizes: ArrayRef, numSegments: Index, shared: bool, memory64: bool, name: StringRef): void;
export declare function _BinaryenGetNumMemorySegments(module: ModuleRef): Index;
-export declare function _BinaryenGetMemorySegmentByteOffset(module: ModuleRef, index: Index): u32;
-export declare function _BinaryenGetMemorySegmentByteLength(module: ModuleRef, id: Index): usize;
-export declare function _BinaryenCopyMemorySegmentData(module: ModuleRef, id: Index, buffer: ArrayRef): void;
+export declare function _BinaryenGetMemorySegmentByteOffset(module: ModuleRef, segmentName: StringRef): u32;
+export declare function _BinaryenGetMemorySegmentByteLength(module: ModuleRef, segmentName: StringRef): usize;
+export declare function _BinaryenCopyMemorySegmentData(module: ModuleRef, segmentName: StringRef, buffer: ArrayRef): void;
+export declare function _BinaryenAddDataSegment(module: ModuleRef, segmentName: StringRef, memoryName: StringRef, segmentPassive: bool, segmentOffset: ExpressionRef, segmentData: ArrayRef, segmentSize: Index): void;
export declare function _BinaryenSetStart(module: ModuleRef, start: FunctionRef): void;
+export declare function _BinaryenGetStart(module: ModuleRef): FunctionRef;
export declare function _BinaryenModuleParse(text: StringRef): ModuleRef;
export declare function _BinaryenModulePrint(module: ModuleRef): void;
@@ -852,12 +862,12 @@ export declare function _BinaryenModulePrintAsmjs(module: ModuleRef): void;
export declare function _BinaryenModuleValidate(module: ModuleRef): i32;
export declare function _BinaryenModuleOptimize(module: ModuleRef): void;
export declare function _BinaryenModuleRunPasses(module: ModuleRef, passes: ArrayRef, numPasses: Index): void;
-export declare function _BinaryenModuleAutoDrop(module: ModuleRef): void;
export declare function _BinaryenSizeofAllocateAndWriteResult(): i32;
export declare function _BinaryenModuleAllocateAndWrite(resultOut: BinaryenModuleAllocateAndWriteResultRef, module: ModuleRef, sourceMapUrl: StringRef): void;
export declare function _BinaryenModuleAllocateAndWriteText(module: ModuleRef): StringRef;
-export declare function _BinaryenModuleAllocateAndWriteStackIR(module: ModuleRef, optimize: bool): StringRef;
+export declare function _BinaryenModuleAllocateAndWriteStackIR(module: ModuleRef): StringRef;
export declare function _BinaryenModuleRead(input: ArrayRef, inputSize: usize): ModuleRef;
+export declare function _BinaryenModuleReadWithFeatures(input: ArrayRef, inputSize: usize, featureFlags: FeatureFlags): ModuleRef;
export declare function _BinaryenModuleInterpret(module: ModuleRef): void;
export declare function _BinaryenModuleAddDebugInfoFileName(module: ModuleRef, filename: StringRef): Index;
export declare function _BinaryenModuleGetDebugInfoFileName(module: ModuleRef, index: Index): StringRef;
@@ -902,15 +912,26 @@ export declare function _BinaryenGetShrinkLevel(): i32;
export declare function _BinaryenSetShrinkLevel(level: i32): void;
export declare function _BinaryenGetDebugInfo(): bool;
export declare function _BinaryenSetDebugInfo(on: bool): void;
+export declare function _BinaryenGetTrapsNeverHappen(): bool;
+export declare function _BinaryenSetTrapsNeverHappen(on: bool): void;
+export declare function _BinaryenGetClosedWorld(): bool;
+export declare function _BinaryenSetClosedWorld(on: bool): void;
export declare function _BinaryenGetLowMemoryUnused(): bool;
export declare function _BinaryenSetLowMemoryUnused(on: bool): void;
export declare function _BinaryenGetZeroFilledMemory(): bool;
export declare function _BinaryenSetZeroFilledMemory(on: bool): void;
export declare function _BinaryenGetFastMath(): bool;
export declare function _BinaryenSetFastMath(on: bool): void;
+export declare function _BinaryenGetGenerateStackIR(): bool;
+export declare function _BinaryenSetGenerateStackIR(on: bool): void;
+export declare function _BinaryenGetOptimizeStackIR(): bool;
+export declare function _BinaryenSetOptimizeStackIR(on: bool): void;
export declare function _BinaryenGetPassArgument(key: StringRef): StringRef;
export declare function _BinaryenSetPassArgument(key: StringRef, value: StringRef): void;
export declare function _BinaryenClearPassArguments(): void;
+export declare function _BinaryenHasPassToSkip(pass: StringRef): bool;
+export declare function _BinaryenAddPassToSkip(pass: StringRef): void;
+export declare function _BinaryenClearPassesToSkip(): void;
export declare function _BinaryenGetAlwaysInlineMaxSize(): Index;
export declare function _BinaryenSetAlwaysInlineMaxSize(size: Index): void;
export declare function _BinaryenGetFlexibleInlineMaxSize(): Index;
diff --git a/src/glue/binaryen.js b/src/glue/binaryen.js
index f28c35d280..c47cc5ca77 100644
--- a/src/glue/binaryen.js
+++ b/src/glue/binaryen.js
@@ -4,6 +4,7 @@
*/
import binaryen from "../../lib/binaryen.js";
+import Long from "long";
export const {
_BinaryenTypeCreate,
@@ -21,9 +22,6 @@ export const {
_BinaryenTypeStructref,
_BinaryenTypeArrayref,
_BinaryenTypeStringref,
- _BinaryenTypeStringviewWTF8,
- _BinaryenTypeStringviewWTF16,
- _BinaryenTypeStringviewIter,
_BinaryenTypeNullref,
_BinaryenTypeNullExternref,
_BinaryenTypeNullFuncref,
@@ -35,10 +33,8 @@ export const {
_BinaryenHeapTypeI31,
_BinaryenHeapTypeStruct,
_BinaryenHeapTypeArray,
+ // _BinaryenHeapTypeExn,
_BinaryenHeapTypeString,
- _BinaryenHeapTypeStringviewWTF8,
- _BinaryenHeapTypeStringviewWTF16,
- _BinaryenHeapTypeStringviewIter,
_BinaryenHeapTypeNone,
_BinaryenHeapTypeNoext,
_BinaryenHeapTypeNofunc,
@@ -65,12 +61,10 @@ export const {
_BinaryenSizeofLiteral,
_BinaryenLiteralInt32,
- _BinaryenLiteralInt64,
_BinaryenLiteralFloat32,
_BinaryenLiteralFloat64,
_BinaryenLiteralVec128,
_BinaryenLiteralFloat32Bits,
- _BinaryenLiteralFloat64Bits,
_BinaryenExpressionGetId,
_BinaryenExpressionGetType,
@@ -216,10 +210,6 @@ export const {
_BinaryenConst,
_BinaryenConstGetValueI32,
_BinaryenConstSetValueI32,
- _BinaryenConstGetValueI64Low,
- _BinaryenConstSetValueI64Low,
- _BinaryenConstGetValueI64High,
- _BinaryenConstSetValueI64High,
_BinaryenConstGetValueF32,
_BinaryenConstSetValueF32,
_BinaryenConstGetValueF64,
@@ -233,6 +223,9 @@ export const {
_BinaryenUnaryGetValue,
_BinaryenUnarySetValue,
+ _BinaryenWideIntAddSub,
+ _BinaryenWideIntMul,
+
_BinaryenBinary,
_BinaryenBinaryGetOp,
_BinaryenBinarySetOp,
@@ -584,6 +577,22 @@ export const {
_BinaryenArrayNewFixedInsertValueAt,
_BinaryenArrayNewFixedRemoveValueAt,
+ _BinaryenArrayNewData,
+ _BinaryenArrayNewDataGetSegment,
+ _BinaryenArrayNewDataSetSegment,
+ _BinaryenArrayNewDataGetOffset,
+ _BinaryenArrayNewDataSetOffset,
+ _BinaryenArrayNewDataGetSize,
+ _BinaryenArrayNewDataSetSize,
+
+ _BinaryenArrayNewElem,
+ _BinaryenArrayNewElemGetSegment,
+ _BinaryenArrayNewElemSetSegment,
+ _BinaryenArrayNewElemGetOffset,
+ _BinaryenArrayNewElemSetOffset,
+ _BinaryenArrayNewElemGetSize,
+ _BinaryenArrayNewElemSetSize,
+
_BinaryenArrayGet,
_BinaryenArrayGetGetRef,
_BinaryenArrayGetSetRef,
@@ -604,6 +613,16 @@ export const {
_BinaryenArrayLenGetRef,
_BinaryenArrayLenSetRef,
+ _BinaryenArrayFill,
+ _BinaryenArrayFillGetRef,
+ _BinaryenArrayFillSetRef,
+ _BinaryenArrayFillGetIndex,
+ _BinaryenArrayFillSetIndex,
+ _BinaryenArrayFillGetValue,
+ _BinaryenArrayFillSetValue,
+ _BinaryenArrayFillGetSize,
+ _BinaryenArrayFillSetSize,
+
_BinaryenArrayCopy,
_BinaryenArrayCopyGetDestRef,
_BinaryenArrayCopySetDestRef,
@@ -616,19 +635,39 @@ export const {
_BinaryenArrayCopyGetLength,
_BinaryenArrayCopySetLength,
+ _BinaryenArrayInitData,
+ _BinaryenArrayInitDataGetSegment,
+ _BinaryenArrayInitDataSetSegment,
+ _BinaryenArrayInitDataGetRef,
+ _BinaryenArrayInitDataSetRef,
+ _BinaryenArrayInitDataGetIndex,
+ _BinaryenArrayInitDataSetIndex,
+ _BinaryenArrayInitDataGetOffset,
+ _BinaryenArrayInitDataSetOffset,
+ _BinaryenArrayInitDataGetSize,
+ _BinaryenArrayInitDataSetSize,
+
+ _BinaryenArrayInitElem,
+ _BinaryenArrayInitElemGetSegment,
+ _BinaryenArrayInitElemSetSegment,
+ _BinaryenArrayInitElemGetRef,
+ _BinaryenArrayInitElemSetRef,
+ _BinaryenArrayInitElemGetIndex,
+ _BinaryenArrayInitElemSetIndex,
+ _BinaryenArrayInitElemGetOffset,
+ _BinaryenArrayInitElemSetOffset,
+ _BinaryenArrayInitElemGetSize,
+ _BinaryenArrayInitElemSetSize,
+
_BinaryenStringNew,
_BinaryenStringNewGetOp,
_BinaryenStringNewSetOp,
- _BinaryenStringNewGetPtr,
- _BinaryenStringNewSetPtr,
- _BinaryenStringNewGetLength,
- _BinaryenStringNewSetLength,
+ _BinaryenStringNewGetRef,
+ _BinaryenStringNewSetRef,
_BinaryenStringNewGetStart,
_BinaryenStringNewSetStart,
_BinaryenStringNewGetEnd,
_BinaryenStringNewSetEnd,
- _BinaryenStringNewIsTry,
- _BinaryenStringNewSetTry,
_BinaryenStringConst,
_BinaryenStringConstGetString,
@@ -643,10 +682,10 @@ export const {
_BinaryenStringEncode,
_BinaryenStringEncodeGetOp,
_BinaryenStringEncodeSetOp,
- _BinaryenStringEncodeGetRef,
- _BinaryenStringEncodeSetRef,
- _BinaryenStringEncodeGetPtr,
- _BinaryenStringEncodeSetPtr,
+ _BinaryenStringEncodeGetStr,
+ _BinaryenStringEncodeSetStr,
+ _BinaryenStringEncodeGetArray,
+ _BinaryenStringEncodeSetArray,
_BinaryenStringEncodeGetStart,
_BinaryenStringEncodeSetStart,
@@ -664,41 +703,13 @@ export const {
_BinaryenStringEqGetRight,
_BinaryenStringEqSetRight,
- _BinaryenStringAs,
- _BinaryenStringAsGetOp,
- _BinaryenStringAsSetOp,
- _BinaryenStringAsGetRef,
- _BinaryenStringAsSetRef,
-
- _BinaryenStringWTF8Advance,
- _BinaryenStringWTF8AdvanceGetRef,
- _BinaryenStringWTF8AdvanceSetRef,
- _BinaryenStringWTF8AdvanceGetPos,
- _BinaryenStringWTF8AdvanceSetPos,
- _BinaryenStringWTF8AdvanceGetBytes,
- _BinaryenStringWTF8AdvanceSetBytes,
-
_BinaryenStringWTF16Get,
_BinaryenStringWTF16GetGetRef,
_BinaryenStringWTF16GetSetRef,
_BinaryenStringWTF16GetGetPos,
_BinaryenStringWTF16GetSetPos,
- _BinaryenStringIterNext,
- _BinaryenStringIterNextGetRef,
- _BinaryenStringIterNextSetRef,
-
- _BinaryenStringIterMove,
- _BinaryenStringIterMoveGetOp,
- _BinaryenStringIterMoveSetOp,
- _BinaryenStringIterMoveGetRef,
- _BinaryenStringIterMoveSetRef,
- _BinaryenStringIterMoveGetNum,
- _BinaryenStringIterMoveSetNum,
-
_BinaryenStringSliceWTF,
- _BinaryenStringSliceWTFGetOp,
- _BinaryenStringSliceWTFSetOp,
_BinaryenStringSliceWTFGetRef,
_BinaryenStringSliceWTFSetRef,
_BinaryenStringSliceWTFGetStart,
@@ -706,12 +717,6 @@ export const {
_BinaryenStringSliceWTFGetEnd,
_BinaryenStringSliceWTFSetEnd,
- _BinaryenStringSliceIter,
- _BinaryenStringSliceIterGetRef,
- _BinaryenStringSliceIterSetRef,
- _BinaryenStringSliceIterGetNum,
- _BinaryenStringSliceIterSetNum,
-
_BinaryenAddFunction,
_BinaryenGetFunction,
_BinaryenRemoveFunction,
@@ -723,12 +728,15 @@ export const {
_BinaryenFunctionGetResults,
_BinaryenFunctionGetNumVars,
_BinaryenFunctionGetVar,
+ _BinaryenFunctionAddVar,
_BinaryenFunctionGetNumLocals,
_BinaryenFunctionHasLocalName,
_BinaryenFunctionGetLocalName,
_BinaryenFunctionSetLocalName,
_BinaryenFunctionGetBody,
_BinaryenFunctionSetBody,
+ _BinaryenFunctionGetType,
+ _BinaryenFunctionSetType,
_BinaryenFunctionOptimize,
_BinaryenFunctionRunPasses,
_BinaryenFunctionSetDebugLocation,
@@ -784,6 +792,8 @@ export const {
_BinaryenTableHasMax,
_BinaryenTableGetMax,
_BinaryenTableSetMax,
+ _BinaryenTableGetType,
+ _BinaryenTableSetType,
_BinaryenAddActiveElementSegment,
_BinaryenAddPassiveElementSegment,
@@ -797,8 +807,10 @@ export const {
_BinaryenGetMemorySegmentByteOffset,
_BinaryenGetMemorySegmentByteLength,
_BinaryenCopyMemorySegmentData,
+ _BinaryenAddDataSegment,
_BinaryenSetStart,
+ _BinaryenGetStart,
_BinaryenModuleParse,
_BinaryenModulePrint,
@@ -806,12 +818,12 @@ export const {
_BinaryenModuleValidate,
_BinaryenModuleOptimize,
_BinaryenModuleRunPasses,
- _BinaryenModuleAutoDrop,
_BinaryenSizeofAllocateAndWriteResult,
_BinaryenModuleAllocateAndWrite,
_BinaryenModuleAllocateAndWriteText,
_BinaryenModuleAllocateAndWriteStackIR,
_BinaryenModuleRead,
+ _BinaryenModuleReadWithFeatures,
_BinaryenModuleInterpret,
_BinaryenModuleAddDebugInfoFileName,
_BinaryenModuleGetDebugInfoFileName,
@@ -856,15 +868,26 @@ export const {
_BinaryenSetShrinkLevel,
_BinaryenGetDebugInfo,
_BinaryenSetDebugInfo,
+ _BinaryenGetTrapsNeverHappen,
+ _BinaryenSetTrapsNeverHappen,
+ _BinaryenGetClosedWorld,
+ _BinaryenSetClosedWorld,
_BinaryenGetLowMemoryUnused,
_BinaryenSetLowMemoryUnused,
_BinaryenGetZeroFilledMemory,
_BinaryenSetZeroFilledMemory,
_BinaryenGetFastMath,
_BinaryenSetFastMath,
+ _BinaryenGetGenerateStackIR,
+ _BinaryenSetGenerateStackIR,
+ _BinaryenGetOptimizeStackIR,
+ _BinaryenSetOptimizeStackIR,
_BinaryenGetPassArgument,
_BinaryenSetPassArgument,
_BinaryenClearPassArguments,
+ _BinaryenHasPassToSkip,
+ _BinaryenAddPassToSkip,
+ _BinaryenClearPassesToSkip,
_BinaryenGetAlwaysInlineMaxSize,
_BinaryenSetAlwaysInlineMaxSize,
_BinaryenGetFlexibleInlineMaxSize,
@@ -893,4 +916,32 @@ export const {
} = binaryen;
+// Shims for C-API functions whose Emscripten binding now uses BigInt for i64
+// parameters (built with -sWASM_BIGINT). In portable/JS mode AssemblyScript
+// represents i64 as Long, so we convert between Long and BigInt here.
+
+function toBigInt(long) {
+ return (BigInt(long.high | 0) << 32n) | BigInt(long.low >>> 0);
+}
+
+function toLong(bign) {
+ return Long.fromBits(Number(bign & 0xFFFFFFFFn) | 0, Number(bign >> 32n) | 0);
+}
+
+export function _BinaryenLiteralInt64(lit, val) {
+ return binaryen._BinaryenLiteralInt64(lit, toBigInt(val));
+}
+
+export function _BinaryenLiteralFloat64Bits(lit, val) {
+ return binaryen._BinaryenLiteralFloat64Bits(lit, toBigInt(val));
+}
+
+export function _BinaryenConstGetValueI64(expr) {
+ return toLong(binaryen._BinaryenConstGetValueI64(expr));
+}
+
+export function _BinaryenConstSetValueI64(expr, val) {
+ binaryen._BinaryenConstSetValueI64(expr, toBigInt(val));
+}
+
export default binaryen;
diff --git a/src/glue/js/float.d.ts b/src/glue/js/float.d.ts
index 8694f03b52..b116ad846c 100644
--- a/src/glue/js/float.d.ts
+++ b/src/glue/js/float.d.ts
@@ -7,3 +7,4 @@ declare function f32_as_i32(value: f32): i32;
declare function i32_as_f32(value: i32): f32;
declare function f64_as_i64(value: f64): i64;
declare function i64_as_f64(value: i64): f64;
+declare function f64_pow(value: f64, exponent: f64): f64;
diff --git a/src/glue/js/float.js b/src/glue/js/float.js
index 090af6cf96..6b68fdfef1 100644
--- a/src/glue/js/float.js
+++ b/src/glue/js/float.js
@@ -3,6 +3,8 @@
* @license Apache-2.0
*/
+import { f64_pow } from "as-float";
+
/* eslint-disable no-undef */
const F64 = new Float64Array(1);
@@ -29,3 +31,5 @@ globalThis.i64_as_f64 = function i64_as_f64(value) {
I32[1] = i64_high(value);
return F64[0];
};
+
+globalThis.f64_pow = f64_pow;
diff --git a/src/index-wasm.ts b/src/index-wasm.ts
index ec51de73da..b448aa0ae4 100644
--- a/src/index-wasm.ts
+++ b/src/index-wasm.ts
@@ -201,7 +201,9 @@ export const FEATURE_RELAXED_SIMD = Feature.RelaxedSimd;
/** Extended const expressions. */
export const FEATURE_EXTENDED_CONST = Feature.ExtendedConst;
/** String references. */
-export const FEATURE_STRINGREF = Feature.Stringref;
+export const FEATURE_STRINGREF = Feature.Strings;
+/** Shared-everything threads. */
+export const FEATURE_SHARED_EVERYTHING = Feature.SharedEverything;
/** All features. */
export const FEATURES_ALL = Feature.All;
/** Default features. */
diff --git a/src/module.ts b/src/module.ts
index 55b2af6014..def4e780bf 100644
--- a/src/module.ts
+++ b/src/module.ts
@@ -78,9 +78,6 @@ export namespace TypeRef {
export const Arrayref = binaryen._BinaryenTypeArrayref();
export const I31ref = binaryen._BinaryenTypeI31ref();
export const Stringref = binaryen._BinaryenTypeStringref();
- export const StringviewWTF8 = binaryen._BinaryenTypeStringviewWTF8();
- export const StringviewWTF16 = binaryen._BinaryenTypeStringviewWTF16();
- export const StringviewIter = binaryen._BinaryenTypeStringviewIter();
export const Noneref = binaryen._BinaryenTypeNullref();
export const Nofuncref = binaryen._BinaryenTypeNullFuncref();
export const Noexternref = binaryen._BinaryenTypeNullExternref();
@@ -102,20 +99,18 @@ export namespace HeapTypeRef {
//
// where (...) represents the concrete subtypes
- export const Extern: HeapTypeRef = 0 /* _BinaryenHeapTypeExt */;
- export const Func: HeapTypeRef = 1 /* _BinaryenHeapTypeFunc */;
- export const Any: HeapTypeRef = 2 /* _BinaryenHeapTypeAny */;
- export const Eq: HeapTypeRef = 3 /* _BinaryenHeapTypeEq */;
- export const I31: HeapTypeRef = 4 /* _BinaryenHeapTypeI31 */;
- export const Struct: HeapTypeRef = 5 /* _BinaryenHeapTypeStruct */;
- export const Array: HeapTypeRef = 6 /* _BinaryenHeapTypeArray */;
- export const String: HeapTypeRef = 7 /* _BinaryenHeapTypeString */;
- export const StringviewWTF8: HeapTypeRef = 8 /* _BinaryenHeapTypeStringviewWTF8 */;
- export const StringviewWTF16: HeapTypeRef = 9 /* _BinaryenHeapTypeStringviewWTF16 */;
- export const StringviewIter: HeapTypeRef = 10 /* _BinaryenHeapTypeStringviewIter */;
- export const None: HeapTypeRef = 11 /* _BinaryenHeapTypeNone */;
- export const Noextern: HeapTypeRef = 12 /* _BinaryenHeapTypeNoext */;
- export const Nofunc: HeapTypeRef = 13 /* _BinaryenHeapTypeNofunc */;
+ export const Extern: HeapTypeRef = 8 /* _BinaryenHeapTypeExt */;
+ export const Func: HeapTypeRef = 16 /* _BinaryenHeapTypeFunc */;
+ export const Any: HeapTypeRef = 32 /* _BinaryenHeapTypeAny */;
+ export const Eq: HeapTypeRef = 40 /* _BinaryenHeapTypeEq */;
+ export const I31: HeapTypeRef = 48 /* _BinaryenHeapTypeI31 */;
+ export const Struct: HeapTypeRef = 56 /* _BinaryenHeapTypeStruct */;
+ export const Array: HeapTypeRef = 64 /* _BinaryenHeapTypeArray */;
+ export const Exn: HeapTypeRef = 7 /* TODO: BinaryenHeapTypeExn */;
+ export const String: HeapTypeRef = 80 /* _BinaryenHeapTypeString */;
+ export const None: HeapTypeRef = 88 /* _BinaryenHeapTypeNone */;
+ export const Noextern: HeapTypeRef = 96 /* _BinaryenHeapTypeNoext */;
+ export const Nofunc: HeapTypeRef = 104 /* _BinaryenHeapTypeNofunc */;
export function isBottom(ht: HeapTypeRef): bool {
return binaryen._BinaryenHeapTypeIsBottom(ht);
@@ -141,7 +136,7 @@ export namespace HeapTypeRef {
b = t;
}
switch (a) {
- case HeapTypeRef.Extern:
+ case HeapTypeRef.Extern: return b == HeapTypeRef.String ? a : -1;
case HeapTypeRef.Func: return -1;
case HeapTypeRef.Any: return a;
case HeapTypeRef.Eq: {
@@ -159,11 +154,7 @@ export namespace HeapTypeRef {
? HeapTypeRef.Eq
: HeapTypeRef.Any;
}
- case HeapTypeRef.Array:
- case HeapTypeRef.String:
- case HeapTypeRef.StringviewWTF8:
- case HeapTypeRef.StringviewWTF16:
- case HeapTypeRef.StringviewIter: return HeapTypeRef.Any;
+ case HeapTypeRef.Array: return HeapTypeRef.Any;
}
assert(false);
return -1;
@@ -219,12 +210,22 @@ export const enum FeatureFlags {
Memory64 = 2048 /* _BinaryenFeatureMemory64 */,
RelaxedSIMD = 4096 /* _BinaryenFeatureRelaxedSIMD */,
ExtendedConst = 8192 /* _BinaryenFeatureExtendedConst */,
- Stringref = 16384 /* _BinaryenFeatureStrings */,
+ Strings = 16384 /* _BinaryenFeatureStrings */,
MultiMemory = 32768 /* _BinaryenFeatureMultiMemory */,
- All = 131071 /* _BinaryenFeatureAll */
+ StackSwitching = 65536 /* _BinaryenFeatureStackSwitching */,
+ SharedEverything = 131072 /* _BinaryenFeatureSharedEverything */,
+ FP16 = 262144 /* _BinaryenFeatureFP16 */,
+ BulkMemoryOpt = 524288 /* _BinaryenFeatureBulkMemoryOpt */,
+ CallIndirectOverlong = 1048576 /* _BinaryenFeatureCallIndirectOverlong */,
+ RelaxedAtomics = 4194304 /* _BinaryenFeatureRelaxedAtomics */,
+ CustomPageSizes = 8388608 /* _BinaryenFeatureCustomPageSizes */,
+ Multibyte = 16777216 /* _BinaryenFeatureMultibyte */,
+ WideArithmetic = 33554432 /* _BinaryenFeatureWideArithmetic */,
+ CompactImports = 67108864 /* _BinaryenFeatureCompactImports */,
+ All = 134217727 /* _BinaryenFeatureAll */
}
-/** Binaryen expression id constants. */
+/** Binaryen expression id constants. See wasm-delegations.def in Binaryen. */
export const enum ExpressionId {
Invalid = 0 /* _BinaryenInvalidId */,
Block = 1 /* _BinaryenBlockId */,
@@ -255,64 +256,85 @@ export const enum ExpressionId {
AtomicWait = 26 /* _BinaryenAtomicWaitId */,
AtomicNotify = 27 /* _BinaryenAtomicNotifyId */,
AtomicFence = 28 /* _BinaryenAtomicFenceId */,
- SIMDExtract = 29 /* _BinaryenSIMDExtractId */,
- SIMDReplace = 30 /* _BinaryenSIMDReplaceId */,
- SIMDShuffle = 31 /* _BinaryenSIMDShuffleId */,
- SIMDTernary = 32 /* _BinaryenSIMDTernaryId */,
- SIMDShift = 33 /* _BinaryenSIMDShiftId */,
- SIMDLoad = 34 /* _BinaryenSIMDLoadId */,
- SIMDLoadStoreLane = 35 /* _BinaryenSIMDLoadStoreLaneId */,
- MemoryInit = 36 /* _BinaryenMemoryInitId */,
- DataDrop = 37 /* _BinaryenDataDropId */,
- MemoryCopy = 38 /* _BinaryenMemoryCopyId */,
- MemoryFill = 39 /* _BinaryenMemoryFillId */,
- Pop = 40 /* _BinaryenPopId */,
- RefNull = 41 /* _BinaryenRefNullId */,
- RefIsNull = 42 /* _BinaryenRefIsNullId */,
- RefFunc = 43 /* _BinaryenRefFuncId */,
- RefEq = 44 /* _BinaryenRefEqId */,
- TableGet = 45 /* _BinaryenTableGetId */,
- TableSet = 46 /* _BinaryenTableSetId */,
- TableSize = 47 /* _BinaryenTableSizeId */,
- TableGrow = 48 /* _BinaryenTableGrowId */,
- Try = 50 /* _BinaryenTryId */,
- Throw = 51 /* _BinaryenThrowId */,
- Rethrow = 52 /* _BinaryenRethrowId */,
- TupleMake = 53 /* _BinaryenTupleMakeId */,
- TupleExtract = 54 /* _BinaryenTupleExtractId */,
- RefI31 = 55 /* _BinaryenRefI31Id */,
- I31Get = 56 /* _BinaryenI31GetId */,
- CallRef = 57 /* _BinaryenCallRefId */,
- RefTest = 58 /* _BinaryenRefTestId */,
- RefCast = 59 /* _BinaryenRefCastId */,
- BrOn = 60 /* _BinaryenBrOnId */,
- StructNew = 61 /* _BinaryenStructNewId */,
- StructGet = 62 /* _BinaryenStructGetId */,
- StructSet = 63 /* _BinaryenStructSetId */,
- ArrayNew = 64 /* _BinaryenArrayNewId */,
- ArrayNewSeg = 64 /* TODO_BinaryenArraySegId */,
- ArrayNewFixed = 67 /* _BinaryenArrayNewFixedId */,
- ArrayGet = 68 /* _BinaryenArrayGetId */,
- ArraySet = 69 /* _BinaryenArraySetId */,
- ArrayLen = 70 /* _BinaryenArrayLenId */,
- ArrayCopy = 71 /* _BinaryenArrayCopyId */,
- ArrayFill = 72 /* _BinaryenArrayFillId */,
- ArrayInitData = 73 /* _BinaryenArrayInitDataId */,
- ArrayInitElem = 74 /* _BinaryenArrayInitElemId */,
- RefAs = 75 /* _BinaryenRefAsId */,
- StringNew = 76 /* _BinaryenStringNewId */,
- StringConst = 77 /* _BinaryenStringConstId */,
- StringMeasure = 78 /* _BinaryenStringMeasureId */,
- StringEncode = 79 /* _BinaryenStringEncodeId */,
- StringConcat = 80 /* _BinaryenStringConcatId */,
- StringEq = 81 /* _BinaryenStringEqId */,
- StringAs = 82 /* _BinaryenStringAsId */,
- StringWTF8Advance = 83 /* _BinaryenStringWTF8AdvanceId */,
- StringWTF16Get = 84 /* _BinaryenStringWTF16GetId */,
- StringIterNext = 85 /* _BinaryenStringIterNextId */,
- StringIterMove = 86 /* _BinaryenStringIterMoveId */,
- StringSliceWTF = 87 /* _BinaryenStringSliceWTFId */,
- StringSliceIter = 88 /* _BinaryenStringSliceIterId */
+ Pause = 29 /* _BinaryenPauseId */,
+ SIMDExtract = 30 /* _BinaryenSIMDExtractId */,
+ SIMDReplace = 31 /* _BinaryenSIMDReplaceId */,
+ SIMDShuffle = 32 /* _BinaryenSIMDShuffleId */,
+ SIMDTernary = 33 /* _BinaryenSIMDTernaryId */,
+ SIMDShift = 34 /* _BinaryenSIMDShiftId */,
+ SIMDLoad = 35 /* _BinaryenSIMDLoadId */,
+ SIMDLoadStoreLane = 36 /* _BinaryenSIMDLoadStoreLaneId */,
+ MemoryInit = 37 /* _BinaryenMemoryInitId */,
+ DataDrop = 38 /* _BinaryenDataDropId */,
+ MemoryCopy = 39 /* _BinaryenMemoryCopyId */,
+ MemoryFill = 40 /* _BinaryenMemoryFillId */,
+ Pop = 41 /* _BinaryenPopId */,
+ RefNull = 42 /* _BinaryenRefNullId */,
+ RefIsNull = 43 /* _BinaryenRefIsNullId */,
+ RefFunc = 44 /* _BinaryenRefFuncId */,
+ RefEq = 45 /* _BinaryenRefEqId */,
+ TableGet = 46 /* _BinaryenTableGetId */,
+ TableSet = 47 /* _BinaryenTableSetId */,
+ TableSize = 48 /* _BinaryenTableSizeId */,
+ TableGrow = 49 /* _BinaryenTableGrowId */,
+ TableFill = 50 /* _BinaryenTableFillId */,
+ TableCopy = 51 /* _BinaryenTableCopyId */,
+ TableInit = 52 /* _BinaryenTableInitId */,
+ ElemDrop = 53 /* _BinaryenElemDropId */,
+ Try = 54 /* _BinaryenTryId */,
+ TryTable = 55 /* _BinaryenTryTableId */,
+ Throw = 56 /* _BinaryenThrowId */,
+ Rethrow = 57 /* _BinaryenRethrowId */,
+ ThrowRef = 58 /* _BinaryenThrowRefId */,
+ TupleMake = 59 /* _BinaryenTupleMakeId */,
+ TupleExtract = 60 /* _BinaryenTupleExtractId */,
+ RefI31 = 61 /* _BinaryenRefI31Id */,
+ I31Get = 62 /* _BinaryenI31GetId */,
+ CallRef = 63 /* _BinaryenCallRefId */,
+ RefTest = 64 /* _BinaryenRefTestId */,
+ RefCast = 65 /* _BinaryenRefCastId */,
+ RefGetDesc = 66 /* _BinaryenRefGetDescId */,
+ BrOn = 67 /* _BinaryenBrOnId */,
+ StructNew = 68 /* _BinaryenStructNewId */,
+ StructGet = 69 /* _BinaryenStructGetId */,
+ StructSet = 70 /* _BinaryenStructSetId */,
+ StructRMW = 71 /* _BinaryenStructRMWId */,
+ StructCmpxchg = 72 /* _BinaryenStructCmpxchgId */,
+ ArrayNew = 73 /* _BinaryenArrayNewId */,
+ ArrayNewData = 74 /* _BinaryenArrayNewDataId */,
+ ArrayNewElem = 75 /* _BinaryenArrayNewElemId */,
+ ArrayNewFixed = 76 /* _BinaryenArrayNewFixedId */,
+ ArrayGet = 77 /* _BinaryenArrayGetId */,
+ ArraySet = 78 /* _BinaryenArraySetId */,
+ ArrayLoad = 79 /* _BinaryenArrayLoadId */,
+ ArrayStore = 80 /* _BinaryenArrayStoreId */,
+ ArrayLen = 81 /* _BinaryenArrayLenId */,
+ ArrayCopy = 82 /* _BinaryenArrayCopyId */,
+ ArrayFill = 83 /* _BinaryenArrayFillId */,
+ ArrayInitData = 84 /* _BinaryenArrayInitDataId */,
+ ArrayInitElem = 85 /* _BinaryenArrayInitElemId */,
+ ArrayRMW = 86 /* _BinaryenArrayRMWId */,
+ ArrayCmpxchg = 87 /* _BinaryenArrayCmpxchgId */,
+ RefAs = 88 /* _BinaryenRefAsId */,
+ StringNew = 89 /* _BinaryenStringNewId */,
+ StringConst = 90 /* _BinaryenStringConstId */,
+ StringMeasure = 91 /* _BinaryenStringMeasureId */,
+ StringEncode = 92 /* _BinaryenStringEncodeId */,
+ StringConcat = 93 /* _BinaryenStringConcatId */,
+ StringEq = 94 /* _BinaryenStringEqId */,
+ StringTest = 95 /* _BinaryenStringTestId */,
+ StringWTF16Get = 96 /* _BinaryenStringWTF16GetId */,
+ StringSliceWTF = 97 /* _BinaryenStringSliceWTFId */,
+ ContNew = 98 /* _BinaryenContNewId */,
+ ContBind = 99 /* _BinaryenContBindId */,
+ Suspend = 100 /* _BinaryenSuspendId */,
+ Resume = 101 /* _BinaryenResumeId */,
+ ResumeThrow = 102 /* _BinaryenResumeThrowId */,
+ StackSwitch = 103 /* _BinaryenStackSwitchId */,
+ StructWait = 104 /* _BinaryenStructWaitId */,
+ StructNotify = 105 /* _BinaryenStructNotifyId */,
+ WideIntAddSub = 106 /* _BinaryenWideIntAddSubId */,
+ WideIntMul = 107 /* _BinaryenWideIntMulId */
}
/** Binaryen external kind constants. */
@@ -324,6 +346,16 @@ export const enum ExternalKind {
Tag = 4 /* _BinaryenExternalTag */
}
+/** Binaryen memory order constants for atomic operations. */
+export const enum MemoryOrder {
+ /** Non-atomic access. */
+ Unordered = 0 /* _BinaryenMemoryOrderUnordered */,
+ /** Sequentially consistent atomic memory operation. */
+ SeqCst = 1 /* _BinaryenMemoryOrderSeqCst */,
+ /** Acquire/Release atomic memory operation; acquire for loads, release for stores. */
+ AcqRel = 2 /* _BinaryenMemoryOrderAcqRel */
+}
+
/** Binaryen unary operation constants. */
export const enum UnaryOp {
/** i32.clz */
@@ -505,99 +537,104 @@ export const enum UnaryOp {
AllTrueI64x2 = 83 /* _BinaryenAllTrueVecI64x2 */,
/** i64x2.bitmask */
BitmaskI64x2 = 84 /* _BinaryenBitmaskVecI64x2 */,
+ // FIXME: f16x8 abs/neg/sqrt/ceil/floor/trunc/nearest (85..91) are in wasm.h but not yet exported via C API
/** f32x4.abs */
- AbsF32x4 = 85 /* _BinaryenAbsVecF32x4 */,
+ AbsF32x4 = 92 /* _BinaryenAbsVecF32x4 */,
/** f32x4.neg */
- NegF32x4 = 86 /* _BinaryenNegVecF32x4 */,
+ NegF32x4 = 93 /* _BinaryenNegVecF32x4 */,
/** f32x4.sqrt */
- SqrtF32x4 = 87 /* _BinaryenSqrtVecF32x4 */,
+ SqrtF32x4 = 94 /* _BinaryenSqrtVecF32x4 */,
/** f32x4.ceil */
- CeilF32x4 = 88 /* _BinaryenCeilVecF32x4 */,
+ CeilF32x4 = 95 /* _BinaryenCeilVecF32x4 */,
/** f32x4.floor */
- FloorF32x4 = 89 /* _BinaryenFloorVecF32x4 */,
+ FloorF32x4 = 96 /* _BinaryenFloorVecF32x4 */,
/** f32x4.trunc */
- TruncF32x4 = 90 /* BinaryenTruncVecF32x4 */,
+ TruncF32x4 = 97 /* _BinaryenTruncVecF32x4 */,
/** f32x4.nearest */
- NearestF32x4 = 91 /* BinaryenNearestVecF32x4 */,
+ NearestF32x4 = 98 /* _BinaryenNearestVecF32x4 */,
/** f64x2.abs */
- AbsF64x2 = 92 /* _BinaryenAbsVecF64x2 */,
+ AbsF64x2 = 99 /* _BinaryenAbsVecF64x2 */,
/** f64x2.neg */
- NegF64x2 = 93 /* _BinaryenNegVecF64x2 */,
+ NegF64x2 = 100 /* _BinaryenNegVecF64x2 */,
/** f64x2.sqrt */
- SqrtF64x2 = 94 /* _BinaryenSqrtVecF64x2 */,
+ SqrtF64x2 = 101 /* _BinaryenSqrtVecF64x2 */,
/** f64x2.ceil */
- CeilF64x2 = 95 /* _BinaryenCeilVecF64x2 */,
+ CeilF64x2 = 102 /* _BinaryenCeilVecF64x2 */,
/** f64x2.floor */
- FloorF64x2 = 96 /* _BinaryenFloorVecF64x2 */,
+ FloorF64x2 = 103 /* _BinaryenFloorVecF64x2 */,
/** f64x2.trunc */
- TruncF64x2 = 97 /* _BinaryenTruncVecF64x2 */,
+ TruncF64x2 = 104 /* _BinaryenTruncVecF64x2 */,
/** f64x2.nearest */
- NearestF64x2 = 98 /* _BinaryenNearestVecF64x2 */,
+ NearestF64x2 = 105 /* _BinaryenNearestVecF64x2 */,
/** i16x8.extadd_pairwise_i8x16_s */
- ExtaddPairwiseI8x16ToI16x8 = 99 /* _BinaryenExtAddPairwiseSVecI8x16ToI16x8 */,
+ ExtaddPairwiseI8x16ToI16x8 = 106 /* _BinaryenExtAddPairwiseSVecI8x16ToI16x8 */,
/** i16x8.extadd_pairwise.i8x16_u */
- ExtaddPairwiseU8x16ToU16x8 = 100 /* _BinaryenExtAddPairwiseUVecI8x16ToI16x8 */,
+ ExtaddPairwiseU8x16ToU16x8 = 107 /* _BinaryenExtAddPairwiseUVecI8x16ToI16x8 */,
/** i32x4.extadd_pairwise.i16x8_s */
- ExtaddPairwiseI16x8ToI32x4 = 101 /* _BinaryenExtAddPairwiseSVecI16x8ToI32x4 */,
+ ExtaddPairwiseI16x8ToI32x4 = 108 /* _BinaryenExtAddPairwiseSVecI16x8ToI32x4 */,
/** i32x4.extadd_pairwise.i64x8_u */
- ExtaddPairwiseU16x8ToU32x4 = 102 /* _BinaryenExtAddPairwiseUVecI16x8ToI32x4 */,
+ ExtaddPairwiseU16x8ToU32x4 = 109 /* _BinaryenExtAddPairwiseUVecI16x8ToI32x4 */,
/** i32x4.trunc_sat_f32x4_s */
- TruncSatF32x4ToI32x4 = 103 /* _BinaryenTruncSatSVecF32x4ToVecI32x4 */,
+ TruncSatF32x4ToI32x4 = 110 /* _BinaryenTruncSatSVecF32x4ToVecI32x4 */,
/** i32x4.trunc_sat_f32x4_u */
- TruncSatF32x4ToU32x4 = 104 /* _BinaryenTruncSatUVecF32x4ToVecI32x4 */,
+ TruncSatF32x4ToU32x4 = 111 /* _BinaryenTruncSatUVecF32x4ToVecI32x4 */,
/** f32x4.convert_i32x4_s */
- ConvertI32x4ToF32x4 = 105 /* _BinaryenConvertSVecI32x4ToVecF32x4 */,
+ ConvertI32x4ToF32x4 = 112 /* _BinaryenConvertSVecI32x4ToVecF32x4 */,
/** f32x4.convert_i32x4_u */
- ConvertU32x4ToF32x4 = 106 /* _BinaryenConvertUVecI32x4ToVecF32x4 */,
+ ConvertU32x4ToF32x4 = 113 /* _BinaryenConvertUVecI32x4ToVecF32x4 */,
/** i16x8.extend_low_i8x16_s */
- ExtendLowI8x16ToI16x8 = 107 /* _BinaryenExtendLowSVecI8x16ToVecI16x8 */,
+ ExtendLowI8x16ToI16x8 = 114 /* _BinaryenExtendLowSVecI8x16ToVecI16x8 */,
/** i16x8.extend_high_i8x16_s */
- ExtendHighI8x16ToI16x8 = 108 /* _BinaryenExtendHighSVecI8x16ToVecI16x8 */,
+ ExtendHighI8x16ToI16x8 = 115 /* _BinaryenExtendHighSVecI8x16ToVecI16x8 */,
/** i16x8.extend_low_i8x16_u */
- ExtendLowU8x16ToU16x8 = 109 /* _BinaryenExtendLowUVecI8x16ToVecI16x8 */,
+ ExtendLowU8x16ToU16x8 = 116 /* _BinaryenExtendLowUVecI8x16ToVecI16x8 */,
/** i16x8.extend_high_i8x16_u */
- ExtendHighU8x16ToU16x8 = 110 /* _BinaryenExtendHighUVecI8x16ToVecI16x8 */,
+ ExtendHighU8x16ToU16x8 = 117 /* _BinaryenExtendHighUVecI8x16ToVecI16x8 */,
/** i32x4.extend_low_i16x8_s */
- ExtendLowI16x8ToI32x4 = 111 /* _BinaryenExtendLowSVecI16x8ToVecI32x4 */,
+ ExtendLowI16x8ToI32x4 = 118 /* _BinaryenExtendLowSVecI16x8ToVecI32x4 */,
/** i32x4.extend_high_i16x8_s */
- ExtendHighI16x8ToI32x4 = 112 /* _BinaryenExtendHighSVecI16x8ToVecI32x4 */,
+ ExtendHighI16x8ToI32x4 = 119 /* _BinaryenExtendHighSVecI16x8ToVecI32x4 */,
/** i32x4.extend_low_i16x8_u */
- ExtendLowU16x8ToU32x4 = 113 /* _BinaryenExtendLowUVecI16x8ToVecI32x4 */,
+ ExtendLowU16x8ToU32x4 = 120 /* _BinaryenExtendLowUVecI16x8ToVecI32x4 */,
/** i32x4.extend_high_i16x8_u */
- ExtendHighU16x8ToU32x4 = 114 /* _BinaryenExtendHighUVecI16x8ToVecI32x4 */,
+ ExtendHighU16x8ToU32x4 = 121 /* _BinaryenExtendHighUVecI16x8ToVecI32x4 */,
/** i64x2.extend_low_i32x4_s */
- ExtendLowI32x4ToI64x2 = 115 /* _BinaryenExtendLowSVecI32x4ToVecI64x2 */,
+ ExtendLowI32x4ToI64x2 = 122 /* _BinaryenExtendLowSVecI32x4ToVecI64x2 */,
/** i64x2.extend_high_i32x4_s */
- ExtendHighI32x4ToI64x2 = 116 /* _BinaryenExtendHighSVecI32x4ToVecI64x2 */,
+ ExtendHighI32x4ToI64x2 = 123 /* _BinaryenExtendHighSVecI32x4ToVecI64x2 */,
/** i64x2.extend_low_i32x4_u */
- ExtendLowU32x4ToU64x2 = 117 /* _BinaryenExtendLowUVecI32x4ToVecI64x2 */,
+ ExtendLowU32x4ToU64x2 = 124 /* _BinaryenExtendLowUVecI32x4ToVecI64x2 */,
/** i64x2.extend_high_i32x4_u */
- ExtendHighU32x4ToU64x2 = 118 /* _BinaryenExtendHighUVecI32x4ToVecI64x2 */,
+ ExtendHighU32x4ToU64x2 = 125 /* _BinaryenExtendHighUVecI32x4ToVecI64x2 */,
/** f32x4.convert_i32x4_s */
- ConvertLowI32x4ToF64x2 = 119 /* _BinaryenConvertLowSVecI32x4ToVecF64x2 */,
+ ConvertLowI32x4ToF64x2 = 126 /* _BinaryenConvertLowSVecI32x4ToVecF64x2 */,
/** f32x4.convert_i32x4_u */
- ConvertLowU32x4ToF64x2 = 120 /* _BinaryenConvertLowUVecI32x4ToVecF64x2 */,
+ ConvertLowU32x4ToF64x2 = 127 /* _BinaryenConvertLowUVecI32x4ToVecF64x2 */,
/** i32x4.trunc_sat_f64x2_s_zero */
- TruncSatF64x2ToI32x4Zero = 121 /* _BinaryenTruncSatZeroSVecF64x2ToVecI32x4 */,
+ TruncSatF64x2ToI32x4Zero = 128 /* _BinaryenTruncSatZeroSVecF64x2ToVecI32x4 */,
/** i32x4.trunc_sat_f64x2_u_zero */
- TruncSatF64x2ToU32x4Zero = 122 /* _BinaryenTruncSatZeroUVecF64x2ToVecI32x4 */,
+ TruncSatF64x2ToU32x4Zero = 129 /* _BinaryenTruncSatZeroUVecF64x2ToVecI32x4 */,
/** f32x4.demote_f64x2_zero */
- DemoteZeroF64x2ToF32x4 = 123 /* _BinaryenDemoteZeroVecF64x2ToVecF32x4 */,
+ DemoteZeroF64x2ToF32x4 = 130 /* _BinaryenDemoteZeroVecF64x2ToVecF32x4 */,
/** f64x2.promote_low_f32x4 */
- PromoteLowF32x4ToF64x2 = 124 /* _BinaryenPromoteLowVecF32x4ToVecF64x2 */,
-
- // see: https://github.com/WebAssembly/relaxed-simd
-
+ PromoteLowF32x4ToF64x2 = 131 /* _BinaryenPromoteLowVecF32x4ToVecF64x2 */,
/** i32x4.relaxed_trunc_f32x4_s */
- RelaxedTruncF32x4ToI32x4 = 125 /* TODO_BinaryenRelaxedTruncSVecF32x4ToVecI32x4 */,
+ RelaxedTruncF32x4ToI32x4 = 132 /* _BinaryenRelaxedTruncSVecF32x4ToVecI32x4 */,
/** i32x4.relaxed_trunc_f32x4_u */
- RelaxedTruncF32x4ToU32x4 = 126 /* TODO_BinaryenRelaxedTruncUVecF32x4ToVecI32x4 */,
+ RelaxedTruncF32x4ToU32x4 = 133 /* _BinaryenRelaxedTruncUVecF32x4ToVecI32x4 */,
/** i32x4.relaxed_trunc_f64x2_s_zero */
- RelaxedTruncF64x2ToI32x4Zero = 127 /* TODO_BinaryenRelaxedTruncZeroSVecF64x2ToVecI32x4 */,
+ RelaxedTruncF64x2ToI32x4Zero = 134 /* _BinaryenRelaxedTruncZeroSVecF64x2ToVecI32x4 */,
/** i32x4.relaxed_trunc_f64x2_u_zero */
- RelaxedTruncF64x2ToU32x4Zero = 128 /* TODO_BinaryenRelaxedTruncZeroUVecF64x2ToVecI32x4 */,
+ RelaxedTruncF64x2ToU32x4Zero = 135 /* _BinaryenRelaxedTruncZeroUVecF64x2ToVecI32x4 */,
+ // FIXME: f16x8 splat/trunc_sat/convert (136..140) are in wasm.h but not yet exported via C API
+ /** f32x4.promote_low_f16x8 */
+ PromoteLowF16x8ToF32x4 = 141 /* _BinaryenPromoteLowVecF16x8ToVecF32x4 */,
+ /** f16x8.demote_f32x4_zero */
+ // DemoteZeroF32x4ToF16x8 = 142 /* TODO_BinaryenDemoteZeroVecF32x4ToVecF16x8 */,
+ /** f16x8.demote_f64x2_zero */
+ // DemoteZeroF64x2ToF16x8 = 143 /* TODO_BinaryeDemoteZeroVecF64x2ToVecF16x8 */,
- _last = RelaxedTruncF64x2ToU32x4Zero,
+ _last = PromoteLowF16x8ToF32x4,
// Target dependent
@@ -840,191 +877,190 @@ export const enum BinaryOp {
LeI64x2 = 110 /* _BinaryenLeSVecI64x2 */,
/** i64x2.ge_s */
GeI64x2 = 111 /* _BinaryenGeSVecI64x2 */,
+ // FIXME: f16x8 compare ops (eq/ne/lt/gt/le/ge = 112..117) are in wasm.h but not yet exported via C API
/** f32x4.eq */
- EqF32x4 = 112 /* _BinaryenEqVecF32x4 */,
+ EqF32x4 = 118 /* _BinaryenEqVecF32x4 */,
/** f32x4.ne */
- NeF32x4 = 113 /* _BinaryenNeVecF32x4 */,
+ NeF32x4 = 119 /* _BinaryenNeVecF32x4 */,
/** f32x4.lt */
- LtF32x4 = 114 /* _BinaryenLtVecF32x4 */,
+ LtF32x4 = 120 /* _BinaryenLtVecF32x4 */,
/** f32x4.gt */
- GtF32x4 = 115 /* _BinaryenGtVecF32x4 */,
+ GtF32x4 = 121 /* _BinaryenGtVecF32x4 */,
/** f32x4.le */
- LeF32x4 = 116 /* _BinaryenLeVecF32x4 */,
+ LeF32x4 = 122 /* _BinaryenLeVecF32x4 */,
/** f32x4.ge */
- GeF32x4 = 117 /* _BinaryenGeVecF32x4 */,
+ GeF32x4 = 123 /* _BinaryenGeVecF32x4 */,
/** f64x2.eq */
- EqF64x2 = 118 /* _BinaryenEqVecF64x2 */,
+ EqF64x2 = 124 /* _BinaryenEqVecF64x2 */,
/** f64x2.ne */
- NeF64x2 = 119 /* _BinaryenNeVecF64x2 */,
+ NeF64x2 = 125 /* _BinaryenNeVecF64x2 */,
/** f64x2.lt */
- LtF64x2 = 120 /* _BinaryenLtVecF64x2 */,
+ LtF64x2 = 126 /* _BinaryenLtVecF64x2 */,
/** f64x2.gt */
- GtF64x2 = 121 /* _BinaryenGtVecF64x2 */,
+ GtF64x2 = 127 /* _BinaryenGtVecF64x2 */,
/** f64x2.le */
- LeF64x2 = 122 /* _BinaryenLeVecF64x2 */,
+ LeF64x2 = 128 /* _BinaryenLeVecF64x2 */,
/** f64x2.ge */
- GeF64x2 = 123 /* _BinaryenGeVecF64x2 */,
+ GeF64x2 = 129 /* _BinaryenGeVecF64x2 */,
/** v128.and */
- AndV128 = 124 /* _BinaryenAndVec128 */,
+ AndV128 = 130 /* _BinaryenAndVec128 */,
/** v128.or */
- OrV128 = 125 /* _BinaryenOrVec128 */,
+ OrV128 = 131 /* _BinaryenOrVec128 */,
/** v128.xor */
- XorV128 = 126 /* _BinaryenXorVec128 */,
+ XorV128 = 132 /* _BinaryenXorVec128 */,
/** v128.andnot */
- AndnotV128 = 127 /* _BinaryenAndNotVec128 */,
+ AndnotV128 = 133 /* _BinaryenAndNotVec128 */,
/** i8x16.add */
- AddI8x16 = 128 /* _BinaryenAddVecI8x16 */,
+ AddI8x16 = 134 /* _BinaryenAddVecI8x16 */,
/** i8x16.add_sat_s */
- AddSatI8x16 = 129 /* _BinaryenAddSatSVecI8x16 */,
+ AddSatI8x16 = 135 /* _BinaryenAddSatSVecI8x16 */,
/** i8x16.add_sat_u */
- AddSatU8x16 = 130 /* _BinaryenAddSatUVecI8x16 */,
+ AddSatU8x16 = 136 /* _BinaryenAddSatUVecI8x16 */,
/** i8x16.sub */
- SubI8x16 = 131 /* _BinaryenSubVecI8x16 */,
+ SubI8x16 = 137 /* _BinaryenSubVecI8x16 */,
/** i8x16.sub_sat_s */
- SubSatI8x16 = 132 /* _BinaryenSubSatSVecI8x16 */,
+ SubSatI8x16 = 138 /* _BinaryenSubSatSVecI8x16 */,
/** i8x16.sub_sat_u */
- SubSatU8x16 = 133 /* _BinaryenSubSatUVecI8x16 */,
+ SubSatU8x16 = 139 /* _BinaryenSubSatUVecI8x16 */,
/** i8x16.min_s */
- MinI8x16 = 134 /* _BinaryenMinSVecI8x16 */,
+ MinI8x16 = 140 /* _BinaryenMinSVecI8x16 */,
/** i8x16.min_u */
- MinU8x16 = 135 /* _BinaryenMinUVecI8x16 */,
+ MinU8x16 = 141 /* _BinaryenMinUVecI8x16 */,
/** i8x16.max_s */
- MaxI8x16 = 136 /* _BinaryenMaxSVecI8x16 */,
+ MaxI8x16 = 142 /* _BinaryenMaxSVecI8x16 */,
/** i8x16.max_u */
- MaxU8x16 = 137 /* _BinaryenMaxUVecI8x16 */,
+ MaxU8x16 = 143 /* _BinaryenMaxUVecI8x16 */,
/** i8x16.avgr_u */
- AvgrU8x16 = 138 /* _BinaryenAvgrUVecI8x16 */,
+ AvgrU8x16 = 144 /* _BinaryenAvgrUVecI8x16 */,
/** i16x8.add */
- AddI16x8 = 139 /* _BinaryenAddVecI16x8 */,
+ AddI16x8 = 145 /* _BinaryenAddVecI16x8 */,
/** i16x8.add_sat_s */
- AddSatI16x8 = 140 /* _BinaryenAddSatSVecI16x8 */,
+ AddSatI16x8 = 146 /* _BinaryenAddSatSVecI16x8 */,
/** i16x8.add_sat_u */
- AddSatU16x8 = 141 /* _BinaryenAddSatUVecI16x8 */,
+ AddSatU16x8 = 147 /* _BinaryenAddSatUVecI16x8 */,
/** i16x8.sub */
- SubI16x8 = 142 /* _BinaryenSubVecI16x8 */,
+ SubI16x8 = 148 /* _BinaryenSubVecI16x8 */,
/** i16x8.sub_sat_s */
- SubSatI16x8 = 143 /* _BinaryenSubSatSVecI16x8 */,
+ SubSatI16x8 = 149 /* _BinaryenSubSatSVecI16x8 */,
/** i16x8.sub_sat_u */
- SubSatU16x8 = 144 /* _BinaryenSubSatUVecI16x8 */,
+ SubSatU16x8 = 150 /* _BinaryenSubSatUVecI16x8 */,
/** i16x8.mul */
- MulI16x8 = 145 /* _BinaryenMulVecI16x8 */,
+ MulI16x8 = 151 /* _BinaryenMulVecI16x8 */,
/** i16x8.min_s */
- MinI16x8 = 146 /* _BinaryenMinSVecI16x8 */,
+ MinI16x8 = 152 /* _BinaryenMinSVecI16x8 */,
/** i16x8.min_u */
- MinU16x8 = 147 /* _BinaryenMinUVecI16x8 */,
+ MinU16x8 = 153 /* _BinaryenMinUVecI16x8 */,
/** i16x8.max_s */
- MaxI16x8 = 148 /* _BinaryenMaxSVecI16x8 */,
+ MaxI16x8 = 154 /* _BinaryenMaxSVecI16x8 */,
/** i16x8.max_u */
- MaxU16x8 = 149 /* _BinaryenMaxUVecI16x8 */,
+ MaxU16x8 = 155 /* _BinaryenMaxUVecI16x8 */,
/** i16x8.avgr_u */
- AvgrU16x8 = 150 /* _BinaryenAvgrUVecI16x8 */,
+ AvgrU16x8 = 156 /* _BinaryenAvgrUVecI16x8 */,
/** i16x8.q15mulr_sat_s */
- Q15mulrSatI16x8 = 151 /* _BinaryenQ15MulrSatSVecI16x8 */,
+ Q15mulrSatI16x8 = 157 /* _BinaryenQ15MulrSatSVecI16x8 */,
/** i16x8.extmul_low_i8x16_s */
- ExtmulLowI16x8 = 152 /* _BinaryenExtMulLowSVecI16x8 */,
+ ExtmulLowI16x8 = 158 /* _BinaryenExtMulLowSVecI16x8 */,
/** i16x8.extmul_high_i8x16_s */
- ExtmulHighI16x8 = 153 /* _BinaryenExtMulHighSVecI16x8 */,
+ ExtmulHighI16x8 = 159 /* _BinaryenExtMulHighSVecI16x8 */,
/** i16x8.extmul_low_i8x16_u */
- ExtmulLowU16x8 = 154 /* _BinaryenExtMulLowUVecI16x8 */,
+ ExtmulLowU16x8 = 160 /* _BinaryenExtMulLowUVecI16x8 */,
/** i16x8.extmul_high_i8x16_u */
- ExtmulHighU16x8 = 155 /* _BinaryenExtMulHighUVecI16x8 */,
+ ExtmulHighU16x8 = 161 /* _BinaryenExtMulHighUVecI16x8 */,
/** i32x4.add */
- AddI32x4 = 156 /* _BinaryenAddVecI32x4 */,
+ AddI32x4 = 162 /* _BinaryenAddVecI32x4 */,
/** i32x4.sub */
- SubI32x4 = 157 /* _BinaryenSubVecI32x4 */,
+ SubI32x4 = 163 /* _BinaryenSubVecI32x4 */,
/** i32x4.mul */
- MulI32x4 = 158 /* _BinaryenMulVecI32x4 */,
+ MulI32x4 = 164 /* _BinaryenMulVecI32x4 */,
/** i32x4.min_s */
- MinI32x4 = 159 /* _BinaryenMinSVecI32x4 */,
+ MinI32x4 = 165 /* _BinaryenMinSVecI32x4 */,
/** i32x4.min_u */
- MinU32x4 = 160 /* _BinaryenMinUVecI32x4 */,
+ MinU32x4 = 166 /* _BinaryenMinUVecI32x4 */,
/** i32x4.max_s */
- MaxI32x4 = 161 /* _BinaryenMaxSVecI32x4 */,
+ MaxI32x4 = 167 /* _BinaryenMaxSVecI32x4 */,
/** i32x4.max_u */
- MaxU32x4 = 162 /* _BinaryenMaxUVecI32x4 */,
+ MaxU32x4 = 168 /* _BinaryenMaxUVecI32x4 */,
/** i32x4.dot_i16x8_s */
- DotI16x8 = 163 /* _BinaryenDotSVecI16x8ToVecI32x4 */,
+ DotI16x8 = 169 /* _BinaryenDotSVecI16x8ToVecI32x4 */,
/** i32x4.extmul_low_i16x8_s */
- ExtmulLowI32x4 = 164 /* _BinaryenExtMulLowSVecI32x4 */,
+ ExtmulLowI32x4 = 170 /* _BinaryenExtMulLowSVecI32x4 */,
/** i32x4.extmul_high_i16x8_s */
- ExtmulHighI32x4 = 165 /* _BinaryenExtMulHighSVecI32x4 */,
+ ExtmulHighI32x4 = 171 /* _BinaryenExtMulHighSVecI32x4 */,
/** i32x4.extmul_low_i16x8_u */
- ExtmulLowU32x4 = 166 /* _BinaryenExtMulLowUVecI32x4 */,
+ ExtmulLowU32x4 = 172 /* _BinaryenExtMulLowUVecI32x4 */,
/** i32x4.extmul_high_i16x8_u */
- ExtmulHighU32x4 = 167 /* _BinaryenExtMulHighUVecI32x4 */,
+ ExtmulHighU32x4 = 173 /* _BinaryenExtMulHighUVecI32x4 */,
/** i64x2.add */
- AddI64x2 = 168 /* _BinaryenAddVecI64x2 */,
+ AddI64x2 = 174 /* _BinaryenAddVecI64x2 */,
/** i64x2.sub */
- SubI64x2 = 169 /* _BinaryenSubVecI64x2 */,
+ SubI64x2 = 175 /* _BinaryenSubVecI64x2 */,
/** i64x2.mul */
- MulI64x2 = 170 /* _BinaryenMulVecI64x2 */,
+ MulI64x2 = 176 /* _BinaryenMulVecI64x2 */,
/** i64x2.extmul_low_i32x4_s */
- ExtmulLowI64x2 = 171 /* _BinaryenExtMulLowSVecI64x2 */,
+ ExtmulLowI64x2 = 177 /* _BinaryenExtMulLowSVecI64x2 */,
/** i64x2.extmul_high_i32x4_s */
- ExtmulHighI64x2 = 172 /* _BinaryenExtMulHighSVecI64x2 */,
+ ExtmulHighI64x2 = 178 /* _BinaryenExtMulHighSVecI64x2 */,
/** i64x2.extmul_low_i32x4_u */
- ExtmulLowU64x2 = 173 /* _BinaryenExtMulLowUVecI64x2 */,
+ ExtmulLowU64x2 = 179 /* _BinaryenExtMulLowUVecI64x2 */,
/** i64x2.extmul_high_i32x4_u */
- ExtmulHighU64x2 = 174 /* _BinaryenExtMulHighUVecI64x2 */,
+ ExtmulHighU64x2 = 180 /* _BinaryenExtMulHighUVecI64x2 */,
+ // FIXME: f16x8 arithmetic ops (add/sub/mul/div/min/max/pmin/pmax = 181..188) are in wasm.h but not yet exported via C API
/** f32x4.add */
- AddF32x4 = 175 /* _BinaryenAddVecF32x4 */,
+ AddF32x4 = 189 /* _BinaryenAddVecF32x4 */,
/** f32x4.sub */
- SubF32x4 = 176 /* _BinaryenSubVecF32x4 */,
+ SubF32x4 = 190 /* _BinaryenSubVecF32x4 */,
/** f32x4.mul */
- MulF32x4 = 177 /* _BinaryenMulVecF32x4 */,
+ MulF32x4 = 191 /* _BinaryenMulVecF32x4 */,
/** f32x4.div */
- DivF32x4 = 178 /* _BinaryenDivVecF32x4 */,
+ DivF32x4 = 192 /* _BinaryenDivVecF32x4 */,
/** f32x4.min */
- MinF32x4 = 179 /* _BinaryenMinVecF32x4 */,
+ MinF32x4 = 193 /* _BinaryenMinVecF32x4 */,
/** f32x4.max */
- MaxF32x4 = 180 /* _BinaryenMaxVecF32x4 */,
+ MaxF32x4 = 194 /* _BinaryenMaxVecF32x4 */,
/** f32x4.pmin */
- PminF32x4 = 181 /* _BinaryenPMinVecF32x4 */,
+ PminF32x4 = 195 /* _BinaryenPMinVecF32x4 */,
/** f32x4.pmax */
- PmaxF32x4 = 182 /* _BinaryenPMaxVecF32x4 */,
+ PmaxF32x4 = 196 /* _BinaryenPMaxVecF32x4 */,
/** f64x2.add */
- AddF64x2 = 183 /* _BinaryenAddVecF64x2 */,
+ AddF64x2 = 197 /* _BinaryenAddVecF64x2 */,
/** f64x2.sub */
- SubF64x2 = 184 /* _BinaryenSubVecF64x2 */,
+ SubF64x2 = 198 /* _BinaryenSubVecF64x2 */,
/** f64x2.mul */
- MulF64x2 = 185 /* _BinaryenMulVecF64x2 */,
+ MulF64x2 = 199 /* _BinaryenMulVecF64x2 */,
/** f64x2.div */
- DivF64x2 = 186 /* _BinaryenDivVecF64x2 */,
+ DivF64x2 = 200 /* _BinaryenDivVecF64x2 */,
/** f64x2.min */
- MinF64x2 = 187 /* _BinaryenMinVecF64x2 */,
+ MinF64x2 = 201 /* _BinaryenMinVecF64x2 */,
/** f64x2.max */
- MaxF64x2 = 188 /* _BinaryenMaxVecF64x2 */,
+ MaxF64x2 = 202 /* _BinaryenMaxVecF64x2 */,
/** f64x2.pmin */
- PminF64x2 = 189 /* _BinaryenPMinVecF64x2 */,
+ PminF64x2 = 203 /* _BinaryenPMinVecF64x2 */,
/** f64x2.pmax */
- PmaxF64x2 = 190 /* _BinaryenPMaxVecF64x2 */,
+ PmaxF64x2 = 204 /* _BinaryenPMaxVecF64x2 */,
/** i8x16.narrow_i16x8_s */
- NarrowI16x8ToI8x16 = 191 /* _BinaryenNarrowSVecI16x8ToVecI8x16 */,
+ NarrowI16x8ToI8x16 = 205 /* _BinaryenNarrowSVecI16x8ToVecI8x16 */,
/** i8x16.narrow_i16x8_u */
- NarrowU16x8ToU8x16 = 192 /* _BinaryenNarrowUVecI16x8ToVecI8x16 */,
+ NarrowU16x8ToU8x16 = 206 /* _BinaryenNarrowUVecI16x8ToVecI8x16 */,
/** i16x8.narrow_i32x4_s */
- NarrowI32x4ToI16x8 = 193 /* _BinaryenNarrowSVecI32x4ToVecI16x8 */,
+ NarrowI32x4ToI16x8 = 207 /* _BinaryenNarrowSVecI32x4ToVecI16x8 */,
/** i16x8.narrow_i32x4_u */
- NarrowU32x4ToU16x8 = 194 /* _BinaryenNarrowUVecI32x4ToVecI16x8 */,
+ NarrowU32x4ToU16x8 = 208 /* _BinaryenNarrowUVecI32x4ToVecI16x8 */,
/** i8x16.swizzle */
- SwizzleI8x16 = 195 /* _BinaryenSwizzleVecI8x16 */,
-
- // see: https://github.com/WebAssembly/relaxed-simd
-
+ SwizzleI8x16 = 209 /* _BinaryenSwizzleVecI8x16 */,
/** i8x16.relaxed_swizzle */
- RelaxedSwizzleI8x16 = 196 /* TODO_BinaryenRelaxedSwizzleVecI8x16 */,
+ RelaxedSwizzleI8x16 = 210 /* _BinaryenRelaxedSwizzleVecI8x16 */,
/** f32x4.relaxed_min */
- RelaxedMinF32x4 = 197 /* TODO_BinaryenRelaxedMinVecF32x4 */,
+ RelaxedMinF32x4 = 211 /* _BinaryenRelaxedMinVecF32x4 */,
/** f32x4.relaxed_max */
- RelaxedMaxF32x4 = 198 /* TODO_BinaryenRelaxedMaxVecF32x4 */,
+ RelaxedMaxF32x4 = 212 /* _BinaryenRelaxedMaxVecF32x4 */,
/** f64x2.relaxed_min */
- RelaxedMinF64x2 = 199 /* TODO_BinaryenRelaxedMinVecF64x2 */,
+ RelaxedMinF64x2 = 213 /* _BinaryenRelaxedMinVecF64x2 */,
/** f64x2.relaxed_max */
- RelaxedMaxF64x2 = 200 /* TODO_BinaryenRelaxedMaxVecF64x2 */,
+ RelaxedMaxF64x2 = 214 /* _BinaryenRelaxedMaxVecF64x2 */,
/** i16x8.relaxed_q15mulr_s */
- RelaxedQ15MulrI16x8 = 201 /* TODO_BinaryenRelaxedQ15MulrSVecI16x8 */,
+ RelaxedQ15MulrI16x8 = 215 /* _BinaryenRelaxedQ15MulrSVecI16x8 */,
/** i16x8.relaxed_dot_i8x16_i7x16_s */
- RelaxedDotI8x16I7x16ToI16x8 = 202 /* TODO_BinaryenDotI8x16I7x16SToVecI16x8 */,
+ RelaxedDotI8x16I7x16ToI16x8 = 216 /* _BinaryenRelaxedDotI8x16I7x16SToVecI16x8 */,
_last = RelaxedDotI8x16I7x16ToI16x8,
@@ -1108,14 +1144,15 @@ export const enum SIMDExtractOp {
ExtractLaneI16x8 = 2 /* _BinaryenExtractLaneSVecI16x8 */,
/** i16x8.extract_lane_u */
ExtractLaneU16x8 = 3 /* _BinaryenExtractLaneUVecI16x8 */,
- /** i32x4.extract_lane_s */
+ /** i32x4.extract_lane */
ExtractLaneI32x4 = 4 /* _BinaryenExtractLaneVecI32x4 */,
- /** i32x4.extract_lane_u */
+ /** i64x2.extract_lane */
ExtractLaneI64x2 = 5 /* _BinaryenExtractLaneVecI64x2 */,
- /** i64x2.extract_lane_s */
- ExtractLaneF32x4 = 6 /* _BinaryenExtractLaneVecF32x4 */,
- /** i64x2.extract_lane_u */
- ExtractLaneF64x2 = 7 /* _BinaryenExtractLaneVecF64x2 */,
+ // FIXME: f16x8.extract_lane (= 6) is in wasm.h but not yet exported via C API
+ /** f32x4.extract_lane */
+ ExtractLaneF32x4 = 7 /* _BinaryenExtractLaneVecF32x4 */,
+ /** f64x2.extract_lane */
+ ExtractLaneF64x2 = 8 /* _BinaryenExtractLaneVecF64x2 */,
}
/** Binaryen SIMD replace operation constants. */
@@ -1128,10 +1165,11 @@ export const enum SIMDReplaceOp {
ReplaceLaneI32x4 = 2 /* _BinaryenReplaceLaneVecI32x4 */,
/** i64x2.replace_lane */
ReplaceLaneI64x2 = 3 /* _BinaryenReplaceLaneVecI64x2 */,
+ // FIXME: f16x8.replace_lane (= 4) is in wasm.h but not yet exported via C API
/** f32x4.replace_lane */
- ReplaceLaneF32x4 = 4 /* _BinaryenReplaceLaneVecF32x4 */,
+ ReplaceLaneF32x4 = 5 /* _BinaryenReplaceLaneVecF32x4 */,
/** f64x2.replace_lane */
- ReplaceLaneF64x2 = 5 /* _BinaryenReplaceLaneVecF64x2 */
+ ReplaceLaneF64x2 = 6 /* _BinaryenReplaceLaneVecF64x2 */
}
/** Binaryen SIMD shift operation constants. */
@@ -1214,37 +1252,51 @@ export const enum SIMDLoadStoreLaneOp {
export const enum SIMDTernaryOp {
/** v128.bitselect */
Bitselect = 0 /* _BinaryenBitselectVec128 */,
-
- // see: https://github.com/WebAssembly/relaxed-simd
-
/** f32x4.relaxed_madd */
- RelaxedMaddF32x4 = 1 /* TODO_BinaryenRelaxedFmaVecF32x4 */,
+ RelaxedMaddF32x4 = 1 /* _BinaryenRelaxedMaddVecF32x4 */,
/** f32x4.relaxed_nmadd */
- RelaxedNmaddF32x4 = 2 /* TODO_BinaryenRelaxedFmsVecF32x4 */,
+ RelaxedNmaddF32x4 = 2 /* _BinaryenRelaxedNmaddVecF32x4 */,
/** f64x2.relaxed_madd */
- RelaxedMaddF64x2 = 3 /* TODO_BinaryenRelaxedFmaVecF64x2 */,
+ RelaxedMaddF64x2 = 3 /* _BinaryenRelaxedMaddVecF64x2 */,
/** f64x2.relaxed_nmadd */
- RelaxedNmaddF64x2 = 4 /* TODO_BinaryenRelaxedFmsVecF64x2 */,
+ RelaxedNmaddF64x2 = 4 /* _BinaryenRelaxedNmaddVecF64x2 */,
/** i8x16.relaxed_laneselect */
- RelaxedLaneselectI8x16 = 5 /* TODO_BinaryenLaneselectI8x16 */,
+ RelaxedLaneselectI8x16 = 5 /* _BinaryenRelaxedLaneselectI8x16 */,
/** i16x8.relaxed_laneselect */
- RelaxedLaneselectI16x8 = 6 /* TODO_BinaryenLaneselectI16x8 */,
+ RelaxedLaneselectI16x8 = 6 /* _BinaryenRelaxedLaneselectI16x8 */,
/** i32x4.relaxed_laneselect */
- RelaxedLaneselectI32x4 = 7 /* TODO_BinaryenLaneselectI32x4 */,
+ RelaxedLaneselectI32x4 = 7 /* _BinaryenRelaxedLaneselectI32x4 */,
/** i64x2.relaxed_laneselect */
- RelaxedLaneselectI64x2 = 8 /* TODO_BinaryenLaneselectI64x2 */,
+ RelaxedLaneselectI64x2 = 8 /* _BinaryenRelaxedLaneselectI64x2 */,
/** i32x4.relaxed_dot_i8x16_i7x16_add_s */
- RelaxedDotI8x16I7x16AddToI32x4 = 9 /* TODO_BinaryenDotI8x16I7x16AddSToVecI32x4 */,
+ RelaxedDotI8x16I7x16AddToI32x4 = 9 /* _BinaryenRelaxedDotI8x16I7x16AddSToVecI32x4 */,
+ // FIXME: f16x8 madd/nmadd (= 10, 11) are in wasm.h but not yet exported via C API
}
/** Binaryen RefAs operation constants. */
export const enum RefAsOp {
/** ref.as_non_null */
NonNull = 0 /* _BinaryenRefAsNonNull */,
- /** extern.internalize */
- ExternInternalize = 1 /* _BinaryenRefAsExternInternalize */,
- /** extern.externalize */
- ExternExternalize = 2 /* _BinaryenRefAsExternExternalize */
+ /** any.convert_extern */
+ AnyConvertExtern = 1 /* _BinaryenRefAsAnyConvertExtern */,
+ /** extern.convert_any */
+ ExternConvertAny = 2 /* _BinaryenRefAsExternConvertAny */
+}
+
+/** Binaryen wide integer add/sub operation constants. */
+export const enum WideIntAddSubOp {
+ /** i64.add128 */
+ Add = 0 /* _BinaryenAddInt128 */,
+ /** i64.sub128 */
+ Sub = 1 /* _BinaryenSubInt128 */
+}
+
+/** Binaryen wide integer multiply operation constants. */
+export const enum WideIntMulOp {
+ /** i64.mul_wide_s */
+ SignedI64 = 0 /* _BinaryenMulWideSInt64 */,
+ /** i64.mul_wide_u */
+ UnsignedI64 = 1 /* _BinaryenMulWideUInt64 */
}
/** Binaryen BrOn operation constants. */
@@ -1261,58 +1313,28 @@ export const enum BrOnOp {
/** Binaryen StringNew operation constants. */
export const enum StringNewOp {
- /** string.new_wtf8 utf8 */
- UTF8 = 0 /* _BinaryenStringNewUTF8 */,
- /** string.new_wtf8 wtf8 */
- WTF8 = 1 /* _BinaryenStringNewWTF8 */,
- /** string.new_wtf8 replace */
- LossyUTF8 = 2 /* _BinaryenStringNewLossyUTF8 */,
- /** string.new_wtf16 */
- WTF16 = 3 /* _BinaryenStringNewWTF16 */,
- /** string.new_wtf8_array utf8 */
- UTF8Array = 4 /* _BinaryenStringNewUTF8Array */,
- /** string.new_wtf8_array wtf8 */
- WTF8Array = 5 /* _BinaryenStringNewWTF8Array */,
/** string.new_wtf8_array replace */
- LossyUTF8Array = 6 /* _BinaryenStringNewLossyUTF8Array */,
+ LossyUTF8Array = 0 /* _BinaryenStringNewLossyUTF8Array */,
/** string.new_wtf16_array */
- WTF16Array = 7 /* _BinaryenStringNewWTF16Array */,
+ WTF16Array = 1 /* _BinaryenStringNewWTF16Array */,
/** string.from_code_point */
- FromCodePoint = 8 /* _BinaryenStringNewFromCodePoint */
+ FromCodePoint = 2 /* _BinaryenStringNewFromCodePoint */
}
/** Binaryen StringMeasure operation constants. */
export const enum StringMeasureOp {
/** string.measure_wtf8 utf8 */
UTF8 = 0 /* _BinaryenStringMeasureUTF8 */,
- /** string.measure_wtf8 wtf8 */
- WTF8 = 1 /* _BinaryenStringMeasureWTF8 */,
/** string.measure_wtf16 */
- WTF16 = 2 /* _BinaryenStringMeasureWTF16 */,
- /** string.is_usv_sequence */
- IsUSV = 3 /* _BinaryenStringMeasureIsUSV */,
- /** stringview_wtf16.length */
- WTF16View = 4 /* _BinaryenStringMeasureWTF16View */
+ WTF16 = 1 /* _BinaryenStringMeasureWTF16 */,
}
/** Binaryen StringEncode operation constants. */
export const enum StringEncodeOp {
- /** string.encode_wtf8 utf8 */
- UTF8 = 0 /* _BinaryenStringEncodeUTF8 */,
- /** string.encode_lossy_utf8 utf8 */
- LossyUTF8 = 1 /* _BinaryenStringEncodeLossyUTF8 */,
- /** string.encode_wtf8 wtf8 */
- WTF8 = 2 /* _BinaryenStringEncodeWTF8 */,
- /** string.encode_wtf16 */
- WTF16 = 3 /* _BinaryenStringEncodeWTF16 */,
- /** string.encode_wtf8_array utf8 */
- UTF8Array = 4 /* _BinaryenStringEncodeUTF8Array */,
/** string.encode_lossy_utf8_array utf8 */
- LossyUTF8Array = 5 /* _BinaryenStringEncodeLossyUTF8Array */,
- /** string.encode_wtf8_array wtf8 */
- WTF8Array = 6 /* _BinaryenStringEncodeWTF8Array */,
+ LossyUTF8Array = 0 /* _BinaryenStringEncodeLossyUTF8Array */,
/** string.encode_wtf16_array */
- WTF16Array = 7 /* _BinaryenStringEncodeWTF16Array */
+ WTF16Array = 1 /* _BinaryenStringEncodeWTF16Array */
}
/** Binaryen StringEq operation constants. */
@@ -1323,37 +1345,10 @@ export const enum StringEqOp {
Compare = 1 /* _BinaryenStringEqCompare */
}
-/** Binaryen StringAs operation constants. */
-export const enum StringAsOp {
- /** string.as_wtf8 */
- WTF8 = 0 /* _BinaryenStringAsWTF8 */,
- /** string.as_wtf16 */
- WTF16 = 1 /* _BinaryenStringAsWTF16 */,
- /** string.as_iter */
- Iter = 2 /* _BinaryenStringAsIter */
-}
-
-/** Binaryen StringIterMove operation constants. */
-export const enum StringIterMoveOp {
- /** stringview_iter.advance */
- Advance = 0 /* _BinaryenStringIterMoveAdvance */,
- /** stringview_iter.rewind */
- Rewind = 1 /* _BinaryenStringIterMoveRewind */
-}
-
-/** Binaryen StringSlice operation constants. */
-export const enum StringSliceWTFOp {
- /** stringview_wtf8.slice */
- WTF8 = 0 /* _BinaryenStringSliceWTF8 */,
- /** stringview_wtf16.slice */
- WTF16 = 1 /* _BinaryenStringSliceWTF16 */
-}
-
/** Binaryen expression runner flags. */
export const enum ExpressionRunnerFlags {
Default = 0 /* _ExpressionRunnerFlagsDefault */,
- PreserveSideeffects = 1 /* _ExpressionRunnerFlagsPreserveSideeffects */,
- TraverseCalls = 2 /* _ExpressionRunnerFlagsTraverseCalls */
+ PreserveSideeffects = 1 /* _ExpressionRunnerFlagsPreserveSideeffects */
}
export class MemorySegment {
@@ -1401,7 +1396,7 @@ export class Module {
i64(valueLow: i32, valueHigh: i32 = 0): ExpressionRef {
let out = this.lit;
- binaryen._BinaryenLiteralInt64(out, valueLow, valueHigh);
+ binaryen._BinaryenLiteralInt64(out, i64_new(valueLow, valueHigh));
return binaryen._BinaryenConst(this.ref, out);
}
@@ -1535,6 +1530,24 @@ export class Module {
return binaryen._BinaryenBinary(this.ref, op, left, right);
}
+ wide_int_add_sub(
+ op: WideIntAddSubOp,
+ leftLow: ExpressionRef,
+ leftHigh: ExpressionRef,
+ rightLow: ExpressionRef,
+ rightHigh: ExpressionRef
+ ): ExpressionRef {
+ return binaryen._BinaryenWideIntAddSub(this.ref, op, leftLow, leftHigh, rightLow, rightHigh);
+ }
+
+ wide_int_mul(
+ op: WideIntMulOp,
+ left: ExpressionRef,
+ right: ExpressionRef
+ ): ExpressionRef {
+ return binaryen._BinaryenWideIntMul(this.ref, op, left, right);
+ }
+
memory_size(name: string = CommonNames.DefaultMemory, is64: bool = false): ExpressionRef {
let cStr = this.allocStringCached(name);
return binaryen._BinaryenMemorySize(this.ref, cStr, is64);
@@ -1632,10 +1645,11 @@ export class Module {
ptr: ExpressionRef,
type: TypeRef,
offset: Index = 0,
- name: string = CommonNames.DefaultMemory
+ name: string = CommonNames.DefaultMemory,
+ order: MemoryOrder = MemoryOrder.SeqCst
): ExpressionRef {
let cStr = this.allocStringCached(name);
- return binaryen._BinaryenAtomicLoad(this.ref, bytes, offset, type, ptr, cStr);
+ return binaryen._BinaryenAtomicLoad(this.ref, bytes, offset, type, ptr, cStr, order);
}
atomic_store(
@@ -1644,10 +1658,11 @@ export class Module {
value: ExpressionRef,
type: TypeRef,
offset: Index = 0,
- name: string = CommonNames.DefaultMemory
+ name: string = CommonNames.DefaultMemory,
+ order: MemoryOrder = MemoryOrder.SeqCst
): ExpressionRef {
let cStr = this.allocStringCached(name);
- return binaryen._BinaryenAtomicStore(this.ref, bytes, offset, ptr, value, type, cStr);
+ return binaryen._BinaryenAtomicStore(this.ref, bytes, offset, ptr, value, type, cStr, order);
}
atomic_rmw(
@@ -1657,10 +1672,11 @@ export class Module {
ptr: ExpressionRef,
value: ExpressionRef,
type: TypeRef,
- name: string = CommonNames.DefaultMemory
+ name: string = CommonNames.DefaultMemory,
+ order: MemoryOrder = MemoryOrder.SeqCst
): ExpressionRef {
let cStr = this.allocStringCached(name);
- return binaryen._BinaryenAtomicRMW(this.ref, op, bytes, offset, ptr, value, type, cStr);
+ return binaryen._BinaryenAtomicRMW(this.ref, op, bytes, offset, ptr, value, type, cStr, order);
}
atomic_cmpxchg(
@@ -1670,10 +1686,11 @@ export class Module {
expected: ExpressionRef,
replacement: ExpressionRef,
type: TypeRef,
- name: string = CommonNames.DefaultMemory
+ name: string = CommonNames.DefaultMemory,
+ order: MemoryOrder = MemoryOrder.SeqCst
): ExpressionRef {
let cStr = this.allocStringCached(name);
- return binaryen._BinaryenAtomicCmpxchg(this.ref, bytes, offset, ptr, expected, replacement, type, cStr);
+ return binaryen._BinaryenAtomicCmpxchg(this.ref, bytes, offset, ptr, expected, replacement, type, cStr, order);
}
atomic_wait(
@@ -1839,10 +1856,9 @@ export class Module {
select(
ifTrue: ExpressionRef,
ifFalse: ExpressionRef,
- condition: ExpressionRef,
- type: TypeRef
+ condition: ExpressionRef
): ExpressionRef {
- return binaryen._BinaryenSelect(this.ref, condition, ifTrue, ifFalse, type);
+ return binaryen._BinaryenSelect(this.ref, condition, ifTrue, ifFalse);
}
switch(
@@ -2117,7 +2133,7 @@ export class Module {
type: TypeRef
): ExpressionRef {
let cStr = this.allocStringCached(name);
- return binaryen._BinaryenRefFunc(this.ref, cStr, type);
+ return binaryen._BinaryenRefFunc(this.ref, cStr, binaryen._BinaryenTypeGetHeapType(type));
}
i31_new(
@@ -2399,36 +2415,43 @@ export class Module {
name: string = CommonNames.DefaultMemory,
shared: bool = false
): void {
- let cStr1 = this.allocStringCached(exportName);
- let cStr2 = this.allocStringCached(name);
+ let cExportName = this.allocStringCached(exportName);
+ let cName = this.allocStringCached(name);
let k = segments.length;
let segs = new Array(k);
- let psvs = new Uint8Array(k);
- let offs = new Array(k);
- let sizs = new Array(k);
+ let isPassive = new Uint8Array(k);
+ let offsets = new Array(k);
+ let sizes = new Array(k);
for (let i = 0; i < k; ++i) {
let segment = unchecked(segments[i]);
let buffer = segment.buffer;
let offset = segment.offset;
unchecked(segs[i] = allocU8Array(buffer));
- unchecked(psvs[i] = 0); // no passive segments currently
- unchecked(offs[i] = target == Target.Wasm64
+ unchecked(isPassive[i] = 0); // no passive segments currently
+ unchecked(offsets[i] = target == Target.Wasm64
? this.i64(i64_low(offset), i64_high(offset))
: this.i32(i64_low(offset))
);
- unchecked(sizs[i] = buffer.length);
+ unchecked(sizes[i] = buffer.length);
}
- let cArr1 = allocPtrArray(segs);
- let cArr2 = allocU8Array(psvs);
- let cArr3 = allocPtrArray(offs);
- let cArr4 = allocU32Array(sizs);
+ let cSegs = allocPtrArray(segs);
+ let cIsPassive = allocU8Array(isPassive);
+ let cOffsets = allocPtrArray(offsets);
+ let cSizes = allocU32Array(sizes);
binaryen._BinaryenSetMemory(
- this.ref, initial, maximum, cStr1, cArr1, cArr2, cArr3, cArr4, k, shared, false, cStr2
+ this.ref,
+ initial, maximum,
+ cExportName,
+ 0, cSegs, cIsPassive,
+ cOffsets, cSizes,
+ k,
+ shared, false,
+ cName
);
- binaryen._free(cArr4);
- binaryen._free(cArr3);
- binaryen._free(cArr2);
- binaryen._free(cArr1);
+ binaryen._free(cSizes);
+ binaryen._free(cOffsets);
+ binaryen._free(cIsPassive);
+ binaryen._free(cSegs);
for (let i = k - 1; i >= 0; --i) {
binaryen._free(unchecked(segs[i]));
}
@@ -2464,6 +2487,14 @@ export class Module {
binaryen._free(cArr);
}
+ /** Ensures that an empty function table of the given name exists, to be sized and filled later. */
+ ensureFunctionTable(name: string): void {
+ let cStr = this.allocStringCached(name);
+ if (!binaryen._BinaryenGetTable(this.ref, cStr)) {
+ binaryen._BinaryenAddTable(this.ref, cStr, 0, Module.UNLIMITED_TABLE, TypeRef.Funcref);
+ }
+ }
+
/* setFunctionTable(
initial: Index,
maximum: Index,
@@ -2517,6 +2548,22 @@ export class Module {
binaryen._BinaryenSetDebugInfo(on);
}
+ getTrapsNeverHappen(): bool {
+ return binaryen._BinaryenGetTrapsNeverHappen();
+ }
+
+ setTrapsNeverHappen(on: bool): void {
+ binaryen._BinaryenSetTrapsNeverHappen(on);
+ }
+
+ getClosedWorld(): bool {
+ return binaryen._BinaryenGetClosedWorld();
+ }
+
+ setClosedWorld(on: bool): void {
+ binaryen._BinaryenSetClosedWorld(on);
+ }
+
getLowMemoryUnused(): bool {
return binaryen._BinaryenGetLowMemoryUnused();
}
@@ -2541,6 +2588,22 @@ export class Module {
binaryen._BinaryenSetFastMath(on);
}
+ getGenerateStackIR(): bool {
+ return binaryen._BinaryenGetGenerateStackIR();
+ }
+
+ setGenerateStackIR(on: bool): void {
+ binaryen._BinaryenSetGenerateStackIR(on);
+ }
+
+ getOptimizeStackIR(): bool {
+ return binaryen._BinaryenGetOptimizeStackIR();
+ }
+
+ setOptimizeStackIR(on: bool): void {
+ binaryen._BinaryenSetOptimizeStackIR(on);
+ }
+
getPassArgument(key: string): string | null {
let cStr = this.allocStringCached(key);
let ptr = binaryen._BinaryenGetPassArgument(cStr);
@@ -2589,6 +2652,10 @@ export class Module {
binaryen._BinaryenSetAllowInliningFunctionsWithLoops(enabled);
}
+ setPartialInliningIfs(value: i32): void {
+ this.setPassArgument("partial-inlining-ifs", value.toString());
+ }
+
// meta (module)
getFeatures(): FeatureFlags {
@@ -2596,6 +2663,7 @@ export class Module {
}
setFeatures(featureFlags: FeatureFlags): void {
+ if (featureFlags & FeatureFlags.BulkMemory) featureFlags |= FeatureFlags.BulkMemoryOpt;
binaryen._BinaryenModuleSetFeatures(this.ref, featureFlags);
}
@@ -2624,19 +2692,25 @@ export class Module {
// Implicitly run costly non-LLVM optimizations on -O3 or -Oz
if (optimizeLevel >= 3 || shrinkLevel >= 2) optimizeLevel = 4;
+ this.clearPassArguments();
+
this.setOptimizeLevel(optimizeLevel);
this.setShrinkLevel(shrinkLevel);
this.setDebugInfo(debugInfo);
this.setZeroFilledMemory(zeroFilledMemory);
this.setFastMath(true);
- this.clearPassArguments();
+
+ // OptimizationOptions#parse in src/tools/optimization-options.h
+ const stackIR = optimizeLevel >= 2 || shrinkLevel >= 1;
+ this.setGenerateStackIR(stackIR);
+ this.setOptimizeStackIR(stackIR);
// Tweak inlining limits based on optimization levels
if (optimizeLevel >= 2 && shrinkLevel == 0) {
this.setAlwaysInlineMaxSize(12);
this.setFlexibleInlineMaxSize(70);
this.setOneCallerInlineMaxSize(200);
- this.setAllowInliningFunctionsWithLoops(optimizeLevel >= 3);
+ this.setAllowInliningFunctionsWithLoops(true);
} else {
this.setAlwaysInlineMaxSize(
optimizeLevel <= 1 || shrinkLevel >= 2
@@ -2647,6 +2721,7 @@ export class Module {
this.setOneCallerInlineMaxSize(80);
this.setAllowInliningFunctionsWithLoops(false);
}
+ this.setPartialInliningIfs(optimizeLevel >= 2 ? 4 : 0);
// Pass order here differs substantially from Binaryen's defaults
// see: Binaryen/src/pass.cpp
@@ -2657,12 +2732,15 @@ export class Module {
passes.push("duplicate-function-elimination");
passes.push("remove-unused-module-elements"); // +
-
- // --- PassRunner::addDefaultFunctionOptimizationPasses ---
if (optimizeLevel >= 2) {
passes.push("once-reduction");
+ }
+
+ // --- PassRunner::addDefaultFunctionOptimizationPasses ---
+ if (optimizeLevel >= 2 || shrinkLevel >= 1) {
passes.push("inlining");
passes.push("simplify-globals-optimizing");
+ passes.push("generate-global-effects");
}
if (optimizeLevel >= 3 || shrinkLevel >= 1) {
passes.push("rse");
@@ -2675,7 +2753,6 @@ export class Module {
passes.push("merge-blocks");
passes.push("precompute-propagate");
passes.push("simplify-globals-optimizing");
- passes.push("gufa-optimizing");
passes.push("dae-optimizing");
}
if (optimizeLevel >= 3) {
@@ -2684,20 +2761,31 @@ export class Module {
passes.push("vacuum");
passes.push("simplify-locals-notee-nostructure");
passes.push("vacuum");
+ passes.push("local-cse");
passes.push("licm");
passes.push("merge-locals");
passes.push("reorder-locals");
}
passes.push("optimize-instructions");
- if (optimizeLevel >= 3 || shrinkLevel >= 1) {
- passes.push("dce");
+ if (optimizeLevel >= 2) {
+ passes.push("avoid-reinterprets");
}
+ passes.push("dce");
passes.push("remove-unused-brs");
passes.push("remove-unused-names");
+ passes.push("merge-blocks");
+ if (this.getFeatures() & FeatureFlags.MultiValue) {
+ // Optimize tuples before local opts (as splitting tuples can help local
+ // opts), but also not too early, as we want to be after
+ // optimize-instructions at least (which can remove tuple-related things).
+ passes.push("tuple-optimization");
+ }
if (optimizeLevel >= 3 || shrinkLevel >= 2) {
passes.push("inlining");
passes.push("precompute-propagate");
passes.push("simplify-globals-optimizing");
+ } else if (optimizeLevel >= 2 || shrinkLevel >= 1) {
+ passes.push("precompute-propagate");
} else {
passes.push("precompute");
}
@@ -2719,7 +2807,7 @@ export class Module {
passes.push("rse");
passes.push("vacuum");
}
- if (optimizeLevel >= 3 || shrinkLevel >= 1) {
+ if (shrinkLevel >= 1) {
passes.push("merge-locals");
passes.push("vacuum");
}
@@ -2772,6 +2860,10 @@ export class Module {
}
passes.push("directize"); // replace indirect with direct calls
passes.push("dae-optimizing"); // reduce arity
+ if (optimizeLevel >= 3 || shrinkLevel >= 1) {
+ // whole-program value-flow analysis
+ passes.push("gufa-optimizing");
+ }
passes.push("inlining-optimizing"); // and inline if possible
if (optimizeLevel >= 2 || shrinkLevel >= 1) {
passes.push("code-folding");
@@ -2811,18 +2903,32 @@ export class Module {
passes.push("merge-blocks");
passes.push("vacuum");
+ if (this.getFeatures() & FeatureFlags.Strings) {
+ // Gather strings to globals right before reorder-globals, which will then
+ // sort them properly.
+ passes.push("string-gathering");
+ }
+
passes.push("simplify-globals-optimizing");
- passes.push("reorder-globals");
passes.push("remove-unused-brs");
passes.push("optimize-instructions");
+ passes.push("vacuum");
}
+ passes.push("reorder-globals");
+ passes.push("reorder-functions");
// clean up
- passes.push("duplicate-function-elimination");
+ if (optimizeLevel >= 2 || shrinkLevel >= 1) {
+ passes.push("duplicate-function-elimination");
+ }
if (shrinkLevel >= 2) {
passes.push("merge-similar-functions");
}
passes.push("memory-packing");
passes.push("remove-unused-module-elements");
+ if (optimizeLevel >= 2 || shrinkLevel >= 1) {
+ // release the global-effects cache populated earlier in post-passes.
+ passes.push("discard-global-effects");
+ }
this.runPasses(passes);
}
@@ -2867,7 +2973,7 @@ export class Module {
toText(watFormat: bool = true): string {
let textPtr = watFormat
- ? binaryen._BinaryenModuleAllocateAndWriteStackIR(this.ref, true)
+ ? binaryen._BinaryenModuleAllocateAndWriteStackIR(this.ref)
: binaryen._BinaryenModuleAllocateAndWriteText(this.ref);
let text = readString(textPtr);
if (textPtr) binaryen._free(textPtr);
@@ -2917,6 +3023,13 @@ export class Module {
/** Makes a copy of a trivial expression (doesn't contain subexpressions). Returns `0` if non-trivial. */
tryCopyTrivialExpression(expr: ExpressionRef): ExpressionRef {
+ if (this.isTrivialExpression(expr)) {
+ return this.copyExpression(expr);
+ }
+ return 0;
+ }
+
+ isTrivialExpression(expr: ExpressionRef): bool {
switch (binaryen._BinaryenExpressionGetId(expr)) {
case ExpressionId.LocalGet:
case ExpressionId.GlobalGet:
@@ -2925,9 +3038,9 @@ export class Module {
case ExpressionId.Nop:
case ExpressionId.Unreachable:
case ExpressionId.DataDrop:
- case ExpressionId.RefNull: return this.copyExpression(expr);
+ case ExpressionId.RefNull: return true;
}
- return 0;
+ return false;
}
/** Makes a copy of any expression including all subexpressions. */
@@ -3047,11 +3160,23 @@ export function getConstValueI32(expr: ExpressionRef): i32 {
}
export function getConstValueI64Low(expr: ExpressionRef): i32 {
- return binaryen._BinaryenConstGetValueI64Low(expr);
+ return i64_low(binaryen._BinaryenConstGetValueI64(expr));
}
export function getConstValueI64High(expr: ExpressionRef): i32 {
- return binaryen._BinaryenConstGetValueI64High(expr);
+ return i64_high(binaryen._BinaryenConstGetValueI64(expr));
+}
+
+export function getConstValueInteger(expr: ExpressionRef, isWasm64: bool): i64 {
+ let lo: i32 = 0;
+ let hi: i32 = 0;
+ if (isWasm64) {
+ lo = getConstValueI64Low(expr);
+ hi = getConstValueI64High(expr);
+ } else {
+ lo = getConstValueI32(expr);
+ }
+ return i64_new(lo, hi);
}
export function getConstValueF32(expr: ExpressionRef): f32 {
@@ -3411,16 +3536,32 @@ export class SwitchBuilder {
this.condition = condition;
}
+ /** Links a case to the specified branch, replace old case if it is linked. */
+ addOrReplaceCase(value: i32, code: ExpressionRef[]): void {
+ const valueIndex = this.values.indexOf(value);
+ const codeIndex = this.addCode(code);
+ if (valueIndex >= 0) {
+ this.indexes[valueIndex] = codeIndex;
+ } else {
+ this.values.push(value);
+ this.indexes.push(codeIndex);
+ }
+ }
+
/** Links a case to the specified branch. */
addCase(value: i32, code: ExpressionRef[]): void {
+ this.values.push(value);
+ this.indexes.push(this.addCode(code));
+ }
+
+ private addCode(code: ExpressionRef[]): i32 {
let cases = this.cases;
let index = cases.indexOf(code);
if (index < 0) {
index = cases.length;
cases.push(code);
}
- this.values.push(value);
- this.indexes.push(index);
+ return index;
}
/** Links the default branch. */
@@ -3810,15 +3951,6 @@ function tryEnsureBasicType(type: Type): TypeRef {
case TypeKind.String: {
return binaryen._BinaryenTypeFromHeapType(HeapTypeRef.String, type.is(TypeFlags.Nullable));
}
- case TypeKind.StringviewWTF8: {
- return binaryen._BinaryenTypeFromHeapType(HeapTypeRef.StringviewWTF8, type.is(TypeFlags.Nullable));
- }
- case TypeKind.StringviewWTF16: {
- return binaryen._BinaryenTypeFromHeapType(HeapTypeRef.StringviewWTF16, type.is(TypeFlags.Nullable));
- }
- case TypeKind.StringviewIter: {
- return binaryen._BinaryenTypeFromHeapType(HeapTypeRef.StringviewIter, type.is(TypeFlags.Nullable));
- }
case TypeKind.Void: assert(false); // invalid here
}
return 0; // non-basic
diff --git a/src/parser.ts b/src/parser.ts
index 58050e837e..157351cd3a 100644
--- a/src/parser.ts
+++ b/src/parser.ts
@@ -9,6 +9,7 @@
import {
CommonFlags,
+ Feature,
LIBRARY_PREFIX,
PATH_DELIMITER
} from "./common";
@@ -42,6 +43,7 @@ import {
TypeName,
NamedTypeNode,
FunctionTypeNode,
+ TupleTypeNode,
ArrowKind,
Expression,
@@ -90,6 +92,7 @@ import {
mangleInternalPath
} from "./ast";
+import { Options } from "./compiler";
/** Represents a dependee. */
class Dependee {
@@ -118,7 +121,9 @@ export class Parser extends DiagnosticEmitter {
sources: Source[];
/** Current overridden module name. */
currentModuleName: string | null = null;
-
+ // TODO: Remove when multi-value feature will enable by default.
+ /** Compiler options. */
+ options: Options | null = null;
/** Constructs a new parser. */
constructor(
diagnostics: DiagnosticMessage[] | null = null,
@@ -563,6 +568,49 @@ export class Parser extends DiagnosticEmitter {
return null;
}
+ // 'readonly' Type
+ } else if (token == Token.Readonly) {
+ let innerType = this.parseType(tn, acceptParenthesized, suppressErrors);
+ if (!innerType) return null;
+ type = innerType;
+ type.range.start = startPos;
+
+ // '[' ((Identifier ':')? Type (',' (Identifier ':')? Type)*)? ']'
+ } else if (token == Token.OpenBracket && this.options && this.options!.hasFeature(Feature.MultiValue)) {
+ let elements: TypeNode[] = [];
+ let elementNames: (IdentifierExpression | null)[] = [];
+ let hasElementNames = false;
+ if (!tn.skip(Token.CloseBracket)) {
+ do {
+ let elementName: IdentifierExpression | null = null;
+ let state = tn.mark();
+ if (tn.skip(Token.Identifier)) {
+ let name = tn.readIdentifier();
+ let nameRange = tn.range();
+ if (tn.skip(Token.Colon)) {
+ elementName = Node.createIdentifierExpression(name, nameRange);
+ hasElementNames = true;
+ } else {
+ tn.reset(state);
+ }
+ }
+ let element = this.parseType(tn, true, suppressErrors);
+ if (!element) return null;
+ elements.push(element);
+ elementNames.push(elementName);
+ } while (tn.skip(Token.Comma));
+ if (!tn.skip(Token.CloseBracket)) {
+ if (!suppressErrors) {
+ this.error(
+ DiagnosticCode._0_expected,
+ tn.range(tn.pos), "]"
+ );
+ }
+ return null;
+ }
+ }
+ type = Node.createTupleType(elements, hasElementNames ? elementNames : null, false, tn.range(startPos, tn.pos));
+
// 'void'
} else if (token == Token.Void) {
type = Node.createNamedType(
@@ -631,7 +679,7 @@ export class Parser extends DiagnosticEmitter {
}
// ... | type
while (tn.skip(Token.Bar)) {
- let nextType = this.parseType(tn, false, true);
+ let nextType = this.parseType(tn, true, false);
if (!nextType) return null;
let typeIsNull = type.kind == NodeKind.NamedType && (type).isNull;
let nextTypeIsNull = nextType.kind == NodeKind.NamedType && (nextType).isNull;
@@ -4581,6 +4629,13 @@ function isCircularTypeAlias(name: string, type: TypeNode): bool {
}
break;
}
+ case NodeKind.TupleType: {
+ let elements = (type).elements;
+ for (let i = 0, k = elements.length; i < k; i++) {
+ if (isCircularTypeAlias(name, elements[i])) return true;
+ }
+ break;
+ }
default: assert(false);
}
return false;
diff --git a/src/passes/pass.ts b/src/passes/pass.ts
index c2daf98eb5..b61e17f1e8 100644
--- a/src/passes/pass.ts
+++ b/src/passes/pass.ts
@@ -208,32 +208,22 @@ import {
_BinaryenArrayCopyGetSrcRef,
_BinaryenArrayCopyGetSrcIndex,
_BinaryenArrayCopyGetLength,
- _BinaryenStringNewGetPtr,
- _BinaryenStringNewGetLength,
+ _BinaryenStringNewGetRef,
_BinaryenStringNewGetStart,
_BinaryenStringNewGetEnd,
_BinaryenStringMeasureGetRef,
- _BinaryenStringEncodeGetPtr,
- _BinaryenStringEncodeGetRef,
+ _BinaryenStringEncodeGetArray,
+ _BinaryenStringEncodeGetStr,
_BinaryenStringEncodeGetStart,
_BinaryenStringConcatGetLeft,
_BinaryenStringConcatGetRight,
_BinaryenStringEqGetLeft,
_BinaryenStringEqGetRight,
- _BinaryenStringAsGetRef,
- _BinaryenStringWTF8AdvanceGetRef,
- _BinaryenStringWTF8AdvanceGetPos,
- _BinaryenStringWTF8AdvanceGetBytes,
_BinaryenStringWTF16GetGetRef,
_BinaryenStringWTF16GetGetPos,
- _BinaryenStringIterNextGetRef,
- _BinaryenStringIterMoveGetRef,
- _BinaryenStringIterMoveGetNum,
_BinaryenStringSliceWTFGetRef,
_BinaryenStringSliceWTFGetStart,
_BinaryenStringSliceWTFGetEnd,
- _BinaryenStringSliceIterGetRef,
- _BinaryenStringSliceIterGetNum,
_BinaryenCallRefSetOperandAt,
_BinaryenCallRefSetTarget,
_BinaryenRefTestSetRef,
@@ -257,32 +247,22 @@ import {
_BinaryenArrayCopySetSrcIndex,
_BinaryenArrayCopySetLength,
_BinaryenRefAsSetValue,
- _BinaryenStringNewSetPtr,
- _BinaryenStringNewSetLength,
+ _BinaryenStringNewSetRef,
_BinaryenStringNewSetStart,
_BinaryenStringNewSetEnd,
_BinaryenStringMeasureSetRef,
- _BinaryenStringEncodeSetRef,
- _BinaryenStringEncodeSetPtr,
+ _BinaryenStringEncodeSetStr,
+ _BinaryenStringEncodeSetArray,
_BinaryenStringEncodeSetStart,
_BinaryenStringConcatSetLeft,
_BinaryenStringConcatSetRight,
_BinaryenStringEqSetLeft,
_BinaryenStringEqSetRight,
- _BinaryenStringAsSetRef,
- _BinaryenStringWTF8AdvanceSetRef,
- _BinaryenStringWTF8AdvanceSetPos,
- _BinaryenStringWTF8AdvanceSetBytes,
_BinaryenStringWTF16GetSetRef,
_BinaryenStringWTF16GetSetPos,
- _BinaryenStringIterNextSetRef,
- _BinaryenStringIterMoveSetRef,
- _BinaryenStringIterMoveSetNum,
_BinaryenStringSliceWTFSetRef,
_BinaryenStringSliceWTFSetStart,
_BinaryenStringSliceWTFSetEnd,
- _BinaryenStringSliceIterSetRef,
- _BinaryenStringSliceIterSetNum,
_BinaryenArrayNewFixedSetValueAt
} from "../glue/binaryen";
@@ -1183,9 +1163,7 @@ export abstract class Visitor {
}
case ExpressionId.StringNew: {
this.stack.push(expr);
- this.visit(_BinaryenStringNewGetPtr(expr));
- let length = _BinaryenStringNewGetLength(expr); // LM only
- if (length) this.visit(length);
+ this.visit(_BinaryenStringNewGetRef(expr));
let start = _BinaryenStringNewGetStart(expr); // GC only
if (start) this.visit(start);
let end = _BinaryenStringNewGetEnd(expr); // GC only
@@ -1209,8 +1187,8 @@ export abstract class Visitor {
}
case ExpressionId.StringEncode: {
this.stack.push(expr);
- this.visit(_BinaryenStringEncodeGetRef(expr));
- this.visit(_BinaryenStringEncodeGetPtr(expr));
+ this.visit(_BinaryenStringEncodeGetStr(expr));
+ this.visit(_BinaryenStringEncodeGetArray(expr));
let start = _BinaryenStringEncodeGetStart(expr); // GC only
if (start) this.visit(start);
assert(this.stack.pop() == expr);
@@ -1233,22 +1211,6 @@ export abstract class Visitor {
this.visitStringEq(expr);
break;
}
- case ExpressionId.StringAs: {
- this.stack.push(expr);
- this.visit(_BinaryenStringAsGetRef(expr));
- assert(this.stack.pop() == expr);
- this.visitStringAs(expr);
- break;
- }
- case ExpressionId.StringWTF8Advance: {
- this.stack.push(expr);
- this.visit(_BinaryenStringWTF8AdvanceGetRef(expr));
- this.visit(_BinaryenStringWTF8AdvanceGetPos(expr));
- this.visit(_BinaryenStringWTF8AdvanceGetBytes(expr));
- assert(this.stack.pop() == expr);
- this.visitStringWTF8Advance(expr);
- break;
- }
case ExpressionId.StringWTF16Get: {
this.stack.push(expr);
this.visit(_BinaryenStringWTF16GetGetRef(expr));
@@ -1257,21 +1219,6 @@ export abstract class Visitor {
this.visitStringWTF16Get(expr);
break;
}
- case ExpressionId.StringIterNext: {
- this.stack.push(expr);
- this.visit(_BinaryenStringIterNextGetRef(expr));
- assert(this.stack.pop() == expr);
- this.visitStringIterNext(expr);
- break;
- }
- case ExpressionId.StringIterMove: {
- this.stack.push(expr);
- this.visit(_BinaryenStringIterMoveGetRef(expr));
- this.visit(_BinaryenStringIterMoveGetNum(expr));
- assert(this.stack.pop() == expr);
- this.visitStringIterMove(expr);
- break;
- }
case ExpressionId.StringSliceWTF: {
this.stack.push(expr);
this.visit(_BinaryenStringSliceWTFGetRef(expr));
@@ -1281,14 +1228,6 @@ export abstract class Visitor {
this.visitStringSliceWTF(expr);
break;
}
- case ExpressionId.StringSliceIter: {
- this.stack.push(expr);
- this.visit(_BinaryenStringSliceIterGetRef(expr));
- this.visit(_BinaryenStringSliceIterGetNum(expr));
- assert(this.stack.pop() == expr);
- this.visitStringSliceIter(expr);
- break;
- }
default: throw new Error("unexpected expression kind");
}
this._currentExpression = previousExpression;
@@ -2072,16 +2011,11 @@ export function replaceChild(
break;
}
case ExpressionId.StringNew: {
- let ptr = _BinaryenStringNewGetPtr(parent);
+ let ptr = _BinaryenStringNewGetRef(parent);
if (ptr == search) {
- _BinaryenStringNewSetPtr(parent, replacement);
+ _BinaryenStringNewSetRef(parent, replacement);
return ptr;
}
- let length = _BinaryenStringNewGetLength(parent);
- if (length == search) {
- _BinaryenStringNewSetLength(parent, replacement);
- return length;
- }
let start = _BinaryenStringNewGetStart(parent);
if (start == search) {
_BinaryenStringNewSetStart(parent, replacement);
@@ -2106,14 +2040,14 @@ export function replaceChild(
break;
}
case ExpressionId.StringEncode: {
- let ref = _BinaryenStringEncodeGetRef(parent);
+ let ref = _BinaryenStringEncodeGetStr(parent);
if (ref == search) {
- _BinaryenStringEncodeSetRef(parent, replacement);
+ _BinaryenStringEncodeSetStr(parent, replacement);
return ref;
}
- let ptr = _BinaryenStringEncodeGetPtr(parent);
+ let ptr = _BinaryenStringEncodeGetArray(parent);
if (ptr == search) {
- _BinaryenStringEncodeSetPtr(parent, replacement);
+ _BinaryenStringEncodeSetArray(parent, replacement);
return ptr;
}
let start = _BinaryenStringEncodeGetStart(parent);
@@ -2149,32 +2083,6 @@ export function replaceChild(
}
break;
}
- case ExpressionId.StringAs: {
- let ref = _BinaryenStringAsGetRef(parent);
- if (ref == search) {
- _BinaryenStringAsSetRef(parent, replacement);
- return ref;
- }
- break;
- }
- case ExpressionId.StringWTF8Advance: {
- let ref = _BinaryenStringWTF8AdvanceGetRef(parent);
- if (ref == search) {
- _BinaryenStringWTF8AdvanceSetRef(parent, replacement);
- return ref;
- }
- let pos = _BinaryenStringWTF8AdvanceGetPos(parent);
- if (pos == search) {
- _BinaryenStringWTF8AdvanceSetPos(parent, replacement);
- return pos;
- }
- let bytes = _BinaryenStringWTF8AdvanceGetBytes(parent);
- if (bytes == search) {
- _BinaryenStringWTF8AdvanceSetBytes(parent, replacement);
- return bytes;
- }
- break;
- }
case ExpressionId.StringWTF16Get: {
let ref = _BinaryenStringWTF16GetGetRef(parent);
if (ref == search) {
@@ -2188,27 +2096,6 @@ export function replaceChild(
}
break;
}
- case ExpressionId.StringIterNext: {
- let ref = _BinaryenStringIterNextGetRef(parent);
- if (ref == search) {
- _BinaryenStringIterNextSetRef(parent, replacement);
- return ref;
- }
- break;
- }
- case ExpressionId.StringIterMove: {
- let ref = _BinaryenStringIterMoveGetRef(parent);
- if (ref == search) {
- _BinaryenStringIterMoveSetRef(parent, replacement);
- return ref;
- }
- let num = _BinaryenStringIterMoveGetNum(parent);
- if (num == search) {
- _BinaryenStringIterMoveSetNum(parent, replacement);
- return num;
- }
- break;
- }
case ExpressionId.StringSliceWTF: {
let ref = _BinaryenStringSliceWTFGetRef(parent);
if (ref == search) {
@@ -2227,19 +2114,6 @@ export function replaceChild(
}
break;
}
- case ExpressionId.StringSliceIter: {
- let ref = _BinaryenStringSliceIterGetRef(parent);
- if (ref == search) {
- _BinaryenStringSliceIterSetRef(parent, replacement);
- return ref;
- }
- let num = _BinaryenStringSliceIterGetNum(parent);
- if (num == search) {
- _BinaryenStringSliceIterSetNum(parent, replacement);
- return num;
- }
- break;
- }
default: throw new Error("unexpected expression id");
}
return 0;
diff --git a/src/passes/shadowstack.ts b/src/passes/shadowstack.ts
index 4d08e39971..d34997ed08 100644
--- a/src/passes/shadowstack.ts
+++ b/src/passes/shadowstack.ts
@@ -159,18 +159,21 @@ type TempMap = Map;
/** Attempts to match the `__tostack(value)` pattern. Returns `value` if a match, otherwise `0`. */
function matchPattern(module: Module, expr: ExpressionRef): ExpressionRef {
- if (
+ let isFound = false;
+ while (
_BinaryenExpressionGetId(expr) == ExpressionId.Call &&
module.readStringCached(_BinaryenCallGetTarget(expr)) == BuiltinNames.tostack
) {
assert(_BinaryenCallGetNumOperands(expr) == 1);
- return _BinaryenCallGetOperandAt(expr, 0);
+ expr = _BinaryenCallGetOperandAt(expr, 0);
+ isFound = true;
}
- return 0;
+ if (!isFound) return 0;
+ return expr;
}
/** Tests whether a `value` matched by `matchTostack` needs a slot. */
-function needsSlot(module: Module, value: ExpressionRef): bool {
+function needsSlot(value: ExpressionRef): bool {
switch (_BinaryenExpressionGetId(value)) {
// no need to stack null pointers
case ExpressionId.Const: return !isConstZero(value);
@@ -344,7 +347,7 @@ export class ShadowStackPass extends Pass {
let operand = operands[i];
let match = matchPattern(module, operand);
if (!match) continue;
- if (!needsSlot(module, match)) {
+ if (!needsSlot(match)) {
operands[i] = match;
continue;
}
@@ -434,7 +437,7 @@ export class ShadowStackPass extends Pass {
let value = _BinaryenLocalSetGetValue(localSet);
let match = matchPattern(module, value);
if (!match) return;
- if (!needsSlot(module, match)) {
+ if (!needsSlot(match)) {
_BinaryenLocalSetSetValue(localSet, match);
return;
}
diff --git a/src/program.ts b/src/program.ts
index 1f9849eec2..f5d9b7cae6 100644
--- a/src/program.ts
+++ b/src/program.ts
@@ -390,8 +390,10 @@ export namespace OperatorKind {
case Token.GreaterThan_GreaterThan_Equals: return OperatorKind.BitwiseShr;
case Token.GreaterThan_GreaterThan_GreaterThan:
case Token.GreaterThan_GreaterThan_GreaterThan_Equals: return OperatorKind.BitwiseShrU;
- case Token.Equals_Equals: return OperatorKind.Eq;
- case Token.Exclamation_Equals: return OperatorKind.Ne;
+ case Token.Equals_Equals:
+ case Token.Equals_Equals_Equals: return OperatorKind.Eq;
+ case Token.Exclamation_Equals:
+ case Token.Exclamation_Equals_Equals: return OperatorKind.Ne;
case Token.GreaterThan: return OperatorKind.Gt;
case Token.GreaterThan_Equals: return OperatorKind.Ge;
case Token.LessThan: return OperatorKind.Lt;
@@ -434,12 +436,15 @@ export class Program extends DiagnosticEmitter {
diagnostics: DiagnosticMessage[] | null = null
) {
super(diagnostics);
- this.module = Module.create(options.stackSize > 0, options.sizeTypeRef);
+ this.module = Module.create(options.stackSize > 0, options.sizeTypeRef);
this.parser = new Parser(this.diagnostics, this.sources);
this.resolver = new Resolver(this);
let nativeFile = new File(this, Source.native);
this.nativeFile = nativeFile;
this.filesByName.set(nativeFile.internalName, nativeFile);
+
+ // TODO: temporary workaround. remove after multi-value support is finished
+ this.parser.options = this.options;
}
/** Module instance. */
@@ -1083,7 +1088,9 @@ export class Program extends DiagnosticEmitter {
this.registerConstantInteger(CommonNames.ASC_FEATURE_EXTENDED_CONST, Type.bool,
i64_new(options.hasFeature(Feature.ExtendedConst) ? 1 : 0, 0));
this.registerConstantInteger(CommonNames.ASC_FEATURE_STRINGREF, Type.bool,
- i64_new(options.hasFeature(Feature.Stringref) ? 1 : 0, 0));
+ i64_new(options.hasFeature(Feature.Strings) ? 1 : 0, 0));
+ this.registerConstantInteger(CommonNames.ASC_FEATURE_SHARED_EVERYTHING, Type.bool,
+ i64_new(options.hasFeature(Feature.Strings) ? 1 : 0, 0));
// remember deferred elements
let queuedImports = new Array();
@@ -1287,7 +1294,9 @@ export class Program extends DiagnosticEmitter {
this.registerWrapperClass(Type.bool, CommonNames.Bool);
this.registerWrapperClass(Type.f32, CommonNames.F32);
this.registerWrapperClass(Type.f64, CommonNames.F64);
- if (options.hasFeature(Feature.Simd)) this.registerWrapperClass(Type.v128, CommonNames.V128);
+ if (options.hasFeature(Feature.Simd)) {
+ this.registerWrapperClass(Type.v128, CommonNames.V128);
+ }
if (options.hasFeature(Feature.ReferenceTypes)) {
this.registerWrapperClass(Type.func, CommonNames.RefFunc);
this.registerWrapperClass(Type.extern, CommonNames.RefExtern);
@@ -1298,7 +1307,7 @@ export class Program extends DiagnosticEmitter {
this.registerWrapperClass(Type.array, CommonNames.RefArray);
this.registerWrapperClass(Type.i31, CommonNames.RefI31);
}
- if (options.hasFeature(Feature.Stringref)) {
+ if (options.hasFeature(Feature.Strings)) {
this.registerWrapperClass(Type.string, CommonNames.RefString);
}
}
@@ -1308,7 +1317,7 @@ export class Program extends DiagnosticEmitter {
for (let i = 0, k = queuedExtends.length; i < k; ++i) {
let thisPrototype = queuedExtends[i];
let extendsNode = assert(thisPrototype.extendsNode); // must be present if in queuedExtends
- let baseElement = resolver.resolveTypeName(extendsNode.name, thisPrototype.parent);
+ let baseElement = resolver.resolveTypeName(extendsNode.name, null, thisPrototype.parent);
if (!baseElement) continue;
if (thisPrototype.kind == ElementKind.ClassPrototype) {
if (baseElement.kind == ElementKind.ClassPrototype) {
@@ -1405,7 +1414,7 @@ export class Program extends DiagnosticEmitter {
let implementsNodes = assert(thisPrototype.implementsNodes); // must be present if in queuedImplements
for (let j = 0, l = implementsNodes.length; j < l; ++j) {
let implementsNode = implementsNodes[j];
- let interfaceElement = resolver.resolveTypeName(implementsNode.name, thisPrototype.parent);
+ let interfaceElement = resolver.resolveTypeName(implementsNode.name, null, thisPrototype.parent);
if (!interfaceElement) continue;
if (interfaceElement.kind == ElementKind.InterfacePrototype) {
let interfacePrototype = interfaceElement;
@@ -1555,6 +1564,16 @@ export class Program extends DiagnosticEmitter {
) {
let thisMethod = thisMember;
let baseMethod = baseMember;
+ let thisIsGeneric = thisMethod.is(CommonFlags.Generic);
+ let baseIsGeneric = baseMethod.is(CommonFlags.Generic);
+ if (thisIsGeneric != baseIsGeneric) {
+ this.errorRelated(
+ DiagnosticCode.Cannot_override_generic_method_0_with_a_non_generic_method_or_vice_versa,
+ thisMethod.identifierNode.range, baseMethod.identifierNode.range,
+ thisMethod.name
+ );
+ return;
+ }
if (!thisMethod.visibilityEquals(baseMethod)) {
this.errorRelated(
DiagnosticCode.Overload_signatures_must_all_be_public_private_or_protected,
@@ -1972,7 +1991,7 @@ export class Program extends DiagnosticEmitter {
case TypeKind.StringviewWTF16:
case TypeKind.StringviewIter: {
return this.checkFeatureEnabled(Feature.ReferenceTypes, reportNode)
- && this.checkFeatureEnabled(Feature.Stringref, reportNode);
+ && this.checkFeatureEnabled(Feature.Strings, reportNode);
}
}
let classReference = type.getClass();
@@ -2077,6 +2096,13 @@ export class Program extends DiagnosticEmitter {
}
case NodeKind.MethodDeclaration: {
let methodDeclaration = memberDeclaration;
+ if (methodDeclaration.is(CommonFlags.Abstract) && methodDeclaration.is(CommonFlags.Generic)) {
+ this.error(
+ DiagnosticCode.An_interface_or_abstract_method_0_cannot_have_type_parameters,
+ methodDeclaration.name.range,
+ methodDeclaration.name.text
+ );
+ }
if (memberDeclaration.isAny(CommonFlags.Get | CommonFlags.Set)) {
this.initializeProperty(methodDeclaration, element);
} else {
@@ -2651,6 +2677,13 @@ export class Program extends DiagnosticEmitter {
}
case NodeKind.MethodDeclaration: {
let methodDeclaration = memberDeclaration;
+ if (methodDeclaration.is(CommonFlags.Generic)) {
+ this.error(
+ DiagnosticCode.An_interface_or_abstract_method_0_cannot_have_type_parameters,
+ methodDeclaration.name.range,
+ methodDeclaration.name.text
+ );
+ }
if (memberDeclaration.isAny(CommonFlags.Get | CommonFlags.Set)) {
this.initializeProperty(methodDeclaration, element);
} else {
@@ -2671,6 +2704,10 @@ export class Program extends DiagnosticEmitter {
/** Parent interface. */
parent: InterfacePrototype
): void {
+ let initializer = declaration.initializer;
+ if (initializer) {
+ this.error(DiagnosticCode.An_interface_property_cannot_have_an_initializer, initializer.range);
+ }
let typeNode = declaration.type;
if (!typeNode) typeNode = Node.createOmittedType(declaration.name.range.atEnd);
this.initializeProperty(
@@ -3084,6 +3121,13 @@ export abstract class Element {
return (this.flags & vis) == (other.flags & vis);
}
+ visibilityNoLessThan(other: Element): bool {
+ if (this.isPublic) return true; // public is a most frequent case
+ if (this.is(CommonFlags.Private)) return other.is(CommonFlags.Private);
+ if (this.is(CommonFlags.Protected)) return other.isAny(CommonFlags.Private | CommonFlags.Protected);
+ return assert(false);
+ }
+
/** Tests if this element is bound to a class. */
get isBound(): bool {
let parent = this.parent;
@@ -3372,7 +3416,7 @@ export class TypeDefinition extends TypedElement {
constructor(
/** Simple name. */
name: string,
- /** Parent element, usually a file or namespace. */
+ /** Parent element. */
parent: Element,
/** Declaration reference. */
declaration: TypeDeclaration,
@@ -3436,7 +3480,7 @@ export class Namespace extends DeclaredElement {
/** An enum. */
export class Enum extends TypedElement {
-
+ toStringFunctionName: string | null = null;
/** Constructs a new enum. */
constructor(
/** Simple name. */
@@ -3837,7 +3881,15 @@ export class Function extends TypedElement {
flow.setLocalFlag(local.index, LocalFlags.Initialized);
}
}
- registerConcreteElement(program, this);
+ if (program.instancesByName.has(this.internalName)) {
+ program.error(
+ DiagnosticCode.Duplicate_function_implementation,
+ prototype.declaration.name.range
+ );
+ this.set(CommonFlags.Errored);
+ } else {
+ registerConcreteElement(program, this);
+ }
}
/** Gets the types of additional locals that are not parameters. */
@@ -4170,6 +4222,17 @@ export class Property extends VariableLikeElement {
get isField(): bool {
return this.prototype.isField;
}
+
+ checkVisibility(diag: DiagnosticEmitter): void {
+ let propertyGetter = this.getterInstance;
+ let propertySetter = this.setterInstance;
+ if (propertyGetter && propertySetter && !propertyGetter.visibilityNoLessThan(propertySetter)) {
+ diag.errorRelated(
+ DiagnosticCode.Get_accessor_0_must_be_at_least_as_accessible_as_the_setter,
+ propertyGetter.identifierNode.range, propertySetter.identifierNode.range, propertyGetter.identifierNode.text
+ );
+ }
+ }
}
/** A resolved index signature. */
diff --git a/src/resolver.ts b/src/resolver.ts
index ca05a3424b..9576a4768f 100644
--- a/src/resolver.ts
+++ b/src/resolver.ts
@@ -45,6 +45,7 @@ import {
import {
FunctionTypeNode,
+ TupleTypeNode,
ParameterKind,
TypeNode,
NodeKind,
@@ -103,7 +104,9 @@ import {
} from "./tokenizer";
import {
- BuiltinNames
+ BuiltinNames,
+ builtinTypes,
+ BuiltinTypesContext
} from "./builtins";
/** Indicates whether errors are reported or not. */
@@ -142,6 +145,8 @@ export class Resolver extends DiagnosticEmitter {
resolveType(
/** The type to resolve. */
node: TypeNode,
+ /** The flow */
+ flow: Flow | null,
/** Contextual element. */
ctxElement: Element,
/** Contextual types, i.e. `T`. */
@@ -160,21 +165,15 @@ export class Resolver extends DiagnosticEmitter {
let resolved: Type | null = null;
switch (node.kind) {
case NodeKind.NamedType: {
- resolved = this.resolveNamedType(
- node,
- ctxElement,
- ctxTypes,
- reportMode
- );
+ resolved = this.resolveNamedType(node, flow, ctxElement, ctxTypes, reportMode);
break;
}
case NodeKind.FunctionType: {
- resolved = this.resolveFunctionType(
- node,
- ctxElement,
- ctxTypes,
- reportMode
- );
+ resolved = this.resolveFunctionType(node, flow, ctxElement, ctxTypes, reportMode);
+ break;
+ }
+ case NodeKind.TupleType: {
+ resolved = this.resolveTupleType(node, flow, ctxElement, ctxTypes, reportMode);
break;
}
default: assert(false);
@@ -187,6 +186,8 @@ export class Resolver extends DiagnosticEmitter {
private resolveNamedType(
/** The type to resolve. */
node: NamedTypeNode,
+ /** The flow */
+ flow: Flow | null,
/** Contextual element. */
ctxElement: Element,
/** Contextual types, i.e. `T`. */
@@ -225,7 +226,7 @@ export class Resolver extends DiagnosticEmitter {
}
// Look up in context
- let element = this.resolveTypeName(nameNode, ctxElement, reportMode);
+ let element = this.resolveTypeName(nameNode, flow, ctxElement, reportMode);
if (!element) return null;
// Use shadow type if present (i.e. namespace sharing a type)
@@ -264,6 +265,7 @@ export class Resolver extends DiagnosticEmitter {
let instance = this.resolveClassInclTypeArguments(
element,
typeArgumentNodes,
+ flow,
ctxElement,
cloneMap(ctxTypes), // don't inherit
node,
@@ -304,11 +306,11 @@ export class Resolver extends DiagnosticEmitter {
// Handle special built-in types
if (isSimpleType) {
let text = nameNode.identifier.text;
- if (text == CommonNames.native) return this.resolveBuiltinNativeType(node, ctxElement, ctxTypes, reportMode);
- if (text == CommonNames.indexof) return this.resolveBuiltinIndexofType(node, ctxElement, ctxTypes, reportMode);
- if (text == CommonNames.valueof) return this.resolveBuiltinValueofType(node, ctxElement, ctxTypes, reportMode);
- if (text == CommonNames.returnof) return this.resolveBuiltinReturnTypeType(node, ctxElement, ctxTypes, reportMode);
- if (text == CommonNames.nonnull) return this.resolveBuiltinNotNullableType(node, ctxElement, ctxTypes, reportMode);
+ if (builtinTypes.has(text)) {
+ let fn = assert(builtinTypes.get(text));
+ let ctx = new BuiltinTypesContext(this, node, ctxElement, ctxTypes, reportMode);
+ return fn(ctx);
+ }
}
// Resolve normally
@@ -318,6 +320,7 @@ export class Resolver extends DiagnosticEmitter {
typeArguments = this.resolveTypeArguments(
typeParameterNodes,
typeArgumentNodes,
+ flow,
ctxElement,
ctxTypes = cloneMap(ctxTypes), // update
node,
@@ -332,6 +335,7 @@ export class Resolver extends DiagnosticEmitter {
}
let type = this.resolveType(
typeDefinition.typeNode,
+ flow,
element,
ctxTypes,
reportMode
@@ -361,6 +365,8 @@ export class Resolver extends DiagnosticEmitter {
private resolveFunctionType(
/** The type to resolve. */
node: FunctionTypeNode,
+ /** The flow */
+ flow: Flow | null,
/** Contextual element. */
ctxElement: Element,
/** Contextual types, i.e. `T`. */
@@ -373,6 +379,7 @@ export class Resolver extends DiagnosticEmitter {
if (explicitThisType) {
thisType = this.resolveType(
explicitThisType,
+ flow,
ctxElement,
ctxTypes,
reportMode
@@ -409,11 +416,21 @@ export class Resolver extends DiagnosticEmitter {
}
let parameterType = this.resolveType(
parameterTypeNode,
+ flow,
ctxElement,
ctxTypes,
reportMode
);
if (!parameterType) return null;
+ if (parameterType == Type.void) {
+ if (reportMode == ReportMode.Report) {
+ this.error(
+ DiagnosticCode.Type_0_is_illegal_in_this_context,
+ parameterTypeNode.range, parameterType.toString()
+ );
+ }
+ return null;
+ }
parameterTypes[i] = parameterType;
}
let returnTypeNode = node.returnType;
@@ -429,6 +446,7 @@ export class Resolver extends DiagnosticEmitter {
} else {
returnType = this.resolveType(
returnTypeNode,
+ flow,
ctxElement,
ctxTypes,
reportMode
@@ -439,88 +457,12 @@ export class Resolver extends DiagnosticEmitter {
return node.isNullable ? signature.type.asNullable() : signature.type;
}
- private resolveBuiltinNativeType(
- /** The type to resolve. */
- node: NamedTypeNode,
- /** Contextual element. */
- ctxElement: Element,
- /** Contextual types, i.e. `T`. */
- ctxTypes: Map | null = null,
- /** How to proceed with eventual diagnostics. */
- reportMode: ReportMode = ReportMode.Report
- ): Type | null {
- const typeArgumentNode = this.ensureOneTypeArgument(node, reportMode);
- if (!typeArgumentNode) return null;
- let typeArgument = this.resolveType(typeArgumentNode, ctxElement, ctxTypes, reportMode);
- if (!typeArgument) return null;
- switch (typeArgument.kind) {
- case TypeKind.I8:
- case TypeKind.I16:
- case TypeKind.I32: return Type.i32;
- case TypeKind.Isize: if (!this.program.options.isWasm64) return Type.i32;
- case TypeKind.I64: return Type.i64;
- case TypeKind.U8:
- case TypeKind.U16:
- case TypeKind.U32:
- case TypeKind.Bool: return Type.u32;
- case TypeKind.Usize: if (!this.program.options.isWasm64) return Type.u32;
- case TypeKind.U64: return Type.u64;
- case TypeKind.F32: return Type.f32;
- case TypeKind.F64: return Type.f64;
- case TypeKind.V128: return Type.v128;
- case TypeKind.Void: return Type.void;
- default: assert(false);
- }
- return null;
- }
-
- private resolveBuiltinIndexofType(
- /** The type to resolve. */
- node: NamedTypeNode,
- /** Contextual element. */
- ctxElement: Element,
- /** Contextual types, i.e. `T`. */
- ctxTypes: Map | null = null,
- /** How to proceed with eventual diagnostics. */
- reportMode: ReportMode = ReportMode.Report
- ): Type | null {
- const typeArgumentNode = this.ensureOneTypeArgument(node, reportMode);
- if (!typeArgumentNode) return null;
- let typeArgument = this.resolveType(typeArgumentNode, ctxElement, ctxTypes, reportMode);
- if (!typeArgument) return null;
- let classReference = typeArgument.classReference;
- if (!classReference) {
- if (reportMode == ReportMode.Report) {
- this.error(
- DiagnosticCode.Index_signature_is_missing_in_type_0,
- typeArgumentNode.range, typeArgument.toString()
- );
- }
- return null;
- }
- let overload = classReference.lookupOverload(OperatorKind.IndexedGet);
- if (overload) {
- let parameterTypes = overload.signature.parameterTypes;
- if (overload.is(CommonFlags.Static)) {
- assert(parameterTypes.length == 2);
- return parameterTypes[1];
- } else {
- assert(parameterTypes.length == 1);
- return parameterTypes[0];
- }
- }
- if (reportMode == ReportMode.Report) {
- this.error(
- DiagnosticCode.Index_signature_is_missing_in_type_0,
- typeArgumentNode.range, typeArgument.toString()
- );
- }
- return null;
- }
-
- private resolveBuiltinValueofType(
+ /** Resolves a {@link TupleTypeNode}. */
+ private resolveTupleType(
/** The type to resolve. */
- node: NamedTypeNode,
+ node: TupleTypeNode,
+ /** The flow */
+ flow: Flow | null,
/** Contextual element. */
ctxElement: Element,
/** Contextual types, i.e. `T`. */
@@ -528,44 +470,14 @@ export class Resolver extends DiagnosticEmitter {
/** How to proceed with eventual diagnostics. */
reportMode: ReportMode = ReportMode.Report
): Type | null {
- const typeArgumentNode = this.ensureOneTypeArgument(node, reportMode);
- if (!typeArgumentNode) return null;
- let typeArgument = this.resolveType(typeArgumentNode, ctxElement, ctxTypes, reportMode);
- if (!typeArgument) return null;
- let classReference = typeArgument.getClassOrWrapper(this.program);
- if (classReference) {
- let overload = classReference.lookupOverload(OperatorKind.IndexedGet);
- if (overload) return overload.signature.returnType;
+ let elements = node.elements;
+ for (let i = 0, k = elements.length; i < k; ++i) {
+ if (!this.resolveType(elements[i], flow, ctxElement, ctxTypes, reportMode)) return null;
}
if (reportMode == ReportMode.Report) {
this.error(
- DiagnosticCode.Index_signature_is_missing_in_type_0,
- typeArgumentNode.range, typeArgument.toString()
- );
- }
- return null;
- }
-
- private resolveBuiltinReturnTypeType(
- /** The type to resolve. */
- node: NamedTypeNode,
- /** Contextual element. */
- ctxElement: Element,
- /** Contextual types, i.e. `T`. */
- ctxTypes: Map | null = null,
- /** How to proceed with eventualy diagnostics. */
- reportMode: ReportMode = ReportMode.Report
- ): Type | null {
- const typeArgumentNode = this.ensureOneTypeArgument(node, reportMode);
- if (!typeArgumentNode) return null;
- let typeArgument = this.resolveType(typeArgumentNode, ctxElement, ctxTypes, reportMode);
- if (!typeArgument) return null;
- let signatureReference = typeArgument.getSignature();
- if (signatureReference) return signatureReference.returnType;
- if (reportMode == ReportMode.Report) {
- this.error(
- DiagnosticCode.Type_0_has_no_call_signatures,
- typeArgumentNode.range, typeArgument.toString()
+ DiagnosticCode.Not_implemented_0,
+ node.range, "Tuple types"
);
}
return null;
@@ -583,7 +495,7 @@ export class Resolver extends DiagnosticEmitter {
): Type | null {
const typeArgumentNode = this.ensureOneTypeArgument(node, reportMode);
if (!typeArgumentNode) return null;
- let typeArgument = this.resolveType(typeArgumentNode, ctxElement, ctxTypes, reportMode);
+ let typeArgument = this.resolveType(typeArgumentNode, null, ctxElement, ctxTypes, reportMode);
if (!typeArgument) return null;
if (!typeArgument.isNullableReference) return typeArgument;
return typeArgument.nonNullableType;
@@ -593,12 +505,16 @@ export class Resolver extends DiagnosticEmitter {
resolveTypeName(
/** The type name to resolve. */
node: TypeName,
+ /** The flow */
+ flow: Flow | null,
/** Contextual element. */
ctxElement: Element,
/** How to proceed with eventual diagnostics. */
reportMode: ReportMode = ReportMode.Report
): Element | null {
- let element = ctxElement.lookup(node.identifier.text, true);
+ let element: Element | null = null;
+ if (flow) element = flow.lookupTypeAlias(node.identifier.text);
+ if (!element) element = ctxElement.lookup(node.identifier.text, true);
if (!element) {
if (reportMode == ReportMode.Report) {
this.error(
@@ -632,6 +548,8 @@ export class Resolver extends DiagnosticEmitter {
typeParameters: TypeParameterNode[],
/** Type argument nodes provided. */
typeArgumentNodes: TypeNode[] | null,
+ /** Flow */
+ flow: Flow | null,
/** Contextual element. */
ctxElement: Element,
/** Contextual types, i.e. `T`. Updated in place with the new set of contextual types. */
@@ -641,9 +559,8 @@ export class Resolver extends DiagnosticEmitter {
/** How to proceed with eventual diagnostics. */
reportMode: ReportMode = ReportMode.Report
): Type[] | null {
- var
- minParameterCount = 0,
- maxParameterCount = 0;
+ let minParameterCount = 0;
+ let maxParameterCount = 0;
for (let i = 0, k = typeParameters.length; i < k; ++i) {
if (!typeParameters[i].defaultType) ++minParameterCount;
++maxParameterCount;
@@ -672,12 +589,14 @@ export class Resolver extends DiagnosticEmitter {
let type = i < argumentCount
? this.resolveType( // reports
typeArgumentNodes![i],
+ flow,
ctxElement,
oldCtxTypes, // update
reportMode
)
: this.resolveType( // reports
assert(typeParameters[i].defaultType),
+ flow,
ctxElement,
cloneMap(ctxTypes), // don't update
reportMode
@@ -722,109 +641,179 @@ export class Resolver extends DiagnosticEmitter {
// infer generic call if type arguments have been omitted
if (prototype.is(CommonFlags.Generic)) {
- let contextualTypeArguments = cloneMap(ctxFlow.contextualTypeArguments);
+ let resolvedTypeArguments = this.inferGenericTypeArguments(
+ node,
+ prototype,
+ prototype.typeParameterNodes,
+ ctxFlow,
+ reportMode,
+ );
+ if (!resolvedTypeArguments) {
+ return null;
+ }
+ return this.resolveFunction(
+ prototype,
+ resolvedTypeArguments,
+ cloneMap(ctxFlow.contextualTypeArguments),
+ reportMode
+ );
+ }
- // fill up contextual types with auto for each generic component
- let typeParameterNodes = assert(prototype.typeParameterNodes);
- let numTypeParameters = typeParameterNodes.length;
- let typeParameterNames = new Set();
- for (let i = 0; i < numTypeParameters; ++i) {
- let name = typeParameterNodes[i].name.text;
- contextualTypeArguments.set(name, Type.auto);
- typeParameterNames.add(name);
- }
-
- let parameterNodes = prototype.functionTypeNode.parameters;
- let numParameters = parameterNodes.length;
- let argumentNodes = node.args;
- let numArguments = argumentNodes.length;
-
- // infer types with generic components while updating contextual types
- for (let i = 0; i < numParameters; ++i) {
- let argumentExpression = i < numArguments
- ? argumentNodes[i]
- : parameterNodes[i].initializer;
- if (!argumentExpression) {
- // optional but not have initializer should be handled in the other place
- if (parameterNodes[i].parameterKind == ParameterKind.Optional) {
- continue;
- }
- // missing initializer -> too few arguments
- if (reportMode == ReportMode.Report) {
+ // otherwise resolve the non-generic call as usual
+ return this.resolveFunction(prototype, null, new Map(), reportMode);
+ }
+
+ private inferGenericTypeArguments(
+ node: Expression,
+ prototype: FunctionPrototype,
+ typeParameterNodes: TypeParameterNode[] | null,
+ ctxFlow: Flow,
+ reportMode: ReportMode = ReportMode.Report,
+ ): Type[] | null {
+
+ if (!typeParameterNodes) {
+ return null;
+ }
+
+ let contextualTypeArguments = cloneMap(ctxFlow.contextualTypeArguments);
+
+ // fill up contextual types with auto for each generic component
+ let numTypeParameters = typeParameterNodes.length;
+ let typeParameterNames = new Set();
+ for (let i = 0; i < numTypeParameters; ++i) {
+ let name = typeParameterNodes[i].name.text;
+ contextualTypeArguments.set(name, Type.auto);
+ typeParameterNames.add(name);
+ }
+
+ let parameterNodes = prototype.functionTypeNode.parameters;
+ let numParameters = parameterNodes.length;
+
+ let argumentNodes: Expression[];
+ let argumentsRange: Range;
+ switch (node.kind) {
+ case NodeKind.Call: {
+ const expr = node as CallExpression;
+ argumentNodes = expr.args;
+ argumentsRange = expr.argumentsRange;
+ break;
+ }
+ case NodeKind.New: {
+ const expr = node as NewExpression;
+ argumentNodes = expr.args;
+ argumentsRange = expr.argumentsRange;
+ break;
+ }
+ default: {
+ assert(false);
+ return null;
+ }
+ }
+
+ let numArguments = argumentNodes.length;
+
+ // infer types with generic components while updating contextual types
+ for (let i = 0; i < numParameters; ++i) {
+ let argumentExpression = i < numArguments
+ ? argumentNodes[i]
+ : parameterNodes[i].initializer;
+ if (!argumentExpression) {
+ // optional but not have initializer should be handled in the other place
+ if (parameterNodes[i].parameterKind == ParameterKind.Optional) {
+ continue;
+ }
+ if (reportMode == ReportMode.Report) {
+ if (parameterNodes[i].parameterKind == ParameterKind.Rest) {
+ // rest params are optional, but one element is needed for type inference
+ this.error(
+ DiagnosticCode.Type_argument_expected,
+ argumentsRange.atEnd
+ );
+ } else {
+ // missing initializer -> too few arguments
this.error(
DiagnosticCode.Expected_0_arguments_but_got_1,
node.range, numParameters.toString(), numArguments.toString()
);
}
- return null;
}
- let typeNode = parameterNodes[i].type;
- if (typeNode.hasGenericComponent(typeParameterNodes)) {
- let type = this.resolveExpression(argumentExpression, ctxFlow, Type.auto, ReportMode.Swallow);
- if (type) {
- this.propagateInferredGenericTypes(
- typeNode,
- type,
- prototype,
- contextualTypeArguments,
- typeParameterNames
- );
- }
+ return null;
+ }
+ let typeNode = parameterNodes[i].type;
+ if (parameterNodes[i].parameterKind == ParameterKind.Rest) {
+ typeNode = ( typeNode).typeArguments![0];
+ }
+ if (typeNode.hasGenericComponent(typeParameterNodes)) {
+ let type = this.resolveExpression(argumentExpression, ctxFlow, Type.auto, ReportMode.Swallow);
+ if (type) {
+ this.propagateInferredGenericTypes(
+ typeNode,
+ type,
+ prototype,
+ contextualTypeArguments,
+ typeParameterNames
+ );
}
}
+ }
- // apply concrete types to the generic function signature
- let resolvedTypeArguments = new Array(numTypeParameters);
- for (let i = 0; i < numTypeParameters; ++i) {
- let typeParameterNode = typeParameterNodes[i];
- let name = typeParameterNode.name.text;
- if (contextualTypeArguments.has(name)) {
- let inferredType = assert(contextualTypeArguments.get(name));
- if (inferredType != Type.auto) {
- resolvedTypeArguments[i] = inferredType;
- continue;
- }
- let defaultType = typeParameterNode.defaultType;
- if (defaultType) {
- // Default parameters are resolved in context of the called function, not the calling function
- let parent = prototype.parent;
- let defaultTypeContextualTypeArguments: Map | null = null;
- if (parent.kind == ElementKind.Class) {
- defaultTypeContextualTypeArguments = (parent).contextualTypeArguments;
- } else if (parent.kind == ElementKind.Function) {
- defaultTypeContextualTypeArguments = (parent).contextualTypeArguments;
- }
- let resolvedDefaultType = this.resolveType(
- defaultType,
- prototype,
- defaultTypeContextualTypeArguments,
- reportMode
- );
- if (!resolvedDefaultType) return null;
- resolvedTypeArguments[i] = resolvedDefaultType;
- continue;
+ // apply concrete types to the generic function signature
+ let resolvedTypeArguments = new Array(numTypeParameters);
+ for (let i = 0; i < numTypeParameters; ++i) {
+ let typeParameterNode = typeParameterNodes[i];
+ let name = typeParameterNode.name.text;
+ if (contextualTypeArguments.has(name)) {
+ let inferredType = assert(contextualTypeArguments.get(name));
+ if (inferredType != Type.auto) {
+ resolvedTypeArguments[i] = inferredType;
+ continue;
+ }
+ let defaultType = typeParameterNode.defaultType;
+ if (defaultType) {
+ // Default parameters are resolved in context of the called function, not the calling function
+ let parent = prototype.parent;
+ let defaultTypeContextualTypeArguments: Map | null = null;
+ if (parent.kind == ElementKind.Class) {
+ defaultTypeContextualTypeArguments = (parent).contextualTypeArguments;
+ } else if (parent.kind == ElementKind.Function) {
+ defaultTypeContextualTypeArguments = (parent).contextualTypeArguments;
}
- }
- // unused template, e.g. `function test(): void {...}` called as `test()`
- // invalid because the type is effectively unknown inside the function body
- if (reportMode == ReportMode.Report) {
- this.error(
- DiagnosticCode.Type_argument_expected,
- node.expression.range.atEnd
+ let resolvedDefaultType = this.resolveType(
+ defaultType,
+ null,
+ prototype,
+ defaultTypeContextualTypeArguments,
+ reportMode
);
+ if (!resolvedDefaultType) return null;
+ resolvedTypeArguments[i] = resolvedDefaultType;
+ continue;
}
- return null;
}
- return this.resolveFunction(
- prototype,
- resolvedTypeArguments,
- cloneMap(ctxFlow.contextualTypeArguments),
- reportMode
- );
+ // unused template, e.g. `function test(): void {...}` called as `test()`
+ // invalid because the type is effectively unknown inside the function body
+ if (reportMode == ReportMode.Report) {
+ let range: Range;
+ switch (node.kind) {
+ case NodeKind.Call:
+ range = (node).expression.range;
+ break;
+ case NodeKind.New:
+ range = (node).typeName.range;
+ break;
+ default:
+ assert(false);
+ return null;
+ }
+ this.error(
+ DiagnosticCode.Type_argument_expected,
+ range.atEnd
+ );
+ }
+ return null;
}
- // otherwise resolve the non-generic call as usual
- return this.resolveFunction(prototype, null, new Map(), reportMode);
+ return resolvedTypeArguments;
}
/** Updates contextual types with a possibly encapsulated inferred type. */
@@ -846,7 +835,7 @@ export class Resolver extends DiagnosticEmitter {
if (typeArgumentNodes && typeArgumentNodes.length > 0) { // foo(bar: Array)
let classReference = type.classReference;
if (classReference) {
- let classPrototype = this.resolveTypeName(namedTypeNode.name, ctxElement);
+ let classPrototype = this.resolveTypeName(namedTypeNode.name, null, ctxElement);
if (!classPrototype || classPrototype.kind != ElementKind.ClassPrototype) return;
if (classReference.prototype == classPrototype) {
let typeArguments = classReference.typeArguments;
@@ -1306,7 +1295,7 @@ export class Resolver extends DiagnosticEmitter {
if (global.is(CommonFlags.Resolved)) return true;
let typeNode = global.typeNode;
let type = typeNode
- ? this.resolveType(typeNode, global.parent, null, reportMode)
+ ? this.resolveType(typeNode, null, global.parent, null, reportMode)
: this.resolveExpression(
assert(global.initializerNode),
global.file.startFunction.flow,
@@ -1363,7 +1352,18 @@ export class Resolver extends DiagnosticEmitter {
}
case ElementKind.Property: { // someInstance.prop
let propertyInstance = target;
- let getterInstance = assert(propertyInstance.getterInstance); // must have a getter
+ let getterInstance = propertyInstance.getterInstance;
+ if (!getterInstance) {
+ // In TS, getters without setters return `undefined`. Since AS doesn't have
+ // undefined, we instead diagnose it at compile time, but this isn't
+ // compatible with TS.
+ let setterInstance = assert(propertyInstance.setterInstance);
+ this.errorRelated(
+ DiagnosticCode.Property_0_only_has_a_setter_and_is_missing_a_getter,
+ targetNode.range, setterInstance.declaration.range, propertyInstance.name
+ );
+ return null;
+ }
let type = getterInstance.signature.returnType;
let classReference = type.getClassOrWrapper(this.program);
if (!classReference) {
@@ -1413,7 +1413,7 @@ export class Resolver extends DiagnosticEmitter {
let shadowType = target.shadowType;
if (shadowType) {
if (!shadowType.is(CommonFlags.Resolved)) {
- let resolvedType = this.resolveType(shadowType.typeNode, shadowType.parent, null, reportMode);
+ let resolvedType = this.resolveType(shadowType.typeNode, null, shadowType.parent, null, reportMode);
if (resolvedType) shadowType.setType(resolvedType);
}
let classReference = shadowType.type.classReference;
@@ -1440,8 +1440,10 @@ export class Resolver extends DiagnosticEmitter {
case ElementKind.InterfacePrototype:
case ElementKind.Class:
case ElementKind.Interface: {
+ let classLikeTarget = target;
+ let findBase = false;
do {
- let member = target.getMember(propertyName);
+ let member = classLikeTarget.getMember(propertyName);
if (member) {
if (member.kind == ElementKind.PropertyPrototype) {
let propertyInstance = this.resolveProperty(member, reportMode);
@@ -1458,34 +1460,32 @@ export class Resolver extends DiagnosticEmitter {
this.currentElementExpression = null;
return member; // instance FIELD, static GLOBAL, FUNCTION_PROTOTYPE, PROPERTY...
}
- // traverse inherited static members on the base prototype if target is a class prototype
- if (
- target.kind == ElementKind.ClassPrototype ||
- target.kind == ElementKind.InterfacePrototype
- ) {
- let classPrototype = target;
- let basePrototype = classPrototype.basePrototype;
- if (basePrototype) {
- target = basePrototype;
- } else {
+ findBase = false;
+ switch (classLikeTarget.kind) {
+ case ElementKind.ClassPrototype:
+ case ElementKind.InterfacePrototype: {
+ // traverse inherited static members on the base prototype if target is a class prototype
+ let classPrototype = classLikeTarget;
+ let basePrototype = classPrototype.basePrototype;
+ if (basePrototype) {
+ findBase = true;
+ classLikeTarget = basePrototype;
+ }
break;
}
- // traverse inherited instance members on the base class if target is a class instance
- } else if (
- target.kind == ElementKind.Class ||
- target.kind == ElementKind.Interface
- ) {
- let classInstance = target;
- let baseInstance = classInstance.base;
- if (baseInstance) {
- target = baseInstance;
- } else {
+ case ElementKind.Class:
+ case ElementKind.Interface: {
+ // traverse inherited instance members on the base class if target is a class instance
+ let classInstance = classLikeTarget;
+ let baseInstance = classInstance.base;
+ if (baseInstance) {
+ findBase = true;
+ classLikeTarget = baseInstance;
+ }
break;
}
- } else {
- break;
}
- } while (true);
+ } while (findBase);
break;
}
default: { // enums or other namespace-like elements
@@ -1697,6 +1697,7 @@ export class Resolver extends DiagnosticEmitter {
case AssertionKind.Prefix: {
let type = this.resolveType(
assert(node.toType), // must be set if not NONNULL
+ null,
ctxFlow.sourceFunction,
ctxFlow.contextualTypeArguments,
reportMode
@@ -1753,6 +1754,7 @@ export class Resolver extends DiagnosticEmitter {
case AssertionKind.Prefix: {
return this.resolveType(
assert(node.toType),
+ null,
ctxFlow.sourceFunction,
ctxFlow.contextualTypeArguments,
reportMode
@@ -2648,12 +2650,13 @@ export class Resolver extends DiagnosticEmitter {
/** How to proceed with eventual diagnostics. */
reportMode: ReportMode = ReportMode.Report
): Element | null {
- let element = this.resolveTypeName(node.typeName, ctxFlow.sourceFunction, reportMode);
+ let element = this.resolveTypeName(node.typeName, ctxFlow, ctxFlow.sourceFunction, reportMode);
if (!element) return null;
if (element.kind == ElementKind.ClassPrototype) {
return this.resolveClassInclTypeArguments(
element,
node.typeArguments,
+ ctxFlow,
ctxFlow.sourceFunction,
cloneMap(ctxFlow.contextualTypeArguments),
node,
@@ -2733,7 +2736,7 @@ export class Resolver extends DiagnosticEmitter {
const declaration = node.declaration;
const signature = declaration.signature;
const body = declaration.body;
- let functionType = this.resolveType(signature, ctxFlow.sourceFunction, ctxFlow.contextualTypeArguments, reportMode);
+ let functionType = this.resolveType(signature, null, ctxFlow.sourceFunction, ctxFlow.contextualTypeArguments, reportMode);
if (
functionType &&
declaration.arrowKind != ArrowKind.None &&
@@ -2832,6 +2835,7 @@ export class Resolver extends DiagnosticEmitter {
if (explicitThisType) {
thisType = this.resolveType(
explicitThisType,
+ null,
prototype.parent, // relative to function
ctxTypes,
reportMode
@@ -2848,10 +2852,13 @@ export class Resolver extends DiagnosticEmitter {
let numSignatureParameters = signatureParameters.length;
let parameterTypes = new Array(numSignatureParameters);
let requiredParameters = 0;
+ let hasRest = false;
for (let i = 0; i < numSignatureParameters; ++i) {
let parameterDeclaration = signatureParameters[i];
if (parameterDeclaration.parameterKind == ParameterKind.Default) {
requiredParameters = i + 1;
+ } else if (parameterDeclaration.parameterKind == ParameterKind.Rest) {
+ hasRest = true;
}
let typeNode = parameterDeclaration.type;
if (isTypeOmitted(typeNode)) {
@@ -2865,6 +2872,7 @@ export class Resolver extends DiagnosticEmitter {
}
let parameterType = this.resolveType(
typeNode,
+ null,
prototype.parent, // relative to function
ctxTypes,
reportMode
@@ -2901,6 +2909,7 @@ export class Resolver extends DiagnosticEmitter {
}
let type = this.resolveType(
typeNode,
+ null,
prototype.parent, // relative to function
ctxTypes,
reportMode
@@ -2909,7 +2918,7 @@ export class Resolver extends DiagnosticEmitter {
returnType = type;
}
- let signature = Signature.create(this.program, parameterTypes, returnType, thisType, requiredParameters);
+ let signature = Signature.create(this.program, parameterTypes, returnType, thisType, requiredParameters, hasRest);
let nameInclTypeParameters = prototype.name;
if (instanceKey.length) nameInclTypeParameters += `<${instanceKey}>`;
@@ -2955,11 +2964,24 @@ export class Resolver extends DiagnosticEmitter {
incompatibleOverride = false;
} else {
if (baseMember.kind == ElementKind.FunctionPrototype) {
- // Possibly generic. Resolve with same type arguments to obtain the correct one.
let basePrototype = baseMember;
- let baseFunction = this.resolveFunction(basePrototype, typeArguments, new Map(), ReportMode.Swallow);
- if (baseFunction && instance.signature.isAssignableTo(baseFunction.signature, true)) {
- incompatibleOverride = false;
+ let baseTypeParameterNodes = basePrototype.typeParameterNodes;
+ let baseIsGeneric = baseTypeParameterNodes != null && baseTypeParameterNodes.length > 0;
+ let instanceIsGeneric = typeArguments != null && typeArguments.length > 0;
+ if (baseIsGeneric != instanceIsGeneric) {
+ // Cannot mix generic and non-generic functions in an override chain
+ this.errorRelated(
+ DiagnosticCode.Cannot_override_generic_method_0_with_a_non_generic_method_or_vice_versa,
+ instance.identifierAndSignatureRange, baseMember.identifierAndSignatureRange,
+ methodOrPropertyName
+ );
+ incompatibleOverride = false; // already reported
+ } else {
+ // Possibly generic. Resolve with same type arguments to obtain the correct one.
+ let baseFunction = this.resolveFunction(basePrototype, typeArguments, new Map(), ReportMode.Swallow);
+ if (baseFunction && instance.signature.isAssignableTo(baseFunction.signature, true)) {
+ incompatibleOverride = false;
+ }
}
}
}
@@ -3015,6 +3037,7 @@ export class Resolver extends DiagnosticEmitter {
resolvedTypeArguments = this.resolveTypeArguments( // reports
assert(prototype.typeParameterNodes),
typeArgumentNodes,
+ null,
ctxElement,
ctxTypes, // update
reportNode,
@@ -3084,7 +3107,16 @@ export class Resolver extends DiagnosticEmitter {
let boundPrototype = classInstance.getMember(unboundOverridePrototype.name);
if (boundPrototype) { // might have errored earlier and wasn't added
assert(boundPrototype.kind == ElementKind.FunctionPrototype);
- overrideInstance = this.resolveFunction(boundPrototype, instance.typeArguments);
+ let boundFuncPrototype = boundPrototype;
+ // Only resolve the override when the generic-ness matches the base method.
+ // - generic child → non-generic base: skip; vtable dispatch site has no type
+ // arguments to forward to the monomorphized child.
+ // - generic child → generic base: OK; type args come from the base call site.
+ // - non-generic child → non-generic base: OK; plain vtable override.
+ // - non-generic child → generic base: skip; mismatched generic-ness.
+ if (boundFuncPrototype.is(CommonFlags.Generic) == instance.is(CommonFlags.Generic)) {
+ overrideInstance = this.resolveFunction(boundFuncPrototype, instance.typeArguments);
+ }
}
}
if (overrideInstance) overrides.add(overrideInstance);
@@ -3163,6 +3195,7 @@ export class Resolver extends DiagnosticEmitter {
let base = this.resolveClassInclTypeArguments(
basePrototype,
extendsNode.typeArguments,
+ null,
prototype.parent, // relative to derived class
cloneMap(ctxTypes), // don't inherit
extendsNode,
@@ -3203,6 +3236,7 @@ export class Resolver extends DiagnosticEmitter {
let iface = this.resolveClassInclTypeArguments(
interfacePrototype,
implementsNode.typeArguments,
+ null,
prototype.parent,
cloneMap(ctxTypes),
implementsNode,
@@ -3384,7 +3418,6 @@ export class Resolver extends DiagnosticEmitter {
// Resolve instance members
let prototype = instance.prototype;
let instanceMemberPrototypes = prototype.instanceMembers;
- let properties = new Array();
if (instanceMemberPrototypes) {
// TODO: for (let member of instanceMemberPrototypes.values()) {
for (let _values = Map_values(instanceMemberPrototypes), i = 0, k = _values.length; i < k; ++i) {
@@ -3458,32 +3491,15 @@ export class Resolver extends DiagnosticEmitter {
}
default: assert(false);
}
- if (!member.is(CommonFlags.Abstract)) {
+ if (!member.is(CommonFlags.Abstract) && !member.is(CommonFlags.Generic)) {
+ // A generic method cannot satisfy a non-generic interface/abstract
+ // requirement: interface methods cannot be generic (AS241), and
+ // virtual dispatch cannot supply type arguments for monomorphization.
unimplemented.delete(memberName);
}
}
}
- // Check that property getters and setters match
- for (let i = 0, k = properties.length; i < k; ++i) {
- let property = properties[i];
- let propertyGetter = property.getterInstance;
- if (!propertyGetter) {
- this.error(
- DiagnosticCode.Property_0_only_has_a_setter_and_is_missing_a_getter,
- property.identifierNode.range, property.name
- );
- } else {
- let propertySetter = property.setterInstance;
- if (propertySetter && !propertyGetter.visibilityEquals(propertySetter)) {
- this.errorRelated(
- DiagnosticCode.Getter_and_setter_accessors_do_not_agree_in_visibility,
- propertyGetter.identifierNode.range, propertySetter.identifierNode.range
- );
- }
- }
- }
-
if (instance.kind != ElementKind.Interface) {
// Check that all required members are implemented
@@ -3620,6 +3636,8 @@ export class Resolver extends DiagnosticEmitter {
prototype: ClassPrototype,
/** Type arguments provided to be resolved. */
typeArgumentNodes: TypeNode[] | null,
+ /** Flow of {@link typeArgumentNodes} */
+ flow: Flow | null,
/** Contextual element. */
ctxElement: Element,
/** Contextual types, i.e. `T`. */
@@ -3633,14 +3651,34 @@ export class Resolver extends DiagnosticEmitter {
// Resolve type arguments if generic
if (prototype.is(CommonFlags.Generic)) {
- resolvedTypeArguments = this.resolveTypeArguments( // reports
- assert(prototype.typeParameterNodes), // must be present if generic
- typeArgumentNodes,
- ctxElement,
- ctxTypes, // update
- reportNode,
- reportMode
- );
+
+ // find the constructor prototype, which may be on a base class
+ let constructorPrototype: FunctionPrototype | null = null;
+ for (let p: ClassPrototype | null = prototype; p && !constructorPrototype; p = p.basePrototype) {
+ constructorPrototype = p.constructorPrototype;
+ }
+
+ // if no type arguments are provided, try to infer them from the constructor call
+ if (!typeArgumentNodes && constructorPrototype && flow && ctxTypes.size == 0) {
+ resolvedTypeArguments = this.inferGenericTypeArguments(
+ reportNode as NewExpression,
+ constructorPrototype,
+ prototype.typeParameterNodes,
+ flow,
+ );
+ } else {
+ // resolve them from the provided type argument nodes
+ resolvedTypeArguments = this.resolveTypeArguments( // reports
+ assert(prototype.typeParameterNodes), // must be present if generic
+ typeArgumentNodes,
+ flow,
+ ctxElement,
+ ctxTypes, // update
+ reportNode,
+ reportMode
+ );
+ }
+
if (!resolvedTypeArguments) return null;
// Otherwise make sure that no type arguments have been specified
@@ -3707,10 +3745,11 @@ export class Resolver extends DiagnosticEmitter {
}
}
}
+ instance.checkVisibility(this);
return instance;
}
- private ensureOneTypeArgument(
+ ensureOneTypeArgument(
/** The type to resolve. */
node: NamedTypeNode,
/** How to proceed with eventual diagnostics. */
diff --git a/src/tokenizer.ts b/src/tokenizer.ts
index a4bf9e9aa4..08a9e10dec 100644
--- a/src/tokenizer.ts
+++ b/src/tokenizer.ts
@@ -463,9 +463,11 @@ export class Tokenizer extends DiagnosticEmitter {
end: i32 = 0;
pos: i32 = 0;
+ // @ts-expect-error
token: Token = -1;
tokenPos: i32 = 0;
+ // @ts-expect-error
nextToken: Token = -1;
nextTokenPos: i32 = 0;
nextTokenOnNewLine: OnNewLine = OnNewLine.Unknown;
@@ -1055,6 +1057,7 @@ export class Tokenizer extends DiagnosticEmitter {
}
clearNextToken(): void {
+ // @ts-expect-error
this.nextToken = -1;
this.nextTokenPos = 0;
this.nextTokenOnNewLine = OnNewLine.Unknown;
diff --git a/src/tsconfig.json b/src/tsconfig.json
index a6acaae80a..f4dbff1903 100644
--- a/src/tsconfig.json
+++ b/src/tsconfig.json
@@ -2,6 +2,7 @@
"extends": "../std/portable.json",
"compilerOptions": {
"target": "esnext",
+ "rootDir": "..",
"outDir": "../build",
"allowJs": false,
"sourceMap": true,
diff --git a/src/types.ts b/src/types.ts
index f137ddb5ba..6a07f6fbc8 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -10,7 +10,9 @@ import {
import {
Class,
Program,
- DecoratorFlags
+ DecoratorFlags,
+ OperatorKind,
+ Function
} from "./program";
import {
@@ -320,6 +322,14 @@ export class Type {
return null;
}
+ lookupOverload(kind: OperatorKind, program: Program): Function | null {
+ let classReference = this.getClassOrWrapper(program);
+ if (classReference) {
+ return classReference.lookupOverload(kind);
+ }
+ return null;
+ }
+
/** Gets the underlying function signature of this type, if any. */
getSignature(): Signature | null {
return this.isInternalReference
@@ -643,6 +653,9 @@ export class Type {
}
}
}
+ if (this == Type.auto) {
+ return "auto";
+ }
return this.kindToString();
}
@@ -689,15 +702,6 @@ export class Type {
case TypeKind.String: {
return binaryen._BinaryenTypeFromHeapType(HeapTypeRef.String, this.is(TypeFlags.Nullable));
}
- case TypeKind.StringviewWTF8: {
- return binaryen._BinaryenTypeFromHeapType(HeapTypeRef.StringviewWTF8, this.is(TypeFlags.Nullable));
- }
- case TypeKind.StringviewWTF16: {
- return binaryen._BinaryenTypeFromHeapType(HeapTypeRef.StringviewWTF16, this.is(TypeFlags.Nullable));
- }
- case TypeKind.StringviewIter: {
- return binaryen._BinaryenTypeFromHeapType(HeapTypeRef.StringviewIter, this.is(TypeFlags.Nullable));
- }
case TypeKind.Void: return TypeRef.None;
}
// TODO: not used yet
diff --git a/src/util/math.ts b/src/util/math.ts
index 25759f35d1..56655e921c 100644
--- a/src/util/math.ts
+++ b/src/util/math.ts
@@ -11,16 +11,10 @@ export function isPowerOf2(x: i32): bool {
export function accuratePow64(x: f64, y: f64): f64 {
if (!ASC_TARGET) { // ASC_TARGET == JS
// Engines like V8, WebKit and SpiderMonkey uses powi fast path if exponent is integer
- // This speculative optimization leads to loose precisions like 10 ** 208 != 1e208
- // or/and 10 ** -5 != 1e-5 anymore. For avoid this behaviour we are forcing exponent
- // to fractional form and compensate this afterwards.
- if (isFinite(y) && Math.abs(y) >= 2 && Math.trunc(y) == y) {
- if (y < 0) {
- return Math.pow(x, y + 0.5) / Math.pow(x, 0.5);
- } else {
- return Math.pow(x, y - 0.5) * Math.pow(x, 0.5);
- }
- }
+ // This speculative optimization leads to loose precisions like 10 ** -5 != 1e-5 anymore
+ // and introduces inconsistencies between different engines and versions
+ // For avoid this behavior we using bootstrap f64_pow function.
+ return f64_pow(x, y);
}
return Math.pow(x, y);
}
diff --git a/src/util/terminal.ts b/src/util/terminal.ts
index c5a507bc9d..44c2cc1aff 100644
--- a/src/util/terminal.ts
+++ b/src/util/terminal.ts
@@ -32,7 +32,7 @@ export function isColorsEnabled(): bool {
/** Sets whether terminal colors are enabled or not. */
export function setColorsEnabled(isEnabled: bool): bool {
- let wasEnabled = isEnabled;
+ let wasEnabled = colorsEnabled;
colorsEnabled = isEnabled;
return wasEnabled;
}
diff --git a/src/util/text.ts b/src/util/text.ts
index d94f5d2f07..49aca60d20 100644
--- a/src/util/text.ts
+++ b/src/util/text.ts
@@ -276,7 +276,7 @@ export function isIdentifierPart(cp: i32): bool {
&& lookupInUnicodeMap(cp, unicodeIdentifierPart);
}
-/** Tests if the specified string is a valid identifer. */
+/** Tests if the specified string is a valid identifier. */
export function isIdentifier(str: string): bool {
let len = str.length;
if (!len) return false;
@@ -291,7 +291,7 @@ export function isIdentifier(str: string): bool {
return true;
}
-/** Unicode 14.0 ID_Start/Other_ID_Start ranges */
+/** Unicode 17.0 ID_Start/Other_ID_Start ranges */
const unicodeIdentifierStart: i32[] = [/*
| from ... to | from ... to | from ... to | from ... to |*/
170 , 170 , 181 , 181 , 186 , 186 , 192 , 214 ,
@@ -306,7 +306,7 @@ const unicodeIdentifierStart: i32[] = [/*
1869 , 1957 , 1969 , 1969 , 1994 , 2026 , 2036 , 2037 ,
2042 , 2042 , 2048 , 2069 , 2074 , 2074 , 2084 , 2084 ,
2088 , 2088 , 2112 , 2136 , 2144 , 2154 , 2160 , 2183 ,
- 2185 , 2190 , 2208 , 2249 , 2308 , 2361 , 2365 , 2365 ,
+ 2185 , 2191 , 2208 , 2249 , 2308 , 2361 , 2365 , 2365 ,
2384 , 2384 , 2392 , 2401 , 2417 , 2432 , 2437 , 2444 ,
2447 , 2448 , 2451 , 2472 , 2474 , 2480 , 2482 , 2482 ,
2486 , 2489 , 2493 , 2493 , 2510 , 2510 , 2524 , 2525 ,
@@ -322,9 +322,9 @@ const unicodeIdentifierStart: i32[] = [/*
2962 , 2965 , 2969 , 2970 , 2972 , 2972 , 2974 , 2975 ,
2979 , 2980 , 2984 , 2986 , 2990 , 3001 , 3024 , 3024 ,
3077 , 3084 , 3086 , 3088 , 3090 , 3112 , 3114 , 3129 ,
- 3133 , 3133 , 3160 , 3162 , 3165 , 3165 , 3168 , 3169 ,
+ 3133 , 3133 , 3160 , 3162 , 3164 , 3165 , 3168 , 3169 ,
3200 , 3200 , 3205 , 3212 , 3214 , 3216 , 3218 , 3240 ,
- 3242 , 3251 , 3253 , 3257 , 3261 , 3261 , 3293 , 3294 ,
+ 3242 , 3251 , 3253 , 3257 , 3261 , 3261 , 3292 , 3294 ,
3296 , 3297 , 3313 , 3314 , 3332 , 3340 , 3342 , 3344 ,
3346 , 3386 , 3389 , 3389 , 3406 , 3406 , 3412 , 3414 ,
3423 , 3425 , 3450 , 3455 , 3461 , 3478 , 3482 , 3505 ,
@@ -349,7 +349,7 @@ const unicodeIdentifierStart: i32[] = [/*
6512 , 6516 , 6528 , 6571 , 6576 , 6601 , 6656 , 6678 ,
6688 , 6740 , 6823 , 6823 , 6917 , 6963 , 6981 , 6988 ,
7043 , 7072 , 7086 , 7087 , 7098 , 7141 , 7168 , 7203 ,
- 7245 , 7247 , 7258 , 7293 , 7296 , 7304 , 7312 , 7354 ,
+ 7245 , 7247 , 7258 , 7293 , 7296 , 7306 , 7312 , 7354 ,
7357 , 7359 , 7401 , 7404 , 7406 , 7411 , 7413 , 7414 ,
7418 , 7418 , 7424 , 7615 , 7680 , 7957 , 7960 , 7965 ,
7968 , 8005 , 8008 , 8013 , 8016 , 8023 , 8025 , 8025 ,
@@ -370,70 +370,76 @@ const unicodeIdentifierStart: i32[] = [/*
12704 , 12735 , 12784 , 12799 , 13312 , 19903 , 19968 , 42124 ,
42192 , 42237 , 42240 , 42508 , 42512 , 42527 , 42538 , 42539 ,
42560 , 42606 , 42623 , 42653 , 42656 , 42735 , 42775 , 42783 ,
- 42786 , 42888 , 42891 , 42954 , 42960 , 42961 , 42963 , 42963 ,
- 42965 , 42969 , 42994 , 43009 , 43011 , 43013 , 43015 , 43018 ,
- 43020 , 43042 , 43072 , 43123 , 43138 , 43187 , 43250 , 43255 ,
- 43259 , 43259 , 43261 , 43262 , 43274 , 43301 , 43312 , 43334 ,
- 43360 , 43388 , 43396 , 43442 , 43471 , 43471 , 43488 , 43492 ,
- 43494 , 43503 , 43514 , 43518 , 43520 , 43560 , 43584 , 43586 ,
- 43588 , 43595 , 43616 , 43638 , 43642 , 43642 , 43646 , 43695 ,
- 43697 , 43697 , 43701 , 43702 , 43705 , 43709 , 43712 , 43712 ,
- 43714 , 43714 , 43739 , 43741 , 43744 , 43754 , 43762 , 43764 ,
- 43777 , 43782 , 43785 , 43790 , 43793 , 43798 , 43808 , 43814 ,
- 43816 , 43822 , 43824 , 43866 , 43868 , 43881 , 43888 , 44002 ,
- 44032 , 55203 , 55216 , 55238 , 55243 , 55291 , 63744 , 64109 ,
- 64112 , 64217 , 64256 , 64262 , 64275 , 64279 , 64285 , 64285 ,
- 64287 , 64296 , 64298 , 64310 , 64312 , 64316 , 64318 , 64318 ,
- 64320 , 64321 , 64323 , 64324 , 64326 , 64433 , 64467 , 64829 ,
- 64848 , 64911 , 64914 , 64967 , 65008 , 65019 , 65136 , 65140 ,
- 65142 , 65276 , 65313 , 65338 , 65345 , 65370 , 65382 , 65470 ,
- 65474 , 65479 , 65482 , 65487 , 65490 , 65495 , 65498 , 65500 ,
- 65536 , 65547 , 65549 , 65574 , 65576 , 65594 , 65596 , 65597 ,
- 65599 , 65613 , 65616 , 65629 , 65664 , 65786 , 65856 , 65908 ,
- 66176 , 66204 , 66208 , 66256 , 66304 , 66335 , 66349 , 66378 ,
- 66384 , 66421 , 66432 , 66461 , 66464 , 66499 , 66504 , 66511 ,
- 66513 , 66517 , 66560 , 66717 , 66736 , 66771 , 66776 , 66811 ,
- 66816 , 66855 , 66864 , 66915 , 66928 , 66938 , 66940 , 66954 ,
- 66956 , 66962 , 66964 , 66965 , 66967 , 66977 , 66979 , 66993 ,
- 66995 , 67001 , 67003 , 67004 , 67072 , 67382 , 67392 , 67413 ,
- 67424 , 67431 , 67456 , 67461 , 67463 , 67504 , 67506 , 67514 ,
- 67584 , 67589 , 67592 , 67592 , 67594 , 67637 , 67639 , 67640 ,
- 67644 , 67644 , 67647 , 67669 , 67680 , 67702 , 67712 , 67742 ,
- 67808 , 67826 , 67828 , 67829 , 67840 , 67861 , 67872 , 67897 ,
- 67968 , 68023 , 68030 , 68031 , 68096 , 68096 , 68112 , 68115 ,
- 68117 , 68119 , 68121 , 68149 , 68192 , 68220 , 68224 , 68252 ,
- 68288 , 68295 , 68297 , 68324 , 68352 , 68405 , 68416 , 68437 ,
- 68448 , 68466 , 68480 , 68497 , 68608 , 68680 , 68736 , 68786 ,
- 68800 , 68850 , 68864 , 68899 , 69248 , 69289 , 69296 , 69297 ,
- 69376 , 69404 , 69415 , 69415 , 69424 , 69445 , 69488 , 69505 ,
- 69552 , 69572 , 69600 , 69622 , 69635 , 69687 , 69745 , 69746 ,
- 69749 , 69749 , 69763 , 69807 , 69840 , 69864 , 69891 , 69926 ,
- 69956 , 69956 , 69959 , 69959 , 69968 , 70002 , 70006 , 70006 ,
- 70019 , 70066 , 70081 , 70084 , 70106 , 70106 , 70108 , 70108 ,
- 70144 , 70161 , 70163 , 70187 , 70272 , 70278 , 70280 , 70280 ,
- 70282 , 70285 , 70287 , 70301 , 70303 , 70312 , 70320 , 70366 ,
- 70405 , 70412 , 70415 , 70416 , 70419 , 70440 , 70442 , 70448 ,
- 70450 , 70451 , 70453 , 70457 , 70461 , 70461 , 70480 , 70480 ,
- 70493 , 70497 , 70656 , 70708 , 70727 , 70730 , 70751 , 70753 ,
- 70784 , 70831 , 70852 , 70853 , 70855 , 70855 , 71040 , 71086 ,
- 71128 , 71131 , 71168 , 71215 , 71236 , 71236 , 71296 , 71338 ,
- 71352 , 71352 , 71424 , 71450 , 71488 , 71494 , 71680 , 71723 ,
- 71840 , 71903 , 71935 , 71942 , 71945 , 71945 , 71948 , 71955 ,
- 71957 , 71958 , 71960 , 71983 , 71999 , 71999 , 72001 , 72001 ,
- 72096 , 72103 , 72106 , 72144 , 72161 , 72161 , 72163 , 72163 ,
- 72192 , 72192 , 72203 , 72242 , 72250 , 72250 , 72272 , 72272 ,
- 72284 , 72329 , 72349 , 72349 , 72368 , 72440 , 72704 , 72712 ,
- 72714 , 72750 , 72768 , 72768 , 72818 , 72847 , 72960 , 72966 ,
- 72968 , 72969 , 72971 , 73008 , 73030 , 73030 , 73056 , 73061 ,
- 73063 , 73064 , 73066 , 73097 , 73112 , 73112 , 73440 , 73458 ,
- 73648 , 73648 , 73728 , 74649 , 74752 , 74862 , 74880 , 75075 ,
- 77712 , 77808 , 77824 , 78894 , 82944 , 83526 , 92160 , 92728 ,
- 92736 , 92766 , 92784 , 92862 , 92880 , 92909 , 92928 , 92975 ,
- 92992 , 92995 , 93027 , 93047 , 93053 , 93071 , 93760 , 93823 ,
- 93952 , 94026 , 94032 , 94032 , 94099 , 94111 , 94176 , 94177 ,
- 94179 , 94179 , 94208 , 100343, 100352, 101589, 101632, 101640,
- 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882,
- 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770,
+ 42786 , 42888 , 42891 , 42972 , 42993 , 43009 , 43011 , 43013 ,
+ 43015 , 43018 , 43020 , 43042 , 43072 , 43123 , 43138 , 43187 ,
+ 43250 , 43255 , 43259 , 43259 , 43261 , 43262 , 43274 , 43301 ,
+ 43312 , 43334 , 43360 , 43388 , 43396 , 43442 , 43471 , 43471 ,
+ 43488 , 43492 , 43494 , 43503 , 43514 , 43518 , 43520 , 43560 ,
+ 43584 , 43586 , 43588 , 43595 , 43616 , 43638 , 43642 , 43642 ,
+ 43646 , 43695 , 43697 , 43697 , 43701 , 43702 , 43705 , 43709 ,
+ 43712 , 43712 , 43714 , 43714 , 43739 , 43741 , 43744 , 43754 ,
+ 43762 , 43764 , 43777 , 43782 , 43785 , 43790 , 43793 , 43798 ,
+ 43808 , 43814 , 43816 , 43822 , 43824 , 43866 , 43868 , 43881 ,
+ 43888 , 44002 , 44032 , 55203 , 55216 , 55238 , 55243 , 55291 ,
+ 63744 , 64109 , 64112 , 64217 , 64256 , 64262 , 64275 , 64279 ,
+ 64285 , 64285 , 64287 , 64296 , 64298 , 64310 , 64312 , 64316 ,
+ 64318 , 64318 , 64320 , 64321 , 64323 , 64324 , 64326 , 64433 ,
+ 64467 , 64829 , 64848 , 64911 , 64914 , 64967 , 65008 , 65019 ,
+ 65136 , 65140 , 65142 , 65276 , 65313 , 65338 , 65345 , 65370 ,
+ 65382 , 65470 , 65474 , 65479 , 65482 , 65487 , 65490 , 65495 ,
+ 65498 , 65500 , 65536 , 65547 , 65549 , 65574 , 65576 , 65594 ,
+ 65596 , 65597 , 65599 , 65613 , 65616 , 65629 , 65664 , 65786 ,
+ 65856 , 65908 , 66176 , 66204 , 66208 , 66256 , 66304 , 66335 ,
+ 66349 , 66378 , 66384 , 66421 , 66432 , 66461 , 66464 , 66499 ,
+ 66504 , 66511 , 66513 , 66517 , 66560 , 66717 , 66736 , 66771 ,
+ 66776 , 66811 , 66816 , 66855 , 66864 , 66915 , 66928 , 66938 ,
+ 66940 , 66954 , 66956 , 66962 , 66964 , 66965 , 66967 , 66977 ,
+ 66979 , 66993 , 66995 , 67001 , 67003 , 67004 , 67008 , 67059 ,
+ 67072 , 67382 , 67392 , 67413 , 67424 , 67431 , 67456 , 67461 ,
+ 67463 , 67504 , 67506 , 67514 , 67584 , 67589 , 67592 , 67592 ,
+ 67594 , 67637 , 67639 , 67640 , 67644 , 67644 , 67647 , 67669 ,
+ 67680 , 67702 , 67712 , 67742 , 67808 , 67826 , 67828 , 67829 ,
+ 67840 , 67861 , 67872 , 67897 , 67904 , 67929 , 67968 , 68023 ,
+ 68030 , 68031 , 68096 , 68096 , 68112 , 68115 , 68117 , 68119 ,
+ 68121 , 68149 , 68192 , 68220 , 68224 , 68252 , 68288 , 68295 ,
+ 68297 , 68324 , 68352 , 68405 , 68416 , 68437 , 68448 , 68466 ,
+ 68480 , 68497 , 68608 , 68680 , 68736 , 68786 , 68800 , 68850 ,
+ 68864 , 68899 , 68938 , 68965 , 68975 , 68997 , 69248 , 69289 ,
+ 69296 , 69297 , 69314 , 69319 , 69376 , 69404 , 69415 , 69415 ,
+ 69424 , 69445 , 69488 , 69505 , 69552 , 69572 , 69600 , 69622 ,
+ 69635 , 69687 , 69745 , 69746 , 69749 , 69749 , 69763 , 69807 ,
+ 69840 , 69864 , 69891 , 69926 , 69956 , 69956 , 69959 , 69959 ,
+ 69968 , 70002 , 70006 , 70006 , 70019 , 70066 , 70081 , 70084 ,
+ 70106 , 70106 , 70108 , 70108 , 70144 , 70161 , 70163 , 70187 ,
+ 70207 , 70208 , 70272 , 70278 , 70280 , 70280 , 70282 , 70285 ,
+ 70287 , 70301 , 70303 , 70312 , 70320 , 70366 , 70405 , 70412 ,
+ 70415 , 70416 , 70419 , 70440 , 70442 , 70448 , 70450 , 70451 ,
+ 70453 , 70457 , 70461 , 70461 , 70480 , 70480 , 70493 , 70497 ,
+ 70528 , 70537 , 70539 , 70539 , 70542 , 70542 , 70544 , 70581 ,
+ 70583 , 70583 , 70609 , 70609 , 70611 , 70611 , 70656 , 70708 ,
+ 70727 , 70730 , 70751 , 70753 , 70784 , 70831 , 70852 , 70853 ,
+ 70855 , 70855 , 71040 , 71086 , 71128 , 71131 , 71168 , 71215 ,
+ 71236 , 71236 , 71296 , 71338 , 71352 , 71352 , 71424 , 71450 ,
+ 71488 , 71494 , 71680 , 71723 , 71840 , 71903 , 71935 , 71942 ,
+ 71945 , 71945 , 71948 , 71955 , 71957 , 71958 , 71960 , 71983 ,
+ 71999 , 71999 , 72001 , 72001 , 72096 , 72103 , 72106 , 72144 ,
+ 72161 , 72161 , 72163 , 72163 , 72192 , 72192 , 72203 , 72242 ,
+ 72250 , 72250 , 72272 , 72272 , 72284 , 72329 , 72349 , 72349 ,
+ 72368 , 72440 , 72640 , 72672 , 72704 , 72712 , 72714 , 72750 ,
+ 72768 , 72768 , 72818 , 72847 , 72960 , 72966 , 72968 , 72969 ,
+ 72971 , 73008 , 73030 , 73030 , 73056 , 73061 , 73063 , 73064 ,
+ 73066 , 73097 , 73112 , 73112 , 73136 , 73179 , 73440 , 73458 ,
+ 73474 , 73474 , 73476 , 73488 , 73490 , 73523 , 73648 , 73648 ,
+ 73728 , 74649 , 74752 , 74862 , 74880 , 75075 , 77712 , 77808 ,
+ 77824 , 78895 , 78913 , 78918 , 78944 , 82938 , 82944 , 83526 ,
+ 90368 , 90397 , 92160 , 92728 , 92736 , 92766 , 92784 , 92862 ,
+ 92880 , 92909 , 92928 , 92975 , 92992 , 92995 , 93027 , 93047 ,
+ 93053 , 93071 , 93504 , 93548 , 93760 , 93823 , 93856 , 93880 ,
+ 93883 , 93907 , 93952 , 94026 , 94032 , 94032 , 94099 , 94111 ,
+ 94176 , 94177 , 94179 , 94179 , 94194 , 94198 , 94208 , 101589,
+ 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587,
+ 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930,
+ 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770,
113776, 113788, 113792, 113800, 113808, 113817, 119808, 119892,
119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974,
119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003,
@@ -442,25 +448,28 @@ const unicodeIdentifierStart: i32[] = [/*
120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538,
120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654,
120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770,
- 120772, 120779, 122624, 122654, 123136, 123180, 123191, 123197,
- 123214, 123214, 123536, 123565, 123584, 123627, 124896, 124902,
- 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124,
- 125184, 125251, 125259, 125259, 126464, 126467, 126469, 126495,
- 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514,
- 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530,
- 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543,
- 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553,
- 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562,
- 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583,
- 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619,
- 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173791,
- 173824, 177976, 177984, 178205, 178208, 183969, 183984, 191456,
- 194560, 195101, 196608, 201546,
+ 120772, 120779, 122624, 122654, 122661, 122666, 122928, 122989,
+ 123136, 123180, 123191, 123197, 123214, 123214, 123536, 123565,
+ 123584, 123627, 124112, 124139, 124368, 124397, 124400, 124400,
+ 124608, 124638, 124640, 124642, 124644, 124645, 124647, 124653,
+ 124656, 124660, 124670, 124671, 124896, 124902, 124904, 124907,
+ 124909, 124910, 124912, 124926, 124928, 125124, 125184, 125251,
+ 125259, 125259, 126464, 126467, 126469, 126495, 126497, 126498,
+ 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519,
+ 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535,
+ 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546,
+ 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555,
+ 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564,
+ 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588,
+ 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627,
+ 126629, 126633, 126635, 126651, 131072, 173791, 173824, 178205,
+ 178208, 183981, 183984, 191456, 191472, 192093, 194560, 195101,
+ 196608, 201546, 201552, 210041,
];
const unicodeIdentifierStartMin = 170;
-const unicodeIdentifierStartMax = 201546;
+const unicodeIdentifierStartMax = 210041;
-/** Unicode 14.0 ID_Continue/Other_ID_Continue + ID_Start/Other_ID_Start ranges*/
+/** Unicode 17.0 ID_Continue/Other_ID_Continue + ID_Start/Other_ID_Start ranges*/
const unicodeIdentifierPart: i32[] = [/*
| from ... to | from ... to | from ... to | from ... to |*/
170 , 170 , 181 , 181 , 183 , 183 , 186 , 186 ,
@@ -475,7 +484,7 @@ const unicodeIdentifierPart: i32[] = [/*
1759 , 1768 , 1770 , 1788 , 1791 , 1791 , 1808 , 1866 ,
1869 , 1969 , 1984 , 2037 , 2042 , 2042 , 2045 , 2045 ,
2048 , 2093 , 2112 , 2139 , 2144 , 2154 , 2160 , 2183 ,
- 2185 , 2190 , 2200 , 2273 , 2275 , 2403 , 2406 , 2415 ,
+ 2185 , 2191 , 2199 , 2273 , 2275 , 2403 , 2406 , 2415 ,
2417 , 2435 , 2437 , 2444 , 2447 , 2448 , 2451 , 2472 ,
2474 , 2480 , 2482 , 2482 , 2486 , 2489 , 2492 , 2500 ,
2503 , 2504 , 2507 , 2510 , 2519 , 2519 , 2524 , 2525 ,
@@ -497,11 +506,11 @@ const unicodeIdentifierPart: i32[] = [/*
3014 , 3016 , 3018 , 3021 , 3024 , 3024 , 3031 , 3031 ,
3046 , 3055 , 3072 , 3084 , 3086 , 3088 , 3090 , 3112 ,
3114 , 3129 , 3132 , 3140 , 3142 , 3144 , 3146 , 3149 ,
- 3157 , 3158 , 3160 , 3162 , 3165 , 3165 , 3168 , 3171 ,
+ 3157 , 3158 , 3160 , 3162 , 3164 , 3165 , 3168 , 3171 ,
3174 , 3183 , 3200 , 3203 , 3205 , 3212 , 3214 , 3216 ,
3218 , 3240 , 3242 , 3251 , 3253 , 3257 , 3260 , 3268 ,
- 3270 , 3272 , 3274 , 3277 , 3285 , 3286 , 3293 , 3294 ,
- 3296 , 3299 , 3302 , 3311 , 3313 , 3314 , 3328 , 3340 ,
+ 3270 , 3272 , 3274 , 3277 , 3285 , 3286 , 3292 , 3294 ,
+ 3296 , 3299 , 3302 , 3311 , 3313 , 3315 , 3328 , 3340 ,
3342 , 3344 , 3346 , 3396 , 3398 , 3400 , 3402 , 3406 ,
3412 , 3415 , 3423 , 3427 , 3430 , 3439 , 3450 , 3455 ,
3457 , 3459 , 3461 , 3478 , 3482 , 3505 , 3507 , 3515 ,
@@ -509,7 +518,7 @@ const unicodeIdentifierPart: i32[] = [/*
3542 , 3542 , 3544 , 3551 , 3558 , 3567 , 3570 , 3571 ,
3585 , 3642 , 3648 , 3662 , 3664 , 3673 , 3713 , 3714 ,
3716 , 3716 , 3718 , 3722 , 3724 , 3747 , 3749 , 3749 ,
- 3751 , 3773 , 3776 , 3780 , 3782 , 3782 , 3784 , 3789 ,
+ 3751 , 3773 , 3776 , 3780 , 3782 , 3782 , 3784 , 3790 ,
3792 , 3801 , 3804 , 3807 , 3840 , 3840 , 3864 , 3865 ,
3872 , 3881 , 3893 , 3893 , 3895 , 3895 , 3897 , 3897 ,
3902 , 3911 , 3913 , 3948 , 3953 , 3972 , 3974 , 3991 ,
@@ -529,128 +538,139 @@ const unicodeIdentifierPart: i32[] = [/*
6470 , 6509 , 6512 , 6516 , 6528 , 6571 , 6576 , 6601 ,
6608 , 6618 , 6656 , 6683 , 6688 , 6750 , 6752 , 6780 ,
6783 , 6793 , 6800 , 6809 , 6823 , 6823 , 6832 , 6845 ,
- 6847 , 6862 , 6912 , 6988 , 6992 , 7001 , 7019 , 7027 ,
- 7040 , 7155 , 7168 , 7223 , 7232 , 7241 , 7245 , 7293 ,
- 7296 , 7304 , 7312 , 7354 , 7357 , 7359 , 7376 , 7378 ,
- 7380 , 7418 , 7424 , 7957 , 7960 , 7965 , 7968 , 8005 ,
- 8008 , 8013 , 8016 , 8023 , 8025 , 8025 , 8027 , 8027 ,
- 8029 , 8029 , 8031 , 8061 , 8064 , 8116 , 8118 , 8124 ,
- 8126 , 8126 , 8130 , 8132 , 8134 , 8140 , 8144 , 8147 ,
- 8150 , 8155 , 8160 , 8172 , 8178 , 8180 , 8182 , 8188 ,
- 8255 , 8256 , 8276 , 8276 , 8305 , 8305 , 8319 , 8319 ,
- 8336 , 8348 , 8400 , 8412 , 8417 , 8417 , 8421 , 8432 ,
- 8450 , 8450 , 8455 , 8455 , 8458 , 8467 , 8469 , 8469 ,
- 8472 , 8477 , 8484 , 8484 , 8486 , 8486 , 8488 , 8488 ,
- 8490 , 8505 , 8508 , 8511 , 8517 , 8521 , 8526 , 8526 ,
- 8544 , 8584 , 11264 , 11492 , 11499 , 11507 , 11520 , 11557 ,
- 11559 , 11559 , 11565 , 11565 , 11568 , 11623 , 11631 , 11631 ,
- 11647 , 11670 , 11680 , 11686 , 11688 , 11694 , 11696 , 11702 ,
- 11704 , 11710 , 11712 , 11718 , 11720 , 11726 , 11728 , 11734 ,
- 11736 , 11742 , 11744 , 11775 , 12293 , 12295 , 12321 , 12335 ,
- 12337 , 12341 , 12344 , 12348 , 12353 , 12438 , 12441 , 12447 ,
- 12449 , 12538 , 12540 , 12543 , 12549 , 12591 , 12593 , 12686 ,
- 12704 , 12735 , 12784 , 12799 , 13312 , 19903 , 19968 , 42124 ,
- 42192 , 42237 , 42240 , 42508 , 42512 , 42539 , 42560 , 42607 ,
- 42612 , 42621 , 42623 , 42737 , 42775 , 42783 , 42786 , 42888 ,
- 42891 , 42954 , 42960 , 42961 , 42963 , 42963 , 42965 , 42969 ,
- 42994 , 43047 , 43052 , 43052 , 43072 , 43123 , 43136 , 43205 ,
- 43216 , 43225 , 43232 , 43255 , 43259 , 43259 , 43261 , 43309 ,
- 43312 , 43347 , 43360 , 43388 , 43392 , 43456 , 43471 , 43481 ,
- 43488 , 43518 , 43520 , 43574 , 43584 , 43597 , 43600 , 43609 ,
- 43616 , 43638 , 43642 , 43714 , 43739 , 43741 , 43744 , 43759 ,
- 43762 , 43766 , 43777 , 43782 , 43785 , 43790 , 43793 , 43798 ,
- 43808 , 43814 , 43816 , 43822 , 43824 , 43866 , 43868 , 43881 ,
- 43888 , 44010 , 44012 , 44013 , 44016 , 44025 , 44032 , 55203 ,
- 55216 , 55238 , 55243 , 55291 , 63744 , 64109 , 64112 , 64217 ,
- 64256 , 64262 , 64275 , 64279 , 64285 , 64296 , 64298 , 64310 ,
- 64312 , 64316 , 64318 , 64318 , 64320 , 64321 , 64323 , 64324 ,
- 64326 , 64433 , 64467 , 64829 , 64848 , 64911 , 64914 , 64967 ,
- 65008 , 65019 , 65024 , 65039 , 65056 , 65071 , 65075 , 65076 ,
- 65101 , 65103 , 65136 , 65140 , 65142 , 65276 , 65296 , 65305 ,
- 65313 , 65338 , 65343 , 65343 , 65345 , 65370 , 65382 , 65470 ,
- 65474 , 65479 , 65482 , 65487 , 65490 , 65495 , 65498 , 65500 ,
- 65536 , 65547 , 65549 , 65574 , 65576 , 65594 , 65596 , 65597 ,
- 65599 , 65613 , 65616 , 65629 , 65664 , 65786 , 65856 , 65908 ,
- 66045 , 66045 , 66176 , 66204 , 66208 , 66256 , 66272 , 66272 ,
- 66304 , 66335 , 66349 , 66378 , 66384 , 66426 , 66432 , 66461 ,
- 66464 , 66499 , 66504 , 66511 , 66513 , 66517 , 66560 , 66717 ,
- 66720 , 66729 , 66736 , 66771 , 66776 , 66811 , 66816 , 66855 ,
- 66864 , 66915 , 66928 , 66938 , 66940 , 66954 , 66956 , 66962 ,
- 66964 , 66965 , 66967 , 66977 , 66979 , 66993 , 66995 , 67001 ,
- 67003 , 67004 , 67072 , 67382 , 67392 , 67413 , 67424 , 67431 ,
- 67456 , 67461 , 67463 , 67504 , 67506 , 67514 , 67584 , 67589 ,
- 67592 , 67592 , 67594 , 67637 , 67639 , 67640 , 67644 , 67644 ,
- 67647 , 67669 , 67680 , 67702 , 67712 , 67742 , 67808 , 67826 ,
- 67828 , 67829 , 67840 , 67861 , 67872 , 67897 , 67968 , 68023 ,
+ 6847 , 6877 , 6880 , 6891 , 6912 , 6988 , 6992 , 7001 ,
+ 7019 , 7027 , 7040 , 7155 , 7168 , 7223 , 7232 , 7241 ,
+ 7245 , 7293 , 7296 , 7306 , 7312 , 7354 , 7357 , 7359 ,
+ 7376 , 7378 , 7380 , 7418 , 7424 , 7957 , 7960 , 7965 ,
+ 7968 , 8005 , 8008 , 8013 , 8016 , 8023 , 8025 , 8025 ,
+ 8027 , 8027 , 8029 , 8029 , 8031 , 8061 , 8064 , 8116 ,
+ 8118 , 8124 , 8126 , 8126 , 8130 , 8132 , 8134 , 8140 ,
+ 8144 , 8147 , 8150 , 8155 , 8160 , 8172 , 8178 , 8180 ,
+ 8182 , 8188 , 8204 , 8205 , 8255 , 8256 , 8276 , 8276 ,
+ 8305 , 8305 , 8319 , 8319 , 8336 , 8348 , 8400 , 8412 ,
+ 8417 , 8417 , 8421 , 8432 , 8450 , 8450 , 8455 , 8455 ,
+ 8458 , 8467 , 8469 , 8469 , 8472 , 8477 , 8484 , 8484 ,
+ 8486 , 8486 , 8488 , 8488 , 8490 , 8505 , 8508 , 8511 ,
+ 8517 , 8521 , 8526 , 8526 , 8544 , 8584 , 11264 , 11492 ,
+ 11499 , 11507 , 11520 , 11557 , 11559 , 11559 , 11565 , 11565 ,
+ 11568 , 11623 , 11631 , 11631 , 11647 , 11670 , 11680 , 11686 ,
+ 11688 , 11694 , 11696 , 11702 , 11704 , 11710 , 11712 , 11718 ,
+ 11720 , 11726 , 11728 , 11734 , 11736 , 11742 , 11744 , 11775 ,
+ 12293 , 12295 , 12321 , 12335 , 12337 , 12341 , 12344 , 12348 ,
+ 12353 , 12438 , 12441 , 12447 , 12449 , 12543 , 12549 , 12591 ,
+ 12593 , 12686 , 12704 , 12735 , 12784 , 12799 , 13312 , 19903 ,
+ 19968 , 42124 , 42192 , 42237 , 42240 , 42508 , 42512 , 42539 ,
+ 42560 , 42607 , 42612 , 42621 , 42623 , 42737 , 42775 , 42783 ,
+ 42786 , 42888 , 42891 , 42972 , 42993 , 43047 , 43052 , 43052 ,
+ 43072 , 43123 , 43136 , 43205 , 43216 , 43225 , 43232 , 43255 ,
+ 43259 , 43259 , 43261 , 43309 , 43312 , 43347 , 43360 , 43388 ,
+ 43392 , 43456 , 43471 , 43481 , 43488 , 43518 , 43520 , 43574 ,
+ 43584 , 43597 , 43600 , 43609 , 43616 , 43638 , 43642 , 43714 ,
+ 43739 , 43741 , 43744 , 43759 , 43762 , 43766 , 43777 , 43782 ,
+ 43785 , 43790 , 43793 , 43798 , 43808 , 43814 , 43816 , 43822 ,
+ 43824 , 43866 , 43868 , 43881 , 43888 , 44010 , 44012 , 44013 ,
+ 44016 , 44025 , 44032 , 55203 , 55216 , 55238 , 55243 , 55291 ,
+ 63744 , 64109 , 64112 , 64217 , 64256 , 64262 , 64275 , 64279 ,
+ 64285 , 64296 , 64298 , 64310 , 64312 , 64316 , 64318 , 64318 ,
+ 64320 , 64321 , 64323 , 64324 , 64326 , 64433 , 64467 , 64829 ,
+ 64848 , 64911 , 64914 , 64967 , 65008 , 65019 , 65024 , 65039 ,
+ 65056 , 65071 , 65075 , 65076 , 65101 , 65103 , 65136 , 65140 ,
+ 65142 , 65276 , 65296 , 65305 , 65313 , 65338 , 65343 , 65343 ,
+ 65345 , 65370 , 65381 , 65470 , 65474 , 65479 , 65482 , 65487 ,
+ 65490 , 65495 , 65498 , 65500 , 65536 , 65547 , 65549 , 65574 ,
+ 65576 , 65594 , 65596 , 65597 , 65599 , 65613 , 65616 , 65629 ,
+ 65664 , 65786 , 65856 , 65908 , 66045 , 66045 , 66176 , 66204 ,
+ 66208 , 66256 , 66272 , 66272 , 66304 , 66335 , 66349 , 66378 ,
+ 66384 , 66426 , 66432 , 66461 , 66464 , 66499 , 66504 , 66511 ,
+ 66513 , 66517 , 66560 , 66717 , 66720 , 66729 , 66736 , 66771 ,
+ 66776 , 66811 , 66816 , 66855 , 66864 , 66915 , 66928 , 66938 ,
+ 66940 , 66954 , 66956 , 66962 , 66964 , 66965 , 66967 , 66977 ,
+ 66979 , 66993 , 66995 , 67001 , 67003 , 67004 , 67008 , 67059 ,
+ 67072 , 67382 , 67392 , 67413 , 67424 , 67431 , 67456 , 67461 ,
+ 67463 , 67504 , 67506 , 67514 , 67584 , 67589 , 67592 , 67592 ,
+ 67594 , 67637 , 67639 , 67640 , 67644 , 67644 , 67647 , 67669 ,
+ 67680 , 67702 , 67712 , 67742 , 67808 , 67826 , 67828 , 67829 ,
+ 67840 , 67861 , 67872 , 67897 , 67904 , 67929 , 67968 , 68023 ,
68030 , 68031 , 68096 , 68099 , 68101 , 68102 , 68108 , 68115 ,
68117 , 68119 , 68121 , 68149 , 68152 , 68154 , 68159 , 68159 ,
68192 , 68220 , 68224 , 68252 , 68288 , 68295 , 68297 , 68326 ,
68352 , 68405 , 68416 , 68437 , 68448 , 68466 , 68480 , 68497 ,
68608 , 68680 , 68736 , 68786 , 68800 , 68850 , 68864 , 68903 ,
- 68912 , 68921 , 69248 , 69289 , 69291 , 69292 , 69296 , 69297 ,
- 69376 , 69404 , 69415 , 69415 , 69424 , 69456 , 69488 , 69509 ,
+ 68912 , 68921 , 68928 , 68965 , 68969 , 68973 , 68975 , 68997 ,
+ 69248 , 69289 , 69291 , 69292 , 69296 , 69297 , 69314 , 69319 ,
+ 69370 , 69404 , 69415 , 69415 , 69424 , 69456 , 69488 , 69509 ,
69552 , 69572 , 69600 , 69622 , 69632 , 69702 , 69734 , 69749 ,
69759 , 69818 , 69826 , 69826 , 69840 , 69864 , 69872 , 69881 ,
69888 , 69940 , 69942 , 69951 , 69956 , 69959 , 69968 , 70003 ,
70006 , 70006 , 70016 , 70084 , 70089 , 70092 , 70094 , 70106 ,
- 70108 , 70108 , 70144 , 70161 , 70163 , 70199 , 70206 , 70206 ,
+ 70108 , 70108 , 70144 , 70161 , 70163 , 70199 , 70206 , 70209 ,
70272 , 70278 , 70280 , 70280 , 70282 , 70285 , 70287 , 70301 ,
70303 , 70312 , 70320 , 70378 , 70384 , 70393 , 70400 , 70403 ,
70405 , 70412 , 70415 , 70416 , 70419 , 70440 , 70442 , 70448 ,
70450 , 70451 , 70453 , 70457 , 70459 , 70468 , 70471 , 70472 ,
70475 , 70477 , 70480 , 70480 , 70487 , 70487 , 70493 , 70499 ,
- 70502 , 70508 , 70512 , 70516 , 70656 , 70730 , 70736 , 70745 ,
- 70750 , 70753 , 70784 , 70853 , 70855 , 70855 , 70864 , 70873 ,
- 71040 , 71093 , 71096 , 71104 , 71128 , 71133 , 71168 , 71232 ,
- 71236 , 71236 , 71248 , 71257 , 71296 , 71352 , 71360 , 71369 ,
- 71424 , 71450 , 71453 , 71467 , 71472 , 71481 , 71488 , 71494 ,
- 71680 , 71738 , 71840 , 71913 , 71935 , 71942 , 71945 , 71945 ,
- 71948 , 71955 , 71957 , 71958 , 71960 , 71989 , 71991 , 71992 ,
- 71995 , 72003 , 72016 , 72025 , 72096 , 72103 , 72106 , 72151 ,
- 72154 , 72161 , 72163 , 72164 , 72192 , 72254 , 72263 , 72263 ,
- 72272 , 72345 , 72349 , 72349 , 72368 , 72440 , 72704 , 72712 ,
- 72714 , 72758 , 72760 , 72768 , 72784 , 72793 , 72818 , 72847 ,
- 72850 , 72871 , 72873 , 72886 , 72960 , 72966 , 72968 , 72969 ,
- 72971 , 73014 , 73018 , 73018 , 73020 , 73021 , 73023 , 73031 ,
- 73040 , 73049 , 73056 , 73061 , 73063 , 73064 , 73066 , 73102 ,
- 73104 , 73105 , 73107 , 73112 , 73120 , 73129 , 73440 , 73462 ,
+ 70502 , 70508 , 70512 , 70516 , 70528 , 70537 , 70539 , 70539 ,
+ 70542 , 70542 , 70544 , 70581 , 70583 , 70592 , 70594 , 70594 ,
+ 70597 , 70597 , 70599 , 70602 , 70604 , 70611 , 70625 , 70626 ,
+ 70656 , 70730 , 70736 , 70745 , 70750 , 70753 , 70784 , 70853 ,
+ 70855 , 70855 , 70864 , 70873 , 71040 , 71093 , 71096 , 71104 ,
+ 71128 , 71133 , 71168 , 71232 , 71236 , 71236 , 71248 , 71257 ,
+ 71296 , 71352 , 71360 , 71369 , 71376 , 71395 , 71424 , 71450 ,
+ 71453 , 71467 , 71472 , 71481 , 71488 , 71494 , 71680 , 71738 ,
+ 71840 , 71913 , 71935 , 71942 , 71945 , 71945 , 71948 , 71955 ,
+ 71957 , 71958 , 71960 , 71989 , 71991 , 71992 , 71995 , 72003 ,
+ 72016 , 72025 , 72096 , 72103 , 72106 , 72151 , 72154 , 72161 ,
+ 72163 , 72164 , 72192 , 72254 , 72263 , 72263 , 72272 , 72345 ,
+ 72349 , 72349 , 72368 , 72440 , 72544 , 72551 , 72640 , 72672 ,
+ 72688 , 72697 , 72704 , 72712 , 72714 , 72758 , 72760 , 72768 ,
+ 72784 , 72793 , 72818 , 72847 , 72850 , 72871 , 72873 , 72886 ,
+ 72960 , 72966 , 72968 , 72969 , 72971 , 73014 , 73018 , 73018 ,
+ 73020 , 73021 , 73023 , 73031 , 73040 , 73049 , 73056 , 73061 ,
+ 73063 , 73064 , 73066 , 73102 , 73104 , 73105 , 73107 , 73112 ,
+ 73120 , 73129 , 73136 , 73179 , 73184 , 73193 , 73440 , 73462 ,
+ 73472 , 73488 , 73490 , 73530 , 73534 , 73538 , 73552 , 73562 ,
73648 , 73648 , 73728 , 74649 , 74752 , 74862 , 74880 , 75075 ,
- 77712 , 77808 , 77824 , 78894 , 82944 , 83526 , 92160 , 92728 ,
- 92736 , 92766 , 92768 , 92777 , 92784 , 92862 , 92864 , 92873 ,
- 92880 , 92909 , 92912 , 92916 , 92928 , 92982 , 92992 , 92995 ,
- 93008 , 93017 , 93027 , 93047 , 93053 , 93071 , 93760 , 93823 ,
- 93952 , 94026 , 94031 , 94087 , 94095 , 94111 , 94176 , 94177 ,
- 94179 , 94180 , 94192 , 94193 , 94208 , 100343, 100352, 101589,
- 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590,
- 110592, 110882, 110928, 110930, 110948, 110951, 110960, 111355,
- 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817,
- 113821, 113822, 118528, 118573, 118576, 118598, 119141, 119145,
- 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213,
- 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967,
- 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993,
- 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074,
- 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126,
- 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485,
- 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596,
- 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712,
- 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831,
- 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476,
- 121499, 121503, 121505, 121519, 122624, 122654, 122880, 122886,
- 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922,
- 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214,
- 123536, 123566, 123584, 123641, 124896, 124902, 124904, 124907,
- 124909, 124910, 124912, 124926, 124928, 125124, 125136, 125142,
- 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495,
- 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514,
- 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530,
- 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543,
- 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553,
- 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562,
- 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583,
- 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619,
- 126625, 126627, 126629, 126633, 126635, 126651, 130032, 130041,
- 131072, 173791, 173824, 177976, 177984, 178205, 178208, 183969,
- 183984, 191456, 194560, 195101, 196608, 201546, 917760, 917999,
+ 77712 , 77808 , 77824 , 78895 , 78912 , 78933 , 78944 , 82938 ,
+ 82944 , 83526 , 90368 , 90425 , 92160 , 92728 , 92736 , 92766 ,
+ 92768 , 92777 , 92784 , 92862 , 92864 , 92873 , 92880 , 92909 ,
+ 92912 , 92916 , 92928 , 92982 , 92992 , 92995 , 93008 , 93017 ,
+ 93027 , 93047 , 93053 , 93071 , 93504 , 93548 , 93552 , 93561 ,
+ 93760 , 93823 , 93856 , 93880 , 93883 , 93907 , 93952 , 94026 ,
+ 94031 , 94087 , 94095 , 94111 , 94176 , 94177 , 94179 , 94180 ,
+ 94192 , 94198 , 94208 , 101589, 101631, 101662, 101760, 101874,
+ 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882,
+ 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951,
+ 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800,
+ 113808, 113817, 113821, 113822, 118000, 118009, 118528, 118573,
+ 118576, 118598, 119141, 119145, 119149, 119154, 119163, 119170,
+ 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892,
+ 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974,
+ 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003,
+ 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092,
+ 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134,
+ 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538,
+ 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654,
+ 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770,
+ 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452,
+ 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519,
+ 122624, 122654, 122661, 122666, 122880, 122886, 122888, 122904,
+ 122907, 122913, 122915, 122916, 122918, 122922, 122928, 122989,
+ 123023, 123023, 123136, 123180, 123184, 123197, 123200, 123209,
+ 123214, 123214, 123536, 123566, 123584, 123641, 124112, 124153,
+ 124368, 124410, 124608, 124638, 124640, 124661, 124670, 124671,
+ 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926,
+ 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273,
+ 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500,
+ 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521,
+ 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537,
+ 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548,
+ 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557,
+ 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570,
+ 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590,
+ 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633,
+ 126635, 126651, 130032, 130041, 131072, 173791, 173824, 178205,
+ 178208, 183981, 183984, 191456, 191472, 192093, 194560, 195101,
+ 196608, 201546, 201552, 210041, 917760, 917999,
];
const unicodeIdentifierPartMin = 170;
const unicodeIdentifierPartMax = 917999;
diff --git a/std/assembly.json b/std/assembly.json
index 10a3e067dc..189ed19dc7 100644
--- a/std/assembly.json
+++ b/std/assembly.json
@@ -7,7 +7,6 @@
"allowJs": false,
"typeRoots": [ "types" ],
"types": [ "assembly" ],
- "baseUrl": ".",
"paths": {
"*": [
"./assembly/*"
diff --git a/std/assembly/builtins.ts b/std/assembly/builtins.ts
index 0f910a39e4..1c23551993 100644
--- a/std/assembly/builtins.ts
+++ b/std/assembly/builtins.ts
@@ -202,6 +202,12 @@ export declare function assert(isTrueish: T, message?: string): T;
@unsafe @builtin
export declare function unchecked(expr: T): T;
+export namespace inline {
+ // @ts-ignore: decorator
+ @unsafe @builtin
+ export declare function always(expr: T): T;
+}
+
// @ts-ignore: decorator
@unsafe @builtin
export declare function call_indirect(index: u32, ...args: auto[]): T;
diff --git a/std/assembly/date.ts b/std/assembly/date.ts
index 5d77fdcbde..7d273e1dd2 100644
--- a/std/assembly/date.ts
+++ b/std/assembly/date.ts
@@ -3,15 +3,14 @@ import { Date as Date_binding } from "./bindings/dom";
// @ts-ignore: decorator
@inline const
+ MILLIS_LIMIT = 8640000000000000,
MILLIS_PER_DAY = 1000 * 60 * 60 * 24,
MILLIS_PER_HOUR = 1000 * 60 * 60,
MILLIS_PER_MINUTE = 1000 * 60,
MILLIS_PER_SECOND = 1000,
-
- YEARS_PER_EPOCH = 400,
- DAYS_PER_EPOCH = 146097,
- EPOCH_OFFSET = 719468, // Jan 1, 1970
- MILLIS_LIMIT = 8640000000000000;
+ YEARS_PER_EPOCH = 400,
+ DAYS_PER_EPOCH = 146097, // 400 * 365 + 400 / 4 - 400 / 100 + 1
+ EPOCH_OFFSET = 719468; // Jan 1, 1970
// ymdFromEpochDays returns values via globals to avoid allocations
// @ts-ignore: decorator
@@ -52,7 +51,8 @@ export class Date {
hour: i32 = 0,
min: i32 = 0,
sec: i32 = 0,
- ms: i32 = 0;
+ ms: i32 = 0,
+ offsetMs: i32 = 0;
let dateString = dateTimeString;
let posT = dateTimeString.indexOf("T");
@@ -61,37 +61,67 @@ export class Date {
let timeString: string;
dateString = dateTimeString.substring(0, posT);
timeString = dateTimeString.substring(posT + 1);
- // parse the HH-MM-SS component
+
+ // might end with an offset ("Z", "+05:30", "-08:00", etc.)
+ for (let i = timeString.length - 1; i >= 0; i--) {
+ let c = timeString.charCodeAt(i);
+ if (c == 90) { // Z
+ timeString = timeString.substring(0, i);
+ break;
+ } else if (c == 43 || c == 45) { // + or -
+ if (i == timeString.length - 1) {
+ throw new RangeError(E_INVALIDDATE);
+ }
+
+ let posColon = timeString.indexOf(":", i + 1);
+ if (~posColon) {
+ let offsetHours = i32.parse(timeString.substring(i + 1, posColon));
+ let offsetMinutes = i32.parse(timeString.substring(posColon + 1));
+ offsetMs = (offsetHours * 60 + offsetMinutes) * MILLIS_PER_MINUTE;
+ } else {
+ let offsetHours = i32.parse(timeString.substring(i + 1));
+ offsetMs = offsetHours * MILLIS_PER_HOUR;
+ }
+
+ if (c == 45) offsetMs = -offsetMs; // negative offset
+ timeString = timeString.substring(0, i);
+ break;
+ }
+ }
+
+ // parse the HH:MM:SS component
let timeParts = timeString.split(":");
let len = timeParts.length;
if (len <= 1) throw new RangeError(E_INVALIDDATE);
- hour = I32.parseInt(timeParts[0]);
- min = I32.parseInt(timeParts[1]);
+ hour = i32.parse(timeParts[0]);
+ min = i32.parse(timeParts[1]);
if (len >= 3) {
- let secAndMs = timeParts[2];
- let posDot = secAndMs.indexOf(".");
+ let secAndFrac = timeParts[2];
+ let posDot = secAndFrac.indexOf(".");
if (~posDot) {
- // includes milliseconds
- sec = I32.parseInt(secAndMs.substring(0, posDot));
- ms = I32.parseInt(secAndMs.substring(posDot + 1));
+ // includes fractional seconds (truncate to milliseconds)
+ sec = i32.parse(secAndFrac.substring(0, posDot));
+ ms = i32.parse(secAndFrac.substr(posDot + 1, 3).padEnd(3, "0"));
} else {
- sec = I32.parseInt(secAndMs);
+ sec = i32.parse(secAndFrac);
}
}
}
+
// parse the YYYY-MM-DD component
let parts = dateString.split("-");
- let year = I32.parseInt(parts[0]);
+ let year = i32.parse(parts[0]);
let month = 1, day = 1;
let len = parts.length;
if (len >= 2) {
- month = I32.parseInt(parts[1]);
+ month = i32.parse(parts[1]);
if (len >= 3) {
- day = I32.parseInt(parts[2]);
+ day = i32.parse(parts[2]);
}
}
- return new Date(epochMillis(year, month, day, hour, min, sec, ms));
+
+ return new Date(epochMillis(year, month, day, hour, min, sec, ms) - offsetMs);
}
constructor(private epochMillis: i64) {
@@ -302,25 +332,23 @@ function invalidDate(millis: i64): bool {
// Paper: https://arxiv.org/pdf/2102.06959.pdf
function dateFromEpoch(ms: i64): i32 {
let da = (floorDiv(ms, MILLIS_PER_DAY) * 4 + EPOCH_OFFSET * 4) | 3;
- let q0 = floorDiv(da, DAYS_PER_EPOCH); // [0, 146096]
+ let q0 = floorDiv(da, DAYS_PER_EPOCH); // [0, 146096]
let r1 = da - q0 * DAYS_PER_EPOCH;
let u1 = u64(r1 | 3) * 2939745;
let dm1 = u1 / 11758980;
let n1 = 2141 * dm1 + 197913;
let year = 100 * q0 + i32(u1 >>> 32);
- let mo = n1 >>> 16;
- _day = (n1 & 0xFFFF) / 2141 + 1; // [1, 31]
- if (dm1 >= 306) { mo -= 12; ++year; }
- _month = mo; // [1, 12]
- return year;
+ _day = (n1 & 0xFFFF) / 2141 + 1; // [1, 31]
+ _month = (n1 >>> 16) - (dm1 >= 306 ? 12 : 0); // [1, 12]
+ return year + (dm1 >= 306 ? 1 : 0);
}
// http://howardhinnant.github.io/date_algorithms.html#days_from_civil
-function daysSinceEpoch(y: i32, m: i32, d: i32): i64 {
- y -= i32(m <= 2);
- let era = floorDiv(y, YEARS_PER_EPOCH);
- let yoe = y - era * YEARS_PER_EPOCH; // [0, 399]
- let doy = (153 * (m + (m > 2 ? -3 : 9)) + 2) / 5 + d - 1; // [0, 365]
+function daysSinceEpoch(year: i32, month: i32, day: i32): i64 {
+ year -= i32(month <= 2);
+ let era = floorDiv(year, YEARS_PER_EPOCH);
+ let yoe = year - era * YEARS_PER_EPOCH; // [0, 399]
+ let doy = (153 * (month + (month > 2 ? -3 : 9)) + 2) / 5 + day - 1; // [0, 365]
let doe = yoe * 365 + yoe / 4 - yoe / 100 + doy; // [0, 146096]
return (era * 146097 + doe - EPOCH_OFFSET);
}
@@ -329,8 +357,9 @@ function daysSinceEpoch(y: i32, m: i32, d: i32): i64 {
function dayOfWeek(year: i32, month: i32, day: i32): i32 {
const tab = memory.data([0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]);
- year -= i32(month < 3);
- year += floorDiv(year, 4) - floorDiv(year, 100) + floorDiv(year, YEARS_PER_EPOCH);
+ year -= i32(month <= 2);
+ const cent = floorDiv(year >> 2, 100 >> 2);
+ year += (year >> 2) - cent + (cent >> 2);
month = load(tab + month - 1);
return euclidRem(year + month + day, 7);
}
diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts
index 4dbee416a8..a604397320 100644
--- a/std/assembly/index.d.ts
+++ b/std/assembly/index.d.ts
@@ -791,9 +791,9 @@ declare function v128(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i:
declare namespace v128 {
/** Creates a vector with identical lanes. */
export function splat(x: T): v128;
- /** Extracts one lane as a scalar. */
+ /** Extracts one lane as a scalar. idx argument needs to be compile time constant. */
export function extract_lane(x: v128, idx: u8): T;
- /** Replaces one lane. */
+ /** Replaces one lane. idx argument needs to be compile time constant.*/
export function replace_lane(x: v128, idx: u8, value: T): v128;
/** Selects lanes from either vector according to the specified lane indexes. */
export function shuffle(a: v128, b: v128, ...lanes: u8[]): v128;
@@ -1051,11 +1051,11 @@ declare function i8x16(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i
declare namespace i8x16 {
/** Creates a vector with sixteen identical 8-bit integer lanes. */
export function splat(x: i8): v128;
- /** Extracts one 8-bit integer lane as a signed scalar. */
+ /** Extracts one 8-bit integer lane as a signed scalar. idx argument needs to be compile time constant. */
export function extract_lane_s(x: v128, idx: u8): i8;
- /** Extracts one 8-bit integer lane as an unsigned scalar. */
+ /** Extracts one 8-bit integer lane as an unsigned scalar. idx argument needs to be compile time constant. */
export function extract_lane_u(x: v128, idx: u8): u8;
- /** Replaces one 8-bit integer lane. */
+ /** Replaces one 8-bit integer lane. idx argument needs to be compile time constant. */
export function replace_lane(x: v128, idx: u8, value: i8): v128;
/** Adds each 8-bit integer lane. */
export function add(a: v128, b: v128): v128;
@@ -1146,11 +1146,11 @@ declare function i16x8(a: i16, b: i16, c: i16, d: i16, e: i16, f: i16, g: i16, h
declare namespace i16x8 {
/** Creates a vector with eight identical 16-bit integer lanes. */
export function splat(x: i16): v128;
- /** Extracts one 16-bit integer lane as a signed scalar. */
+ /** Extracts one 16-bit integer lane as a signed scalar. idx argument needs to be compile time constant. */
export function extract_lane_s(x: v128, idx: u8): i16;
- /** Extracts one 16-bit integer lane as an unsigned scalar. */
+ /** Extracts one 16-bit integer lane as an unsigned scalar. idx argument needs to be compile time constant. */
export function extract_lane_u(x: v128, idx: u8): u16;
- /** Replaces one 16-bit integer lane. */
+ /** Replaces one 16-bit integer lane. idx argument needs to be compile time constant. */
export function replace_lane(x: v128, idx: u8, value: i16): v128;
/** Adds each 16-bit integer lane. */
export function add(a: v128, b: v128): v128;
@@ -1267,9 +1267,9 @@ declare function i32x4(a: i32, b: i32, c: i32, d: i32): v128;
declare namespace i32x4 {
/** Creates a vector with four identical 32-bit integer lanes. */
export function splat(x: i32): v128;
- /** Extracts one 32-bit integer lane as a scalar. */
+ /** Extracts one 32-bit integer lane as a scalar. idx argument needs to be compile time constant. */
export function extract_lane(x: v128, idx: u8): i32;
- /** Replaces one 32-bit integer lane. */
+ /** Replaces one 32-bit integer lane. idx argument needs to be compile time constant. */
export function replace_lane(x: v128, idx: u8, value: i32): v128;
/** Adds each 32-bit integer lane. */
export function add(a: v128, b: v128): v128;
@@ -1416,9 +1416,9 @@ declare function i64x2(a: i64, b: i64): v128;
declare namespace i64x2 {
/** Creates a vector with two identical 64-bit integer lanes. */
export function splat(x: i64): v128;
- /** Extracts one 64-bit integer lane as a scalar. */
+ /** Extracts one 64-bit integer lane as a scalar. `idx` argument need to be compile time constant */
export function extract_lane(x: v128, idx: u8): i64;
- /** Replaces one 64-bit integer lane. */
+ /** Replaces one 64-bit integer lane. idx argument needs to be compile time constant. */
export function replace_lane(x: v128, idx: u8, value: i64): v128;
/** Adds each 64-bit integer lane. */
export function add(a: v128, b: v128): v128;
@@ -1485,9 +1485,9 @@ declare function f32x4(a: f32, b: f32, c: f32, d: f32): v128;
declare namespace f32x4 {
/** Creates a vector with four identical 32-bit float lanes. */
export function splat(x: f32): v128;
- /** Extracts one 32-bit float lane as a scalar. */
+ /** Extracts one 32-bit float lane as a scalar. idx argument needs to be compile time constant. */
export function extract_lane(x: v128, idx: u8): f32;
- /** Replaces one 32-bit float lane. */
+ /** Replaces one 32-bit float lane. idx argument needs to be compile time constant. */
export function replace_lane(x: v128, idx: u8, value: f32): v128;
/** Adds each 32-bit float lane. */
export function add(a: v128, b: v128): v128;
@@ -1575,9 +1575,9 @@ declare function f64x2(a: f64, b: f64): v128;
declare namespace f64x2 {
/** Creates a vector with two identical 64-bit float lanes. */
export function splat(x: f64): v128;
- /** Extracts one 64-bit float lane as a scalar. */
+ /** Extracts one 64-bit float lane as a scalar. idx argument needs to be compile time constant. */
export function extract_lane(x: v128, idx: u8): f64;
- /** Replaces one 64-bit float lane. */
+ /** Replaces one 64-bit float lane. idx argument needs to be compile time constant. */
export function replace_lane(x: v128, idx: u8, value: f64): v128;
/** Adds each 64-bit float lane. */
export function add(a: v128, b: v128): v128;
@@ -2129,6 +2129,7 @@ declare class StaticArray {
/** Class representing a sequence of characters. */
declare class String {
+ [key: i32]: string;
static fromCharCode(ls: i32, hs?: i32): string;
static fromCharCodes(arr: i32[]): string;
static fromCodePoint(code: i32): string;
@@ -2693,6 +2694,10 @@ declare function final(constructor: Constructor): void;
/** Annotates a method, function or constant global as always inlined. */
declare function inline(...args: any[]): any;
+declare namespace inline {
+ /** Explicitly requests inlined function calls on the provided expression wherever possible. */
+ export function always(value: T): T;
+}
/** Annotates a method, function or constant global as unsafe. */
declare function unsafe(...args: any[]): any;
diff --git a/std/assembly/rt/index-incremental.ts b/std/assembly/rt/index-incremental.ts
index 4730344b4f..2f1f115932 100644
--- a/std/assembly/rt/index-incremental.ts
+++ b/std/assembly/rt/index-incremental.ts
@@ -1,2 +1,2 @@
-import "rt/tlsf";
-import "rt/itcms";
+import "./tlsf";
+import "./itcms";
diff --git a/std/assembly/rt/index-minimal.ts b/std/assembly/rt/index-minimal.ts
index cf88ee158f..72b6eb0873 100644
--- a/std/assembly/rt/index-minimal.ts
+++ b/std/assembly/rt/index-minimal.ts
@@ -1,2 +1,2 @@
-import "rt/tlsf";
-import "rt/tcms";
+import "./tlsf";
+import "./tcms";
diff --git a/std/assembly/rt/index-stub.ts b/std/assembly/rt/index-stub.ts
index 47f29bebfd..924ecfb8e3 100644
--- a/std/assembly/rt/index-stub.ts
+++ b/std/assembly/rt/index-stub.ts
@@ -1 +1 @@
-import "rt/stub";
+import "./stub";
diff --git a/std/assembly/rt/itcms.ts b/std/assembly/rt/itcms.ts
index b44b69af25..ba2e09eb00 100644
--- a/std/assembly/rt/itcms.ts
+++ b/std/assembly/rt/itcms.ts
@@ -403,7 +403,12 @@ function interrupt(): void {
budget -= step();
if (state == STATE_IDLE) {
if (TRACE) trace("└ GC (auto) done at cur/max", 2, total, memory.size() << 16);
- threshold = (total * IDLEFACTOR / 100) + GRANULARITY;
+ if (IDLEFACTOR % 100 == 0) {
+ // optimization for the default GC parameters which idle factor is 200%
+ threshold = total * (IDLEFACTOR / 100) + GRANULARITY;
+ } else {
+ threshold = ((total * IDLEFACTOR) / 100) + GRANULARITY;
+ }
if (PROFILE) onyield(total);
return;
}
diff --git a/std/assembly/shared/feature.ts b/std/assembly/shared/feature.ts
index 1baa9ba3c9..6fe809b326 100644
--- a/std/assembly/shared/feature.ts
+++ b/std/assembly/shared/feature.ts
@@ -33,9 +33,11 @@ export const enum Feature {
/** Extended const expressions. */
ExtendedConst = 1 << 13, // see: https://github.com/WebAssembly/extended-const
/** Reference typed strings. */
- Stringref = 1 << 14, // see: https://github.com/WebAssembly/stringref
+ Strings = 1 << 14, // see: https://github.com/WebAssembly/stringref
+ /** Shared-everything threads. */
+ SharedEverything = 1 << 15, // see: https://github.com/WebAssembly/shared-everything-threads
/** All features. */
- All = (1 << 15) - 1
+ All = (1 << 16) - 1
}
/** Gets the name of the specified feature one would specify on the command line. */
@@ -55,7 +57,8 @@ export function featureToString(feature: Feature): string {
case Feature.Memory64: return "memory64";
case Feature.RelaxedSimd: return "relaxed-simd";
case Feature.ExtendedConst: return "extended-const";
- case Feature.Stringref: return "stringref";
+ case Feature.Strings: return "stringref";
+ case Feature.SharedEverything: return "shared-everything";
}
assert(false);
return "";
diff --git a/std/assembly/util/number.ts b/std/assembly/util/number.ts
index db74792f9a..ebd9d093cd 100644
--- a/std/assembly/util/number.ts
+++ b/std/assembly/util/number.ts
@@ -474,7 +474,7 @@ export function itoa64(value: i64, radix: i32): String {
@lazy let _frc_minus: u64 = 0;
// @ts-ignore: decorator
-@lazy let _frc_plus: u64 = 0;
+@lazy let _frc_plus: u64 = 0;
// @ts-ignore: decorator
@lazy let _frc_pow: u64 = 0;
@@ -511,14 +511,14 @@ function umul64e(e1: i32, e2: i32): i32 {
// @ts-ignore: decorator
@inline
-function normalizedBoundaries(f: u64, e: i32): void {
+function normalizedBoundaries(f: u64, e: i32, isSingle: bool): void {
let frc = (f << 1) + 1;
let exp = e - 1;
let off = clz(frc);
frc <<= off;
exp -= off;
- let m = 1 + i32(f == 0x0010000000000000);
+ let m = 1 + i32(f == (isSingle ? 0x00800000 : 0x0010000000000000));
_frc_plus = frc;
_frc_minus = ((f << m) - 1) << e - m - exp;
@@ -559,16 +559,26 @@ function getCachedPower(minExp: i32): void {
// @ts-ignore: decorator
@inline
-function grisu2(value: f64, buffer: usize, sign: i32): i32 {
+function grisu2(value: f64, buffer: usize, sign: i32, isSingle: bool): i32 {
+ let frc: u64;
+ let exp: i32;
// frexp routine
- let uv = reinterpret(value);
- let exp = i32((uv & 0x7FF0000000000000) >>> 52);
- let sid = uv & 0x000FFFFFFFFFFFFF;
- let frc = (u64(exp != 0) << 52) + sid;
- exp = select(exp, 1, exp) - (0x3FF + 52);
+ if (isSingle) {
+ let uv = reinterpret(value);
+ exp = (uv & 0x7F800000) >>> 23;
+ let sid = uv & 0x007FFFFF;
+ frc = (u64(exp != 0) << 23) + sid;
+ exp = (exp || 1) - (0x7F + 23);
+ } else {
+ let uv = reinterpret(value);
+ exp = i32((uv & 0x7FF0000000000000) >>> 52);
+ let sid = uv & 0x000FFFFFFFFFFFFF;
+ frc = (u64(exp != 0) << 52) + sid;
+ exp = (exp || 1) - (0x3FF + 52);
+ }
- normalizedBoundaries(frc, exp);
+ normalizedBoundaries(frc, exp, isSingle);
getCachedPower(_exp);
// normalize
@@ -716,14 +726,14 @@ function prettify(buffer: usize, length: i32, k: i32): i32 {
}
}
-function dtoa_core(buffer: usize, value: f64): i32 {
+function dtoa_core(buffer: usize, value: f64, isSingle: bool): i32 {
let sign = i32(value < 0);
if (sign) {
value = -value;
store(buffer, CharCode.MINUS);
}
- // assert(value > 0 && value <= 1.7976931348623157e308);
- let len = grisu2(value, buffer, sign);
+ // assert(value > 0 && value <= (isSingle ? f32.MAX_VALUE : f64.MAX_VALUE));
+ let len = grisu2(value, buffer, sign, isSingle);
len = prettify(buffer + (sign << 1), len - sign, _K);
return len + sign;
}
@@ -731,13 +741,20 @@ function dtoa_core(buffer: usize, value: f64): i32 {
// @ts-ignore: decorator
@lazy @inline const dtoa_buf = memory.data(MAX_DOUBLE_LENGTH << 1);
-export function dtoa(value: f64): String {
+export function dtoa(value: T): String {
+ const isSingle = isFloat() && sizeof() == 4;
+ return dtoa_impl(value, isSingle);
+}
+
+// @ts-ignore: decorator
+@inline
+function dtoa_impl(value: f64, isSingle: bool): String {
if (value == 0) return "0.0";
if (!isFinite(value)) {
if (isNaN(value)) return "NaN";
return select("-Infinity", "Infinity", value < 0);
}
- let size = dtoa_core(dtoa_buf, value) << 1;
+ let size = dtoa_core(dtoa_buf, value, isSingle) << 1;
let result = changetype(__new(size, idof()));
memory.copy(changetype(result), dtoa_buf, size);
return result;
@@ -821,7 +838,14 @@ export function itoa_buffered(buffer: usize, value: T): u32 {
return sign + decimals;
}
-export function dtoa_buffered(buffer: usize, value: f64): u32 {
+export function dtoa_buffered(buffer: usize, value: T): u32 {
+ const isSingle = isFloat() && sizeof() == 4;
+ return dtoa_buffered_impl(buffer, value, isSingle);
+}
+
+// @ts-ignore: decorator
+@inline
+function dtoa_buffered_impl(buffer: usize, value: f64, isSingle: bool): u32 {
if (value == 0) {
store(buffer, CharCode._0);
store(buffer, CharCode.DOT, 2);
@@ -845,5 +869,5 @@ export function dtoa_buffered(buffer: usize, value: f64): u32 {
return 8 + u32(sign);
}
}
- return dtoa_core(buffer, value);
+ return dtoa_core(buffer, value, isSingle);
}
diff --git a/std/portable/index.js b/std/portable/index.js
index d35ce63ee2..a280120b4c 100644
--- a/std/portable/index.js
+++ b/std/portable/index.js
@@ -267,9 +267,9 @@ if (typeof globalScope.ASC_TARGET === "undefined") {
if (!String.prototype.replaceAll) {
Object.defineProperty(String.prototype, "replaceAll", {
- value: function replaceAll(search, replacment) {
- let res = this.split(search).join(replacment);
- if (!search.length) res = replacment + res + replacment;
+ value: function replaceAll(search, replacement) {
+ let res = this.split(search).join(replacement);
+ if (!search.length) res = replacement + res + replacement;
return res;
},
configurable: true
@@ -279,7 +279,8 @@ if (typeof globalScope.ASC_TARGET === "undefined") {
function defaultComparator(a, b) {
if (a == b) {
if (a != 0) return 0;
- a = 1 / a, b = 1 / b;
+ a = 1 / a;
+ b = 1 / b;
} else {
let nanA = a != a, nanB = b != b;
if (nanA | nanB) return nanA - nanB;
@@ -412,6 +413,4 @@ if (typeof globalScope.ASC_TARGET === "undefined") {
if (n) message += Array.prototype.slice.call(arguments, 2, 2 + n);
console.error("trace: " + message);
};
-} else {
- console.warn("compiler mismatch: std/portable included twice");
}
diff --git a/tests/allocators/index.js b/tests/allocators/index.js
index ef2c5092cb..32f8f54570 100644
--- a/tests/allocators/index.js
+++ b/tests/allocators/index.js
@@ -40,12 +40,12 @@ async function test(file) {
try {
alloc(COMMON_MAX + 1, 0); // unreachable
overflow = true;
- } catch (e) { /* nop */ }
+ } catch { /* nop */ }
if (overflow) throw Error("allocation can overflow COMMON_MAX + 1");
try {
alloc(0xffffffff, 0); // unreachable
overflow = true;
- } catch (e) { /* nop */ }
+ } catch { /* nop */ }
if (overflow) throw Error("allocation can overflow 0xffffffff");
}
diff --git a/tests/allocators/runner.js b/tests/allocators/runner.js
index 9ec9e18d1b..041683a75d 100644
--- a/tests/allocators/runner.js
+++ b/tests/allocators/runner.js
@@ -41,7 +41,7 @@ export default function runner(exports, runs, allocs) {
console.log("base: " + base);
try {
reset();
- } catch (e) {
+ } catch {
free(base);
}
let currentMem = exports.memory.buffer.byteLength;
@@ -85,7 +85,7 @@ export default function runner(exports, runs, allocs) {
let size = ((exports.memory.buffer.byteLength - base) * 9 / 10) >>> 0;
let ptr = alloc(size, 0);
// if (fill) fill(ptr, 0xac, size);
- if (ptr !== base) throw Error("expected " + base + " but got " + ptr);
+ if (ptr !== base) throw Error("expected " + base + " but got " + ptr, { cause: e });
free(ptr);
}
testMemChanged();
diff --git a/tests/cli/options.js b/tests/cli/options.js
index 637aae3493..1eed2763ce 100644
--- a/tests/cli/options.js
+++ b/tests/cli/options.js
@@ -2,18 +2,21 @@ import assert from "assert";
import * as optionsUtil from "../../util/options.js";
const config = {
- "enable": {
- "type": "S",
- "mutuallyExclusive": "disable"
+ enable: {
+ type: "S",
+ mutuallyExclusive: "disable",
},
- "disable": {
- "type": "S",
- "mutuallyExclusive": "enable"
+ disable: {
+ type: "S",
+ mutuallyExclusive: "enable",
+ },
+ other: {
+ type: "S",
+ default: ["x"],
+ },
+ bool_input_for_string: {
+ type: "s",
},
- "other": {
- "type": "S",
- "default": ["x"]
- }
};
// Present in both should concat
@@ -33,17 +36,21 @@ assert.deepStrictEqual(merged.enable, ["c"]);
assert.deepStrictEqual(merged.disable, ["a", "b"]);
// Populating defaults should work after the fact
-optionsUtil.addDefaults(config, merged = {});
+optionsUtil.addDefaults(config, (merged = {}));
assert.deepStrictEqual(merged.other, ["x"]);
-optionsUtil.addDefaults(config, merged = { other: ["y"] });
+optionsUtil.addDefaults(config, (merged = { other: ["y"] }));
assert.deepStrictEqual(merged.other, ["y"]);
+// String test
+assert.deepStrictEqual(merged.bool_input_for_string, undefined);
+merged = optionsUtil.merge(config, {}, { bool_input_for_string: false });
+assert.deepStrictEqual(merged.bool_input_for_string, undefined);
+merged = optionsUtil.merge(config, {}, { bool_input_for_string: true });
+assert.deepStrictEqual(merged.bool_input_for_string, "");
+
// Complete usage test
-let result = optionsUtil.parse([
- "--enable", "a",
- "--disable", "b",
-], config, false);
+let result = optionsUtil.parse(["--enable", "a", "--disable", "b"], config, false);
merged = optionsUtil.merge(config, result.options, { enable: ["b", "c"] });
merged = optionsUtil.merge(config, merged, { disable: ["a", "d"] });
diff --git a/tests/compiler.js b/tests/compiler.js
index 68efc56c19..0b6018fa80 100644
--- a/tests/compiler.js
+++ b/tests/compiler.js
@@ -199,6 +199,11 @@ async function runTest(basename) {
// If a fixture/generated file is missing, false will be compared to a
// string. If both are missing, nothing happens below (as it should).
if (actual !== expected) {
+ if (filename == "std/math.release.wat" && os.version().startsWith("Darwin Kernel") && os.arch() == "arm64") {
+ // FIXME: in arm64 macos, binaryen will optimize math.ts with different output.
+ compareFixture.end(SKIPPED);
+ return;
+ }
compareFixture.end(FAILURE);
return prepareResult(FAILURE, "fixture mismatch");
}
diff --git a/tests/compiler/NonNullable.debug.wat b/tests/compiler/NonNullable.debug.wat
index 5620f0ae0b..52a1e1e96d 100644
--- a/tests/compiler/NonNullable.debug.wat
+++ b/tests/compiler/NonNullable.debug.wat
@@ -357,28 +357,15 @@
(local $0 i32)
(local $1 i32)
global.get $~lib/memory/__stack_pointer
- i32.const 12
+ 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
- global.get $~lib/memory/__stack_pointer
- i32.const 0
- i32.store offset=8
i32.const 32
- local.set $1
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store
- local.get $1
i32.const 32
- local.set $1
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store offset=4
- local.get $1
call $~lib/string/String.__eq
i32.eqz
if
@@ -390,17 +377,7 @@
unreachable
end
i32.const 112
- local.set $1
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store
- local.get $1
i32.const 112
- local.set $1
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store offset=4
- local.get $1
call $~lib/string/String.__eq
i32.eqz
if
@@ -412,17 +389,7 @@
unreachable
end
i32.const 144
- local.set $1
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store
- local.get $1
i32.const 144
- local.set $1
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store offset=4
- local.get $1
call $~lib/string/String.__eq
i32.eqz
if
@@ -436,7 +403,7 @@
global.get $~lib/memory/__stack_pointer
global.get $NonNullable/z
local.tee $0
- i32.store offset=8
+ i32.store offset=4
local.get $0
if (result i32)
local.get $0
@@ -462,7 +429,7 @@
local.get $1
call $NonNullable/safetyCheck<~lib/string/String|null>
global.get $~lib/memory/__stack_pointer
- i32.const 12
+ i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
)
diff --git a/tests/compiler/NonNullable.release.wat b/tests/compiler/NonNullable.release.wat
index 348860fd96..03d6aaf8c0 100644
--- a/tests/compiler/NonNullable.release.wat
+++ b/tests/compiler/NonNullable.release.wat
@@ -20,130 +20,6 @@
(data $5.1 (i32.const 1272) "\02\00\00\00^\00\00\00U\00n\00e\00x\00p\00e\00c\00t\00e\00d\00 \00\'\00n\00u\00l\00l\00\'\00 \00(\00n\00o\00t\00 \00a\00s\00s\00i\00g\00n\00e\00d\00 \00o\00r\00 \00f\00a\00i\00l\00e\00d\00 \00c\00a\00s\00t\00)")
(export "memory" (memory $0))
(start $~start)
- (func $~start
- (local $0 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 1388
- 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
- call $NonNullable/assertNonNull<~lib/string/String>
- global.get $~lib/memory/__stack_pointer
- i32.const 1248
- 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 1388
- 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 1248
- i32.store
- call $~lib/string/String.__ne
- if
- global.get $~lib/memory/__stack_pointer
- i32.const 1248
- i32.store
- call $NonNullable/assertNonNull<~lib/string/String>
- 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
- i32.const 34176
- i32.const 34224
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
- )
(func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
@@ -165,14 +41,13 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $2
i64.const 0
i64.store
local.get $0
local.get $1
i32.eq
if
- local.get $2
+ global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
@@ -187,8 +62,6 @@
i32.or
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $4
- local.tee $2
local.get $0
i32.store
local.get $0
@@ -198,7 +71,7 @@
i32.const 1
i32.shr_u
local.set $3
- local.get $2
+ global.get $~lib/memory/__stack_pointer
local.get $1
i32.store
local.get $3
@@ -210,12 +83,12 @@
i32.shr_u
i32.ne
br_if $folding-inner0
- local.get $4
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
local.set $2
- local.get $4
+ global.get $~lib/memory/__stack_pointer
local.get $1
i32.store offset=4
local.get $3
@@ -327,28 +200,24 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $0
i64.const 0
i64.store
- local.get $0
+ global.get $~lib/memory/__stack_pointer
i32.const 1248
i32.store
- local.get $0
+ global.get $~lib/memory/__stack_pointer
i32.const 0
i32.store offset=4
i32.const 1248
i32.const 0
call $~lib/string/String.__eq
i32.eqz
- local.set $0
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
)
(func $NonNullable/assertNonNull<~lib/string/String>
- (local $0 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -365,10 +234,9 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $0
i32.const 0
i32.store
- local.get $0
+ global.get $~lib/memory/__stack_pointer
i32.const 1248
i32.store
call $~lib/string/String.__ne
@@ -386,4 +254,101 @@
i32.add
global.set $~lib/memory/__stack_pointer
)
+ (func $~start
+ 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 1388
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ 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
+ 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
+ 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
+ i32.const 1248
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 1248
+ i32.store
+ call $NonNullable/assertNonNull<~lib/string/String>
+ global.get $~lib/memory/__stack_pointer
+ i32.const 1248
+ 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 1388
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 1248
+ i32.store
+ call $~lib/string/String.__ne
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 1248
+ i32.store
+ call $NonNullable/assertNonNull<~lib/string/String>
+ 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 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ return
+ end
+ i32.const 34176
+ i32.const 34224
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
)
diff --git a/tests/compiler/abi.release.wat b/tests/compiler/abi.release.wat
index 5320131fcb..f5060e8da6 100644
--- a/tests/compiler/abi.release.wat
+++ b/tests/compiler/abi.release.wat
@@ -3,11 +3,11 @@
(memory $0 1)
(data $0 (i32.const 1036) "\1c")
(data $0.1 (i32.const 1048) "\02\00\00\00\0c\00\00\00a\00b\00i\00.\00t\00s")
- (export "exported" (func $abi/exported))
- (export "exportedExported" (func $abi/exported))
- (export "exportedInternal" (func $abi/exported))
+ (export "exported" (func $abi/exportedInternal))
+ (export "exportedExported" (func $abi/exportedInternal))
+ (export "exportedInternal" (func $abi/exportedInternal))
(export "memory" (memory $0))
- (func $abi/exported (result i32)
+ (func $abi/exportedInternal (result i32)
i32.const -128
)
)
diff --git a/tests/compiler/assert-nonnull.release.wat b/tests/compiler/assert-nonnull.release.wat
index ef7f534196..aabd543b52 100644
--- a/tests/compiler/assert-nonnull.release.wat
+++ b/tests/compiler/assert-nonnull.release.wat
@@ -1,7 +1,6 @@
(module
(type $0 (func (param i32) (result i32)))
- (type $1 (func (result i32)))
- (type $2 (func (param i32 i32 i32 i32)))
+ (type $1 (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 34236))
(memory $0 1)
@@ -15,7 +14,6 @@
(data $3.1 (i32.const 1304) "\02\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s")
(data $4 (i32.const 1340) "|")
(data $4.1 (i32.const 1352) "\02\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")
- (table $0 1 1 funcref)
(export "memory" (memory $0))
(export "testVar" (func $export:assert-nonnull/testVar))
(export "testObj" (func $export:assert-nonnull/testObj))
@@ -30,7 +28,6 @@
(export "testObjFn" (func $export:assert-nonnull/testObjFn))
(export "testObjRet" (func $export:assert-nonnull/testObjRet))
(func $~lib/array/Array#__get (param $0 i32) (result i32)
- (local $1 i32)
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
@@ -47,10 +44,9 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $1
i64.const 0
i64.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
@@ -65,23 +61,21 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $1
local.get $0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.load offset=4
i32.load
local.tee $0
i32.store offset=4
- local.get $1
+ global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
local.get $0
)
(func $export:assert-nonnull/testVar (param $0 i32) (result i32)
- (local $1 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -92,10 +86,9 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
local.get $0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
@@ -104,10 +97,9 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
i32.const 0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
@@ -138,8 +130,56 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:assert-nonnull/testObj (param $0 i32) (result i32)
- (local $1 i32)
+ (func $export:assert-nonnull/testRet (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner1
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 1468
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ 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 1468
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.eqz
+ br_if $folding-inner1
+ local.get $0
+ i32.load
+ unreachable
+ end
+ i32.const 34256
+ i32.const 34304
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ i32.const 1056
+ i32.const 1184
+ i32.const 44
+ i32.const 10
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assert-nonnull/testProp (param $0 i32) (result i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -150,10 +190,9 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
local.get $0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
@@ -162,30 +201,27 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
i64.const 0
i64.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
+ i32.load
+ local.tee $0
i32.store offset=4
local.get $0
i32.eqz
if
i32.const 1056
i32.const 1184
- i32.const 11
+ i32.const 15
i32.const 10
call $~lib/builtins/abort
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $1
- local.get $0
- i32.store
- local.get $0
- i32.load
- local.set $0
- local.get $1
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
@@ -203,8 +239,64 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:assert-nonnull/testProp (param $0 i32) (result i32)
- (local $1 i32)
+ (func $export:assert-nonnull/testObjRet (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner1
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 1468
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ 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 1468
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.load offset=4
+ local.tee $0
+ i32.store offset=4
+ local.get $0
+ i32.eqz
+ br_if $folding-inner1
+ local.get $0
+ i32.load
+ unreachable
+ end
+ i32.const 34256
+ i32.const 34304
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ i32.const 1056
+ i32.const 1184
+ i32.const 52
+ i32.const 10
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assert-nonnull/testObjFn (param $0 i32) (result i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -215,10 +307,9 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
local.get $0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
@@ -227,15 +318,14 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
i64.const 0
i64.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
- i32.load
+ i32.load offset=4
local.tee $0
i32.store offset=4
local.get $0
@@ -243,21 +333,14 @@
if
i32.const 1056
i32.const 1184
- i32.const 15
+ i32.const 48
i32.const 10
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
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
local.get $0
- return
+ i32.load
+ unreachable
end
i32.const 34256
i32.const 34304
@@ -266,8 +349,7 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:assert-nonnull/testArr (param $0 i32) (result i32)
- (local $1 i32)
+ (func $export:assert-nonnull/testObj (param $0 i32) (result i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -278,10 +360,9 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
local.get $0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
@@ -290,10 +371,9 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
i64.const 0
i64.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store offset=4
local.get $0
@@ -301,65 +381,16 @@
if
i32.const 1056
i32.const 1184
- i32.const 19
+ i32.const 11
i32.const 10
call $~lib/builtins/abort
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $1
- local.get $0
- i32.store
- local.get $1
- i32.const 8
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 1468
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $1
- i64.const 0
- i64.store
- local.get $1
- local.get $0
- i32.store
- local.get $0
- i32.load offset=12
- i32.eqz
- if
- i32.const 1248
- i32.const 1312
- i32.const 114
- i32.const 42
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.tee $1
local.get $0
i32.store
- local.get $1
local.get $0
- i32.load offset=4
i32.load
- local.tee $0
- i32.store offset=4
- local.get $0
- i32.eqz
- if
- i32.const 1360
- i32.const 1312
- i32.const 118
- i32.const 40
- 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
i32.const 8
i32.add
@@ -368,7 +399,6 @@
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
return
end
i32.const 34256
@@ -378,7 +408,7 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:assert-nonnull/testElem (param $0 i32) (result i32)
+ (func $export:assert-nonnull/testFn2 (param $0 i32) (result i32)
(local $1 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
@@ -390,10 +420,9 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
local.get $0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
@@ -402,37 +431,27 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
i64.const 0
i64.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
- local.get $1
- local.get $0
- call $~lib/array/Array#__get
- local.tee $0
- i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.eqz
if
i32.const 1056
i32.const 1184
- i32.const 23
- i32.const 10
+ i32.const 39
+ i32.const 13
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
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
local.get $0
- return
+ i32.store offset=4
+ local.get $0
+ i32.load
+ unreachable
end
i32.const 34256
i32.const 34304
@@ -441,172 +460,55 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:assert-nonnull/testAll (param $0 i32) (result i32)
- (local $1 i32)
+ (func $export:assert-nonnull/testFn (param $0 i32) (result i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
- block $folding-inner1
- block $folding-inner0
- global.get $~lib/memory/__stack_pointer
- i32.const 1468
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $1
- local.get $0
- i32.store
- local.get $1
- i32.const 20
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 1468
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $1
- i32.const 0
- i32.const 20
- memory.fill
- local.get $1
- local.get $0
- i32.store offset=8
- local.get $0
- i32.eqz
- br_if $folding-inner1
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $1
- local.get $0
- call $~lib/array/Array#__get
- local.tee $0
- i32.store offset=12
- local.get $0
- i32.eqz
- br_if $folding-inner1
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store
- local.get $1
- local.get $0
- i32.load
- local.tee $0
- i32.store offset=16
- local.get $0
- i32.eqz
- br_if $folding-inner1
- 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 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $0
- return
- end
- i32.const 34256
- i32.const 34304
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
- end
- i32.const 1056
- i32.const 1184
- i32.const 27
- i32.const 10
- call $~lib/builtins/abort
- unreachable
- )
- (func $export:assert-nonnull/testAll2 (param $0 i32) (result i32)
- (local $1 i32)
- global.get $~lib/memory/__stack_pointer
- i32.const 4
- i32.sub
- global.set $~lib/memory/__stack_pointer
- block $folding-inner1
- block $folding-inner0
- global.get $~lib/memory/__stack_pointer
- i32.const 1468
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $1
- local.get $0
- i32.store
- local.get $1
- i32.const 20
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 1468
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $1
- i32.const 0
- i32.const 20
- memory.fill
- local.get $1
- local.get $0
- i32.store offset=8
- local.get $0
- i32.eqz
- br_if $folding-inner1
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $1
- local.get $0
- call $~lib/array/Array#__get
- local.tee $0
- i32.store offset=12
- local.get $0
- i32.eqz
- br_if $folding-inner1
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store
- local.get $1
- local.get $0
- i32.load
- local.tee $0
- i32.store offset=16
- local.get $0
- i32.eqz
- br_if $folding-inner1
- 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 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $0
- return
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 1468
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.get $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 1468
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.eqz
+ if
+ i32.const 1056
+ i32.const 1184
+ i32.const 35
+ i32.const 10
+ call $~lib/builtins/abort
+ unreachable
end
- i32.const 34256
- i32.const 34304
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
+ local.get $0
+ i32.load
unreachable
end
- i32.const 1056
- i32.const 1184
- i32.const 31
- i32.const 10
+ i32.const 34256
+ i32.const 34304
+ i32.const 1
+ i32.const 1
call $~lib/builtins/abort
unreachable
)
- (func $export:assert-nonnull/testFn (param $0 i32) (result i32)
- (local $1 i32)
+ (func $export:assert-nonnull/testElem (param $0 i32) (result i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -617,11 +519,10 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
local.get $0
i32.store
- local.get $1
- i32.const 4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
@@ -629,27 +530,36 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
- i32.const 0
- i32.store
- local.get $1
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ call $~lib/array/Array#__get
+ local.tee $0
+ i32.store offset=4
local.get $0
i32.eqz
if
i32.const 1056
i32.const 1184
- i32.const 35
+ i32.const 23
i32.const 10
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
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
local.get $0
- i32.load
- call_indirect (type $1)
- drop
- unreachable
+ return
end
i32.const 34256
i32.const 34304
@@ -658,8 +568,7 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:assert-nonnull/testFn2 (param $0 i32) (result i32)
- (local $1 i32)
+ (func $export:assert-nonnull/testArr (param $0 i32) (result i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -670,10 +579,9 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
local.get $0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
@@ -682,30 +590,82 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
i64.const 0
i64.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store
+ i32.store offset=4
local.get $0
i32.eqz
if
i32.const 1056
i32.const 1184
- i32.const 39
- i32.const 13
+ i32.const 19
+ i32.const 10
call $~lib/builtins/abort
unreachable
end
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=4
+ 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 1468
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
+ i32.store
+ local.get $0
+ i32.load offset=12
+ i32.eqz
+ if
+ i32.const 1248
+ i32.const 1312
+ i32.const 114
+ i32.const 42
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.load offset=4
i32.load
- call_indirect (type $1)
- drop
- unreachable
+ local.tee $0
+ i32.store offset=4
+ local.get $0
+ i32.eqz
+ if
+ i32.const 1360
+ i32.const 1312
+ i32.const 118
+ i32.const 40
+ 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
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ return
end
i32.const 34256
i32.const 34304
@@ -714,7 +674,7 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:assert-nonnull/testRet (param $0 i32) (result i32)
+ (func $export:assert-nonnull/testAll2 (param $0 i32) (result i32)
(local $1 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
@@ -727,11 +687,10 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
local.get $0
i32.store
- local.get $1
- i32.const 8
+ global.get $~lib/memory/__stack_pointer
+ i32.const 20
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
@@ -739,20 +698,47 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
- i64.const 0
- i64.store
- local.get $1
+ i32.const 0
+ i32.const 20
+ memory.fill
+ global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store
+ i32.store offset=8
local.get $0
i32.eqz
br_if $folding-inner1
+ global.get $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ call $~lib/array/Array#__get
+ local.tee $0
+ i32.store offset=12
+ local.get $0
+ i32.eqz
+ br_if $folding-inner1
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
local.get $0
i32.load
- call_indirect (type $1)
- drop
- unreachable
+ local.tee $0
+ i32.store offset=16
+ local.get $0
+ i32.eqz
+ br_if $folding-inner1
+ 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 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ return
end
i32.const 34256
i32.const 34304
@@ -763,70 +749,12 @@
end
i32.const 1056
i32.const 1184
- i32.const 44
+ i32.const 31
i32.const 10
call $~lib/builtins/abort
unreachable
)
- (func $export:assert-nonnull/testObjFn (param $0 i32) (result i32)
- (local $1 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 1468
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $1
- local.get $0
- i32.store
- local.get $1
- i32.const 8
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 1468
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $1
- i64.const 0
- i64.store
- local.get $1
- local.get $0
- i32.store
- local.get $1
- local.get $0
- i32.load offset=4
- local.tee $0
- i32.store offset=4
- local.get $0
- i32.eqz
- if
- i32.const 1056
- i32.const 1184
- i32.const 48
- i32.const 10
- call $~lib/builtins/abort
- unreachable
- end
- local.get $0
- i32.load
- call_indirect (type $1)
- drop
- unreachable
- end
- i32.const 34256
- i32.const 34304
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
- )
- (func $export:assert-nonnull/testObjRet (param $0 i32) (result i32)
+ (func $export:assert-nonnull/testAll (param $0 i32) (result i32)
(local $1 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
@@ -839,11 +767,10 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
local.get $0
i32.store
- local.get $1
- i32.const 12
+ global.get $~lib/memory/__stack_pointer
+ i32.const 20
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
@@ -851,28 +778,47 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
- i64.const 0
- i64.store
- local.get $1
i32.const 0
+ i32.const 20
+ memory.fill
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
i32.store offset=8
- local.get $1
local.get $0
- i32.store
- local.get $1
+ i32.eqz
+ br_if $folding-inner1
+ global.get $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
local.get $0
- i32.load offset=4
- local.tee $0
i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ call $~lib/array/Array#__get
+ local.tee $0
+ i32.store offset=12
local.get $0
i32.eqz
br_if $folding-inner1
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
local.get $0
i32.load
- call_indirect (type $1)
- drop
- unreachable
+ local.tee $0
+ i32.store offset=16
+ local.get $0
+ i32.eqz
+ br_if $folding-inner1
+ 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 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ return
end
i32.const 34256
i32.const 34304
@@ -883,7 +829,7 @@
end
i32.const 1056
i32.const 1184
- i32.const 52
+ i32.const 27
i32.const 10
call $~lib/builtins/abort
unreachable
diff --git a/tests/compiler/assignment-chain.debug.wat b/tests/compiler/assignment-chain.debug.wat
index 84f831ff37..340796c987 100644
--- a/tests/compiler/assignment-chain.debug.wat
+++ b/tests/compiler/assignment-chain.debug.wat
@@ -1629,14 +1629,17 @@
if
i32.const 0
drop
+ i32.const 200
+ i32.const 100
+ i32.rem_u
+ i32.const 0
+ i32.eq
+ drop
global.get $~lib/rt/itcms/total
- i64.extend_i32_u
i32.const 200
- i64.extend_i32_u
- i64.mul
- i64.const 100
- i64.div_u
- i32.wrap_i64
+ i32.const 100
+ i32.div_u
+ i32.mul
i32.const 1024
i32.add
global.set $~lib/rt/itcms/threshold
@@ -2349,12 +2352,8 @@
call $~lib/object/Object~visit
local.get $0
i32.load
- local.tee $2
- if
- local.get $2
- local.get $1
- call $~lib/rt/itcms/__visit
- end
+ local.get $1
+ call $~lib/rt/itcms/__visit
)
(func $~lib/object/Object~visit (param $0 i32) (param $1 i32)
)
diff --git a/tests/compiler/assignment-chain.release.wat b/tests/compiler/assignment-chain.release.wat
index f7c0cdbab6..fb11835ac0 100644
--- a/tests/compiler/assignment-chain.release.wat
+++ b/tests/compiler/assignment-chain.release.wat
@@ -5,8 +5,8 @@
(type $3 (func (param i32 i32) (result i32)))
(type $4 (func (param i32 i32 i32 i32)))
(type $5 (func (param i32 i32 i64)))
- (type $6 (func (result i32)))
- (type $7 (func (param i32) (result i32)))
+ (type $6 (func (param i32) (result i32)))
+ (type $7 (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))
(global $~lib/rt/itcms/threshold (mut i32) (i32.const 0))
@@ -39,51 +39,6 @@
(export "static_setter_assignment_chain" (func $assignment-chain/static_setter_assignment_chain))
(export "memory" (memory $0))
(start $~start)
- (func $~lib/rt/itcms/visitRoots
- (local $0 i32)
- (local $1 i32)
- i32.const 1248
- call $~lib/rt/itcms/__visit
- i32.const 1056
- call $~lib/rt/itcms/__visit
- global.get $~lib/rt/itcms/pinSpace
- local.tee $1
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- loop $while-continue|0
- local.get $0
- local.get $1
- i32.ne
- if
- local.get $0
- i32.load offset=4
- i32.const 3
- i32.and
- i32.const 3
- i32.ne
- if
- i32.const 0
- i32.const 1120
- i32.const 160
- i32.const 16
- call $~lib/builtins/abort
- unreachable
- end
- local.get $0
- i32.const 20
- i32.add
- call $~lib/rt/__visit_members
- local.get $0
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- br $while-continue|0
- end
- end
- )
(func $~lib/rt/itcms/__visit (param $0 i32)
(local $1 i32)
(local $2 i32)
@@ -628,1024 +583,914 @@
i32.or
i32.store offset=4
)
- (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i64)
+ (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32)
+ (local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
- local.get $2
- local.get $1
- i64.extend_i32_u
- i64.lt_u
+ (local $6 i32)
+ local.get $0
+ i32.const 1073741804
+ i32.ge_u
if
- i32.const 0
- i32.const 1392
- i32.const 382
- i32.const 14
+ i32.const 1056
+ i32.const 1120
+ i32.const 261
+ i32.const 31
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
+ global.get $~lib/rt/itcms/total
+ global.get $~lib/rt/itcms/threshold
+ i32.ge_u
+ if
+ block $__inlined_func$~lib/rt/itcms/interrupt$69
+ 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
+ i32.const 1
+ i32.shl
+ i32.const 1024
+ i32.add
+ global.set $~lib/rt/itcms/threshold
+ br $__inlined_func$~lib/rt/itcms/interrupt$69
+ end
+ local.get $2
+ i32.const 0
+ i32.gt_s
+ br_if $do-loop|0
+ end
+ global.get $~lib/rt/itcms/total
+ global.get $~lib/rt/itcms/total
+ 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 $0
- i32.load offset=1568
- local.tee $3
+ i32.const 16
+ i32.add
+ local.tee $2
+ i32.const 1073741820
+ i32.gt_u
if
- local.get $3
- i32.const 4
+ i32.const 1056
+ i32.const 1392
+ i32.const 461
+ i32.const 29
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $4
+ local.get $2
+ i32.const 12
+ i32.le_u
+ if (result i32)
+ i32.const 12
+ else
+ local.get $2
+ i32.const 19
i32.add
- local.get $1
- i32.gt_u
- if
- i32.const 0
- i32.const 1392
- i32.const 389
- i32.const 16
- call $~lib/builtins/abort
- unreachable
+ i32.const -16
+ i32.and
+ i32.const 4
+ i32.sub
+ end
+ local.tee $5
+ call $~lib/rt/tlsf/searchBlock
+ local.tee $2
+ i32.eqz
+ if
+ local.get $5
+ i32.const 256
+ i32.ge_u
+ if (result i32)
+ local.get $5
+ i32.const 536870910
+ i32.lt_u
+ if (result i32)
+ local.get $5
+ i32.const 1
+ i32.const 27
+ local.get $5
+ i32.clz
+ i32.sub
+ i32.shl
+ i32.add
+ i32.const 1
+ i32.sub
+ else
+ local.get $5
+ end
+ else
+ local.get $5
end
- local.get $3
- local.get $1
+ i32.const 4
+ local.get $4
+ i32.load offset=1568
+ memory.size
+ local.tee $2
i32.const 16
+ i32.shl
+ i32.const 4
i32.sub
- local.tee $5
- i32.eq
+ i32.ne
+ i32.shl
+ i32.add
+ i32.const 65535
+ i32.add
+ i32.const -65536
+ i32.and
+ i32.const 16
+ i32.shr_u
+ local.set $3
+ local.get $2
+ local.get $3
+ local.get $2
+ local.get $3
+ i32.gt_s
+ select
+ memory.grow
+ i32.const 0
+ i32.lt_s
if
local.get $3
- i32.load
- local.set $4
- local.get $5
- local.set $1
+ memory.grow
+ i32.const 0
+ i32.lt_s
+ if
+ unreachable
+ end
end
- else
- local.get $0
- i32.const 1572
- i32.add
- local.get $1
- i32.gt_u
+ local.get $4
+ local.get $2
+ i32.const 16
+ i32.shl
+ memory.size
+ i64.extend_i32_s
+ i64.const 16
+ i64.shl
+ call $~lib/rt/tlsf/addMemory
+ local.get $4
+ local.get $5
+ call $~lib/rt/tlsf/searchBlock
+ local.tee $2
+ i32.eqz
if
i32.const 0
i32.const 1392
- i32.const 402
- i32.const 5
+ i32.const 499
+ i32.const 16
call $~lib/builtins/abort
unreachable
end
end
+ local.get $5
local.get $2
- i32.wrap_i64
- i32.const -16
+ i32.load
+ i32.const -4
i32.and
- local.get $1
- i32.sub
- local.tee $3
- i32.const 20
- i32.lt_u
+ i32.gt_u
if
- return
+ i32.const 0
+ i32.const 1392
+ i32.const 501
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
end
- local.get $1
local.get $4
- i32.const 2
+ local.get $2
+ call $~lib/rt/tlsf/removeBlock
+ local.get $2
+ i32.load
+ local.set $6
+ local.get $5
+ i32.const 4
+ i32.add
+ i32.const 15
i32.and
- local.get $3
- i32.const 8
+ if
+ i32.const 0
+ i32.const 1392
+ i32.const 361
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $6
+ i32.const -4
+ i32.and
+ local.get $5
i32.sub
local.tee $3
- i32.const 1
+ i32.const 16
+ i32.ge_u
+ if
+ local.get $2
+ local.get $5
+ local.get $6
+ i32.const 2
+ i32.and
+ i32.or
+ i32.store
+ local.get $2
+ i32.const 4
+ i32.add
+ local.get $5
+ i32.add
+ local.tee $5
+ local.get $3
+ i32.const 4
+ i32.sub
+ i32.const 1
+ i32.or
+ i32.store
+ local.get $4
+ local.get $5
+ call $~lib/rt/tlsf/insertBlock
+ else
+ local.get $2
+ local.get $6
+ 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 $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
+ local.get $1
+ global.get $~lib/rt/itcms/white
i32.or
+ i32.store offset=4
+ local.get $2
+ local.get $3
+ i32.store offset=8
+ local.get $3
+ local.get $2
+ local.get $3
+ i32.load offset=4
+ i32.const 3
+ i32.and
i32.or
- i32.store
- local.get $1
- i32.const 0
i32.store offset=4
local.get $1
- i32.const 0
+ local.get $2
i32.store offset=8
- local.get $1
+ global.get $~lib/rt/itcms/total
+ local.get $2
+ i32.load
+ i32.const -4
+ i32.and
i32.const 4
i32.add
- local.get $3
i32.add
- local.tee $3
- i32.const 2
- i32.store
- local.get $0
- local.get $3
- i32.store offset=1568
+ global.set $~lib/rt/itcms/total
+ local.get $2
+ i32.const 20
+ i32.add
+ local.tee $1
+ i32.const 0
local.get $0
+ memory.fill
local.get $1
- call $~lib/rt/tlsf/insertBlock
)
- (func $~lib/rt/tlsf/initialize
- (local $0 i32)
- (local $1 i32)
- memory.size
- local.tee $1
- i32.const 0
- i32.le_s
- if (result i32)
- i32.const 1
- local.get $1
- i32.sub
- memory.grow
- i32.const 0
- i32.lt_s
- else
- i32.const 0
+ (func $~lib/rt/__visit_members (param $0 i32)
+ block $invalid
+ block $assignment-chain/B
+ block $assignment-chain/A
+ block $~lib/arraybuffer/ArrayBufferView
+ block $~lib/string/String
+ block $~lib/arraybuffer/ArrayBuffer
+ block $~lib/object/Object
+ local.get $0
+ i32.const 8
+ i32.sub
+ i32.load
+ br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $assignment-chain/A $assignment-chain/B $invalid
+ end
+ return
+ end
+ return
+ end
+ return
+ end
+ local.get $0
+ i32.load
+ call $~lib/rt/itcms/__visit
+ return
+ end
+ return
+ end
+ return
end
+ unreachable
+ )
+ (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
- unreachable
- end
- i32.const 34304
- i32.const 0
- i32.store
- i32.const 35872
- i32.const 0
- i32.store
- loop $for-loop|0
- local.get $0
- i32.const 23
+ local.get $1
+ i32.const 4
+ i32.shr_u
+ local.set $1
+ else
+ local.get $1
+ i32.const 536870910
i32.lt_u
if
- local.get $0
- i32.const 2
+ local.get $1
+ i32.const 1
+ i32.const 27
+ local.get $1
+ i32.clz
+ i32.sub
i32.shl
- i32.const 34304
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 $0
- i32.const 4
- i32.shl
- local.get $1
- i32.add
- i32.const 2
- i32.shl
- i32.const 34304
- 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
+ i32.sub
+ local.set $1
end
- end
- i32.const 34304
- i32.const 35876
- memory.size
- i64.extend_i32_s
- i64.const 16
- i64.shl
- call $~lib/rt/tlsf/addMemory
- i32.const 34304
- global.set $~lib/rt/tlsf/ROOT
- )
- (func $~lib/rt/itcms/step (result i32)
- (local $0 i32)
- (local $1 i32)
- (local $2 i32)
- block $break|0
- block $case2|0
- block $case1|0
- block $case0|0
- global.get $~lib/rt/itcms/state
- br_table $case0|0 $case1|0 $case2|0 $break|0
- end
- i32.const 1
- global.set $~lib/rt/itcms/state
- i32.const 0
- global.set $~lib/rt/itcms/visitCount
- call $~lib/rt/itcms/visitRoots
- global.get $~lib/rt/itcms/toSpace
- global.set $~lib/rt/itcms/iter
- global.get $~lib/rt/itcms/visitCount
- return
- end
- global.get $~lib/rt/itcms/white
- i32.eqz
- local.set $1
- global.get $~lib/rt/itcms/iter
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- loop $while-continue|1
- local.get $0
- global.get $~lib/rt/itcms/toSpace
- i32.ne
- if
- local.get $0
- global.set $~lib/rt/itcms/iter
- local.get $1
- local.get $0
- i32.load offset=4
- local.tee $2
- i32.const 3
- i32.and
- i32.ne
- if
- local.get $0
- local.get $2
- i32.const -4
- i32.and
- local.get $1
- i32.or
- i32.store offset=4
- i32.const 0
- global.set $~lib/rt/itcms/visitCount
- local.get $0
- i32.const 20
- i32.add
- call $~lib/rt/__visit_members
- global.get $~lib/rt/itcms/visitCount
- return
- end
- local.get $0
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- br $while-continue|1
- end
- end
- i32.const 0
- global.set $~lib/rt/itcms/visitCount
- call $~lib/rt/itcms/visitRoots
- global.get $~lib/rt/itcms/toSpace
- global.get $~lib/rt/itcms/iter
- i32.load offset=4
- i32.const -4
- i32.and
- i32.eq
- if
- global.get $~lib/memory/__stack_pointer
- local.set $0
- loop $while-continue|0
- local.get $0
- i32.const 34300
- i32.lt_u
- if
- local.get $0
- i32.load
- call $~lib/rt/itcms/__visit
- local.get $0
- i32.const 4
- i32.add
- local.set $0
- br $while-continue|0
- end
- end
- global.get $~lib/rt/itcms/iter
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- loop $while-continue|2
- local.get $0
- global.get $~lib/rt/itcms/toSpace
- i32.ne
- if
- local.get $1
- local.get $0
- i32.load offset=4
- local.tee $2
- i32.const 3
- i32.and
- i32.ne
- if
- local.get $0
- local.get $2
- i32.const -4
- i32.and
- local.get $1
- i32.or
- i32.store offset=4
- local.get $0
- i32.const 20
- i32.add
- call $~lib/rt/__visit_members
- end
- local.get $0
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- br $while-continue|2
- end
- end
- global.get $~lib/rt/itcms/fromSpace
- local.set $0
- global.get $~lib/rt/itcms/toSpace
- global.set $~lib/rt/itcms/fromSpace
- local.get $0
- global.set $~lib/rt/itcms/toSpace
- local.get $1
- global.set $~lib/rt/itcms/white
- local.get $0
- i32.load offset=4
- i32.const -4
- i32.and
- global.set $~lib/rt/itcms/iter
- i32.const 2
- global.set $~lib/rt/itcms/state
- end
- global.get $~lib/rt/itcms/visitCount
- return
- end
- global.get $~lib/rt/itcms/iter
- local.tee $0
- global.get $~lib/rt/itcms/toSpace
- i32.ne
- if
+ local.get $1
+ i32.const 31
+ local.get $1
+ i32.clz
+ i32.sub
+ local.tee $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
+ local.get $2
+ i32.const 23
+ i32.lt_u
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1392
+ i32.const 334
+ 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
- i32.load offset=4
+ local.get $1
+ i32.ctz
local.tee $1
- i32.const -4
- i32.and
- global.set $~lib/rt/itcms/iter
- global.get $~lib/rt/itcms/white
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=4
+ local.tee $2
i32.eqz
- local.get $1
- i32.const 3
- i32.and
- i32.ne
if
i32.const 0
- i32.const 1120
- i32.const 229
- i32.const 20
+ i32.const 1392
+ i32.const 347
+ i32.const 18
call $~lib/builtins/abort
unreachable
end
local.get $0
- i32.const 34300
- i32.lt_u
- if
- local.get $0
- i32.const 0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=8
- else
- global.get $~lib/rt/itcms/total
- local.get $0
- i32.load
- i32.const -4
- i32.and
- i32.const 4
- i32.add
- i32.sub
- global.set $~lib/rt/itcms/total
- local.get $0
- i32.const 4
- i32.add
- local.tee $0
- i32.const 34300
- i32.ge_u
- if
- global.get $~lib/rt/tlsf/ROOT
- i32.eqz
- if
- call $~lib/rt/tlsf/initialize
- end
- global.get $~lib/rt/tlsf/ROOT
- local.set $1
- 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
- select
- if (result i32)
- i32.const 1
- else
- local.get $2
- i32.load
- i32.const 1
- i32.and
- end
- if
- i32.const 0
- i32.const 1392
- i32.const 562
- i32.const 3
- call $~lib/builtins/abort
- unreachable
- end
- local.get $2
- local.get $2
- i32.load
- i32.const 1
- i32.or
- i32.store
- local.get $1
- local.get $2
- call $~lib/rt/tlsf/insertBlock
- end
- end
- i32.const 10
- return
+ 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
- global.get $~lib/rt/itcms/toSpace
- local.tee $0
- local.get $0
- i32.store offset=4
- local.get $0
- local.get $0
- i32.store offset=8
- i32.const 0
- global.set $~lib/rt/itcms/state
end
- i32.const 0
)
- (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
+ (func $~lib/rt/tlsf/initialize
+ (local $0 i32)
+ (local $1 i32)
+ memory.size
+ local.tee $1
+ i32.const 0
+ i32.le_s
+ if (result i32)
+ i32.const 1
local.get $1
- i32.const 4
- i32.shr_u
- local.set $1
+ i32.sub
+ memory.grow
+ i32.const 0
+ i32.lt_s
else
- local.get $1
- i32.const 536870910
+ i32.const 0
+ end
+ if
+ unreachable
+ end
+ i32.const 34304
+ i32.const 0
+ i32.store
+ i32.const 35872
+ i32.const 0
+ i32.store
+ loop $for-loop|0
+ local.get $0
+ i32.const 23
i32.lt_u
if
- local.get $1
- i32.const 1
- i32.const 27
- local.get $1
- i32.clz
- i32.sub
+ local.get $0
+ i32.const 2
i32.shl
+ i32.const 34304
i32.add
- i32.const 1
- i32.sub
+ 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 $0
+ i32.const 4
+ i32.shl
+ local.get $1
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.const 34304
+ 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
- local.get $1
- i32.const 31
- local.get $1
- i32.clz
- i32.sub
- local.tee $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 34304
+ i32.const 35876
+ memory.size
+ i64.extend_i32_s
+ i64.const 16
+ i64.shl
+ call $~lib/rt/tlsf/addMemory
+ i32.const 34304
+ global.set $~lib/rt/tlsf/ROOT
+ )
+ (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i64)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
local.get $2
- i32.const 23
- i32.lt_u
- i32.and
- i32.eqz
+ local.get $1
+ i64.extend_i32_u
+ i64.lt_u
if
i32.const 0
i32.const 1392
- i32.const 334
+ i32.const 382
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.const 19
+ i32.add
+ i32.const -16
i32.and
- local.tee $1
- if (result i32)
- local.get $0
- local.get $1
- i32.ctz
- local.get $2
+ i32.const 4
+ i32.sub
+ local.set $1
+ local.get $0
+ i32.load offset=1568
+ local.tee $3
+ if
+ local.get $3
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
+ local.get $1
+ i32.gt_u
+ if
+ i32.const 0
+ i32.const 1392
+ i32.const 389
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $3
+ local.get $1
+ i32.const 16
+ i32.sub
+ local.tee $5
+ i32.eq
+ if
+ local.get $3
+ i32.load
+ local.set $4
+ local.get $5
+ local.set $1
+ end
+ else
+ local.get $0
+ i32.const 1572
+ i32.add
+ local.get $1
+ i32.gt_u
+ if
+ i32.const 0
+ i32.const 1392
+ i32.const 402
+ i32.const 5
+ call $~lib/builtins/abort
+ unreachable
+ end
+ end
+ local.get $2
+ i32.wrap_i64
+ i32.const -16
+ i32.and
+ local.get $1
+ i32.sub
+ local.tee $3
+ i32.const 20
+ i32.lt_u
+ if
+ return
+ end
+ local.get $1
+ local.get $4
+ i32.const 2
+ i32.and
+ local.get $3
+ i32.const 8
+ i32.sub
+ local.tee $3
+ 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 $1
+ i32.const 4
+ i32.add
+ local.get $3
+ i32.add
+ local.tee $3
+ i32.const 2
+ i32.store
+ local.get $0
+ local.get $3
+ i32.store offset=1568
+ local.get $0
+ local.get $1
+ call $~lib/rt/tlsf/insertBlock
+ )
+ (func $~lib/rt/itcms/visitRoots
+ (local $0 i32)
+ (local $1 i32)
+ i32.const 1248
+ call $~lib/rt/itcms/__visit
+ i32.const 1056
+ call $~lib/rt/itcms/__visit
+ global.get $~lib/rt/itcms/pinSpace
+ local.tee $1
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ loop $while-continue|0
+ local.get $0
+ local.get $1
+ i32.ne
+ if
+ local.get $0
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.const 3
+ i32.ne
+ if
i32.const 0
- i32.const 1392
- i32.const 347
- i32.const 18
+ i32.const 1120
+ i32.const 160
+ i32.const 16
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.const 20
i32.add
- i32.load offset=96
- else
- i32.const 0
+ call $~lib/rt/__visit_members
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ br $while-continue|0
end
end
)
- (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
- (local $3 i32)
- (local $4 i32)
- (local $5 i32)
- (local $6 i32)
- local.get $0
- i32.const 1073741804
- i32.ge_u
+ (func $~lib/object/Object#constructor (param $0 i32) (result 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 1532
+ i32.lt_s
if
- i32.const 1056
- i32.const 1120
- i32.const 261
- i32.const 31
+ i32.const 34320
+ i32.const 34368
+ 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$69
- 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$69
- 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ local.get $0
i32.eqz
if
- call $~lib/rt/tlsf/initialize
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 0
+ call $~lib/rt/itcms/__new
+ local.tee $0
+ i32.store
end
- global.get $~lib/rt/tlsf/ROOT
- local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
local.get $0
- i32.const 16
+ )
+ (func $assignment-chain/static_setter_assignment_chain
+ global.get $assignment-chain/C._setter_cnt
+ i32.const 1
i32.add
- local.tee $2
- i32.const 1073741820
- i32.gt_u
+ global.set $assignment-chain/C._setter_cnt
+ global.get $assignment-chain/C._setter_cnt
+ i32.const 1
+ i32.add
+ global.set $assignment-chain/C._setter_cnt
+ global.get $assignment-chain/C._setter_cnt
+ i32.const 2
+ i32.ne
if
- i32.const 1056
- i32.const 1392
- i32.const 461
- i32.const 29
+ i32.const 0
+ i32.const 1456
+ i32.const 45
+ i32.const 3
call $~lib/builtins/abort
unreachable
end
- local.get $4
- local.get $2
+ )
+ (func $assignment-chain/setter_assignment_chain
+ (local $0 i32)
+ (local $1 i32)
+ global.get $~lib/memory/__stack_pointer
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
- local.tee $5
- call $~lib/rt/tlsf/searchBlock
- local.tee $2
- i32.eqz
- if
- memory.size
- local.tee $2
- local.get $5
- i32.const 256
- i32.ge_u
- if (result i32)
- local.get $5
- i32.const 536870910
- i32.lt_u
- if (result i32)
- local.get $5
- i32.const 1
- i32.const 27
- local.get $5
- i32.clz
- i32.sub
- i32.shl
- i32.add
- i32.const 1
- i32.sub
- else
- local.get $5
- end
- else
- local.get $5
- end
- i32.const 4
- local.get $4
- i32.load offset=1568
- local.get $2
- i32.const 16
- i32.shl
- i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 1532
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
i32.sub
- i32.ne
- i32.shl
- i32.add
- i32.const 65535
- i32.add
- i32.const -65536
- i32.and
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 1532
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
i32.const 16
- i32.shr_u
- local.tee $3
- local.get $2
- local.get $3
- i32.gt_s
- select
- memory.grow
+ i32.const 5
+ call $~lib/rt/itcms/__new
+ local.tee $1
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ call $~lib/object/Object#constructor
+ local.tee $1
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
i32.const 0
- i32.lt_s
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ f64.const 0
+ f64.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $1
+ call $assignment-chain/B#set:y
+ local.get $1
+ call $assignment-chain/B#set:y
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.load
+ i32.const 2
+ i32.ne
if
- local.get $3
- memory.grow
i32.const 0
- i32.lt_s
- if
- unreachable
- end
+ i32.const 1456
+ i32.const 30
+ i32.const 3
+ call $~lib/builtins/abort
+ unreachable
end
- local.get $4
- local.get $2
- i32.const 16
- i32.shl
- memory.size
- i64.extend_i32_s
- i64.const 16
- i64.shl
- call $~lib/rt/tlsf/addMemory
- local.get $4
- local.get $5
- call $~lib/rt/tlsf/searchBlock
- local.tee $2
- i32.eqz
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.load offset=4
if
i32.const 0
- i32.const 1392
- i32.const 499
- i32.const 16
+ i32.const 1456
+ i32.const 31
+ 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
- local.get $5
- local.get $2
- i32.load
- i32.const -4
- i32.and
- i32.gt_u
- if
- i32.const 0
- i32.const 1392
- i32.const 501
- i32.const 14
- call $~lib/builtins/abort
- unreachable
- end
- local.get $4
- local.get $2
- call $~lib/rt/tlsf/removeBlock
- local.get $2
- i32.load
- local.set $6
- local.get $5
- i32.const 4
- i32.add
- i32.const 15
- i32.and
- if
- i32.const 0
- i32.const 1392
- i32.const 361
- i32.const 14
- call $~lib/builtins/abort
- unreachable
- end
- local.get $6
- i32.const -4
- i32.and
- local.get $5
+ i32.const 34320
+ i32.const 34368
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $assignment-chain/normal_assignment_chain
+ (local $0 i32)
+ (local $1 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
i32.sub
- local.tee $3
- i32.const 16
- i32.ge_u
- if
- local.get $2
- local.get $5
- local.get $6
- i32.const 2
- i32.and
- i32.or
- i32.store
- local.get $2
- i32.const 4
- i32.add
- local.get $5
- i32.add
- local.tee $5
- local.get $3
- i32.const 4
- i32.sub
- i32.const 1
- i32.or
- i32.store
- local.get $4
- local.get $5
- call $~lib/rt/tlsf/insertBlock
- else
- local.get $2
- local.get $6
- 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 $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
- local.get $1
- global.get $~lib/rt/itcms/white
- i32.or
- i32.store offset=4
- local.get $2
- local.get $3
- i32.store offset=8
- local.get $3
- local.get $2
- local.get $3
- i32.load offset=4
- i32.const 3
- i32.and
- 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
- memory.fill
- local.get $1
- )
- (func $assignment-chain/static_setter_assignment_chain
- global.get $assignment-chain/C._setter_cnt
- i32.const 1
- i32.add
- global.set $assignment-chain/C._setter_cnt
- global.get $assignment-chain/C._setter_cnt
- i32.const 1
- i32.add
- global.set $assignment-chain/C._setter_cnt
- global.get $assignment-chain/C._setter_cnt
- i32.const 2
- i32.ne
- if
- i32.const 0
- i32.const 1456
- i32.const 45
- i32.const 3
- call $~lib/builtins/abort
- unreachable
- end
- )
- (func $~lib/rt/__visit_members (param $0 i32)
- block $invalid
- block $assignment-chain/B
- block $assignment-chain/A
- block $~lib/arraybuffer/ArrayBufferView
- block $~lib/string/String
- block $~lib/arraybuffer/ArrayBuffer
- block $~lib/object/Object
- local.get $0
- i32.const 8
- i32.sub
- i32.load
- br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $assignment-chain/A $assignment-chain/B $invalid
- end
- return
- end
- return
- end
- return
- end
- local.get $0
- i32.load
- local.tee $0
- if
- local.get $0
- call $~lib/rt/itcms/__visit
- end
- return
- end
- return
- end
- return
- end
- unreachable
- )
- (func $~start
- memory.size
- i32.const 16
- i32.shl
- i32.const 34300
- i32.sub
- i32.const 1
- i32.shr_u
- global.set $~lib/rt/itcms/threshold
- i32.const 1172
- i32.const 1168
- i32.store
- i32.const 1176
- i32.const 1168
- i32.store
- i32.const 1168
- global.set $~lib/rt/itcms/pinSpace
- i32.const 1204
- i32.const 1200
- i32.store
- i32.const 1208
- i32.const 1200
- i32.store
- i32.const 1200
- global.set $~lib/rt/itcms/toSpace
- i32.const 1348
- i32.const 1344
- i32.store
- i32.const 1352
- i32.const 1344
- i32.store
- i32.const 1344
- global.set $~lib/rt/itcms/fromSpace
- call $assignment-chain/normal_assignment_chain
- call $assignment-chain/setter_assignment_chain
- call $assignment-chain/static_setter_assignment_chain
- )
- (func $assignment-chain/normal_assignment_chain
- (local $0 i32)
- (local $1 i32)
- (local $2 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 1532
- 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 8
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 1532
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
@@ -1653,21 +1498,19 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
i64.const 0
i64.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
i32.const 16
i32.const 4
call $~lib/rt/itcms/__new
- local.tee $2
+ local.tee $1
i32.store
global.get $~lib/memory/__stack_pointer
- local.tee $1
- local.get $2
+ local.get $1
i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
local.get $1
- local.get $2
call $~lib/object/Object#constructor
local.tee $1
i32.store
@@ -1687,7 +1530,6 @@
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
local.get $1
i32.store
global.get $~lib/memory/__stack_pointer
@@ -1716,7 +1558,6 @@
unreachable
)
(func $assignment-chain/B#set:y (param $0 i32)
- (local $1 i32)
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
@@ -1733,13 +1574,12 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $1
i64.const 0
i64.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store offset=4
local.get $0
@@ -1748,175 +1588,312 @@
i32.const 1
i32.add
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
f64.const 1
f64.store offset=8
- local.get $1
+ global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
)
- (func $assignment-chain/setter_assignment_chain
+ (func $~start
+ memory.size
+ i32.const 16
+ i32.shl
+ i32.const 34300
+ i32.sub
+ i32.const 1
+ i32.shr_u
+ global.set $~lib/rt/itcms/threshold
+ i32.const 1172
+ i32.const 1168
+ i32.store
+ i32.const 1176
+ i32.const 1168
+ i32.store
+ i32.const 1168
+ global.set $~lib/rt/itcms/pinSpace
+ i32.const 1204
+ i32.const 1200
+ i32.store
+ i32.const 1208
+ i32.const 1200
+ i32.store
+ i32.const 1200
+ global.set $~lib/rt/itcms/toSpace
+ i32.const 1348
+ i32.const 1344
+ i32.store
+ i32.const 1352
+ i32.const 1344
+ i32.store
+ i32.const 1344
+ global.set $~lib/rt/itcms/fromSpace
+ call $assignment-chain/normal_assignment_chain
+ call $assignment-chain/setter_assignment_chain
+ call $assignment-chain/static_setter_assignment_chain
+ )
+ (func $~lib/rt/itcms/step (result i32)
(local $0 i32)
(local $1 i32)
(local $2 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 1532
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
+ block $break|0
+ block $case2|0
+ block $case1|0
+ block $case0|0
+ global.get $~lib/rt/itcms/state
+ br_table $case0|0 $case1|0 $case2|0 $break|0
+ end
+ i32.const 1
+ global.set $~lib/rt/itcms/state
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ call $~lib/rt/itcms/visitRoots
+ global.get $~lib/rt/itcms/toSpace
+ global.set $~lib/rt/itcms/iter
+ global.get $~lib/rt/itcms/visitCount
+ return
+ end
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ local.set $1
+ global.get $~lib/rt/itcms/iter
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ loop $while-continue|1
+ local.get $0
+ global.get $~lib/rt/itcms/toSpace
+ i32.ne
+ if
+ local.get $0
+ global.set $~lib/rt/itcms/iter
+ local.get $1
+ local.get $0
+ i32.load offset=4
+ local.tee $2
+ i32.const 3
+ i32.and
+ i32.ne
+ if
+ local.get $0
+ local.get $2
+ i32.const -4
+ i32.and
+ local.get $1
+ i32.or
+ i32.store offset=4
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ local.get $0
+ i32.const 20
+ i32.add
+ call $~lib/rt/__visit_members
+ global.get $~lib/rt/itcms/visitCount
+ return
+ end
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ br $while-continue|1
+ end
+ end
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ call $~lib/rt/itcms/visitRoots
+ global.get $~lib/rt/itcms/toSpace
+ global.get $~lib/rt/itcms/iter
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ i32.eq
+ if
+ global.get $~lib/memory/__stack_pointer
+ local.set $0
+ loop $while-continue|0
+ local.get $0
+ i32.const 34300
+ i32.lt_u
+ if
+ local.get $0
+ i32.load
+ call $~lib/rt/itcms/__visit
+ local.get $0
+ i32.const 4
+ i32.add
+ local.set $0
+ br $while-continue|0
+ end
+ end
+ global.get $~lib/rt/itcms/iter
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ loop $while-continue|2
+ local.get $0
+ global.get $~lib/rt/itcms/toSpace
+ i32.ne
+ if
+ local.get $1
+ local.get $0
+ i32.load offset=4
+ local.tee $2
+ i32.const 3
+ i32.and
+ i32.ne
+ if
+ local.get $0
+ local.get $2
+ i32.const -4
+ i32.and
+ local.get $1
+ i32.or
+ i32.store offset=4
+ local.get $0
+ i32.const 20
+ i32.add
+ call $~lib/rt/__visit_members
+ end
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ br $while-continue|2
+ end
+ end
+ global.get $~lib/rt/itcms/fromSpace
+ local.set $0
+ global.get $~lib/rt/itcms/toSpace
+ global.set $~lib/rt/itcms/fromSpace
+ local.get $0
+ global.set $~lib/rt/itcms/toSpace
+ local.get $1
+ global.set $~lib/rt/itcms/white
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ global.set $~lib/rt/itcms/iter
+ i32.const 2
+ global.set $~lib/rt/itcms/state
+ end
+ global.get $~lib/rt/itcms/visitCount
+ return
+ end
+ global.get $~lib/rt/itcms/iter
local.tee $0
- i64.const 0
- i64.store
- local.get $0
- i32.const 0
- i32.store offset=8
- local.get $0
- i32.const 8
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 1532
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $1
- i64.const 0
- i64.store
- local.get $1
- i32.const 16
- i32.const 5
- call $~lib/rt/itcms/__new
- local.tee $2
- i32.store
- global.get $~lib/memory/__stack_pointer
- local.tee $1
- local.get $2
- i32.store offset=4
- local.get $1
- local.get $2
- call $~lib/object/Object#constructor
- local.tee $1
- i32.store
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store offset=4
- local.get $1
- i32.const 0
- i32.store
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store offset=4
- local.get $1
- i32.const 0
- i32.store offset=4
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store offset=4
- local.get $1
- f64.const 0
- f64.store offset=8
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $0
- local.get $1
- i32.store
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store offset=4
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store offset=8
- local.get $1
- call $assignment-chain/B#set:y
- local.get $1
- call $assignment-chain/B#set:y
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store offset=4
- local.get $1
- i32.load
- i32.const 2
+ global.get $~lib/rt/itcms/toSpace
i32.ne
if
- i32.const 0
- i32.const 1456
- i32.const 30
+ local.get $0
+ i32.load offset=4
+ local.tee $1
+ i32.const -4
+ i32.and
+ global.set $~lib/rt/itcms/iter
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ local.get $1
i32.const 3
- call $~lib/builtins/abort
- unreachable
+ i32.and
+ i32.ne
+ if
+ i32.const 0
+ i32.const 1120
+ i32.const 229
+ i32.const 20
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ i32.const 34300
+ i32.lt_u
+ if
+ local.get $0
+ i32.const 0
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ i32.store offset=8
+ else
+ global.get $~lib/rt/itcms/total
+ local.get $0
+ i32.load
+ i32.const -4
+ i32.and
+ i32.const 4
+ i32.add
+ i32.sub
+ global.set $~lib/rt/itcms/total
+ local.get $0
+ i32.const 4
+ i32.add
+ local.tee $0
+ i32.const 34300
+ i32.ge_u
+ if
+ 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 4
+ i32.sub
+ local.set $2
+ 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
+ i32.const 1
+ i32.and
+ end
+ if
+ i32.const 0
+ i32.const 1392
+ i32.const 562
+ i32.const 3
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $2
+ local.get $2
+ i32.load
+ i32.const 1
+ i32.or
+ i32.store
+ local.get $2
+ call $~lib/rt/tlsf/insertBlock
+ end
+ end
+ i32.const 10
+ return
end
- global.get $~lib/memory/__stack_pointer
- local.get $1
+ global.get $~lib/rt/itcms/toSpace
+ global.get $~lib/rt/itcms/toSpace
i32.store offset=4
- local.get $1
- i32.load offset=4
- if
- i32.const 0
- i32.const 1456
- i32.const 31
- 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 34320
- i32.const 34368
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
- )
- (func $~lib/object/Object#constructor (param $0 i32) (result i32)
- (local $1 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 1532
- i32.lt_s
- if
- i32.const 34320
- i32.const 34368
- 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.store
- local.get $0
- i32.eqz
- if
- local.get $1
- i32.const 0
+ global.get $~lib/rt/itcms/toSpace
+ global.get $~lib/rt/itcms/toSpace
+ i32.store offset=8
i32.const 0
- call $~lib/rt/itcms/__new
- local.tee $0
- i32.store
+ global.set $~lib/rt/itcms/state
end
- global.get $~lib/memory/__stack_pointer
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $0
+ i32.const 0
)
)
diff --git a/tests/compiler/bigint-integration.release.wat b/tests/compiler/bigint-integration.release.wat
index 65f0bbea0b..6702bb5684 100644
--- a/tests/compiler/bigint-integration.release.wat
+++ b/tests/compiler/bigint-integration.release.wat
@@ -14,9 +14,6 @@
(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
@@ -47,4 +44,7 @@
unreachable
end
)
+ (func $bigint-integration/getInternalValue (result i64)
+ i64.const 9007199254740991
+ )
)
diff --git a/tests/compiler/bindings/esm.debug.js b/tests/compiler/bindings/esm.debug.js
index d2d89456b8..e1a514ba47 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), imports.env || {}, {
+ env: Object.setPrototypeOf({
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);
@@ -44,7 +44,7 @@ async function instantiate(module, imports = {}) {
throw Error(`${message} in ${fileName}:${lineNumber}:${columnNumber}`);
})();
},
- }),
+ }, Object.assign(Object.create(globalThis), imports.env || {})),
};
const { exports } = await WebAssembly.instantiate(module, adaptedImports);
const memory = exports.memory || imports.env.memory;
@@ -553,8 +553,9 @@ export const {
fn,
} = await (async url => instantiate(
await (async () => {
- try { return await globalThis.WebAssembly.compileStreaming(globalThis.fetch(url)); }
- catch { return globalThis.WebAssembly.compile(await (await import("node:fs/promises")).readFile(url)); }
+ const isNodeOrBun = typeof process != "undefined" && process.versions != null && (process.versions.node != null || process.versions.bun != null);
+ if (isNodeOrBun) { return globalThis.WebAssembly.compile(await (await import("node:fs/promises")).readFile(url)); }
+ else { return await globalThis.WebAssembly.compileStreaming(globalThis.fetch(url)); }
})(), {
}
))(new URL("esm.debug.wasm", import.meta.url));
diff --git a/tests/compiler/bindings/esm.debug.wat b/tests/compiler/bindings/esm.debug.wat
index cebadb0ee0..a6850592f3 100644
--- a/tests/compiler/bindings/esm.debug.wat
+++ b/tests/compiler/bindings/esm.debug.wat
@@ -124,6 +124,27 @@
(export "functionFunction" (func $export:bindings/esm/functionFunction))
(func $start:bindings/esm~anonymous|0
)
+ (func $start:bindings/esm
+ i32.const 128
+ i32.const 1
+ f64.const 42
+ f64.const 0
+ f64.const 0
+ f64.const 0
+ f64.const 0
+ call $~lib/builtins/trace
+ i32.const 160
+ 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
+ drop
+ call $bindings/esm/Date_getTimezoneOffset
+ drop
+ )
(func $bindings/esm/plainFunction (param $a i32) (param $b i32) (result i32)
local.get $a
local.get $b
@@ -1734,14 +1755,17 @@
if
i32.const 0
drop
+ i32.const 200
+ i32.const 100
+ i32.rem_u
+ i32.const 0
+ i32.eq
+ drop
global.get $~lib/rt/itcms/total
- i64.extend_i32_u
i32.const 200
- i64.extend_i32_u
- i64.mul
- i64.const 100
- i64.div_u
- i32.wrap_i64
+ i32.const 100
+ i32.div_u
+ i32.mul
i32.const 1024
i32.add
global.set $~lib/rt/itcms/threshold
@@ -2874,12 +2898,8 @@
call $~lib/object/Object~visit
local.get $0
i32.load
- local.tee $2
- if
- local.get $2
- local.get $1
- call $~lib/rt/itcms/__visit
- end
+ local.get $1
+ call $~lib/rt/itcms/__visit
)
(func $~lib/object/Object~visit (param $0 i32) (param $1 i32)
)
@@ -2941,28 +2961,16 @@
call $~lib/object/Object~visit
local.get $0
i32.load offset=56
- local.tee $2
- if
- local.get $2
- local.get $1
- call $~lib/rt/itcms/__visit
- end
+ local.get $1
+ call $~lib/rt/itcms/__visit
local.get $0
i32.load offset=60
- local.tee $2
- if
- local.get $2
- local.get $1
- call $~lib/rt/itcms/__visit
- end
+ local.get $1
+ call $~lib/rt/itcms/__visit
local.get $0
i32.load offset=64
- local.tee $2
- if
- local.get $2
- local.get $1
- call $~lib/rt/itcms/__visit
- end
+ local.get $1
+ call $~lib/rt/itcms/__visit
)
(func $~lib/typedarray/Uint8Array~visit (param $0 i32) (param $1 i32)
local.get $0
@@ -3097,50 +3105,6 @@
unreachable
end
)
- (func $start:bindings/esm
- (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
- i32.const 128
- local.set $0
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store
- local.get $0
- i32.const 1
- f64.const 42
- f64.const 0
- f64.const 0
- f64.const 0
- f64.const 0
- call $~lib/builtins/trace
- i32.const 160
- local.set $0
- global.get $~lib/memory/__stack_pointer
- local.get $0
- 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
- drop
- call $bindings/esm/Date_getTimezoneOffset
- drop
- global.get $~lib/memory/__stack_pointer
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- )
(func $bindings/esm/bufferFunction (param $a i32) (param $b i32) (result i32)
(local $aByteLength i32)
(local $bByteLength i32)
diff --git a/tests/compiler/bindings/esm.release.js b/tests/compiler/bindings/esm.release.js
index 30c529402d..4f91c23e94 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), imports.env || {}, {
+ env: Object.setPrototypeOf({
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);
@@ -44,7 +44,7 @@ async function instantiate(module, imports = {}) {
throw Error(`${message} in ${fileName}:${lineNumber}:${columnNumber}`);
})();
},
- }),
+ }, Object.assign(Object.create(globalThis), imports.env || {})),
};
const { exports } = await WebAssembly.instantiate(module, adaptedImports);
const memory = exports.memory || imports.env.memory;
@@ -553,8 +553,9 @@ export const {
fn,
} = await (async url => instantiate(
await (async () => {
- try { return await globalThis.WebAssembly.compileStreaming(globalThis.fetch(url)); }
- catch { return globalThis.WebAssembly.compile(await (await import("node:fs/promises")).readFile(url)); }
+ const isNodeOrBun = typeof process != "undefined" && process.versions != null && (process.versions.node != null || process.versions.bun != null);
+ if (isNodeOrBun) { return globalThis.WebAssembly.compile(await (await import("node:fs/promises")).readFile(url)); }
+ else { return await globalThis.WebAssembly.compileStreaming(globalThis.fetch(url)); }
})(), {
}
))(new URL("esm.release.wasm", import.meta.url));
diff --git a/tests/compiler/bindings/esm.release.wat b/tests/compiler/bindings/esm.release.wat
index b99d7d1e01..4fa9022ad2 100644
--- a/tests/compiler/bindings/esm.release.wat
+++ b/tests/compiler/bindings/esm.release.wat
@@ -2,22 +2,22 @@
(type $0 (func (param i32 i32) (result i32)))
(type $1 (func (param i32)))
(type $2 (func (param i32) (result i32)))
- (type $3 (func (result i32)))
- (type $4 (func))
- (type $5 (func (param i32 i32 i32)))
+ (type $3 (func (param i32 i32 i32)))
+ (type $4 (func (result i32)))
+ (type $5 (func))
(type $6 (func (param i32 i32)))
(type $7 (func (param i32 i32 i64)))
- (type $8 (func (param i32 i32 f64 f64 f64 f64 f64)))
- (type $9 (func (param f64) (result f64)))
- (type $10 (func (param i64 i64) (result i64)))
- (type $11 (func (result i64)))
- (type $12 (func (param i32 i32 i32 i32)))
+ (type $8 (func (param i32 i32 i32 i32)))
+ (type $9 (func (param i32 i32 f64 f64 f64 f64 f64)))
+ (type $10 (func (param f64) (result f64)))
+ (type $11 (func (param i64 i64) (result i64)))
+ (type $12 (func (result i64)))
(import "env" "Math.E" (global $~lib/bindings/dom/Math.E f64))
+ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 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" "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))
(global $bindings/esm/plainMutableGlobal (mut i32) (i32.const 2))
(global $bindings/esm/stringGlobal i32 (i32.const 1056))
@@ -120,218 +120,6 @@
(export "objectFunction" (func $export:bindings/esm/objectFunction))
(export "internrefFunction" (func $export:bindings/esm/internrefFunction))
(export "functionFunction" (func $export:bindings/esm/staticarrayU16))
- (func $bindings/esm/plainFunction (param $0 i32) (param $1 i32) (result i32)
- local.get $0
- local.get $1
- i32.add
- )
- (func $bindings/esm/plainFunction64 (param $0 i64) (param $1 i64) (result i64)
- local.get $0
- local.get $1
- i64.add
- )
- (func $bindings/esm/getMaxUnsigned32 (result i32)
- i32.const -1
- )
- (func $bindings/esm/getMaxUnsigned64 (result i64)
- i64.const -1
- )
- (func $~lib/rt/itcms/visitRoots
- (local $0 i32)
- (local $1 i32)
- i32.const 1056
- call $~lib/rt/itcms/__visit
- global.get $bindings/esm/mutableStringGlobal
- local.tee $0
- if
- local.get $0
- call $~lib/rt/itcms/__visit
- end
- i32.const 1552
- call $~lib/rt/itcms/__visit
- i32.const 1248
- call $~lib/rt/itcms/__visit
- i32.const 1968
- call $~lib/rt/itcms/__visit
- i32.const 1360
- call $~lib/rt/itcms/__visit
- i32.const 2096
- call $~lib/rt/itcms/__visit
- i32.const 2160
- call $~lib/rt/itcms/__visit
- global.get $~lib/rt/itcms/pinSpace
- local.tee $1
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- loop $while-continue|0
- local.get $0
- local.get $1
- i32.ne
- if
- local.get $0
- i32.load offset=4
- i32.const 3
- i32.and
- i32.const 3
- i32.ne
- if
- i32.const 0
- i32.const 1424
- i32.const 160
- i32.const 16
- call $~lib/builtins/abort
- unreachable
- end
- local.get $0
- i32.const 20
- i32.add
- call $~lib/rt/__visit_members
- local.get $0
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- br $while-continue|0
- end
- end
- )
- (func $~lib/rt/itcms/Object#unlink (param $0 i32)
- (local $1 i32)
- local.get $0
- i32.load offset=4
- i32.const -4
- i32.and
- local.tee $1
- i32.eqz
- if
- local.get $0
- i32.load offset=8
- i32.eqz
- local.get $0
- i32.const 35044
- i32.lt_u
- i32.and
- i32.eqz
- if
- i32.const 0
- i32.const 1424
- i32.const 128
- i32.const 18
- call $~lib/builtins/abort
- unreachable
- end
- return
- end
- local.get $0
- i32.load offset=8
- local.tee $0
- i32.eqz
- if
- i32.const 0
- i32.const 1424
- i32.const 132
- i32.const 16
- call $~lib/builtins/abort
- unreachable
- end
- local.get $1
- local.get $0
- i32.store offset=8
- local.get $0
- local.get $1
- local.get $0
- i32.load offset=4
- i32.const 3
- i32.and
- i32.or
- i32.store offset=4
- )
- (func $~lib/rt/itcms/Object#makeGray (param $0 i32)
- (local $1 i32)
- (local $2 i32)
- (local $3 i32)
- local.get $0
- global.get $~lib/rt/itcms/iter
- i32.eq
- if
- local.get $0
- i32.load offset=8
- local.tee $1
- i32.eqz
- if
- i32.const 0
- i32.const 1424
- i32.const 148
- i32.const 30
- call $~lib/builtins/abort
- unreachable
- end
- local.get $1
- global.set $~lib/rt/itcms/iter
- end
- local.get $0
- call $~lib/rt/itcms/Object#unlink
- global.get $~lib/rt/itcms/toSpace
- local.set $1
- local.get $0
- i32.load offset=12
- local.tee $2
- i32.const 2
- i32.le_u
- if (result i32)
- i32.const 1
- else
- local.get $2
- i32.const 2208
- i32.load
- i32.gt_u
- if
- i32.const 1552
- i32.const 1616
- i32.const 21
- i32.const 28
- call $~lib/builtins/abort
- unreachable
- end
- local.get $2
- i32.const 2
- i32.shl
- i32.const 2212
- i32.add
- i32.load
- i32.const 32
- i32.and
- end
- local.set $3
- local.get $1
- i32.load offset=8
- local.set $2
- local.get $0
- global.get $~lib/rt/itcms/white
- i32.eqz
- i32.const 2
- local.get $3
- select
- local.get $1
- i32.or
- i32.store offset=4
- local.get $0
- local.get $2
- i32.store offset=8
- local.get $2
- local.get $0
- local.get $2
- i32.load offset=4
- i32.const 3
- i32.and
- i32.or
- i32.store offset=4
- local.get $1
- local.get $0
- i32.store offset=8
- )
(func $~lib/rt/itcms/__visit (param $0 i32)
local.get $0
i32.eqz
@@ -356,591 +144,407 @@
global.set $~lib/rt/itcms/visitCount
end
)
- (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32)
+ (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
- local.get $1
- i32.load
- local.tee $3
- i32.const 1
- i32.and
- i32.eqz
+ (local $6 i32)
+ local.get $0
+ i32.const 1073741804
+ i32.ge_u
if
- i32.const 0
- i32.const 1696
- i32.const 268
- i32.const 14
+ i32.const 1360
+ i32.const 1424
+ i32.const 261
+ i32.const 31
call $~lib/builtins/abort
unreachable
end
- local.get $3
- i32.const -4
- i32.and
- local.tee $3
- i32.const 12
- i32.lt_u
+ global.get $~lib/rt/itcms/total
+ global.get $~lib/rt/itcms/threshold
+ i32.ge_u
if
- i32.const 0
- i32.const 1696
- i32.const 270
- i32.const 14
- call $~lib/builtins/abort
- unreachable
- end
- local.get $3
- i32.const 256
- i32.lt_u
- if (result i32)
- local.get $3
- i32.const 4
- i32.shr_u
- else
- i32.const 31
- i32.const 1073741820
- local.get $3
- local.get $3
- i32.const 1073741820
- i32.ge_u
- select
- local.tee $3
- i32.clz
- i32.sub
- 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
+ block $__inlined_func$~lib/rt/itcms/interrupt$70
+ 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
+ i32.const 1
+ i32.shl
+ i32.const 1024
+ i32.add
+ global.set $~lib/rt/itcms/threshold
+ br $__inlined_func$~lib/rt/itcms/interrupt$70
+ end
+ local.get $2
+ i32.const 0
+ i32.gt_s
+ br_if $do-loop|0
+ end
+ global.get $~lib/rt/itcms/total
+ global.get $~lib/rt/itcms/total
+ 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
- local.tee $3
- i32.const 16
- i32.lt_u
- local.get $2
- i32.const 23
- i32.lt_u
- i32.and
+ global.get $~lib/rt/tlsf/ROOT
i32.eqz
if
- i32.const 0
+ call $~lib/rt/tlsf/initialize
+ end
+ global.get $~lib/rt/tlsf/ROOT
+ local.set $4
+ local.get $0
+ i32.const 16
+ i32.add
+ local.tee $2
+ i32.const 1073741820
+ i32.gt_u
+ if
+ i32.const 1360
i32.const 1696
- i32.const 284
- i32.const 14
+ i32.const 461
+ i32.const 29
call $~lib/builtins/abort
unreachable
end
- local.get $1
- i32.load offset=8
- local.set $5
- local.get $1
- i32.load offset=4
- local.tee $4
- if
- local.get $4
- local.get $5
- i32.store offset=8
+ local.get $4
+ 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
- local.get $5
+ local.tee $5
+ call $~lib/rt/tlsf/searchBlock
+ local.tee $2
+ i32.eqz
if
local.get $5
+ i32.const 256
+ i32.ge_u
+ if (result i32)
+ local.get $5
+ i32.const 536870910
+ i32.lt_u
+ if (result i32)
+ local.get $5
+ i32.const 1
+ i32.const 27
+ local.get $5
+ i32.clz
+ i32.sub
+ i32.shl
+ i32.add
+ i32.const 1
+ i32.sub
+ else
+ local.get $5
+ end
+ else
+ local.get $5
+ end
+ i32.const 4
local.get $4
- i32.store offset=4
- end
- local.get $1
- local.get $0
- local.get $2
- i32.const 4
- i32.shl
- local.get $3
- i32.add
- i32.const 2
- i32.shl
- i32.add
- local.tee $1
- i32.load offset=96
- i32.eq
- if
- local.get $1
- local.get $5
- i32.store offset=96
- local.get $5
- i32.eqz
+ i32.load offset=1568
+ memory.size
+ local.tee $2
+ i32.const 16
+ i32.shl
+ i32.const 4
+ i32.sub
+ i32.ne
+ i32.shl
+ i32.add
+ i32.const 65535
+ i32.add
+ i32.const -65536
+ i32.and
+ i32.const 16
+ i32.shr_u
+ local.set $3
+ local.get $2
+ local.get $3
+ local.get $2
+ local.get $3
+ i32.gt_s
+ select
+ memory.grow
+ i32.const 0
+ i32.lt_s
if
- local.get $0
- local.get $2
- i32.const 2
- i32.shl
- i32.add
- local.tee $1
- i32.load offset=4
- i32.const -2
- local.get $3
- i32.rotl
- i32.and
- local.set $3
- local.get $1
local.get $3
- i32.store offset=4
- local.get $3
- i32.eqz
+ memory.grow
+ i32.const 0
+ i32.lt_s
if
- local.get $0
- local.get $0
- i32.load
- i32.const -2
- local.get $2
- i32.rotl
- i32.and
- i32.store
+ unreachable
end
end
+ local.get $4
+ local.get $2
+ i32.const 16
+ i32.shl
+ memory.size
+ i64.extend_i32_s
+ i64.const 16
+ i64.shl
+ call $~lib/rt/tlsf/addMemory
+ local.get $4
+ local.get $5
+ call $~lib/rt/tlsf/searchBlock
+ local.tee $2
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1696
+ i32.const 499
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ 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.get $1
- i32.eqz
+ local.get $5
+ local.get $2
+ i32.load
+ i32.const -4
+ i32.and
+ i32.gt_u
if
i32.const 0
i32.const 1696
- i32.const 201
+ i32.const 501
i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $1
+ local.get $4
+ local.get $2
+ call $~lib/rt/tlsf/removeBlock
+ local.get $2
i32.load
- local.tee $3
- i32.const 1
+ local.set $6
+ local.get $5
+ i32.const 4
+ i32.add
+ i32.const 15
i32.and
- i32.eqz
if
i32.const 0
i32.const 1696
- i32.const 203
+ i32.const 361
i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $1
- i32.const 4
- i32.add
- local.get $1
- i32.load
+ local.get $6
i32.const -4
i32.and
- i32.add
- local.tee $4
- i32.load
- local.tee $2
- i32.const 1
- i32.and
+ local.get $5
+ i32.sub
+ local.tee $3
+ i32.const 16
+ i32.ge_u
if
- local.get $0
- local.get $4
- call $~lib/rt/tlsf/removeBlock
- local.get $1
- local.get $3
- i32.const 4
- i32.add
local.get $2
- i32.const -4
+ local.get $5
+ local.get $6
+ i32.const 2
i32.and
- i32.add
- local.tee $3
+ i32.or
i32.store
- local.get $1
+ local.get $2
i32.const 4
i32.add
- local.get $1
- i32.load
- i32.const -4
- i32.and
+ local.get $5
i32.add
- local.tee $4
- i32.load
- local.set $2
- end
- local.get $3
- i32.const 2
- i32.and
- if
- local.get $1
+ local.tee $5
+ local.get $3
i32.const 4
i32.sub
- i32.load
- local.tee $1
- i32.load
- local.tee $6
i32.const 1
- i32.and
- i32.eqz
- if
- i32.const 0
- i32.const 1696
- i32.const 221
- i32.const 16
- call $~lib/builtins/abort
- unreachable
- end
- local.get $0
- local.get $1
- call $~lib/rt/tlsf/removeBlock
- local.get $1
+ i32.or
+ i32.store
+ local.get $4
+ local.get $5
+ call $~lib/rt/tlsf/insertBlock
+ else
+ local.get $2
local.get $6
+ i32.const -2
+ i32.and
+ i32.store
+ local.get $2
i32.const 4
i32.add
- local.get $3
+ 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 $4
local.get $2
- i32.const 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
+ local.get $1
+ global.get $~lib/rt/itcms/white
i32.or
- i32.store
+ i32.store offset=4
+ local.get $2
local.get $3
- i32.const -4
+ i32.store offset=8
+ local.get $3
+ local.get $2
+ local.get $3
+ i32.load offset=4
+ i32.const 3
i32.and
- local.tee $2
- i32.const 12
- i32.lt_u
- if
- i32.const 0
- i32.const 1696
- i32.const 233
- i32.const 14
- call $~lib/builtins/abort
- unreachable
- end
- local.get $4
+ 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
- i32.ne
+ local.tee $1
+ i32.const 0
+ local.get $0
+ memory.fill
+ local.get $1
+ )
+ (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
+ local.get $1
+ i32.eqz
+ if
+ return
+ end
+ local.get $0
+ i32.eqz
if
i32.const 0
- i32.const 1696
- i32.const 234
+ i32.const 1424
+ i32.const 295
i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $4
- i32.const 4
- i32.sub
+ global.get $~lib/rt/itcms/white
local.get $1
- i32.store
- local.get $2
- i32.const 256
- i32.lt_u
- if (result i32)
- local.get $2
- i32.const 4
- i32.shr_u
- else
- i32.const 31
- i32.const 1073741820
- local.get $2
- local.get $2
- i32.const 1073741820
- i32.ge_u
- select
- local.tee $2
- i32.clz
+ 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
+ local.tee $0
+ i32.load offset=4
+ i32.const 3
+ i32.and
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
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ i32.eq
+ if
+ local.get $0
+ local.get $1
+ local.get $2
+ select
+ call $~lib/rt/itcms/Object#makeGray
+ else
+ global.get $~lib/rt/itcms/state
+ i32.const 1
+ i32.eq
+ local.get $3
+ i32.const 3
+ i32.eq
+ i32.and
+ if
+ local.get $1
+ call $~lib/rt/itcms/Object#makeGray
+ end
+ end
end
- local.tee $2
- i32.const 16
- i32.lt_u
- local.get $5
- i32.const 23
- i32.lt_u
- i32.and
- i32.eqz
+ )
+ (func $~lib/array/Array#get:length (param $0 i32) (result 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 2276
+ i32.lt_s
if
- i32.const 0
- i32.const 1696
- i32.const 251
- i32.const 14
+ i32.const 35072
+ i32.const 35120
+ i32.const 1
+ i32.const 1
call $~lib/builtins/abort
unreachable
end
- local.get $0
- local.get $5
- i32.const 4
- i32.shl
- local.get $2
- i32.add
- i32.const 2
- i32.shl
- i32.add
- i32.load offset=96
- local.set $3
- local.get $1
+ global.get $~lib/memory/__stack_pointer
i32.const 0
- i32.store offset=4
- local.get $1
- local.get $3
- i32.store offset=8
- local.get $3
- if
- local.get $3
- local.get $1
- i32.store offset=4
- end
- local.get $0
- local.get $5
- i32.const 4
- i32.shl
- local.get $2
- 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 $5
- i32.shl
- i32.or
i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
- local.get $5
- i32.const 2
- i32.shl
- i32.add
- local.tee $0
- local.get $0
- i32.load offset=4
- i32.const 1
- local.get $2
- i32.shl
- i32.or
- i32.store offset=4
- )
- (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i64)
- (local $3 i32)
- (local $4 i32)
- (local $5 i32)
- local.get $2
- local.get $1
- i64.extend_i32_u
- i64.lt_u
- if
- i32.const 0
- i32.const 1696
- i32.const 382
- 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 $0
- i32.load offset=1568
- local.tee $3
- if
- local.get $3
- i32.const 4
- i32.add
- local.get $1
- i32.gt_u
- if
- i32.const 0
- i32.const 1696
- i32.const 389
- i32.const 16
- call $~lib/builtins/abort
- unreachable
- end
- local.get $3
- local.get $1
- i32.const 16
- i32.sub
- local.tee $5
- i32.eq
- if
- local.get $3
- i32.load
- local.set $4
- local.get $5
- local.set $1
- end
- else
- local.get $0
- i32.const 1572
- i32.add
- local.get $1
- i32.gt_u
- if
- i32.const 0
- i32.const 1696
- i32.const 402
- i32.const 5
- call $~lib/builtins/abort
- unreachable
- end
- end
- local.get $2
- i32.wrap_i64
- i32.const -16
- i32.and
- local.get $1
- i32.sub
- local.tee $3
- i32.const 20
- i32.lt_u
- if
- return
- end
- local.get $1
- local.get $4
- i32.const 2
- i32.and
- local.get $3
- i32.const 8
- i32.sub
- local.tee $3
- 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 $1
+ local.get $0
+ i32.load offset=12
+ global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
- local.get $3
- i32.add
- local.tee $3
- i32.const 2
- i32.store
- local.get $0
- local.get $3
- 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 $1
- i32.const 0
- i32.le_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 35056
- i32.const 0
- i32.store
- i32.const 36624
- 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 35056
- 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 $0
- i32.const 4
- i32.shl
- local.get $1
- i32.add
- i32.const 2
- i32.shl
- i32.const 35056
- 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 35056
- i32.const 36628
- memory.size
- i64.extend_i32_s
- i64.const 16
- i64.shl
- call $~lib/rt/tlsf/addMemory
- i32.const 35056
- global.set $~lib/rt/tlsf/ROOT
+ global.set $~lib/memory/__stack_pointer
)
(func $~lib/rt/itcms/step (result i32)
(local $0 i32)
@@ -1152,7 +756,6 @@
call $~lib/rt/tlsf/initialize
end
global.get $~lib/rt/tlsf/ROOT
- local.set $1
local.get $0
i32.const 4
i32.sub
@@ -1185,7 +788,6 @@
i32.const 1
i32.or
i32.store
- local.get $1
local.get $2
call $~lib/rt/tlsf/insertBlock
end
@@ -1194,62 +796,195 @@
return
end
global.get $~lib/rt/itcms/toSpace
- local.tee $0
- local.get $0
+ global.get $~lib/rt/itcms/toSpace
i32.store offset=4
- local.get $0
- local.get $0
- i32.store offset=8
+ global.get $~lib/rt/itcms/toSpace
+ global.get $~lib/rt/itcms/toSpace
+ i32.store offset=8
i32.const 0
global.set $~lib/rt/itcms/state
end
i32.const 0
)
- (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32)
+ (func $~lib/rt/itcms/Object#makeGray (param $0 i32)
+ (local $1 i32)
(local $2 i32)
+ (local $3 i32)
+ local.get $0
+ global.get $~lib/rt/itcms/iter
+ i32.eq
+ if
+ local.get $0
+ i32.load offset=8
+ local.tee $1
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1424
+ i32.const 148
+ i32.const 30
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ global.set $~lib/rt/itcms/iter
+ end
+ local.get $0
+ call $~lib/rt/itcms/Object#unlink
+ global.get $~lib/rt/itcms/toSpace
+ local.set $1
+ local.get $0
+ i32.load offset=12
+ local.tee $2
+ i32.const 2
+ i32.le_u
+ if (result i32)
+ i32.const 1
+ else
+ local.get $2
+ i32.const 2208
+ i32.load
+ i32.gt_u
+ if
+ i32.const 1552
+ i32.const 1616
+ i32.const 21
+ i32.const 28
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $2
+ i32.const 2
+ i32.shl
+ i32.const 2212
+ i32.add
+ i32.load
+ i32.const 32
+ i32.and
+ end
+ local.set $3
local.get $1
- i32.const 256
+ i32.load offset=8
+ local.set $2
+ local.get $0
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ i32.const 2
+ local.get $3
+ select
+ local.get $1
+ i32.or
+ i32.store offset=4
+ local.get $0
+ local.get $2
+ i32.store offset=8
+ local.get $2
+ local.get $0
+ local.get $2
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ local.get $1
+ local.get $0
+ i32.store offset=8
+ )
+ (func $~lib/typedarray/Int16Array#get:length (param $0 i32) (result 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 2276
+ i32.lt_s
+ if
+ i32.const 35072
+ i32.const 35120
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.load offset=8
+ i32.const 1
+ i32.shr_u
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (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 $3
+ i32.const 1
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1696
+ i32.const 268
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $3
+ i32.const -4
+ i32.and
+ local.tee $3
+ i32.const 12
i32.lt_u
if
- local.get $1
+ i32.const 0
+ i32.const 1696
+ i32.const 270
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $3
+ i32.const 256
+ i32.lt_u
+ if (result i32)
+ local.get $3
i32.const 4
i32.shr_u
- local.set $1
else
- 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.add
- i32.const 1
- i32.sub
- local.set $1
- end
- local.get $1
i32.const 31
- local.get $1
+ i32.const 1073741820
+ local.get $3
+ local.get $3
+ i32.const 1073741820
+ i32.ge_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 $1
- local.get $2
- i32.const 7
- i32.sub
- local.set $2
end
- local.get $1
+ local.tee $3
i32.const 16
i32.lt_u
local.get $2
@@ -1260,634 +995,374 @@
if
i32.const 0
i32.const 1696
- i32.const 334
+ i32.const 284
i32.const 14
call $~lib/builtins/abort
unreachable
end
+ local.get $1
+ i32.load offset=8
+ local.set $5
+ local.get $1
+ i32.load offset=4
+ local.tee $4
+ if
+ local.get $4
+ local.get $5
+ i32.store offset=8
+ end
+ local.get $5
+ if
+ local.get $5
+ local.get $4
+ i32.store offset=4
+ end
+ local.get $1
local.get $0
local.get $2
- i32.const 2
+ i32.const 4
i32.shl
+ local.get $3
i32.add
- i32.load offset=4
- i32.const -1
- local.get $1
+ i32.const 2
i32.shl
- i32.and
+ i32.add
local.tee $1
- if (result i32)
- local.get $0
+ i32.load offset=96
+ i32.eq
+ if
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 $5
+ i32.store offset=96
+ local.get $5
+ i32.eqz
+ if
local.get $0
- local.get $1
- i32.ctz
- local.tee $1
+ local.get $2
i32.const 2
i32.shl
i32.add
+ local.tee $1
i32.load offset=4
- local.tee $2
+ i32.const -2
+ local.get $3
+ i32.rotl
+ i32.and
+ local.set $3
+ local.get $1
+ local.get $3
+ i32.store offset=4
+ local.get $3
i32.eqz
if
- i32.const 0
- i32.const 1696
- i32.const 347
- i32.const 18
- call $~lib/builtins/abort
- unreachable
+ local.get $0
+ local.get $0
+ i32.load
+ i32.const -2
+ local.get $2
+ i32.rotl
+ i32.and
+ i32.store
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/itcms/__new (param $0 i32) (param $1 i32) (result i32)
+ (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.get $0
- i32.const 1073741804
- i32.ge_u
+ local.get $1
+ i32.eqz
if
- i32.const 1360
- i32.const 1424
- i32.const 261
- i32.const 31
+ i32.const 0
+ i32.const 1696
+ i32.const 201
+ i32.const 14
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$70
- 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$70
- 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
+ local.get $1
+ i32.load
+ local.tee $3
+ i32.const 1
+ i32.and
i32.eqz
if
- call $~lib/rt/tlsf/initialize
- end
- global.get $~lib/rt/tlsf/ROOT
- local.set $4
- local.get $0
- i32.const 16
- i32.add
- local.tee $2
- i32.const 1073741820
- i32.gt_u
- if
- i32.const 1360
+ i32.const 0
i32.const 1696
- i32.const 461
- i32.const 29
+ i32.const 203
+ i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $4
- 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
- local.tee $5
- call $~lib/rt/tlsf/searchBlock
+ 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.tee $2
- i32.eqz
+ i32.const 1
+ i32.and
if
- memory.size
- local.tee $2
- local.get $5
- i32.const 256
- i32.ge_u
- if (result i32)
- local.get $5
- i32.const 536870910
- i32.lt_u
- if (result i32)
- local.get $5
- i32.const 1
- i32.const 27
- local.get $5
- i32.clz
- i32.sub
- i32.shl
- i32.add
- i32.const 1
- i32.sub
- else
- local.get $5
- end
- else
- local.get $5
- end
- i32.const 4
+ local.get $0
local.get $4
- i32.load offset=1568
+ call $~lib/rt/tlsf/removeBlock
+ local.get $1
+ local.get $3
+ i32.const 4
+ i32.add
local.get $2
- i32.const 16
- i32.shl
+ i32.const -4
+ i32.and
+ i32.add
+ local.tee $3
+ i32.store
+ local.get $1
i32.const 4
- i32.sub
- i32.ne
- i32.shl
i32.add
- i32.const 65535
+ local.get $1
+ i32.load
+ i32.const -4
+ i32.and
i32.add
- i32.const -65536
+ local.tee $4
+ i32.load
+ local.set $2
+ end
+ local.get $3
+ i32.const 2
+ i32.and
+ if
+ local.get $1
+ i32.const 4
+ i32.sub
+ i32.load
+ local.tee $1
+ i32.load
+ local.tee $6
+ i32.const 1
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 $4
- local.get $2
- i32.const 16
- i32.shl
- memory.size
- i64.extend_i32_s
- i64.const 16
- i64.shl
- call $~lib/rt/tlsf/addMemory
- local.get $4
- local.get $5
- call $~lib/rt/tlsf/searchBlock
- local.tee $2
i32.eqz
if
i32.const 0
i32.const 1696
- i32.const 499
+ i32.const 221
i32.const 16
call $~lib/builtins/abort
unreachable
end
- end
- local.get $5
- local.get $2
- i32.load
- i32.const -4
- i32.and
- i32.gt_u
- if
+ local.get $0
+ local.get $1
+ call $~lib/rt/tlsf/removeBlock
+ local.get $1
+ local.get $6
+ i32.const 4
+ i32.add
+ local.get $3
+ i32.const -4
+ i32.and
+ i32.add
+ local.tee $3
+ i32.store
+ end
+ local.get $4
+ local.get $2
+ i32.const 2
+ i32.or
+ i32.store
+ local.get $3
+ i32.const -4
+ i32.and
+ local.tee $2
+ i32.const 12
+ i32.lt_u
+ if
i32.const 0
i32.const 1696
- i32.const 501
+ i32.const 233
i32.const 14
call $~lib/builtins/abort
unreachable
end
local.get $4
- local.get $2
- call $~lib/rt/tlsf/removeBlock
- local.get $2
- i32.load
- local.set $6
- local.get $5
+ local.get $1
i32.const 4
i32.add
- i32.const 15
- i32.and
+ local.get $2
+ i32.add
+ i32.ne
if
i32.const 0
i32.const 1696
- i32.const 361
+ i32.const 234
i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $6
- i32.const -4
- i32.and
- local.get $5
+ local.get $4
+ i32.const 4
i32.sub
- local.tee $3
- i32.const 16
- i32.ge_u
- if
- local.get $2
- local.get $5
- local.get $6
- i32.const 2
- i32.and
- i32.or
- i32.store
+ local.get $1
+ i32.store
+ local.get $2
+ i32.const 256
+ i32.lt_u
+ if (result i32)
local.get $2
i32.const 4
- i32.add
- local.get $5
- i32.add
- local.tee $5
- local.get $3
- i32.const 4
- i32.sub
- i32.const 1
- i32.or
- i32.store
- local.get $4
- local.get $5
- call $~lib/rt/tlsf/insertBlock
+ i32.shr_u
else
+ i32.const 31
+ i32.const 1073741820
local.get $2
- local.get $6
- 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
+ i32.const 1073741820
+ i32.ge_u
+ select
+ local.tee $2
+ i32.clz
+ i32.sub
local.tee $3
+ i32.const 7
+ i32.sub
+ local.set $5
+ local.get $2
local.get $3
- i32.load
- i32.const -3
- i32.and
- i32.store
+ i32.const 4
+ i32.sub
+ i32.shr_u
+ i32.const 16
+ i32.xor
+ end
+ local.tee $2
+ i32.const 16
+ i32.lt_u
+ local.get $5
+ i32.const 23
+ i32.lt_u
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1696
+ i32.const 251
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
end
- local.get $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 $5
+ i32.const 4
+ i32.shl
local.get $2
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ local.set $3
local.get $1
- global.get $~lib/rt/itcms/white
- i32.or
+ i32.const 0
i32.store offset=4
- local.get $2
+ local.get $1
local.get $3
i32.store offset=8
local.get $3
+ if
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ end
+ local.get $0
+ local.get $5
+ i32.const 4
+ i32.shl
local.get $2
- local.get $3
+ 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 $5
+ i32.shl
+ i32.or
+ i32.store
+ local.get $0
+ local.get $5
+ i32.const 2
+ i32.shl
+ i32.add
+ local.tee $0
+ local.get $0
i32.load offset=4
- i32.const 3
- i32.and
+ i32.const 1
+ local.get $2
+ i32.shl
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
+ )
+ (func $~lib/rt/itcms/Object#unlink (param $0 i32)
+ (local $1 i32)
+ local.get $0
+ i32.load offset=4
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
- memory.fill
- local.get $1
- )
- (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32)
- (local $3 i32)
- local.get $1
i32.eqz
if
+ local.get $0
+ i32.load offset=8
+ i32.eqz
+ local.get $0
+ i32.const 35044
+ i32.lt_u
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1424
+ i32.const 128
+ i32.const 18
+ call $~lib/builtins/abort
+ unreachable
+ end
return
end
local.get $0
+ i32.load offset=8
+ local.tee $0
i32.eqz
if
i32.const 0
i32.const 1424
- i32.const 295
- i32.const 14
+ i32.const 132
+ i32.const 16
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/rt/itcms/white
- local.tee $3
local.get $1
- i32.const 20
- i32.sub
- local.tee $1
+ local.get $0
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $0
i32.load offset=4
i32.const 3
i32.and
- i32.eq
- if
- local.get $3
- i32.eqz
- local.get $0
- i32.const 20
- i32.sub
- local.tee $0
- i32.load offset=4
- i32.const 3
- i32.and
- local.tee $3
- i32.eq
- if
- local.get $0
- local.get $1
- local.get $2
- select
- call $~lib/rt/itcms/Object#makeGray
- else
- global.get $~lib/rt/itcms/state
- i32.const 1
- i32.eq
- local.get $3
- i32.const 3
- i32.eq
- i32.and
- if
- local.get $1
- call $~lib/rt/itcms/Object#makeGray
- end
- end
- end
- )
- (func $bindings/esm/newInternref (result i32)
- (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 2276
- i32.lt_s
- if
- i32.const 35072
- i32.const 35120
- 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 0
- i32.const 15
- call $~lib/rt/itcms/__new
- local.tee $0
- i32.store
- global.get $~lib/memory/__stack_pointer
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $0
- )
- (func $~lib/rt/itcms/__pin (param $0 i32) (result i32)
- (local $1 i32)
- (local $2 i32)
- (local $3 i32)
- local.get $0
- if
- local.get $0
- i32.const 20
- i32.sub
- local.tee $1
- i32.load offset=4
- i32.const 3
- i32.and
- i32.const 3
- i32.eq
- if
- i32.const 2096
- i32.const 1424
- i32.const 338
- i32.const 7
- call $~lib/builtins/abort
- unreachable
- end
- local.get $1
- call $~lib/rt/itcms/Object#unlink
- global.get $~lib/rt/itcms/pinSpace
- local.tee $3
- i32.load offset=8
- local.set $2
- local.get $1
- local.get $3
- i32.const 3
- i32.or
- i32.store offset=4
- local.get $1
- local.get $2
- i32.store offset=8
- local.get $2
- local.get $1
- local.get $2
- i32.load offset=4
- i32.const 3
- i32.and
- i32.or
- i32.store offset=4
- local.get $3
- local.get $1
- i32.store offset=8
- end
- local.get $0
- )
- (func $~lib/rt/itcms/__unpin (param $0 i32)
- (local $1 i32)
- (local $2 i32)
- local.get $0
- i32.eqz
- if
- return
- end
- local.get $0
- i32.const 20
- i32.sub
- local.tee $1
- i32.load offset=4
- i32.const 3
- i32.and
- i32.const 3
- i32.ne
- if
- i32.const 2160
- i32.const 1424
- i32.const 352
- i32.const 5
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/rt/itcms/state
- i32.const 1
- i32.eq
- if
- local.get $1
- call $~lib/rt/itcms/Object#makeGray
- else
- local.get $1
- call $~lib/rt/itcms/Object#unlink
- global.get $~lib/rt/itcms/fromSpace
- local.tee $0
- i32.load offset=8
- local.set $2
- local.get $1
- local.get $0
- global.get $~lib/rt/itcms/white
- i32.or
- i32.store offset=4
- local.get $1
- local.get $2
- i32.store offset=8
- local.get $2
- local.get $1
- local.get $2
- i32.load offset=4
- i32.const 3
- i32.and
- i32.or
- i32.store offset=4
- local.get $0
- local.get $1
- i32.store offset=8
- end
- )
- (func $~lib/rt/itcms/__collect
- global.get $~lib/rt/itcms/state
- i32.const 0
- i32.gt_s
- if
- loop $while-continue|0
- global.get $~lib/rt/itcms/state
- if
- call $~lib/rt/itcms/step
- drop
- br $while-continue|0
- end
- end
- end
- call $~lib/rt/itcms/step
- drop
- loop $while-continue|1
- global.get $~lib/rt/itcms/state
- if
- call $~lib/rt/itcms/step
- drop
- br $while-continue|1
- 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
+ i32.or
+ i32.store offset=4
)
(func $~lib/rt/__visit_members (param $0 i32)
(local $1 i32)
@@ -1929,10 +1404,9 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
i32.const 0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
@@ -1972,16 +1446,15 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $2
i32.const 0
i32.store
- local.get $2
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
i32.load offset=4
local.set $1
- local.get $2
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $1
@@ -2014,25 +1487,13 @@
end
local.get $0
i32.load offset=56
- local.tee $1
- if
- local.get $1
- call $~lib/rt/itcms/__visit
- end
+ call $~lib/rt/itcms/__visit
local.get $0
i32.load offset=60
- local.tee $1
- if
- local.get $1
- call $~lib/rt/itcms/__visit
- end
+ call $~lib/rt/itcms/__visit
local.get $0
i32.load offset=64
- local.tee $0
- if
- local.get $0
- call $~lib/rt/itcms/__visit
- end
+ call $~lib/rt/itcms/__visit
return
end
return
@@ -2048,11 +1509,7 @@
end
local.get $0
i32.load
- local.tee $0
- if
- local.get $0
- call $~lib/rt/itcms/__visit
- end
+ call $~lib/rt/itcms/__visit
return
end
global.get $~lib/memory/__stack_pointer
@@ -2066,18 +1523,7 @@
i32.add
global.set $~lib/memory/__stack_pointer
)
- (func $~setArgumentsLength (param $0 i32)
- local.get $0
- global.set $~argumentsLength
- )
- (func $~start
- (local $0 i32)
- global.get $~started
- if
- return
- end
- i32.const 1
- global.set $~started
+ (func $export:bindings/esm/staticarrayU16 (param $0 i32) (result i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -2094,196 +1540,15 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 0
- i32.store
local.get $0
- i32.const 1152
i32.store
- i32.const 1152
- i32.const 1
- f64.const 42
- f64.const 0
- f64.const 0
- f64.const 0
- f64.const 0
- call $~lib/builtins/trace
- global.get $~lib/memory/__stack_pointer
- i32.const 1184
- i32.store
- i32.const 1184
- 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
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- memory.size
- i32.const 16
- i32.shl
- i32.const 35044
- i32.sub
- i32.const 1
- i32.shr_u
- global.set $~lib/rt/itcms/threshold
- i32.const 1476
- i32.const 1472
- i32.store
- i32.const 1480
- i32.const 1472
- i32.store
- i32.const 1472
- global.set $~lib/rt/itcms/pinSpace
- i32.const 1508
- i32.const 1504
- i32.store
- i32.const 1512
- i32.const 1504
- i32.store
- i32.const 1504
- global.set $~lib/rt/itcms/toSpace
- i32.const 1652
- i32.const 1648
- i32.store
- i32.const 1656
- i32.const 1648
- i32.store
- i32.const 1648
- global.set $~lib/rt/itcms/fromSpace
- )
- (func $bindings/esm/stringFunction (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
- (local $3 i32)
- (local $4 i32)
- (local $5 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 2276
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $2
- i64.const 0
- i64.store
- local.get $2
- local.get $0
- i32.store
- local.get $2
- local.get $1
- i32.store offset=4
- local.get $2
- i32.const 8
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $2
- i64.const 0
- i64.store
- local.get $2
- local.get $0
- i32.store
- local.get $2
- local.get $1
- i32.store offset=4
- local.get $2
- i32.const 8
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $2
- i64.const 0
- i64.store
- local.get $2
- local.get $0
- i32.store
- local.get $0
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const -2
- i32.and
- local.set $3
- local.get $2
- local.get $1
- i32.store
- block $__inlined_func$~lib/string/String#concat$280
- local.get $1
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const -2
- i32.and
- local.tee $4
- local.get $3
- i32.add
- local.tee $5
- i32.eqz
- if
- local.get $2
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- i32.const 1760
- local.set $2
- br $__inlined_func$~lib/string/String#concat$280
- end
- global.get $~lib/memory/__stack_pointer
- local.get $5
- i32.const 2
- call $~lib/rt/itcms/__new
- local.tee $2
- i32.store offset=4
- local.get $2
- local.get $0
- local.get $3
- memory.copy
- local.get $2
- local.get $3
- i32.add
- local.get $1
- local.get $4
- memory.copy
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- end
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $2
- return
- end
- i32.const 35072
- i32.const 35120
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
+ local.get $0
)
- (func $~lib/typedarray/Int16Array#get:length (param $0 i32) (result i32)
- (local $1 i32)
+ (func $~lib/typedarray/Uint64Array#__set (param $0 i32) (param $1 i32) (param $2 i64)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -2300,25 +1565,42 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $1
i32.const 0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
+ local.get $1
local.get $0
i32.load offset=8
- i32.const 1
+ i32.const 3
i32.shr_u
- local.set $0
+ i32.ge_u
+ if
+ i32.const 1552
+ i32.const 1792
+ i32.const 1173
+ i32.const 64
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.load offset=4
local.get $1
+ i32.const 3
+ i32.shl
+ i32.add
+ local.get $2
+ i64.store
+ global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
)
(func $~lib/typedarray/Float32Array#get:length (param $0 i32) (result i32)
- (local $1 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -2335,25 +1617,21 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $1
i32.const 0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
i32.load offset=8
i32.const 2
i32.shr_u
- local.set $0
- local.get $1
+ global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
)
- (func $~lib/typedarray/Uint64Array#__set (param $0 i32) (param $1 i32) (param $2 i64)
- (local $3 i32)
+ (func $~lib/staticarray/StaticArray#__set (param $0 i32) (param $1 i32) (param $2 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -2370,385 +1648,608 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $3
i32.const 0
i32.store
- local.get $3
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $1
local.get $0
- i32.load offset=8
- i32.const 3
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 1552
- i32.const 1792
- i32.const 1173
- i32.const 64
+ i32.const 1856
+ i32.const 93
+ i32.const 41
call $~lib/builtins/abort
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $3
local.get $0
i32.store
local.get $0
- i32.load offset=4
local.get $1
- i32.const 3
+ i32.const 2
i32.shl
i32.add
local.get $2
- i64.store
- local.get $3
+ i32.store
+ global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
)
- (func $bindings/esm/typedarrayFunction (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
- (local $3 i32)
- (local $4 f32)
- (local $5 i32)
- (local $6 i32)
- (local $7 i32)
+ (func $~lib/staticarray/StaticArray#__get (param $0 i32) (param $1 i32) (result i32)
global.get $~lib/memory/__stack_pointer
- i32.const 12
+ i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
- block $folding-inner1
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner1
- 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
- local.get $0
- i32.store
- local.get $0
- call $~lib/typedarray/Int16Array#get:length
- local.set $5
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store
- local.get $2
- block $__inlined_func$~lib/typedarray/Uint64Array#constructor$1 (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 2276
+ i32.lt_s
+ if
+ i32.const 35072
+ i32.const 35120
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $1
+ local.get $0
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 2
+ i32.shr_u
+ i32.ge_u
+ if
+ i32.const 1552
+ i32.const 1856
+ i32.const 78
+ i32.const 41
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ local.get $1
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (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
+ local.get $1
+ i32.const 536870910
+ i32.lt_u
+ if
local.get $1
- call $~lib/typedarray/Float32Array#get:length
- local.get $5
+ i32.const 1
+ i32.const 27
+ local.get $1
+ i32.clz
+ i32.sub
+ i32.shl
i32.add
- local.set $5
- global.get $~lib/memory/__stack_pointer
- i32.const 8
+ i32.const 1
i32.sub
- global.set $~lib/memory/__stack_pointer
- block $folding-inner00
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner00
- global.get $~lib/memory/__stack_pointer
- local.tee $2
- i64.const 0
- i64.store
- local.get $2
- i32.const 12
- i32.const 7
- call $~lib/rt/itcms/__new
- local.tee $2
- i32.store
- global.get $~lib/memory/__stack_pointer
- local.tee $6
- local.get $2
- i32.store offset=4
- local.get $6
- i32.const 16
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner00
- global.get $~lib/memory/__stack_pointer
- local.tee $7
- i64.const 0
- i64.store
- local.get $7
- i64.const 0
- i64.store offset=8
- local.get $2
- i32.eqz
- if
- local.get $7
- i32.const 12
- i32.const 3
- call $~lib/rt/itcms/__new
- local.tee $2
- i32.store
- end
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store offset=4
- local.get $2
- i32.const 0
- i32.store
- local.get $2
- i32.const 0
- i32.const 0
- call $~lib/rt/itcms/__link
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store offset=4
- local.get $2
- i32.const 0
- i32.store offset=4
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store offset=4
- local.get $2
- i32.const 0
- i32.store offset=8
- local.get $5
- i32.const 134217727
- i32.gt_u
- if
- i32.const 1248
- i32.const 1296
- i32.const 19
- i32.const 57
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.get $5
- i32.const 3
- i32.shl
- local.tee $5
- i32.const 1
- call $~lib/rt/itcms/__new
- local.tee $7
- i32.store offset=8
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store offset=4
- global.get $~lib/memory/__stack_pointer
- local.get $7
- i32.store offset=12
- local.get $2
- local.get $7
- i32.store
- local.get $2
- local.get $7
- i32.const 0
- call $~lib/rt/itcms/__link
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store offset=4
- local.get $2
- local.get $7
- i32.store offset=4
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store offset=4
- local.get $2
- local.get $5
- i32.store offset=8
- global.get $~lib/memory/__stack_pointer
- i32.const 16
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $6
- local.get $2
- i32.store
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $2
- br $__inlined_func$~lib/typedarray/Uint64Array#constructor$1
+ local.set $1
+ end
+ local.get $1
+ i32.const 31
+ local.get $1
+ i32.clz
+ i32.sub
+ local.tee $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
+ local.get $2
+ i32.const 23
+ i32.lt_u
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1696
+ i32.const 334
+ 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 1696
+ i32.const 347
+ i32.const 18
+ call $~lib/builtins/abort
+ unreachable
end
- br $folding-inner1
+ 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
- local.tee $2
- i32.store offset=4
- loop $for-loop|0
- global.get $~lib/memory/__stack_pointer
+ end
+ )
+ (func $~lib/rt/tlsf/initialize
+ (local $0 i32)
+ (local $1 i32)
+ memory.size
+ local.tee $1
+ i32.const 0
+ i32.le_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 35056
+ i32.const 0
+ i32.store
+ i32.const 36624
+ i32.const 0
+ i32.store
+ loop $for-loop|0
+ local.get $0
+ i32.const 23
+ i32.lt_u
+ if
local.get $0
- i32.store
+ i32.const 2
+ i32.shl
+ i32.const 35056
+ 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 $0
+ i32.const 4
+ i32.shl
+ local.get $1
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.const 35056
+ 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
- call $~lib/typedarray/Int16Array#get:length
+ i32.const 1
+ i32.add
+ local.set $0
+ br $for-loop|0
+ end
+ end
+ i32.const 35056
+ i32.const 36628
+ memory.size
+ i64.extend_i32_s
+ i64.const 16
+ i64.shl
+ call $~lib/rt/tlsf/addMemory
+ i32.const 35056
+ global.set $~lib/rt/tlsf/ROOT
+ )
+ (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i64)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ local.get $2
+ local.get $1
+ i64.extend_i32_u
+ i64.lt_u
+ if
+ i32.const 0
+ i32.const 1696
+ i32.const 382
+ 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 $0
+ i32.load offset=1568
+ local.tee $3
+ if
+ local.get $3
+ i32.const 4
+ i32.add
+ local.get $1
+ i32.gt_u
+ if
+ i32.const 0
+ i32.const 1696
+ i32.const 389
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $3
+ local.get $1
+ i32.const 16
+ i32.sub
+ local.tee $5
+ i32.eq
+ if
local.get $3
- i32.gt_s
+ i32.load
+ local.set $4
+ local.get $5
+ local.set $1
+ end
+ else
+ local.get $0
+ i32.const 1572
+ i32.add
+ local.get $1
+ i32.gt_u
+ if
+ i32.const 0
+ i32.const 1696
+ i32.const 402
+ i32.const 5
+ call $~lib/builtins/abort
+ unreachable
+ end
+ end
+ local.get $2
+ i32.wrap_i64
+ i32.const -16
+ i32.and
+ local.get $1
+ i32.sub
+ local.tee $3
+ i32.const 20
+ i32.lt_u
+ if
+ return
+ end
+ local.get $1
+ local.get $4
+ i32.const 2
+ i32.and
+ local.get $3
+ i32.const 8
+ i32.sub
+ local.tee $3
+ 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 $1
+ i32.const 4
+ i32.add
+ local.get $3
+ i32.add
+ local.tee $3
+ i32.const 2
+ i32.store
+ local.get $0
+ local.get $3
+ i32.store offset=1568
+ local.get $0
+ local.get $1
+ call $~lib/rt/tlsf/insertBlock
+ )
+ (func $~lib/rt/itcms/visitRoots
+ (local $0 i32)
+ (local $1 i32)
+ i32.const 1056
+ call $~lib/rt/itcms/__visit
+ global.get $bindings/esm/mutableStringGlobal
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ i32.const 1552
+ call $~lib/rt/itcms/__visit
+ i32.const 1248
+ call $~lib/rt/itcms/__visit
+ i32.const 1968
+ call $~lib/rt/itcms/__visit
+ i32.const 1360
+ call $~lib/rt/itcms/__visit
+ i32.const 2096
+ call $~lib/rt/itcms/__visit
+ i32.const 2160
+ call $~lib/rt/itcms/__visit
+ global.get $~lib/rt/itcms/pinSpace
+ local.tee $1
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ loop $while-continue|0
+ local.get $0
+ local.get $1
+ i32.ne
+ if
+ local.get $0
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.const 3
+ i32.ne
if
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=8
- 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 2276
- i32.lt_s
- br_if $folding-inner1
- global.get $~lib/memory/__stack_pointer
- local.tee $5
i32.const 0
- i32.store
- local.get $5
- local.get $0
- i32.store
- local.get $3
- local.get $0
- i32.load offset=8
- i32.const 1
- i32.shr_u
- i32.ge_u
- if
- i32.const 1552
- i32.const 1792
- i32.const 452
- i32.const 64
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.tee $5
- local.get $0
- i32.store
- local.get $0
- i32.load offset=4
- local.get $3
- i32.const 1
- i32.shl
- i32.add
- i32.load16_s
- local.set $6
- local.get $5
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $2
- local.get $3
- local.get $6
- i64.extend_i32_s
- call $~lib/typedarray/Uint64Array#__set
- local.get $3
- i32.const 1
- i32.add
- local.set $3
- br $for-loop|0
+ i32.const 1424
+ i32.const 160
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
end
+ local.get $0
+ i32.const 20
+ i32.add
+ call $~lib/rt/__visit_members
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ br $while-continue|0
end
- i32.const 0
- local.set $3
- loop $for-loop|1
- global.get $~lib/memory/__stack_pointer
+ end
+ )
+ (func $~lib/array/ensureCapacity (param $0 i32) (param $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 2276
+ i32.lt_s
+ if
+ i32.const 35072
+ i32.const 35120
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $1
+ local.get $0
+ i32.load offset=8
+ local.tee $2
+ i32.const 2
+ i32.shr_u
+ i32.gt_u
+ if
+ local.get $1
+ i32.const 268435455
+ i32.gt_u
+ if
+ i32.const 1248
+ i32.const 1920
+ i32.const 19
+ i32.const 48
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ block $__inlined_func$~lib/rt/itcms/__renew$269
+ i32.const 1073741820
+ local.get $2
+ i32.const 1
+ i32.shl
+ local.tee $2
+ local.get $2
+ i32.const 1073741820
+ i32.ge_u
+ select
+ local.tee $2
+ i32.const 8
local.get $1
- i32.store
local.get $1
- call $~lib/typedarray/Float32Array#get:length
- local.get $3
- i32.gt_s
+ i32.const 8
+ i32.le_u
+ select
+ i32.const 2
+ i32.shl
+ local.tee $1
+ local.get $1
+ local.get $2
+ i32.lt_u
+ select
+ local.tee $3
+ local.get $0
+ i32.load
+ local.tee $2
+ i32.const 20
+ i32.sub
+ local.tee $4
+ i32.load
+ i32.const -4
+ i32.and
+ i32.const 16
+ i32.sub
+ i32.le_u
if
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=8
- local.get $0
- call $~lib/typedarray/Int16Array#get:length
- local.get $3
- i32.add
- local.set $5
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store offset=8
- 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 2276
- i32.lt_s
- br_if $folding-inner1
- global.get $~lib/memory/__stack_pointer
- local.tee $6
- i32.const 0
- i32.store
- local.get $6
- local.get $1
- i32.store
- local.get $3
- local.get $1
- i32.load offset=8
- i32.const 2
- i32.shr_u
- i32.ge_u
- if
- i32.const 1552
- i32.const 1792
- i32.const 1304
- i32.const 64
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.tee $6
- local.get $1
- i32.store
- local.get $1
- i32.load offset=4
- local.get $3
- i32.const 2
- i32.shl
- i32.add
- f32.load
- local.set $4
- local.get $6
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $2
- local.get $5
local.get $4
- i64.trunc_sat_f32_u
- call $~lib/typedarray/Uint64Array#__set
local.get $3
- i32.const 1
- i32.add
- local.set $3
- br $for-loop|1
+ i32.store offset=16
+ local.get $2
+ local.set $1
+ br $__inlined_func$~lib/rt/itcms/__renew$269
end
+ local.get $3
+ local.get $4
+ i32.load offset=12
+ call $~lib/rt/itcms/__new
+ local.tee $1
+ local.get $2
+ local.get $3
+ local.get $4
+ i32.load offset=16
+ local.tee $4
+ local.get $3
+ local.get $4
+ i32.lt_u
+ select
+ memory.copy
end
- global.get $~lib/memory/__stack_pointer
- i32.const 12
- i32.add
- global.set $~lib/memory/__stack_pointer
+ local.get $1
local.get $2
- return
+ i32.ne
+ if
+ local.get $0
+ local.get $1
+ i32.store
+ local.get $0
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ i32.const 0
+ call $~lib/rt/itcms/__link
+ end
+ local.get $0
+ local.get $3
+ i32.store offset=8
end
- i32.const 35072
- i32.const 35120
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
)
- (func $~lib/staticarray/StaticArray#__get (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
+ (func $~lib/array/Array<~lib/string/String>#__set (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -2765,45 +2266,63 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $2
i32.const 0
i32.store
- local.get $2
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $1
local.get $0
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const 2
- i32.shr_u
+ i32.load offset=12
i32.ge_u
if
- i32.const 1552
- i32.const 1856
- i32.const 78
- i32.const 41
- call $~lib/builtins/abort
- unreachable
+ local.get $1
+ i32.const 0
+ i32.lt_s
+ if
+ i32.const 1552
+ i32.const 1920
+ i32.const 130
+ i32.const 22
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $3
+ call $~lib/array/ensureCapacity
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $3
+ i32.store offset=12
end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
local.get $0
+ i32.load offset=4
local.get $1
i32.const 2
i32.shl
i32.add
- i32.load
- local.set $0
+ local.get $2
+ i32.store
+ local.get $0
+ local.get $2
+ i32.const 1
+ call $~lib/rt/itcms/__link
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
)
- (func $~lib/staticarray/StaticArray#__set (param $0 i32) (param $1 i32) (param $2 i32)
- (local $3 i32)
+ (func $~lib/array/Array<~lib/string/String>#__get (param $0 i32) (param $1 i32) (result i32)
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
@@ -2818,46 +2337,54 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $3
- i32.const 0
- i32.store
- local.get $3
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $1
local.get $0
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const 2
- i32.shr_u
+ i32.load offset=12
i32.ge_u
if
i32.const 1552
- i32.const 1856
- i32.const 93
- i32.const 41
+ i32.const 1920
+ i32.const 114
+ i32.const 42
call $~lib/builtins/abort
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $3
local.get $0
i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
+ i32.load offset=4
local.get $1
i32.const 2
i32.shl
i32.add
- local.get $2
- i32.store
- local.get $3
- i32.const 4
+ i32.load
+ local.tee $0
+ i32.store offset=4
+ local.get $0
+ i32.eqz
+ if
+ i32.const 1968
+ i32.const 1920
+ i32.const 118
+ i32.const 40
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
+ local.get $0
)
- (func $~lib/array/Array#get:length (param $0 i32) (result i32)
- (local $1 i32)
+ (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -2874,23 +2401,57 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $1
i32.const 0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
+ local.get $1
local.get $0
i32.load offset=12
- local.set $0
+ i32.ge_u
+ if
+ local.get $1
+ i32.const 0
+ i32.lt_s
+ if
+ i32.const 1552
+ i32.const 1920
+ i32.const 130
+ i32.const 22
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $3
+ call $~lib/array/ensureCapacity
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $3
+ i32.store offset=12
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.load offset=4
local.get $1
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $2
+ i32.store
+ global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
)
(func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -2907,10 +2468,9 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $2
i32.const 0
i32.store
- local.get $2
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $1
@@ -2926,7 +2486,6 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $2
local.get $0
i32.store
local.get $0
@@ -2936,218 +2495,339 @@
i32.shl
i32.add
i32.load
- local.set $0
- local.get $2
+ global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
)
- (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32)
+ (func $bindings/esm/stringFunction (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.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- if
- i32.const 35072
- i32.const 35120
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.tee $2
- i32.const 0
- i32.store
- local.get $2
- local.get $0
- i32.store
- local.get $1
- local.get $0
- i32.load offset=8
- local.tee $2
- i32.const 2
- i32.shr_u
- i32.gt_u
- if
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $1
- i32.const 268435455
- i32.gt_u
- if
- i32.const 1248
- i32.const 1920
- i32.const 19
- i32.const 48
- call $~lib/builtins/abort
- unreachable
- end
+ 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 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ 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 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
- block $__inlined_func$~lib/rt/itcms/__renew$265
- i32.const 1073741820
- local.get $2
- i32.const 1
- i32.shl
- local.tee $2
- local.get $2
- i32.const 1073741820
- i32.ge_u
- select
- local.tee $2
- i32.const 8
- local.get $1
- local.get $1
- i32.const 8
- i32.le_u
- select
- i32.const 2
- i32.shl
- local.tee $1
+ local.get $0
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const -2
+ i32.and
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store
+ block $__inlined_func$~lib/string/String#concat$284
local.get $1
- local.get $2
- i32.lt_u
- select
- local.tee $3
- local.get $0
- i32.load
- local.tee $2
i32.const 20
i32.sub
- local.tee $4
- i32.load
- i32.const -4
+ i32.load offset=16
+ i32.const -2
i32.and
- i32.const 16
- i32.sub
- i32.le_u
+ local.tee $4
+ local.get $3
+ i32.add
+ local.tee $2
+ i32.eqz
if
- local.get $4
- local.get $3
- i32.store offset=16
- local.get $2
- local.set $1
- br $__inlined_func$~lib/rt/itcms/__renew$265
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ i32.const 1760
+ local.set $2
+ br $__inlined_func$~lib/string/String#concat$284
end
- local.get $3
- local.get $4
- i32.load offset=12
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.const 2
call $~lib/rt/itcms/__new
- local.tee $1
+ local.tee $2
+ i32.store offset=4
local.get $2
+ local.get $0
local.get $3
- local.get $4
- i32.load offset=16
- local.tee $4
+ memory.copy
+ local.get $2
local.get $3
+ i32.add
+ local.get $1
local.get $4
- i32.lt_u
- select
memory.copy
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
end
- local.get $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
local.get $2
- i32.ne
- if
- local.get $0
- local.get $1
- i32.store
- local.get $0
- local.get $1
- i32.store offset=4
- local.get $0
- local.get $1
- i32.const 0
- call $~lib/rt/itcms/__link
- end
- local.get $0
- local.get $3
- i32.store offset=8
+ return
end
- global.get $~lib/memory/__stack_pointer
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
+ i32.const 35072
+ i32.const 35120
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
)
- (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32)
- (local $3 i32)
- global.get $~lib/memory/__stack_pointer
- i32.const 4
+ (func $~start
+ global.get $~started
+ if
+ return
+ end
+ i32.const 1
+ global.set $~started
+ i32.const 1152
+ i32.const 1
+ f64.const 42
+ f64.const 0
+ f64.const 0
+ f64.const 0
+ f64.const 0
+ call $~lib/builtins/trace
+ i32.const 1184
+ 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
+ memory.size
+ i32.const 16
+ i32.shl
+ i32.const 35044
i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
+ i32.const 1
+ i32.shr_u
+ global.set $~lib/rt/itcms/threshold
+ i32.const 1476
+ i32.const 1472
+ i32.store
+ i32.const 1480
+ i32.const 1472
+ i32.store
+ i32.const 1472
+ global.set $~lib/rt/itcms/pinSpace
+ i32.const 1508
+ i32.const 1504
+ i32.store
+ i32.const 1512
+ i32.const 1504
+ i32.store
+ i32.const 1504
+ global.set $~lib/rt/itcms/toSpace
+ i32.const 1652
+ i32.const 1648
+ i32.store
+ i32.const 1656
+ i32.const 1648
+ i32.store
+ i32.const 1648
+ global.set $~lib/rt/itcms/fromSpace
+ )
+ (func $~setArgumentsLength (param $0 i32)
+ local.get $0
+ global.set $~argumentsLength
+ )
+ (func $~lib/rt/itcms/__unpin (param $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ local.get $0
+ i32.eqz
if
- i32.const 35072
- i32.const 35120
- i32.const 1
- i32.const 1
+ return
+ end
+ local.get $0
+ i32.const 20
+ i32.sub
+ local.tee $1
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.const 3
+ i32.ne
+ if
+ i32.const 2160
+ i32.const 1424
+ i32.const 352
+ i32.const 5
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $3
- i32.const 0
- i32.store
- local.get $3
- local.get $0
- i32.store
- local.get $1
+ global.get $~lib/rt/itcms/state
+ i32.const 1
+ i32.eq
+ if
+ local.get $1
+ call $~lib/rt/itcms/Object#makeGray
+ else
+ local.get $1
+ call $~lib/rt/itcms/Object#unlink
+ global.get $~lib/rt/itcms/fromSpace
+ local.tee $0
+ i32.load offset=8
+ local.set $2
+ local.get $1
+ local.get $0
+ global.get $~lib/rt/itcms/white
+ i32.or
+ i32.store offset=4
+ local.get $1
+ local.get $2
+ i32.store offset=8
+ local.get $2
+ local.get $1
+ local.get $2
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ i32.store offset=8
+ end
+ )
+ (func $~lib/rt/itcms/__pin (param $0 i32) (result i32)
+ (local $1 i32)
+ (local $2 i32)
+ (local $3 i32)
local.get $0
- i32.load offset=12
- i32.ge_u
if
- local.get $1
- i32.const 0
- i32.lt_s
+ local.get $0
+ i32.const 20
+ i32.sub
+ local.tee $1
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.const 3
+ i32.eq
if
- i32.const 1552
- i32.const 1920
- i32.const 130
- i32.const 22
+ i32.const 2096
+ i32.const 1424
+ i32.const 338
+ i32.const 7
call $~lib/builtins/abort
unreachable
end
- local.get $0
local.get $1
- i32.const 1
- i32.add
+ call $~lib/rt/itcms/Object#unlink
+ global.get $~lib/rt/itcms/pinSpace
local.tee $3
- call $~lib/array/ensureCapacity
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store
- local.get $0
+ i32.load offset=8
+ local.set $2
+ local.get $1
local.get $3
- i32.store offset=12
+ i32.const 3
+ i32.or
+ i32.store offset=4
+ local.get $1
+ local.get $2
+ i32.store offset=8
+ local.get $2
+ local.get $1
+ local.get $2
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ local.get $3
+ local.get $1
+ i32.store offset=8
end
- global.get $~lib/memory/__stack_pointer
- local.tee $3
- local.get $0
- i32.store
local.get $0
- i32.load offset=4
- local.get $1
- i32.const 2
- i32.shl
- i32.add
- local.get $2
- i32.store
- local.get $3
- i32.const 4
+ )
+ (func $~lib/rt/itcms/__collect
+ global.get $~lib/rt/itcms/state
+ i32.const 0
+ i32.gt_s
+ if
+ loop $while-continue|0
+ global.get $~lib/rt/itcms/state
+ if
+ call $~lib/rt/itcms/step
+ drop
+ br $while-continue|0
+ end
+ end
+ end
+ call $~lib/rt/itcms/step
+ drop
+ loop $while-continue|1
+ global.get $~lib/rt/itcms/state
+ if
+ call $~lib/rt/itcms/step
+ drop
+ br $while-continue|1
+ 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/memory/__stack_pointer
+ global.set $~lib/rt/itcms/threshold
)
- (func $~lib/array/Array<~lib/string/String>#__get (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
+ (func $export:bindings/esm/typedarrayFunction (param $0 i32) (param $1 i32) (result i32)
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
@@ -3164,233 +2844,304 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $2
- i64.const 0
- i64.store
- local.get $2
local.get $0
i32.store
- local.get $1
- local.get $0
- i32.load offset=12
- i32.ge_u
- if
- i32.const 1552
- i32.const 1920
- 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.store
- local.get $2
- local.get $0
- i32.load offset=4
local.get $1
- i32.const 2
- i32.shl
- i32.add
- i32.load
- local.tee $0
i32.store offset=4
local.get $0
- i32.eqz
- if
- i32.const 1968
- i32.const 1920
- i32.const 118
- i32.const 40
- call $~lib/builtins/abort
- unreachable
- end
+ local.get $1
+ call $bindings/esm/typedarrayFunction
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
)
- (func $~lib/array/Array<~lib/string/String>#__set (param $0 i32) (param $1 i32) (param $2 i32)
- (local $3 i32)
+ (func $export:bindings/esm/stringFunctionOptional@varargs (param $0 i32) (param $1 i32) (result i32)
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 2276
- i32.lt_s
- if
- i32.const 35072
- i32.const 35120
- 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
- local.get $0
- i32.store
- local.get $1
- local.get $0
- i32.load offset=12
- i32.ge_u
- if
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $1
- i32.const 0
+ i32.store offset=4
+ 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 2276
i32.lt_s
- if
- i32.const 1552
- i32.const 1920
- i32.const 130
- i32.const 22
- call $~lib/builtins/abort
- unreachable
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store offset=8
+ block $1of1
+ block $0of1
+ block $outOfRange
+ global.get $~argumentsLength
+ i32.const 1
+ i32.sub
+ br_table $0of1 $1of1 $outOfRange
+ end
+ unreachable
+ end
+ i32.const 1088
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 1088
+ i32.store
end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
local.get $0
local.get $1
+ call $bindings/esm/stringFunction
+ 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 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ return
+ end
+ i32.const 35072
+ i32.const 35120
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:bindings/esm/stringFunction (param $0 i32) (param $1 i32) (result 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 2276
+ i32.lt_s
+ if
+ i32.const 35072
+ i32.const 35120
i32.const 1
- i32.add
- local.tee $3
- call $~lib/array/ensureCapacity
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store
- local.get $0
- local.get $3
- i32.store offset=12
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
end
global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
- local.get $0
- i32.load offset=4
+ global.get $~lib/memory/__stack_pointer
local.get $1
- i32.const 2
- i32.shl
- i32.add
- local.get $2
- i32.store
+ i32.store offset=4
local.get $0
- local.get $2
- i32.const 1
- call $~lib/rt/itcms/__link
+ local.get $1
+ call $bindings/esm/stringFunction
global.get $~lib/memory/__stack_pointer
- i32.const 4
+ i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
)
- (func $export:bindings/esm/bufferFunction (param $0 i32) (param $1 i32) (result i32)
+ (func $export:bindings/esm/staticarrayFunction (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
- (local $5 i32)
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
- block $folding-inner0
+ block $folding-inner1
global.get $~lib/memory/__stack_pointer
i32.const 2276
i32.lt_s
- br_if $folding-inner0
+ br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $2
local.get $0
i32.store
- local.get $2
- local.get $1
- i32.store offset=4
- local.get $2
- i32.const 8
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $3
- i64.const 0
- i64.store
- local.get $3
- local.get $0
- i32.store
- local.get $0
- i32.const 20
- i32.sub
- i32.load offset=16
- local.set $4
- local.get $3
- local.get $1
- i32.store
local.get $1
- i32.const 20
- i32.sub
- i32.load offset=16
- local.tee $2
- local.get $4
- i32.add
- local.set $5
- local.get $3
- i32.const 4
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- i32.const 0
- i32.store
- local.get $5
- i32.const 1073741820
- i32.gt_u
- if
- i32.const 1248
- i32.const 1296
- i32.const 52
- i32.const 43
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.get $5
- i32.const 1
- call $~lib/rt/itcms/__new
- local.tee $5
- i32.store
- 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 offset=4
- local.get $5
- local.get $0
- local.get $4
- memory.copy
- local.get $4
- local.get $5
- i32.add
- local.get $1
- local.get $2
- memory.copy
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
+ block $__inlined_func$bindings/esm/staticarrayFunction$1 (result 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 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 2
+ i32.shr_u
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store
+ local.get $1
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 2
+ i32.shr_u
+ i32.add
+ local.set $4
+ 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 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ local.get $4
+ i32.const 268435455
+ i32.gt_u
+ if
+ i32.const 1248
+ i32.const 1856
+ i32.const 51
+ i32.const 60
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.const 2
+ i32.shl
+ i32.const 8
+ call $~lib/rt/itcms/__new
+ local.tee $4
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store offset=4
+ loop $for-loop|0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $0
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 2
+ i32.shr_u
+ i32.lt_s
+ if
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=8
+ local.get $4
+ local.get $2
+ local.get $0
+ local.get $2
+ call $~lib/staticarray/StaticArray#__get
+ call $~lib/staticarray/StaticArray#__set
+ local.get $2
+ i32.const 1
+ i32.add
+ local.set $2
+ br $for-loop|0
+ end
+ end
+ i32.const 0
+ local.set $2
+ loop $for-loop|1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store
+ local.get $2
+ local.get $1
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 2
+ i32.shr_u
+ i32.lt_s
+ if
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=8
+ local.get $2
+ local.get $0
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 2
+ i32.shr_u
+ i32.add
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $4
+ local.get $3
+ local.get $1
+ local.get $2
+ call $~lib/staticarray/StaticArray#__get
+ call $~lib/staticarray/StaticArray#__set
+ local.get $2
+ i32.const 1
+ i32.add
+ local.set $2
+ br $for-loop|1
+ end
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ br $__inlined_func$bindings/esm/staticarrayFunction$1
+ end
+ br $folding-inner1
+ end
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $5
return
end
i32.const 35072
@@ -3400,100 +3151,244 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:bindings/esm/stringFunction (param $0 i32) (param $1 i32) (result i32)
- (local $2 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 2276
- i32.lt_s
- if
- i32.const 35072
- i32.const 35120
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.tee $2
- local.get $0
- i32.store
- local.get $2
- local.get $1
- i32.store offset=4
- local.get $0
- local.get $1
- call $bindings/esm/stringFunction
- local.set $0
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $0
- )
- (func $export:bindings/esm/stringFunctionOptional@varargs (param $0 i32) (param $1 i32) (result i32)
+ (func $export:bindings/esm/objectFunction (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
+ (local $3 i32)
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
- block $folding-inner0
+ block $folding-inner1
global.get $~lib/memory/__stack_pointer
i32.const 2276
i32.lt_s
- br_if $folding-inner0
+ br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $2
local.get $0
i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ 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 2276
+ i32.lt_s
+ br_if $folding-inner1
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ block $__inlined_func$bindings/esm/PlainObject#constructor$4 (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner00
+ global.get $~lib/memory/__stack_pointer
+ i32.const 2276
+ i32.lt_s
+ br_if $folding-inner00
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 68
+ i32.const 13
+ call $~lib/rt/itcms/__new
+ local.tee $2
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ 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 2276
+ i32.lt_s
+ br_if $folding-inner00
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ local.get $2
+ i32.eqz
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 0
+ call $~lib/rt/itcms/__new
+ local.tee $2
+ i32.store
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store8
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store16 offset=2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i64.const 0
+ i64.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store8 offset=16
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store16 offset=18
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store offset=20
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i64.const 0
+ i64.store offset=24
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store offset=32
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store offset=36
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store8 offset=40
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ f32.const 0
+ f32.store offset=44
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ f64.const 0
+ f64.store offset=48
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store offset=56
+ local.get $2
+ i32.const 0
+ i32.const 0
+ call $~lib/rt/itcms/__link
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store offset=60
+ local.get $2
+ i32.const 0
+ i32.const 0
+ call $~lib/rt/itcms/__link
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store offset=64
+ local.get $2
+ i32.const 0
+ i32.const 0
+ call $~lib/rt/itcms/__link
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ br $__inlined_func$bindings/esm/PlainObject#constructor$4
+ end
+ br $folding-inner1
+ end
+ local.tee $2
+ i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $2
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=8
+ local.get $0
+ i32.load8_s
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
local.get $1
- i32.store offset=4
+ i32.store offset=8
local.get $2
- i32.const 12
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner0
+ local.get $3
+ local.get $1
+ i32.load8_s
+ i32.add
+ i32.store8
global.get $~lib/memory/__stack_pointer
- local.tee $2
- i64.const 0
- i64.store
local.get $2
- i32.const 0
- i32.store offset=8
- block $1of1
- block $0of1
- block $outOfRange
- global.get $~argumentsLength
- i32.const 1
- i32.sub
- br_table $0of1 $1of1 $outOfRange
- end
- unreachable
- end
- i32.const 1088
- local.set $1
- global.get $~lib/memory/__stack_pointer
- i32.const 1088
- i32.store
- end
+ i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.tee $2
local.get $0
- i32.store offset=4
- local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.load16_s offset=2
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
local.get $1
i32.store offset=8
+ local.get $2
local.get $0
local.get $1
- call $bindings/esm/stringFunction
- local.set $0
+ i32.load16_s offset=2
+ i32.add
+ i32.store16 offset=2
global.get $~lib/memory/__stack_pointer
i32.const 12
i32.add
@@ -3502,7 +3397,7 @@
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
+ local.get $2
return
end
i32.const 35072
@@ -3512,8 +3407,7 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:bindings/esm/typedarrayFunction (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
+ (func $export:bindings/esm/internrefFunction (param $0 i32) (param $1 i32) (result i32)
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
@@ -3530,23 +3424,18 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $2
local.get $0
i32.store
- local.get $2
+ global.get $~lib/memory/__stack_pointer
local.get $1
i32.store offset=4
- local.get $0
- local.get $1
- call $bindings/esm/typedarrayFunction
- local.set $0
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
local.get $0
)
- (func $export:bindings/esm/staticarrayFunction (param $0 i32) (param $1 i32) (result i32)
+ (func $export:bindings/esm/bufferFunction (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@@ -3555,189 +3444,101 @@
i32.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
- block $folding-inner1
+ block $folding-inner0
global.get $~lib/memory/__stack_pointer
i32.const 2276
i32.lt_s
- br_if $folding-inner1
+ br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $3
local.get $0
i32.store
- local.get $3
+ global.get $~lib/memory/__stack_pointer
local.get $1
i32.store offset=4
- block $__inlined_func$bindings/esm/staticarrayFunction$2 (result i32)
- local.get $3
- i32.const 12
- i32.sub
- global.set $~lib/memory/__stack_pointer
- block $folding-inner0
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $3
- i64.const 0
- i64.store
- local.get $3
- i32.const 0
- i32.store offset=8
- local.get $3
- local.get $0
- i32.store
- local.get $0
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const 2
- i32.shr_u
- local.set $4
- local.get $3
- local.get $1
- i32.store
- local.get $4
- local.get $1
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const 2
- i32.shr_u
- i32.add
- local.set $4
- local.get $3
- i32.const 4
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- i32.const 0
- i32.store
- local.get $4
- i32.const 268435455
- i32.gt_u
- if
- i32.const 1248
- i32.const 1856
- i32.const 51
- i32.const 60
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.get $4
- i32.const 2
- i32.shl
- i32.const 8
- call $~lib/rt/itcms/__new
- local.tee $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 $4
- i32.store offset=4
- loop $for-loop|0
- global.get $~lib/memory/__stack_pointer
- local.tee $3
- local.get $0
- i32.store
- local.get $2
- local.get $0
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const 2
- i32.shr_u
- i32.lt_s
- if
- local.get $3
- local.get $4
- i32.store
- local.get $3
- local.get $0
- i32.store offset=8
- local.get $4
- local.get $2
- local.get $0
- local.get $2
- call $~lib/staticarray/StaticArray#__get
- call $~lib/staticarray/StaticArray#__set
- local.get $2
- i32.const 1
- i32.add
- local.set $2
- br $for-loop|0
- end
- end
- i32.const 0
- local.set $2
- loop $for-loop|1
- global.get $~lib/memory/__stack_pointer
- local.tee $3
- local.get $1
- i32.store
- local.get $2
- local.get $1
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const 2
- i32.shr_u
- i32.lt_s
- if
- local.get $3
- local.get $4
- i32.store
- local.get $3
- local.get $0
- i32.store offset=8
- local.get $2
- local.get $0
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const 2
- i32.shr_u
- i32.add
- local.set $5
- local.get $3
- local.get $1
- i32.store offset=8
- local.get $4
- local.get $5
- local.get $1
- local.get $2
- call $~lib/staticarray/StaticArray#__get
- call $~lib/staticarray/StaticArray#__set
- local.get $2
- i32.const 1
- i32.add
- local.set $2
- br $for-loop|1
- end
- end
- global.get $~lib/memory/__stack_pointer
- i32.const 12
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $4
- br $__inlined_func$bindings/esm/staticarrayFunction$2
- end
- br $folding-inner1
+ 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 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store
+ local.get $1
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ local.tee $4
+ local.get $2
+ i32.add
+ local.set $5
+ 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 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ local.get $5
+ i32.const 1073741820
+ i32.gt_u
+ if
+ i32.const 1248
+ i32.const 1296
+ i32.const 52
+ i32.const 43
+ call $~lib/builtins/abort
+ unreachable
end
- local.set $0
global.get $~lib/memory/__stack_pointer
- i32.const 8
+ local.get $5
+ i32.const 1
+ call $~lib/rt/itcms/__new
+ local.tee $5
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
+ local.get $5
+ i32.store offset=4
+ local.get $5
local.get $0
+ local.get $2
+ memory.copy
+ local.get $2
+ local.get $5
+ i32.add
+ local.get $1
+ local.get $4
+ memory.copy
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $5
return
end
i32.const 35072
@@ -3747,34 +3548,7 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:bindings/esm/staticarrayU16 (param $0 i32) (result i32)
- (local $1 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 2276
- i32.lt_s
- if
- i32.const 35072
- i32.const 35120
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.tee $1
- local.get $0
- i32.store
- local.get $1
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $0
- )
- (func $export:bindings/esm/arrayFunction (param $0 i32) (param $1 i32) (result i32)
+ (func $export:bindings/esm/arrayOfStringsFunction (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@@ -3790,14 +3564,13 @@
i32.lt_s
br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $3
local.get $0
i32.store
- local.get $3
+ global.get $~lib/memory/__stack_pointer
local.get $1
i32.store offset=4
- local.get $3
- i32.const 12
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
@@ -3805,27 +3578,26 @@
i32.lt_s
br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $3
i64.const 0
i64.store
- local.get $3
- i32.const 0
- i32.store offset=8
- local.get $3
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=8
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
call $~lib/array/Array#get:length
local.set $4
global.get $~lib/memory/__stack_pointer
local.get $1
i32.store
- local.get $3
local.get $1
call $~lib/array/Array#get:length
local.get $4
i32.add
- local.set $5
+ local.set $4
global.get $~lib/memory/__stack_pointer
i32.const 16
i32.sub
@@ -3835,47 +3607,46 @@
i32.lt_s
br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $3
i64.const 0
i64.store
- local.get $3
+ global.get $~lib/memory/__stack_pointer
i64.const 0
i64.store offset=8
- local.get $3
+ global.get $~lib/memory/__stack_pointer
i32.const 16
- i32.const 11
+ i32.const 12
call $~lib/rt/itcms/__new
- local.tee $6
+ local.tee $5
i32.store
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
- local.get $6
+ local.get $5
i32.const 0
i32.store
- local.get $6
+ local.get $5
i32.const 0
i32.const 0
call $~lib/rt/itcms/__link
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
- local.get $6
+ local.get $5
i32.const 0
i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
- local.get $6
+ local.get $5
i32.const 0
i32.store offset=8
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
- local.get $6
+ local.get $5
i32.const 0
i32.store offset=12
- local.get $5
+ local.get $4
i32.const 268435455
i32.gt_u
if
@@ -3888,54 +3659,54 @@
end
global.get $~lib/memory/__stack_pointer
i32.const 8
- local.get $5
- local.get $5
+ local.get $4
+ local.get $4
i32.const 8
i32.le_u
select
i32.const 2
i32.shl
- local.tee $3
+ local.tee $6
i32.const 1
call $~lib/rt/itcms/__new
- local.tee $4
+ local.tee $3
i32.store offset=8
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $4
+ local.get $3
i32.store offset=12
- local.get $6
- local.get $4
+ local.get $5
+ local.get $3
i32.store
- local.get $6
- local.get $4
+ local.get $5
+ local.get $3
i32.const 0
call $~lib/rt/itcms/__link
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
- local.get $6
- local.get $4
+ local.get $5
+ local.get $3
i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
+ local.get $5
local.get $6
- local.get $3
i32.store offset=8
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
- local.get $6
local.get $5
+ local.get $4
i32.store offset=12
global.get $~lib/memory/__stack_pointer
i32.const 16
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
loop $for-loop|0
global.get $~lib/memory/__stack_pointer
@@ -3947,17 +3718,22 @@
i32.gt_s
if
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=8
- local.get $6
- local.get $2
+ i32.store offset=12
local.get $0
local.get $2
- call $~lib/array/Array#__get
- call $~lib/array/Array#__set
+ call $~lib/array/Array<~lib/string/String>#__get
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ local.get $3
+ i32.store offset=8
+ local.get $5
+ local.get $2
+ local.get $3
+ call $~lib/array/Array<~lib/string/String>#__set
local.get $2
i32.const 1
i32.add
@@ -3977,11 +3753,11 @@
i32.gt_s
if
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=8
+ i32.store offset=12
local.get $0
call $~lib/array/Array#get:length
local.get $2
@@ -3989,13 +3765,18 @@
local.set $3
global.get $~lib/memory/__stack_pointer
local.get $1
- i32.store offset=8
- local.get $6
- local.get $3
+ i32.store offset=12
local.get $1
local.get $2
- call $~lib/array/Array#__get
- call $~lib/array/Array#__set
+ call $~lib/array/Array<~lib/string/String>#__get
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store offset=8
+ local.get $5
+ local.get $3
+ local.get $4
+ call $~lib/array/Array<~lib/string/String>#__set
local.get $2
i32.const 1
i32.add
@@ -4004,14 +3785,14 @@
end
end
global.get $~lib/memory/__stack_pointer
- i32.const 12
+ i32.const 16
i32.add
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
return
end
i32.const 35072
@@ -4021,7 +3802,7 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:bindings/esm/arrayOfStringsFunction (param $0 i32) (param $1 i32) (result i32)
+ (func $export:bindings/esm/arrayFunction (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@@ -4037,14 +3818,13 @@
i32.lt_s
br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $3
local.get $0
i32.store
- local.get $3
+ global.get $~lib/memory/__stack_pointer
local.get $1
i32.store offset=4
- local.get $3
- i32.const 16
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
@@ -4052,27 +3832,26 @@
i32.lt_s
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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
call $~lib/array/Array#get:length
local.set $4
global.get $~lib/memory/__stack_pointer
local.get $1
i32.store
- local.get $3
local.get $1
call $~lib/array/Array#get:length
local.get $4
i32.add
- local.set $4
+ local.set $5
global.get $~lib/memory/__stack_pointer
i32.const 16
i32.sub
@@ -4082,47 +3861,46 @@
i32.lt_s
br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $3
i64.const 0
i64.store
- local.get $3
+ global.get $~lib/memory/__stack_pointer
i64.const 0
i64.store offset=8
- local.get $3
+ global.get $~lib/memory/__stack_pointer
i32.const 16
- i32.const 12
+ i32.const 11
call $~lib/rt/itcms/__new
- local.tee $5
+ local.tee $6
i32.store
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
- local.get $5
+ local.get $6
i32.const 0
i32.store
- local.get $5
+ local.get $6
i32.const 0
i32.const 0
call $~lib/rt/itcms/__link
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
- local.get $5
+ local.get $6
i32.const 0
i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
- local.get $5
+ local.get $6
i32.const 0
i32.store offset=8
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
- local.get $5
+ local.get $6
i32.const 0
i32.store offset=12
- local.get $4
+ local.get $5
i32.const 268435455
i32.gt_u
if
@@ -4135,54 +3913,54 @@
end
global.get $~lib/memory/__stack_pointer
i32.const 8
- local.get $4
- local.get $4
+ local.get $5
+ local.get $5
i32.const 8
i32.le_u
select
i32.const 2
i32.shl
- local.tee $6
+ local.tee $3
i32.const 1
call $~lib/rt/itcms/__new
- local.tee $3
+ local.tee $4
i32.store offset=8
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $3
+ local.get $4
i32.store offset=12
- local.get $5
- local.get $3
+ local.get $6
+ local.get $4
i32.store
- local.get $5
- local.get $3
+ local.get $6
+ local.get $4
i32.const 0
call $~lib/rt/itcms/__link
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
- local.get $5
- local.get $3
+ local.get $6
+ local.get $4
i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
- local.get $5
local.get $6
+ local.get $3
i32.store offset=8
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
+ local.get $6
local.get $5
- local.get $4
i32.store offset=12
global.get $~lib/memory/__stack_pointer
i32.const 16
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
loop $for-loop|0
global.get $~lib/memory/__stack_pointer
@@ -4194,22 +3972,17 @@
i32.gt_s
if
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=12
- local.get $0
- local.get $2
- call $~lib/array/Array<~lib/string/String>#__get
- local.set $3
- global.get $~lib/memory/__stack_pointer
- local.get $3
i32.store offset=8
- local.get $5
+ local.get $6
local.get $2
- local.get $3
- call $~lib/array/Array<~lib/string/String>#__set
+ local.get $0
+ local.get $2
+ call $~lib/array/Array#__get
+ call $~lib/array/Array#__set
local.get $2
i32.const 1
i32.add
@@ -4229,11 +4002,11 @@
i32.gt_s
if
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=12
+ i32.store offset=8
local.get $0
call $~lib/array/Array#get:length
local.get $2
@@ -4241,18 +4014,13 @@
local.set $3
global.get $~lib/memory/__stack_pointer
local.get $1
- i32.store offset=12
- local.get $1
- local.get $2
- call $~lib/array/Array<~lib/string/String>#__get
- local.set $4
- global.get $~lib/memory/__stack_pointer
- local.get $4
i32.store offset=8
- local.get $5
+ local.get $6
local.get $3
- local.get $4
- call $~lib/array/Array<~lib/string/String>#__set
+ local.get $1
+ local.get $2
+ call $~lib/array/Array#__get
+ call $~lib/array/Array#__set
local.get $2
i32.const 1
i32.add
@@ -4261,14 +4029,14 @@
end
end
global.get $~lib/memory/__stack_pointer
- i32.const 16
+ i32.const 12
i32.add
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
return
end
i32.const 35072
@@ -4278,12 +4046,15 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:bindings/esm/objectFunction (param $0 i32) (param $1 i32) (result i32)
+ (func $bindings/esm/typedarrayFunction (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
- (local $4 i32)
+ (local $4 f32)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 i32)
global.get $~lib/memory/__stack_pointer
- i32.const 8
+ i32.const 12
i32.sub
global.set $~lib/memory/__stack_pointer
block $folding-inner1
@@ -4292,31 +4063,27 @@
i32.lt_s
br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $2
- local.get $0
- i32.store
- local.get $2
- local.get $1
- i32.store offset=4
- local.get $2
- i32.const 12
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner1
- local.get $0
- local.set $2
- global.get $~lib/memory/__stack_pointer
- local.tee $0
i64.const 0
i64.store
- local.get $0
+ global.get $~lib/memory/__stack_pointer
i32.const 0
i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
local.get $0
- block $__inlined_func$bindings/esm/PlainObject#constructor$5 (result i32)
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ call $~lib/typedarray/Int16Array#get:length
+ local.set $5
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store
+ block $__inlined_func$~lib/typedarray/Uint64Array#constructor (result i32)
+ local.get $1
+ call $~lib/typedarray/Float32Array#get:length
+ local.get $5
+ i32.add
+ local.set $5
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
@@ -4327,21 +4094,20 @@
i32.lt_s
br_if $folding-inner00
global.get $~lib/memory/__stack_pointer
- local.tee $0
i64.const 0
i64.store
- local.get $0
- i32.const 68
- i32.const 13
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.const 7
call $~lib/rt/itcms/__new
- local.tee $0
+ local.tee $2
i32.store
global.get $~lib/memory/__stack_pointer
- local.tee $3
- local.get $0
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
i32.store offset=4
- local.get $3
- i32.const 4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
@@ -4349,191 +4115,260 @@
i32.lt_s
br_if $folding-inner00
global.get $~lib/memory/__stack_pointer
- local.tee $4
- i32.const 0
- i32.store
- local.get $0
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=8
+ local.get $2
i32.eqz
if
- local.get $4
- i32.const 0
- i32.const 0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.const 3
call $~lib/rt/itcms/__new
- local.tee $0
+ local.tee $2
i32.store
end
global.get $~lib/memory/__stack_pointer
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $3
- local.get $0
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
i32.store
+ local.get $2
+ i32.const 0
+ i32.const 0
+ call $~lib/rt/itcms/__link
global.get $~lib/memory/__stack_pointer
- local.get $0
+ local.get $2
i32.store offset=4
- local.get $0
+ local.get $2
i32.const 0
- i32.store8
+ i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $0
+ local.get $2
i32.store offset=4
- local.get $0
+ local.get $2
i32.const 0
- i32.store16 offset=2
+ i32.store offset=8
+ local.get $5
+ i32.const 134217727
+ i32.gt_u
+ if
+ i32.const 1248
+ i32.const 1296
+ i32.const 19
+ i32.const 57
+ call $~lib/builtins/abort
+ unreachable
+ end
global.get $~lib/memory/__stack_pointer
- local.get $0
+ local.get $5
+ i32.const 3
+ i32.shl
+ local.tee $7
+ i32.const 1
+ call $~lib/rt/itcms/__new
+ local.tee $5
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
i32.store offset=4
- local.get $0
+ global.get $~lib/memory/__stack_pointer
+ local.get $5
+ i32.store offset=12
+ local.get $2
+ local.get $5
+ i32.store
+ local.get $2
+ local.get $5
i32.const 0
+ call $~lib/rt/itcms/__link
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ local.get $5
i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $0
+ local.get $2
i32.store offset=4
+ local.get $2
+ local.get $7
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ br $__inlined_func$~lib/typedarray/Uint64Array#constructor
+ end
+ br $folding-inner1
+ end
+ local.tee $2
+ i32.store offset=4
+ loop $for-loop|0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ call $~lib/typedarray/Int16Array#get:length
+ local.get $3
+ i32.gt_s
+ if
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
- i64.const 0
- i64.store offset=8
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store8 offset=16
+ i32.const 2276
+ i32.lt_s
+ br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
i32.const 0
- i32.store16 offset=18
+ i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=4
+ i32.store
+ local.get $3
local.get $0
- i32.const 0
- i32.store offset=20
+ i32.load offset=8
+ i32.const 1
+ i32.shr_u
+ i32.ge_u
+ if
+ i32.const 1552
+ i32.const 1792
+ i32.const 452
+ i32.const 64
+ call $~lib/builtins/abort
+ unreachable
+ end
global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=4
+ i32.store
local.get $0
- i64.const 0
- i64.store offset=24
+ i32.load offset=4
+ local.get $3
+ i32.const 1
+ i32.shl
+ i32.add
+ i32.load16_s
+ local.set $5
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=32
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ local.get $3
+ local.get $5
+ i64.extend_i32_s
+ call $~lib/typedarray/Uint64Array#__set
+ local.get $3
+ i32.const 1
+ i32.add
+ local.set $3
+ br $for-loop|0
+ end
+ end
+ i32.const 0
+ local.set $3
+ loop $for-loop|1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store
+ local.get $1
+ call $~lib/typedarray/Float32Array#get:length
+ local.get $3
+ i32.gt_s
+ if
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=36
+ local.get $2
+ i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=4
+ i32.store offset=8
local.get $0
- i32.const 0
- i32.store8 offset=40
+ call $~lib/typedarray/Int16Array#get:length
+ local.get $3
+ i32.add
+ local.set $5
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- f32.const 0
- f32.store offset=44
+ local.get $1
+ i32.store offset=8
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- f64.const 0
- f64.store offset=48
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=56
- local.get $0
- i32.const 0
- i32.const 0
- call $~lib/rt/itcms/__link
+ i32.const 2276
+ i32.lt_s
+ br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=60
- local.get $0
i32.const 0
- i32.const 0
- call $~lib/rt/itcms/__link
+ i32.store
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=64
- local.get $0
- i32.const 0
- i32.const 0
- call $~lib/rt/itcms/__link
+ local.get $1
+ i32.store
+ local.get $3
+ local.get $1
+ i32.load offset=8
+ i32.const 2
+ i32.shr_u
+ i32.ge_u
+ if
+ i32.const 1552
+ i32.const 1792
+ i32.const 1304
+ i32.const 64
+ call $~lib/builtins/abort
+ unreachable
+ end
global.get $~lib/memory/__stack_pointer
- i32.const 8
+ local.get $1
+ i32.store
+ local.get $1
+ i32.load offset=4
+ local.get $3
+ i32.const 2
+ i32.shl
+ i32.add
+ f32.load
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
- br $__inlined_func$bindings/esm/PlainObject#constructor$5
+ local.get $2
+ local.get $5
+ local.get $4
+ i64.trunc_sat_f32_u
+ call $~lib/typedarray/Uint64Array#__set
+ local.get $3
+ i32.const 1
+ i32.add
+ local.set $3
+ br $for-loop|1
end
- br $folding-inner1
end
- local.tee $0
- i32.store
global.get $~lib/memory/__stack_pointer
- local.tee $3
- local.get $0
- i32.store offset=4
- local.get $3
- local.get $2
- i32.store offset=8
- local.get $2
- i32.load8_s
- local.set $4
- local.get $3
- local.get $1
- i32.store offset=8
- local.get $0
- local.get $4
- local.get $1
- i32.load8_s
- i32.add
- i32.store8
- local.get $3
- local.get $0
- i32.store offset=4
- local.get $3
- local.get $2
- i32.store offset=8
- local.get $2
- i32.load16_s offset=2
- local.set $2
- local.get $3
- local.get $1
- i32.store offset=8
- local.get $0
- local.get $2
- local.get $1
- i32.load16_s offset=2
- i32.add
- i32.store16 offset=2
- local.get $3
i32.const 12
i32.add
global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $0
+ local.get $2
return
end
i32.const 35072
@@ -4543,10 +4378,20 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:bindings/esm/internrefFunction (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
+ (func $bindings/esm/plainFunction64 (param $0 i64) (param $1 i64) (result i64)
+ local.get $0
+ local.get $1
+ i64.add
+ )
+ (func $bindings/esm/plainFunction (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ local.get $1
+ i32.add
+ )
+ (func $bindings/esm/newInternref (result i32)
+ (local $0 i32)
global.get $~lib/memory/__stack_pointer
- i32.const 8
+ i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
@@ -4561,16 +4406,24 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $2
- local.get $0
+ i32.const 0
i32.store
- local.get $2
- local.get $1
- i32.store offset=4
- local.get $2
- i32.const 8
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 15
+ call $~lib/rt/itcms/__new
+ local.tee $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
local.get $0
)
+ (func $bindings/esm/getMaxUnsigned64 (result i64)
+ i64.const -1
+ )
+ (func $bindings/esm/getMaxUnsigned32 (result i32)
+ i32.const -1
+ )
)
diff --git a/tests/compiler/bindings/noExportRuntime.debug.js b/tests/compiler/bindings/noExportRuntime.debug.js
index 9db98d97b4..bdf08ae5ff 100644
--- a/tests/compiler/bindings/noExportRuntime.debug.js
+++ b/tests/compiler/bindings/noExportRuntime.debug.js
@@ -1,6 +1,6 @@
async function instantiate(module, imports = {}) {
const adaptedImports = {
- env: Object.assign(Object.create(globalThis), imports.env || {}, {
+ env: Object.setPrototypeOf({
abort(message, fileName, lineNumber, columnNumber) {
// ~lib/builtins/abort(~lib/string/String | null?, ~lib/string/String | null?, u32?, u32?) => void
message = __liftString(message >>> 0);
@@ -12,7 +12,7 @@ async function instantiate(module, imports = {}) {
throw Error(`${message} in ${fileName}:${lineNumber}:${columnNumber}`);
})();
},
- }),
+ }, Object.assign(Object.create(globalThis), imports.env || {})),
};
const { exports } = await WebAssembly.instantiate(module, adaptedImports);
const memory = exports.memory || imports.env.memory;
@@ -162,8 +162,9 @@ export const {
takesFunction,
} = await (async url => instantiate(
await (async () => {
- try { return await globalThis.WebAssembly.compileStreaming(globalThis.fetch(url)); }
- catch { return globalThis.WebAssembly.compile(await (await import("node:fs/promises")).readFile(url)); }
+ const isNodeOrBun = typeof process != "undefined" && process.versions != null && (process.versions.node != null || process.versions.bun != null);
+ if (isNodeOrBun) { return globalThis.WebAssembly.compile(await (await import("node:fs/promises")).readFile(url)); }
+ else { return await globalThis.WebAssembly.compileStreaming(globalThis.fetch(url)); }
})(), {
}
))(new URL("noExportRuntime.debug.wasm", import.meta.url));
diff --git a/tests/compiler/bindings/noExportRuntime.debug.wat b/tests/compiler/bindings/noExportRuntime.debug.wat
index bfe4a74937..ba2e2f6010 100644
--- a/tests/compiler/bindings/noExportRuntime.debug.wat
+++ b/tests/compiler/bindings/noExportRuntime.debug.wat
@@ -1650,14 +1650,17 @@
if
i32.const 0
drop
+ i32.const 200
+ i32.const 100
+ i32.rem_u
+ i32.const 0
+ i32.eq
+ drop
global.get $~lib/rt/itcms/total
- i64.extend_i32_u
i32.const 200
- i64.extend_i32_u
- i64.mul
- i64.const 100
- i64.div_u
- i32.wrap_i64
+ i32.const 100
+ i32.div_u
+ i32.mul
i32.const 1024
i32.add
global.set $~lib/rt/itcms/threshold
@@ -2361,8 +2364,6 @@
(func $start:bindings/noExportRuntime
(local $0 i32)
(local $1 i32)
- (local $2 i32)
- (local $3 i32)
memory.size
i32.const 16
i32.shl
@@ -2471,12 +2472,8 @@
call $~lib/object/Object~visit
local.get $0
i32.load
- local.tee $2
- if
- local.get $2
- local.get $1
- call $~lib/rt/itcms/__visit
- end
+ local.get $1
+ call $~lib/rt/itcms/__visit
)
(func $~lib/object/Object~visit (param $0 i32) (param $1 i32)
)
diff --git a/tests/compiler/bindings/noExportRuntime.release.js b/tests/compiler/bindings/noExportRuntime.release.js
index de99664237..24a1b9596b 100644
--- a/tests/compiler/bindings/noExportRuntime.release.js
+++ b/tests/compiler/bindings/noExportRuntime.release.js
@@ -1,6 +1,6 @@
async function instantiate(module, imports = {}) {
const adaptedImports = {
- env: Object.assign(Object.create(globalThis), imports.env || {}, {
+ env: Object.setPrototypeOf({
abort(message, fileName, lineNumber, columnNumber) {
// ~lib/builtins/abort(~lib/string/String | null?, ~lib/string/String | null?, u32?, u32?) => void
message = __liftString(message >>> 0);
@@ -12,7 +12,7 @@ async function instantiate(module, imports = {}) {
throw Error(`${message} in ${fileName}:${lineNumber}:${columnNumber}`);
})();
},
- }),
+ }, Object.assign(Object.create(globalThis), imports.env || {})),
};
const { exports } = await WebAssembly.instantiate(module, adaptedImports);
const memory = exports.memory || imports.env.memory;
@@ -162,8 +162,9 @@ export const {
takesFunction,
} = await (async url => instantiate(
await (async () => {
- try { return await globalThis.WebAssembly.compileStreaming(globalThis.fetch(url)); }
- catch { return globalThis.WebAssembly.compile(await (await import("node:fs/promises")).readFile(url)); }
+ const isNodeOrBun = typeof process != "undefined" && process.versions != null && (process.versions.node != null || process.versions.bun != null);
+ if (isNodeOrBun) { return globalThis.WebAssembly.compile(await (await import("node:fs/promises")).readFile(url)); }
+ else { return await globalThis.WebAssembly.compileStreaming(globalThis.fetch(url)); }
})(), {
}
))(new URL("noExportRuntime.release.wasm", import.meta.url));
diff --git a/tests/compiler/bindings/noExportRuntime.release.wat b/tests/compiler/bindings/noExportRuntime.release.wat
index ae70539bb7..8db482731d 100644
--- a/tests/compiler/bindings/noExportRuntime.release.wat
+++ b/tests/compiler/bindings/noExportRuntime.release.wat
@@ -1,8 +1,8 @@
(module
(type $0 (func (result i32)))
(type $1 (func (param i32)))
- (type $2 (func))
- (type $3 (func (param i32 i32)))
+ (type $2 (func (param i32 i32)))
+ (type $3 (func))
(type $4 (func (param i32 i32) (result i32)))
(type $5 (func (param i32 i32 i32 i32)))
(type $6 (func (param i32 i32 i64)))
@@ -68,203 +68,6 @@
(export "_start" (func $~start))
(export "takesNonPlainObject" (func $export:bindings/noExportRuntime/takesNonPlainObject))
(export "takesFunction" (func $export:bindings/noExportRuntime/takesNonPlainObject))
- (func $~lib/rt/itcms/visitRoots
- (local $0 i32)
- (local $1 i32)
- i32.const 1056
- call $~lib/rt/itcms/__visit
- global.get $bindings/noExportRuntime/isBuffer
- local.tee $0
- if
- local.get $0
- call $~lib/rt/itcms/__visit
- end
- global.get $bindings/noExportRuntime/isTypedArray
- local.tee $0
- if
- local.get $0
- call $~lib/rt/itcms/__visit
- end
- i32.const 1632
- call $~lib/rt/itcms/__visit
- i32.const 1712
- call $~lib/rt/itcms/__visit
- i32.const 1392
- call $~lib/rt/itcms/__visit
- i32.const 1088
- call $~lib/rt/itcms/__visit
- i32.const 1200
- call $~lib/rt/itcms/__visit
- global.get $~lib/rt/itcms/pinSpace
- local.tee $1
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- loop $while-continue|0
- local.get $0
- local.get $1
- i32.ne
- if
- local.get $0
- i32.load offset=4
- i32.const 3
- i32.and
- i32.const 3
- i32.ne
- if
- i32.const 0
- i32.const 1264
- i32.const 160
- i32.const 16
- call $~lib/builtins/abort
- unreachable
- end
- local.get $0
- i32.const 20
- i32.add
- call $~lib/rt/__visit_members
- local.get $0
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- br $while-continue|0
- end
- end
- )
- (func $~lib/rt/itcms/Object#makeGray (param $0 i32)
- (local $1 i32)
- (local $2 i32)
- (local $3 i32)
- local.get $0
- global.get $~lib/rt/itcms/iter
- i32.eq
- if
- local.get $0
- i32.load offset=8
- local.tee $1
- i32.eqz
- if
- i32.const 0
- i32.const 1264
- i32.const 148
- i32.const 30
- call $~lib/builtins/abort
- unreachable
- end
- local.get $1
- global.set $~lib/rt/itcms/iter
- end
- block $__inlined_func$~lib/rt/itcms/Object#unlink$130
- local.get $0
- i32.load offset=4
- i32.const -4
- i32.and
- local.tee $1
- i32.eqz
- if
- local.get $0
- i32.load offset=8
- i32.eqz
- local.get $0
- i32.const 34548
- i32.lt_u
- i32.and
- i32.eqz
- if
- i32.const 0
- i32.const 1264
- i32.const 128
- i32.const 18
- call $~lib/builtins/abort
- unreachable
- end
- br $__inlined_func$~lib/rt/itcms/Object#unlink$130
- end
- local.get $0
- i32.load offset=8
- local.tee $2
- i32.eqz
- if
- i32.const 0
- i32.const 1264
- i32.const 132
- i32.const 16
- call $~lib/builtins/abort
- unreachable
- end
- local.get $1
- local.get $2
- i32.store offset=8
- local.get $2
- local.get $1
- local.get $2
- i32.load offset=4
- i32.const 3
- i32.and
- i32.or
- i32.store offset=4
- end
- global.get $~lib/rt/itcms/toSpace
- local.set $2
- local.get $0
- i32.load offset=12
- local.tee $1
- i32.const 2
- i32.le_u
- if (result i32)
- i32.const 1
- else
- local.get $1
- i32.const 1744
- i32.load
- i32.gt_u
- if
- i32.const 1392
- i32.const 1456
- i32.const 21
- i32.const 28
- call $~lib/builtins/abort
- unreachable
- end
- local.get $1
- i32.const 2
- i32.shl
- i32.const 1748
- i32.add
- i32.load
- i32.const 32
- i32.and
- end
- local.set $3
- local.get $2
- i32.load offset=8
- local.set $1
- local.get $0
- global.get $~lib/rt/itcms/white
- i32.eqz
- i32.const 2
- local.get $3
- select
- local.get $2
- i32.or
- i32.store offset=4
- local.get $0
- local.get $1
- i32.store offset=8
- local.get $1
- local.get $0
- local.get $1
- i32.load offset=4
- i32.const 3
- i32.and
- i32.or
- i32.store offset=4
- local.get $2
- local.get $0
- i32.store offset=8
- )
(func $~lib/rt/itcms/__visit (param $0 i32)
local.get $0
i32.eqz
@@ -289,330 +92,387 @@
global.set $~lib/rt/itcms/visitCount
end
)
- (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32)
+ (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
- local.get $1
- i32.load
- local.tee $3
- i32.const 1
- i32.and
- i32.eqz
+ (local $6 i32)
+ local.get $0
+ i32.const 1073741804
+ i32.ge_u
if
- i32.const 0
- i32.const 1536
- i32.const 268
- i32.const 14
+ i32.const 1200
+ i32.const 1264
+ i32.const 261
+ i32.const 31
call $~lib/builtins/abort
unreachable
end
- local.get $3
- i32.const -4
- i32.and
- local.tee $3
- i32.const 12
- i32.lt_u
+ global.get $~lib/rt/itcms/total
+ global.get $~lib/rt/itcms/threshold
+ i32.ge_u
if
- i32.const 0
- i32.const 1536
- i32.const 270
- i32.const 14
- call $~lib/builtins/abort
- unreachable
- end
- local.get $3
- i32.const 256
- i32.lt_u
- if (result i32)
- local.get $3
- i32.const 4
- i32.shr_u
- else
- i32.const 31
- i32.const 1073741820
- local.get $3
- local.get $3
- i32.const 1073741820
- i32.ge_u
- select
- local.tee $3
- i32.clz
- i32.sub
- 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
+ block $__inlined_func$~lib/rt/itcms/interrupt$69
+ 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
+ i32.const 1
+ i32.shl
+ i32.const 1024
+ i32.add
+ global.set $~lib/rt/itcms/threshold
+ br $__inlined_func$~lib/rt/itcms/interrupt$69
+ end
+ local.get $2
+ i32.const 0
+ i32.gt_s
+ br_if $do-loop|0
+ end
+ global.get $~lib/rt/itcms/total
+ global.get $~lib/rt/itcms/total
+ 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
- local.tee $3
- i32.const 16
- i32.lt_u
- local.get $2
- i32.const 23
- i32.lt_u
- i32.and
+ global.get $~lib/rt/tlsf/ROOT
i32.eqz
if
- i32.const 0
+ call $~lib/rt/tlsf/initialize
+ end
+ global.get $~lib/rt/tlsf/ROOT
+ local.set $4
+ local.get $0
+ i32.const 16
+ i32.add
+ local.tee $2
+ i32.const 1073741820
+ i32.gt_u
+ if
+ i32.const 1200
i32.const 1536
- i32.const 284
- i32.const 14
+ i32.const 461
+ i32.const 29
call $~lib/builtins/abort
unreachable
end
- local.get $1
- i32.load offset=8
- local.set $5
- local.get $1
- i32.load offset=4
- local.tee $4
- if
- local.get $4
- local.get $5
- i32.store offset=8
+ local.get $4
+ 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
- local.get $5
+ local.tee $5
+ call $~lib/rt/tlsf/searchBlock
+ local.tee $2
+ i32.eqz
if
local.get $5
+ i32.const 256
+ i32.ge_u
+ if (result i32)
+ local.get $5
+ i32.const 536870910
+ i32.lt_u
+ if (result i32)
+ local.get $5
+ i32.const 1
+ i32.const 27
+ local.get $5
+ i32.clz
+ i32.sub
+ i32.shl
+ i32.add
+ i32.const 1
+ i32.sub
+ else
+ local.get $5
+ end
+ else
+ local.get $5
+ end
+ i32.const 4
local.get $4
- i32.store offset=4
- end
- local.get $1
- local.get $0
- local.get $2
- i32.const 4
- i32.shl
- local.get $3
- i32.add
- i32.const 2
- i32.shl
- i32.add
- local.tee $1
- i32.load offset=96
- i32.eq
- if
- local.get $1
- local.get $5
- i32.store offset=96
- local.get $5
- i32.eqz
+ i32.load offset=1568
+ memory.size
+ local.tee $2
+ i32.const 16
+ i32.shl
+ i32.const 4
+ i32.sub
+ i32.ne
+ i32.shl
+ i32.add
+ i32.const 65535
+ i32.add
+ i32.const -65536
+ i32.and
+ i32.const 16
+ i32.shr_u
+ local.set $3
+ local.get $2
+ local.get $3
+ local.get $2
+ local.get $3
+ i32.gt_s
+ select
+ memory.grow
+ i32.const 0
+ i32.lt_s
if
- local.get $0
- local.get $2
- i32.const 2
- i32.shl
- i32.add
- local.tee $1
- i32.load offset=4
- i32.const -2
- local.get $3
- i32.rotl
- i32.and
- local.set $3
- local.get $1
local.get $3
- i32.store offset=4
- local.get $3
- i32.eqz
+ memory.grow
+ i32.const 0
+ i32.lt_s
if
- local.get $0
- local.get $0
- i32.load
- i32.const -2
- local.get $2
- i32.rotl
- i32.and
- i32.store
+ unreachable
end
end
+ local.get $4
+ local.get $2
+ i32.const 16
+ i32.shl
+ memory.size
+ i64.extend_i32_s
+ i64.const 16
+ i64.shl
+ call $~lib/rt/tlsf/addMemory
+ local.get $4
+ local.get $5
+ call $~lib/rt/tlsf/searchBlock
+ local.tee $2
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1536
+ i32.const 499
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ 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.get $1
- i32.eqz
+ local.get $5
+ local.get $2
+ i32.load
+ i32.const -4
+ i32.and
+ i32.gt_u
if
i32.const 0
i32.const 1536
- i32.const 201
+ i32.const 501
i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $1
+ local.get $4
+ local.get $2
+ call $~lib/rt/tlsf/removeBlock
+ local.get $2
i32.load
- local.tee $3
- i32.const 1
+ local.set $6
+ local.get $5
+ i32.const 4
+ i32.add
+ i32.const 15
i32.and
- i32.eqz
if
i32.const 0
i32.const 1536
- i32.const 203
+ i32.const 361
i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $1
- i32.const 4
- i32.add
- local.get $1
- i32.load
+ local.get $6
i32.const -4
i32.and
- i32.add
- local.tee $4
- i32.load
- local.tee $2
- i32.const 1
- i32.and
+ local.get $5
+ i32.sub
+ local.tee $3
+ i32.const 16
+ i32.ge_u
if
- local.get $0
- local.get $4
- call $~lib/rt/tlsf/removeBlock
- local.get $1
- local.get $3
- i32.const 4
- i32.add
local.get $2
- i32.const -4
+ local.get $5
+ local.get $6
+ i32.const 2
i32.and
- i32.add
- local.tee $3
+ i32.or
i32.store
- local.get $1
+ local.get $2
i32.const 4
i32.add
- local.get $1
- i32.load
- i32.const -4
- i32.and
+ local.get $5
i32.add
- local.tee $4
- i32.load
- local.set $2
- end
- local.get $3
- i32.const 2
- i32.and
- if
- local.get $1
+ local.tee $5
+ local.get $3
i32.const 4
i32.sub
- i32.load
- local.tee $1
- i32.load
- local.tee $6
i32.const 1
- i32.and
- i32.eqz
- if
- i32.const 0
- i32.const 1536
- i32.const 221
- i32.const 16
- call $~lib/builtins/abort
- unreachable
- end
- local.get $0
- local.get $1
- call $~lib/rt/tlsf/removeBlock
- local.get $1
+ i32.or
+ i32.store
+ local.get $4
+ local.get $5
+ call $~lib/rt/tlsf/insertBlock
+ else
+ local.get $2
local.get $6
+ i32.const -2
+ i32.and
+ i32.store
+ local.get $2
i32.const 4
i32.add
- local.get $3
+ 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 $4
local.get $2
- i32.const 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
+ local.get $1
+ global.get $~lib/rt/itcms/white
i32.or
- i32.store
+ i32.store offset=4
+ local.get $2
+ local.get $3
+ i32.store offset=8
+ local.get $3
+ local.get $2
local.get $3
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ 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
- local.tee $2
- i32.const 12
- i32.lt_u
+ 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
+ memory.fill
+ local.get $1
+ )
+ (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 $3
+ i32.const 1
+ i32.and
+ i32.eqz
if
i32.const 0
i32.const 1536
- i32.const 233
+ i32.const 268
i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $4
- local.get $1
- i32.const 4
- i32.add
- local.get $2
- i32.add
- i32.ne
+ local.get $3
+ i32.const -4
+ i32.and
+ local.tee $3
+ i32.const 12
+ i32.lt_u
if
i32.const 0
i32.const 1536
- i32.const 234
+ i32.const 270
i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $4
- i32.const 4
- i32.sub
- local.get $1
- i32.store
- local.get $2
+ local.get $3
i32.const 256
i32.lt_u
if (result i32)
- local.get $2
+ local.get $3
i32.const 4
i32.shr_u
else
i32.const 31
i32.const 1073741820
- local.get $2
- local.get $2
+ local.get $3
+ local.get $3
i32.const 1073741820
i32.ge_u
select
- local.tee $2
+ local.tee $3
i32.clz
i32.sub
- local.tee $3
+ local.tee $4
i32.const 7
i32.sub
- local.set $5
- local.get $2
+ local.set $2
local.get $3
+ local.get $4
i32.const 4
i32.sub
i32.shr_u
i32.const 16
i32.xor
end
- local.tee $2
+ local.tee $3
i32.const 16
i32.lt_u
- local.get $5
+ local.get $2
i32.const 23
i32.lt_u
i32.and
@@ -620,523 +480,575 @@
if
i32.const 0
i32.const 1536
- i32.const 251
+ i32.const 284
i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $0
- local.get $5
- i32.const 4
- i32.shl
- local.get $2
- i32.add
- i32.const 2
- i32.shl
- i32.add
- i32.load offset=96
- local.set $3
local.get $1
- i32.const 0
- i32.store offset=4
+ i32.load offset=8
+ local.set $5
local.get $1
- local.get $3
- i32.store offset=8
- local.get $3
+ i32.load offset=4
+ local.tee $4
if
- local.get $3
- local.get $1
+ local.get $4
+ local.get $5
+ i32.store offset=8
+ end
+ local.get $5
+ if
+ local.get $5
+ local.get $4
i32.store offset=4
end
+ local.get $1
local.get $0
- local.get $5
- i32.const 4
- i32.shl
local.get $2
- i32.add
- i32.const 2
+ i32.const 4
i32.shl
+ local.get $3
i32.add
- local.get $1
- i32.store offset=96
- local.get $0
- local.get $0
- i32.load
- i32.const 1
- local.get $5
- i32.shl
- i32.or
- i32.store
- local.get $0
- local.get $5
i32.const 2
i32.shl
i32.add
- local.tee $0
- local.get $0
- i32.load offset=4
- i32.const 1
- local.get $2
- i32.shl
- i32.or
- i32.store offset=4
- )
- (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i64)
- (local $3 i32)
- (local $4 i32)
- (local $5 i32)
- local.get $2
- local.get $1
- i64.extend_i32_u
- i64.lt_u
+ local.tee $1
+ i32.load offset=96
+ i32.eq
if
- i32.const 0
- i32.const 1536
- i32.const 382
- i32.const 14
- call $~lib/builtins/abort
- unreachable
- end
- local.get $1
- i32.const 19
- i32.add
- i32.const -16
+ local.get $1
+ local.get $5
+ i32.store offset=96
+ local.get $5
+ i32.eqz
+ if
+ local.get $0
+ local.get $2
+ i32.const 2
+ i32.shl
+ i32.add
+ local.tee $1
+ i32.load offset=4
+ i32.const -2
+ local.get $3
+ i32.rotl
+ i32.and
+ local.set $3
+ local.get $1
+ local.get $3
+ i32.store offset=4
+ local.get $3
+ i32.eqz
+ if
+ local.get $0
+ local.get $0
+ i32.load
+ i32.const -2
+ local.get $2
+ 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.get $1
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1536
+ i32.const 201
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ i32.load
+ local.tee $3
+ i32.const 1
i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1536
+ i32.const 203
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
i32.const 4
- i32.sub
- local.set $1
- local.get $0
- i32.load offset=1568
- local.tee $3
+ i32.add
+ local.get $1
+ i32.load
+ i32.const -4
+ i32.and
+ i32.add
+ local.tee $4
+ i32.load
+ local.tee $2
+ i32.const 1
+ i32.and
if
+ local.get $0
+ local.get $4
+ call $~lib/rt/tlsf/removeBlock
+ local.get $1
local.get $3
i32.const 4
i32.add
+ local.get $2
+ i32.const -4
+ i32.and
+ i32.add
+ local.tee $3
+ i32.store
local.get $1
- i32.gt_u
- if
- i32.const 0
- i32.const 1536
- i32.const 389
- i32.const 16
- call $~lib/builtins/abort
- unreachable
- end
- local.get $3
+ i32.const 4
+ i32.add
local.get $1
- i32.const 16
- i32.sub
- local.tee $5
- i32.eq
- if
- local.get $3
- i32.load
- local.set $4
- local.get $5
- local.set $1
- end
- else
- local.get $0
- i32.const 1572
+ i32.load
+ i32.const -4
+ i32.and
i32.add
+ local.tee $4
+ i32.load
+ local.set $2
+ end
+ local.get $3
+ i32.const 2
+ i32.and
+ if
local.get $1
- i32.gt_u
+ i32.const 4
+ i32.sub
+ i32.load
+ local.tee $1
+ i32.load
+ local.tee $6
+ i32.const 1
+ i32.and
+ i32.eqz
if
i32.const 0
i32.const 1536
- i32.const 402
- i32.const 5
+ i32.const 221
+ i32.const 16
call $~lib/builtins/abort
unreachable
end
+ local.get $0
+ local.get $1
+ call $~lib/rt/tlsf/removeBlock
+ local.get $1
+ local.get $6
+ i32.const 4
+ i32.add
+ local.get $3
+ i32.const -4
+ i32.and
+ i32.add
+ local.tee $3
+ i32.store
end
+ local.get $4
local.get $2
- i32.wrap_i64
- i32.const -16
+ i32.const 2
+ i32.or
+ i32.store
+ local.get $3
+ i32.const -4
i32.and
- local.get $1
- i32.sub
- local.tee $3
- i32.const 20
+ local.tee $2
+ i32.const 12
i32.lt_u
if
- return
+ i32.const 0
+ i32.const 1536
+ i32.const 233
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
end
- local.get $1
local.get $4
- i32.const 2
- i32.and
- local.get $3
- i32.const 8
- i32.sub
- local.tee $3
- 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 $1
i32.const 4
i32.add
- local.get $3
+ local.get $2
i32.add
- local.tee $3
- i32.const 2
- i32.store
- local.get $0
- local.get $3
- 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 $1
- i32.const 0
- i32.le_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
+ i32.ne
if
+ i32.const 0
+ i32.const 1536
+ i32.const 234
+ i32.const 14
+ call $~lib/builtins/abort
unreachable
end
- i32.const 34560
- i32.const 0
- i32.store
- i32.const 36128
- i32.const 0
+ local.get $4
+ i32.const 4
+ i32.sub
+ local.get $1
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 34560
- 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 $0
- i32.const 4
- i32.shl
- local.get $1
- i32.add
- i32.const 2
- i32.shl
- i32.const 34560
- 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
+ local.get $2
+ i32.const 256
+ i32.lt_u
+ if (result i32)
+ local.get $2
+ i32.const 4
+ i32.shr_u
+ else
+ i32.const 31
+ i32.const 1073741820
+ local.get $2
+ local.get $2
+ i32.const 1073741820
+ i32.ge_u
+ select
+ local.tee $2
+ i32.clz
+ i32.sub
+ 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
end
- i32.const 34560
- i32.const 36132
- memory.size
- i64.extend_i32_s
- i64.const 16
- i64.shl
- call $~lib/rt/tlsf/addMemory
- i32.const 34560
- global.set $~lib/rt/tlsf/ROOT
+ local.tee $2
+ i32.const 16
+ i32.lt_u
+ local.get $5
+ i32.const 23
+ i32.lt_u
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1536
+ i32.const 251
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ local.get $5
+ i32.const 4
+ i32.shl
+ local.get $2
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ local.set $3
+ local.get $1
+ i32.const 0
+ i32.store offset=4
+ local.get $1
+ local.get $3
+ i32.store offset=8
+ local.get $3
+ if
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ end
+ local.get $0
+ local.get $5
+ i32.const 4
+ i32.shl
+ local.get $2
+ 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 $5
+ i32.shl
+ i32.or
+ i32.store
+ local.get $0
+ local.get $5
+ i32.const 2
+ i32.shl
+ i32.add
+ local.tee $0
+ local.get $0
+ i32.load offset=4
+ i32.const 1
+ local.get $2
+ i32.shl
+ i32.or
+ i32.store offset=4
)
- (func $~lib/rt/itcms/step (result i32)
- (local $0 i32)
+ (func $~lib/rt/itcms/Object#makeGray (param $0 i32)
(local $1 i32)
(local $2 i32)
- block $break|0
- block $case2|0
- block $case1|0
- block $case0|0
- global.get $~lib/rt/itcms/state
- br_table $case0|0 $case1|0 $case2|0 $break|0
- end
- i32.const 1
- global.set $~lib/rt/itcms/state
- i32.const 0
- global.set $~lib/rt/itcms/visitCount
- call $~lib/rt/itcms/visitRoots
- global.get $~lib/rt/itcms/toSpace
- global.set $~lib/rt/itcms/iter
- global.get $~lib/rt/itcms/visitCount
- return
- end
- global.get $~lib/rt/itcms/white
- i32.eqz
- local.set $1
- global.get $~lib/rt/itcms/iter
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- loop $while-continue|1
- local.get $0
- global.get $~lib/rt/itcms/toSpace
- i32.ne
- if
- local.get $0
- global.set $~lib/rt/itcms/iter
- local.get $1
- local.get $0
- i32.load offset=4
- local.tee $2
- i32.const 3
- i32.and
- i32.ne
- if
- local.get $0
- local.get $2
- i32.const -4
- i32.and
- local.get $1
- i32.or
- i32.store offset=4
- i32.const 0
- global.set $~lib/rt/itcms/visitCount
- local.get $0
- i32.const 20
- i32.add
- call $~lib/rt/__visit_members
- global.get $~lib/rt/itcms/visitCount
- return
- end
- local.get $0
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- br $while-continue|1
- end
- end
+ (local $3 i32)
+ local.get $0
+ global.get $~lib/rt/itcms/iter
+ i32.eq
+ if
+ local.get $0
+ i32.load offset=8
+ local.tee $1
+ i32.eqz
+ if
i32.const 0
- global.set $~lib/rt/itcms/visitCount
- call $~lib/rt/itcms/visitRoots
- global.get $~lib/rt/itcms/toSpace
- global.get $~lib/rt/itcms/iter
- i32.load offset=4
- i32.const -4
- i32.and
- i32.eq
- if
- global.get $~lib/memory/__stack_pointer
- local.set $0
- loop $while-continue|0
- local.get $0
- i32.const 34548
- i32.lt_u
- if
- local.get $0
- i32.load
- call $~lib/rt/itcms/__visit
- local.get $0
- i32.const 4
- i32.add
- local.set $0
- br $while-continue|0
- end
- end
- global.get $~lib/rt/itcms/iter
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- loop $while-continue|2
- local.get $0
- global.get $~lib/rt/itcms/toSpace
- i32.ne
- if
- local.get $1
- local.get $0
- i32.load offset=4
- local.tee $2
- i32.const 3
- i32.and
- i32.ne
- if
- local.get $0
- local.get $2
- i32.const -4
- i32.and
- local.get $1
- i32.or
- i32.store offset=4
- local.get $0
- i32.const 20
- i32.add
- call $~lib/rt/__visit_members
- end
- local.get $0
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- br $while-continue|2
- end
- end
- global.get $~lib/rt/itcms/fromSpace
- local.set $0
- global.get $~lib/rt/itcms/toSpace
- global.set $~lib/rt/itcms/fromSpace
- local.get $0
- global.set $~lib/rt/itcms/toSpace
- local.get $1
- global.set $~lib/rt/itcms/white
- local.get $0
- i32.load offset=4
- i32.const -4
- i32.and
- global.set $~lib/rt/itcms/iter
- i32.const 2
- global.set $~lib/rt/itcms/state
- end
- global.get $~lib/rt/itcms/visitCount
- return
+ i32.const 1264
+ i32.const 148
+ i32.const 30
+ call $~lib/builtins/abort
+ unreachable
end
- global.get $~lib/rt/itcms/iter
- local.tee $0
- global.get $~lib/rt/itcms/toSpace
- i32.ne
+ local.get $1
+ global.set $~lib/rt/itcms/iter
+ end
+ block $__inlined_func$~lib/rt/itcms/Object#unlink$132
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.tee $1
+ i32.eqz
if
local.get $0
- i32.load offset=4
- local.tee $1
- i32.const -4
- i32.and
- global.set $~lib/rt/itcms/iter
- global.get $~lib/rt/itcms/white
+ i32.load offset=8
i32.eqz
- local.get $1
- i32.const 3
+ local.get $0
+ i32.const 34548
+ i32.lt_u
i32.and
- i32.ne
+ i32.eqz
if
i32.const 0
i32.const 1264
- i32.const 229
- i32.const 20
+ i32.const 128
+ i32.const 18
call $~lib/builtins/abort
unreachable
end
- local.get $0
- i32.const 34548
- i32.lt_u
- if
- local.get $0
- i32.const 0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=8
- else
- global.get $~lib/rt/itcms/total
- local.get $0
- i32.load
- i32.const -4
- i32.and
- i32.const 4
- i32.add
- i32.sub
- global.set $~lib/rt/itcms/total
- local.get $0
- i32.const 4
- i32.add
- local.tee $0
- i32.const 34548
- i32.ge_u
- if
- global.get $~lib/rt/tlsf/ROOT
- i32.eqz
- if
- call $~lib/rt/tlsf/initialize
- end
- global.get $~lib/rt/tlsf/ROOT
- local.set $1
- 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
- select
- if (result i32)
- i32.const 1
- else
- local.get $2
- i32.load
- i32.const 1
- i32.and
- end
- if
+ br $__inlined_func$~lib/rt/itcms/Object#unlink$132
+ end
+ local.get $0
+ i32.load offset=8
+ local.tee $2
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1264
+ i32.const 132
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ local.get $2
+ i32.store offset=8
+ local.get $2
+ local.get $1
+ local.get $2
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ end
+ global.get $~lib/rt/itcms/toSpace
+ local.set $2
+ local.get $0
+ i32.load offset=12
+ local.tee $1
+ i32.const 2
+ i32.le_u
+ if (result i32)
+ i32.const 1
+ else
+ local.get $1
+ i32.const 1744
+ i32.load
+ i32.gt_u
+ if
+ i32.const 1392
+ i32.const 1456
+ i32.const 21
+ i32.const 28
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ i32.const 2
+ i32.shl
+ i32.const 1748
+ i32.add
+ i32.load
+ i32.const 32
+ i32.and
+ end
+ local.set $3
+ local.get $2
+ i32.load offset=8
+ local.set $1
+ local.get $0
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ i32.const 2
+ local.get $3
+ select
+ local.get $2
+ i32.or
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ i32.store offset=8
+ local.get $1
+ local.get $0
+ local.get $1
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ local.get $2
+ local.get $0
+ i32.store offset=8
+ )
+ (func $~lib/rt/__visit_members (param $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ (local $3 i32)
+ block $folding-inner1
+ block $folding-inner0
+ block $invalid
+ block $bindings/noExportRuntime/NonPlainObject
+ block $~lib/array/Array<~lib/array/Array>
+ block $~lib/array/Array
+ block $~lib/typedarray/Int32Array
+ block $~lib/arraybuffer/ArrayBufferView
+ block $~lib/string/String
+ block $~lib/arraybuffer/ArrayBuffer
+ block $~lib/object/Object
+ local.get $0
+ i32.const 8
+ i32.sub
+ i32.load
+ br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/typedarray/Int32Array $~lib/array/Array $~lib/array/Array<~lib/array/Array> $bindings/noExportRuntime/NonPlainObject $invalid
+ end
+ return
+ end
+ return
+ end
+ return
+ end
+ local.get $0
+ i32.load
+ call $~lib/rt/itcms/__visit
+ return
+ end
+ local.get $0
+ i32.load
+ call $~lib/rt/itcms/__visit
+ return
+ 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 1780
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
i32.const 0
- i32.const 1536
- i32.const 562
- i32.const 3
- call $~lib/builtins/abort
- unreachable
+ i32.store
+ br $folding-inner1
end
- local.get $2
- local.get $2
- i32.load
- i32.const 1
- i32.or
+ 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 1780
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.load offset=4
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
i32.store
local.get $1
- local.get $2
- call $~lib/rt/tlsf/insertBlock
+ 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 $~lib/rt/itcms/__visit
+ end
+ local.get $1
+ i32.const 4
+ i32.add
+ local.set $1
+ br $while-continue|0
+ end
+ end
+ br $folding-inner1
end
+ return
end
- i32.const 10
- return
+ unreachable
end
- global.get $~lib/rt/itcms/toSpace
- local.tee $0
- local.get $0
- i32.store offset=4
- local.get $0
- local.get $0
- i32.store offset=8
- i32.const 0
- global.set $~lib/rt/itcms/state
+ i32.const 34576
+ i32.const 34624
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
end
- i32.const 0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.load
+ call $~lib/rt/itcms/__visit
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
)
(func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
@@ -1193,399 +1105,339 @@
if
i32.const 0
i32.const 1536
- i32.const 334
- 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 1536
- i32.const 347
- 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/itcms/__new (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
- (local $3 i32)
- (local $4 i32)
- (local $5 i32)
- (local $6 i32)
- local.get $0
- i32.const 1073741804
- i32.ge_u
- if
- i32.const 1200
- i32.const 1264
- i32.const 261
- 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$69
- 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$69
- 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 $4
- local.get $0
- i32.const 16
- i32.add
- local.tee $2
- i32.const 1073741820
- i32.gt_u
- if
- i32.const 1200
- i32.const 1536
- i32.const 461
- i32.const 29
- call $~lib/builtins/abort
- unreachable
- end
- local.get $4
- 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
- local.tee $5
- call $~lib/rt/tlsf/searchBlock
- local.tee $2
- i32.eqz
- if
- memory.size
- local.tee $2
- local.get $5
- i32.const 256
- i32.ge_u
- if (result i32)
- local.get $5
- i32.const 536870910
- i32.lt_u
- if (result i32)
- local.get $5
- i32.const 1
- i32.const 27
- local.get $5
- i32.clz
- i32.sub
- i32.shl
- i32.add
- i32.const 1
- i32.sub
- else
- local.get $5
- end
- else
- local.get $5
- end
- i32.const 4
- local.get $4
- i32.load offset=1568
+ i32.const 334
+ 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 16
- i32.shl
i32.const 4
- i32.sub
- i32.ne
i32.shl
i32.add
- i32.const 65535
+ i32.const 2
+ i32.shl
i32.add
- i32.const -65536
- i32.and
- i32.const 16
- i32.shr_u
- local.tee $3
+ i32.load offset=96
+ else
+ local.get $0
+ i32.load
+ i32.const -1
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
+ 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 1536
+ i32.const 347
+ i32.const 18
+ call $~lib/builtins/abort
unreachable
end
- end
- local.get $4
- local.get $2
- i32.const 16
- i32.shl
- memory.size
- i64.extend_i32_s
- i64.const 16
- i64.shl
- call $~lib/rt/tlsf/addMemory
- local.get $4
- local.get $5
- call $~lib/rt/tlsf/searchBlock
- local.tee $2
- i32.eqz
- if
+ 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
- i32.const 1536
- i32.const 499
- i32.const 16
- call $~lib/builtins/abort
- unreachable
end
end
- local.get $5
- local.get $2
- i32.load
- i32.const -4
- i32.and
- i32.gt_u
- if
+ )
+ (func $~lib/rt/tlsf/initialize
+ (local $0 i32)
+ (local $1 i32)
+ memory.size
+ local.tee $1
+ i32.const 0
+ i32.le_s
+ if (result i32)
+ i32.const 1
+ local.get $1
+ i32.sub
+ memory.grow
i32.const 0
- i32.const 1536
- i32.const 501
- i32.const 14
- call $~lib/builtins/abort
+ i32.lt_s
+ else
+ i32.const 0
+ end
+ if
unreachable
end
- local.get $4
- local.get $2
- call $~lib/rt/tlsf/removeBlock
+ i32.const 34560
+ i32.const 0
+ i32.store
+ i32.const 36128
+ 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 34560
+ 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 $0
+ i32.const 4
+ i32.shl
+ local.get $1
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.const 34560
+ 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 34560
+ i32.const 36132
+ memory.size
+ i64.extend_i32_s
+ i64.const 16
+ i64.shl
+ call $~lib/rt/tlsf/addMemory
+ i32.const 34560
+ global.set $~lib/rt/tlsf/ROOT
+ )
+ (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i64)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
local.get $2
- i32.load
- local.set $6
- local.get $5
- i32.const 4
- i32.add
- i32.const 15
- i32.and
+ local.get $1
+ i64.extend_i32_u
+ i64.lt_u
if
i32.const 0
i32.const 1536
- i32.const 361
+ i32.const 382
i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $6
- i32.const -4
+ local.get $1
+ i32.const 19
+ i32.add
+ i32.const -16
i32.and
- local.get $5
+ i32.const 4
i32.sub
+ local.set $1
+ local.get $0
+ i32.load offset=1568
local.tee $3
- i32.const 16
- i32.ge_u
if
- local.get $2
- local.get $5
- local.get $6
- i32.const 2
- i32.and
- i32.or
- i32.store
- local.get $2
+ local.get $3
i32.const 4
i32.add
- local.get $5
- i32.add
- local.tee $5
+ local.get $1
+ i32.gt_u
+ if
+ i32.const 0
+ i32.const 1536
+ i32.const 389
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
local.get $3
- i32.const 4
+ local.get $1
+ i32.const 16
i32.sub
- i32.const 1
- i32.or
- i32.store
- local.get $4
- local.get $5
- call $~lib/rt/tlsf/insertBlock
+ local.tee $5
+ i32.eq
+ if
+ local.get $3
+ i32.load
+ local.set $4
+ local.get $5
+ local.set $1
+ end
else
- local.get $2
- local.get $6
- 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
+ local.get $0
+ i32.const 1572
i32.add
- local.tee $3
- local.get $3
- i32.load
- i32.const -3
- i32.and
- i32.store
+ local.get $1
+ i32.gt_u
+ if
+ i32.const 0
+ i32.const 1536
+ i32.const 402
+ i32.const 5
+ call $~lib/builtins/abort
+ unreachable
+ end
end
local.get $2
+ i32.wrap_i64
+ i32.const -16
+ i32.and
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
+ i32.sub
+ local.tee $3
+ i32.const 20
+ i32.lt_u
+ if
+ return
+ end
local.get $1
- global.get $~lib/rt/itcms/white
- i32.or
- i32.store offset=4
- local.get $2
- local.get $3
- i32.store offset=8
- local.get $3
- local.get $2
- local.get $3
- i32.load offset=4
- i32.const 3
+ local.get $4
+ i32.const 2
i32.and
+ local.get $3
+ i32.const 8
+ i32.sub
+ local.tee $3
+ i32.const 1
i32.or
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 0
i32.store offset=4
local.get $1
- local.get $2
+ i32.const 0
i32.store offset=8
- global.get $~lib/rt/itcms/total
- local.get $2
- i32.load
- i32.const -4
- i32.and
+ local.get $1
i32.const 4
i32.add
+ local.get $3
i32.add
- global.set $~lib/rt/itcms/total
- local.get $2
- i32.const 20
- i32.add
- local.tee $1
- i32.const 0
+ local.tee $3
+ i32.const 2
+ i32.store
+ local.get $0
+ local.get $3
+ i32.store offset=1568
local.get $0
- memory.fill
local.get $1
+ call $~lib/rt/tlsf/insertBlock
+ )
+ (func $~lib/rt/itcms/visitRoots
+ (local $0 i32)
+ (local $1 i32)
+ i32.const 1056
+ call $~lib/rt/itcms/__visit
+ global.get $bindings/noExportRuntime/isBuffer
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $bindings/noExportRuntime/isTypedArray
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ i32.const 1632
+ call $~lib/rt/itcms/__visit
+ i32.const 1712
+ call $~lib/rt/itcms/__visit
+ i32.const 1392
+ call $~lib/rt/itcms/__visit
+ i32.const 1088
+ call $~lib/rt/itcms/__visit
+ i32.const 1200
+ call $~lib/rt/itcms/__visit
+ global.get $~lib/rt/itcms/pinSpace
+ local.tee $1
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ loop $while-continue|0
+ local.get $0
+ local.get $1
+ i32.ne
+ if
+ local.get $0
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.const 3
+ i32.ne
+ if
+ i32.const 0
+ i32.const 1264
+ i32.const 160
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ i32.const 20
+ i32.add
+ call $~lib/rt/__visit_members
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ br $while-continue|0
+ end
+ end
)
(func $~lib/arraybuffer/ArrayBufferView#set:buffer (param $0 i32) (param $1 i32)
- (local $2 i32)
local.get $0
local.get $1
i32.store
@@ -1602,7 +1454,6 @@
unreachable
end
global.get $~lib/rt/itcms/white
- local.tee $2
local.get $1
i32.const 20
i32.sub
@@ -1619,7 +1470,7 @@
i32.const 3
i32.and
local.tee $0
- local.get $2
+ global.get $~lib/rt/itcms/white
i32.eqz
i32.eq
if
@@ -1638,145 +1489,32 @@
call $~lib/rt/itcms/Object#makeGray
end
end
- end
- end
- )
- (func $bindings/noExportRuntime/takesReturnsBasic (param $0 i32) (result i32)
- global.get $bindings/noExportRuntime/isBasic
- )
- (func $bindings/noExportRuntime/returnsString (result i32)
- i32.const 1056
- )
- (func $bindings/noExportRuntime/returnsBuffer (result i32)
- global.get $bindings/noExportRuntime/isBuffer
- )
- (func $bindings/noExportRuntime/returnsTypedArray (result i32)
- global.get $bindings/noExportRuntime/isTypedArray
- )
- (func $bindings/noExportRuntime/returnsArrayOfBasic (result i32)
- i32.const 1632
- )
- (func $bindings/noExportRuntime/returnsArrayOfArray (result i32)
- i32.const 1712
- )
- (func $~lib/rt/__visit_members (param $0 i32)
- (local $1 i32)
- (local $2 i32)
- (local $3 i32)
- block $folding-inner2
- block $folding-inner1
- block $folding-inner0
- block $invalid
- block $bindings/noExportRuntime/NonPlainObject
- block $~lib/array/Array<~lib/array/Array>
- block $~lib/array/Array
- block $~lib/string/String
- block $~lib/arraybuffer/ArrayBuffer
- block $~lib/object/Object
- local.get $0
- i32.const 8
- i32.sub
- i32.load
- br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner2 $folding-inner2 $~lib/array/Array $~lib/array/Array<~lib/array/Array> $bindings/noExportRuntime/NonPlainObject $invalid
- end
- return
- end
- return
- end
- return
- 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 1780
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- i32.const 0
- i32.store
- br $folding-inner1
- 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 1780
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $2
- i32.const 0
- i32.store
- local.get $2
- local.get $0
- i32.store
- local.get $0
- i32.load offset=4
- local.set $1
- local.get $2
- local.get $0
- i32.store
- local.get $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 $~lib/rt/itcms/__visit
- end
- local.get $1
- i32.const 4
- i32.add
- local.set $1
- br $while-continue|0
- end
- end
- br $folding-inner1
- end
- return
- end
- unreachable
- end
- i32.const 34576
- i32.const 34624
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store
- local.get $0
- i32.load
- call $~lib/rt/itcms/__visit
- global.get $~lib/memory/__stack_pointer
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- return
- end
- local.get $0
- i32.load
- local.tee $0
+ end
+ end
+ )
+ (func $export:bindings/noExportRuntime/takesNonPlainObject (param $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 1780
+ i32.lt_s
if
- local.get $0
- call $~lib/rt/itcms/__visit
+ i32.const 34576
+ i32.const 34624
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
)
(func $~start
(local $0 i32)
@@ -1824,17 +1562,16 @@
i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
- block $__inlined_func$start:bindings/noExportRuntime$2
+ block $__inlined_func$start:bindings/noExportRuntime
block $folding-inner0
global.get $~lib/memory/__stack_pointer
i32.const 1780
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $0
i32.const 0
i32.store
- local.get $0
+ global.get $~lib/memory/__stack_pointer
i32.const 0
i32.const 1
call $~lib/rt/itcms/__new
@@ -1855,136 +1592,385 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.const 4
+ call $~lib/rt/itcms/__new
local.tee $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=4
+ 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 1780
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
i64.const 0
i64.store
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=8
+ local.get $0
+ i32.eqz
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.const 3
+ call $~lib/rt/itcms/__new
+ local.tee $0
+ i32.store
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/arraybuffer/ArrayBufferView#set:buffer
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 1
+ call $~lib/rt/itcms/__new
+ local.tee $1
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=12
+ local.get $0
+ local.get $1
+ call $~lib/arraybuffer/ArrayBufferView#set:buffer
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ global.set $bindings/noExportRuntime/isTypedArray
+ br $__inlined_func$start:bindings/noExportRuntime
+ end
+ i32.const 34576
+ i32.const 34624
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ )
+ (func $~lib/rt/itcms/step (result i32)
+ (local $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ block $break|0
+ block $case2|0
+ block $case1|0
+ block $case0|0
+ global.get $~lib/rt/itcms/state
+ br_table $case0|0 $case1|0 $case2|0 $break|0
+ end
+ i32.const 1
+ global.set $~lib/rt/itcms/state
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ call $~lib/rt/itcms/visitRoots
+ global.get $~lib/rt/itcms/toSpace
+ global.set $~lib/rt/itcms/iter
+ global.get $~lib/rt/itcms/visitCount
+ return
+ end
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ local.set $1
+ global.get $~lib/rt/itcms/iter
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ loop $while-continue|1
+ local.get $0
+ global.get $~lib/rt/itcms/toSpace
+ i32.ne
+ if
+ local.get $0
+ global.set $~lib/rt/itcms/iter
+ local.get $1
+ local.get $0
+ i32.load offset=4
+ local.tee $2
+ i32.const 3
+ i32.and
+ i32.ne
+ if
+ local.get $0
+ local.get $2
+ i32.const -4
+ i32.and
+ local.get $1
+ i32.or
+ i32.store offset=4
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ local.get $0
+ i32.const 20
+ i32.add
+ call $~lib/rt/__visit_members
+ global.get $~lib/rt/itcms/visitCount
+ return
+ end
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ br $while-continue|1
+ end
+ end
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ call $~lib/rt/itcms/visitRoots
+ global.get $~lib/rt/itcms/toSpace
+ global.get $~lib/rt/itcms/iter
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ i32.eq
+ if
+ global.get $~lib/memory/__stack_pointer
+ local.set $0
+ loop $while-continue|0
+ local.get $0
+ i32.const 34548
+ i32.lt_u
+ if
+ local.get $0
+ i32.load
+ call $~lib/rt/itcms/__visit
+ local.get $0
+ i32.const 4
+ i32.add
+ local.set $0
+ br $while-continue|0
+ end
+ end
+ global.get $~lib/rt/itcms/iter
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ loop $while-continue|2
+ local.get $0
+ global.get $~lib/rt/itcms/toSpace
+ i32.ne
+ if
+ local.get $1
+ local.get $0
+ i32.load offset=4
+ local.tee $2
+ i32.const 3
+ i32.and
+ i32.ne
+ if
+ local.get $0
+ local.get $2
+ i32.const -4
+ i32.and
+ local.get $1
+ i32.or
+ i32.store offset=4
+ local.get $0
+ i32.const 20
+ i32.add
+ call $~lib/rt/__visit_members
+ end
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ br $while-continue|2
+ end
+ end
+ global.get $~lib/rt/itcms/fromSpace
+ local.set $0
+ global.get $~lib/rt/itcms/toSpace
+ global.set $~lib/rt/itcms/fromSpace
+ local.get $0
+ global.set $~lib/rt/itcms/toSpace
+ local.get $1
+ global.set $~lib/rt/itcms/white
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ global.set $~lib/rt/itcms/iter
+ i32.const 2
+ global.set $~lib/rt/itcms/state
+ end
+ global.get $~lib/rt/itcms/visitCount
+ return
+ end
+ global.get $~lib/rt/itcms/iter
+ local.tee $0
+ global.get $~lib/rt/itcms/toSpace
+ i32.ne
+ if
local.get $0
- i32.const 12
- i32.const 4
- call $~lib/rt/itcms/__new
- local.tee $0
- i32.store
- global.get $~lib/memory/__stack_pointer
+ i32.load offset=4
local.tee $1
- local.get $0
- i32.store offset=4
+ i32.const -4
+ i32.and
+ global.set $~lib/rt/itcms/iter
+ global.get $~lib/rt/itcms/white
+ i32.eqz
local.get $1
- i32.const 16
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 1780
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $2
- i64.const 0
- i64.store
- local.get $2
- i64.const 0
- i64.store offset=8
+ i32.const 3
+ i32.and
+ i32.ne
+ if
+ i32.const 0
+ i32.const 1264
+ i32.const 229
+ i32.const 20
+ call $~lib/builtins/abort
+ unreachable
+ end
local.get $0
- i32.eqz
+ i32.const 34548
+ i32.lt_u
if
- local.get $2
- i32.const 12
- i32.const 3
- call $~lib/rt/itcms/__new
+ local.get $0
+ i32.const 0
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ i32.store offset=8
+ else
+ global.get $~lib/rt/itcms/total
+ local.get $0
+ i32.load
+ i32.const -4
+ i32.and
+ i32.const 4
+ i32.add
+ i32.sub
+ global.set $~lib/rt/itcms/total
+ local.get $0
+ i32.const 4
+ i32.add
local.tee $0
- i32.store
+ i32.const 34548
+ i32.ge_u
+ if
+ 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 4
+ i32.sub
+ local.set $2
+ 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
+ i32.const 1
+ i32.and
+ end
+ if
+ i32.const 0
+ i32.const 1536
+ i32.const 562
+ i32.const 3
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $2
+ local.get $2
+ i32.load
+ i32.const 1
+ i32.or
+ i32.store
+ local.get $2
+ call $~lib/rt/tlsf/insertBlock
+ end
end
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- call $~lib/arraybuffer/ArrayBufferView#set:buffer
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=4
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=8
- global.get $~lib/memory/__stack_pointer
- i32.const 0
- i32.const 1
- call $~lib/rt/itcms/__new
- local.tee $2
- i32.store offset=8
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store offset=12
- local.get $0
- local.get $2
- call $~lib/arraybuffer/ArrayBufferView#set:buffer
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- local.get $2
- i32.store offset=4
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=8
- global.get $~lib/memory/__stack_pointer
- i32.const 16
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $1
- local.get $0
- i32.store
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $0
- global.set $bindings/noExportRuntime/isTypedArray
- br $__inlined_func$start:bindings/noExportRuntime$2
+ i32.const 10
+ return
end
- i32.const 34576
- i32.const 34624
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
+ global.get $~lib/rt/itcms/toSpace
+ global.get $~lib/rt/itcms/toSpace
+ i32.store offset=4
+ global.get $~lib/rt/itcms/toSpace
+ global.get $~lib/rt/itcms/toSpace
+ i32.store offset=8
+ i32.const 0
+ global.set $~lib/rt/itcms/state
end
+ i32.const 0
)
- (func $export:bindings/noExportRuntime/takesNonPlainObject (param $0 i32)
- (local $1 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 1780
- i32.lt_s
- if
- i32.const 34576
- i32.const 34624
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.tee $1
- local.get $0
- i32.store
- local.get $1
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
+ (func $bindings/noExportRuntime/takesReturnsBasic (param $0 i32) (result i32)
+ global.get $bindings/noExportRuntime/isBasic
+ )
+ (func $bindings/noExportRuntime/returnsTypedArray (result i32)
+ global.get $bindings/noExportRuntime/isTypedArray
+ )
+ (func $bindings/noExportRuntime/returnsString (result i32)
+ i32.const 1056
+ )
+ (func $bindings/noExportRuntime/returnsBuffer (result i32)
+ global.get $bindings/noExportRuntime/isBuffer
+ )
+ (func $bindings/noExportRuntime/returnsArrayOfBasic (result i32)
+ i32.const 1632
+ )
+ (func $bindings/noExportRuntime/returnsArrayOfArray (result i32)
+ i32.const 1712
)
)
diff --git a/tests/compiler/bindings/raw.debug.js b/tests/compiler/bindings/raw.debug.js
index cc59b6a796..564035a225 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), imports.env || {}, {
+ env: Object.setPrototypeOf({
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);
@@ -44,7 +44,7 @@ export async function instantiate(module, imports = {}) {
throw Error(`${message} in ${fileName}:${lineNumber}:${columnNumber}`);
})();
},
- }),
+ }, Object.assign(Object.create(globalThis), imports.env || {})),
};
const { exports } = await WebAssembly.instantiate(module, adaptedImports);
const memory = exports.memory || imports.env.memory;
diff --git a/tests/compiler/bindings/raw.debug.wat b/tests/compiler/bindings/raw.debug.wat
index 7bf955aa6b..c54a11e383 100644
--- a/tests/compiler/bindings/raw.debug.wat
+++ b/tests/compiler/bindings/raw.debug.wat
@@ -124,6 +124,27 @@
(export "functionFunction" (func $export:bindings/esm/functionFunction))
(func $start:bindings/esm~anonymous|0
)
+ (func $start:bindings/esm
+ i32.const 128
+ i32.const 1
+ f64.const 42
+ f64.const 0
+ f64.const 0
+ f64.const 0
+ f64.const 0
+ call $~lib/builtins/trace
+ i32.const 160
+ 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
+ drop
+ call $bindings/esm/Date_getTimezoneOffset
+ drop
+ )
(func $start:bindings/raw
call $start:bindings/esm
)
@@ -1737,14 +1758,17 @@
if
i32.const 0
drop
+ i32.const 200
+ i32.const 100
+ i32.rem_u
+ i32.const 0
+ i32.eq
+ drop
global.get $~lib/rt/itcms/total
- i64.extend_i32_u
i32.const 200
- i64.extend_i32_u
- i64.mul
- i64.const 100
- i64.div_u
- i32.wrap_i64
+ i32.const 100
+ i32.div_u
+ i32.mul
i32.const 1024
i32.add
global.set $~lib/rt/itcms/threshold
@@ -2877,12 +2901,8 @@
call $~lib/object/Object~visit
local.get $0
i32.load
- local.tee $2
- if
- local.get $2
- local.get $1
- call $~lib/rt/itcms/__visit
- end
+ local.get $1
+ call $~lib/rt/itcms/__visit
)
(func $~lib/object/Object~visit (param $0 i32) (param $1 i32)
)
@@ -2944,28 +2964,16 @@
call $~lib/object/Object~visit
local.get $0
i32.load offset=56
- local.tee $2
- if
- local.get $2
- local.get $1
- call $~lib/rt/itcms/__visit
- end
+ local.get $1
+ call $~lib/rt/itcms/__visit
local.get $0
i32.load offset=60
- local.tee $2
- if
- local.get $2
- local.get $1
- call $~lib/rt/itcms/__visit
- end
+ local.get $1
+ call $~lib/rt/itcms/__visit
local.get $0
i32.load offset=64
- local.tee $2
- if
- local.get $2
- local.get $1
- call $~lib/rt/itcms/__visit
- end
+ local.get $1
+ call $~lib/rt/itcms/__visit
)
(func $~lib/typedarray/Uint8Array~visit (param $0 i32) (param $1 i32)
local.get $0
@@ -3100,50 +3108,6 @@
unreachable
end
)
- (func $start:bindings/esm
- (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
- i32.const 128
- local.set $0
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store
- local.get $0
- i32.const 1
- f64.const 42
- f64.const 0
- f64.const 0
- f64.const 0
- f64.const 0
- call $~lib/builtins/trace
- i32.const 160
- local.set $0
- global.get $~lib/memory/__stack_pointer
- local.get $0
- 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
- drop
- call $bindings/esm/Date_getTimezoneOffset
- drop
- global.get $~lib/memory/__stack_pointer
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- )
(func $bindings/esm/bufferFunction (param $a i32) (param $b i32) (result i32)
(local $aByteLength i32)
(local $bByteLength i32)
diff --git a/tests/compiler/bindings/raw.release.js b/tests/compiler/bindings/raw.release.js
index cc59b6a796..564035a225 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), imports.env || {}, {
+ env: Object.setPrototypeOf({
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);
@@ -44,7 +44,7 @@ export async function instantiate(module, imports = {}) {
throw Error(`${message} in ${fileName}:${lineNumber}:${columnNumber}`);
})();
},
- }),
+ }, Object.assign(Object.create(globalThis), imports.env || {})),
};
const { exports } = await WebAssembly.instantiate(module, adaptedImports);
const memory = exports.memory || imports.env.memory;
diff --git a/tests/compiler/bindings/raw.release.wat b/tests/compiler/bindings/raw.release.wat
index 4bb5843896..6d66004d1a 100644
--- a/tests/compiler/bindings/raw.release.wat
+++ b/tests/compiler/bindings/raw.release.wat
@@ -2,22 +2,22 @@
(type $0 (func (param i32 i32) (result i32)))
(type $1 (func (param i32)))
(type $2 (func (param i32) (result i32)))
- (type $3 (func (result i32)))
- (type $4 (func))
- (type $5 (func (param i32 i32 i32)))
+ (type $3 (func (param i32 i32 i32)))
+ (type $4 (func (result i32)))
+ (type $5 (func))
(type $6 (func (param i32 i32)))
(type $7 (func (param i32 i32 i64)))
- (type $8 (func (param i32 i32 f64 f64 f64 f64 f64)))
- (type $9 (func (param f64) (result f64)))
- (type $10 (func (param i64 i64) (result i64)))
- (type $11 (func (result i64)))
- (type $12 (func (param i32 i32 i32 i32)))
+ (type $8 (func (param i32 i32 i32 i32)))
+ (type $9 (func (param i32 i32 f64 f64 f64 f64 f64)))
+ (type $10 (func (param f64) (result f64)))
+ (type $11 (func (param i64 i64) (result i64)))
+ (type $12 (func (result i64)))
(import "env" "Math.E" (global $~lib/bindings/dom/Math.E f64))
+ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 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" "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))
(global $bindings/esm/plainMutableGlobal (mut i32) (i32.const 2))
(global $bindings/esm/stringGlobal i32 (i32.const 1056))
@@ -120,218 +120,6 @@
(export "objectFunction" (func $export:bindings/esm/objectFunction))
(export "internrefFunction" (func $export:bindings/esm/internrefFunction))
(export "functionFunction" (func $export:bindings/esm/staticarrayU16))
- (func $bindings/esm/plainFunction (param $0 i32) (param $1 i32) (result i32)
- local.get $0
- local.get $1
- i32.add
- )
- (func $bindings/esm/plainFunction64 (param $0 i64) (param $1 i64) (result i64)
- local.get $0
- local.get $1
- i64.add
- )
- (func $bindings/esm/getMaxUnsigned32 (result i32)
- i32.const -1
- )
- (func $bindings/esm/getMaxUnsigned64 (result i64)
- i64.const -1
- )
- (func $~lib/rt/itcms/visitRoots
- (local $0 i32)
- (local $1 i32)
- i32.const 1552
- call $~lib/rt/itcms/__visit
- i32.const 1248
- call $~lib/rt/itcms/__visit
- i32.const 1968
- call $~lib/rt/itcms/__visit
- i32.const 1360
- call $~lib/rt/itcms/__visit
- i32.const 2096
- call $~lib/rt/itcms/__visit
- i32.const 2160
- call $~lib/rt/itcms/__visit
- i32.const 1056
- call $~lib/rt/itcms/__visit
- global.get $bindings/esm/mutableStringGlobal
- local.tee $0
- if
- local.get $0
- call $~lib/rt/itcms/__visit
- end
- global.get $~lib/rt/itcms/pinSpace
- local.tee $1
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- loop $while-continue|0
- local.get $0
- local.get $1
- i32.ne
- if
- local.get $0
- i32.load offset=4
- i32.const 3
- i32.and
- i32.const 3
- i32.ne
- if
- i32.const 0
- i32.const 1424
- i32.const 160
- i32.const 16
- call $~lib/builtins/abort
- unreachable
- end
- local.get $0
- i32.const 20
- i32.add
- call $~lib/rt/__visit_members
- local.get $0
- i32.load offset=4
- i32.const -4
- i32.and
- local.set $0
- br $while-continue|0
- end
- end
- )
- (func $~lib/rt/itcms/Object#unlink (param $0 i32)
- (local $1 i32)
- local.get $0
- i32.load offset=4
- i32.const -4
- i32.and
- local.tee $1
- i32.eqz
- if
- local.get $0
- i32.load offset=8
- i32.eqz
- local.get $0
- i32.const 35044
- i32.lt_u
- i32.and
- i32.eqz
- if
- i32.const 0
- i32.const 1424
- i32.const 128
- i32.const 18
- call $~lib/builtins/abort
- unreachable
- end
- return
- end
- local.get $0
- i32.load offset=8
- local.tee $0
- i32.eqz
- if
- i32.const 0
- i32.const 1424
- i32.const 132
- i32.const 16
- call $~lib/builtins/abort
- unreachable
- end
- local.get $1
- local.get $0
- i32.store offset=8
- local.get $0
- local.get $1
- local.get $0
- i32.load offset=4
- i32.const 3
- i32.and
- i32.or
- i32.store offset=4
- )
- (func $~lib/rt/itcms/Object#makeGray (param $0 i32)
- (local $1 i32)
- (local $2 i32)
- (local $3 i32)
- local.get $0
- global.get $~lib/rt/itcms/iter
- i32.eq
- if
- local.get $0
- i32.load offset=8
- local.tee $1
- i32.eqz
- if
- i32.const 0
- i32.const 1424
- i32.const 148
- i32.const 30
- call $~lib/builtins/abort
- unreachable
- end
- local.get $1
- global.set $~lib/rt/itcms/iter
- end
- local.get $0
- call $~lib/rt/itcms/Object#unlink
- global.get $~lib/rt/itcms/toSpace
- local.set $1
- local.get $0
- i32.load offset=12
- local.tee $2
- i32.const 2
- i32.le_u
- if (result i32)
- i32.const 1
- else
- local.get $2
- i32.const 2208
- i32.load
- i32.gt_u
- if
- i32.const 1552
- i32.const 1616
- i32.const 21
- i32.const 28
- call $~lib/builtins/abort
- unreachable
- end
- local.get $2
- i32.const 2
- i32.shl
- i32.const 2212
- i32.add
- i32.load
- i32.const 32
- i32.and
- end
- local.set $3
- local.get $1
- i32.load offset=8
- local.set $2
- local.get $0
- global.get $~lib/rt/itcms/white
- i32.eqz
- i32.const 2
- local.get $3
- select
- local.get $1
- i32.or
- i32.store offset=4
- local.get $0
- local.get $2
- i32.store offset=8
- local.get $2
- local.get $0
- local.get $2
- i32.load offset=4
- i32.const 3
- i32.and
- i32.or
- i32.store offset=4
- local.get $1
- local.get $0
- i32.store offset=8
- )
(func $~lib/rt/itcms/__visit (param $0 i32)
local.get $0
i32.eqz
@@ -356,591 +144,407 @@
global.set $~lib/rt/itcms/visitCount
end
)
- (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32)
+ (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
- local.get $1
- i32.load
- local.tee $3
- i32.const 1
- i32.and
- i32.eqz
+ (local $6 i32)
+ local.get $0
+ i32.const 1073741804
+ i32.ge_u
if
- i32.const 0
- i32.const 1696
- i32.const 268
- i32.const 14
+ i32.const 1360
+ i32.const 1424
+ i32.const 261
+ i32.const 31
call $~lib/builtins/abort
unreachable
end
- local.get $3
- i32.const -4
- i32.and
- local.tee $3
- i32.const 12
- i32.lt_u
+ global.get $~lib/rt/itcms/total
+ global.get $~lib/rt/itcms/threshold
+ i32.ge_u
if
- i32.const 0
- i32.const 1696
- i32.const 270
- i32.const 14
- call $~lib/builtins/abort
- unreachable
- end
- local.get $3
- i32.const 256
- i32.lt_u
- if (result i32)
- local.get $3
- i32.const 4
- i32.shr_u
- else
- i32.const 31
- i32.const 1073741820
- local.get $3
- local.get $3
- i32.const 1073741820
- i32.ge_u
- select
- local.tee $3
- i32.clz
- i32.sub
- 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
+ block $__inlined_func$~lib/rt/itcms/interrupt$71
+ 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
+ i32.const 1
+ i32.shl
+ i32.const 1024
+ i32.add
+ global.set $~lib/rt/itcms/threshold
+ br $__inlined_func$~lib/rt/itcms/interrupt$71
+ end
+ local.get $2
+ i32.const 0
+ i32.gt_s
+ br_if $do-loop|0
+ end
+ global.get $~lib/rt/itcms/total
+ global.get $~lib/rt/itcms/total
+ 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
- local.tee $3
- i32.const 16
- i32.lt_u
- local.get $2
- i32.const 23
- i32.lt_u
- i32.and
+ global.get $~lib/rt/tlsf/ROOT
i32.eqz
if
- i32.const 0
+ call $~lib/rt/tlsf/initialize
+ end
+ global.get $~lib/rt/tlsf/ROOT
+ local.set $4
+ local.get $0
+ i32.const 16
+ i32.add
+ local.tee $2
+ i32.const 1073741820
+ i32.gt_u
+ if
+ i32.const 1360
i32.const 1696
- i32.const 284
- i32.const 14
+ i32.const 461
+ i32.const 29
call $~lib/builtins/abort
unreachable
end
- local.get $1
- i32.load offset=8
- local.set $5
- local.get $1
- i32.load offset=4
- local.tee $4
- if
- local.get $4
- local.get $5
- i32.store offset=8
+ local.get $4
+ 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
- local.get $5
+ local.tee $5
+ call $~lib/rt/tlsf/searchBlock
+ local.tee $2
+ i32.eqz
if
local.get $5
+ i32.const 256
+ i32.ge_u
+ if (result i32)
+ local.get $5
+ i32.const 536870910
+ i32.lt_u
+ if (result i32)
+ local.get $5
+ i32.const 1
+ i32.const 27
+ local.get $5
+ i32.clz
+ i32.sub
+ i32.shl
+ i32.add
+ i32.const 1
+ i32.sub
+ else
+ local.get $5
+ end
+ else
+ local.get $5
+ end
+ i32.const 4
local.get $4
- i32.store offset=4
- end
- local.get $1
- local.get $0
- local.get $2
- i32.const 4
- i32.shl
- local.get $3
- i32.add
- i32.const 2
- i32.shl
- i32.add
- local.tee $1
- i32.load offset=96
- i32.eq
- if
- local.get $1
- local.get $5
- i32.store offset=96
- local.get $5
- i32.eqz
+ i32.load offset=1568
+ memory.size
+ local.tee $2
+ i32.const 16
+ i32.shl
+ i32.const 4
+ i32.sub
+ i32.ne
+ i32.shl
+ i32.add
+ i32.const 65535
+ i32.add
+ i32.const -65536
+ i32.and
+ i32.const 16
+ i32.shr_u
+ local.set $3
+ local.get $2
+ local.get $3
+ local.get $2
+ local.get $3
+ i32.gt_s
+ select
+ memory.grow
+ i32.const 0
+ i32.lt_s
if
- local.get $0
- local.get $2
- i32.const 2
- i32.shl
- i32.add
- local.tee $1
- i32.load offset=4
- i32.const -2
- local.get $3
- i32.rotl
- i32.and
- local.set $3
- local.get $1
local.get $3
- i32.store offset=4
- local.get $3
- i32.eqz
+ memory.grow
+ i32.const 0
+ i32.lt_s
if
- local.get $0
- local.get $0
- i32.load
- i32.const -2
- local.get $2
- i32.rotl
- i32.and
- i32.store
+ unreachable
end
end
+ local.get $4
+ local.get $2
+ i32.const 16
+ i32.shl
+ memory.size
+ i64.extend_i32_s
+ i64.const 16
+ i64.shl
+ call $~lib/rt/tlsf/addMemory
+ local.get $4
+ local.get $5
+ call $~lib/rt/tlsf/searchBlock
+ local.tee $2
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1696
+ i32.const 499
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ 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.get $1
- i32.eqz
+ local.get $5
+ local.get $2
+ i32.load
+ i32.const -4
+ i32.and
+ i32.gt_u
if
i32.const 0
i32.const 1696
- i32.const 201
+ i32.const 501
i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $1
+ local.get $4
+ local.get $2
+ call $~lib/rt/tlsf/removeBlock
+ local.get $2
i32.load
- local.tee $3
- i32.const 1
+ local.set $6
+ local.get $5
+ i32.const 4
+ i32.add
+ i32.const 15
i32.and
- i32.eqz
if
i32.const 0
i32.const 1696
- i32.const 203
+ i32.const 361
i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $1
- i32.const 4
- i32.add
- local.get $1
- i32.load
+ local.get $6
i32.const -4
i32.and
- i32.add
- local.tee $4
- i32.load
- local.tee $2
- i32.const 1
- i32.and
+ local.get $5
+ i32.sub
+ local.tee $3
+ i32.const 16
+ i32.ge_u
if
- local.get $0
- local.get $4
- call $~lib/rt/tlsf/removeBlock
- local.get $1
- local.get $3
- i32.const 4
- i32.add
local.get $2
- i32.const -4
+ local.get $5
+ local.get $6
+ i32.const 2
i32.and
- i32.add
- local.tee $3
+ i32.or
i32.store
- local.get $1
+ local.get $2
i32.const 4
i32.add
- local.get $1
- i32.load
- i32.const -4
- i32.and
+ local.get $5
i32.add
- local.tee $4
- i32.load
- local.set $2
- end
- local.get $3
- i32.const 2
- i32.and
- if
- local.get $1
+ local.tee $5
+ local.get $3
i32.const 4
i32.sub
- i32.load
- local.tee $1
- i32.load
- local.tee $6
i32.const 1
- i32.and
- i32.eqz
- if
- i32.const 0
- i32.const 1696
- i32.const 221
- i32.const 16
- call $~lib/builtins/abort
- unreachable
- end
- local.get $0
- local.get $1
- call $~lib/rt/tlsf/removeBlock
- local.get $1
+ i32.or
+ i32.store
+ local.get $4
+ local.get $5
+ call $~lib/rt/tlsf/insertBlock
+ else
+ local.get $2
local.get $6
+ i32.const -2
+ i32.and
+ i32.store
+ local.get $2
i32.const 4
i32.add
- local.get $3
+ 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 $4
local.get $2
- i32.const 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
+ local.get $1
+ global.get $~lib/rt/itcms/white
i32.or
- i32.store
+ i32.store offset=4
+ local.get $2
local.get $3
- i32.const -4
+ i32.store offset=8
+ local.get $3
+ local.get $2
+ local.get $3
+ i32.load offset=4
+ i32.const 3
i32.and
- local.tee $2
- i32.const 12
- i32.lt_u
- if
- i32.const 0
- i32.const 1696
- i32.const 233
- i32.const 14
- call $~lib/builtins/abort
- unreachable
- end
- local.get $4
+ 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
- i32.ne
+ local.tee $1
+ i32.const 0
+ local.get $0
+ memory.fill
+ local.get $1
+ )
+ (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
+ local.get $1
+ i32.eqz
+ if
+ return
+ end
+ local.get $0
+ i32.eqz
if
i32.const 0
- i32.const 1696
- i32.const 234
+ i32.const 1424
+ i32.const 295
i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $4
- i32.const 4
- i32.sub
+ global.get $~lib/rt/itcms/white
local.get $1
- i32.store
- local.get $2
- i32.const 256
- i32.lt_u
- if (result i32)
- local.get $2
- i32.const 4
- i32.shr_u
- else
- i32.const 31
- i32.const 1073741820
- local.get $2
- local.get $2
- i32.const 1073741820
- i32.ge_u
- select
- local.tee $2
- i32.clz
+ 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
+ local.tee $0
+ i32.load offset=4
+ i32.const 3
+ i32.and
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
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ i32.eq
+ if
+ local.get $0
+ local.get $1
+ local.get $2
+ select
+ call $~lib/rt/itcms/Object#makeGray
+ else
+ global.get $~lib/rt/itcms/state
+ i32.const 1
+ i32.eq
+ local.get $3
+ i32.const 3
+ i32.eq
+ i32.and
+ if
+ local.get $1
+ call $~lib/rt/itcms/Object#makeGray
+ end
+ end
end
- local.tee $2
- i32.const 16
- i32.lt_u
- local.get $5
- i32.const 23
- i32.lt_u
- i32.and
- i32.eqz
+ )
+ (func $~lib/array/Array#get:length (param $0 i32) (result 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 2276
+ i32.lt_s
if
- i32.const 0
- i32.const 1696
- i32.const 251
- i32.const 14
+ i32.const 35072
+ i32.const 35120
+ i32.const 1
+ i32.const 1
call $~lib/builtins/abort
unreachable
end
- local.get $0
- local.get $5
- i32.const 4
- i32.shl
- local.get $2
- i32.add
- i32.const 2
- i32.shl
- i32.add
- i32.load offset=96
- local.set $3
- local.get $1
+ global.get $~lib/memory/__stack_pointer
i32.const 0
- i32.store offset=4
- local.get $1
- local.get $3
- i32.store offset=8
- local.get $3
- if
- local.get $3
- local.get $1
- i32.store offset=4
- end
- local.get $0
- local.get $5
- i32.const 4
- i32.shl
- local.get $2
- 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 $5
- i32.shl
- i32.or
i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
- local.get $5
- i32.const 2
- i32.shl
- i32.add
- local.tee $0
- local.get $0
- i32.load offset=4
- i32.const 1
- local.get $2
- i32.shl
- i32.or
- i32.store offset=4
- )
- (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i64)
- (local $3 i32)
- (local $4 i32)
- (local $5 i32)
- local.get $2
- local.get $1
- i64.extend_i32_u
- i64.lt_u
- if
- i32.const 0
- i32.const 1696
- i32.const 382
- 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 $0
- i32.load offset=1568
- local.tee $3
- if
- local.get $3
- i32.const 4
- i32.add
- local.get $1
- i32.gt_u
- if
- i32.const 0
- i32.const 1696
- i32.const 389
- i32.const 16
- call $~lib/builtins/abort
- unreachable
- end
- local.get $3
- local.get $1
- i32.const 16
- i32.sub
- local.tee $5
- i32.eq
- if
- local.get $3
- i32.load
- local.set $4
- local.get $5
- local.set $1
- end
- else
- local.get $0
- i32.const 1572
- i32.add
- local.get $1
- i32.gt_u
- if
- i32.const 0
- i32.const 1696
- i32.const 402
- i32.const 5
- call $~lib/builtins/abort
- unreachable
- end
- end
- local.get $2
- i32.wrap_i64
- i32.const -16
- i32.and
- local.get $1
- i32.sub
- local.tee $3
- i32.const 20
- i32.lt_u
- if
- return
- end
- local.get $1
- local.get $4
- i32.const 2
- i32.and
- local.get $3
- i32.const 8
- i32.sub
- local.tee $3
- 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 $1
+ local.get $0
+ i32.load offset=12
+ global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
- local.get $3
- i32.add
- local.tee $3
- i32.const 2
- i32.store
- local.get $0
- local.get $3
- 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 $1
- i32.const 0
- i32.le_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 35056
- i32.const 0
- i32.store
- i32.const 36624
- 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 35056
- 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 $0
- i32.const 4
- i32.shl
- local.get $1
- i32.add
- i32.const 2
- i32.shl
- i32.const 35056
- 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 35056
- i32.const 36628
- memory.size
- i64.extend_i32_s
- i64.const 16
- i64.shl
- call $~lib/rt/tlsf/addMemory
- i32.const 35056
- global.set $~lib/rt/tlsf/ROOT
+ global.set $~lib/memory/__stack_pointer
)
(func $~lib/rt/itcms/step (result i32)
(local $0 i32)
@@ -1152,7 +756,6 @@
call $~lib/rt/tlsf/initialize
end
global.get $~lib/rt/tlsf/ROOT
- local.set $1
local.get $0
i32.const 4
i32.sub
@@ -1185,7 +788,6 @@
i32.const 1
i32.or
i32.store
- local.get $1
local.get $2
call $~lib/rt/tlsf/insertBlock
end
@@ -1194,62 +796,195 @@
return
end
global.get $~lib/rt/itcms/toSpace
- local.tee $0
- local.get $0
+ global.get $~lib/rt/itcms/toSpace
i32.store offset=4
- local.get $0
- local.get $0
- i32.store offset=8
+ global.get $~lib/rt/itcms/toSpace
+ global.get $~lib/rt/itcms/toSpace
+ i32.store offset=8
i32.const 0
global.set $~lib/rt/itcms/state
end
i32.const 0
)
- (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32)
+ (func $~lib/rt/itcms/Object#makeGray (param $0 i32)
+ (local $1 i32)
(local $2 i32)
+ (local $3 i32)
+ local.get $0
+ global.get $~lib/rt/itcms/iter
+ i32.eq
+ if
+ local.get $0
+ i32.load offset=8
+ local.tee $1
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1424
+ i32.const 148
+ i32.const 30
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ global.set $~lib/rt/itcms/iter
+ end
+ local.get $0
+ call $~lib/rt/itcms/Object#unlink
+ global.get $~lib/rt/itcms/toSpace
+ local.set $1
+ local.get $0
+ i32.load offset=12
+ local.tee $2
+ i32.const 2
+ i32.le_u
+ if (result i32)
+ i32.const 1
+ else
+ local.get $2
+ i32.const 2208
+ i32.load
+ i32.gt_u
+ if
+ i32.const 1552
+ i32.const 1616
+ i32.const 21
+ i32.const 28
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $2
+ i32.const 2
+ i32.shl
+ i32.const 2212
+ i32.add
+ i32.load
+ i32.const 32
+ i32.and
+ end
+ local.set $3
local.get $1
- i32.const 256
+ i32.load offset=8
+ local.set $2
+ local.get $0
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ i32.const 2
+ local.get $3
+ select
+ local.get $1
+ i32.or
+ i32.store offset=4
+ local.get $0
+ local.get $2
+ i32.store offset=8
+ local.get $2
+ local.get $0
+ local.get $2
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ local.get $1
+ local.get $0
+ i32.store offset=8
+ )
+ (func $~lib/typedarray/Int16Array#get:length (param $0 i32) (result 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 2276
+ i32.lt_s
+ if
+ i32.const 35072
+ i32.const 35120
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.load offset=8
+ i32.const 1
+ i32.shr_u
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (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 $3
+ i32.const 1
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1696
+ i32.const 268
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $3
+ i32.const -4
+ i32.and
+ local.tee $3
+ i32.const 12
i32.lt_u
if
- local.get $1
+ i32.const 0
+ i32.const 1696
+ i32.const 270
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $3
+ i32.const 256
+ i32.lt_u
+ if (result i32)
+ local.get $3
i32.const 4
i32.shr_u
- local.set $1
else
- 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.add
- i32.const 1
- i32.sub
- local.set $1
- end
- local.get $1
i32.const 31
- local.get $1
+ i32.const 1073741820
+ local.get $3
+ local.get $3
+ i32.const 1073741820
+ i32.ge_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 $1
- local.get $2
- i32.const 7
- i32.sub
- local.set $2
end
- local.get $1
+ local.tee $3
i32.const 16
i32.lt_u
local.get $2
@@ -1260,634 +995,374 @@
if
i32.const 0
i32.const 1696
- i32.const 334
+ i32.const 284
i32.const 14
call $~lib/builtins/abort
unreachable
end
+ local.get $1
+ i32.load offset=8
+ local.set $5
+ local.get $1
+ i32.load offset=4
+ local.tee $4
+ if
+ local.get $4
+ local.get $5
+ i32.store offset=8
+ end
+ local.get $5
+ if
+ local.get $5
+ local.get $4
+ i32.store offset=4
+ end
+ local.get $1
local.get $0
local.get $2
- i32.const 2
+ i32.const 4
i32.shl
+ local.get $3
i32.add
- i32.load offset=4
- i32.const -1
- local.get $1
+ i32.const 2
i32.shl
- i32.and
+ i32.add
local.tee $1
- if (result i32)
- local.get $0
+ i32.load offset=96
+ i32.eq
+ if
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 $5
+ i32.store offset=96
+ local.get $5
+ i32.eqz
+ if
local.get $0
- local.get $1
- i32.ctz
- local.tee $1
+ local.get $2
i32.const 2
i32.shl
i32.add
+ local.tee $1
i32.load offset=4
- local.tee $2
+ i32.const -2
+ local.get $3
+ i32.rotl
+ i32.and
+ local.set $3
+ local.get $1
+ local.get $3
+ i32.store offset=4
+ local.get $3
i32.eqz
if
- i32.const 0
- i32.const 1696
- i32.const 347
- i32.const 18
- call $~lib/builtins/abort
- unreachable
+ local.get $0
+ local.get $0
+ i32.load
+ i32.const -2
+ local.get $2
+ i32.rotl
+ i32.and
+ i32.store
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/itcms/__new (param $0 i32) (param $1 i32) (result i32)
+ (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.get $0
- i32.const 1073741804
- i32.ge_u
+ local.get $1
+ i32.eqz
if
- i32.const 1360
- i32.const 1424
- i32.const 261
- i32.const 31
+ i32.const 0
+ i32.const 1696
+ i32.const 201
+ i32.const 14
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$71
- 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$71
- 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
+ local.get $1
+ i32.load
+ local.tee $3
+ i32.const 1
+ i32.and
i32.eqz
if
- call $~lib/rt/tlsf/initialize
- end
- global.get $~lib/rt/tlsf/ROOT
- local.set $4
- local.get $0
- i32.const 16
- i32.add
- local.tee $2
- i32.const 1073741820
- i32.gt_u
- if
- i32.const 1360
+ i32.const 0
i32.const 1696
- i32.const 461
- i32.const 29
+ i32.const 203
+ i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $4
- 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
- local.tee $5
- call $~lib/rt/tlsf/searchBlock
+ 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.tee $2
- i32.eqz
+ i32.const 1
+ i32.and
if
- memory.size
- local.tee $2
- local.get $5
- i32.const 256
- i32.ge_u
- if (result i32)
- local.get $5
- i32.const 536870910
- i32.lt_u
- if (result i32)
- local.get $5
- i32.const 1
- i32.const 27
- local.get $5
- i32.clz
- i32.sub
- i32.shl
- i32.add
- i32.const 1
- i32.sub
- else
- local.get $5
- end
- else
- local.get $5
- end
- i32.const 4
+ local.get $0
local.get $4
- i32.load offset=1568
+ call $~lib/rt/tlsf/removeBlock
+ local.get $1
+ local.get $3
+ i32.const 4
+ i32.add
local.get $2
- i32.const 16
- i32.shl
+ i32.const -4
+ i32.and
+ i32.add
+ local.tee $3
+ i32.store
+ local.get $1
i32.const 4
- i32.sub
- i32.ne
- i32.shl
i32.add
- i32.const 65535
+ local.get $1
+ i32.load
+ i32.const -4
+ i32.and
i32.add
- i32.const -65536
+ local.tee $4
+ i32.load
+ local.set $2
+ end
+ local.get $3
+ i32.const 2
+ i32.and
+ if
+ local.get $1
+ i32.const 4
+ i32.sub
+ i32.load
+ local.tee $1
+ i32.load
+ local.tee $6
+ i32.const 1
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 $4
- local.get $2
- i32.const 16
- i32.shl
- memory.size
- i64.extend_i32_s
- i64.const 16
- i64.shl
- call $~lib/rt/tlsf/addMemory
- local.get $4
- local.get $5
- call $~lib/rt/tlsf/searchBlock
- local.tee $2
i32.eqz
if
i32.const 0
i32.const 1696
- i32.const 499
+ i32.const 221
i32.const 16
call $~lib/builtins/abort
unreachable
end
- end
- local.get $5
- local.get $2
- i32.load
- i32.const -4
- i32.and
- i32.gt_u
- if
+ local.get $0
+ local.get $1
+ call $~lib/rt/tlsf/removeBlock
+ local.get $1
+ local.get $6
+ i32.const 4
+ i32.add
+ local.get $3
+ i32.const -4
+ i32.and
+ i32.add
+ local.tee $3
+ i32.store
+ end
+ local.get $4
+ local.get $2
+ i32.const 2
+ i32.or
+ i32.store
+ local.get $3
+ i32.const -4
+ i32.and
+ local.tee $2
+ i32.const 12
+ i32.lt_u
+ if
i32.const 0
i32.const 1696
- i32.const 501
+ i32.const 233
i32.const 14
call $~lib/builtins/abort
unreachable
end
local.get $4
- local.get $2
- call $~lib/rt/tlsf/removeBlock
- local.get $2
- i32.load
- local.set $6
- local.get $5
+ local.get $1
i32.const 4
i32.add
- i32.const 15
- i32.and
+ local.get $2
+ i32.add
+ i32.ne
if
i32.const 0
i32.const 1696
- i32.const 361
+ i32.const 234
i32.const 14
call $~lib/builtins/abort
unreachable
end
- local.get $6
- i32.const -4
- i32.and
- local.get $5
+ local.get $4
+ i32.const 4
i32.sub
- local.tee $3
- i32.const 16
- i32.ge_u
- if
- local.get $2
- local.get $5
- local.get $6
- i32.const 2
- i32.and
- i32.or
- i32.store
+ local.get $1
+ i32.store
+ local.get $2
+ i32.const 256
+ i32.lt_u
+ if (result i32)
local.get $2
i32.const 4
- i32.add
- local.get $5
- i32.add
- local.tee $5
- local.get $3
- i32.const 4
- i32.sub
- i32.const 1
- i32.or
- i32.store
- local.get $4
- local.get $5
- call $~lib/rt/tlsf/insertBlock
+ i32.shr_u
else
+ i32.const 31
+ i32.const 1073741820
local.get $2
- local.get $6
- 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
+ i32.const 1073741820
+ i32.ge_u
+ select
+ local.tee $2
+ i32.clz
+ i32.sub
local.tee $3
+ i32.const 7
+ i32.sub
+ local.set $5
+ local.get $2
local.get $3
- i32.load
- i32.const -3
- i32.and
- i32.store
+ i32.const 4
+ i32.sub
+ i32.shr_u
+ i32.const 16
+ i32.xor
+ end
+ local.tee $2
+ i32.const 16
+ i32.lt_u
+ local.get $5
+ i32.const 23
+ i32.lt_u
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1696
+ i32.const 251
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
end
- local.get $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 $5
+ i32.const 4
+ i32.shl
local.get $2
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ local.set $3
local.get $1
- global.get $~lib/rt/itcms/white
- i32.or
+ i32.const 0
i32.store offset=4
- local.get $2
+ local.get $1
local.get $3
i32.store offset=8
local.get $3
+ if
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ end
+ local.get $0
+ local.get $5
+ i32.const 4
+ i32.shl
local.get $2
- local.get $3
+ 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 $5
+ i32.shl
+ i32.or
+ i32.store
+ local.get $0
+ local.get $5
+ i32.const 2
+ i32.shl
+ i32.add
+ local.tee $0
+ local.get $0
i32.load offset=4
- i32.const 3
- i32.and
+ i32.const 1
+ local.get $2
+ i32.shl
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
+ )
+ (func $~lib/rt/itcms/Object#unlink (param $0 i32)
+ (local $1 i32)
+ local.get $0
+ i32.load offset=4
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
- memory.fill
- local.get $1
- )
- (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32)
- (local $3 i32)
- local.get $1
i32.eqz
if
+ local.get $0
+ i32.load offset=8
+ i32.eqz
+ local.get $0
+ i32.const 35044
+ i32.lt_u
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1424
+ i32.const 128
+ i32.const 18
+ call $~lib/builtins/abort
+ unreachable
+ end
return
end
local.get $0
+ i32.load offset=8
+ local.tee $0
i32.eqz
if
i32.const 0
i32.const 1424
- i32.const 295
- i32.const 14
+ i32.const 132
+ i32.const 16
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/rt/itcms/white
- local.tee $3
local.get $1
- i32.const 20
- i32.sub
- local.tee $1
+ local.get $0
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $0
i32.load offset=4
i32.const 3
i32.and
- i32.eq
- if
- local.get $3
- i32.eqz
- local.get $0
- i32.const 20
- i32.sub
- local.tee $0
- i32.load offset=4
- i32.const 3
- i32.and
- local.tee $3
- i32.eq
- if
- local.get $0
- local.get $1
- local.get $2
- select
- call $~lib/rt/itcms/Object#makeGray
- else
- global.get $~lib/rt/itcms/state
- i32.const 1
- i32.eq
- local.get $3
- i32.const 3
- i32.eq
- i32.and
- if
- local.get $1
- call $~lib/rt/itcms/Object#makeGray
- end
- end
- end
- )
- (func $bindings/esm/newInternref (result i32)
- (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 2276
- i32.lt_s
- if
- i32.const 35072
- i32.const 35120
- 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 0
- i32.const 15
- call $~lib/rt/itcms/__new
- local.tee $0
- i32.store
- global.get $~lib/memory/__stack_pointer
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $0
- )
- (func $~lib/rt/itcms/__pin (param $0 i32) (result i32)
- (local $1 i32)
- (local $2 i32)
- (local $3 i32)
- local.get $0
- if
- local.get $0
- i32.const 20
- i32.sub
- local.tee $1
- i32.load offset=4
- i32.const 3
- i32.and
- i32.const 3
- i32.eq
- if
- i32.const 2096
- i32.const 1424
- i32.const 338
- i32.const 7
- call $~lib/builtins/abort
- unreachable
- end
- local.get $1
- call $~lib/rt/itcms/Object#unlink
- global.get $~lib/rt/itcms/pinSpace
- local.tee $3
- i32.load offset=8
- local.set $2
- local.get $1
- local.get $3
- i32.const 3
- i32.or
- i32.store offset=4
- local.get $1
- local.get $2
- i32.store offset=8
- local.get $2
- local.get $1
- local.get $2
- i32.load offset=4
- i32.const 3
- i32.and
- i32.or
- i32.store offset=4
- local.get $3
- local.get $1
- i32.store offset=8
- end
- local.get $0
- )
- (func $~lib/rt/itcms/__unpin (param $0 i32)
- (local $1 i32)
- (local $2 i32)
- local.get $0
- i32.eqz
- if
- return
- end
- local.get $0
- i32.const 20
- i32.sub
- local.tee $1
- i32.load offset=4
- i32.const 3
- i32.and
- i32.const 3
- i32.ne
- if
- i32.const 2160
- i32.const 1424
- i32.const 352
- i32.const 5
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/rt/itcms/state
- i32.const 1
- i32.eq
- if
- local.get $1
- call $~lib/rt/itcms/Object#makeGray
- else
- local.get $1
- call $~lib/rt/itcms/Object#unlink
- global.get $~lib/rt/itcms/fromSpace
- local.tee $0
- i32.load offset=8
- local.set $2
- local.get $1
- local.get $0
- global.get $~lib/rt/itcms/white
- i32.or
- i32.store offset=4
- local.get $1
- local.get $2
- i32.store offset=8
- local.get $2
- local.get $1
- local.get $2
- i32.load offset=4
- i32.const 3
- i32.and
- i32.or
- i32.store offset=4
- local.get $0
- local.get $1
- i32.store offset=8
- end
- )
- (func $~lib/rt/itcms/__collect
- global.get $~lib/rt/itcms/state
- i32.const 0
- i32.gt_s
- if
- loop $while-continue|0
- global.get $~lib/rt/itcms/state
- if
- call $~lib/rt/itcms/step
- drop
- br $while-continue|0
- end
- end
- end
- call $~lib/rt/itcms/step
- drop
- loop $while-continue|1
- global.get $~lib/rt/itcms/state
- if
- call $~lib/rt/itcms/step
- drop
- br $while-continue|1
- 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
+ i32.or
+ i32.store offset=4
)
(func $~lib/rt/__visit_members (param $0 i32)
(local $1 i32)
@@ -1929,10 +1404,9 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $1
i32.const 0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
@@ -1972,16 +1446,15 @@
i32.lt_s
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $2
i32.const 0
i32.store
- local.get $2
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
i32.load offset=4
local.set $1
- local.get $2
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $1
@@ -2014,25 +1487,13 @@
end
local.get $0
i32.load offset=56
- local.tee $1
- if
- local.get $1
- call $~lib/rt/itcms/__visit
- end
+ call $~lib/rt/itcms/__visit
local.get $0
i32.load offset=60
- local.tee $1
- if
- local.get $1
- call $~lib/rt/itcms/__visit
- end
+ call $~lib/rt/itcms/__visit
local.get $0
i32.load offset=64
- local.tee $0
- if
- local.get $0
- call $~lib/rt/itcms/__visit
- end
+ call $~lib/rt/itcms/__visit
return
end
return
@@ -2048,11 +1509,7 @@
end
local.get $0
i32.load
- local.tee $0
- if
- local.get $0
- call $~lib/rt/itcms/__visit
- end
+ call $~lib/rt/itcms/__visit
return
end
global.get $~lib/memory/__stack_pointer
@@ -2066,18 +1523,7 @@
i32.add
global.set $~lib/memory/__stack_pointer
)
- (func $~setArgumentsLength (param $0 i32)
- local.get $0
- global.set $~argumentsLength
- )
- (func $~start
- (local $0 i32)
- global.get $~started
- if
- return
- end
- i32.const 1
- global.set $~started
+ (func $export:bindings/esm/staticarrayU16 (param $0 i32) (result i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -2094,196 +1540,15 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 0
- i32.store
local.get $0
- i32.const 1152
i32.store
- i32.const 1152
- i32.const 1
- f64.const 42
- f64.const 0
- f64.const 0
- f64.const 0
- f64.const 0
- call $~lib/builtins/trace
- global.get $~lib/memory/__stack_pointer
- i32.const 1184
- i32.store
- i32.const 1184
- 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
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- memory.size
- i32.const 16
- i32.shl
- i32.const 35044
- i32.sub
- i32.const 1
- i32.shr_u
- global.set $~lib/rt/itcms/threshold
- i32.const 1476
- i32.const 1472
- i32.store
- i32.const 1480
- i32.const 1472
- i32.store
- i32.const 1472
- global.set $~lib/rt/itcms/pinSpace
- i32.const 1508
- i32.const 1504
- i32.store
- i32.const 1512
- i32.const 1504
- i32.store
- i32.const 1504
- global.set $~lib/rt/itcms/toSpace
- i32.const 1652
- i32.const 1648
- i32.store
- i32.const 1656
- i32.const 1648
- i32.store
- i32.const 1648
- global.set $~lib/rt/itcms/fromSpace
- )
- (func $bindings/esm/stringFunction (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
- (local $3 i32)
- (local $4 i32)
- (local $5 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 2276
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $2
- i64.const 0
- i64.store
- local.get $2
- local.get $0
- i32.store
- local.get $2
- local.get $1
- i32.store offset=4
- local.get $2
- i32.const 8
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $2
- i64.const 0
- i64.store
- local.get $2
- local.get $0
- i32.store
- local.get $2
- local.get $1
- i32.store offset=4
- local.get $2
- i32.const 8
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $2
- i64.const 0
- i64.store
- local.get $2
- local.get $0
- i32.store
- local.get $0
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const -2
- i32.and
- local.set $3
- local.get $2
- local.get $1
- i32.store
- block $__inlined_func$~lib/string/String#concat$281
- local.get $1
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const -2
- i32.and
- local.tee $4
- local.get $3
- i32.add
- local.tee $5
- i32.eqz
- if
- local.get $2
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- i32.const 1760
- local.set $2
- br $__inlined_func$~lib/string/String#concat$281
- end
- global.get $~lib/memory/__stack_pointer
- local.get $5
- i32.const 2
- call $~lib/rt/itcms/__new
- local.tee $2
- i32.store offset=4
- local.get $2
- local.get $0
- local.get $3
- memory.copy
- local.get $2
- local.get $3
- i32.add
- local.get $1
- local.get $4
- memory.copy
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- end
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $2
- return
- end
- i32.const 35072
- i32.const 35120
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
+ local.get $0
)
- (func $~lib/typedarray/Int16Array#get:length (param $0 i32) (result i32)
- (local $1 i32)
+ (func $~lib/typedarray/Uint64Array#__set (param $0 i32) (param $1 i32) (param $2 i64)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -2300,25 +1565,42 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $1
i32.const 0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
+ local.get $1
local.get $0
i32.load offset=8
- i32.const 1
+ i32.const 3
i32.shr_u
- local.set $0
+ i32.ge_u
+ if
+ i32.const 1552
+ i32.const 1792
+ i32.const 1173
+ i32.const 64
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.load offset=4
local.get $1
+ i32.const 3
+ i32.shl
+ i32.add
+ local.get $2
+ i64.store
+ global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
)
(func $~lib/typedarray/Float32Array#get:length (param $0 i32) (result i32)
- (local $1 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -2335,25 +1617,21 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $1
i32.const 0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
i32.load offset=8
i32.const 2
i32.shr_u
- local.set $0
- local.get $1
+ global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
)
- (func $~lib/typedarray/Uint64Array#__set (param $0 i32) (param $1 i32) (param $2 i64)
- (local $3 i32)
+ (func $~lib/staticarray/StaticArray#__set (param $0 i32) (param $1 i32) (param $2 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -2370,385 +1648,608 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $3
i32.const 0
i32.store
- local.get $3
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $1
local.get $0
- i32.load offset=8
- i32.const 3
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 1552
- i32.const 1792
- i32.const 1173
- i32.const 64
+ i32.const 1856
+ i32.const 93
+ i32.const 41
call $~lib/builtins/abort
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $3
local.get $0
i32.store
local.get $0
- i32.load offset=4
local.get $1
- i32.const 3
+ i32.const 2
i32.shl
i32.add
local.get $2
- i64.store
- local.get $3
+ i32.store
+ global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
)
- (func $bindings/esm/typedarrayFunction (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
- (local $3 i32)
- (local $4 f32)
- (local $5 i32)
- (local $6 i32)
- (local $7 i32)
+ (func $~lib/staticarray/StaticArray#__get (param $0 i32) (param $1 i32) (result i32)
global.get $~lib/memory/__stack_pointer
- i32.const 12
+ i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
- block $folding-inner1
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner1
- 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
- local.get $0
- i32.store
- local.get $0
- call $~lib/typedarray/Int16Array#get:length
- local.set $5
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store
- local.get $2
- block $__inlined_func$~lib/typedarray/Uint64Array#constructor$1 (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 2276
+ i32.lt_s
+ if
+ i32.const 35072
+ i32.const 35120
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $1
+ local.get $0
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 2
+ i32.shr_u
+ i32.ge_u
+ if
+ i32.const 1552
+ i32.const 1856
+ i32.const 78
+ i32.const 41
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ local.get $1
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (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
+ local.get $1
+ i32.const 536870910
+ i32.lt_u
+ if
local.get $1
- call $~lib/typedarray/Float32Array#get:length
- local.get $5
+ i32.const 1
+ i32.const 27
+ local.get $1
+ i32.clz
+ i32.sub
+ i32.shl
i32.add
- local.set $5
- global.get $~lib/memory/__stack_pointer
- i32.const 8
+ i32.const 1
i32.sub
- global.set $~lib/memory/__stack_pointer
- block $folding-inner00
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner00
- global.get $~lib/memory/__stack_pointer
- local.tee $2
- i64.const 0
- i64.store
- local.get $2
- i32.const 12
- i32.const 7
- call $~lib/rt/itcms/__new
- local.tee $2
- i32.store
- global.get $~lib/memory/__stack_pointer
- local.tee $6
- local.get $2
- i32.store offset=4
- local.get $6
- i32.const 16
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner00
- global.get $~lib/memory/__stack_pointer
- local.tee $7
- i64.const 0
- i64.store
- local.get $7
- i64.const 0
- i64.store offset=8
- local.get $2
- i32.eqz
- if
- local.get $7
- i32.const 12
- i32.const 3
- call $~lib/rt/itcms/__new
- local.tee $2
- i32.store
- end
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store offset=4
- local.get $2
- i32.const 0
- i32.store
- local.get $2
- i32.const 0
- i32.const 0
- call $~lib/rt/itcms/__link
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store offset=4
- local.get $2
- i32.const 0
- i32.store offset=4
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store offset=4
- local.get $2
- i32.const 0
- i32.store offset=8
- local.get $5
- i32.const 134217727
- i32.gt_u
- if
- i32.const 1248
- i32.const 1296
- i32.const 19
- i32.const 57
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.get $5
- i32.const 3
- i32.shl
- local.tee $5
- i32.const 1
- call $~lib/rt/itcms/__new
- local.tee $7
- i32.store offset=8
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store offset=4
- global.get $~lib/memory/__stack_pointer
- local.get $7
- i32.store offset=12
- local.get $2
- local.get $7
- i32.store
- local.get $2
- local.get $7
- i32.const 0
- call $~lib/rt/itcms/__link
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store offset=4
- local.get $2
- local.get $7
- i32.store offset=4
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store offset=4
- local.get $2
- local.get $5
- i32.store offset=8
- global.get $~lib/memory/__stack_pointer
- i32.const 16
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $6
- local.get $2
- i32.store
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $2
- br $__inlined_func$~lib/typedarray/Uint64Array#constructor$1
+ local.set $1
+ end
+ local.get $1
+ i32.const 31
+ local.get $1
+ i32.clz
+ i32.sub
+ local.tee $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
+ local.get $2
+ i32.const 23
+ i32.lt_u
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 1696
+ i32.const 334
+ 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 1696
+ i32.const 347
+ i32.const 18
+ call $~lib/builtins/abort
+ unreachable
end
- br $folding-inner1
+ 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
- local.tee $2
- i32.store offset=4
- loop $for-loop|0
- global.get $~lib/memory/__stack_pointer
+ end
+ )
+ (func $~lib/rt/tlsf/initialize
+ (local $0 i32)
+ (local $1 i32)
+ memory.size
+ local.tee $1
+ i32.const 0
+ i32.le_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 35056
+ i32.const 0
+ i32.store
+ i32.const 36624
+ i32.const 0
+ i32.store
+ loop $for-loop|0
+ local.get $0
+ i32.const 23
+ i32.lt_u
+ if
local.get $0
- i32.store
+ i32.const 2
+ i32.shl
+ i32.const 35056
+ 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 $0
+ i32.const 4
+ i32.shl
+ local.get $1
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.const 35056
+ 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
- call $~lib/typedarray/Int16Array#get:length
+ i32.const 1
+ i32.add
+ local.set $0
+ br $for-loop|0
+ end
+ end
+ i32.const 35056
+ i32.const 36628
+ memory.size
+ i64.extend_i32_s
+ i64.const 16
+ i64.shl
+ call $~lib/rt/tlsf/addMemory
+ i32.const 35056
+ global.set $~lib/rt/tlsf/ROOT
+ )
+ (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i64)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ local.get $2
+ local.get $1
+ i64.extend_i32_u
+ i64.lt_u
+ if
+ i32.const 0
+ i32.const 1696
+ i32.const 382
+ 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 $0
+ i32.load offset=1568
+ local.tee $3
+ if
+ local.get $3
+ i32.const 4
+ i32.add
+ local.get $1
+ i32.gt_u
+ if
+ i32.const 0
+ i32.const 1696
+ i32.const 389
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $3
+ local.get $1
+ i32.const 16
+ i32.sub
+ local.tee $5
+ i32.eq
+ if
local.get $3
- i32.gt_s
+ i32.load
+ local.set $4
+ local.get $5
+ local.set $1
+ end
+ else
+ local.get $0
+ i32.const 1572
+ i32.add
+ local.get $1
+ i32.gt_u
+ if
+ i32.const 0
+ i32.const 1696
+ i32.const 402
+ i32.const 5
+ call $~lib/builtins/abort
+ unreachable
+ end
+ end
+ local.get $2
+ i32.wrap_i64
+ i32.const -16
+ i32.and
+ local.get $1
+ i32.sub
+ local.tee $3
+ i32.const 20
+ i32.lt_u
+ if
+ return
+ end
+ local.get $1
+ local.get $4
+ i32.const 2
+ i32.and
+ local.get $3
+ i32.const 8
+ i32.sub
+ local.tee $3
+ 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 $1
+ i32.const 4
+ i32.add
+ local.get $3
+ i32.add
+ local.tee $3
+ i32.const 2
+ i32.store
+ local.get $0
+ local.get $3
+ i32.store offset=1568
+ local.get $0
+ local.get $1
+ call $~lib/rt/tlsf/insertBlock
+ )
+ (func $~lib/rt/itcms/visitRoots
+ (local $0 i32)
+ (local $1 i32)
+ i32.const 1552
+ call $~lib/rt/itcms/__visit
+ i32.const 1248
+ call $~lib/rt/itcms/__visit
+ i32.const 1968
+ call $~lib/rt/itcms/__visit
+ i32.const 1360
+ call $~lib/rt/itcms/__visit
+ i32.const 2096
+ call $~lib/rt/itcms/__visit
+ i32.const 2160
+ call $~lib/rt/itcms/__visit
+ i32.const 1056
+ call $~lib/rt/itcms/__visit
+ global.get $bindings/esm/mutableStringGlobal
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $~lib/rt/itcms/pinSpace
+ local.tee $1
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ loop $while-continue|0
+ local.get $0
+ local.get $1
+ i32.ne
+ if
+ local.get $0
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.const 3
+ i32.ne
if
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=8
- 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 2276
- i32.lt_s
- br_if $folding-inner1
- global.get $~lib/memory/__stack_pointer
- local.tee $5
i32.const 0
- i32.store
- local.get $5
- local.get $0
- i32.store
- local.get $3
- local.get $0
- i32.load offset=8
- i32.const 1
- i32.shr_u
- i32.ge_u
- if
- i32.const 1552
- i32.const 1792
- i32.const 452
- i32.const 64
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.tee $5
- local.get $0
- i32.store
- local.get $0
- i32.load offset=4
- local.get $3
- i32.const 1
- i32.shl
- i32.add
- i32.load16_s
- local.set $6
- local.get $5
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $2
- local.get $3
- local.get $6
- i64.extend_i32_s
- call $~lib/typedarray/Uint64Array#__set
- local.get $3
- i32.const 1
- i32.add
- local.set $3
- br $for-loop|0
+ i32.const 1424
+ i32.const 160
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
end
+ local.get $0
+ i32.const 20
+ i32.add
+ call $~lib/rt/__visit_members
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ br $while-continue|0
end
- i32.const 0
- local.set $3
- loop $for-loop|1
- global.get $~lib/memory/__stack_pointer
+ end
+ )
+ (func $~lib/array/ensureCapacity (param $0 i32) (param $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 2276
+ i32.lt_s
+ if
+ i32.const 35072
+ i32.const 35120
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $1
+ local.get $0
+ i32.load offset=8
+ local.tee $2
+ i32.const 2
+ i32.shr_u
+ i32.gt_u
+ if
+ local.get $1
+ i32.const 268435455
+ i32.gt_u
+ if
+ i32.const 1248
+ i32.const 1920
+ i32.const 19
+ i32.const 48
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ block $__inlined_func$~lib/rt/itcms/__renew$270
+ i32.const 1073741820
+ local.get $2
+ i32.const 1
+ i32.shl
+ local.tee $2
+ local.get $2
+ i32.const 1073741820
+ i32.ge_u
+ select
+ local.tee $2
+ i32.const 8
local.get $1
- i32.store
local.get $1
- call $~lib/typedarray/Float32Array#get:length
- local.get $3
- i32.gt_s
+ i32.const 8
+ i32.le_u
+ select
+ i32.const 2
+ i32.shl
+ local.tee $1
+ local.get $1
+ local.get $2
+ i32.lt_u
+ select
+ local.tee $3
+ local.get $0
+ i32.load
+ local.tee $2
+ i32.const 20
+ i32.sub
+ local.tee $4
+ i32.load
+ i32.const -4
+ i32.and
+ i32.const 16
+ i32.sub
+ i32.le_u
if
- global.get $~lib/memory/__stack_pointer
- local.get $2
- i32.store
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=8
- local.get $0
- call $~lib/typedarray/Int16Array#get:length
- local.get $3
- i32.add
- local.set $5
- global.get $~lib/memory/__stack_pointer
- local.get $1
- i32.store offset=8
- 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 2276
- i32.lt_s
- br_if $folding-inner1
- global.get $~lib/memory/__stack_pointer
- local.tee $6
- i32.const 0
- i32.store
- local.get $6
- local.get $1
- i32.store
- local.get $3
- local.get $1
- i32.load offset=8
- i32.const 2
- i32.shr_u
- i32.ge_u
- if
- i32.const 1552
- i32.const 1792
- i32.const 1304
- i32.const 64
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.tee $6
- local.get $1
- i32.store
- local.get $1
- i32.load offset=4
- local.get $3
- i32.const 2
- i32.shl
- i32.add
- f32.load
- local.set $4
- local.get $6
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $2
- local.get $5
local.get $4
- i64.trunc_sat_f32_u
- call $~lib/typedarray/Uint64Array#__set
local.get $3
- i32.const 1
- i32.add
- local.set $3
- br $for-loop|1
+ i32.store offset=16
+ local.get $2
+ local.set $1
+ br $__inlined_func$~lib/rt/itcms/__renew$270
end
+ local.get $3
+ local.get $4
+ i32.load offset=12
+ call $~lib/rt/itcms/__new
+ local.tee $1
+ local.get $2
+ local.get $3
+ local.get $4
+ i32.load offset=16
+ local.tee $4
+ local.get $3
+ local.get $4
+ i32.lt_u
+ select
+ memory.copy
end
- global.get $~lib/memory/__stack_pointer
- i32.const 12
- i32.add
- global.set $~lib/memory/__stack_pointer
+ local.get $1
local.get $2
- return
+ i32.ne
+ if
+ local.get $0
+ local.get $1
+ i32.store
+ local.get $0
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ i32.const 0
+ call $~lib/rt/itcms/__link
+ end
+ local.get $0
+ local.get $3
+ i32.store offset=8
end
- i32.const 35072
- i32.const 35120
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
)
- (func $~lib/staticarray/StaticArray#__get (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
+ (func $~lib/array/Array<~lib/string/String>#__set (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -2765,45 +2266,63 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $2
i32.const 0
i32.store
- local.get $2
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $1
local.get $0
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const 2
- i32.shr_u
+ i32.load offset=12
i32.ge_u
if
- i32.const 1552
- i32.const 1856
- i32.const 78
- i32.const 41
- call $~lib/builtins/abort
- unreachable
+ local.get $1
+ i32.const 0
+ i32.lt_s
+ if
+ i32.const 1552
+ i32.const 1920
+ i32.const 130
+ i32.const 22
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $3
+ call $~lib/array/ensureCapacity
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $3
+ i32.store offset=12
end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
local.get $0
+ i32.load offset=4
local.get $1
i32.const 2
i32.shl
i32.add
- i32.load
- local.set $0
+ local.get $2
+ i32.store
+ local.get $0
+ local.get $2
+ i32.const 1
+ call $~lib/rt/itcms/__link
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
)
- (func $~lib/staticarray/StaticArray#__set (param $0 i32) (param $1 i32) (param $2 i32)
- (local $3 i32)
+ (func $~lib/array/Array<~lib/string/String>#__get (param $0 i32) (param $1 i32) (result i32)
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
@@ -2818,46 +2337,54 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $3
- i32.const 0
- i32.store
- local.get $3
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $1
local.get $0
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const 2
- i32.shr_u
+ i32.load offset=12
i32.ge_u
if
i32.const 1552
- i32.const 1856
- i32.const 93
- i32.const 41
+ i32.const 1920
+ i32.const 114
+ i32.const 42
call $~lib/builtins/abort
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $3
local.get $0
i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
+ i32.load offset=4
local.get $1
i32.const 2
i32.shl
i32.add
- local.get $2
- i32.store
- local.get $3
- i32.const 4
+ i32.load
+ local.tee $0
+ i32.store offset=4
+ local.get $0
+ i32.eqz
+ if
+ i32.const 1968
+ i32.const 1920
+ i32.const 118
+ i32.const 40
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
+ local.get $0
)
- (func $~lib/array/Array#get:length (param $0 i32) (result i32)
- (local $1 i32)
+ (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -2874,23 +2401,57 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $1
i32.const 0
i32.store
- local.get $1
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
+ local.get $1
local.get $0
i32.load offset=12
- local.set $0
+ i32.ge_u
+ if
+ local.get $1
+ i32.const 0
+ i32.lt_s
+ if
+ i32.const 1552
+ i32.const 1920
+ i32.const 130
+ i32.const 22
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $3
+ call $~lib/array/ensureCapacity
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $3
+ i32.store offset=12
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.load offset=4
local.get $1
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $2
+ i32.store
+ global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
)
(func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
global.get $~lib/memory/__stack_pointer
i32.const 4
i32.sub
@@ -2907,10 +2468,9 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $2
i32.const 0
i32.store
- local.get $2
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $1
@@ -2926,7 +2486,6 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $2
local.get $0
i32.store
local.get $0
@@ -2936,218 +2495,339 @@
i32.shl
i32.add
i32.load
- local.set $0
- local.get $2
+ global.get $~lib/memory/__stack_pointer
i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
)
- (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32)
+ (func $bindings/esm/stringFunction (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.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- if
- i32.const 35072
- i32.const 35120
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.tee $2
- i32.const 0
- i32.store
- local.get $2
- local.get $0
- i32.store
- local.get $1
- local.get $0
- i32.load offset=8
- local.tee $2
- i32.const 2
- i32.shr_u
- i32.gt_u
- if
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $1
- i32.const 268435455
- i32.gt_u
- if
- i32.const 1248
- i32.const 1920
- i32.const 19
- i32.const 48
- call $~lib/builtins/abort
- unreachable
- end
+ 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 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ 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 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
- block $__inlined_func$~lib/rt/itcms/__renew$265
- i32.const 1073741820
- local.get $2
- i32.const 1
- i32.shl
- local.tee $2
- local.get $2
- i32.const 1073741820
- i32.ge_u
- select
- local.tee $2
- i32.const 8
- local.get $1
- local.get $1
- i32.const 8
- i32.le_u
- select
- i32.const 2
- i32.shl
- local.tee $1
+ local.get $0
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const -2
+ i32.and
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store
+ block $__inlined_func$~lib/string/String#concat$285
local.get $1
- local.get $2
- i32.lt_u
- select
- local.tee $3
- local.get $0
- i32.load
- local.tee $2
i32.const 20
i32.sub
- local.tee $4
- i32.load
- i32.const -4
+ i32.load offset=16
+ i32.const -2
i32.and
- i32.const 16
- i32.sub
- i32.le_u
+ local.tee $4
+ local.get $3
+ i32.add
+ local.tee $2
+ i32.eqz
if
- local.get $4
- local.get $3
- i32.store offset=16
- local.get $2
- local.set $1
- br $__inlined_func$~lib/rt/itcms/__renew$265
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ i32.const 1760
+ local.set $2
+ br $__inlined_func$~lib/string/String#concat$285
end
- local.get $3
- local.get $4
- i32.load offset=12
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.const 2
call $~lib/rt/itcms/__new
- local.tee $1
+ local.tee $2
+ i32.store offset=4
local.get $2
+ local.get $0
local.get $3
- local.get $4
- i32.load offset=16
- local.tee $4
+ memory.copy
+ local.get $2
local.get $3
+ i32.add
+ local.get $1
local.get $4
- i32.lt_u
- select
memory.copy
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
end
- local.get $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
local.get $2
- i32.ne
- if
- local.get $0
- local.get $1
- i32.store
- local.get $0
- local.get $1
- i32.store offset=4
- local.get $0
- local.get $1
- i32.const 0
- call $~lib/rt/itcms/__link
- end
- local.get $0
- local.get $3
- i32.store offset=8
+ return
end
- global.get $~lib/memory/__stack_pointer
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
+ i32.const 35072
+ i32.const 35120
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
)
- (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32)
- (local $3 i32)
- global.get $~lib/memory/__stack_pointer
- i32.const 4
+ (func $~start
+ global.get $~started
+ if
+ return
+ end
+ i32.const 1
+ global.set $~started
+ i32.const 1152
+ i32.const 1
+ f64.const 42
+ f64.const 0
+ f64.const 0
+ f64.const 0
+ f64.const 0
+ call $~lib/builtins/trace
+ i32.const 1184
+ 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
+ memory.size
+ i32.const 16
+ i32.shl
+ i32.const 35044
i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
+ i32.const 1
+ i32.shr_u
+ global.set $~lib/rt/itcms/threshold
+ i32.const 1476
+ i32.const 1472
+ i32.store
+ i32.const 1480
+ i32.const 1472
+ i32.store
+ i32.const 1472
+ global.set $~lib/rt/itcms/pinSpace
+ i32.const 1508
+ i32.const 1504
+ i32.store
+ i32.const 1512
+ i32.const 1504
+ i32.store
+ i32.const 1504
+ global.set $~lib/rt/itcms/toSpace
+ i32.const 1652
+ i32.const 1648
+ i32.store
+ i32.const 1656
+ i32.const 1648
+ i32.store
+ i32.const 1648
+ global.set $~lib/rt/itcms/fromSpace
+ )
+ (func $~setArgumentsLength (param $0 i32)
+ local.get $0
+ global.set $~argumentsLength
+ )
+ (func $~lib/rt/itcms/__unpin (param $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ local.get $0
+ i32.eqz
if
- i32.const 35072
- i32.const 35120
- i32.const 1
- i32.const 1
+ return
+ end
+ local.get $0
+ i32.const 20
+ i32.sub
+ local.tee $1
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.const 3
+ i32.ne
+ if
+ i32.const 2160
+ i32.const 1424
+ i32.const 352
+ i32.const 5
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $3
- i32.const 0
- i32.store
- local.get $3
- local.get $0
- i32.store
- local.get $1
+ global.get $~lib/rt/itcms/state
+ i32.const 1
+ i32.eq
+ if
+ local.get $1
+ call $~lib/rt/itcms/Object#makeGray
+ else
+ local.get $1
+ call $~lib/rt/itcms/Object#unlink
+ global.get $~lib/rt/itcms/fromSpace
+ local.tee $0
+ i32.load offset=8
+ local.set $2
+ local.get $1
+ local.get $0
+ global.get $~lib/rt/itcms/white
+ i32.or
+ i32.store offset=4
+ local.get $1
+ local.get $2
+ i32.store offset=8
+ local.get $2
+ local.get $1
+ local.get $2
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ i32.store offset=8
+ end
+ )
+ (func $~lib/rt/itcms/__pin (param $0 i32) (result i32)
+ (local $1 i32)
+ (local $2 i32)
+ (local $3 i32)
local.get $0
- i32.load offset=12
- i32.ge_u
if
- local.get $1
- i32.const 0
- i32.lt_s
+ local.get $0
+ i32.const 20
+ i32.sub
+ local.tee $1
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.const 3
+ i32.eq
if
- i32.const 1552
- i32.const 1920
- i32.const 130
- i32.const 22
+ i32.const 2096
+ i32.const 1424
+ i32.const 338
+ i32.const 7
call $~lib/builtins/abort
unreachable
end
- local.get $0
local.get $1
- i32.const 1
- i32.add
+ call $~lib/rt/itcms/Object#unlink
+ global.get $~lib/rt/itcms/pinSpace
local.tee $3
- call $~lib/array/ensureCapacity
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store
- local.get $0
+ i32.load offset=8
+ local.set $2
+ local.get $1
local.get $3
- i32.store offset=12
+ i32.const 3
+ i32.or
+ i32.store offset=4
+ local.get $1
+ local.get $2
+ i32.store offset=8
+ local.get $2
+ local.get $1
+ local.get $2
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ local.get $3
+ local.get $1
+ i32.store offset=8
end
- global.get $~lib/memory/__stack_pointer
- local.tee $3
- local.get $0
- i32.store
local.get $0
- i32.load offset=4
- local.get $1
- i32.const 2
- i32.shl
- i32.add
- local.get $2
- i32.store
- local.get $3
- i32.const 4
+ )
+ (func $~lib/rt/itcms/__collect
+ global.get $~lib/rt/itcms/state
+ i32.const 0
+ i32.gt_s
+ if
+ loop $while-continue|0
+ global.get $~lib/rt/itcms/state
+ if
+ call $~lib/rt/itcms/step
+ drop
+ br $while-continue|0
+ end
+ end
+ end
+ call $~lib/rt/itcms/step
+ drop
+ loop $while-continue|1
+ global.get $~lib/rt/itcms/state
+ if
+ call $~lib/rt/itcms/step
+ drop
+ br $while-continue|1
+ 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/memory/__stack_pointer
+ global.set $~lib/rt/itcms/threshold
)
- (func $~lib/array/Array<~lib/string/String>#__get (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
+ (func $export:bindings/esm/typedarrayFunction (param $0 i32) (param $1 i32) (result i32)
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
@@ -3164,233 +2844,304 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $2
- i64.const 0
- i64.store
- local.get $2
local.get $0
i32.store
- local.get $1
- local.get $0
- i32.load offset=12
- i32.ge_u
- if
- i32.const 1552
- i32.const 1920
- 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.store
- local.get $2
- local.get $0
- i32.load offset=4
local.get $1
- i32.const 2
- i32.shl
- i32.add
- i32.load
- local.tee $0
i32.store offset=4
local.get $0
- i32.eqz
- if
- i32.const 1968
- i32.const 1920
- i32.const 118
- i32.const 40
- call $~lib/builtins/abort
- unreachable
- end
+ local.get $1
+ call $bindings/esm/typedarrayFunction
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
)
- (func $~lib/array/Array<~lib/string/String>#__set (param $0 i32) (param $1 i32) (param $2 i32)
- (local $3 i32)
+ (func $export:bindings/esm/stringFunctionOptional@varargs (param $0 i32) (param $1 i32) (result i32)
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 2276
- i32.lt_s
- if
- i32.const 35072
- i32.const 35120
- 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
- local.get $0
- i32.store
- local.get $1
- local.get $0
- i32.load offset=12
- i32.ge_u
- if
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $1
- i32.const 0
+ i32.store offset=4
+ 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 2276
i32.lt_s
- if
- i32.const 1552
- i32.const 1920
- i32.const 130
- i32.const 22
- call $~lib/builtins/abort
- unreachable
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store offset=8
+ block $1of1
+ block $0of1
+ block $outOfRange
+ global.get $~argumentsLength
+ i32.const 1
+ i32.sub
+ br_table $0of1 $1of1 $outOfRange
+ end
+ unreachable
+ end
+ i32.const 1088
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 1088
+ i32.store
end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
local.get $0
local.get $1
+ call $bindings/esm/stringFunction
+ 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 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ return
+ end
+ i32.const 35072
+ i32.const 35120
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:bindings/esm/stringFunction (param $0 i32) (param $1 i32) (result 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 2276
+ i32.lt_s
+ if
+ i32.const 35072
+ i32.const 35120
i32.const 1
- i32.add
- local.tee $3
- call $~lib/array/ensureCapacity
- global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store
- local.get $0
- local.get $3
- i32.store offset=12
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
end
global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
- local.get $0
- i32.load offset=4
+ global.get $~lib/memory/__stack_pointer
local.get $1
- i32.const 2
- i32.shl
- i32.add
- local.get $2
- i32.store
+ i32.store offset=4
local.get $0
- local.get $2
- i32.const 1
- call $~lib/rt/itcms/__link
+ local.get $1
+ call $bindings/esm/stringFunction
global.get $~lib/memory/__stack_pointer
- i32.const 4
+ i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
)
- (func $export:bindings/esm/bufferFunction (param $0 i32) (param $1 i32) (result i32)
+ (func $export:bindings/esm/staticarrayFunction (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
- (local $5 i32)
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
- block $folding-inner0
+ block $folding-inner1
global.get $~lib/memory/__stack_pointer
i32.const 2276
i32.lt_s
- br_if $folding-inner0
+ br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $2
local.get $0
i32.store
- local.get $2
- local.get $1
- i32.store offset=4
- local.get $2
- i32.const 8
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $3
- i64.const 0
- i64.store
- local.get $3
- local.get $0
- i32.store
- local.get $0
- i32.const 20
- i32.sub
- i32.load offset=16
- local.set $4
- local.get $3
- local.get $1
- i32.store
local.get $1
- i32.const 20
- i32.sub
- i32.load offset=16
- local.tee $2
- local.get $4
- i32.add
- local.set $5
- local.get $3
- i32.const 4
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- i32.const 0
- i32.store
- local.get $5
- i32.const 1073741820
- i32.gt_u
- if
- i32.const 1248
- i32.const 1296
- i32.const 52
- i32.const 43
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.get $5
- i32.const 1
- call $~lib/rt/itcms/__new
- local.tee $5
- i32.store
- 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 offset=4
- local.get $5
- local.get $0
- local.get $4
- memory.copy
- local.get $4
- local.get $5
- i32.add
- local.get $1
- local.get $2
- memory.copy
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
+ block $__inlined_func$bindings/esm/staticarrayFunction$1 (result 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 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 2
+ i32.shr_u
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store
+ local.get $1
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 2
+ i32.shr_u
+ i32.add
+ local.set $4
+ 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 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ local.get $4
+ i32.const 268435455
+ i32.gt_u
+ if
+ i32.const 1248
+ i32.const 1856
+ i32.const 51
+ i32.const 60
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.const 2
+ i32.shl
+ i32.const 8
+ call $~lib/rt/itcms/__new
+ local.tee $4
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store offset=4
+ loop $for-loop|0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $0
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 2
+ i32.shr_u
+ i32.lt_s
+ if
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=8
+ local.get $4
+ local.get $2
+ local.get $0
+ local.get $2
+ call $~lib/staticarray/StaticArray#__get
+ call $~lib/staticarray/StaticArray#__set
+ local.get $2
+ i32.const 1
+ i32.add
+ local.set $2
+ br $for-loop|0
+ end
+ end
+ i32.const 0
+ local.set $2
+ loop $for-loop|1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store
+ local.get $2
+ local.get $1
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 2
+ i32.shr_u
+ i32.lt_s
+ if
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=8
+ local.get $2
+ local.get $0
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 2
+ i32.shr_u
+ i32.add
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $4
+ local.get $3
+ local.get $1
+ local.get $2
+ call $~lib/staticarray/StaticArray#__get
+ call $~lib/staticarray/StaticArray#__set
+ local.get $2
+ i32.const 1
+ i32.add
+ local.set $2
+ br $for-loop|1
+ end
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ br $__inlined_func$bindings/esm/staticarrayFunction$1
+ end
+ br $folding-inner1
+ end
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $5
return
end
i32.const 35072
@@ -3400,100 +3151,244 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:bindings/esm/stringFunction (param $0 i32) (param $1 i32) (result i32)
- (local $2 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 2276
- i32.lt_s
- if
- i32.const 35072
- i32.const 35120
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.tee $2
- local.get $0
- i32.store
- local.get $2
- local.get $1
- i32.store offset=4
- local.get $0
- local.get $1
- call $bindings/esm/stringFunction
- local.set $0
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $0
- )
- (func $export:bindings/esm/stringFunctionOptional@varargs (param $0 i32) (param $1 i32) (result i32)
+ (func $export:bindings/esm/objectFunction (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
+ (local $3 i32)
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
- block $folding-inner0
+ block $folding-inner1
global.get $~lib/memory/__stack_pointer
i32.const 2276
i32.lt_s
- br_if $folding-inner0
+ br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $2
local.get $0
i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ 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 2276
+ i32.lt_s
+ br_if $folding-inner1
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ block $__inlined_func$bindings/esm/PlainObject#constructor$4 (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner00
+ global.get $~lib/memory/__stack_pointer
+ i32.const 2276
+ i32.lt_s
+ br_if $folding-inner00
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 68
+ i32.const 13
+ call $~lib/rt/itcms/__new
+ local.tee $2
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ 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 2276
+ i32.lt_s
+ br_if $folding-inner00
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ local.get $2
+ i32.eqz
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 0
+ call $~lib/rt/itcms/__new
+ local.tee $2
+ i32.store
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store8
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store16 offset=2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i64.const 0
+ i64.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store8 offset=16
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store16 offset=18
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store offset=20
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i64.const 0
+ i64.store offset=24
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store offset=32
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store offset=36
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store8 offset=40
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ f32.const 0
+ f32.store offset=44
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ f64.const 0
+ f64.store offset=48
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store offset=56
+ local.get $2
+ i32.const 0
+ i32.const 0
+ call $~lib/rt/itcms/__link
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store offset=60
+ local.get $2
+ i32.const 0
+ i32.const 0
+ call $~lib/rt/itcms/__link
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
+ i32.store offset=64
+ local.get $2
+ i32.const 0
+ i32.const 0
+ call $~lib/rt/itcms/__link
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ br $__inlined_func$bindings/esm/PlainObject#constructor$4
+ end
+ br $folding-inner1
+ end
+ local.tee $2
+ i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $2
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=8
+ local.get $0
+ i32.load8_s
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
local.get $1
- i32.store offset=4
+ i32.store offset=8
local.get $2
- i32.const 12
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner0
+ local.get $3
+ local.get $1
+ i32.load8_s
+ i32.add
+ i32.store8
global.get $~lib/memory/__stack_pointer
- local.tee $2
- i64.const 0
- i64.store
local.get $2
- i32.const 0
- i32.store offset=8
- block $1of1
- block $0of1
- block $outOfRange
- global.get $~argumentsLength
- i32.const 1
- i32.sub
- br_table $0of1 $1of1 $outOfRange
- end
- unreachable
- end
- i32.const 1088
- local.set $1
- global.get $~lib/memory/__stack_pointer
- i32.const 1088
- i32.store
- end
+ i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.tee $2
local.get $0
- i32.store offset=4
- local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.load16_s offset=2
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
local.get $1
i32.store offset=8
+ local.get $2
local.get $0
local.get $1
- call $bindings/esm/stringFunction
- local.set $0
+ i32.load16_s offset=2
+ i32.add
+ i32.store16 offset=2
global.get $~lib/memory/__stack_pointer
i32.const 12
i32.add
@@ -3502,7 +3397,7 @@
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
+ local.get $2
return
end
i32.const 35072
@@ -3512,8 +3407,7 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:bindings/esm/typedarrayFunction (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
+ (func $export:bindings/esm/internrefFunction (param $0 i32) (param $1 i32) (result i32)
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
@@ -3530,23 +3424,18 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $2
local.get $0
i32.store
- local.get $2
+ global.get $~lib/memory/__stack_pointer
local.get $1
i32.store offset=4
- local.get $0
- local.get $1
- call $bindings/esm/typedarrayFunction
- local.set $0
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
local.get $0
)
- (func $export:bindings/esm/staticarrayFunction (param $0 i32) (param $1 i32) (result i32)
+ (func $export:bindings/esm/bufferFunction (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@@ -3555,189 +3444,101 @@
i32.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
- block $folding-inner1
+ block $folding-inner0
global.get $~lib/memory/__stack_pointer
i32.const 2276
i32.lt_s
- br_if $folding-inner1
+ br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $3
local.get $0
i32.store
- local.get $3
+ global.get $~lib/memory/__stack_pointer
local.get $1
i32.store offset=4
- block $__inlined_func$bindings/esm/staticarrayFunction$2 (result i32)
- local.get $3
- i32.const 12
- i32.sub
- global.set $~lib/memory/__stack_pointer
- block $folding-inner0
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- local.tee $3
- i64.const 0
- i64.store
- local.get $3
- i32.const 0
- i32.store offset=8
- local.get $3
- local.get $0
- i32.store
- local.get $0
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const 2
- i32.shr_u
- local.set $4
- local.get $3
- local.get $1
- i32.store
- local.get $4
- local.get $1
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const 2
- i32.shr_u
- i32.add
- local.set $4
- local.get $3
- i32.const 4
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner0
- global.get $~lib/memory/__stack_pointer
- i32.const 0
- i32.store
- local.get $4
- i32.const 268435455
- i32.gt_u
- if
- i32.const 1248
- i32.const 1856
- i32.const 51
- i32.const 60
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.get $4
- i32.const 2
- i32.shl
- i32.const 8
- call $~lib/rt/itcms/__new
- local.tee $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 $4
- i32.store offset=4
- loop $for-loop|0
- global.get $~lib/memory/__stack_pointer
- local.tee $3
- local.get $0
- i32.store
- local.get $2
- local.get $0
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const 2
- i32.shr_u
- i32.lt_s
- if
- local.get $3
- local.get $4
- i32.store
- local.get $3
- local.get $0
- i32.store offset=8
- local.get $4
- local.get $2
- local.get $0
- local.get $2
- call $~lib/staticarray/StaticArray#__get
- call $~lib/staticarray/StaticArray#__set
- local.get $2
- i32.const 1
- i32.add
- local.set $2
- br $for-loop|0
- end
- end
- i32.const 0
- local.set $2
- loop $for-loop|1
- global.get $~lib/memory/__stack_pointer
- local.tee $3
- local.get $1
- i32.store
- local.get $2
- local.get $1
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const 2
- i32.shr_u
- i32.lt_s
- if
- local.get $3
- local.get $4
- i32.store
- local.get $3
- local.get $0
- i32.store offset=8
- local.get $2
- local.get $0
- i32.const 20
- i32.sub
- i32.load offset=16
- i32.const 2
- i32.shr_u
- i32.add
- local.set $5
- local.get $3
- local.get $1
- i32.store offset=8
- local.get $4
- local.get $5
- local.get $1
- local.get $2
- call $~lib/staticarray/StaticArray#__get
- call $~lib/staticarray/StaticArray#__set
- local.get $2
- i32.const 1
- i32.add
- local.set $2
- br $for-loop|1
- end
- end
- global.get $~lib/memory/__stack_pointer
- i32.const 12
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $4
- br $__inlined_func$bindings/esm/staticarrayFunction$2
- end
- br $folding-inner1
+ 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 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store
+ local.get $1
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ local.tee $4
+ local.get $2
+ i32.add
+ local.set $5
+ 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 2276
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ local.get $5
+ i32.const 1073741820
+ i32.gt_u
+ if
+ i32.const 1248
+ i32.const 1296
+ i32.const 52
+ i32.const 43
+ call $~lib/builtins/abort
+ unreachable
end
- local.set $0
global.get $~lib/memory/__stack_pointer
- i32.const 8
+ local.get $5
+ i32.const 1
+ call $~lib/rt/itcms/__new
+ local.tee $5
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
+ local.get $5
+ i32.store offset=4
+ local.get $5
local.get $0
+ local.get $2
+ memory.copy
+ local.get $2
+ local.get $5
+ i32.add
+ local.get $1
+ local.get $4
+ memory.copy
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $5
return
end
i32.const 35072
@@ -3747,34 +3548,7 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:bindings/esm/staticarrayU16 (param $0 i32) (result i32)
- (local $1 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 2276
- i32.lt_s
- if
- i32.const 35072
- i32.const 35120
- i32.const 1
- i32.const 1
- call $~lib/builtins/abort
- unreachable
- end
- global.get $~lib/memory/__stack_pointer
- local.tee $1
- local.get $0
- i32.store
- local.get $1
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $0
- )
- (func $export:bindings/esm/arrayFunction (param $0 i32) (param $1 i32) (result i32)
+ (func $export:bindings/esm/arrayOfStringsFunction (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@@ -3790,14 +3564,13 @@
i32.lt_s
br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $3
local.get $0
i32.store
- local.get $3
+ global.get $~lib/memory/__stack_pointer
local.get $1
i32.store offset=4
- local.get $3
- i32.const 12
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
@@ -3805,27 +3578,26 @@
i32.lt_s
br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $3
i64.const 0
i64.store
- local.get $3
- i32.const 0
- i32.store offset=8
- local.get $3
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=8
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
call $~lib/array/Array#get:length
local.set $4
global.get $~lib/memory/__stack_pointer
local.get $1
i32.store
- local.get $3
local.get $1
call $~lib/array/Array#get:length
local.get $4
i32.add
- local.set $5
+ local.set $4
global.get $~lib/memory/__stack_pointer
i32.const 16
i32.sub
@@ -3835,47 +3607,46 @@
i32.lt_s
br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $3
i64.const 0
i64.store
- local.get $3
+ global.get $~lib/memory/__stack_pointer
i64.const 0
i64.store offset=8
- local.get $3
+ global.get $~lib/memory/__stack_pointer
i32.const 16
- i32.const 11
+ i32.const 12
call $~lib/rt/itcms/__new
- local.tee $6
+ local.tee $5
i32.store
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
- local.get $6
+ local.get $5
i32.const 0
i32.store
- local.get $6
+ local.get $5
i32.const 0
i32.const 0
call $~lib/rt/itcms/__link
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
- local.get $6
+ local.get $5
i32.const 0
i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
- local.get $6
+ local.get $5
i32.const 0
i32.store offset=8
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
- local.get $6
+ local.get $5
i32.const 0
i32.store offset=12
- local.get $5
+ local.get $4
i32.const 268435455
i32.gt_u
if
@@ -3888,54 +3659,54 @@
end
global.get $~lib/memory/__stack_pointer
i32.const 8
- local.get $5
- local.get $5
+ local.get $4
+ local.get $4
i32.const 8
i32.le_u
select
i32.const 2
i32.shl
- local.tee $3
+ local.tee $6
i32.const 1
call $~lib/rt/itcms/__new
- local.tee $4
+ local.tee $3
i32.store offset=8
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $4
+ local.get $3
i32.store offset=12
- local.get $6
- local.get $4
+ local.get $5
+ local.get $3
i32.store
- local.get $6
- local.get $4
+ local.get $5
+ local.get $3
i32.const 0
call $~lib/rt/itcms/__link
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
- local.get $6
- local.get $4
+ local.get $5
+ local.get $3
i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
+ local.get $5
local.get $6
- local.get $3
i32.store offset=8
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
- local.get $6
local.get $5
+ local.get $4
i32.store offset=12
global.get $~lib/memory/__stack_pointer
i32.const 16
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store offset=4
loop $for-loop|0
global.get $~lib/memory/__stack_pointer
@@ -3947,17 +3718,22 @@
i32.gt_s
if
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=8
- local.get $6
- local.get $2
+ i32.store offset=12
local.get $0
local.get $2
- call $~lib/array/Array#__get
- call $~lib/array/Array#__set
+ call $~lib/array/Array<~lib/string/String>#__get
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ local.get $3
+ i32.store offset=8
+ local.get $5
+ local.get $2
+ local.get $3
+ call $~lib/array/Array<~lib/string/String>#__set
local.get $2
i32.const 1
i32.add
@@ -3977,11 +3753,11 @@
i32.gt_s
if
global.get $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=8
+ i32.store offset=12
local.get $0
call $~lib/array/Array#get:length
local.get $2
@@ -3989,13 +3765,18 @@
local.set $3
global.get $~lib/memory/__stack_pointer
local.get $1
- i32.store offset=8
- local.get $6
- local.get $3
+ i32.store offset=12
local.get $1
local.get $2
- call $~lib/array/Array#__get
- call $~lib/array/Array#__set
+ call $~lib/array/Array<~lib/string/String>#__get
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store offset=8
+ local.get $5
+ local.get $3
+ local.get $4
+ call $~lib/array/Array<~lib/string/String>#__set
local.get $2
i32.const 1
i32.add
@@ -4004,14 +3785,14 @@
end
end
global.get $~lib/memory/__stack_pointer
- i32.const 12
+ i32.const 16
i32.add
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $6
+ local.get $5
return
end
i32.const 35072
@@ -4021,7 +3802,7 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:bindings/esm/arrayOfStringsFunction (param $0 i32) (param $1 i32) (result i32)
+ (func $export:bindings/esm/arrayFunction (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@@ -4037,14 +3818,13 @@
i32.lt_s
br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $3
local.get $0
i32.store
- local.get $3
+ global.get $~lib/memory/__stack_pointer
local.get $1
i32.store offset=4
- local.get $3
- i32.const 16
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
@@ -4052,27 +3832,26 @@
i32.lt_s
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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
call $~lib/array/Array#get:length
local.set $4
global.get $~lib/memory/__stack_pointer
local.get $1
i32.store
- local.get $3
local.get $1
call $~lib/array/Array#get:length
local.get $4
i32.add
- local.set $4
+ local.set $5
global.get $~lib/memory/__stack_pointer
i32.const 16
i32.sub
@@ -4082,47 +3861,46 @@
i32.lt_s
br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $3
i64.const 0
i64.store
- local.get $3
+ global.get $~lib/memory/__stack_pointer
i64.const 0
i64.store offset=8
- local.get $3
+ global.get $~lib/memory/__stack_pointer
i32.const 16
- i32.const 12
+ i32.const 11
call $~lib/rt/itcms/__new
- local.tee $5
+ local.tee $6
i32.store
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
- local.get $5
+ local.get $6
i32.const 0
i32.store
- local.get $5
+ local.get $6
i32.const 0
i32.const 0
call $~lib/rt/itcms/__link
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
- local.get $5
+ local.get $6
i32.const 0
i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
- local.get $5
+ local.get $6
i32.const 0
i32.store offset=8
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
- local.get $5
+ local.get $6
i32.const 0
i32.store offset=12
- local.get $4
+ local.get $5
i32.const 268435455
i32.gt_u
if
@@ -4135,54 +3913,54 @@
end
global.get $~lib/memory/__stack_pointer
i32.const 8
- local.get $4
- local.get $4
+ local.get $5
+ local.get $5
i32.const 8
i32.le_u
select
i32.const 2
i32.shl
- local.tee $6
+ local.tee $3
i32.const 1
call $~lib/rt/itcms/__new
- local.tee $3
+ local.tee $4
i32.store offset=8
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $3
+ local.get $4
i32.store offset=12
- local.get $5
- local.get $3
+ local.get $6
+ local.get $4
i32.store
- local.get $5
- local.get $3
+ local.get $6
+ local.get $4
i32.const 0
call $~lib/rt/itcms/__link
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
- local.get $5
- local.get $3
+ local.get $6
+ local.get $4
i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
- local.get $5
local.get $6
+ local.get $3
i32.store offset=8
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
+ local.get $6
local.get $5
- local.get $4
i32.store offset=12
global.get $~lib/memory/__stack_pointer
i32.const 16
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store offset=4
loop $for-loop|0
global.get $~lib/memory/__stack_pointer
@@ -4194,22 +3972,17 @@
i32.gt_s
if
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=12
- local.get $0
- local.get $2
- call $~lib/array/Array<~lib/string/String>#__get
- local.set $3
- global.get $~lib/memory/__stack_pointer
- local.get $3
i32.store offset=8
- local.get $5
+ local.get $6
local.get $2
- local.get $3
- call $~lib/array/Array<~lib/string/String>#__set
+ local.get $0
+ local.get $2
+ call $~lib/array/Array#__get
+ call $~lib/array/Array#__set
local.get $2
i32.const 1
i32.add
@@ -4229,11 +4002,11 @@
i32.gt_s
if
global.get $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=12
+ i32.store offset=8
local.get $0
call $~lib/array/Array#get:length
local.get $2
@@ -4241,18 +4014,13 @@
local.set $3
global.get $~lib/memory/__stack_pointer
local.get $1
- i32.store offset=12
- local.get $1
- local.get $2
- call $~lib/array/Array<~lib/string/String>#__get
- local.set $4
- global.get $~lib/memory/__stack_pointer
- local.get $4
i32.store offset=8
- local.get $5
+ local.get $6
local.get $3
- local.get $4
- call $~lib/array/Array<~lib/string/String>#__set
+ local.get $1
+ local.get $2
+ call $~lib/array/Array#__get
+ call $~lib/array/Array#__set
local.get $2
i32.const 1
i32.add
@@ -4261,14 +4029,14 @@
end
end
global.get $~lib/memory/__stack_pointer
- i32.const 16
+ i32.const 12
i32.add
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $5
+ local.get $6
return
end
i32.const 35072
@@ -4278,12 +4046,15 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:bindings/esm/objectFunction (param $0 i32) (param $1 i32) (result i32)
+ (func $bindings/esm/typedarrayFunction (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
- (local $4 i32)
+ (local $4 f32)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 i32)
global.get $~lib/memory/__stack_pointer
- i32.const 8
+ i32.const 12
i32.sub
global.set $~lib/memory/__stack_pointer
block $folding-inner1
@@ -4292,31 +4063,27 @@
i32.lt_s
br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.tee $2
- local.get $0
- i32.store
- local.get $2
- local.get $1
- i32.store offset=4
- local.get $2
- i32.const 12
- i32.sub
- global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 2276
- i32.lt_s
- br_if $folding-inner1
- local.get $0
- local.set $2
- global.get $~lib/memory/__stack_pointer
- local.tee $0
i64.const 0
i64.store
- local.get $0
+ global.get $~lib/memory/__stack_pointer
i32.const 0
i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
local.get $0
- block $__inlined_func$bindings/esm/PlainObject#constructor$5 (result i32)
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ call $~lib/typedarray/Int16Array#get:length
+ local.set $5
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store
+ block $__inlined_func$~lib/typedarray/Uint64Array#constructor (result i32)
+ local.get $1
+ call $~lib/typedarray/Float32Array#get:length
+ local.get $5
+ i32.add
+ local.set $5
global.get $~lib/memory/__stack_pointer
i32.const 8
i32.sub
@@ -4327,21 +4094,20 @@
i32.lt_s
br_if $folding-inner00
global.get $~lib/memory/__stack_pointer
- local.tee $0
i64.const 0
i64.store
- local.get $0
- i32.const 68
- i32.const 13
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.const 7
call $~lib/rt/itcms/__new
- local.tee $0
+ local.tee $2
i32.store
global.get $~lib/memory/__stack_pointer
- local.tee $3
- local.get $0
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
i32.store offset=4
- local.get $3
- i32.const 4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
@@ -4349,191 +4115,260 @@
i32.lt_s
br_if $folding-inner00
global.get $~lib/memory/__stack_pointer
- local.tee $4
- i32.const 0
- i32.store
- local.get $0
+ i64.const 0
+ i64.store
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=8
+ local.get $2
i32.eqz
if
- local.get $4
- i32.const 0
- i32.const 0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.const 3
call $~lib/rt/itcms/__new
- local.tee $0
+ local.tee $2
i32.store
end
global.get $~lib/memory/__stack_pointer
- i32.const 4
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $3
- local.get $0
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ i32.const 0
i32.store
+ local.get $2
+ i32.const 0
+ i32.const 0
+ call $~lib/rt/itcms/__link
global.get $~lib/memory/__stack_pointer
- local.get $0
+ local.get $2
i32.store offset=4
- local.get $0
+ local.get $2
i32.const 0
- i32.store8
+ i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $0
+ local.get $2
i32.store offset=4
- local.get $0
+ local.get $2
i32.const 0
- i32.store16 offset=2
+ i32.store offset=8
+ local.get $5
+ i32.const 134217727
+ i32.gt_u
+ if
+ i32.const 1248
+ i32.const 1296
+ i32.const 19
+ i32.const 57
+ call $~lib/builtins/abort
+ unreachable
+ end
global.get $~lib/memory/__stack_pointer
- local.get $0
+ local.get $5
+ i32.const 3
+ i32.shl
+ local.tee $7
+ i32.const 1
+ call $~lib/rt/itcms/__new
+ local.tee $5
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
i32.store offset=4
- local.get $0
+ global.get $~lib/memory/__stack_pointer
+ local.get $5
+ i32.store offset=12
+ local.get $2
+ local.get $5
+ i32.store
+ local.get $2
+ local.get $5
i32.const 0
+ call $~lib/rt/itcms/__link
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ local.get $5
i32.store offset=4
global.get $~lib/memory/__stack_pointer
- local.get $0
+ local.get $2
i32.store offset=4
+ local.get $2
+ local.get $7
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ br $__inlined_func$~lib/typedarray/Uint64Array#constructor
+ end
+ br $folding-inner1
+ end
+ local.tee $2
+ i32.store offset=4
+ loop $for-loop|0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ call $~lib/typedarray/Int16Array#get:length
+ local.get $3
+ i32.gt_s
+ if
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store
+ global.get $~lib/memory/__stack_pointer
local.get $0
- i64.const 0
- i64.store offset=8
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store8 offset=16
+ i32.const 2276
+ i32.lt_s
+ br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
i32.const 0
- i32.store16 offset=18
+ i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=4
+ i32.store
+ local.get $3
local.get $0
- i32.const 0
- i32.store offset=20
+ i32.load offset=8
+ i32.const 1
+ i32.shr_u
+ i32.ge_u
+ if
+ i32.const 1552
+ i32.const 1792
+ i32.const 452
+ i32.const 64
+ call $~lib/builtins/abort
+ unreachable
+ end
global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=4
+ i32.store
local.get $0
- i64.const 0
- i64.store offset=24
+ i32.load offset=4
+ local.get $3
+ i32.const 1
+ i32.shl
+ i32.add
+ i32.load16_s
+ local.set $5
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=32
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ local.get $3
+ local.get $5
+ i64.extend_i32_s
+ call $~lib/typedarray/Uint64Array#__set
+ local.get $3
+ i32.const 1
+ i32.add
+ local.set $3
+ br $for-loop|0
+ end
+ end
+ i32.const 0
+ local.set $3
+ loop $for-loop|1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store
+ local.get $1
+ call $~lib/typedarray/Float32Array#get:length
+ local.get $3
+ i32.gt_s
+ if
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=36
+ local.get $2
+ i32.store
global.get $~lib/memory/__stack_pointer
local.get $0
- i32.store offset=4
+ i32.store offset=8
local.get $0
- i32.const 0
- i32.store8 offset=40
+ call $~lib/typedarray/Int16Array#get:length
+ local.get $3
+ i32.add
+ local.set $5
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- f32.const 0
- f32.store offset=44
+ local.get $1
+ i32.store offset=8
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- f64.const 0
- f64.store offset=48
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=56
- local.get $0
- i32.const 0
- i32.const 0
- call $~lib/rt/itcms/__link
+ i32.const 2276
+ i32.lt_s
+ br_if $folding-inner1
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=60
- local.get $0
i32.const 0
- i32.const 0
- call $~lib/rt/itcms/__link
+ i32.store
global.get $~lib/memory/__stack_pointer
- local.get $0
- i32.store offset=4
- local.get $0
- i32.const 0
- i32.store offset=64
- local.get $0
- i32.const 0
- i32.const 0
- call $~lib/rt/itcms/__link
+ local.get $1
+ i32.store
+ local.get $3
+ local.get $1
+ i32.load offset=8
+ i32.const 2
+ i32.shr_u
+ i32.ge_u
+ if
+ i32.const 1552
+ i32.const 1792
+ i32.const 1304
+ i32.const 64
+ call $~lib/builtins/abort
+ unreachable
+ end
global.get $~lib/memory/__stack_pointer
- i32.const 8
+ local.get $1
+ i32.store
+ local.get $1
+ i32.load offset=4
+ local.get $3
+ i32.const 2
+ i32.shl
+ i32.add
+ f32.load
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
- local.get $0
- br $__inlined_func$bindings/esm/PlainObject#constructor$5
+ local.get $2
+ local.get $5
+ local.get $4
+ i64.trunc_sat_f32_u
+ call $~lib/typedarray/Uint64Array#__set
+ local.get $3
+ i32.const 1
+ i32.add
+ local.set $3
+ br $for-loop|1
end
- br $folding-inner1
end
- local.tee $0
- i32.store
global.get $~lib/memory/__stack_pointer
- local.tee $3
- local.get $0
- i32.store offset=4
- local.get $3
- local.get $2
- i32.store offset=8
- local.get $2
- i32.load8_s
- local.set $4
- local.get $3
- local.get $1
- i32.store offset=8
- local.get $0
- local.get $4
- local.get $1
- i32.load8_s
- i32.add
- i32.store8
- local.get $3
- local.get $0
- i32.store offset=4
- local.get $3
- local.get $2
- i32.store offset=8
- local.get $2
- i32.load16_s offset=2
- local.set $2
- local.get $3
- local.get $1
- i32.store offset=8
- local.get $0
- local.get $2
- local.get $1
- i32.load16_s offset=2
- i32.add
- i32.store16 offset=2
- local.get $3
i32.const 12
i32.add
global.set $~lib/memory/__stack_pointer
- global.get $~lib/memory/__stack_pointer
- i32.const 8
- i32.add
- global.set $~lib/memory/__stack_pointer
- local.get $0
+ local.get $2
return
end
i32.const 35072
@@ -4543,10 +4378,20 @@
call $~lib/builtins/abort
unreachable
)
- (func $export:bindings/esm/internrefFunction (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
+ (func $bindings/esm/plainFunction64 (param $0 i64) (param $1 i64) (result i64)
+ local.get $0
+ local.get $1
+ i64.add
+ )
+ (func $bindings/esm/plainFunction (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ local.get $1
+ i32.add
+ )
+ (func $bindings/esm/newInternref (result i32)
+ (local $0 i32)
global.get $~lib/memory/__stack_pointer
- i32.const 8
+ i32.const 4
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
@@ -4561,16 +4406,24 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $2
- local.get $0
+ i32.const 0
i32.store
- local.get $2
- local.get $1
- i32.store offset=4
- local.get $2
- i32.const 8
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 15
+ call $~lib/rt/itcms/__new
+ local.tee $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
i32.add
global.set $~lib/memory/__stack_pointer
local.get $0
)
+ (func $bindings/esm/getMaxUnsigned64 (result i64)
+ i64.const -1
+ )
+ (func $bindings/esm/getMaxUnsigned32 (result i32)
+ i32.const -1
+ )
)
diff --git a/tests/compiler/builtins.debug.wat b/tests/compiler/builtins.debug.wat
index c5c210aea4..fd74409ab4 100644
--- a/tests/compiler/builtins.debug.wat
+++ b/tests/compiler/builtins.debug.wat
@@ -549,16 +549,13 @@
(local $52 i32)
(local $53 i32)
global.get $~lib/memory/__stack_pointer
- i32.const 12
+ 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
- global.get $~lib/memory/__stack_pointer
- i32.const 0
- i32.store offset=8
i32.const 1
drop
i32.const 0
@@ -2551,7 +2548,7 @@
local.set $53
global.get $~lib/memory/__stack_pointer
local.get $53
- i32.store offset=8
+ i32.store offset=4
local.get $53
call $~lib/function/Function<%28i32%2Ci32%29=>i32>#get:name
local.set $53
@@ -2560,11 +2557,6 @@
i32.store
local.get $53
i32.const 32
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -2615,7 +2607,7 @@
local.set $53
global.get $~lib/memory/__stack_pointer
local.get $53
- i32.store offset=8
+ i32.store offset=4
local.get $53
call $~lib/function/Function<%28i32%2Ci32%29=>i32>#toString
local.set $53
@@ -2624,11 +2616,6 @@
i32.store
local.get $53
i32.const 176
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3270,11 +3257,6 @@
i32.const 52
local.set $52
i32.const 256
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 5
local.get $48
f64.convert_i32_u
@@ -3336,17 +3318,7 @@
unreachable
end
i32.const 352
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 352
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3358,17 +3330,7 @@
unreachable
end
i32.const 352
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 352
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3380,17 +3342,7 @@
unreachable
end
i32.const 400
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 400
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3402,17 +3354,7 @@
unreachable
end
i32.const 432
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 432
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3424,17 +3366,7 @@
unreachable
end
i32.const 464
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 464
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3446,17 +3378,7 @@
unreachable
end
i32.const 496
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 496
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3468,17 +3390,7 @@
unreachable
end
i32.const 528
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 528
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3490,17 +3402,7 @@
unreachable
end
i32.const 560
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 560
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3512,17 +3414,7 @@
unreachable
end
i32.const 592
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 592
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3534,17 +3426,7 @@
unreachable
end
i32.const 624
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 624
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3556,17 +3438,7 @@
unreachable
end
i32.const 656
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 656
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3578,17 +3450,7 @@
unreachable
end
i32.const 688
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 688
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3600,17 +3462,7 @@
unreachable
end
i32.const 720
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 720
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3622,17 +3474,7 @@
unreachable
end
i32.const 752
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 752
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3644,17 +3486,7 @@
unreachable
end
i32.const 784
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 784
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3666,17 +3498,7 @@
unreachable
end
i32.const 816
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 816
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3688,17 +3510,7 @@
unreachable
end
i32.const 848
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 848
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3710,17 +3522,7 @@
unreachable
end
i32.const 880
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 880
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3732,17 +3534,7 @@
unreachable
end
i32.const 432
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 432
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3754,17 +3546,7 @@
unreachable
end
i32.const 352
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store
- local.get $53
i32.const 352
- local.set $53
- global.get $~lib/memory/__stack_pointer
- local.get $53
- i32.store offset=4
- local.get $53
call $~lib/string/String.__eq
i32.eqz
if
@@ -3902,7 +3684,7 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- i32.const 12
+ i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
)
diff --git a/tests/compiler/builtins.release.wat b/tests/compiler/builtins.release.wat
index 28d046b18c..856132d52c 100644
--- a/tests/compiler/builtins.release.wat
+++ b/tests/compiler/builtins.release.wat
@@ -70,18 +70,6 @@
(export "test" (func $start:builtins~anonymous|1))
(export "memory" (memory $0))
(start $~start)
- (func $start:builtins~anonymous|0 (param $0 i32) (param $1 i32) (result i32)
- local.get $0
- local.get $1
- i32.add
- )
- (func $start:builtins~anonymous|1
- )
- (func $start:builtins~anonymous|2 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
- )
- (func $~start
- call $start:builtins
- )
(func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
@@ -103,14 +91,13 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $2
i64.const 0
i64.store
local.get $0
local.get $1
i32.eq
if
- local.get $2
+ global.get $~lib/memory/__stack_pointer
i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
@@ -125,8 +112,6 @@
i32.or
br_if $folding-inner0
global.get $~lib/memory/__stack_pointer
- local.tee $4
- local.tee $2
local.get $0
i32.store
local.get $0
@@ -136,7 +121,7 @@
i32.const 1
i32.shr_u
local.set $3
- local.get $2
+ global.get $~lib/memory/__stack_pointer
local.get $1
i32.store
local.get $3
@@ -148,12 +133,12 @@
i32.shr_u
i32.ne
br_if $folding-inner0
- local.get $4
+ global.get $~lib/memory/__stack_pointer
local.get $0
i32.store
local.get $0
local.set $2
- local.get $4
+ global.get $~lib/memory/__stack_pointer
local.get $1
i32.store offset=4
local.get $3
@@ -247,10 +232,22 @@
global.set $~lib/memory/__stack_pointer
i32.const 0
)
+ (func $start:builtins~anonymous|1
+ )
+ (func $~start
+ call $start:builtins
+ )
+ (func $start:builtins~anonymous|2 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
+ unreachable
+ )
+ (func $start:builtins~anonymous|0 (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ local.get $1
+ i32.add
+ )
(func $start:builtins
- (local $0 i32)
global.get $~lib/memory/__stack_pointer
- i32.const 12
+ i32.const 8
i32.sub
global.set $~lib/memory/__stack_pointer
global.get $~lib/memory/__stack_pointer
@@ -265,12 +262,8 @@
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
i32.const 1
global.set $builtins/i
i32.const 0
@@ -604,13 +597,9 @@
global.set $builtins/I
f64.const 1.24e-322
global.set $builtins/F
- memory.size
- drop
i32.const 1
memory.grow
drop
- memory.size
- drop
i32.const 1
memory.grow
drop
@@ -656,15 +645,11 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $0
i32.const 1168
- i32.store offset=8
- local.get $0
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
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
@@ -678,21 +663,17 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- local.tee $0
i32.const 1168
i32.store
- local.get $0
+ global.get $~lib/memory/__stack_pointer
i32.const 1168
i32.store
- local.get $0
+ global.get $~lib/memory/__stack_pointer
i32.const 1168
- i32.store offset=8
- local.get $0
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
i32.const 1200
i32.store
- local.get $0
- i32.const 1200
- i32.store offset=4
i32.const 1200
i32.const 1200
call $~lib/string/String.__eq
@@ -774,9 +755,6 @@
i32.const 8
f64.const 1
f64.store
- global.get $~lib/memory/__stack_pointer
- i32.const 1280
- i32.store
i32.const 1280
i32.const 5
f64.const 0
@@ -785,13 +763,6 @@
f64.const 52
f64.const 52
call $~lib/builtins/trace
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1376
- i32.store
- local.get $0
- i32.const 1376
- i32.store offset=4
i32.const 1376
i32.const 1376
call $~lib/string/String.__eq
@@ -804,13 +775,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1376
- i32.store
- local.get $0
- i32.const 1376
- i32.store offset=4
i32.const 1376
i32.const 1376
call $~lib/string/String.__eq
@@ -823,13 +787,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1424
- i32.store
- local.get $0
- i32.const 1424
- i32.store offset=4
i32.const 1424
i32.const 1424
call $~lib/string/String.__eq
@@ -842,13 +799,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1456
- i32.store
- local.get $0
- i32.const 1456
- i32.store offset=4
i32.const 1456
i32.const 1456
call $~lib/string/String.__eq
@@ -861,13 +811,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1488
- i32.store
- local.get $0
- i32.const 1488
- i32.store offset=4
i32.const 1488
i32.const 1488
call $~lib/string/String.__eq
@@ -880,13 +823,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1520
- i32.store
- local.get $0
- i32.const 1520
- i32.store offset=4
i32.const 1520
i32.const 1520
call $~lib/string/String.__eq
@@ -899,13 +835,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1552
- i32.store
- local.get $0
- i32.const 1552
- i32.store offset=4
i32.const 1552
i32.const 1552
call $~lib/string/String.__eq
@@ -918,13 +847,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1584
- i32.store
- local.get $0
- i32.const 1584
- i32.store offset=4
i32.const 1584
i32.const 1584
call $~lib/string/String.__eq
@@ -937,13 +859,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1616
- i32.store
- local.get $0
- i32.const 1616
- i32.store offset=4
i32.const 1616
i32.const 1616
call $~lib/string/String.__eq
@@ -956,13 +871,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1648
- i32.store
- local.get $0
- i32.const 1648
- i32.store offset=4
i32.const 1648
i32.const 1648
call $~lib/string/String.__eq
@@ -975,13 +883,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1680
- i32.store
- local.get $0
- i32.const 1680
- i32.store offset=4
i32.const 1680
i32.const 1680
call $~lib/string/String.__eq
@@ -994,13 +895,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1712
- i32.store
- local.get $0
- i32.const 1712
- i32.store offset=4
i32.const 1712
i32.const 1712
call $~lib/string/String.__eq
@@ -1013,13 +907,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1744
- i32.store
- local.get $0
- i32.const 1744
- i32.store offset=4
i32.const 1744
i32.const 1744
call $~lib/string/String.__eq
@@ -1032,13 +919,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1776
- i32.store
- local.get $0
- i32.const 1776
- i32.store offset=4
i32.const 1776
i32.const 1776
call $~lib/string/String.__eq
@@ -1051,13 +931,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1808
- i32.store
- local.get $0
- i32.const 1808
- i32.store offset=4
i32.const 1808
i32.const 1808
call $~lib/string/String.__eq
@@ -1070,13 +943,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1840
- i32.store
- local.get $0
- i32.const 1840
- i32.store offset=4
i32.const 1840
i32.const 1840
call $~lib/string/String.__eq
@@ -1089,13 +955,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1872
- i32.store
- local.get $0
- i32.const 1872
- i32.store offset=4
i32.const 1872
i32.const 1872
call $~lib/string/String.__eq
@@ -1108,13 +967,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1904
- i32.store
- local.get $0
- i32.const 1904
- i32.store offset=4
i32.const 1904
i32.const 1904
call $~lib/string/String.__eq
@@ -1127,13 +979,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1456
- i32.store
- local.get $0
- i32.const 1456
- i32.store offset=4
i32.const 1456
i32.const 1456
call $~lib/string/String.__eq
@@ -1146,13 +991,6 @@
call $~lib/builtins/abort
unreachable
end
- global.get $~lib/memory/__stack_pointer
- local.tee $0
- i32.const 1376
- i32.store
- local.get $0
- i32.const 1376
- i32.store offset=4
i32.const 1376
i32.const 1376
call $~lib/string/String.__eq
@@ -1166,7 +1004,7 @@
unreachable
end
global.get $~lib/memory/__stack_pointer
- i32.const 12
+ i32.const 8
i32.add
global.set $~lib/memory/__stack_pointer
)
diff --git a/tests/compiler/call-inferred.debug.wat b/tests/compiler/call-inferred.debug.wat
index 9f7eb4fa7e..1d07f41be0 100644
--- a/tests/compiler/call-inferred.debug.wat
+++ b/tests/compiler/call-inferred.debug.wat
@@ -1,16 +1,46 @@
(module
- (type $0 (func (param f32) (result f32)))
- (type $1 (func))
- (type $2 (func (param i32) (result i32)))
- (type $3 (func (param i32 i32 i32 i32)))
- (type $4 (func (param f64) (result f64)))
+ (type $0 (func (param i32) (result i32)))
+ (type $1 (func (param i32 i32)))
+ (type $2 (func (param i32)))
+ (type $3 (func (param i32 i32) (result i32)))
+ (type $4 (func))
+ (type $5 (func (param f32) (result f32)))
+ (type $6 (func (param i32 i32 i32)))
+ (type $7 (func (param i32 i32 i32 i32)))
+ (type $8 (func (param f64) (result f64)))
+ (type $9 (func (param i32 i32 i64) (result i32)))
+ (type $10 (func (result i32)))
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
(global $~argumentsLength (mut i32) (i32.const 0))
- (global $~lib/memory/__data_end i32 (i32.const 76))
- (global $~lib/memory/__stack_pointer (mut i32) (i32.const 32844))
- (global $~lib/memory/__heap_base i32 (i32.const 32844))
+ (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))
+ (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/iter (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/white (mut i32) (i32.const 0))
+ (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/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/rt/__rtti_base i32 (i32.const 480))
+ (global $~lib/memory/__data_end i32 (i32.const 512))
+ (global $~lib/memory/__stack_pointer (mut i32) (i32.const 33280))
+ (global $~lib/memory/__heap_base i32 (i32.const 33280))
(memory $0 1)
(data $0 (i32.const 12) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00 \00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data $1 (i32.const 76) "<\00\00\00\00\00\00\00\00\00\00\00\02\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 $2 (i32.const 140) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data $3 (i32.const 208) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data $4 (i32.const 240) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data $5 (i32.const 268) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00\00\00\00\00\00\00\00\00")
+ (data $6 (i32.const 332) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00")
+ (data $7 (i32.const 384) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data $8 (i32.const 412) "<\00\00\00\00\00\00\00\00\00\00\00\02\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 $9 (i32.const 480) "\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")
(table $0 1 1 funcref)
(elem $0 (i32.const 1))
(export "memory" (memory $0))
@@ -46,7 +76,2422 @@
local.get $a
call $call-inferred/bar
)
+ (func $~lib/rt/itcms/Object#set:nextWithColor (param $this i32) (param $nextWithColor i32)
+ local.get $this
+ local.get $nextWithColor
+ i32.store offset=4
+ )
+ (func $~lib/rt/itcms/Object#set:prev (param $this i32) (param $prev i32)
+ local.get $this
+ local.get $prev
+ i32.store offset=8
+ )
+ (func $~lib/rt/itcms/initLazy (param $space i32) (result i32)
+ local.get $space
+ local.get $space
+ call $~lib/rt/itcms/Object#set:nextWithColor
+ local.get $space
+ local.get $space
+ call $~lib/rt/itcms/Object#set:prev
+ local.get $space
+ return
+ )
+ (func $~lib/rt/itcms/Object#get:nextWithColor (param $this i32) (result i32)
+ local.get $this
+ i32.load offset=4
+ )
+ (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32)
+ local.get $this
+ call $~lib/rt/itcms/Object#get:nextWithColor
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ return
+ )
+ (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32)
+ local.get $this
+ call $~lib/rt/itcms/Object#get:nextWithColor
+ i32.const 3
+ i32.and
+ return
+ )
+ (func $~lib/rt/itcms/visitRoots (param $cookie i32)
+ (local $pn i32)
+ (local $iter i32)
+ local.get $cookie
+ call $~lib/rt/__visit_globals
+ global.get $~lib/rt/itcms/pinSpace
+ local.set $pn
+ local.get $pn
+ call $~lib/rt/itcms/Object#get:next
+ local.set $iter
+ loop $while-continue|0
+ local.get $iter
+ local.get $pn
+ i32.ne
+ if
+ i32.const 1
+ drop
+ local.get $iter
+ call $~lib/rt/itcms/Object#get:color
+ i32.const 3
+ i32.eq
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 160
+ i32.const 160
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $iter
+ i32.const 20
+ i32.add
+ local.get $cookie
+ call $~lib/rt/__visit_members
+ local.get $iter
+ call $~lib/rt/itcms/Object#get:next
+ local.set $iter
+ br $while-continue|0
+ end
+ end
+ )
+ (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32)
+ local.get $this
+ local.get $this
+ call $~lib/rt/itcms/Object#get:nextWithColor
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ local.get $color
+ i32.or
+ call $~lib/rt/itcms/Object#set:nextWithColor
+ )
+ (func $~lib/rt/itcms/Object#get:prev (param $this i32) (result i32)
+ local.get $this
+ i32.load offset=8
+ )
+ (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32)
+ local.get $this
+ local.get $obj
+ local.get $this
+ call $~lib/rt/itcms/Object#get:nextWithColor
+ i32.const 3
+ i32.and
+ i32.or
+ call $~lib/rt/itcms/Object#set:nextWithColor
+ )
+ (func $~lib/rt/itcms/Object#unlink (param $this i32)
+ (local $next i32)
+ (local $prev i32)
+ local.get $this
+ call $~lib/rt/itcms/Object#get:next
+ local.set $next
+ local.get $next
+ i32.const 0
+ i32.eq
+ if
+ i32.const 1
+ drop
+ local.get $this
+ call $~lib/rt/itcms/Object#get:prev
+ i32.const 0
+ i32.eq
+ if (result i32)
+ local.get $this
+ global.get $~lib/memory/__heap_base
+ i32.lt_u
+ else
+ i32.const 0
+ end
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 160
+ i32.const 128
+ i32.const 18
+ call $~lib/builtins/abort
+ unreachable
+ end
+ return
+ end
+ local.get $this
+ call $~lib/rt/itcms/Object#get:prev
+ local.set $prev
+ i32.const 1
+ drop
+ local.get $prev
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 160
+ i32.const 132
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $next
+ local.get $prev
+ call $~lib/rt/itcms/Object#set:prev
+ local.get $prev
+ local.get $next
+ call $~lib/rt/itcms/Object#set:next
+ )
+ (func $~lib/rt/itcms/Object#get:rtId (param $this i32) (result i32)
+ local.get $this
+ i32.load offset=12
+ )
+ (func $~lib/shared/typeinfo/Typeinfo#get:flags (param $this i32) (result i32)
+ local.get $this
+ i32.load
+ )
+ (func $~lib/rt/__typeinfo (param $id i32) (result i32)
+ (local $ptr i32)
+ global.get $~lib/rt/__rtti_base
+ local.set $ptr
+ local.get $id
+ local.get $ptr
+ i32.load
+ i32.gt_u
+ if
+ i32.const 288
+ i32.const 352
+ i32.const 21
+ i32.const 28
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $ptr
+ i32.const 4
+ i32.add
+ local.get $id
+ i32.const 4
+ i32.mul
+ i32.add
+ call $~lib/shared/typeinfo/Typeinfo#get:flags
+ return
+ )
+ (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32)
+ (local $rtId i32)
+ local.get $this
+ call $~lib/rt/itcms/Object#get:rtId
+ local.set $rtId
+ local.get $rtId
+ i32.const 2
+ i32.le_u
+ if (result i32)
+ i32.const 1
+ else
+ local.get $rtId
+ call $~lib/rt/__typeinfo
+ i32.const 32
+ i32.and
+ i32.const 0
+ i32.ne
+ end
+ return
+ )
+ (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32)
+ (local $prev i32)
+ local.get $list
+ call $~lib/rt/itcms/Object#get:prev
+ local.set $prev
+ local.get $this
+ local.get $list
+ local.get $withColor
+ i32.or
+ call $~lib/rt/itcms/Object#set:nextWithColor
+ local.get $this
+ local.get $prev
+ call $~lib/rt/itcms/Object#set:prev
+ local.get $prev
+ local.get $this
+ call $~lib/rt/itcms/Object#set:next
+ local.get $list
+ local.get $this
+ call $~lib/rt/itcms/Object#set:prev
+ )
+ (func $~lib/rt/itcms/Object#makeGray (param $this i32)
+ (local $1 i32)
+ local.get $this
+ global.get $~lib/rt/itcms/iter
+ i32.eq
+ if
+ local.get $this
+ call $~lib/rt/itcms/Object#get:prev
+ local.tee $1
+ i32.eqz
+ if (result i32)
+ i32.const 0
+ i32.const 160
+ i32.const 148
+ i32.const 30
+ call $~lib/builtins/abort
+ unreachable
+ else
+ local.get $1
+ end
+ global.set $~lib/rt/itcms/iter
+ end
+ local.get $this
+ call $~lib/rt/itcms/Object#unlink
+ local.get $this
+ global.get $~lib/rt/itcms/toSpace
+ local.get $this
+ call $~lib/rt/itcms/Object#get:isPointerfree
+ if (result i32)
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ else
+ i32.const 2
+ end
+ call $~lib/rt/itcms/Object#linkTo
+ )
+ (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32)
+ (local $obj i32)
+ local.get $ptr
+ i32.eqz
+ if
+ return
+ end
+ local.get $ptr
+ i32.const 20
+ i32.sub
+ local.set $obj
+ i32.const 0
+ drop
+ local.get $obj
+ call $~lib/rt/itcms/Object#get:color
+ global.get $~lib/rt/itcms/white
+ i32.eq
+ if
+ local.get $obj
+ 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/itcms/visitStack (param $cookie i32)
+ (local $ptr i32)
+ global.get $~lib/memory/__stack_pointer
+ local.set $ptr
+ loop $while-continue|0
+ local.get $ptr
+ global.get $~lib/memory/__heap_base
+ i32.lt_u
+ if
+ local.get $ptr
+ i32.load
+ local.get $cookie
+ call $~lib/rt/itcms/__visit
+ local.get $ptr
+ i32.const 4
+ i32.add
+ local.set $ptr
+ br $while-continue|0
+ end
+ end
+ )
+ (func $~lib/rt/common/BLOCK#get:mmInfo (param $this i32) (result i32)
+ local.get $this
+ i32.load
+ )
+ (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32)
+ i32.const 4
+ local.get $this
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.add
+ return
+ )
+ (func $~lib/rt/tlsf/Root#set:flMap (param $this i32) (param $flMap i32)
+ local.get $this
+ local.get $flMap
+ i32.store
+ )
+ (func $~lib/rt/common/BLOCK#set:mmInfo (param $this i32) (param $mmInfo i32)
+ local.get $this
+ local.get $mmInfo
+ i32.store
+ )
+ (func $~lib/rt/tlsf/Block#set:prev (param $this i32) (param $prev i32)
+ local.get $this
+ local.get $prev
+ i32.store offset=4
+ )
+ (func $~lib/rt/tlsf/Block#set:next (param $this i32) (param $next i32)
+ local.get $this
+ local.get $next
+ i32.store offset=8
+ )
+ (func $~lib/rt/tlsf/Block#get:prev (param $this i32) (result i32)
+ local.get $this
+ i32.load offset=4
+ )
+ (func $~lib/rt/tlsf/Block#get:next (param $this i32) (result i32)
+ local.get $this
+ i32.load offset=8
+ )
+ (func $~lib/rt/tlsf/Root#get:flMap (param $this i32) (result i32)
+ local.get $this
+ i32.load
+ )
+ (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32)
+ (local $blockInfo i32)
+ (local $size i32)
+ (local $fl i32)
+ (local $sl i32)
+ (local $6 i32)
+ (local $7 i32)
+ (local $boundedSize i32)
+ (local $prev i32)
+ (local $next i32)
+ (local $root|11 i32)
+ (local $fl|12 i32)
+ (local $sl|13 i32)
+ (local $root|14 i32)
+ (local $fl|15 i32)
+ (local $sl|16 i32)
+ (local $head i32)
+ (local $root|18 i32)
+ (local $fl|19 i32)
+ (local $slMap i32)
+ (local $root|21 i32)
+ (local $fl|22 i32)
+ (local $slMap|23 i32)
+ local.get $block
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ local.set $blockInfo
+ i32.const 1
+ drop
+ local.get $blockInfo
+ i32.const 1
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 268
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $blockInfo
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ local.set $size
+ i32.const 1
+ drop
+ local.get $size
+ i32.const 12
+ i32.ge_u
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 270
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $size
+ i32.const 256
+ i32.lt_u
+ if
+ i32.const 0
+ local.set $fl
+ local.get $size
+ i32.const 4
+ i32.shr_u
+ local.set $sl
+ else
+ local.get $size
+ local.tee $6
+ i32.const 1073741820
+ local.tee $7
+ local.get $6
+ local.get $7
+ i32.lt_u
+ select
+ local.set $boundedSize
+ i32.const 31
+ local.get $boundedSize
+ i32.clz
+ i32.sub
+ local.set $fl
+ local.get $boundedSize
+ local.get $fl
+ i32.const 4
+ i32.sub
+ i32.shr_u
+ i32.const 1
+ i32.const 4
+ i32.shl
+ i32.xor
+ local.set $sl
+ local.get $fl
+ i32.const 8
+ i32.const 1
+ i32.sub
+ i32.sub
+ local.set $fl
+ end
+ i32.const 1
+ drop
+ local.get $fl
+ i32.const 23
+ i32.lt_u
+ if (result i32)
+ local.get $sl
+ i32.const 16
+ i32.lt_u
+ else
+ i32.const 0
+ end
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 284
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $block
+ call $~lib/rt/tlsf/Block#get:prev
+ local.set $prev
+ local.get $block
+ call $~lib/rt/tlsf/Block#get:next
+ local.set $next
+ local.get $prev
+ if
+ local.get $prev
+ local.get $next
+ call $~lib/rt/tlsf/Block#set:next
+ end
+ local.get $next
+ if
+ local.get $next
+ local.get $prev
+ call $~lib/rt/tlsf/Block#set:prev
+ end
+ local.get $block
+ block $~lib/rt/tlsf/GETHEAD|inlined.0 (result i32)
+ local.get $root
+ local.set $root|11
+ local.get $fl
+ local.set $fl|12
+ local.get $sl
+ local.set $sl|13
+ local.get $root|11
+ local.get $fl|12
+ i32.const 4
+ i32.shl
+ local.get $sl|13
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ br $~lib/rt/tlsf/GETHEAD|inlined.0
+ end
+ i32.eq
+ if
+ local.get $root
+ local.set $root|14
+ local.get $fl
+ local.set $fl|15
+ local.get $sl
+ local.set $sl|16
+ local.get $next
+ local.set $head
+ local.get $root|14
+ local.get $fl|15
+ i32.const 4
+ i32.shl
+ local.get $sl|16
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $head
+ i32.store offset=96
+ local.get $next
+ i32.eqz
+ if
+ block $~lib/rt/tlsf/GETSL|inlined.0 (result i32)
+ local.get $root
+ local.set $root|18
+ local.get $fl
+ local.set $fl|19
+ local.get $root|18
+ local.get $fl|19
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=4
+ br $~lib/rt/tlsf/GETSL|inlined.0
+ end
+ local.set $slMap
+ local.get $root
+ local.set $root|21
+ local.get $fl
+ local.set $fl|22
+ local.get $slMap
+ i32.const 1
+ local.get $sl
+ i32.shl
+ i32.const -1
+ i32.xor
+ i32.and
+ local.tee $slMap
+ local.set $slMap|23
+ local.get $root|21
+ local.get $fl|22
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $slMap|23
+ i32.store offset=4
+ local.get $slMap
+ i32.eqz
+ if
+ local.get $root
+ local.get $root
+ call $~lib/rt/tlsf/Root#get:flMap
+ i32.const 1
+ local.get $fl
+ i32.shl
+ i32.const -1
+ i32.xor
+ i32.and
+ call $~lib/rt/tlsf/Root#set:flMap
+ end
+ end
+ end
+ )
+ (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32)
+ (local $blockInfo i32)
+ (local $block|3 i32)
+ (local $right i32)
+ (local $rightInfo i32)
+ (local $block|6 i32)
+ (local $block|7 i32)
+ (local $left i32)
+ (local $leftInfo i32)
+ (local $size i32)
+ (local $fl i32)
+ (local $sl i32)
+ (local $13 i32)
+ (local $14 i32)
+ (local $boundedSize i32)
+ (local $root|16 i32)
+ (local $fl|17 i32)
+ (local $sl|18 i32)
+ (local $head i32)
+ (local $root|20 i32)
+ (local $fl|21 i32)
+ (local $sl|22 i32)
+ (local $head|23 i32)
+ (local $root|24 i32)
+ (local $fl|25 i32)
+ (local $root|26 i32)
+ (local $fl|27 i32)
+ (local $slMap i32)
+ i32.const 1
+ drop
+ local.get $block
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 201
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $block
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ local.set $blockInfo
+ i32.const 1
+ drop
+ local.get $blockInfo
+ i32.const 1
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 203
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ block $~lib/rt/tlsf/GETRIGHT|inlined.0 (result i32)
+ local.get $block
+ local.set $block|3
+ local.get $block|3
+ i32.const 4
+ i32.add
+ local.get $block|3
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.add
+ br $~lib/rt/tlsf/GETRIGHT|inlined.0
+ end
+ local.set $right
+ local.get $right
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ local.set $rightInfo
+ local.get $rightInfo
+ i32.const 1
+ i32.and
+ if
+ local.get $root
+ local.get $right
+ call $~lib/rt/tlsf/removeBlock
+ local.get $block
+ local.get $blockInfo
+ i32.const 4
+ i32.add
+ local.get $rightInfo
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.add
+ local.tee $blockInfo
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ block $~lib/rt/tlsf/GETRIGHT|inlined.1 (result i32)
+ local.get $block
+ local.set $block|6
+ local.get $block|6
+ i32.const 4
+ i32.add
+ local.get $block|6
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.add
+ br $~lib/rt/tlsf/GETRIGHT|inlined.1
+ end
+ local.set $right
+ local.get $right
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ local.set $rightInfo
+ end
+ local.get $blockInfo
+ i32.const 2
+ i32.and
+ if
+ block $~lib/rt/tlsf/GETFREELEFT|inlined.0 (result i32)
+ local.get $block
+ local.set $block|7
+ local.get $block|7
+ i32.const 4
+ i32.sub
+ i32.load
+ br $~lib/rt/tlsf/GETFREELEFT|inlined.0
+ end
+ local.set $left
+ local.get $left
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ local.set $leftInfo
+ i32.const 1
+ drop
+ local.get $leftInfo
+ i32.const 1
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 221
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $root
+ local.get $left
+ call $~lib/rt/tlsf/removeBlock
+ local.get $left
+ local.set $block
+ local.get $block
+ local.get $leftInfo
+ i32.const 4
+ i32.add
+ local.get $blockInfo
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.add
+ local.tee $blockInfo
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ end
+ local.get $right
+ local.get $rightInfo
+ i32.const 2
+ i32.or
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ local.get $blockInfo
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ local.set $size
+ i32.const 1
+ drop
+ local.get $size
+ i32.const 12
+ i32.ge_u
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 233
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ i32.const 1
+ drop
+ local.get $block
+ i32.const 4
+ i32.add
+ local.get $size
+ i32.add
+ local.get $right
+ i32.eq
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 234
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $right
+ i32.const 4
+ i32.sub
+ local.get $block
+ i32.store
+ local.get $size
+ i32.const 256
+ i32.lt_u
+ if
+ i32.const 0
+ local.set $fl
+ local.get $size
+ i32.const 4
+ i32.shr_u
+ local.set $sl
+ else
+ local.get $size
+ local.tee $13
+ i32.const 1073741820
+ local.tee $14
+ local.get $13
+ local.get $14
+ i32.lt_u
+ select
+ local.set $boundedSize
+ i32.const 31
+ local.get $boundedSize
+ i32.clz
+ i32.sub
+ local.set $fl
+ local.get $boundedSize
+ local.get $fl
+ i32.const 4
+ i32.sub
+ i32.shr_u
+ i32.const 1
+ i32.const 4
+ i32.shl
+ i32.xor
+ local.set $sl
+ local.get $fl
+ i32.const 8
+ i32.const 1
+ i32.sub
+ i32.sub
+ local.set $fl
+ end
+ i32.const 1
+ drop
+ local.get $fl
+ i32.const 23
+ i32.lt_u
+ if (result i32)
+ local.get $sl
+ i32.const 16
+ i32.lt_u
+ else
+ i32.const 0
+ end
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 251
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ block $~lib/rt/tlsf/GETHEAD|inlined.1 (result i32)
+ local.get $root
+ local.set $root|16
+ local.get $fl
+ local.set $fl|17
+ local.get $sl
+ local.set $sl|18
+ local.get $root|16
+ local.get $fl|17
+ i32.const 4
+ i32.shl
+ local.get $sl|18
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ br $~lib/rt/tlsf/GETHEAD|inlined.1
+ end
+ local.set $head
+ local.get $block
+ i32.const 0
+ call $~lib/rt/tlsf/Block#set:prev
+ local.get $block
+ local.get $head
+ call $~lib/rt/tlsf/Block#set:next
+ local.get $head
+ if
+ local.get $head
+ local.get $block
+ call $~lib/rt/tlsf/Block#set:prev
+ end
+ local.get $root
+ local.set $root|20
+ local.get $fl
+ local.set $fl|21
+ local.get $sl
+ local.set $sl|22
+ local.get $block
+ local.set $head|23
+ local.get $root|20
+ local.get $fl|21
+ i32.const 4
+ i32.shl
+ local.get $sl|22
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $head|23
+ i32.store offset=96
+ local.get $root
+ local.get $root
+ call $~lib/rt/tlsf/Root#get:flMap
+ i32.const 1
+ local.get $fl
+ i32.shl
+ i32.or
+ call $~lib/rt/tlsf/Root#set:flMap
+ local.get $root
+ local.set $root|26
+ local.get $fl
+ local.set $fl|27
+ block $~lib/rt/tlsf/GETSL|inlined.1 (result i32)
+ local.get $root
+ local.set $root|24
+ local.get $fl
+ local.set $fl|25
+ local.get $root|24
+ local.get $fl|25
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=4
+ br $~lib/rt/tlsf/GETSL|inlined.1
+ end
+ i32.const 1
+ local.get $sl
+ i32.shl
+ i32.or
+ local.set $slMap
+ local.get $root|26
+ local.get $fl|27
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $slMap
+ i32.store offset=4
+ )
+ (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $endU64 i64) (result i32)
+ (local $end i32)
+ (local $root|4 i32)
+ (local $tail i32)
+ (local $tailInfo i32)
+ (local $size i32)
+ (local $leftSize i32)
+ (local $left i32)
+ (local $root|10 i32)
+ (local $tail|11 i32)
+ local.get $endU64
+ i32.wrap_i64
+ local.set $end
+ i32.const 1
+ drop
+ local.get $start
+ i64.extend_i32_u
+ local.get $endU64
+ i64.le_u
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 382
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $start
+ 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 $start
+ local.get $end
+ i32.const 15
+ i32.const -1
+ i32.xor
+ i32.and
+ local.set $end
+ block $~lib/rt/tlsf/GETTAIL|inlined.0 (result i32)
+ local.get $root
+ local.set $root|4
+ local.get $root|4
+ i32.load offset=1568
+ br $~lib/rt/tlsf/GETTAIL|inlined.0
+ end
+ local.set $tail
+ i32.const 0
+ local.set $tailInfo
+ local.get $tail
+ if
+ i32.const 1
+ drop
+ local.get $start
+ local.get $tail
+ i32.const 4
+ i32.add
+ i32.ge_u
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 389
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $start
+ i32.const 16
+ i32.sub
+ local.get $tail
+ i32.eq
+ if
+ local.get $start
+ i32.const 16
+ i32.sub
+ local.set $start
+ local.get $tail
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ local.set $tailInfo
+ else
+ end
+ else
+ i32.const 1
+ drop
+ local.get $start
+ local.get $root
+ i32.const 1572
+ i32.add
+ i32.ge_u
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 402
+ i32.const 5
+ call $~lib/builtins/abort
+ unreachable
+ end
+ end
+ local.get $end
+ local.get $start
+ i32.sub
+ local.set $size
+ local.get $size
+ i32.const 4
+ i32.const 12
+ i32.add
+ i32.const 4
+ i32.add
+ i32.lt_u
+ if
+ i32.const 0
+ return
+ end
+ local.get $size
+ i32.const 2
+ i32.const 4
+ i32.mul
+ i32.sub
+ local.set $leftSize
+ local.get $start
+ local.set $left
+ local.get $left
+ local.get $leftSize
+ i32.const 1
+ i32.or
+ local.get $tailInfo
+ i32.const 2
+ i32.and
+ i32.or
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ local.get $left
+ i32.const 0
+ call $~lib/rt/tlsf/Block#set:prev
+ local.get $left
+ i32.const 0
+ call $~lib/rt/tlsf/Block#set:next
+ local.get $start
+ i32.const 4
+ i32.add
+ local.get $leftSize
+ i32.add
+ local.set $tail
+ local.get $tail
+ i32.const 0
+ i32.const 2
+ i32.or
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ local.get $root
+ local.set $root|10
+ local.get $tail
+ local.set $tail|11
+ local.get $root|10
+ local.get $tail|11
+ i32.store offset=1568
+ local.get $root
+ local.get $left
+ call $~lib/rt/tlsf/insertBlock
+ i32.const 1
+ return
+ )
+ (func $~lib/rt/tlsf/initialize
+ (local $rootOffset i32)
+ (local $pagesBefore i32)
+ (local $pagesNeeded i32)
+ (local $root i32)
+ (local $root|4 i32)
+ (local $tail i32)
+ (local $fl i32)
+ (local $root|7 i32)
+ (local $fl|8 i32)
+ (local $slMap i32)
+ (local $sl i32)
+ (local $root|11 i32)
+ (local $fl|12 i32)
+ (local $sl|13 i32)
+ (local $head i32)
+ (local $memStart i32)
+ i32.const 0
+ drop
+ global.get $~lib/memory/__heap_base
+ i32.const 15
+ i32.add
+ i32.const 15
+ i32.const -1
+ i32.xor
+ i32.and
+ local.set $rootOffset
+ memory.size
+ local.set $pagesBefore
+ local.get $rootOffset
+ 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 $pagesNeeded
+ local.get $pagesNeeded
+ local.get $pagesBefore
+ i32.gt_s
+ if (result i32)
+ local.get $pagesNeeded
+ local.get $pagesBefore
+ i32.sub
+ memory.grow
+ i32.const 0
+ i32.lt_s
+ else
+ i32.const 0
+ end
+ if
+ unreachable
+ end
+ local.get $rootOffset
+ local.set $root
+ local.get $root
+ i32.const 0
+ call $~lib/rt/tlsf/Root#set:flMap
+ local.get $root
+ local.set $root|4
+ i32.const 0
+ local.set $tail
+ local.get $root|4
+ local.get $tail
+ i32.store offset=1568
+ i32.const 0
+ local.set $fl
+ loop $for-loop|0
+ local.get $fl
+ i32.const 23
+ i32.lt_u
+ if
+ local.get $root
+ local.set $root|7
+ local.get $fl
+ local.set $fl|8
+ i32.const 0
+ local.set $slMap
+ local.get $root|7
+ local.get $fl|8
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $slMap
+ i32.store offset=4
+ i32.const 0
+ local.set $sl
+ loop $for-loop|1
+ local.get $sl
+ i32.const 16
+ i32.lt_u
+ if
+ local.get $root
+ local.set $root|11
+ local.get $fl
+ local.set $fl|12
+ local.get $sl
+ local.set $sl|13
+ i32.const 0
+ local.set $head
+ local.get $root|11
+ local.get $fl|12
+ i32.const 4
+ i32.shl
+ local.get $sl|13
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $head
+ i32.store offset=96
+ local.get $sl
+ i32.const 1
+ i32.add
+ local.set $sl
+ br $for-loop|1
+ end
+ end
+ local.get $fl
+ i32.const 1
+ i32.add
+ local.set $fl
+ br $for-loop|0
+ end
+ end
+ local.get $rootOffset
+ i32.const 1572
+ i32.add
+ local.set $memStart
+ i32.const 0
+ drop
+ local.get $root
+ local.get $memStart
+ memory.size
+ i64.extend_i32_s
+ i64.const 16
+ i64.shl
+ call $~lib/rt/tlsf/addMemory
+ drop
+ local.get $root
+ global.set $~lib/rt/tlsf/ROOT
+ )
+ (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32)
+ (local $block i32)
+ local.get $ptr
+ i32.const 4
+ i32.sub
+ local.set $block
+ local.get $ptr
+ i32.const 0
+ i32.ne
+ if (result i32)
+ local.get $ptr
+ i32.const 15
+ i32.and
+ i32.eqz
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $block
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ i32.const 1
+ i32.and
+ i32.eqz
+ else
+ i32.const 0
+ end
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 562
+ i32.const 3
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $block
+ return
+ )
+ (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32)
+ i32.const 0
+ drop
+ local.get $block
+ local.get $block
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ i32.const 1
+ i32.or
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ local.get $root
+ local.get $block
+ call $~lib/rt/tlsf/insertBlock
+ )
+ (func $~lib/rt/tlsf/__free (param $ptr i32)
+ local.get $ptr
+ global.get $~lib/memory/__heap_base
+ i32.lt_u
+ if
+ return
+ end
+ global.get $~lib/rt/tlsf/ROOT
+ i32.eqz
+ if
+ call $~lib/rt/tlsf/initialize
+ end
+ global.get $~lib/rt/tlsf/ROOT
+ local.get $ptr
+ call $~lib/rt/tlsf/checkUsedBlock
+ call $~lib/rt/tlsf/freeBlock
+ )
+ (func $~lib/rt/itcms/free (param $obj i32)
+ local.get $obj
+ global.get $~lib/memory/__heap_base
+ i32.lt_u
+ if
+ local.get $obj
+ i32.const 0
+ call $~lib/rt/itcms/Object#set:nextWithColor
+ local.get $obj
+ i32.const 0
+ call $~lib/rt/itcms/Object#set:prev
+ else
+ global.get $~lib/rt/itcms/total
+ local.get $obj
+ call $~lib/rt/itcms/Object#get:size
+ i32.sub
+ global.set $~lib/rt/itcms/total
+ i32.const 0
+ drop
+ local.get $obj
+ i32.const 4
+ i32.add
+ call $~lib/rt/tlsf/__free
+ end
+ )
+ (func $~lib/rt/itcms/step (result i32)
+ (local $obj i32)
+ (local $1 i32)
+ (local $black i32)
+ (local $from i32)
+ block $break|0
+ block $case2|0
+ block $case1|0
+ block $case0|0
+ global.get $~lib/rt/itcms/state
+ local.set $1
+ local.get $1
+ i32.const 0
+ i32.eq
+ br_if $case0|0
+ local.get $1
+ i32.const 1
+ i32.eq
+ br_if $case1|0
+ local.get $1
+ i32.const 2
+ i32.eq
+ br_if $case2|0
+ br $break|0
+ end
+ i32.const 1
+ global.set $~lib/rt/itcms/state
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ i32.const 0
+ call $~lib/rt/itcms/visitRoots
+ global.get $~lib/rt/itcms/toSpace
+ global.set $~lib/rt/itcms/iter
+ global.get $~lib/rt/itcms/visitCount
+ i32.const 1
+ i32.mul
+ return
+ end
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ local.set $black
+ global.get $~lib/rt/itcms/iter
+ call $~lib/rt/itcms/Object#get:next
+ local.set $obj
+ loop $while-continue|1
+ local.get $obj
+ global.get $~lib/rt/itcms/toSpace
+ i32.ne
+ if
+ local.get $obj
+ global.set $~lib/rt/itcms/iter
+ local.get $obj
+ call $~lib/rt/itcms/Object#get:color
+ local.get $black
+ i32.ne
+ if
+ local.get $obj
+ local.get $black
+ call $~lib/rt/itcms/Object#set:color
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ local.get $obj
+ i32.const 20
+ i32.add
+ i32.const 0
+ call $~lib/rt/__visit_members
+ global.get $~lib/rt/itcms/visitCount
+ i32.const 1
+ i32.mul
+ return
+ end
+ local.get $obj
+ call $~lib/rt/itcms/Object#get:next
+ local.set $obj
+ br $while-continue|1
+ end
+ end
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ i32.const 0
+ call $~lib/rt/itcms/visitRoots
+ global.get $~lib/rt/itcms/iter
+ call $~lib/rt/itcms/Object#get:next
+ local.set $obj
+ local.get $obj
+ global.get $~lib/rt/itcms/toSpace
+ i32.eq
+ if
+ i32.const 0
+ call $~lib/rt/itcms/visitStack
+ global.get $~lib/rt/itcms/iter
+ call $~lib/rt/itcms/Object#get:next
+ local.set $obj
+ loop $while-continue|2
+ local.get $obj
+ global.get $~lib/rt/itcms/toSpace
+ i32.ne
+ if
+ local.get $obj
+ call $~lib/rt/itcms/Object#get:color
+ local.get $black
+ i32.ne
+ if
+ local.get $obj
+ local.get $black
+ call $~lib/rt/itcms/Object#set:color
+ local.get $obj
+ i32.const 20
+ i32.add
+ i32.const 0
+ call $~lib/rt/__visit_members
+ end
+ local.get $obj
+ call $~lib/rt/itcms/Object#get:next
+ local.set $obj
+ br $while-continue|2
+ end
+ end
+ global.get $~lib/rt/itcms/fromSpace
+ local.set $from
+ global.get $~lib/rt/itcms/toSpace
+ global.set $~lib/rt/itcms/fromSpace
+ local.get $from
+ global.set $~lib/rt/itcms/toSpace
+ local.get $black
+ global.set $~lib/rt/itcms/white
+ local.get $from
+ call $~lib/rt/itcms/Object#get:next
+ global.set $~lib/rt/itcms/iter
+ i32.const 2
+ global.set $~lib/rt/itcms/state
+ end
+ global.get $~lib/rt/itcms/visitCount
+ i32.const 1
+ i32.mul
+ return
+ end
+ global.get $~lib/rt/itcms/iter
+ local.set $obj
+ local.get $obj
+ global.get $~lib/rt/itcms/toSpace
+ i32.ne
+ if
+ local.get $obj
+ call $~lib/rt/itcms/Object#get:next
+ global.set $~lib/rt/itcms/iter
+ i32.const 1
+ drop
+ local.get $obj
+ call $~lib/rt/itcms/Object#get:color
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ i32.eq
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 160
+ i32.const 229
+ i32.const 20
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $obj
+ call $~lib/rt/itcms/free
+ i32.const 10
+ return
+ end
+ global.get $~lib/rt/itcms/toSpace
+ global.get $~lib/rt/itcms/toSpace
+ call $~lib/rt/itcms/Object#set:nextWithColor
+ global.get $~lib/rt/itcms/toSpace
+ global.get $~lib/rt/itcms/toSpace
+ call $~lib/rt/itcms/Object#set:prev
+ i32.const 0
+ global.set $~lib/rt/itcms/state
+ br $break|0
+ end
+ i32.const 0
+ return
+ )
+ (func $~lib/rt/itcms/interrupt
+ (local $budget i32)
+ i32.const 0
+ drop
+ i32.const 0
+ drop
+ i32.const 1024
+ i32.const 200
+ i32.mul
+ i32.const 100
+ i32.div_u
+ local.set $budget
+ loop $do-loop|0
+ local.get $budget
+ call $~lib/rt/itcms/step
+ i32.sub
+ local.set $budget
+ global.get $~lib/rt/itcms/state
+ i32.const 0
+ i32.eq
+ if
+ i32.const 0
+ drop
+ i32.const 200
+ i32.const 100
+ i32.rem_u
+ i32.const 0
+ i32.eq
+ drop
+ global.get $~lib/rt/itcms/total
+ i32.const 200
+ i32.const 100
+ i32.div_u
+ i32.mul
+ i32.const 1024
+ i32.add
+ global.set $~lib/rt/itcms/threshold
+ i32.const 0
+ drop
+ return
+ end
+ local.get $budget
+ i32.const 0
+ i32.gt_s
+ br_if $do-loop|0
+ end
+ i32.const 0
+ drop
+ global.get $~lib/rt/itcms/total
+ i32.const 1024
+ global.get $~lib/rt/itcms/total
+ global.get $~lib/rt/itcms/threshold
+ i32.sub
+ i32.const 1024
+ i32.lt_u
+ i32.mul
+ i32.add
+ global.set $~lib/rt/itcms/threshold
+ i32.const 0
+ drop
+ )
+ (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32)
+ local.get $size
+ i32.const 12
+ i32.le_u
+ if (result i32)
+ i32.const 12
+ else
+ local.get $size
+ 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
+ return
+ )
+ (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32)
+ local.get $size
+ i32.const 1073741820
+ i32.gt_u
+ if
+ i32.const 96
+ i32.const 432
+ i32.const 461
+ i32.const 29
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $size
+ call $~lib/rt/tlsf/computeSize
+ return
+ )
+ (func $~lib/rt/tlsf/roundSize (param $size i32) (result i32)
+ local.get $size
+ i32.const 536870910
+ i32.lt_u
+ if (result i32)
+ local.get $size
+ i32.const 1
+ i32.const 27
+ local.get $size
+ i32.clz
+ i32.sub
+ i32.shl
+ i32.add
+ i32.const 1
+ i32.sub
+ else
+ local.get $size
+ end
+ return
+ )
+ (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32)
+ (local $fl i32)
+ (local $sl i32)
+ (local $requestSize i32)
+ (local $root|5 i32)
+ (local $fl|6 i32)
+ (local $slMap i32)
+ (local $head i32)
+ (local $flMap i32)
+ (local $root|10 i32)
+ (local $fl|11 i32)
+ (local $root|12 i32)
+ (local $fl|13 i32)
+ (local $sl|14 i32)
+ (local $root|15 i32)
+ (local $fl|16 i32)
+ (local $sl|17 i32)
+ local.get $size
+ i32.const 256
+ i32.lt_u
+ if
+ i32.const 0
+ local.set $fl
+ local.get $size
+ i32.const 4
+ i32.shr_u
+ local.set $sl
+ else
+ local.get $size
+ call $~lib/rt/tlsf/roundSize
+ local.set $requestSize
+ i32.const 4
+ i32.const 8
+ i32.mul
+ i32.const 1
+ i32.sub
+ local.get $requestSize
+ i32.clz
+ i32.sub
+ local.set $fl
+ local.get $requestSize
+ local.get $fl
+ i32.const 4
+ i32.sub
+ i32.shr_u
+ i32.const 1
+ i32.const 4
+ i32.shl
+ i32.xor
+ local.set $sl
+ local.get $fl
+ i32.const 8
+ i32.const 1
+ i32.sub
+ i32.sub
+ local.set $fl
+ end
+ i32.const 1
+ drop
+ local.get $fl
+ i32.const 23
+ i32.lt_u
+ if (result i32)
+ local.get $sl
+ i32.const 16
+ i32.lt_u
+ else
+ i32.const 0
+ end
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 334
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ block $~lib/rt/tlsf/GETSL|inlined.2 (result i32)
+ local.get $root
+ local.set $root|5
+ local.get $fl
+ local.set $fl|6
+ local.get $root|5
+ local.get $fl|6
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=4
+ br $~lib/rt/tlsf/GETSL|inlined.2
+ end
+ i32.const 0
+ i32.const -1
+ i32.xor
+ local.get $sl
+ i32.shl
+ i32.and
+ local.set $slMap
+ i32.const 0
+ local.set $head
+ local.get $slMap
+ i32.eqz
+ if
+ local.get $root
+ call $~lib/rt/tlsf/Root#get:flMap
+ i32.const 0
+ i32.const -1
+ i32.xor
+ local.get $fl
+ i32.const 1
+ i32.add
+ i32.shl
+ i32.and
+ local.set $flMap
+ local.get $flMap
+ i32.eqz
+ if
+ i32.const 0
+ local.set $head
+ else
+ local.get $flMap
+ i32.ctz
+ local.set $fl
+ block $~lib/rt/tlsf/GETSL|inlined.3 (result i32)
+ local.get $root
+ local.set $root|10
+ local.get $fl
+ local.set $fl|11
+ local.get $root|10
+ local.get $fl|11
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=4
+ br $~lib/rt/tlsf/GETSL|inlined.3
+ end
+ local.set $slMap
+ i32.const 1
+ drop
+ local.get $slMap
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 347
+ i32.const 18
+ call $~lib/builtins/abort
+ unreachable
+ end
+ block $~lib/rt/tlsf/GETHEAD|inlined.2 (result i32)
+ local.get $root
+ local.set $root|12
+ local.get $fl
+ local.set $fl|13
+ local.get $slMap
+ i32.ctz
+ local.set $sl|14
+ local.get $root|12
+ local.get $fl|13
+ i32.const 4
+ i32.shl
+ local.get $sl|14
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ br $~lib/rt/tlsf/GETHEAD|inlined.2
+ end
+ local.set $head
+ end
+ else
+ block $~lib/rt/tlsf/GETHEAD|inlined.3 (result i32)
+ local.get $root
+ local.set $root|15
+ local.get $fl
+ local.set $fl|16
+ local.get $slMap
+ i32.ctz
+ local.set $sl|17
+ local.get $root|15
+ local.get $fl|16
+ i32.const 4
+ i32.shl
+ local.get $sl|17
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ br $~lib/rt/tlsf/GETHEAD|inlined.3
+ end
+ local.set $head
+ end
+ local.get $head
+ return
+ )
+ (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32)
+ (local $pagesBefore i32)
+ (local $root|3 i32)
+ (local $pagesNeeded i32)
+ (local $5 i32)
+ (local $6 i32)
+ (local $pagesWanted i32)
+ (local $pagesAfter i32)
+ i32.const 0
+ drop
+ local.get $size
+ i32.const 256
+ i32.ge_u
+ if
+ local.get $size
+ call $~lib/rt/tlsf/roundSize
+ local.set $size
+ end
+ memory.size
+ local.set $pagesBefore
+ local.get $size
+ i32.const 4
+ local.get $pagesBefore
+ i32.const 16
+ i32.shl
+ i32.const 4
+ i32.sub
+ block $~lib/rt/tlsf/GETTAIL|inlined.1 (result i32)
+ local.get $root
+ local.set $root|3
+ local.get $root|3
+ i32.load offset=1568
+ br $~lib/rt/tlsf/GETTAIL|inlined.1
+ end
+ i32.ne
+ i32.shl
+ i32.add
+ local.set $size
+ local.get $size
+ i32.const 65535
+ i32.add
+ i32.const 65535
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.const 16
+ i32.shr_u
+ local.set $pagesNeeded
+ local.get $pagesBefore
+ local.tee $5
+ local.get $pagesNeeded
+ local.tee $6
+ local.get $5
+ local.get $6
+ i32.gt_s
+ select
+ local.set $pagesWanted
+ local.get $pagesWanted
+ memory.grow
+ i32.const 0
+ i32.lt_s
+ if
+ local.get $pagesNeeded
+ memory.grow
+ i32.const 0
+ i32.lt_s
+ if
+ unreachable
+ end
+ end
+ memory.size
+ local.set $pagesAfter
+ local.get $root
+ local.get $pagesBefore
+ i32.const 16
+ i32.shl
+ local.get $pagesAfter
+ i64.extend_i32_s
+ i64.const 16
+ i64.shl
+ call $~lib/rt/tlsf/addMemory
+ drop
+ )
+ (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32)
+ (local $blockInfo i32)
+ (local $remaining i32)
+ (local $spare i32)
+ (local $block|6 i32)
+ (local $block|7 i32)
+ local.get $block
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ local.set $blockInfo
+ i32.const 1
+ drop
+ local.get $size
+ i32.const 4
+ i32.add
+ i32.const 15
+ i32.and
+ i32.eqz
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 361
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $blockInfo
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ local.get $size
+ i32.sub
+ local.set $remaining
+ local.get $remaining
+ i32.const 4
+ i32.const 12
+ i32.add
+ i32.ge_u
+ if
+ local.get $block
+ local.get $size
+ local.get $blockInfo
+ i32.const 2
+ i32.and
+ i32.or
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ local.get $block
+ i32.const 4
+ i32.add
+ local.get $size
+ i32.add
+ local.set $spare
+ local.get $spare
+ local.get $remaining
+ i32.const 4
+ i32.sub
+ i32.const 1
+ i32.or
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ local.get $root
+ local.get $spare
+ call $~lib/rt/tlsf/insertBlock
+ else
+ local.get $block
+ local.get $blockInfo
+ i32.const 1
+ i32.const -1
+ i32.xor
+ i32.and
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32)
+ local.get $block
+ local.set $block|7
+ local.get $block|7
+ i32.const 4
+ i32.add
+ local.get $block|7
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.add
+ br $~lib/rt/tlsf/GETRIGHT|inlined.3
+ end
+ block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32)
+ local.get $block
+ local.set $block|6
+ local.get $block|6
+ i32.const 4
+ i32.add
+ local.get $block|6
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.add
+ br $~lib/rt/tlsf/GETRIGHT|inlined.2
+ end
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ i32.const 2
+ i32.const -1
+ i32.xor
+ i32.and
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ end
+ )
+ (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32)
+ (local $payloadSize i32)
+ (local $block i32)
+ local.get $size
+ call $~lib/rt/tlsf/prepareSize
+ local.set $payloadSize
+ local.get $root
+ local.get $payloadSize
+ call $~lib/rt/tlsf/searchBlock
+ local.set $block
+ local.get $block
+ i32.eqz
+ if
+ local.get $root
+ local.get $payloadSize
+ call $~lib/rt/tlsf/growMemory
+ local.get $root
+ local.get $payloadSize
+ call $~lib/rt/tlsf/searchBlock
+ local.set $block
+ i32.const 1
+ drop
+ local.get $block
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 499
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ end
+ i32.const 1
+ drop
+ local.get $block
+ call $~lib/rt/common/BLOCK#get:mmInfo
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ local.get $payloadSize
+ i32.ge_u
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 432
+ i32.const 501
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $root
+ local.get $block
+ call $~lib/rt/tlsf/removeBlock
+ local.get $root
+ local.get $block
+ local.get $payloadSize
+ call $~lib/rt/tlsf/prepareBlock
+ i32.const 0
+ drop
+ local.get $block
+ return
+ )
+ (func $~lib/rt/tlsf/__alloc (param $size 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 $size
+ call $~lib/rt/tlsf/allocateBlock
+ i32.const 4
+ i32.add
+ return
+ )
+ (func $~lib/rt/itcms/Object#set:rtId (param $this i32) (param $rtId i32)
+ local.get $this
+ local.get $rtId
+ i32.store offset=12
+ )
+ (func $~lib/rt/itcms/Object#set:rtSize (param $this i32) (param $rtSize i32)
+ local.get $this
+ local.get $rtSize
+ i32.store offset=16
+ )
+ (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32)
+ (local $obj i32)
+ (local $ptr i32)
+ local.get $size
+ i32.const 1073741804
+ i32.ge_u
+ if
+ i32.const 96
+ i32.const 160
+ i32.const 261
+ 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 $size
+ i32.add
+ call $~lib/rt/tlsf/__alloc
+ i32.const 4
+ i32.sub
+ local.set $obj
+ local.get $obj
+ local.get $id
+ call $~lib/rt/itcms/Object#set:rtId
+ local.get $obj
+ local.get $size
+ call $~lib/rt/itcms/Object#set:rtSize
+ local.get $obj
+ 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 $obj
+ call $~lib/rt/itcms/Object#get:size
+ i32.add
+ global.set $~lib/rt/itcms/total
+ local.get $obj
+ i32.const 20
+ i32.add
+ local.set $ptr
+ local.get $ptr
+ i32.const 0
+ local.get $size
+ memory.fill
+ local.get $ptr
+ return
+ )
+ (func $call-inferred/Foo#set:value (param $this i32) (param $value i32)
+ local.get $this
+ local.get $value
+ i32.store
+ )
+ (func $call-inferred/Foo#get:value (param $this i32) (result i32)
+ local.get $this
+ i32.load
+ )
+ (func $call-inferred/Foo.create (param $value i32) (result i32)
+ i32.const 0
+ local.get $value
+ call $call-inferred/Foo#constructor
+ return
+ )
+ (func $call-inferred/Bar#doSomething (param $this i32) (param $a i32) (result i32)
+ local.get $a
+ return
+ )
+ (func $~lib/rt/__visit_globals (param $0 i32)
+ (local $1 i32)
+ i32.const 288
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ i32.const 96
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32)
+ (local $2 i32)
+ local.get $0
+ local.get $1
+ call $~lib/object/Object~visit
+ local.get $0
+ i32.load
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/object/Object~visit (param $0 i32) (param $1 i32)
+ )
+ (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32)
+ block $invalid
+ block $call-inferred/Baz
+ block $call-inferred/Bar
+ block $call-inferred/Foo
+ block $~lib/arraybuffer/ArrayBufferView
+ block $~lib/string/String
+ block $~lib/arraybuffer/ArrayBuffer
+ block $~lib/object/Object
+ local.get $0
+ i32.const 8
+ i32.sub
+ i32.load
+ br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $call-inferred/Foo $call-inferred/Bar $call-inferred/Baz $invalid
+ end
+ return
+ end
+ return
+ end
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/arraybuffer/ArrayBufferView~visit
+ return
+ end
+ return
+ end
+ return
+ end
+ return
+ end
+ unreachable
+ )
+ (func $~start
+ call $start:call-inferred
+ )
+ (func $~stack_check
+ global.get $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__data_end
+ i32.lt_s
+ if
+ i32.const 33312
+ i32.const 33360
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ )
+ (func $call-inferred/Foo#constructor (param $this i32) (param $value i32) (result i32)
+ (local $2 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
+ local.get $this
+ i32.eqz
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.const 4
+ call $~lib/rt/itcms/__new
+ local.tee $this
+ i32.store
+ end
+ local.get $this
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ local.get $value
+ call $call-inferred/Foo#set:value
+ local.get $this
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $call-inferred/Bar#constructor (param $this i32) (result i32)
+ (local $1 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
+ local.get $this
+ i32.eqz
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 5
+ call $~lib/rt/itcms/__new
+ local.tee $this
+ i32.store
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $this
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ call $~lib/object/Object#constructor
+ local.tee $this
+ i32.store
+ local.get $this
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $call-inferred/Baz#constructor (param $this i32) (param $value i32) (result i32)
+ (local $2 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
+ local.get $this
+ i32.eqz
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.const 6
+ call $~lib/rt/itcms/__new
+ local.tee $this
+ i32.store
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $this
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $2
+ local.get $value
+ call $call-inferred/Foo#constructor
+ local.tee $this
+ i32.store
+ local.get $this
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
(func $start:call-inferred
+ (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
i32.const 42
call $call-inferred/foo
i32.const 42
@@ -101,8 +2546,133 @@
call $~lib/builtins/abort
unreachable
end
+ memory.size
+ i32.const 16
+ i32.shl
+ global.get $~lib/memory/__heap_base
+ i32.sub
+ i32.const 1
+ i32.shr_u
+ global.set $~lib/rt/itcms/threshold
+ i32.const 208
+ call $~lib/rt/itcms/initLazy
+ global.set $~lib/rt/itcms/pinSpace
+ i32.const 240
+ call $~lib/rt/itcms/initLazy
+ global.set $~lib/rt/itcms/toSpace
+ i32.const 384
+ call $~lib/rt/itcms/initLazy
+ global.set $~lib/rt/itcms/fromSpace
+ i32.const 0
+ i32.const 42
+ call $call-inferred/Foo#constructor
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ call $call-inferred/Foo#get:value
+ i32.const 42
+ i32.eq
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 32
+ i32.const 22
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ i32.const 42
+ call $call-inferred/Foo.create