Do not emit debug info by default

This basically flips the --noDebug flag to become a --debug flag, so some optimizations, like inlining, aren't skipped by default, which might be unexpected.
This commit is contained in:
dcodeIO 2018-11-09 12:28:10 +01:00
parent d93ca84aed
commit 4f95dce6e2
72 changed files with 6244 additions and 6197 deletions

View File

@ -206,8 +206,8 @@ function ensureGitignore() {
function ensurePackageJson() { function ensurePackageJson() {
console.log("- Making sure that 'package.json' contains the build commands...") console.log("- Making sure that 'package.json' contains the build commands...")
const entryPath = path.relative(projectDir, entryFile).replace(/\\/g, "/"); const entryPath = path.relative(projectDir, entryFile).replace(/\\/g, "/");
const buildUntouched = "asc " + entryPath + " -b build/untouched.wasm -t build/untouched.wat --sourceMap --validate"; const buildUntouched = "asc " + entryPath + " -b build/untouched.wasm -t build/untouched.wat --sourceMap --validate --debug";
const buildOptimized = "asc " + entryPath + " -b build/optimized.wasm -t build/optimized.wat --sourceMap --validate --optimize --noDebug"; const buildOptimized = "asc " + entryPath + " -b build/optimized.wasm -t build/optimized.wat --sourceMap --validate --optimize";
const buildAll = "npm run asbuild:untouched && npm run asbuild:optimized"; const buildAll = "npm run asbuild:untouched && npm run asbuild:optimized";
if (!fs.existsSync(packageFile)) { if (!fs.existsSync(packageFile)) {
fs.writeFileSync(packageFile, JSON.stringify({ fs.writeFileSync(packageFile, JSON.stringify({

View File

@ -505,7 +505,7 @@ exports.main = function main(argv, options, callback) {
module.setOptimizeLevel(optimizeLevel); module.setOptimizeLevel(optimizeLevel);
module.setShrinkLevel(shrinkLevel); module.setShrinkLevel(shrinkLevel);
module.setDebugInfo(!args.noDebug); module.setDebugInfo(args.debug);
var runPasses = []; var runPasses = [];
if (args.runPasses) { if (args.runPasses) {

View File

@ -81,13 +81,13 @@
], ],
"type": "s" "type": "s"
}, },
"noTreeShaking": { "debug": {
"description": "Disables compiler-level tree-shaking, compiling everything.", "description": "Enables debug information in emitted binaries.",
"type": "b", "type": "b",
"default": false "default": false
}, },
"noDebug": { "noTreeShaking": {
"description": "Disables maintaining of debug information in binaries.", "description": "Disables compiler-level tree-shaking, compiling everything.",
"type": "b", "type": "b",
"default": false "default": false
}, },

2
dist/asc.js vendored

File diff suppressed because one or more lines are too long

2
dist/asc.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -3,8 +3,8 @@
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"scripts": { "scripts": {
"asbuild:untouched": "asc assembly/index.ts -b build/untouched.wasm -t build/untouched.wat --use Math=JSMath --importMemory --sourceMap --validate --measure", "asbuild:untouched": "asc assembly/index.ts -b build/untouched.wasm -t build/untouched.wat --use Math=JSMath --importMemory --sourceMap --debug --validate --measure",
"asbuild:optimized": "asc assembly/index.ts -b build/optimized.wasm -t build/optimized.wat -d build/optimized.d.ts --use Math=JSMath -O3 --importMemory --sourceMap --validate --noDebug --measure", "asbuild:optimized": "asc assembly/index.ts -b build/optimized.wasm -t build/optimized.wat -d build/optimized.d.ts --use Math=JSMath -O3 --importMemory --sourceMap --validate --measure",
"asbuild": "npm run asbuild:untouched && npm run asbuild:optimized", "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized",
"server": "http-server . -o -c-1" "server": "http-server . -o -c-1"
}, },

View File

@ -17,7 +17,7 @@
}, },
"scripts": { "scripts": {
"asbuild": "npm run asbuild:untouched && npm run asbuild:optimized", "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized",
"asbuild:untouched": "asc assembly/i64.ts -t build/untouched.wat -b build/untouched.wasm --validate --sourceMap --measure", "asbuild:untouched": "asc assembly/i64.ts -t build/untouched.wat -b build/untouched.wasm --validate --sourceMap --debug --measure",
"asbuild:optimized": "asc -O assembly/i64.ts -b build/optimized.wasm -t build/optimized.wat -d build/optimized.d.ts --validate --sourceMap --measure", "asbuild:optimized": "asc -O assembly/i64.ts -b build/optimized.wasm -t build/optimized.wat -d build/optimized.d.ts --validate --sourceMap --measure",
"test": "node tests" "test": "node tests"
}, },

View File

@ -3,8 +3,8 @@
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"scripts": { "scripts": {
"asbuild:untouched": "asc assembly/index.ts -b build/untouched.wasm -t build/untouched.wat --use Math=JSMath --importMemory --sourceMap --validate --measure", "asbuild:untouched": "asc assembly/index.ts -b build/untouched.wasm -t build/untouched.wat --use Math=JSMath --importMemory --sourceMap --debug --validate --measure",
"asbuild:optimized": "asc assembly/index.ts -b build/optimized.wasm -t build/optimized.wat -d build/optimized.d.ts --use Math=JSMath -O3 --importMemory --sourceMap --validate --noDebug --measure", "asbuild:optimized": "asc assembly/index.ts -b build/optimized.wasm -t build/optimized.wat -d build/optimized.d.ts --use Math=JSMath -O3 --importMemory --sourceMap --validate --measure",
"asbuild": "npm run asbuild:untouched && npm run asbuild:optimized", "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized",
"server": "http-server . -o -c-1" "server": "http-server . -o -c-1"
}, },

View File

@ -3,9 +3,9 @@
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"scripts": { "scripts": {
"asbuild:untouched": "asc assembly/index.ts -b build/untouched.wasm -t build/untouched.wat --sourceMap --validate --importMemory", "asbuild:untouched": "asc assembly/index.ts -b build/untouched.wasm -t build/untouched.wat --sourceMap --debug --validate --importMemory",
"asbuild:optimized": "asc assembly/index.ts -b build/optimized.wasm -t build/optimized.wat -O3 --validate --noDebug --noAssert --importMemory", "asbuild:optimized": "asc assembly/index.ts -b build/optimized.wasm -t build/optimized.wat -O3 --validate --noAssert --importMemory",
"asbuild:asmjs": "asc assembly/index.ts -a build/index.asm.js -O3 --validate --noDebug --noAssert", "asbuild:asmjs": "asc assembly/index.ts -a build/index.asm.js -O3 --validate --noAssert",
"asbuild": "npm run asbuild:untouched && npm run asbuild:optimized && npm run asbuild:asmjs", "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized && npm run asbuild:asmjs",
"tsbuild": "tsc -p assembly -t ES2017 -m commonjs --outDir build", "tsbuild": "tsc -p assembly -t ES2017 -m commonjs --outDir build",
"build": "npm run asbuild && npm run tsbuild", "build": "npm run asbuild && npm run tsbuild",

View File

@ -4,7 +4,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"asbuild": "npm run asbuild:untouched && npm run asbuild:optimized", "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized",
"asbuild:untouched": "asc assembly/pson.ts -b build/untouched.wasm -t build/untouched.wat --validate --sourceMap --measure", "asbuild:untouched": "asc assembly/pson.ts -b build/untouched.wasm -t build/untouched.wat --validate --sourceMap --debug --measure",
"asbuild:optimized": "asc -O assembly/pson.ts -b build/optimized.wasm -t build/optimized.wat --validate --sourceMap --measure", "asbuild:optimized": "asc -O assembly/pson.ts -b build/optimized.wasm -t build/optimized.wat --validate --sourceMap --measure",
"test": "node tests" "test": "node tests"
}, },

View File

@ -5,7 +5,7 @@
"main": "index.js", "main": "index.js",
"types": "index.d.ts", "types": "index.d.ts",
"scripts": { "scripts": {
"asbuild": "asc assembly/index.ts -O3 -b build/index.wasm -t build/index.wat --importMemory --noDebug --sourceMap --validate", "asbuild": "asc assembly/index.ts -O3 -b build/index.wasm -t build/index.wat --importMemory --sourceMap --validate",
"build": "npm run asbuild && webpack --mode production --display-modules", "build": "npm run asbuild && webpack --mode production --display-modules",
"test": "ts-node tests/" "test": "ts-node tests/"
}, },

6
package-lock.json generated
View File

@ -549,9 +549,9 @@
"dev": true "dev": true
}, },
"binaryen": { "binaryen": {
"version": "52.0.0-nightly.20181104", "version": "52.0.0-nightly.20181108",
"resolved": "https://registry.npmjs.org/binaryen/-/binaryen-52.0.0-nightly.20181104.tgz", "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-52.0.0-nightly.20181108.tgz",
"integrity": "sha512-vmo9zN26kfulEFRWe0okJ2eKS6tef0sIE8bnzPyRbK/OlDRMaYYnmiYbKYwTtCe8CdO3zxDrpWTMXrI426UaZw==" "integrity": "sha512-EPCTNikr5NWz63au0pIrt8snmt+Fv/YERiDD/BQIT9I0jLYB11m/oMuUA5k5kMCLsfTc2w7Sma4jKVu7VR/owA=="
}, },
"bluebird": { "bluebird": {
"version": "3.5.3", "version": "3.5.3",

View File

@ -12,7 +12,7 @@
}, },
"dependencies": { "dependencies": {
"@protobufjs/utf8": "^1.1.0", "@protobufjs/utf8": "^1.1.0",
"binaryen": "52.0.0-nightly.20181104", "binaryen": "52.0.0-nightly.20181108",
"glob": "^7.1.3", "glob": "^7.1.3",
"long": "^4.0.0" "long": "^4.0.0"
}, },

View File

@ -86,6 +86,7 @@ tests.forEach(filename => {
"--baseDir", basedir, "--baseDir", basedir,
"--validate", "--validate",
"--measure", "--measure",
"--debug",
"--textFile" // -> stdout "--textFile" // -> stdout
], { ], {
stdout: stdout, stdout: stdout,
@ -136,9 +137,9 @@ tests.forEach(filename => {
filename, filename,
"--baseDir", basedir, "--baseDir", basedir,
"--validate", "--validate",
"-O3",
"--measure", "--measure",
"--binaryFile" // -> stdout "--binaryFile", // -> stdout
"-O3"
]; ];
if (args.create) cmd.push( if (args.create) cmd.push(
"--textFile", basename + ".optimized.wat" "--textFile", basename + ".optimized.wat"

View File

@ -12,28 +12,13 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(export "exported" (func $abi/exported)) (export "exported" (func $abi/exported))
(export "exportedExported" (func $abi/exportedExported)) (export "exportedExported" (func $abi/exported))
(export "exportedInternal" (func $abi/exportedInternal)) (export "exportedInternal" (func $abi/exported))
(start $start) (start $start)
(func $abi/exported (; 1 ;) (type $i) (result i32) (func $abi/exported (; 1 ;) (type $i) (result i32)
i32.const -128 i32.const -128
) )
(func $abi/exportedExported (; 2 ;) (type $i) (result i32) (func $start (; 2 ;) (type $v)
call $abi/exported
)
(func $abi/internal (; 3 ;) (type $i) (result i32)
i32.const 128
)
(func $abi/exportedInternal (; 4 ;) (type $i) (result i32)
call $abi/internal
i32.const 24
i32.shl
i32.const 24
i32.shr_s
)
(func $start (; 5 ;) (type $v)
call $abi/internal
drop
i32.const 1 i32.const 1
set_global $abi/condition set_global $abi/condition
i32.const 0 i32.const 0
@ -48,7 +33,7 @@
unreachable unreachable
end end
) )
(func $null (; 6 ;) (type $v) (func $null (; 3 ;) (type $v)
nop nop
) )
) )

View File

@ -221,32 +221,7 @@
get_local $0 get_local $0
f32.mul f32.mul
) )
(func $~lib/math/NativeMathf.pow (; 2 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (func $~lib/math/NativeMath.mod (; 2 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64)
(local $1 i32)
(local $2 i32)
get_local $0
i32.reinterpret/f32
tee_local $2
i32.const 2147483647
i32.and
i32.const 2139095040
i32.gt_s
tee_local $1
i32.eqz
if
i32.const 0
set_local $1
end
get_local $1
if
get_local $0
f32.const 1
f32.add
return
end
get_local $0
)
(func $~lib/math/NativeMath.mod (; 3 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64)
(local $1 i64) (local $1 i64)
(local $2 i64) (local $2 i64)
(local $3 i64) (local $3 i64)
@ -404,7 +379,9 @@
get_local $0 get_local $0
f64.mul f64.mul
) )
(func $start (; 4 ;) (type $v) (func $start (; 3 ;) (type $v)
(local $0 f32)
(local $1 i32)
get_global $binary/i get_global $binary/i
i32.const 1 i32.const 1
i32.rem_s i32.rem_s
@ -626,9 +603,23 @@
get_global $binary/f get_global $binary/f
call $~lib/math/NativeMathf.mod call $~lib/math/NativeMathf.mod
drop drop
block $__inlined_func$~lib/math/NativeMathf.pow
get_global $binary/f get_global $binary/f
call $~lib/math/NativeMathf.pow tee_local $0
drop i32.reinterpret/f32
i32.const 2147483647
i32.and
i32.const 2139095040
i32.gt_s
tee_local $1
i32.eqz
if
i32.const 0
set_local $1
end
get_local $1
br_if $__inlined_func$~lib/math/NativeMathf.pow
end
get_global $binary/f get_global $binary/f
f32.const 1 f32.const 1
f32.lt f32.lt
@ -664,8 +655,29 @@
get_global $binary/f get_global $binary/f
call $~lib/math/NativeMathf.mod call $~lib/math/NativeMathf.mod
set_global $binary/f set_global $binary/f
block $__inlined_func$~lib/math/NativeMathf.pow0
get_global $binary/f get_global $binary/f
call $~lib/math/NativeMathf.pow tee_local $0
i32.reinterpret/f32
i32.const 2147483647
i32.and
i32.const 2139095040
i32.gt_s
tee_local $1
i32.eqz
if
i32.const 0
set_local $1
end
get_local $1
if
get_local $0
f32.const 1
f32.add
set_local $0
end
end
get_local $0
set_global $binary/f set_global $binary/f
get_global $binary/f get_global $binary/f
f32.const 1 f32.const 1
@ -678,8 +690,29 @@
get_global $binary/f get_global $binary/f
call $~lib/math/NativeMathf.mod call $~lib/math/NativeMathf.mod
set_global $binary/f set_global $binary/f
block $__inlined_func$~lib/math/NativeMathf.pow2
get_global $binary/f get_global $binary/f
call $~lib/math/NativeMathf.pow tee_local $0
i32.reinterpret/f32
i32.const 2147483647
i32.and
i32.const 2139095040
i32.gt_s
tee_local $1
i32.eqz
if
i32.const 0
set_local $1
end
get_local $1
if
get_local $0
f32.const 1
f32.add
set_local $0
end
end
get_local $0
set_global $binary/f set_global $binary/f
get_global $binary/F get_global $binary/F
call $~lib/math/NativeMath.mod call $~lib/math/NativeMath.mod
@ -740,7 +773,7 @@
call $~lib/math/NativeMath.pow call $~lib/math/NativeMath.pow
set_global $binary/F set_global $binary/F
) )
(func $null (; 5 ;) (type $v) (func $null (; 4 ;) (type $v)
nop nop
) )
) )

View File

@ -1,73 +1,12 @@
(module (module
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$d (func (result f64)))
(type $FUNCSIG$f (func (result f32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s") (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s")
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $null) (elem (i32.const 0) $start)
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (func $start (; 0 ;) (type $v)
(func $call-inferred/foo<i32> (; 1 ;) (type $FUNCSIG$i) (result i32)
i32.const 42
)
(func $call-inferred/foo<f64> (; 2 ;) (type $FUNCSIG$d) (result f64)
f64.const 42
)
(func $call-inferred/foo<f32> (; 3 ;) (type $FUNCSIG$f) (result f32)
f32.const 42
)
(func $start (; 4 ;) (type $v)
call $call-inferred/foo<i32>
i32.const 42
i32.ne
if
i32.const 0
i32.const 8
i32.const 5
i32.const 0
call $~lib/env/abort
unreachable
end
call $call-inferred/foo<f64>
f64.const 42
f64.ne
if
i32.const 0
i32.const 8
i32.const 6
i32.const 0
call $~lib/env/abort
unreachable
end
call $call-inferred/foo<f32>
f32.const 42
f32.ne
if
i32.const 0
i32.const 8
i32.const 7
i32.const 0
call $~lib/env/abort
unreachable
end
call $call-inferred/foo<f32>
f32.const 42
f32.ne
if
i32.const 0
i32.const 8
i32.const 13
i32.const 0
call $~lib/env/abort
unreachable
end
)
(func $null (; 5 ;) (type $v)
nop nop
) )
) )

View File

@ -12,14 +12,7 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $call-optional/opt (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $call-optional/opt|trampoline (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
get_local $0
get_local $1
i32.add
get_local $2
i32.add
)
(func $call-optional/opt|trampoline (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
block $2of2 block $2of2
block $1of2 block $1of2
block $0of2 block $0of2
@ -39,16 +32,37 @@
end end
get_local $0 get_local $0
get_local $1 get_local $1
i32.add
get_local $2 get_local $2
call $call-optional/opt i32.add
) )
(func $start (; 3 ;) (type $v) (func $start (; 2 ;) (type $v)
(local $0 i32)
(local $1 i32)
i32.const 1 i32.const 1
set_global $~argc set_global $~argc
block $2of2
block $1of2
block $0of2
block $outOfRange
get_global $~argc
i32.const 1
i32.sub
br_table $0of2 $1of2 $2of2 $outOfRange
end
unreachable
end
i32.const -1
set_local $0
end
i32.const -2
set_local $1
end
get_local $0
i32.const 3 i32.const 3
i32.const 0 i32.add
i32.const 0 get_local $1
call $call-optional/opt|trampoline i32.add
if if
i32.const 0 i32.const 0
i32.const 8 i32.const 8
@ -59,30 +73,38 @@
end end
i32.const 2 i32.const 2
set_global $~argc set_global $~argc
i32.const 3
i32.const 4 i32.const 4
set_local $0
i32.const 0 i32.const 0
call $call-optional/opt|trampoline set_local $1
i32.const 5 block $2of21
i32.ne block $1of22
if block $0of23
i32.const 0 block $outOfRange4
i32.const 8 get_global $~argc
i32.const 5 i32.const 1
i32.const 0 i32.sub
call $~lib/env/abort br_table $0of23 $1of22 $2of21 $outOfRange4
end
unreachable unreachable
end end
i32.const -1
set_local $0
end
i32.const -2
set_local $1
end
get_local $0
i32.const 3 i32.const 3
i32.const 4 i32.add
get_local $1
i32.add
i32.const 5 i32.const 5
call $call-optional/opt
i32.const 12
i32.ne i32.ne
if if
i32.const 0 i32.const 0
i32.const 8 i32.const 8
i32.const 6 i32.const 5
i32.const 0 i32.const 0
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
@ -137,7 +159,7 @@
unreachable unreachable
end end
) )
(func $null (; 4 ;) (type $v) (func $null (; 3 ;) (type $v)
nop nop
) )
) )

View File

@ -1,25 +1,16 @@
(module (module
(type $iv (func (param i32))) (type $iv (func (param i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$v (func))
(memory $0 0) (memory $0 0)
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $null) (elem (i32.const 0) $start)
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(export "test" (func $class-overloading/test)) (export "test" (func $class-overloading/test))
(start $start) (func $class-overloading/test (; 0 ;) (type $iv) (param $0 i32)
(func $class-overloading/Foo#baz (; 0 ;) (type $FUNCSIG$v)
nop nop
) )
(func $class-overloading/test (; 1 ;) (type $iv) (param $0 i32) (func $start (; 1 ;) (type $v)
call $class-overloading/Foo#baz
)
(func $start (; 2 ;) (type $v)
i32.const 0
call $class-overloading/test
)
(func $null (; 3 ;) (type $v)
nop nop
) )
) )

View File

@ -1,33 +1,14 @@
(module (module
(type $ii (func (param i32) (result i32))) (type $ii (func (param i32) (result i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$f (func (result f32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\08\00\00\00c\00l\00a\00s\00s\00.\00t\00s") (data (i32.const 8) "\08\00\00\00c\00l\00a\00s\00s\00.\00t\00s")
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $null) (elem (i32.const 0) $start)
(global $class/Animal.ONE (mut i32) (i32.const 1))
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(export "test" (func $class/test)) (export "test" (func $class/test))
(start $start) (func $class/test (; 0 ;) (type $ii) (param $0 i32) (result i32)
(func $class/Animal.add (; 0 ;) (type $FUNCSIG$i) (result i32)
get_global $class/Animal.ONE
i32.const 3
i32.add
)
(func $class/Animal.sub<f32> (; 1 ;) (type $FUNCSIG$f) (result f32)
f32.const -1
get_global $class/Animal.ONE
f32.convert_s/i32
f32.add
)
(func $class/test (; 2 ;) (type $ii) (param $0 i32) (result i32)
call $class/Animal.add
drop
call $class/Animal.sub<f32>
drop
get_local $0 get_local $0
i32.load i32.load
drop drop
@ -48,13 +29,7 @@
i32.store8 offset=6 i32.store8 offset=6
get_local $0 get_local $0
) )
(func $start (; 3 ;) (type $v) (func $start (; 1 ;) (type $v)
call $class/Animal.add
drop
call $class/Animal.sub<f32>
drop
)
(func $null (; 4 ;) (type $v)
nop nop
) )
) )

View File

@ -1,5 +1,4 @@
(module (module
(type $i (func (result i32)))
(type $v (func)) (type $v (func))
(memory $0 0) (memory $0 0)
(table $0 1 anyfunc) (table $0 1 anyfunc)
@ -37,18 +36,13 @@
(export "SelfReference.ZERO" (global $enum/SelfReference.ZERO)) (export "SelfReference.ZERO" (global $enum/SelfReference.ZERO))
(export "SelfReference.ONE" (global $enum/SelfReference.ONE)) (export "SelfReference.ONE" (global $enum/SelfReference.ONE))
(start $start) (start $start)
(func $enum/getZero (; 0 ;) (type $i) (result i32) (func $start (; 0 ;) (type $v)
i32.const 0 i32.const 0
)
(func $start (; 1 ;) (type $v)
call $enum/getZero
set_global $enum/NonConstant.ZERO set_global $enum/NonConstant.ZERO
call $enum/getZero
i32.const 1 i32.const 1
i32.add
set_global $enum/NonConstant.ONE set_global $enum/NonConstant.ONE
) )
(func $null (; 2 ;) (type $v) (func $null (; 1 ;) (type $v)
nop nop
) )
) )

View File

@ -5,7 +5,6 @@
(type $iiv (func (param i32 i32))) (type $iiv (func (param i32 i32)))
(type $iv (func (param i32))) (type $iv (func (param i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(memory $0 0) (memory $0 0)
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $null) (elem (i32.const 0) $null)
@ -122,46 +121,28 @@
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
get_local $1 get_local $1
) )
(func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$i) (result i32) (func $exports/Car#get:numDoors (; 4 ;) (type $ii) (param $0 i32) (result i32)
i32.const 4
call $~lib/allocator/arena/__memory_allocate
)
(func $exports/Car#constructor (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $0
i32.eqz
if
call $~lib/memory/memory.allocate
tee_local $0
get_local $1
i32.store
end
get_local $0
get_local $1
i32.store
get_local $0
)
(func $exports/Car#get:numDoors (; 6 ;) (type $ii) (param $0 i32) (result i32)
get_local $0 get_local $0
i32.load i32.load
) )
(func $exports/Car#set:numDoors (; 7 ;) (type $iiv) (param $0 i32) (param $1 i32) (func $exports/Car#set:numDoors (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32)
get_local $0 get_local $0
get_local $1 get_local $1
i32.store i32.store
) )
(func $exports/Car#openDoors (; 8 ;) (type $iv) (param $0 i32) (func $exports/Car#openDoors (; 6 ;) (type $iv) (param $0 i32)
nop nop
) )
(func $start (; 9 ;) (type $v) (func $start (; 7 ;) (type $v)
i32.const 8 i32.const 8
set_global $~lib/allocator/arena/startOffset set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset get_global $~lib/allocator/arena/startOffset
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
) )
(func $null (; 10 ;) (type $v) (func $null (; 8 ;) (type $v)
nop nop
) )
(func $exports/subOpt|trampoline (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $exports/subOpt|trampoline (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
block $1of1 block $1of1
block $0of1 block $0of1
block $outOfRange block $outOfRange
@ -177,13 +158,13 @@
end end
get_local $0 get_local $0
get_local $1 get_local $1
call $exports/subOpt i32.sub
) )
(func $~setargc (; 12 ;) (type $iv) (param $0 i32) (func $~setargc (; 10 ;) (type $iv) (param $0 i32)
get_local $0 get_local $0
set_global $~argc set_global $~argc
) )
(func $exports/Car#constructor|trampoline (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $exports/Car#constructor|trampoline (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
block $1of1 block $1of1
block $0of1 block $0of1
block $outOfRange block $outOfRange
@ -196,7 +177,17 @@
set_local $1 set_local $1
end end
get_local $0 get_local $0
i32.eqz
if
i32.const 4
call $~lib/allocator/arena/__memory_allocate
tee_local $0
get_local $1 get_local $1
call $exports/Car#constructor i32.store
end
get_local $0
get_local $1
i32.store
get_local $0
) )
) )

View File

@ -1,12 +1,9 @@
(module (module
(type $i (func (result i32)))
(type $iii (func (param i32 i32) (result i32))) (type $iii (func (param i32 i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $III (func (param i64 i64) (result i64))) (type $III (func (param i64 i64) (result i64)))
(type $FFF (func (param f64 f64) (result f64))) (type $FFF (func (param f64 f64) (result f64)))
(type $iiii (func (param i32 i32 i32) (result i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\11\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s") (data (i32.const 8) "\11\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s")
@ -23,63 +20,19 @@
get_local $1 get_local $1
i32.add i32.add
) )
(func $function-types/makeAdder<i32> (; 2 ;) (type $i) (result i32) (func $function-types/makeAdder<i64>~anonymous|2 (; 2 ;) (type $III) (param $0 i64) (param $1 i64) (result i64)
i32.const 1
)
(func $function-types/makeAdder<i64>~anonymous|2 (; 3 ;) (type $III) (param $0 i64) (param $1 i64) (result i64)
get_local $0 get_local $0
get_local $1 get_local $1
i64.add i64.add
) )
(func $function-types/makeAdder<i64> (; 4 ;) (type $i) (result i32) (func $function-types/makeAdder<f64>~anonymous|3 (; 3 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
i32.const 2
)
(func $function-types/makeAdder<f64>~anonymous|3 (; 5 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
get_local $0 get_local $0
get_local $1 get_local $1
f64.add f64.add
) )
(func $function-types/makeAdder<f64> (; 6 ;) (type $i) (result i32) (func $start (; 4 ;) (type $v)
i32.const 3
)
(func $function-types/doAddWithFn<i32> (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
i32.const 2
set_global $~argc
get_local $0
get_local $1
get_local $2
call_indirect (type $iii)
)
(func $function-types/doAdd<i32> (; 8 ;) (type $FUNCSIG$i) (result i32)
i32.const 2
set_global $~argc
i32.const 3
i32.const 4
call $function-types/makeAdder<i32>
call_indirect (type $iii)
)
(func $function-types/makeAndAdd<i32>|trampoline (; 9 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32) (local $0 i32)
block $1of1
block $0of1
block $outOfRange
get_global $~argc
i32.const 2
i32.sub
br_table $0of1 $1of1 $outOfRange
end
unreachable
end
call $function-types/makeAdder<i32>
set_local $0
end
i32.const 1 i32.const 1
i32.const 2
get_local $0
call $function-types/doAddWithFn<i32>
)
(func $start (; 10 ;) (type $v)
call $function-types/makeAdder<i32>
set_global $function-types/i32Adder set_global $function-types/i32Adder
i32.const 2 i32.const 2
set_global $~argc set_global $~argc
@ -97,7 +50,7 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
call $function-types/makeAdder<i64> i32.const 2
set_global $function-types/i64Adder set_global $function-types/i64Adder
i32.const 2 i32.const 2
set_global $~argc set_global $~argc
@ -119,7 +72,7 @@
set_global $~argc set_global $~argc
f64.const 1.5 f64.const 1.5
f64.const 2.5 f64.const 2.5
call $function-types/makeAdder<f64> i32.const 3
call_indirect (type $FFF) call_indirect (type $FFF)
f64.const 4 f64.const 4
f64.ne f64.ne
@ -132,9 +85,11 @@
unreachable unreachable
end end
i32.const 2 i32.const 2
set_global $~argc
i32.const 2
i32.const 3 i32.const 3
get_global $function-types/i32Adder get_global $function-types/i32Adder
call $function-types/doAddWithFn<i32> call_indirect (type $iii)
i32.const 5 i32.const 5
i32.ne i32.ne
if if
@ -145,7 +100,12 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
call $function-types/doAdd<i32> i32.const 2
set_global $~argc
i32.const 3
i32.const 4
i32.const 1
call_indirect (type $iii)
i32.const 7 i32.const 7
i32.ne i32.ne
if if
@ -156,10 +116,12 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 2
set_global $~argc
i32.const 4 i32.const 4
i32.const 5 i32.const 5
i32.const 4 i32.const 4
call $function-types/doAddWithFn<i32> call_indirect (type $iii)
i32.const 9 i32.const 9
i32.ne i32.ne
if if
@ -172,7 +134,25 @@
end end
i32.const 2 i32.const 2
set_global $~argc set_global $~argc
call $function-types/makeAndAdd<i32>|trampoline block $1of1
block $0of1
block $outOfRange
get_global $~argc
i32.const 2
i32.sub
br_table $0of1 $1of1 $outOfRange
end
unreachable
end
i32.const 1
set_local $0
end
i32.const 2
set_global $~argc
i32.const 1
i32.const 2
get_local $0
call_indirect (type $iii)
i32.const 3 i32.const 3
i32.ne i32.ne
if if
@ -183,10 +163,12 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 2
set_global $~argc
i32.const 1 i32.const 1
i32.const 2 i32.const 2
call $function-types/makeAdder<i32> i32.const 1
call $function-types/doAddWithFn<i32> call_indirect (type $iii)
i32.const 3 i32.const 3
i32.ne i32.ne
if if
@ -198,7 +180,7 @@
unreachable unreachable
end end
) )
(func $null (; 11 ;) (type $v) (func $null (; 5 ;) (type $v)
nop nop
) )
) )

View File

@ -1,89 +1,11 @@
(module (module
(type $v (func)) (type $v (func))
(type $i (func (result i32)))
(type $I (func (result i64)))
(type $f (func (result f32)))
(type $F (func (result f64)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$j (func (result i64)))
(type $FUNCSIG$f (func (result f32)))
(type $FUNCSIG$d (func (result f64)))
(memory $0 0) (memory $0 0)
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $function/v) (elem (i32.const 0) $start)
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (func $start (; 0 ;) (type $v)
(func $function/v (; 0 ;) (type $v)
nop nop
) )
(func $function/i (; 1 ;) (type $i) (result i32)
i32.const 0
)
(func $function/I (; 2 ;) (type $I) (result i64)
i64.const 0
)
(func $function/f (; 3 ;) (type $f) (result f32)
f32.const 0
)
(func $function/F (; 4 ;) (type $F) (result f64)
f64.const 0
)
(func $function/iv (; 5 ;) (type $FUNCSIG$v)
nop
)
(func $function/ii (; 6 ;) (type $FUNCSIG$i) (result i32)
i32.const 0
)
(func $function/II (; 7 ;) (type $FUNCSIG$j) (result i64)
i64.const 0
)
(func $function/ff (; 8 ;) (type $FUNCSIG$f) (result f32)
f32.const 0
)
(func $function/FF (; 9 ;) (type $FUNCSIG$d) (result f64)
f64.const 0
)
(func $function/iii (; 10 ;) (type $FUNCSIG$i) (result i32)
i32.const 3
)
(func $function/III (; 11 ;) (type $FUNCSIG$j) (result i64)
i64.const 3
)
(func $function/fff (; 12 ;) (type $FUNCSIG$f) (result f32)
f32.const 3
)
(func $function/FFF (; 13 ;) (type $FUNCSIG$d) (result f64)
f64.const 3
)
(func $start (; 14 ;) (type $v)
call $function/v
call $function/i
drop
call $function/I
drop
call $function/f
drop
call $function/F
drop
call $function/iv
call $function/ii
drop
call $function/II
drop
call $function/ff
drop
call $function/FF
drop
call $function/iv
call $function/iii
drop
call $function/III
drop
call $function/fff
drop
call $function/FFF
drop
)
) )

View File

@ -2,7 +2,6 @@
(type $i (func (result i32))) (type $i (func (result i32)))
(type $ii (func (param i32) (result i32))) (type $ii (func (param i32) (result i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(memory $0 0) (memory $0 0)
(table $0 2 anyfunc) (table $0 2 anyfunc)
(elem (i32.const 0) $null $getter-call/C#get:x~anonymous|1) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|1)
@ -75,32 +74,25 @@
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
get_local $1 get_local $1
) )
(func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$i) (result i32) (func $getter-call/C#get:x~anonymous|1 (; 1 ;) (type $i) (result i32)
i32.const 0
call $~lib/allocator/arena/__memory_allocate
)
(func $getter-call/C#get:x~anonymous|1 (; 2 ;) (type $i) (result i32)
i32.const 42 i32.const 42
) )
(func $getter-call/C#get:x (; 3 ;) (type $FUNCSIG$i) (result i32) (func $getter-call/test (; 2 ;) (type $i) (result i32)
i32.const 1 i32.const 0
) call $~lib/allocator/arena/__memory_allocate
(func $getter-call/test (; 4 ;) (type $i) (result i32) drop
(local $0 i32)
call $~lib/memory/memory.allocate
set_local $0
i32.const 0 i32.const 0
set_global $~argc set_global $~argc
call $getter-call/C#get:x i32.const 1
call_indirect (type $i) call_indirect (type $i)
) )
(func $start (; 5 ;) (type $v) (func $start (; 3 ;) (type $v)
i32.const 8 i32.const 8
set_global $~lib/allocator/arena/startOffset set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset get_global $~lib/allocator/arena/startOffset
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
) )
(func $null (; 6 ;) (type $v) (func $null (; 4 ;) (type $v)
nop nop
) )
) )

View File

@ -1,7 +1,5 @@
(module (module
(type $i (func (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $iv (func (param i32)))
(type $v (func)) (type $v (func))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
@ -12,15 +10,8 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $getter-setter/Foo.get:bar (; 1 ;) (type $i) (result i32) (func $start (; 1 ;) (type $v)
get_global $getter-setter/Foo._bar get_global $getter-setter/Foo._bar
)
(func $getter-setter/Foo.set:bar (; 2 ;) (type $iv) (param $0 i32)
get_local $0
set_global $getter-setter/Foo._bar
)
(func $start (; 3 ;) (type $v)
call $getter-setter/Foo.get:bar
if if
i32.const 0 i32.const 0
i32.const 8 i32.const 8
@ -30,8 +21,8 @@
unreachable unreachable
end end
i32.const 1 i32.const 1
call $getter-setter/Foo.set:bar set_global $getter-setter/Foo._bar
call $getter-setter/Foo.get:bar get_global $getter-setter/Foo._bar
i32.const 1 i32.const 1
i32.ne i32.ne
if if
@ -43,8 +34,8 @@
unreachable unreachable
end end
i32.const 2 i32.const 2
call $getter-setter/Foo.set:bar set_global $getter-setter/Foo._bar
call $getter-setter/Foo.get:bar get_global $getter-setter/Foo._bar
i32.const 2 i32.const 2
i32.ne i32.ne
if if
@ -56,7 +47,7 @@
unreachable unreachable
end end
) )
(func $null (; 4 ;) (type $v) (func $null (; 2 ;) (type $v)
nop nop
) )
) )

View File

@ -6,14 +6,13 @@
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\05\00\00\00i\00f\00.\00t\00s") (data (i32.const 8) "\05\00\00\00i\00f\00.\00t\00s")
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $null) (elem (i32.const 0) $start)
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(export "ifThenElse" (func $if/ifThenElse)) (export "ifThenElse" (func $if/ifThenElse))
(export "ifThen" (func $if/ifThen)) (export "ifThen" (func $if/ifThen))
(export "ifThenElseBlock" (func $if/ifThenElse)) (export "ifThenElseBlock" (func $if/ifThenElse))
(export "ifAlwaysReturns" (func $if/ifAlwaysReturns)) (export "ifAlwaysReturns" (func $if/ifAlwaysReturns))
(start $start)
(func $if/ifThenElse (; 1 ;) (type $ii) (param $0 i32) (result i32) (func $if/ifThenElse (; 1 ;) (type $ii) (param $0 i32) (result i32)
get_local $0 get_local $0
if (result i32) if (result i32)
@ -44,74 +43,6 @@
end end
) )
(func $start (; 4 ;) (type $v) (func $start (; 4 ;) (type $v)
i32.const 0
call $if/ifThenElse
if
i32.const 0
i32.const 8
i32.const 8
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 1
call $if/ifThenElse
i32.const 1
i32.ne
if
i32.const 0
i32.const 8
i32.const 9
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 0
call $if/ifThen
if
i32.const 0
i32.const 8
i32.const 17
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 1
call $if/ifThen
i32.const 1
i32.ne
if
i32.const 0
i32.const 8
i32.const 18
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 0
call $if/ifThenElse
if
i32.const 0
i32.const 8
i32.const 30
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 1
call $if/ifThenElse
i32.const 1
i32.ne
if
i32.const 0
i32.const 8
i32.const 31
i32.const 0
call $~lib/env/abort
unreachable
end
)
(func $null (; 5 ;) (type $v)
nop nop
) )
) )

View File

@ -1,37 +1,11 @@
(module (module
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(memory $0 0) (memory $0 0)
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $export/ns.two) (elem (i32.const 0) $start)
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (func $start (; 0 ;) (type $v)
(func $export/add (; 0 ;) (type $FUNCSIG$i) (result i32)
i32.const 3
)
(func $export/sub (; 1 ;) (type $FUNCSIG$i) (result i32)
i32.const -1
)
(func $export/ns.two (; 2 ;) (type $v)
nop nop
) )
(func $start (; 3 ;) (type $v)
(local $0 i32)
(local $1 i32)
call $export/add
set_local $0
call $export/sub
set_local $1
call $export/add
drop
call $export/ns.two
call $export/add
set_local $0
call $export/sub
set_local $1
call $export/add
drop
call $export/ns.two
)
) )

View File

@ -1,13 +1,9 @@
(module (module
(type $v (func)) (type $v (func))
(type $i (func (result i32)))
(type $I (func (result i64)))
(type $f (func (result f32)))
(type $F (func (result f64)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\0d\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s") (data (i32.const 8) "\0d\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s")
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $infer-type/locals) (elem (i32.const 0) $null)
(global $infer-type/ri (mut i32) (i32.const 0)) (global $infer-type/ri (mut i32) (i32.const 0))
(global $infer-type/rI (mut i64) (i64.const 0)) (global $infer-type/rI (mut i64) (i64.const 0))
(global $infer-type/rf (mut f32) (f32.const 0)) (global $infer-type/rf (mut f32) (f32.const 0))
@ -15,31 +11,15 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $infer-type/locals (; 0 ;) (type $v) (func $start (; 0 ;) (type $v)
nop
)
(func $infer-type/reti (; 1 ;) (type $i) (result i32)
i32.const 0
)
(func $infer-type/retI (; 2 ;) (type $I) (result i64)
i64.const 0
)
(func $infer-type/retf (; 3 ;) (type $f) (result f32)
f32.const 0
)
(func $infer-type/refF (; 4 ;) (type $F) (result f64)
f64.const 0
)
(func $start (; 5 ;) (type $v)
(local $0 i32) (local $0 i32)
call $infer-type/locals i32.const 0
call $infer-type/reti
set_global $infer-type/ri set_global $infer-type/ri
call $infer-type/retI i64.const 0
set_global $infer-type/rI set_global $infer-type/rI
call $infer-type/retf f32.const 0
set_global $infer-type/rf set_global $infer-type/rf
call $infer-type/refF f64.const 0
set_global $infer-type/rF set_global $infer-type/rF
block $break|0 block $break|0
loop $repeat|0 loop $repeat|0
@ -57,4 +37,7 @@
unreachable unreachable
end end
) )
(func $null (; 1 ;) (type $v)
nop
)
) )

View File

@ -6,18 +6,15 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(export "foo" (func $inlining-recursive/foo)) (export "foo" (func $inlining-recursive/foo))
(export "bar" (func $inlining-recursive/bar)) (export "bar" (func $inlining-recursive/baz))
(export "baz" (func $inlining-recursive/baz)) (export "baz" (func $inlining-recursive/baz))
(func $inlining-recursive/foo (; 0 ;) (type $v) (func $inlining-recursive/foo (; 0 ;) (type $v)
call $inlining-recursive/foo call $inlining-recursive/foo
) )
(func $inlining-recursive/baz (; 1 ;) (type $v) (func $inlining-recursive/baz (; 1 ;) (type $v)
call $inlining-recursive/bar
)
(func $inlining-recursive/bar (; 2 ;) (type $v)
call $inlining-recursive/baz call $inlining-recursive/baz
) )
(func $null (; 3 ;) (type $v) (func $null (; 2 ;) (type $v)
nop nop
) )
) )

View File

@ -37,17 +37,6 @@
end end
) )
(func $start (; 4 ;) (type $v) (func $start (; 4 ;) (type $v)
call $inlining/test
i32.const 3
i32.ne
if
i32.const 0
i32.const 8
i32.const 10
i32.const 0
call $~lib/env/abort
unreachable
end
call $inlining/test_funcs call $inlining/test_funcs
) )
(func $null (; 5 ;) (type $v) (func $null (; 5 ;) (type $v)

View File

@ -1,7 +1,6 @@
(module (module
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\0d\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") (data (i32.const 8) "\0d\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s")
@ -11,41 +10,7 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $instanceof/isI32<i32> (; 1 ;) (type $FUNCSIG$i) (result i32) (func $start (; 1 ;) (type $v)
i32.const 1
)
(func $instanceof/isI32<f64> (; 2 ;) (type $FUNCSIG$i) (result i32)
i32.const 0
)
(func $start (; 3 ;) (type $v)
call $instanceof/isI32<i32>
i32.eqz
if
i32.const 0
i32.const 8
i32.const 38
i32.const 0
call $~lib/env/abort
unreachable
end
call $instanceof/isI32<f64>
if
i32.const 0
i32.const 8
i32.const 39
i32.const 0
call $~lib/env/abort
unreachable
end
call $instanceof/isI32<f64>
if
i32.const 0
i32.const 8
i32.const 40
i32.const 0
call $~lib/env/abort
unreachable
end
get_global $instanceof/an get_global $instanceof/an
if if
i32.const 0 i32.const 0
@ -68,7 +33,7 @@
unreachable unreachable
end end
) )
(func $null (; 4 ;) (type $v) (func $null (; 2 ;) (type $v)
nop nop
) )
) )

View File

@ -13,17 +13,14 @@
get_global $~started get_global $~started
i32.eqz i32.eqz
if if
call $start i32.const 1
set_global $main/code
i32.const 1 i32.const 1
set_global $~started set_global $~started
end end
get_global $main/code get_global $main/code
) )
(func $start (; 1 ;) (type $v) (func $null (; 1 ;) (type $v)
i32.const 1
set_global $main/code
)
(func $null (; 2 ;) (type $v)
nop nop
) )
) )

View File

@ -1,9 +1,7 @@
(module (module
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $FF (func (param f64) (result f64))) (type $FF (func (param f64) (result f64)))
(type $Fi (func (param f64) (result i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$dd (func (param f64) (result f64)))
(memory $0 0) (memory $0 0)
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $null) (elem (i32.const 0) $null)
@ -188,26 +186,12 @@
f64.mul f64.mul
f64.add f64.add
) )
(func $~lib/builtins/isFinite<f64> (; 1 ;) (type $Fi) (param $0 f64) (result i32) (func $../../examples/mandelbrot/assembly/index/computeLine (; 1 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
get_local $0
get_local $0
f64.sub
f64.const 0
f64.eq
)
(func $../../examples/mandelbrot/assembly/index/clamp<f64> (; 2 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64)
get_local $0
f64.const 0
f64.max
f64.const 1
f64.min
)
(func $../../examples/mandelbrot/assembly/index/computeLine (; 3 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
(local $4 f64) (local $4 f64)
(local $5 f64) (local $5 f64)
(local $6 f64) (local $6 f64)
(local $7 i32) (local $7 f64)
(local $8 f64) (local $8 i32)
(local $9 f64) (local $9 f64)
(local $10 f64) (local $10 f64)
(local $11 f64) (local $11 f64)
@ -225,7 +209,7 @@
tee_local $4 tee_local $4
f64.const 2 f64.const 2
f64.div f64.div
tee_local $8 tee_local $7
f64.sub f64.sub
f64.const 10 f64.const 10
f64.const 3 f64.const 3
@ -241,11 +225,11 @@
set_local $9 set_local $9
block $break|0 block $break|0
loop $repeat|0 loop $repeat|0
get_local $7 get_local $8
get_local $1 get_local $1
i32.ge_u i32.ge_u
br_if $break|0 br_if $break|0
get_local $7 get_local $8
f64.convert_u/i32 f64.convert_u/i32
get_local $11 get_local $11
f64.sub f64.sub
@ -267,7 +251,7 @@
get_local $5 get_local $5
get_local $5 get_local $5
f64.mul f64.mul
tee_local $8 tee_local $7
f64.add f64.add
f64.const 4 f64.const 4
f64.le f64.le
@ -281,7 +265,7 @@
f64.add f64.add
set_local $5 set_local $5
get_local $6 get_local $6
get_local $8 get_local $7
f64.sub f64.sub
get_local $10 get_local $10
f64.add f64.add
@ -320,7 +304,7 @@
f64.sub f64.sub
get_local $10 get_local $10
f64.add f64.add
set_local $8 set_local $7
f64.const 2 f64.const 2
get_local $4 get_local $4
f64.mul f64.mul
@ -329,7 +313,7 @@
get_local $9 get_local $9
f64.add f64.add
set_local $5 set_local $5
get_local $8 get_local $7
set_local $4 set_local $4
get_local $2 get_local $2
i32.const 1 i32.const 1
@ -340,6 +324,13 @@
end end
unreachable unreachable
end end
get_local $0
get_local $1
i32.mul
get_local $8
i32.add
i32.const 1
i32.shl
get_local $4 get_local $4
get_local $4 get_local $4
f64.mul f64.mul
@ -353,7 +344,10 @@
f64.const 0.6931471805599453 f64.const 0.6931471805599453
f64.div f64.div
tee_local $6 tee_local $6
call $~lib/builtins/isFinite<f64> get_local $6
f64.sub
f64.const 0
f64.eq
if (result i32) if (result i32)
f64.const 2047 f64.const 2047
get_local $2 get_local $2
@ -365,33 +359,28 @@
get_local $3 get_local $3
f64.convert_u/i32 f64.convert_u/i32
f64.div f64.div
call $../../examples/mandelbrot/assembly/index/clamp<f64> f64.const 0
f64.max
f64.const 1
f64.min
f64.mul f64.mul
i32.trunc_u/f64 i32.trunc_u/f64
else else
i32.const 2047 i32.const 2047
end end
set_local $2 tee_local $2
get_local $0
get_local $1
i32.mul
get_local $7
i32.add
i32.const 1
i32.shl
get_local $2
i32.store16 i32.store16
get_local $7 get_local $8
i32.const 1 i32.const 1
i32.add i32.add
set_local $7 set_local $8
br $repeat|0 br $repeat|0
unreachable unreachable
end end
unreachable unreachable
end end
) )
(func $null (; 4 ;) (type $v) (func $null (; 2 ;) (type $v)
nop nop
) )
) )

View File

@ -1,54 +1,25 @@
(module (module
(type $ii (func (param i32) (result i32))) (type $ii (func (param i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $v (func)) (type $v (func))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\0e\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s") (data (i32.const 8) "\0e\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s")
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $null) (elem (i32.const 0) $start)
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(export "testI32" (func $many-locals/testI32)) (export "testI32" (func $many-locals/testI32))
(export "testI8" (func $many-locals/testI8)) (export "testI8" (func $many-locals/testI8))
(start $start) (func $many-locals/testI32 (; 0 ;) (type $ii) (param $0 i32) (result i32)
(func $many-locals/testI32 (; 1 ;) (type $ii) (param $0 i32) (result i32)
get_local $0 get_local $0
) )
(func $many-locals/testI8 (; 2 ;) (type $ii) (param $0 i32) (result i32) (func $many-locals/testI8 (; 1 ;) (type $ii) (param $0 i32) (result i32)
get_local $0 get_local $0
i32.const 24 i32.const 24
i32.shl i32.shl
i32.const 24 i32.const 24
i32.shr_s i32.shr_s
) )
(func $start (; 3 ;) (type $v) (func $start (; 2 ;) (type $v)
i32.const 42
call $many-locals/testI32
i32.const 42
i32.ne
if
i32.const 0
i32.const 8
i32.const 133
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 42
call $many-locals/testI8
i32.const 42
i32.ne
if
i32.const 0
i32.const 8
i32.const 267
i32.const 0
call $~lib/env/abort
unreachable
end
)
(func $null (; 4 ;) (type $v)
nop nop
) )
) )

View File

@ -7,13 +7,10 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(export "getValue" (func $named-import-default/getValue)) (export "getValue" (func $named-import-default/getValue))
(func $named-export-default/get3 (; 0 ;) (type $i) (result i32) (func $named-import-default/getValue (; 0 ;) (type $i) (result i32)
i32.const 3 i32.const 3
) )
(func $named-import-default/getValue (; 1 ;) (type $i) (result i32) (func $null (; 1 ;) (type $v)
call $named-export-default/get3
)
(func $null (; 2 ;) (type $v)
nop nop
) )
) )

View File

@ -1,26 +1,11 @@
(module (module
(type $i (func (result i32)))
(type $v (func)) (type $v (func))
(memory $0 0) (memory $0 0)
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $null) (elem (i32.const 0) $start)
(global $namespace/Outer.Inner.aVar (mut i32) (i32.const 0))
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (func $start (; 0 ;) (type $v)
(func $namespace/Outer.Inner.aFunc (; 0 ;) (type $i) (result i32)
get_global $namespace/Outer.Inner.aVar
)
(func $namespace/Joined.anotherFunc (; 1 ;) (type $i) (result i32)
i32.const 3
)
(func $start (; 2 ;) (type $v)
call $namespace/Outer.Inner.aFunc
drop
call $namespace/Joined.anotherFunc
drop
)
(func $null (; 3 ;) (type $v)
nop nop
) )
) )

View File

@ -1,22 +1,16 @@
(module (module
(type $i (func (result i32))) (type $i (func (result i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(memory $0 0) (memory $0 0)
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $null) (elem (i32.const 0) $null)
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(export "test" (func $new-without-allocator/test)) (export "test" (func $new-without-allocator/test))
(func $~lib/memory/memory.allocate (; 0 ;) (type $FUNCSIG$i) (result i32) (func $new-without-allocator/test (; 0 ;) (type $i) (result i32)
unreachable unreachable
) )
(func $new-without-allocator/test (; 1 ;) (type $i) (result i32) (func $null (; 1 ;) (type $v)
call $~lib/memory/memory.allocate
drop
i32.const 3
)
(func $null (; 2 ;) (type $v)
nop nop
) )
) )

View File

@ -78,11 +78,7 @@
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
get_local $1 get_local $1
) )
(func $~lib/memory/memory.allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/string/compareUnsafe (; 2 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
get_local $0
call $~lib/allocator/arena/__memory_allocate
)
(func $~lib/internal/string/compareUnsafe (; 3 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
get_local $0 get_local $0
@ -119,7 +115,7 @@
end end
get_local $4 get_local $4
) )
(func $~lib/string/String.__eq (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/string/String.__eq (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
get_local $0 get_local $0
i32.const 8 i32.const 8
@ -157,7 +153,7 @@
call $~lib/internal/string/compareUnsafe call $~lib/internal/string/compareUnsafe
i32.eqz i32.eqz
) )
(func $object-literal/bar (; 5 ;) (type $iv) (param $0 i32) (func $object-literal/bar (; 4 ;) (type $iv) (param $0 i32)
get_local $0 get_local $0
i32.load i32.load
i32.const 1 i32.const 1
@ -183,7 +179,27 @@
unreachable unreachable
end end
) )
(func $object-literal/bar2 (; 6 ;) (type $iv) (param $0 i32) (func $start (; 5 ;) (type $v)
(local $0 i32)
i32.const 80
set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset
set_global $~lib/allocator/arena/offset
i32.const 8
call $~lib/allocator/arena/__memory_allocate
tee_local $0
i32.const 1
i32.store
get_local $0
i32.const 8
i32.store offset=4
get_local $0
call $object-literal/bar
i32.const 4
call $~lib/allocator/arena/__memory_allocate
tee_local $0
i32.const 2
i32.store
get_local $0 get_local $0
i32.load i32.load
i32.const 2 i32.const 2
@ -196,8 +212,11 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
) i32.const 4
(func $object-literal/Foo2#test (; 7 ;) (type $iv) (param $0 i32) call $~lib/allocator/arena/__memory_allocate
tee_local $0
i32.const 3
i32.store
get_local $0 get_local $0
i32.load i32.load
i32.const 3 i32.const 3
@ -211,38 +230,7 @@
unreachable unreachable
end end
) )
(func $start (; 8 ;) (type $v) (func $null (; 6 ;) (type $v)
(local $0 i32)
i32.const 80
set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset
set_global $~lib/allocator/arena/offset
i32.const 8
call $~lib/memory/memory.allocate
tee_local $0
i32.const 1
i32.store
get_local $0
i32.const 8
i32.store offset=4
get_local $0
call $object-literal/bar
i32.const 4
call $~lib/memory/memory.allocate
tee_local $0
i32.const 2
i32.store
get_local $0
call $object-literal/bar2
i32.const 4
call $~lib/memory/memory.allocate
tee_local $0
i32.const 3
i32.store
get_local $0
call $object-literal/Foo2#test
)
(func $null (; 9 ;) (type $v)
nop nop
) )
) )

View File

@ -8,7 +8,6 @@
(export "table" (table $0)) (export "table" (table $0))
(export "fib" (func $recursive/fib)) (export "fib" (func $recursive/fib))
(func $recursive/fib (; 0 ;) (type $ii) (param $0 i32) (result i32) (func $recursive/fib (; 0 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
get_local $0 get_local $0
i32.const 1 i32.const 1
i32.le_s i32.le_s
@ -20,14 +19,10 @@
i32.const 1 i32.const 1
i32.sub i32.sub
call $recursive/fib call $recursive/fib
set_local $1
get_local $0 get_local $0
i32.const 2 i32.const 2
i32.sub i32.sub
call $recursive/fib call $recursive/fib
set_local $0
get_local $1
get_local $0
i32.add i32.add
) )
(func $null (; 1 ;) (type $v) (func $null (; 1 ;) (type $v)

View File

@ -20,7 +20,6 @@
(export "renamed_add" (func $export/add)) (export "renamed_add" (func $export/add))
(export "rerenamed_sub" (func $export/mul)) (export "rerenamed_sub" (func $export/mul))
(export "renamed_ns.two" (func $export/ns.two)) (export "renamed_ns.two" (func $export/ns.two))
(start $start)
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $0 get_local $0
get_local $1 get_local $1
@ -39,14 +38,4 @@
(func $export/ns.two (; 3 ;) (type $v) (func $export/ns.two (; 3 ;) (type $v)
nop nop
) )
(func $start (; 4 ;) (type $v)
i32.const 1
i32.const 2
call $export/add
drop
i32.const 3
i32.const 4
call $export/mul
drop
)
) )

View File

@ -1,9 +1,8 @@
(module (module
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(memory $0 0) (memory $0 0)
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $null) (elem (i32.const 0) $start)
(global $export/a i32 (i32.const 1)) (global $export/a i32 (i32.const 1))
(global $export/b i32 (i32.const 2)) (global $export/b i32 (i32.const 2))
(export "memory" (memory $0)) (export "memory" (memory $0))
@ -12,20 +11,7 @@
(export "renamed_a" (global $export/a)) (export "renamed_a" (global $export/a))
(export "renamed_b" (global $export/b)) (export "renamed_b" (global $export/b))
(export "renamed_renamed_b" (global $export/b)) (export "renamed_renamed_b" (global $export/b))
(start $start) (func $start (; 0 ;) (type $v)
(func $export/add (; 0 ;) (type $FUNCSIG$i) (result i32)
i32.const 3
)
(func $export/mul (; 1 ;) (type $FUNCSIG$i) (result i32)
i32.const 12
)
(func $start (; 2 ;) (type $v)
call $export/add
drop
call $export/mul
drop
)
(func $null (; 3 ;) (type $v)
nop nop
) )
) )

View File

@ -1,7 +1,6 @@
(module (module
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$v (func))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\0d\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s") (data (i32.const 8) "\0d\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s")
@ -12,34 +11,8 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $retain-i32/test (; 1 ;) (type $FUNCSIG$v) (func $start (; 1 ;) (type $v)
nop
)
(func $start (; 2 ;) (type $v)
(local $0 i32) (local $0 i32)
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
block $break|0 block $break|0
i32.const -128 i32.const -128
set_local $0 set_local $0
@ -48,18 +21,6 @@
i32.const 255 i32.const 255
i32.gt_s i32.gt_s
br_if $break|0 br_if $break|0
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
call $retain-i32/test
get_local $0 get_local $0
i32.const 1 i32.const 1
i32.add i32.add
@ -300,7 +261,7 @@
unreachable unreachable
end end
) )
(func $null (; 3 ;) (type $v) (func $null (; 2 ;) (type $v)
nop nop
) )
) )

View File

@ -1,16 +1,12 @@
(module (module
(type $v (func)) (type $v (func))
(type $FUNCSIG$v (func))
(memory $0 0) (memory $0 0)
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $null) (elem (i32.const 0) $null)
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $scoped/fn (; 0 ;) (type $FUNCSIG$v) (func $start (; 0 ;) (type $v)
nop
)
(func $start (; 1 ;) (type $v)
(local $0 i32) (local $0 i32)
block $break|0 block $break|0
loop $repeat|0 loop $repeat|0
@ -44,9 +40,8 @@
end end
unreachable unreachable
end end
call $scoped/fn
) )
(func $null (; 2 ;) (type $v) (func $null (; 1 ;) (type $v)
nop nop
) )
) )

View File

@ -1,5 +1,4 @@
(module (module
(type $i (func (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $v (func)) (type $v (func))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
@ -11,11 +10,8 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $static-this/Foo.getBar (; 1 ;) (type $i) (result i32) (func $start (; 1 ;) (type $v)
get_global $static-this/Foo.bar get_global $static-this/Foo.bar
)
(func $start (; 2 ;) (type $v)
call $static-this/Foo.getBar
i32.const 42 i32.const 42
i32.ne i32.ne
if if
@ -27,7 +23,7 @@
unreachable unreachable
end end
) )
(func $null (; 3 ;) (type $v) (func $null (; 2 ;) (type $v)
nop nop
) )
) )

View File

@ -6,7 +6,6 @@
(type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$v (func))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\16\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s") (data (i32.const 8) "\16\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s")
@ -1424,14 +1423,7 @@
end end
tee_local $0 tee_local $0
) )
(func $~lib/allocator/arena/__memory_free (; 6 ;) (type $FUNCSIG$v) (func $start (; 6 ;) (type $v)
nop
)
(func $~lib/allocator/arena/__memory_reset (; 7 ;) (type $v)
get_global $~lib/allocator/arena/startOffset
set_global $~lib/allocator/arena/offset
)
(func $start (; 8 ;) (type $v)
i32.const 56 i32.const 56
set_global $~lib/allocator/arena/startOffset set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset get_global $~lib/allocator/arena/startOffset
@ -1533,9 +1525,8 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
call $~lib/allocator/arena/__memory_free get_global $~lib/allocator/arena/startOffset
call $~lib/allocator/arena/__memory_free set_global $~lib/allocator/arena/offset
call $~lib/allocator/arena/__memory_reset
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
set_global $std/allocator_arena/ptr1 set_global $std/allocator_arena/ptr1
get_global $std/allocator_arena/ptr1 get_global $std/allocator_arena/ptr1
@ -1550,7 +1541,7 @@
unreachable unreachable
end end
) )
(func $null (; 9 ;) (type $v) (func $null (; 7 ;) (type $v)
nop nop
) )
) )

View File

@ -1,6 +1,5 @@
(module (module
(type $ii (func (param i32) (result i32))) (type $ii (func (param i32) (result i32)))
(type $iii (func (param i32 i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32)))
@ -18,8 +17,9 @@
(export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall)) (export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall))
(export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess)) (export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess))
(export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall)) (export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall))
(func $~lib/array/Array<Array<i32>>#__get (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/array-access/i32ArrayArrayElementAccess (; 1 ;) (type $ii) (param $0 i32) (result i32)
get_local $1 i32.const 1
i32.const 0
get_local $0 get_local $0
i32.load i32.load
tee_local $0 tee_local $0
@ -29,9 +29,20 @@
i32.lt_u i32.lt_u
if (result i32) if (result i32)
get_local $0 get_local $0
get_local $1 i32.load offset=8
else
unreachable
end
tee_local $0
i32.load
tee_local $0
i32.load
i32.const 2 i32.const 2
i32.shl i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.const 4
i32.add i32.add
i32.load offset=8 i32.load offset=8
else else
@ -39,20 +50,25 @@
end end
tee_local $0 tee_local $0
) )
(func $std/array-access/i32ArrayArrayElementAccess (; 2 ;) (type $ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayPropertyAccess (; 2 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.const 0 i32.const 0
call $~lib/array/Array<Array<i32>>#__get
i32.const 1
call $~lib/array/Array<Array<i32>>#__get
)
(func $std/array-access/stringArrayPropertyAccess (; 3 ;) (type $ii) (param $0 i32) (result i32)
get_local $0 get_local $0
i32.const 0 i32.load
call $~lib/array/Array<Array<i32>>#__get tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.load offset=8
else
unreachable
end
tee_local $0
i32.load i32.load
) )
(func $~lib/internal/string/compareUnsafe (; 4 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (func $~lib/internal/string/compareUnsafe (; 3 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32) (local $4 i32)
get_local $0 get_local $0
get_local $1 get_local $1
@ -92,7 +108,7 @@
end end
get_local $4 get_local $4
) )
(func $~lib/string/String#startsWith (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/string/String#startsWith (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -132,29 +148,93 @@
call $~lib/internal/string/compareUnsafe call $~lib/internal/string/compareUnsafe
i32.eqz i32.eqz
) )
(func $std/array-access/stringArrayMethodCall (; 6 ;) (type $ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayMethodCall (; 5 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.const 0 i32.const 0
call $~lib/array/Array<Array<i32>>#__get get_local $0
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.load offset=8
else
unreachable
end
tee_local $0
call $~lib/string/String#startsWith call $~lib/string/String#startsWith
) )
(func $std/array-access/stringArrayArrayPropertyAccess (; 7 ;) (type $ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayArrayPropertyAccess (; 6 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.const 0
call $~lib/array/Array<Array<i32>>#__get
i32.const 1 i32.const 1
call $~lib/array/Array<Array<i32>>#__get i32.const 0
get_local $0
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.load offset=8
else
unreachable
end
tee_local $0
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.const 4
i32.add
i32.load offset=8
else
unreachable
end
tee_local $0
i32.load i32.load
) )
(func $std/array-access/stringArrayArrayMethodCall (; 8 ;) (type $ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayArrayMethodCall (; 7 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.const 0
call $~lib/array/Array<Array<i32>>#__get
i32.const 1 i32.const 1
call $~lib/array/Array<Array<i32>>#__get i32.const 0
get_local $0
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.load offset=8
else
unreachable
end
tee_local $0
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.const 4
i32.add
i32.load offset=8
else
unreachable
end
tee_local $0
call $~lib/string/String#startsWith call $~lib/string/String#startsWith
) )
(func $null (; 9 ;) (type $v) (func $null (; 8 ;) (type $v)
nop nop
) )
) )

View File

@ -1,8 +1,6 @@
(module (module
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $iii (func (param i32 i32) (result i32)))
(type $ii (func (param i32) (result i32))) (type $ii (func (param i32) (result i32)))
(type $iiiv (func (param i32 i32 i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$i (func (result i32)))
@ -31,55 +29,7 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $~lib/array/Array<i8>#__get (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32)
get_local $1
get_local $0
i32.load
tee_local $0
i32.load
i32.lt_u
if (result i32)
get_local $0
get_local $1
i32.add
i32.load8_s offset=8
else
unreachable
end
tee_local $0
)
(func $~lib/array/Array<i32>#__get (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $1
get_local $0
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
get_local $1
i32.const 2
i32.shl
i32.add
i32.load offset=8
else
unreachable
end
tee_local $0
)
(func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
get_local $0
i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
)
(func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -141,7 +91,7 @@
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
get_local $1 get_local $1
) )
(func $~lib/internal/arraybuffer/allocateUnsafe (; 5 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
get_local $0 get_local $0
i32.const 1073741816 i32.const 1073741816
@ -154,19 +104,21 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 1
i32.const 32
get_local $0 get_local $0
call $~lib/internal/arraybuffer/computeSize i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
tee_local $1 tee_local $1
get_local $0 get_local $0
i32.store i32.store
get_local $1 get_local $1
) )
(func $~lib/memory/memory.allocate (; 6 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/memory/memset (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
get_local $0
call $~lib/allocator/arena/__memory_allocate
)
(func $~lib/internal/memory/memset (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
get_local $1 get_local $1
i32.eqz i32.eqz
@ -385,14 +337,14 @@
end end
end end
) )
(func $~lib/array/Array<i8>#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) (func $~lib/array/Array<i8>#constructor (; 4 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32) (local $0 i32)
(local $1 i32) (local $1 i32)
i32.const 3 i32.const 3
call $~lib/internal/arraybuffer/allocateUnsafe call $~lib/internal/arraybuffer/allocateUnsafe
set_local $1 set_local $1
i32.const 8 i32.const 8
call $~lib/memory/memory.allocate call $~lib/allocator/arena/__memory_allocate
tee_local $0 tee_local $0
i32.const 0 i32.const 0
i32.store i32.store
@ -412,22 +364,14 @@
call $~lib/internal/memory/memset call $~lib/internal/memory/memset
get_local $0 get_local $0
) )
(func $~lib/array/Array<i8>#__unchecked_set (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/array/Array<i32>#constructor (; 5 ;) (type $FUNCSIG$i) (result i32)
get_local $0
i32.load
get_local $1
i32.add
get_local $2
i32.store8 offset=8
)
(func $~lib/array/Array<i32>#constructor (; 10 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32) (local $0 i32)
(local $1 i32) (local $1 i32)
i32.const 12 i32.const 12
call $~lib/internal/arraybuffer/allocateUnsafe call $~lib/internal/arraybuffer/allocateUnsafe
set_local $1 set_local $1
i32.const 8 i32.const 8
call $~lib/memory/memory.allocate call $~lib/allocator/arena/__memory_allocate
tee_local $0 tee_local $0
i32.const 0 i32.const 0
i32.store i32.store
@ -447,21 +391,7 @@
call $~lib/internal/memory/memset call $~lib/internal/memory/memset
get_local $0 get_local $0
) )
(func $~lib/array/Array<i32>#__unchecked_set (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $start (; 6 ;) (type $v)
get_local $0
i32.load
get_local $1
i32.const 2
i32.shl
i32.add
get_local $2
i32.store offset=8
)
(func $std/array-literal/RefWithCtor#constructor (; 12 ;) (type $FUNCSIG$i) (result i32)
i32.const 0
call $~lib/memory/memory.allocate
)
(func $start (; 13 ;) (type $v)
(local $0 i32) (local $0 i32)
(local $1 i32) (local $1 i32)
i32.const 232 i32.const 232
@ -480,9 +410,19 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 24
i32.const 0 i32.const 0
call $~lib/array/Array<i8>#__get i32.const 24
i32.load
tee_local $0
i32.load
i32.lt_u
if (result i32)
get_local $0
i32.load8_s offset=8
else
unreachable
end
tee_local $0
i32.const 255 i32.const 255
i32.and i32.and
if if
@ -493,9 +433,21 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 24
i32.const 1 i32.const 1
call $~lib/array/Array<i8>#__get i32.const 24
i32.load
tee_local $0
i32.load
i32.lt_u
if (result i32)
get_local $0
i32.const 1
i32.add
i32.load8_s offset=8
else
unreachable
end
tee_local $0
i32.const 255 i32.const 255
i32.and i32.and
i32.const 1 i32.const 1
@ -508,9 +460,21 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 24
i32.const 2 i32.const 2
call $~lib/array/Array<i8>#__get i32.const 24
i32.load
tee_local $0
i32.load
i32.lt_u
if (result i32)
get_local $0
i32.const 2
i32.add
i32.load8_s offset=8
else
unreachable
end
tee_local $0
i32.const 255 i32.const 255
i32.and i32.and
i32.const 2 i32.const 2
@ -535,9 +499,21 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 112
i32.const 0 i32.const 0
call $~lib/array/Array<i32>#__get i32.const 112
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.load offset=8
else
unreachable
end
tee_local $0
if if
i32.const 0 i32.const 0
i32.const 32 i32.const 32
@ -546,9 +522,23 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 112
i32.const 1 i32.const 1
call $~lib/array/Array<i32>#__get i32.const 112
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.const 4
i32.add
i32.load offset=8
else
unreachable
end
tee_local $0
i32.const 1 i32.const 1
i32.ne i32.ne
if if
@ -559,9 +549,23 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 112
i32.const 2 i32.const 2
call $~lib/array/Array<i32>#__get i32.const 112
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.const 8
i32.add
i32.load offset=8
else
unreachable
end
tee_local $0
i32.const 2 i32.const 2
i32.ne i32.ne
if if
@ -584,25 +588,29 @@
end end
call $~lib/array/Array<i8>#constructor call $~lib/array/Array<i8>#constructor
tee_local $0 tee_local $0
i32.const 0 i32.load
get_global $std/array-literal/i get_global $std/array-literal/i
call $~lib/array/Array<i8>#__unchecked_set i32.store8 offset=8
get_global $std/array-literal/i get_global $std/array-literal/i
i32.const 1 i32.const 1
i32.add i32.add
set_global $std/array-literal/i set_global $std/array-literal/i
get_local $0 get_local $0
i32.load
i32.const 1 i32.const 1
i32.add
get_global $std/array-literal/i get_global $std/array-literal/i
call $~lib/array/Array<i8>#__unchecked_set i32.store8 offset=8
get_global $std/array-literal/i get_global $std/array-literal/i
i32.const 1 i32.const 1
i32.add i32.add
set_global $std/array-literal/i set_global $std/array-literal/i
get_local $0 get_local $0
i32.load
i32.const 2 i32.const 2
i32.add
get_global $std/array-literal/i get_global $std/array-literal/i
call $~lib/array/Array<i8>#__unchecked_set i32.store8 offset=8
get_local $0 get_local $0
set_global $std/array-literal/dynamicArrayI8 set_global $std/array-literal/dynamicArrayI8
get_global $std/array-literal/dynamicArrayI8 get_global $std/array-literal/dynamicArrayI8
@ -617,9 +625,19 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
get_global $std/array-literal/dynamicArrayI8
i32.const 0 i32.const 0
call $~lib/array/Array<i8>#__get get_global $std/array-literal/dynamicArrayI8
i32.load
tee_local $0
i32.load
i32.lt_u
if (result i32)
get_local $0
i32.load8_s offset=8
else
unreachable
end
tee_local $0
i32.const 255 i32.const 255
i32.and i32.and
if if
@ -630,9 +648,21 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
get_global $std/array-literal/dynamicArrayI8
i32.const 1 i32.const 1
call $~lib/array/Array<i8>#__get get_global $std/array-literal/dynamicArrayI8
i32.load
tee_local $0
i32.load
i32.lt_u
if (result i32)
get_local $0
i32.const 1
i32.add
i32.load8_s offset=8
else
unreachable
end
tee_local $0
i32.const 255 i32.const 255
i32.and i32.and
i32.const 1 i32.const 1
@ -645,9 +675,21 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
get_global $std/array-literal/dynamicArrayI8
i32.const 2 i32.const 2
call $~lib/array/Array<i8>#__get get_global $std/array-literal/dynamicArrayI8
i32.load
tee_local $0
i32.load
i32.lt_u
if (result i32)
get_local $0
i32.const 2
i32.add
i32.load8_s offset=8
else
unreachable
end
tee_local $0
i32.const 255 i32.const 255
i32.and i32.and
i32.const 2 i32.const 2
@ -664,25 +706,29 @@
set_global $std/array-literal/i set_global $std/array-literal/i
call $~lib/array/Array<i32>#constructor call $~lib/array/Array<i32>#constructor
tee_local $0 tee_local $0
i32.const 0 i32.load
get_global $std/array-literal/i get_global $std/array-literal/i
call $~lib/array/Array<i32>#__unchecked_set i32.store offset=8
get_global $std/array-literal/i get_global $std/array-literal/i
i32.const 1 i32.const 1
i32.add i32.add
set_global $std/array-literal/i set_global $std/array-literal/i
get_local $0 get_local $0
i32.const 1 i32.load
i32.const 4
i32.add
get_global $std/array-literal/i get_global $std/array-literal/i
call $~lib/array/Array<i32>#__unchecked_set i32.store offset=8
get_global $std/array-literal/i get_global $std/array-literal/i
i32.const 1 i32.const 1
i32.add i32.add
set_global $std/array-literal/i set_global $std/array-literal/i
get_local $0 get_local $0
i32.const 2 i32.load
i32.const 8
i32.add
get_global $std/array-literal/i get_global $std/array-literal/i
call $~lib/array/Array<i32>#__unchecked_set i32.store offset=8
get_local $0 get_local $0
set_global $std/array-literal/dynamicArrayI32 set_global $std/array-literal/dynamicArrayI32
get_global $std/array-literal/dynamicArrayI32 get_global $std/array-literal/dynamicArrayI32
@ -697,9 +743,21 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
get_global $std/array-literal/dynamicArrayI32
i32.const 0 i32.const 0
call $~lib/array/Array<i32>#__get get_global $std/array-literal/dynamicArrayI32
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.load offset=8
else
unreachable
end
tee_local $0
if if
i32.const 0 i32.const 0
i32.const 32 i32.const 32
@ -708,9 +766,23 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
get_global $std/array-literal/dynamicArrayI32
i32.const 1 i32.const 1
call $~lib/array/Array<i32>#__get get_global $std/array-literal/dynamicArrayI32
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.const 4
i32.add
i32.load offset=8
else
unreachable
end
tee_local $0
i32.const 1 i32.const 1
i32.ne i32.ne
if if
@ -721,9 +793,23 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
get_global $std/array-literal/dynamicArrayI32
i32.const 2 i32.const 2
call $~lib/array/Array<i32>#__get get_global $std/array-literal/dynamicArrayI32
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.const 8
i32.add
i32.load offset=8
else
unreachable
end
tee_local $0
i32.const 2 i32.const 2
i32.ne i32.ne
if if
@ -735,29 +821,33 @@
unreachable unreachable
end end
call $~lib/array/Array<i32>#constructor call $~lib/array/Array<i32>#constructor
set_local $0
i32.const 0
call $~lib/allocator/arena/__memory_allocate
set_local $1 set_local $1
i32.const 0
call $~lib/memory/memory.allocate
set_local $0
get_local $1
i32.const 0
get_local $0 get_local $0
call $~lib/array/Array<i32>#__unchecked_set i32.load
get_local $1
i32.store offset=8
i32.const 0 i32.const 0
call $~lib/memory/memory.allocate call $~lib/allocator/arena/__memory_allocate
set_local $0 set_local $1
get_local $1
i32.const 1
get_local $0 get_local $0
call $~lib/array/Array<i32>#__unchecked_set i32.load
i32.const 4
i32.add
get_local $1
i32.store offset=8
i32.const 0 i32.const 0
call $~lib/memory/memory.allocate call $~lib/allocator/arena/__memory_allocate
set_local $0 set_local $1
get_local $1
i32.const 2
get_local $0 get_local $0
call $~lib/array/Array<i32>#__unchecked_set i32.load
i32.const 8
i32.add
get_local $1 get_local $1
i32.store offset=8
get_local $0
set_global $std/array-literal/dynamicArrayRef set_global $std/array-literal/dynamicArrayRef
get_global $std/array-literal/dynamicArrayRef get_global $std/array-literal/dynamicArrayRef
i32.load offset=4 i32.load offset=4
@ -773,24 +863,31 @@
end end
call $~lib/array/Array<i32>#constructor call $~lib/array/Array<i32>#constructor
set_local $0 set_local $0
call $std/array-literal/RefWithCtor#constructor
set_local $1
get_local $0
i32.const 0 i32.const 0
get_local $1 call $~lib/allocator/arena/__memory_allocate
call $~lib/array/Array<i32>#__unchecked_set
call $std/array-literal/RefWithCtor#constructor
set_local $1 set_local $1
get_local $0 get_local $0
i32.const 1 i32.load
get_local $1 get_local $1
call $~lib/array/Array<i32>#__unchecked_set i32.store offset=8
call $std/array-literal/RefWithCtor#constructor i32.const 0
call $~lib/allocator/arena/__memory_allocate
set_local $1 set_local $1
get_local $0 get_local $0
i32.const 2 i32.load
i32.const 4
i32.add
get_local $1 get_local $1
call $~lib/array/Array<i32>#__unchecked_set i32.store offset=8
i32.const 0
call $~lib/allocator/arena/__memory_allocate
set_local $1
get_local $0
i32.load
i32.const 8
i32.add
get_local $1
i32.store offset=8
get_local $0 get_local $0
set_global $std/array-literal/dynamicArrayRefWithCtor set_global $std/array-literal/dynamicArrayRefWithCtor
get_global $std/array-literal/dynamicArrayRefWithCtor get_global $std/array-literal/dynamicArrayRefWithCtor
@ -806,7 +903,7 @@
unreachable unreachable
end end
) )
(func $null (; 14 ;) (type $v) (func $null (; 7 ;) (type $v)
nop nop
) )
) )

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,6 @@
(type $iiiv (func (param i32 i32 i32))) (type $iiiv (func (param i32 i32 i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
@ -22,17 +21,7 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $~lib/internal/arraybuffer/computeSize (; 1 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
get_local $0
i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
)
(func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -94,7 +83,7 @@
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
get_local $1 get_local $1
) )
(func $~lib/internal/arraybuffer/allocateUnsafe (; 3 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
get_local $0 get_local $0
i32.const 1073741816 i32.const 1073741816
@ -107,15 +96,21 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 1
i32.const 32
get_local $0 get_local $0
call $~lib/internal/arraybuffer/computeSize i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
tee_local $1 tee_local $1
get_local $0 get_local $0
i32.store i32.store
get_local $1 get_local $1
) )
(func $~lib/internal/memory/memset (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (func $~lib/internal/memory/memset (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
get_local $1 get_local $1
i32.eqz i32.eqz
@ -334,18 +329,7 @@
end end
end end
) )
(func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$i) (result i32) (func $~lib/internal/memory/memcpy (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $0 i32)
i32.const 8
call $~lib/internal/arraybuffer/allocateUnsafe
tee_local $0
i32.const 8
i32.add
i32.const 8
call $~lib/internal/memory/memset
get_local $0
)
(func $~lib/internal/memory/memcpy (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
@ -1249,7 +1233,7 @@
i32.store8 i32.store8
end end
) )
(func $~lib/internal/memory/memmove (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/internal/memory/memmove (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
get_local $0 get_local $0
@ -1449,31 +1433,31 @@
end end
end end
) )
(func $~lib/arraybuffer/ArrayBuffer#slice (; 8 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/arraybuffer/ArrayBuffer#slice (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
get_local $0 get_local $0
i32.load i32.load
set_local $4 set_local $3
get_local $1 get_local $1
i32.const 0 i32.const 0
i32.lt_s i32.lt_s
if (result i32) if (result i32)
get_local $4 get_local $3
get_local $1 get_local $1
i32.add i32.add
tee_local $3 tee_local $4
i32.const 0 i32.const 0
get_local $3 get_local $4
i32.const 0 i32.const 0
i32.gt_s i32.gt_s
select select
else else
get_local $1 get_local $1
tee_local $3 tee_local $4
get_local $4 get_local $3
get_local $1
get_local $3 get_local $3
get_local $4
i32.lt_s i32.lt_s
select select
end end
@ -1482,48 +1466,49 @@
i32.const 0 i32.const 0
i32.lt_s i32.lt_s
if (result i32) if (result i32)
get_local $4 get_local $3
get_local $2 get_local $2
i32.add i32.add
tee_local $3 tee_local $4
i32.const 0 i32.const 0
get_local $3 get_local $4
i32.const 0 i32.const 0
i32.gt_s i32.gt_s
select select
else else
get_local $2 get_local $2
tee_local $3 tee_local $4
get_local $4 get_local $3
get_local $2
get_local $3 get_local $3
get_local $4
i32.lt_s i32.lt_s
select select
end end
tee_local $2 tee_local $2
get_local $1 get_local $1
i32.sub i32.sub
tee_local $3 tee_local $4
i32.const 0 i32.const 0
get_local $3 get_local $4
i32.const 0 i32.const 0
i32.gt_s i32.gt_s
select select
tee_local $3
call $~lib/internal/arraybuffer/allocateUnsafe
tee_local $2 tee_local $2
call $~lib/internal/arraybuffer/allocateUnsafe
tee_local $3
i32.const 8 i32.const 8
i32.add i32.add
tee_local $4
get_local $0 get_local $0
i32.const 8 i32.const 8
i32.add i32.add
get_local $1 get_local $1
i32.add i32.add
get_local $3
call $~lib/internal/memory/memmove
get_local $2 get_local $2
call $~lib/internal/memory/memmove
get_local $3
) )
(func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
block $2of2 block $2of2
block $1of2 block $1of2
@ -1545,19 +1530,20 @@
get_local $2 get_local $2
call $~lib/arraybuffer/ArrayBuffer#slice call $~lib/arraybuffer/ArrayBuffer#slice
) )
(func $~lib/arraybuffer/ArrayBuffer#get:data (; 10 ;) (type $ii) (param $0 i32) (result i32) (func $start (; 8 ;) (type $v)
get_local $0
i32.const 8
i32.add
)
(func $start (; 11 ;) (type $v)
(local $0 i32) (local $0 i32)
(local $1 i32)
i32.const 160 i32.const 160
set_global $~lib/allocator/arena/startOffset set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset get_global $~lib/allocator/arena/startOffset
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
call $~lib/arraybuffer/ArrayBuffer#constructor i32.const 8
call $~lib/internal/arraybuffer/allocateUnsafe
tee_local $0
i32.const 8
i32.add
i32.const 8
call $~lib/internal/memory/memset
get_local $0
set_global $std/arraybuffer/buffer set_global $std/arraybuffer/buffer
get_global $std/arraybuffer/buffer get_global $std/arraybuffer/buffer
i32.load i32.load
@ -1590,13 +1576,9 @@
unreachable unreachable
end end
get_global $std/arraybuffer/sliced get_global $std/arraybuffer/sliced
call $~lib/arraybuffer/ArrayBuffer#get:data
set_local $0
get_global $std/arraybuffer/buffer get_global $std/arraybuffer/buffer
call $~lib/arraybuffer/ArrayBuffer#get:data i32.const 0
set_local $1 i32.add
get_local $0
get_local $1
i32.eq i32.eq
if if
i32.const 0 i32.const 0
@ -1748,7 +1730,7 @@
unreachable unreachable
end end
) )
(func $null (; 12 ;) (type $v) (func $null (; 9 ;) (type $v)
nop nop
) )
) )

View File

@ -1,7 +1,6 @@
(module (module
(type $ii (func (param i32) (result i32))) (type $ii (func (param i32) (result i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(memory $0 0) (memory $0 0)
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $null) (elem (i32.const 0) $null)
@ -83,102 +82,83 @@
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
get_local $1 get_local $1
) )
(func $~lib/memory/memory.allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (func $start (; 1 ;) (type $v)
get_local $0
call $~lib/allocator/arena/__memory_allocate
)
(func $std/constructor/EmptyCtor#constructor (; 2 ;) (type $FUNCSIG$i) (result i32)
i32.const 0
call $~lib/memory/memory.allocate
)
(func $std/constructor/EmptyCtorWithFieldInit#constructor (; 3 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
i32.const 4
call $~lib/memory/memory.allocate
tee_local $0
i32.const 1
i32.store
get_local $0
)
(func $std/constructor/EmptyCtorWithFieldNoInit#constructor (; 4 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
i32.const 4
call $~lib/memory/memory.allocate
tee_local $0
i32.const 0
i32.store
get_local $0
)
(func $std/constructor/CtorReturns#constructor (; 5 ;) (type $FUNCSIG$i) (result i32)
i32.const 0
call $~lib/allocator/arena/__memory_allocate
)
(func $std/constructor/CtorConditionallyReturns#constructor (; 6 ;) (type $FUNCSIG$i) (result i32)
get_global $std/constructor/b
if
i32.const 0
call $~lib/allocator/arena/__memory_allocate
return
end
i32.const 0
call $~lib/memory/memory.allocate
)
(func $std/constructor/CtorConditionallyAllocates#constructor (; 7 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
get_global $std/constructor/b
if
i32.const 0
call $~lib/memory/memory.allocate
set_local $0
end
get_local $0
i32.eqz
if
i32.const 0
call $~lib/memory/memory.allocate
set_local $0
end
get_local $0
)
(func $start (; 8 ;) (type $v)
(local $0 i32) (local $0 i32)
i32.const 8 i32.const 8
set_global $~lib/allocator/arena/startOffset set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset get_global $~lib/allocator/arena/startOffset
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
call $std/constructor/EmptyCtor#constructor i32.const 0
call $~lib/allocator/arena/__memory_allocate
set_global $std/constructor/emptyCtor set_global $std/constructor/emptyCtor
call $std/constructor/EmptyCtorWithFieldInit#constructor i32.const 4
call $~lib/allocator/arena/__memory_allocate
tee_local $0
i32.const 1
i32.store
get_local $0
set_global $std/constructor/emptyCtorWithFieldInit set_global $std/constructor/emptyCtorWithFieldInit
call $std/constructor/EmptyCtorWithFieldNoInit#constructor i32.const 4
call $~lib/allocator/arena/__memory_allocate
tee_local $0
i32.const 0
i32.store
get_local $0
set_global $std/constructor/emptyCtorWithFieldNoInit set_global $std/constructor/emptyCtorWithFieldNoInit
i32.const 0 i32.const 0
call $~lib/memory/memory.allocate call $~lib/allocator/arena/__memory_allocate
set_global $std/constructor/none set_global $std/constructor/none
i32.const 4 i32.const 4
call $~lib/memory/memory.allocate call $~lib/allocator/arena/__memory_allocate
tee_local $0 tee_local $0
i32.const 1 i32.const 1
i32.store i32.store
get_local $0 get_local $0
set_global $std/constructor/justFieldInit set_global $std/constructor/justFieldInit
i32.const 4 i32.const 4
call $~lib/memory/memory.allocate call $~lib/allocator/arena/__memory_allocate
tee_local $0 tee_local $0
i32.const 0 i32.const 0
i32.store i32.store
get_local $0 get_local $0
set_global $std/constructor/justFieldNoInit set_global $std/constructor/justFieldNoInit
call $std/constructor/CtorReturns#constructor i32.const 0
call $~lib/allocator/arena/__memory_allocate
set_global $std/constructor/ctorReturns set_global $std/constructor/ctorReturns
call $std/constructor/CtorConditionallyReturns#constructor block $__inlined_func$std/constructor/CtorConditionallyReturns#constructor (result i32)
get_global $std/constructor/b
if
i32.const 0
call $~lib/allocator/arena/__memory_allocate
br $__inlined_func$std/constructor/CtorConditionallyReturns#constructor
end
i32.const 0
call $~lib/allocator/arena/__memory_allocate
end
tee_local $0
set_global $std/constructor/ctorConditionallyReturns set_global $std/constructor/ctorConditionallyReturns
call $std/constructor/EmptyCtor#constructor i32.const 0
call $~lib/allocator/arena/__memory_allocate
set_global $std/constructor/ctorAllocates set_global $std/constructor/ctorAllocates
call $std/constructor/CtorConditionallyAllocates#constructor i32.const 0
set_local $0
get_global $std/constructor/b
if
i32.const 0
call $~lib/allocator/arena/__memory_allocate
set_local $0
end
get_local $0
i32.eqz
if
i32.const 0
call $~lib/allocator/arena/__memory_allocate
set_local $0
end
get_local $0
set_global $std/constructor/ctorConditionallyAllocates set_global $std/constructor/ctorConditionallyAllocates
) )
(func $null (; 9 ;) (type $v) (func $null (; 2 ;) (type $v)
nop nop
) )
) )

View File

@ -8,7 +8,6 @@
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $i (func (result i32))) (type $i (func (result i32)))
(type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$v (func))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 16) "\01") (data (i32.const 16) "\01")
@ -39,60 +38,37 @@
get_local $0 get_local $0
call $~lib/collector/itcm/__gc_mark call $~lib/collector/itcm/__gc_mark
) )
(func $~lib/collector/itcm/ManagedObject#get:color (; 2 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/collector/itcm/ManagedObjectList#push (; 2 ;) (type $iiv) (param $0 i32) (param $1 i32)
get_local $0
i32.load
i32.const 3
i32.and
)
(func $~lib/collector/itcm/ManagedObject#get:next (; 3 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.load
i32.const -4
i32.and
)
(func $~lib/collector/itcm/ManagedObject#set:next (; 4 ;) (type $iiv) (param $0 i32) (param $1 i32)
get_local $0
get_local $1
get_local $0
i32.load
i32.const 3
i32.and
i32.or
i32.store
)
(func $~lib/collector/itcm/ManagedObject#unlink (; 5 ;) (type $iv) (param $0 i32)
(local $1 i32)
get_local $0
call $~lib/collector/itcm/ManagedObject#get:next
tee_local $1
get_local $0
i32.load offset=4
tee_local $0
i32.store offset=4
get_local $0
get_local $1
call $~lib/collector/itcm/ManagedObject#set:next
)
(func $~lib/collector/itcm/ManagedObjectList#push (; 6 ;) (type $iiv) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
get_local $0 get_local $0
i32.load offset=4 i32.load offset=4
set_local $2 set_local $2
get_local $1 get_local $1
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObject#set:next get_local $1
i32.load
i32.const 3
i32.and
i32.or
i32.store
get_local $1 get_local $1
get_local $2 get_local $2
i32.store offset=4 i32.store offset=4
get_local $2 get_local $2
get_local $1 get_local $1
call $~lib/collector/itcm/ManagedObject#set:next get_local $2
i32.load
i32.const 3
i32.and
i32.or
i32.store
get_local $0 get_local $0
get_local $1 get_local $1
i32.store offset=4 i32.store offset=4
) )
(func $~lib/collector/itcm/ManagedObject#makeGray (; 7 ;) (type $iv) (param $0 i32) (func $~lib/collector/itcm/ManagedObject#makeGray (; 3 ;) (type $iv) (param $0 i32)
(local $1 i32)
(local $2 i32)
get_local $0 get_local $0
get_global $~lib/collector/itcm/iter get_global $~lib/collector/itcm/iter
i32.eq i32.eq
@ -102,7 +78,22 @@
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
end end
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObject#unlink i32.load
i32.const -4
i32.and
tee_local $2
get_local $0
i32.load offset=4
tee_local $1
i32.store offset=4
get_local $1
get_local $2
get_local $1
i32.load
i32.const 3
i32.and
i32.or
i32.store
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObjectList#push call $~lib/collector/itcm/ManagedObjectList#push
@ -115,7 +106,7 @@
i32.or i32.or
i32.store i32.store
) )
(func $~lib/collector/itcm/__gc_mark (; 8 ;) (type $iv) (param $0 i32) (func $~lib/collector/itcm/__gc_mark (; 4 ;) (type $iv) (param $0 i32)
(local $1 i32) (local $1 i32)
get_local $0 get_local $0
if if
@ -123,7 +114,9 @@
i32.const 16 i32.const 16
i32.sub i32.sub
tee_local $1 tee_local $1
call $~lib/collector/itcm/ManagedObject#get:color i32.load
i32.const 3
i32.and
get_global $~lib/collector/itcm/white get_global $~lib/collector/itcm/white
i32.eq i32.eq
if if
@ -132,7 +125,7 @@
end end
end end
) )
(func $~lib/array/Array<Foo>~gc (; 9 ;) (type $iv) (param $0 i32) (func $~lib/array/Array<Foo>~gc (; 5 ;) (type $iv) (param $0 i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
get_local $0 get_local $0
@ -162,7 +155,7 @@
end end
end end
) )
(func $~lib/allocator/arena/__memory_allocate (; 10 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -224,28 +217,10 @@
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
get_local $1 get_local $1
) )
(func $~lib/collector/itcm/ManagedObjectList#clear (; 11 ;) (type $iv) (param $0 i32) (func $~lib/allocator/arena/__memory_free (; 7 ;) (type $iv) (param $0 i32)
get_local $0
get_local $0
i32.store
get_local $0
get_local $0
i32.store offset=4
)
(func $~lib/collector/itcm/ManagedObject#set:color (; 12 ;) (type $iiv) (param $0 i32) (param $1 i32)
get_local $0
get_local $0
i32.load
i32.const -4
i32.and
get_local $1
i32.or
i32.store
)
(func $~lib/allocator/arena/__memory_free (; 13 ;) (type $iv) (param $0 i32)
nop nop
) )
(func $~lib/collector/itcm/step (; 14 ;) (type $v) (func $~lib/collector/itcm/step (; 8 ;) (type $v)
(local $0 i32) (local $0 i32)
block $break|0 block $break|0
block $case3|0 block $case3|0
@ -264,34 +239,46 @@
end end
i32.const 16 i32.const 16
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
tee_local $0
set_global $~lib/collector/itcm/fromSpace set_global $~lib/collector/itcm/fromSpace
get_global $~lib/collector/itcm/fromSpace get_global $~lib/collector/itcm/fromSpace
i32.const -1 i32.const -1
i32.store offset=8 i32.store offset=8
get_global $~lib/collector/itcm/fromSpace get_global $~lib/collector/itcm/fromSpace
call $~lib/collector/itcm/ManagedObjectList#clear tee_local $0
get_local $0
i32.store
get_local $0
get_local $0
i32.store offset=4
i32.const 16 i32.const 16
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
tee_local $0
set_global $~lib/collector/itcm/toSpace set_global $~lib/collector/itcm/toSpace
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
i32.const -1 i32.const -1
i32.store offset=8 i32.store offset=8
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
call $~lib/collector/itcm/ManagedObjectList#clear tee_local $0
get_local $0
i32.store
get_local $0
get_local $0
i32.store offset=4
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
i32.const 1 i32.const 1
set_global $~lib/collector/itcm/state set_global $~lib/collector/itcm/state
end end
call $~iterateRoots get_global $std/gc-array/arr
i32.const 3
call_indirect (type $iv)
i32.const 2 i32.const 2
set_global $~lib/collector/itcm/state set_global $~lib/collector/itcm/state
br $break|0 br $break|0
end end
get_global $~lib/collector/itcm/iter get_global $~lib/collector/itcm/iter
call $~lib/collector/itcm/ManagedObject#get:next i32.load
i32.const -4
i32.and
tee_local $0 tee_local $0
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
i32.ne i32.ne
@ -299,9 +286,14 @@
get_local $0 get_local $0
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
get_local $0 get_local $0
get_local $0
i32.load
i32.const -4
i32.and
get_global $~lib/collector/itcm/white get_global $~lib/collector/itcm/white
i32.eqz i32.eqz
call $~lib/collector/itcm/ManagedObject#set:color i32.or
i32.store
i32.const 1 i32.const 1
set_global $~argc set_global $~argc
get_local $0 get_local $0
@ -311,9 +303,13 @@
i32.load offset=8 i32.load offset=8
call_indirect (type $iv) call_indirect (type $iv)
else else
call $~iterateRoots get_global $std/gc-array/arr
i32.const 3
call_indirect (type $iv)
get_global $~lib/collector/itcm/iter get_global $~lib/collector/itcm/iter
call $~lib/collector/itcm/ManagedObject#get:next i32.load
i32.const -4
i32.and
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
i32.eq i32.eq
if if
@ -327,7 +323,9 @@
i32.eqz i32.eqz
set_global $~lib/collector/itcm/white set_global $~lib/collector/itcm/white
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObject#get:next i32.load
i32.const -4
i32.and
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
i32.const 3 i32.const 3
set_global $~lib/collector/itcm/state set_global $~lib/collector/itcm/state
@ -341,24 +339,24 @@
i32.ne i32.ne
if if
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObject#get:next i32.load
i32.const -4
i32.and
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
get_local $0
i32.const 180
i32.ge_u
if
get_local $0
call $~lib/allocator/arena/__memory_free
end
else else
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
call $~lib/collector/itcm/ManagedObjectList#clear tee_local $0
get_local $0
i32.store
get_local $0
get_local $0
i32.store offset=4
i32.const 1 i32.const 1
set_global $~lib/collector/itcm/state set_global $~lib/collector/itcm/state
end end
end end
) )
(func $~lib/collector/itcm/__gc_collect (; 15 ;) (type $v) (func $~lib/collector/itcm/__gc_collect (; 9 ;) (type $v)
(local $0 i32) (local $0 i32)
block $break|0 block $break|0
block $case1|0 block $case1|0
@ -384,10 +382,8 @@
end end
end end
) )
(func $~lib/gc/gc.collect (; 16 ;) (type $v) (func $~lib/collector/itcm/__gc_allocate (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
call $~lib/collector/itcm/__gc_collect (local $2 i32)
)
(func $~lib/collector/itcm/__gc_allocate (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $0 get_local $0
i32.const 1073741808 i32.const 1073741808
i32.gt_u i32.gt_u
@ -399,30 +395,25 @@
i32.const 16 i32.const 16
i32.add i32.add
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
tee_local $0 tee_local $2
get_local $1 get_local $1
i32.store offset=8 i32.store offset=8
get_local $0 get_local $2
get_local $2
i32.load
i32.const -4
i32.and
get_global $~lib/collector/itcm/white get_global $~lib/collector/itcm/white
call $~lib/collector/itcm/ManagedObject#set:color i32.or
i32.store
get_global $~lib/collector/itcm/fromSpace get_global $~lib/collector/itcm/fromSpace
get_local $0 get_local $2
call $~lib/collector/itcm/ManagedObjectList#push call $~lib/collector/itcm/ManagedObjectList#push
get_local $0 get_local $2
i32.const 16 i32.const 16
i32.add i32.add
) )
(func $~lib/internal/arraybuffer/computeSize (; 18 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/memory/memset (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
i32.const 1
i32.const 32
get_local $0
i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
)
(func $~lib/internal/memory/memset (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
get_local $1 get_local $1
i32.eqz i32.eqz
@ -641,7 +632,7 @@
end end
end end
) )
(func $~lib/internal/arraybuffer/allocateUnsafe (; 20 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/allocateUnsafe (; 12 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
get_local $0 get_local $0
i32.const 1073741816 i32.const 1073741816
@ -654,8 +645,14 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 1
i32.const 32
get_local $0 get_local $0
call $~lib/internal/arraybuffer/computeSize i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
i32.const 6 i32.const 6
call $~lib/collector/itcm/__gc_allocate call $~lib/collector/itcm/__gc_allocate
tee_local $1 tee_local $1
@ -663,7 +660,7 @@
i32.store i32.store
get_local $1 get_local $1
) )
(func $~lib/internal/memory/memcpy (; 21 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/internal/memory/memcpy (; 13 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
@ -1567,7 +1564,7 @@
i32.store8 i32.store8
end end
) )
(func $~lib/internal/memory/memmove (; 22 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/internal/memory/memmove (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
get_local $0 get_local $0
@ -1767,9 +1764,10 @@
end end
end end
) )
(func $~lib/internal/arraybuffer/reallocateUnsafe (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/arraybuffer/reallocateUnsafe (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32)
get_local $1 get_local $1
get_local $0 get_local $0
i32.load i32.load
@ -1787,11 +1785,15 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
get_local $2
call $~lib/internal/arraybuffer/computeSize
set_local $3
get_local $1 get_local $1
get_local $3 i32.const 1
i32.const 32
get_local $2
i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
i32.const 8 i32.const 8
i32.sub i32.sub
i32.le_s i32.le_s
@ -1814,14 +1816,13 @@
tee_local $3 tee_local $3
i32.const 8 i32.const 8
i32.add i32.add
tee_local $4
get_local $0 get_local $0
i32.const 8 i32.const 8
i32.add i32.add
get_local $2 get_local $2
call $~lib/internal/memory/memmove call $~lib/internal/memory/memmove
get_local $3 get_local $4
i32.const 8
i32.add
get_local $2 get_local $2
i32.add i32.add
get_local $1 get_local $1
@ -1854,13 +1855,15 @@
end end
get_local $0 get_local $0
) )
(func $~lib/collector/itcm/__gc_link (; 24 ;) (type $iiv) (param $0 i32) (param $1 i32) (func $~lib/collector/itcm/__gc_link (; 16 ;) (type $iiv) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
get_local $0 get_local $0
i32.const 16 i32.const 16
i32.sub i32.sub
tee_local $2 tee_local $2
call $~lib/collector/itcm/ManagedObject#get:color i32.load
i32.const 3
i32.and
get_global $~lib/collector/itcm/white get_global $~lib/collector/itcm/white
i32.eqz i32.eqz
i32.eq i32.eq
@ -1869,7 +1872,9 @@
get_local $1 get_local $1
i32.const 16 i32.const 16
i32.sub i32.sub
call $~lib/collector/itcm/ManagedObject#get:color i32.load
i32.const 3
i32.and
get_global $~lib/collector/itcm/white get_global $~lib/collector/itcm/white
i32.eq i32.eq
set_local $0 set_local $0
@ -1880,8 +1885,9 @@
call $~lib/collector/itcm/ManagedObject#makeGray call $~lib/collector/itcm/ManagedObject#makeGray
end end
) )
(func $~lib/array/Array<Foo>#__set (; 25 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/array/Array<Foo>#__set (; 17 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32)
get_local $1 get_local $1
get_local $0 get_local $0
i32.load i32.load
@ -1902,21 +1908,19 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
get_local $0
get_local $3 get_local $3
get_local $1 get_local $1
i32.const 1 i32.const 1
i32.add i32.add
tee_local $4
i32.const 2 i32.const 2
i32.shl i32.shl
call $~lib/internal/arraybuffer/reallocateUnsafe call $~lib/internal/arraybuffer/reallocateUnsafe
set_local $3 tee_local $3
get_local $0
get_local $3
i32.store i32.store
get_local $0 get_local $0
get_local $1 get_local $4
i32.const 1
i32.add
i32.store offset=4 i32.store offset=4
end end
get_local $3 get_local $3
@ -1930,7 +1934,7 @@
get_local $2 get_local $2
call $~lib/collector/itcm/__gc_link call $~lib/collector/itcm/__gc_link
) )
(func $std/gc-array/main (; 26 ;) (type $i) (result i32) (func $std/gc-array/main (; 18 ;) (type $i) (result i32)
get_global $~started get_global $~started
i32.eqz i32.eqz
if if
@ -1940,56 +1944,37 @@
end end
i32.const 0 i32.const 0
) )
(func $start (; 27 ;) (type $v) (func $start (; 19 ;) (type $v)
(local $0 i32)
(local $1 i32)
i32.const 184 i32.const 184
set_global $~lib/allocator/arena/startOffset set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset get_global $~lib/allocator/arena/startOffset
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
i32.const 0 i32.const 0
set_global $~lib/collector/itcm/state set_global $~lib/collector/itcm/state
call $~lib/gc/gc.collect call $~lib/collector/itcm/__gc_collect
get_global $std/gc-array/arr get_global $std/gc-array/arr
set_local $0 i32.const 0
i32.const 0 i32.const 0
i32.const 4 i32.const 4
call $~lib/collector/itcm/__gc_allocate call $~lib/collector/itcm/__gc_allocate
set_local $1
get_local $0
i32.const 0
get_local $1
call $~lib/array/Array<Foo>#__set call $~lib/array/Array<Foo>#__set
call $~lib/gc/gc.collect call $~lib/collector/itcm/__gc_collect
get_global $std/gc-array/arr get_global $std/gc-array/arr
set_local $0
i32.const 0
i32.const 4
call $~lib/collector/itcm/__gc_allocate
set_local $1
get_local $0
i32.const 1 i32.const 1
get_local $1
call $~lib/array/Array<Foo>#__set
call $~lib/gc/gc.collect
get_global $std/gc-array/arr
set_local $0
i32.const 0 i32.const 0
i32.const 4 i32.const 4
call $~lib/collector/itcm/__gc_allocate call $~lib/collector/itcm/__gc_allocate
set_local $1
get_local $0
i32.const 0
get_local $1
call $~lib/array/Array<Foo>#__set call $~lib/array/Array<Foo>#__set
call $~lib/gc/gc.collect call $~lib/collector/itcm/__gc_collect
get_global $std/gc-array/arr
i32.const 0
i32.const 0
i32.const 4
call $~lib/collector/itcm/__gc_allocate
call $~lib/array/Array<Foo>#__set
call $~lib/collector/itcm/__gc_collect
) )
(func $null (; 28 ;) (type $v) (func $null (; 20 ;) (type $v)
nop nop
) )
(func $~iterateRoots (; 29 ;) (type $FUNCSIG$v)
get_global $std/gc-array/arr
i32.const 3
call_indirect (type $iv)
)
) )

View File

@ -6,7 +6,6 @@
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $i (func (result i32))) (type $i (func (result i32)))
(type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$v (func))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 16) "\03\00\00\00\00\00\00\00\10\00\00\00s\00t\00d\00/\00g\00c\00-\00b\00a\00s\00i\00c\00s\00.\00t\00s") (data (i32.const 16) "\03\00\00\00\00\00\00\00\10\00\00\00s\00t\00d\00/\00g\00c\00-\00b\00a\00s\00i\00c\00s\00.\00t\00s")
@ -91,68 +90,37 @@
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
get_local $1 get_local $1
) )
(func $~lib/collector/itcm/ManagedObjectList#clear (; 3 ;) (type $iv) (param $0 i32) (func $~lib/collector/itcm/ManagedObjectList#push (; 3 ;) (type $iiv) (param $0 i32) (param $1 i32)
get_local $0
get_local $0
i32.store
get_local $0
get_local $0
i32.store offset=4
)
(func $~lib/collector/itcm/ManagedObject#get:color (; 4 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.load
i32.const 3
i32.and
)
(func $~lib/collector/itcm/ManagedObject#get:next (; 5 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.load
i32.const -4
i32.and
)
(func $~lib/collector/itcm/ManagedObject#set:next (; 6 ;) (type $iiv) (param $0 i32) (param $1 i32)
get_local $0
get_local $1
get_local $0
i32.load
i32.const 3
i32.and
i32.or
i32.store
)
(func $~lib/collector/itcm/ManagedObject#unlink (; 7 ;) (type $iv) (param $0 i32)
(local $1 i32)
get_local $0
call $~lib/collector/itcm/ManagedObject#get:next
tee_local $1
get_local $0
i32.load offset=4
tee_local $0
i32.store offset=4
get_local $0
get_local $1
call $~lib/collector/itcm/ManagedObject#set:next
)
(func $~lib/collector/itcm/ManagedObjectList#push (; 8 ;) (type $iiv) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
get_local $0 get_local $0
i32.load offset=4 i32.load offset=4
set_local $2 set_local $2
get_local $1 get_local $1
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObject#set:next get_local $1
i32.load
i32.const 3
i32.and
i32.or
i32.store
get_local $1 get_local $1
get_local $2 get_local $2
i32.store offset=4 i32.store offset=4
get_local $2 get_local $2
get_local $1 get_local $1
call $~lib/collector/itcm/ManagedObject#set:next get_local $2
i32.load
i32.const 3
i32.and
i32.or
i32.store
get_local $0 get_local $0
get_local $1 get_local $1
i32.store offset=4 i32.store offset=4
) )
(func $~lib/collector/itcm/ManagedObject#makeGray (; 9 ;) (type $iv) (param $0 i32) (func $~lib/collector/itcm/ManagedObject#makeGray (; 4 ;) (type $iv) (param $0 i32)
(local $1 i32)
(local $2 i32)
get_local $0 get_local $0
get_global $~lib/collector/itcm/iter get_global $~lib/collector/itcm/iter
i32.eq i32.eq
@ -162,7 +130,22 @@
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
end end
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObject#unlink i32.load
i32.const -4
i32.and
tee_local $2
get_local $0
i32.load offset=4
tee_local $1
i32.store offset=4
get_local $1
get_local $2
get_local $1
i32.load
i32.const 3
i32.and
i32.or
i32.store
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObjectList#push call $~lib/collector/itcm/ManagedObjectList#push
@ -175,7 +158,7 @@
i32.or i32.or
i32.store i32.store
) )
(func $~lib/collector/itcm/__gc_mark (; 10 ;) (type $iv) (param $0 i32) (func $~lib/collector/itcm/__gc_mark (; 5 ;) (type $iv) (param $0 i32)
(local $1 i32) (local $1 i32)
get_local $0 get_local $0
if if
@ -183,7 +166,9 @@
i32.const 16 i32.const 16
i32.sub i32.sub
tee_local $1 tee_local $1
call $~lib/collector/itcm/ManagedObject#get:color i32.load
i32.const 3
i32.and
get_global $~lib/collector/itcm/white get_global $~lib/collector/itcm/white
i32.eq i32.eq
if if
@ -192,17 +177,7 @@
end end
end end
) )
(func $~lib/collector/itcm/ManagedObject#set:color (; 11 ;) (type $iiv) (param $0 i32) (param $1 i32) (func $~lib/collector/itcm/step (; 6 ;) (type $v)
get_local $0
get_local $0
i32.load
i32.const -4
i32.and
get_local $1
i32.or
i32.store
)
(func $~lib/collector/itcm/step (; 12 ;) (type $v)
(local $0 i32) (local $0 i32)
block $break|0 block $break|0
block $case3|0 block $case3|0
@ -221,34 +196,49 @@
end end
i32.const 16 i32.const 16
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
tee_local $0
set_global $~lib/collector/itcm/fromSpace set_global $~lib/collector/itcm/fromSpace
get_global $~lib/collector/itcm/fromSpace get_global $~lib/collector/itcm/fromSpace
i32.const -1 i32.const -1
i32.store offset=8 i32.store offset=8
get_global $~lib/collector/itcm/fromSpace get_global $~lib/collector/itcm/fromSpace
call $~lib/collector/itcm/ManagedObjectList#clear tee_local $0
get_local $0
i32.store
get_local $0
get_local $0
i32.store offset=4
i32.const 16 i32.const 16
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
tee_local $0
set_global $~lib/collector/itcm/toSpace set_global $~lib/collector/itcm/toSpace
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
i32.const -1 i32.const -1
i32.store offset=8 i32.store offset=8
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
call $~lib/collector/itcm/ManagedObjectList#clear tee_local $0
get_local $0
i32.store
get_local $0
get_local $0
i32.store offset=4
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
i32.const 1 i32.const 1
set_global $~lib/collector/itcm/state set_global $~lib/collector/itcm/state
end end
call $~iterateRoots get_global $std/gc-basics/obj
i32.const 2
call_indirect (type $iv)
get_global $std/gc-basics/obj2
i32.const 2
call_indirect (type $iv)
i32.const 2 i32.const 2
set_global $~lib/collector/itcm/state set_global $~lib/collector/itcm/state
br $break|0 br $break|0
end end
get_global $~lib/collector/itcm/iter get_global $~lib/collector/itcm/iter
call $~lib/collector/itcm/ManagedObject#get:next i32.load
i32.const -4
i32.and
tee_local $0 tee_local $0
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
i32.ne i32.ne
@ -256,9 +246,14 @@
get_local $0 get_local $0
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
get_local $0 get_local $0
get_local $0
i32.load
i32.const -4
i32.and
get_global $~lib/collector/itcm/white get_global $~lib/collector/itcm/white
i32.eqz i32.eqz
call $~lib/collector/itcm/ManagedObject#set:color i32.or
i32.store
i32.const 1 i32.const 1
set_global $~argc set_global $~argc
get_local $0 get_local $0
@ -268,9 +263,16 @@
i32.load offset=8 i32.load offset=8
call_indirect (type $iv) call_indirect (type $iv)
else else
call $~iterateRoots get_global $std/gc-basics/obj
i32.const 2
call_indirect (type $iv)
get_global $std/gc-basics/obj2
i32.const 2
call_indirect (type $iv)
get_global $~lib/collector/itcm/iter get_global $~lib/collector/itcm/iter
call $~lib/collector/itcm/ManagedObject#get:next i32.load
i32.const -4
i32.and
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
i32.eq i32.eq
if if
@ -284,7 +286,9 @@
i32.eqz i32.eqz
set_global $~lib/collector/itcm/white set_global $~lib/collector/itcm/white
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObject#get:next i32.load
i32.const -4
i32.and
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
i32.const 3 i32.const 3
set_global $~lib/collector/itcm/state set_global $~lib/collector/itcm/state
@ -298,24 +302,24 @@
i32.ne i32.ne
if if
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObject#get:next i32.load
i32.const -4
i32.and
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
get_local $0
i32.const 60
i32.ge_u
if
get_local $0
call $std/gc-basics/MyObject_visit
end
else else
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
call $~lib/collector/itcm/ManagedObjectList#clear tee_local $0
get_local $0
i32.store
get_local $0
get_local $0
i32.store offset=4
i32.const 1 i32.const 1
set_global $~lib/collector/itcm/state set_global $~lib/collector/itcm/state
end end
end end
) )
(func $~lib/collector/itcm/__gc_allocate (; 13 ;) (type $FUNCSIG$i) (result i32) (func $~lib/collector/itcm/__gc_allocate (; 7 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32) (local $0 i32)
call $~lib/collector/itcm/step call $~lib/collector/itcm/step
i32.const 20 i32.const 20
@ -324,8 +328,13 @@
i32.const 1 i32.const 1
i32.store offset=8 i32.store offset=8
get_local $0 get_local $0
get_local $0
i32.load
i32.const -4
i32.and
get_global $~lib/collector/itcm/white get_global $~lib/collector/itcm/white
call $~lib/collector/itcm/ManagedObject#set:color i32.or
i32.store
get_global $~lib/collector/itcm/fromSpace get_global $~lib/collector/itcm/fromSpace
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObjectList#push call $~lib/collector/itcm/ManagedObjectList#push
@ -333,7 +342,7 @@
i32.const 16 i32.const 16
i32.add i32.add
) )
(func $~lib/string/String~gc (; 14 ;) (type $iv) (param $0 i32) (func $~lib/string/String~gc (; 8 ;) (type $iv) (param $0 i32)
get_local $0 get_local $0
i32.eqz i32.eqz
if if
@ -342,7 +351,7 @@
get_local $0 get_local $0
call $~lib/collector/itcm/__gc_mark call $~lib/collector/itcm/__gc_mark
) )
(func $~lib/collector/itcm/__gc_collect (; 15 ;) (type $v) (func $~lib/collector/itcm/__gc_collect (; 9 ;) (type $v)
(local $0 i32) (local $0 i32)
block $break|0 block $break|0
block $case1|0 block $case1|0
@ -368,10 +377,7 @@
end end
end end
) )
(func $~lib/gc/gc.collect (; 16 ;) (type $v) (func $std/gc-basics/main (; 10 ;) (type $i) (result i32)
call $~lib/collector/itcm/__gc_collect
)
(func $std/gc-basics/main (; 17 ;) (type $i) (result i32)
get_global $~started get_global $~started
i32.eqz i32.eqz
if if
@ -381,7 +387,7 @@
end end
i32.const 0 i32.const 0
) )
(func $start (; 18 ;) (type $v) (func $start (; 11 ;) (type $v)
(local $0 i32) (local $0 i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -468,20 +474,12 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
call $~lib/gc/gc.collect call $~lib/collector/itcm/__gc_collect
i32.const 0 i32.const 0
set_global $std/gc-basics/obj set_global $std/gc-basics/obj
call $~lib/gc/gc.collect call $~lib/collector/itcm/__gc_collect
) )
(func $null (; 19 ;) (type $v) (func $null (; 12 ;) (type $v)
nop nop
) )
(func $~iterateRoots (; 20 ;) (type $FUNCSIG$v)
get_global $std/gc-basics/obj
i32.const 2
call_indirect (type $iv)
get_global $std/gc-basics/obj2
i32.const 2
call_indirect (type $iv)
)
) )

View File

@ -2,7 +2,6 @@
(type $iv (func (param i32))) (type $iv (func (param i32)))
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$v (func))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\15\00\00\00s\00t\00d\00/\00g\00c\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s") (data (i32.const 8) "\15\00\00\00s\00t\00d\00/\00g\00c\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s")
@ -35,7 +34,18 @@
end end
) )
(func $start (; 2 ;) (type $v) (func $start (; 2 ;) (type $v)
call $~iterateRoots i32.const 8
i32.const 1
call_indirect (type $iv)
get_global $std/gc-integration/B.d
i32.const 1
call_indirect (type $iv)
get_global $std/gc-integration/a_ref
i32.const 1
call_indirect (type $iv)
get_global $std/gc-integration/b_ref
i32.const 1
call_indirect (type $iv)
get_global $std/gc-integration/i get_global $std/gc-integration/i
i32.const 4 i32.const 4
i32.ne i32.ne
@ -51,18 +61,4 @@
(func $null (; 3 ;) (type $v) (func $null (; 3 ;) (type $v)
nop nop
) )
(func $~iterateRoots (; 4 ;) (type $FUNCSIG$v)
i32.const 8
i32.const 1
call_indirect (type $iv)
get_global $std/gc-integration/B.d
i32.const 1
call_indirect (type $iv)
get_global $std/gc-integration/a_ref
i32.const 1
call_indirect (type $iv)
get_global $std/gc-integration/b_ref
i32.const 1
call_indirect (type $iv)
)
) )

View File

@ -3,7 +3,6 @@
(type $ii (func (param i32) (result i32))) (type $ii (func (param i32) (result i32)))
(type $iv (func (param i32))) (type $iv (func (param i32)))
(type $iiv (func (param i32 i32))) (type $iiv (func (param i32 i32)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$i (func (result i32)))
(memory $0 0) (memory $0 0)
(table $0 4 anyfunc) (table $0 4 anyfunc)
@ -83,68 +82,37 @@
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
get_local $1 get_local $1
) )
(func $~lib/collector/itcm/ManagedObjectList#clear (; 1 ;) (type $iv) (param $0 i32) (func $~lib/collector/itcm/ManagedObjectList#push (; 1 ;) (type $iiv) (param $0 i32) (param $1 i32)
get_local $0
get_local $0
i32.store
get_local $0
get_local $0
i32.store offset=4
)
(func $~lib/collector/itcm/ManagedObject#get:color (; 2 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.load
i32.const 3
i32.and
)
(func $~lib/collector/itcm/ManagedObject#get:next (; 3 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.load
i32.const -4
i32.and
)
(func $~lib/collector/itcm/ManagedObject#set:next (; 4 ;) (type $iiv) (param $0 i32) (param $1 i32)
get_local $0
get_local $1
get_local $0
i32.load
i32.const 3
i32.and
i32.or
i32.store
)
(func $~lib/collector/itcm/ManagedObject#unlink (; 5 ;) (type $iv) (param $0 i32)
(local $1 i32)
get_local $0
call $~lib/collector/itcm/ManagedObject#get:next
tee_local $1
get_local $0
i32.load offset=4
tee_local $0
i32.store offset=4
get_local $0
get_local $1
call $~lib/collector/itcm/ManagedObject#set:next
)
(func $~lib/collector/itcm/ManagedObjectList#push (; 6 ;) (type $iiv) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
get_local $0 get_local $0
i32.load offset=4 i32.load offset=4
set_local $2 set_local $2
get_local $1 get_local $1
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObject#set:next get_local $1
i32.load
i32.const 3
i32.and
i32.or
i32.store
get_local $1 get_local $1
get_local $2 get_local $2
i32.store offset=4 i32.store offset=4
get_local $2 get_local $2
get_local $1 get_local $1
call $~lib/collector/itcm/ManagedObject#set:next get_local $2
i32.load
i32.const 3
i32.and
i32.or
i32.store
get_local $0 get_local $0
get_local $1 get_local $1
i32.store offset=4 i32.store offset=4
) )
(func $~lib/collector/itcm/ManagedObject#makeGray (; 7 ;) (type $iv) (param $0 i32) (func $~lib/collector/itcm/ManagedObject#makeGray (; 2 ;) (type $iv) (param $0 i32)
(local $1 i32)
(local $2 i32)
get_local $0 get_local $0
get_global $~lib/collector/itcm/iter get_global $~lib/collector/itcm/iter
i32.eq i32.eq
@ -154,7 +122,22 @@
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
end end
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObject#unlink i32.load
i32.const -4
i32.and
tee_local $2
get_local $0
i32.load offset=4
tee_local $1
i32.store offset=4
get_local $1
get_local $2
get_local $1
i32.load
i32.const 3
i32.and
i32.or
i32.store
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObjectList#push call $~lib/collector/itcm/ManagedObjectList#push
@ -167,7 +150,7 @@
i32.or i32.or
i32.store i32.store
) )
(func $~lib/collector/itcm/__gc_mark (; 8 ;) (type $iv) (param $0 i32) (func $~lib/collector/itcm/__gc_mark (; 3 ;) (type $iv) (param $0 i32)
(local $1 i32) (local $1 i32)
get_local $0 get_local $0
if if
@ -175,7 +158,9 @@
i32.const 16 i32.const 16
i32.sub i32.sub
tee_local $1 tee_local $1
call $~lib/collector/itcm/ManagedObject#get:color i32.load
i32.const 3
i32.and
get_global $~lib/collector/itcm/white get_global $~lib/collector/itcm/white
i32.eq i32.eq
if if
@ -184,20 +169,7 @@
end end
end end
) )
(func $~lib/collector/itcm/ManagedObject#set:color (; 9 ;) (type $iiv) (param $0 i32) (param $1 i32) (func $~lib/collector/itcm/step (; 4 ;) (type $v)
get_local $0
get_local $0
i32.load
i32.const -4
i32.and
get_local $1
i32.or
i32.store
)
(func $~lib/allocator/arena/__memory_free (; 10 ;) (type $FUNCSIG$v)
nop
)
(func $~lib/collector/itcm/step (; 11 ;) (type $v)
(local $0 i32) (local $0 i32)
block $break|0 block $break|0
block $case3|0 block $case3|0
@ -216,34 +188,46 @@
end end
i32.const 16 i32.const 16
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
tee_local $0
set_global $~lib/collector/itcm/fromSpace set_global $~lib/collector/itcm/fromSpace
get_global $~lib/collector/itcm/fromSpace get_global $~lib/collector/itcm/fromSpace
i32.const -1 i32.const -1
i32.store offset=8 i32.store offset=8
get_global $~lib/collector/itcm/fromSpace get_global $~lib/collector/itcm/fromSpace
call $~lib/collector/itcm/ManagedObjectList#clear tee_local $0
get_local $0
i32.store
get_local $0
get_local $0
i32.store offset=4
i32.const 16 i32.const 16
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
tee_local $0
set_global $~lib/collector/itcm/toSpace set_global $~lib/collector/itcm/toSpace
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
i32.const -1 i32.const -1
i32.store offset=8 i32.store offset=8
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
call $~lib/collector/itcm/ManagedObjectList#clear tee_local $0
get_local $0
i32.store
get_local $0
get_local $0
i32.store offset=4
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
i32.const 1 i32.const 1
set_global $~lib/collector/itcm/state set_global $~lib/collector/itcm/state
end end
call $~iterateRoots get_global $std/gc-object/obj
i32.const 1
call_indirect (type $iv)
i32.const 2 i32.const 2
set_global $~lib/collector/itcm/state set_global $~lib/collector/itcm/state
br $break|0 br $break|0
end end
get_global $~lib/collector/itcm/iter get_global $~lib/collector/itcm/iter
call $~lib/collector/itcm/ManagedObject#get:next i32.load
i32.const -4
i32.and
tee_local $0 tee_local $0
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
i32.ne i32.ne
@ -251,9 +235,14 @@
get_local $0 get_local $0
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
get_local $0 get_local $0
get_local $0
i32.load
i32.const -4
i32.and
get_global $~lib/collector/itcm/white get_global $~lib/collector/itcm/white
i32.eqz i32.eqz
call $~lib/collector/itcm/ManagedObject#set:color i32.or
i32.store
i32.const 1 i32.const 1
set_global $~argc set_global $~argc
get_local $0 get_local $0
@ -263,9 +252,13 @@
i32.load offset=8 i32.load offset=8
call_indirect (type $iv) call_indirect (type $iv)
else else
call $~iterateRoots get_global $std/gc-object/obj
i32.const 1
call_indirect (type $iv)
get_global $~lib/collector/itcm/iter get_global $~lib/collector/itcm/iter
call $~lib/collector/itcm/ManagedObject#get:next i32.load
i32.const -4
i32.and
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
i32.eq i32.eq
if if
@ -279,7 +272,9 @@
i32.eqz i32.eqz
set_global $~lib/collector/itcm/white set_global $~lib/collector/itcm/white
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObject#get:next i32.load
i32.const -4
i32.and
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
i32.const 3 i32.const 3
set_global $~lib/collector/itcm/state set_global $~lib/collector/itcm/state
@ -293,23 +288,24 @@
i32.ne i32.ne
if if
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObject#get:next i32.load
i32.const -4
i32.and
set_global $~lib/collector/itcm/iter set_global $~lib/collector/itcm/iter
get_local $0
i32.const 8
i32.ge_u
if
call $~lib/allocator/arena/__memory_free
end
else else
get_global $~lib/collector/itcm/toSpace get_global $~lib/collector/itcm/toSpace
call $~lib/collector/itcm/ManagedObjectList#clear tee_local $0
get_local $0
i32.store
get_local $0
get_local $0
i32.store offset=4
i32.const 1 i32.const 1
set_global $~lib/collector/itcm/state set_global $~lib/collector/itcm/state
end end
end end
) )
(func $~lib/collector/itcm/__gc_allocate (; 12 ;) (type $FUNCSIG$i) (result i32) (func $~lib/collector/itcm/__gc_allocate (; 5 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32) (local $0 i32)
call $~lib/collector/itcm/step call $~lib/collector/itcm/step
i32.const 24 i32.const 24
@ -318,8 +314,13 @@
i32.const 2 i32.const 2
i32.store offset=8 i32.store offset=8
get_local $0 get_local $0
get_local $0
i32.load
i32.const -4
i32.and
get_global $~lib/collector/itcm/white get_global $~lib/collector/itcm/white
call $~lib/collector/itcm/ManagedObject#set:color i32.or
i32.store
get_global $~lib/collector/itcm/fromSpace get_global $~lib/collector/itcm/fromSpace
get_local $0 get_local $0
call $~lib/collector/itcm/ManagedObjectList#push call $~lib/collector/itcm/ManagedObjectList#push
@ -327,7 +328,7 @@
i32.const 16 i32.const 16
i32.add i32.add
) )
(func $std/gc-object/Base~gc (; 13 ;) (type $iv) (param $0 i32) (func $std/gc-object/Base~gc (; 6 ;) (type $iv) (param $0 i32)
get_local $0 get_local $0
i32.eqz i32.eqz
if if
@ -336,7 +337,7 @@
get_local $0 get_local $0
call $~lib/collector/itcm/__gc_mark call $~lib/collector/itcm/__gc_mark
) )
(func $std/gc-object/Custom~gc (; 14 ;) (type $iv) (param $0 i32) (func $std/gc-object/Custom~gc (; 7 ;) (type $iv) (param $0 i32)
get_local $0 get_local $0
i32.eqz i32.eqz
if if
@ -352,7 +353,7 @@
i32.load offset=4 i32.load offset=4
call $~lib/collector/itcm/__gc_mark call $~lib/collector/itcm/__gc_mark
) )
(func $~lib/collector/itcm/__gc_collect (; 15 ;) (type $v) (func $~lib/collector/itcm/__gc_collect (; 8 ;) (type $v)
(local $0 i32) (local $0 i32)
block $break|0 block $break|0
block $case1|0 block $case1|0
@ -378,10 +379,7 @@
end end
end end
) )
(func $~lib/gc/gc.collect (; 16 ;) (type $v) (func $std/gc-object/main (; 9 ;) (type $v)
call $~lib/collector/itcm/__gc_collect
)
(func $std/gc-object/main (; 17 ;) (type $v)
get_global $~started get_global $~started
i32.eqz i32.eqz
if if
@ -390,7 +388,7 @@
set_global $~started set_global $~started
end end
) )
(func $start (; 18 ;) (type $v) (func $start (; 10 ;) (type $v)
(local $0 i32) (local $0 i32)
i32.const 8 i32.const 8
set_global $~lib/allocator/arena/startOffset set_global $~lib/allocator/arena/startOffset
@ -407,21 +405,16 @@
i32.store offset=4 i32.store offset=4
get_local $0 get_local $0
set_global $std/gc-object/obj set_global $std/gc-object/obj
call $~lib/gc/gc.collect call $~lib/collector/itcm/__gc_collect
get_global $std/gc-object/obj get_global $std/gc-object/obj
get_global $std/gc-object/obj get_global $std/gc-object/obj
i32.store i32.store
call $~lib/gc/gc.collect call $~lib/collector/itcm/__gc_collect
i32.const 0 i32.const 0
set_global $std/gc-object/obj set_global $std/gc-object/obj
call $~lib/gc/gc.collect call $~lib/collector/itcm/__gc_collect
) )
(func $null (; 19 ;) (type $v) (func $null (; 11 ;) (type $v)
nop nop
) )
(func $~iterateRoots (; 20 ;) (type $FUNCSIG$v)
get_global $std/gc-object/obj
i32.const 1
call_indirect (type $iv)
)
) )

View File

@ -48,10 +48,7 @@
end end
get_local $2 get_local $2
) )
(func $std/hash/check (; 1 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/hash/hash32 (; 1 ;) (type $ii) (param $0 i32) (result i32)
i32.const 1
)
(func $~lib/internal/hash/hash32 (; 2 ;) (type $ii) (param $0 i32) (result i32)
get_local $0 get_local $0
i32.const 255 i32.const 255
i32.and i32.and
@ -82,7 +79,7 @@
i32.const 16777619 i32.const 16777619
i32.mul i32.mul
) )
(func $~lib/internal/hash/hash64 (; 3 ;) (type $Ii) (param $0 i64) (result i32) (func $~lib/internal/hash/hash64 (; 2 ;) (type $Ii) (param $0 i64) (result i32)
(local $1 i32) (local $1 i32)
get_local $0 get_local $0
i32.wrap/i64 i32.wrap/i64
@ -148,77 +145,60 @@
i32.const 16777619 i32.const 16777619
i32.mul i32.mul
) )
(func $start (; 4 ;) (type $v) (func $start (; 3 ;) (type $v)
i32.const 0 i32.const 0
call $~lib/internal/hash/hashStr call $~lib/internal/hash/hashStr
call $std/hash/check
drop drop
i32.const 8 i32.const 8
call $~lib/internal/hash/hashStr call $~lib/internal/hash/hashStr
call $std/hash/check
drop drop
i32.const 16 i32.const 16
call $~lib/internal/hash/hashStr call $~lib/internal/hash/hashStr
call $std/hash/check
drop drop
i32.const 24 i32.const 24
call $~lib/internal/hash/hashStr call $~lib/internal/hash/hashStr
call $std/hash/check
drop drop
i32.const 32 i32.const 32
call $~lib/internal/hash/hashStr call $~lib/internal/hash/hashStr
call $std/hash/check
drop drop
i32.const 0 i32.const 0
call $~lib/internal/hash/hash32 call $~lib/internal/hash/hash32
call $std/hash/check
drop drop
i32.const 1065353216 i32.const 1065353216
call $~lib/internal/hash/hash32 call $~lib/internal/hash/hash32
call $std/hash/check
drop drop
i32.const 1066192077 i32.const 1066192077
call $~lib/internal/hash/hash32 call $~lib/internal/hash/hash32
call $std/hash/check
drop drop
i32.const 0 i32.const 0
call $~lib/internal/hash/hash32 call $~lib/internal/hash/hash32
call $std/hash/check
drop drop
i32.const 2139095040 i32.const 2139095040
call $~lib/internal/hash/hash32 call $~lib/internal/hash/hash32
call $std/hash/check
drop drop
i32.const 2143289344 i32.const 2143289344
call $~lib/internal/hash/hash32 call $~lib/internal/hash/hash32
call $std/hash/check
drop drop
i64.const 0 i64.const 0
call $~lib/internal/hash/hash64 call $~lib/internal/hash/hash64
call $std/hash/check
drop drop
i64.const 4607182418800017408 i64.const 4607182418800017408
call $~lib/internal/hash/hash64 call $~lib/internal/hash/hash64
call $std/hash/check
drop drop
i64.const 4607632778762754458 i64.const 4607632778762754458
call $~lib/internal/hash/hash64 call $~lib/internal/hash/hash64
call $std/hash/check
drop drop
i64.const 0 i64.const 0
call $~lib/internal/hash/hash64 call $~lib/internal/hash/hash64
call $std/hash/check
drop drop
i64.const 9218868437227405312 i64.const 9218868437227405312
call $~lib/internal/hash/hash64 call $~lib/internal/hash/hash64
call $std/hash/check
drop drop
i64.const 9221120237041090560 i64.const 9221120237041090560
call $~lib/internal/hash/hash64 call $~lib/internal/hash/hash64
call $std/hash/check
drop drop
) )
(func $null (; 5 ;) (type $v) (func $null (; 4 ;) (type $v)
nop nop
) )
) )

View File

@ -1,11 +1,9 @@
(module (module
(type $FF (func (param f64) (result f64))) (type $FF (func (param f64) (result f64)))
(type $Fi (func (param f64) (result i32)))
(type $FFF (func (param f64 f64) (result f64))) (type $FFF (func (param f64 f64) (result f64)))
(type $FiF (func (param f64 i32) (result f64))) (type $FiF (func (param f64 i32) (result f64)))
(type $Ff (func (param f64) (result f32))) (type $Ff (func (param f64) (result f32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$d (func (result f64)))
(memory $0 0) (memory $0 0)
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $null) (elem (i32.const 0) $null)
@ -163,16 +161,14 @@
f64.const 1.5707963267948966 f64.const 1.5707963267948966
return return
end end
get_local $0
get_local $0
f64.mul
call $~lib/math/R
set_local $1
f64.const 1.5707963267948966 f64.const 1.5707963267948966
get_local $0 get_local $0
f64.const 6.123233995736766e-17 f64.const 6.123233995736766e-17
get_local $0 get_local $0
get_local $1 get_local $0
get_local $0
f64.mul
call $~lib/math/R
f64.mul f64.mul
f64.sub f64.sub
f64.sub f64.sub
@ -183,6 +179,8 @@
i32.const 31 i32.const 31
i32.shr_u i32.shr_u
if if
f64.const 2
f64.const 1.5707963267948966
f64.const 0.5 f64.const 0.5
get_local $0 get_local $0
f64.const 0.5 f64.const 0.5
@ -190,14 +188,9 @@
f64.add f64.add
tee_local $1 tee_local $1
f64.sqrt f64.sqrt
set_local $0 tee_local $0
get_local $1 get_local $1
call $~lib/math/R call $~lib/math/R
set_local $1
f64.const 2
f64.const 1.5707963267948966
get_local $0
get_local $1
get_local $0 get_local $0
f64.mul f64.mul
f64.const 6.123233995736766e-17 f64.const 6.123233995736766e-17
@ -230,12 +223,10 @@
f64.add f64.add
f64.div f64.div
set_local $5 set_local $5
get_local $1
call $~lib/math/R
set_local $1
f64.const 2 f64.const 2
get_local $3 get_local $3
get_local $1 get_local $1
call $~lib/math/R
get_local $0 get_local $0
f64.mul f64.mul
get_local $5 get_local $5
@ -749,12 +740,10 @@
end end
get_local $0 get_local $0
get_local $0 get_local $0
get_local $0
get_local $0
f64.mul f64.mul
call $~lib/math/R call $~lib/math/R
set_local $1
get_local $0
get_local $0
get_local $1
f64.mul f64.mul
f64.add f64.add
return return
@ -911,12 +900,7 @@
get_local $0 get_local $0
call $~lib/math/NativeMath.asinh call $~lib/math/NativeMath.asinh
) )
(func $~lib/builtins/isNaN<f64> (; 12 ;) (type $Fi) (param $0 f64) (result i32) (func $~lib/math/NativeMath.atan (; 12 ;) (type $FF) (param $0 f64) (result f64)
get_local $0
get_local $0
f64.ne
)
(func $~lib/math/NativeMath.atan (; 13 ;) (type $FF) (param $0 f64) (result f64)
(local $1 f64) (local $1 f64)
(local $2 i32) (local $2 i32)
(local $3 f64) (local $3 f64)
@ -935,7 +919,8 @@
i32.ge_u i32.ge_u
if if
get_local $0 get_local $0
call $~lib/builtins/isNaN<f64> get_local $0
f64.ne
if if
get_local $0 get_local $0
return return
@ -1141,11 +1126,11 @@
get_local $4 get_local $4
f64.copysign f64.copysign
) )
(func $std/libm/atan (; 14 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/atan (; 13 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
call $~lib/math/NativeMath.atan call $~lib/math/NativeMath.atan
) )
(func $~lib/math/NativeMath.atanh (; 15 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.atanh (; 14 ;) (type $FF) (param $0 f64) (result f64)
(local $1 f64) (local $1 f64)
(local $2 i64) (local $2 i64)
(local $3 i64) (local $3 i64)
@ -1205,11 +1190,11 @@
get_local $0 get_local $0
f64.copysign f64.copysign
) )
(func $std/libm/atanh (; 16 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/atanh (; 15 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
call $~lib/math/NativeMath.atanh call $~lib/math/NativeMath.atanh
) )
(func $~lib/math/NativeMath.atan2 (; 17 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $~lib/math/NativeMath.atan2 (; 16 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -1218,12 +1203,14 @@
(local $7 i32) (local $7 i32)
block $folding-inner0 block $folding-inner0
get_local $1 get_local $1
call $~lib/builtins/isNaN<f64> get_local $1
f64.ne
tee_local $2 tee_local $2
i32.eqz i32.eqz
if if
get_local $0 get_local $0
call $~lib/builtins/isNaN<f64> get_local $0
f64.ne
set_local $2 set_local $2
end end
get_local $2 get_local $2
@ -1465,12 +1452,12 @@
end end
tee_local $0 tee_local $0
) )
(func $std/libm/atan2 (; 18 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $std/libm/atan2 (; 17 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
get_local $0 get_local $0
get_local $1 get_local $1
call $~lib/math/NativeMath.atan2 call $~lib/math/NativeMath.atan2
) )
(func $~lib/math/NativeMath.cbrt (; 19 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.cbrt (; 18 ;) (type $FF) (param $0 f64) (result f64)
(local $1 f64) (local $1 f64)
(local $2 f64) (local $2 f64)
(local $3 i32) (local $3 i32)
@ -1592,27 +1579,24 @@
f64.mul f64.mul
f64.add f64.add
) )
(func $std/libm/cbrt (; 20 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/cbrt (; 19 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
call $~lib/math/NativeMath.cbrt call $~lib/math/NativeMath.cbrt
) )
(func $std/libm/ceil (; 21 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/ceil (; 20 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
f64.ceil f64.ceil
) )
(func $std/libm/clz32 (; 22 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/clz32 (; 21 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
i32.trunc_s/f64 i32.trunc_s/f64
i32.clz i32.clz
f64.convert_s/i32 f64.convert_s/i32
) )
(func $~lib/math/NativeMath.cos (; 23 ;) (type $FUNCSIG$d) (result f64) (func $std/libm/cos (; 22 ;) (type $FF) (param $0 f64) (result f64)
unreachable unreachable
) )
(func $std/libm/cos (; 24 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.expm1 (; 23 ;) (type $FF) (param $0 f64) (result f64)
call $~lib/math/NativeMath.cos
)
(func $~lib/math/NativeMath.expm1 (; 25 ;) (type $FF) (param $0 f64) (result f64)
(local $1 f64) (local $1 f64)
(local $2 f64) (local $2 f64)
(local $3 i32) (local $3 i32)
@ -1621,6 +1605,7 @@
(local $6 i32) (local $6 i32)
(local $7 i64) (local $7 i64)
(local $8 f64) (local $8 f64)
(local $9 f64)
get_local $0 get_local $0
i64.reinterpret/f64 i64.reinterpret/f64
tee_local $7 tee_local $7
@ -1639,7 +1624,8 @@
i32.ge_u i32.ge_u
if if
get_local $0 get_local $0
call $~lib/builtins/isNaN<f64> get_local $0
f64.ne
if if
get_local $0 get_local $0
return return
@ -1736,9 +1722,10 @@
f64.add f64.add
f64.mul f64.mul
f64.add f64.add
tee_local $9
set_local $1 set_local $1
get_local $2 get_local $2
get_local $1 get_local $9
f64.const 3 f64.const 3
get_local $1 get_local $1
get_local $8 get_local $8
@ -1891,7 +1878,7 @@
get_local $5 get_local $5
f64.mul f64.mul
) )
(func $~lib/math/NativeMath.scalbn (; 26 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64) (func $~lib/math/NativeMath.scalbn (; 24 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64)
get_local $1 get_local $1
i32.const 1023 i32.const 1023
i32.gt_s i32.gt_s
@ -1965,12 +1952,12 @@
f64.reinterpret/i64 f64.reinterpret/i64
f64.mul f64.mul
) )
(func $~lib/math/NativeMath.exp (; 27 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.exp (; 25 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 f64) (local $3 f64)
(local $4 f64) (local $4 i32)
(local $5 i32) (local $5 f64)
get_local $0 get_local $0
i64.reinterpret/f64 i64.reinterpret/f64
i64.const 32 i64.const 32
@ -1979,7 +1966,7 @@
tee_local $1 tee_local $1
i32.const 31 i32.const 31
i32.shr_u i32.shr_u
set_local $5 set_local $4
get_local $1 get_local $1
i32.const 2147483647 i32.const 2147483647
i32.and i32.and
@ -1988,7 +1975,8 @@
i32.ge_u i32.ge_u
if if
get_local $0 get_local $0
call $~lib/builtins/isNaN<f64> get_local $0
f64.ne
if if
get_local $0 get_local $0
return return
@ -2029,7 +2017,7 @@
i32.trunc_s/f64 i32.trunc_s/f64
else else
i32.const 1 i32.const 1
get_local $5 get_local $4
i32.const 1 i32.const 1
i32.shl i32.shl
i32.sub i32.sub
@ -2040,26 +2028,25 @@
f64.const 0.6931471803691238 f64.const 0.6931471803691238
f64.mul f64.mul
f64.sub f64.sub
tee_local $4 tee_local $3
get_local $0 get_local $0
f64.const 1.9082149292705877e-10 f64.const 1.9082149292705877e-10
f64.mul f64.mul
tee_local $3 tee_local $5
f64.sub f64.sub
set_local $0 set_local $0
else else
get_local $1 get_local $1
i32.const 1043333120 i32.const 1043333120
i32.gt_u i32.le_u
if (result f64) if
get_local $0
else
f64.const 1 f64.const 1
get_local $0 get_local $0
f64.add f64.add
return return
end end
set_local $4 get_local $0
set_local $3
end end
f64.const 1 f64.const 1
get_local $0 get_local $0
@ -2093,9 +2080,9 @@
get_local $0 get_local $0
f64.sub f64.sub
f64.div f64.div
get_local $3 get_local $5
f64.sub f64.sub
get_local $4 get_local $3
f64.add f64.add
f64.add f64.add
set_local $0 set_local $0
@ -2109,7 +2096,7 @@
get_local $2 get_local $2
call $~lib/math/NativeMath.scalbn call $~lib/math/NativeMath.scalbn
) )
(func $~lib/math/NativeMath.cosh (; 28 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.cosh (; 26 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i32) (local $1 i32)
(local $2 i64) (local $2 i64)
get_local $0 get_local $0
@ -2173,27 +2160,27 @@
f64.const 2247116418577894884661631e283 f64.const 2247116418577894884661631e283
f64.mul f64.mul
) )
(func $std/libm/cosh (; 29 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/cosh (; 27 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
call $~lib/math/NativeMath.cosh call $~lib/math/NativeMath.cosh
) )
(func $std/libm/exp (; 30 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/exp (; 28 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
call $~lib/math/NativeMath.exp call $~lib/math/NativeMath.exp
) )
(func $std/libm/expm1 (; 31 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/expm1 (; 29 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
call $~lib/math/NativeMath.expm1 call $~lib/math/NativeMath.expm1
) )
(func $std/libm/floor (; 32 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/floor (; 30 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
f64.floor f64.floor
) )
(func $std/libm/fround (; 33 ;) (type $Ff) (param $0 f64) (result f32) (func $std/libm/fround (; 31 ;) (type $Ff) (param $0 f64) (result f32)
get_local $0 get_local $0
f32.demote/f64 f32.demote/f64
) )
(func $~lib/math/NativeMath.hypot (; 34 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $~lib/math/NativeMath.hypot (; 32 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(local $2 f64) (local $2 f64)
(local $3 i64) (local $3 i64)
(local $4 f64) (local $4 f64)
@ -2373,12 +2360,12 @@
f64.sqrt f64.sqrt
f64.mul f64.mul
) )
(func $std/libm/hypot (; 35 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $std/libm/hypot (; 33 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
get_local $0 get_local $0
get_local $1 get_local $1
call $~lib/math/NativeMath.hypot call $~lib/math/NativeMath.hypot
) )
(func $~lib/math/NativeMath.imul (; 36 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $std/libm/imul (; 34 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
get_local $0 get_local $0
i32.trunc_s/f64 i32.trunc_s/f64
get_local $1 get_local $1
@ -2386,16 +2373,11 @@
i32.mul i32.mul
f64.convert_s/i32 f64.convert_s/i32
) )
(func $std/libm/imul (; 37 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $std/libm/log (; 35 ;) (type $FF) (param $0 f64) (result f64)
get_local $0
get_local $1
call $~lib/math/NativeMath.imul
)
(func $std/libm/log (; 38 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
call $~lib/math/NativeMath.log call $~lib/math/NativeMath.log
) )
(func $~lib/math/NativeMath.log10 (; 39 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.log10 (; 36 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i32) (local $1 i32)
(local $2 f64) (local $2 f64)
(local $3 i32) (local $3 i32)
@ -2610,15 +2592,15 @@
get_local $0 get_local $0
f64.add f64.add
) )
(func $std/libm/log10 (; 40 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/log10 (; 37 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
call $~lib/math/NativeMath.log10 call $~lib/math/NativeMath.log10
) )
(func $std/libm/log1p (; 41 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/log1p (; 38 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
call $~lib/math/NativeMath.log1p call $~lib/math/NativeMath.log1p
) )
(func $~lib/math/NativeMath.log2 (; 42 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.log2 (; 39 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i32) (local $1 i32)
(local $2 f64) (local $2 f64)
(local $3 i32) (local $3 i32)
@ -2827,21 +2809,21 @@
tee_local $2 tee_local $2
f64.add f64.add
) )
(func $std/libm/log2 (; 43 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/log2 (; 40 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
call $~lib/math/NativeMath.log2 call $~lib/math/NativeMath.log2
) )
(func $std/libm/max (; 44 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $std/libm/max (; 41 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
get_local $0 get_local $0
get_local $1 get_local $1
f64.max f64.max
) )
(func $std/libm/min (; 45 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $std/libm/min (; 42 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
get_local $0 get_local $0
get_local $1 get_local $1
f64.min f64.min
) )
(func $~lib/math/NativeMath.pow (; 46 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $~lib/math/NativeMath.pow (; 43 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(local $2 f64) (local $2 f64)
(local $3 f64) (local $3 f64)
(local $4 i32) (local $4 i32)
@ -3710,6 +3692,7 @@
get_local $2 get_local $2
f64.mul f64.mul
set_local $3 set_local $3
get_local $13
f64.const 1 f64.const 1
get_local $2 get_local $2
get_local $2 get_local $2
@ -3783,9 +3766,7 @@
i64.or i64.or
f64.reinterpret/i64 f64.reinterpret/i64
end end
set_local $2 tee_local $2
get_local $13
get_local $2
f64.mul f64.mul
return return
end end
@ -3802,12 +3783,12 @@
f64.const 1.e+300 f64.const 1.e+300
f64.mul f64.mul
) )
(func $std/libm/pow (; 47 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $std/libm/pow (; 44 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
get_local $0 get_local $0
get_local $1 get_local $1
call $~lib/math/NativeMath.pow call $~lib/math/NativeMath.pow
) )
(func $std/libm/round (; 48 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/round (; 45 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
f64.const 0.5 f64.const 0.5
f64.add f64.add
@ -3815,7 +3796,7 @@
get_local $0 get_local $0
f64.copysign f64.copysign
) )
(func $std/libm/sign (; 49 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/sign (; 46 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
f64.const 0 f64.const 0
f64.gt f64.gt
@ -3833,7 +3814,7 @@
end end
get_local $0 get_local $0
) )
(func $~lib/math/NativeMath.sinh (; 50 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.sinh (; 47 ;) (type $FF) (param $0 f64) (result f64)
(local $1 f64) (local $1 f64)
(local $2 f64) (local $2 f64)
(local $3 i32) (local $3 i32)
@ -3900,7 +3881,6 @@
f64.const 2 f64.const 2
get_local $2 get_local $2
f64.mul f64.mul
set_local $0
get_local $1 get_local $1
f64.const 1416.0996898839683 f64.const 1416.0996898839683
f64.sub f64.sub
@ -3909,20 +3889,17 @@
f64.mul f64.mul
f64.const 2247116418577894884661631e283 f64.const 2247116418577894884661631e283
f64.mul f64.mul
set_local $1
get_local $0
get_local $1
f64.mul f64.mul
) )
(func $std/libm/sinh (; 51 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/sinh (; 48 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
call $~lib/math/NativeMath.sinh call $~lib/math/NativeMath.sinh
) )
(func $std/libm/sqrt (; 52 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/sqrt (; 49 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
f64.sqrt f64.sqrt
) )
(func $~lib/math/NativeMath.tanh (; 53 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.tanh (; 50 ;) (type $FF) (param $0 f64) (result f64)
(local $1 f64) (local $1 f64)
(local $2 i32) (local $2 i32)
(local $3 i64) (local $3 i64)
@ -4001,15 +3978,15 @@
get_local $0 get_local $0
f64.copysign f64.copysign
) )
(func $std/libm/tanh (; 54 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/tanh (; 51 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
call $~lib/math/NativeMath.tanh call $~lib/math/NativeMath.tanh
) )
(func $std/libm/trunc (; 55 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/trunc (; 52 ;) (type $FF) (param $0 f64) (result f64)
get_local $0 get_local $0
f64.trunc f64.trunc
) )
(func $null (; 56 ;) (type $v) (func $null (; 53 ;) (type $v)
nop nop
) )
) )

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,12 +2,10 @@
(type $FFF (func (param f64 f64) (result f64))) (type $FFF (func (param f64 f64) (result f64)))
(type $FFFi (func (param f64 f64 f64) (result i32))) (type $FFFi (func (param f64 f64 f64) (result i32)))
(type $FFi (func (param f64 f64) (result i32))) (type $FFi (func (param f64 f64) (result i32)))
(type $Fi (func (param f64) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $fffi (func (param f32 f32 f32) (result i32))) (type $fffi (func (param f32 f32 f32) (result i32)))
(type $fff (func (param f32 f32) (result f32))) (type $fff (func (param f32 f32) (result f32)))
(type $ffi (func (param f32 f32) (result i32))) (type $ffi (func (param f32 f32) (result i32)))
(type $fi (func (param f32) (result i32)))
(type $v (func)) (type $v (func))
(import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64))) (import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
@ -228,17 +226,14 @@
get_local $0 get_local $0
f64.mul f64.mul
) )
(func $~lib/builtins/isNaN<f64> (; 3 ;) (type $Fi) (param $0 f64) (result i32) (func $std/mod/check<f64> (; 3 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32)
get_local $1
get_local $1
f64.ne
if
get_local $0 get_local $0
get_local $0 get_local $0
f64.ne f64.ne
)
(func $std/mod/check<f64> (; 4 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32)
get_local $1
call $~lib/builtins/isNaN<f64>
if
get_local $0
call $~lib/builtins/isNaN<f64>
return return
end end
get_local $1 get_local $1
@ -258,7 +253,7 @@
get_local $1 get_local $1
f64.eq f64.eq
) )
(func $std/mod/test_fmod (; 5 ;) (type $FFFi) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (func $std/mod/test_fmod (; 4 ;) (type $FFFi) (param $0 f64) (param $1 f64) (param $2 f64) (result i32)
(local $3 i32) (local $3 i32)
get_local $0 get_local $0
get_local $1 get_local $1
@ -270,14 +265,13 @@
get_local $0 get_local $0
get_local $1 get_local $1
call $std/mod/mod call $std/mod/mod
tee_local $0
get_local $2 get_local $2
call $std/mod/check<f64> call $std/mod/check<f64>
set_local $3 set_local $3
end end
get_local $3 get_local $3
) )
(func $~lib/math/NativeMathf.mod (; 6 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32) (func $~lib/math/NativeMathf.mod (; 5 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -476,17 +470,14 @@
get_local $0 get_local $0
f32.mul f32.mul
) )
(func $~lib/builtins/isNaN<f32> (; 7 ;) (type $fi) (param $0 f32) (result i32) (func $std/mod/check<f32> (; 6 ;) (type $ffi) (param $0 f32) (param $1 f32) (result i32)
get_local $1
get_local $1
f32.ne
if
get_local $0 get_local $0
get_local $0 get_local $0
f32.ne f32.ne
)
(func $std/mod/check<f32> (; 8 ;) (type $ffi) (param $0 f32) (param $1 f32) (result i32)
get_local $1
call $~lib/builtins/isNaN<f32>
if
get_local $0
call $~lib/builtins/isNaN<f32>
return return
end end
get_local $1 get_local $1
@ -506,14 +497,14 @@
get_local $1 get_local $1
f32.eq f32.eq
) )
(func $std/mod/test_fmodf (; 9 ;) (type $fffi) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) (func $std/mod/test_fmodf (; 7 ;) (type $fffi) (param $0 f32) (param $1 f32) (param $2 f32) (result i32)
get_local $0 get_local $0
get_local $1 get_local $1
call $~lib/math/NativeMathf.mod call $~lib/math/NativeMathf.mod
get_local $2 get_local $2
call $std/mod/check<f32> call $std/mod/check<f32>
) )
(func $start (; 10 ;) (type $v) (func $start (; 8 ;) (type $v)
f64.const 3 f64.const 3
f64.const 2 f64.const 2
f64.const 1 f64.const 1
@ -2270,7 +2261,7 @@
unreachable unreachable
end end
) )
(func $null (; 11 ;) (type $v) (func $null (; 9 ;) (type $v)
nop nop
) )
) )

View File

@ -73,13 +73,10 @@
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
get_local $1 get_local $1
) )
(func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$i) (result i32) (func $std/new/AClass#constructor (; 1 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
i32.const 8 i32.const 8
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
)
(func $std/new/AClass#constructor (; 2 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
call $~lib/memory/memory.allocate
tee_local $0 tee_local $0
i32.const 1 i32.const 1
i32.store i32.store
@ -97,7 +94,7 @@
f32.store offset=4 f32.store offset=4
get_local $0 get_local $0
) )
(func $start (; 3 ;) (type $v) (func $start (; 2 ;) (type $v)
i32.const 8 i32.const 8
set_global $~lib/allocator/arena/startOffset set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset get_global $~lib/allocator/arena/startOffset
@ -105,7 +102,7 @@
call $std/new/AClass#constructor call $std/new/AClass#constructor
set_global $std/new/aClass set_global $std/new/aClass
) )
(func $null (; 4 ;) (type $v) (func $null (; 3 ;) (type $v)
nop nop
) )
) )

View File

@ -5,9 +5,7 @@
(type $FFF (func (param f64 f64) (result f64))) (type $FFF (func (param f64 f64) (result f64)))
(type $FiF (func (param f64 i32) (result f64))) (type $FiF (func (param f64 i32) (result f64)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\1b\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s") (data (i32.const 8) "\1b\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s")
@ -146,13 +144,10 @@
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
get_local $1 get_local $1
) )
(func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$i) (result i32) (func $std/operator-overloading/Tester#constructor (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
i32.const 8 i32.const 8
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
)
(func $std/operator-overloading/Tester#constructor (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
call $~lib/memory/memory.allocate
tee_local $2 tee_local $2
get_local $0 get_local $0
i32.store i32.store
@ -161,72 +156,7 @@
i32.store offset=4 i32.store offset=4
get_local $2 get_local $2
) )
(func $std/operator-overloading/Tester.add (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/math/NativeMath.scalbn (; 3 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64)
get_local $0
i32.load
get_local $1
i32.load
i32.add
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.add
call $std/operator-overloading/Tester#constructor
)
(func $std/operator-overloading/Tester.sub (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $0
i32.load
get_local $1
i32.load
i32.sub
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.sub
call $std/operator-overloading/Tester#constructor
)
(func $std/operator-overloading/Tester.mul (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $0
i32.load
get_local $1
i32.load
i32.mul
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.mul
call $std/operator-overloading/Tester#constructor
)
(func $std/operator-overloading/Tester.div (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $0
i32.load
get_local $1
i32.load
i32.div_s
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.div_s
call $std/operator-overloading/Tester#constructor
)
(func $std/operator-overloading/Tester.mod (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $0
i32.load
get_local $1
i32.load
i32.rem_s
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.rem_s
call $std/operator-overloading/Tester#constructor
)
(func $~lib/math/NativeMath.scalbn (; 9 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64)
get_local $1 get_local $1
i32.const 1023 i32.const 1023
i32.gt_s i32.gt_s
@ -300,7 +230,7 @@
f64.reinterpret/i64 f64.reinterpret/i64
f64.mul f64.mul
) )
(func $~lib/math/NativeMath.pow (; 10 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $~lib/math/NativeMath.pow (; 4 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(local $2 f64) (local $2 f64)
(local $3 f64) (local $3 f64)
(local $4 i32) (local $4 i32)
@ -1169,6 +1099,7 @@
get_local $2 get_local $2
f64.mul f64.mul
set_local $3 set_local $3
get_local $13
f64.const 1 f64.const 1
get_local $2 get_local $2
get_local $2 get_local $2
@ -1242,9 +1173,7 @@
i64.or i64.or
f64.reinterpret/i64 f64.reinterpret/i64
end end
set_local $2 tee_local $2
get_local $13
get_local $2
f64.mul f64.mul
return return
end end
@ -1261,8 +1190,7 @@
f64.const 1.e+300 f64.const 1.e+300
f64.mul f64.mul
) )
(func $std/operator-overloading/Tester.pow (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.pow (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
get_local $0 get_local $0
i32.load i32.load
f64.convert_s/i32 f64.convert_s/i32
@ -1271,7 +1199,6 @@
f64.convert_s/i32 f64.convert_s/i32
call $~lib/math/NativeMath.pow call $~lib/math/NativeMath.pow
i32.trunc_s/f64 i32.trunc_s/f64
set_local $2
get_local $0 get_local $0
i32.load offset=4 i32.load offset=4
f64.convert_s/i32 f64.convert_s/i32
@ -1280,289 +1207,12 @@
f64.convert_s/i32 f64.convert_s/i32
call $~lib/math/NativeMath.pow call $~lib/math/NativeMath.pow
i32.trunc_s/f64 i32.trunc_s/f64
set_local $0
get_local $2
get_local $0
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
) )
(func $std/operator-overloading/Tester.and (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $start (; 6 ;) (type $v)
get_local $0
i32.load
get_local $1
i32.load
i32.and
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.and
call $std/operator-overloading/Tester#constructor
)
(func $std/operator-overloading/Tester.or (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $0
i32.load
get_local $1
i32.load
i32.or
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.or
call $std/operator-overloading/Tester#constructor
)
(func $std/operator-overloading/Tester.xor (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $0
i32.load
get_local $1
i32.load
i32.xor
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.xor
call $std/operator-overloading/Tester#constructor
)
(func $std/operator-overloading/Tester.equals (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
get_local $0
i32.load
get_local $1
i32.load
i32.eq
tee_local $2
if
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.eq
set_local $2
end
get_local $2
)
(func $std/operator-overloading/Tester.notEquals (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
get_local $0
i32.load
get_local $1
i32.load
i32.ne
tee_local $2
if
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.ne
set_local $2
end
get_local $2
)
(func $std/operator-overloading/Tester.greater (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
get_local $0
i32.load
get_local $1
i32.load
i32.gt_s
tee_local $2
if
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.gt_s
set_local $2
end
get_local $2
)
(func $std/operator-overloading/Tester.greaterEquals (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
get_local $0
i32.load
get_local $1
i32.load
i32.ge_s
tee_local $2
if
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.ge_s
set_local $2
end
get_local $2
)
(func $std/operator-overloading/Tester.less (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
get_local $0
i32.load
get_local $1
i32.load
i32.lt_s
tee_local $2
if
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.lt_s
set_local $2
end
get_local $2
)
(func $std/operator-overloading/Tester.lessEquals (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
get_local $0
i32.load
get_local $1
i32.load
i32.le_s
tee_local $2
if
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.le_s
set_local $2
end
get_local $2
)
(func $std/operator-overloading/Tester.shr (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
get_local $0
i32.load
i32.const 3
i32.shr_s
get_local $0
i32.load offset=4
i32.const 3
i32.shr_s
call $std/operator-overloading/Tester#constructor
)
(func $std/operator-overloading/Tester.shu (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
get_local $0
i32.load
i32.const 3
i32.shr_u
get_local $0
i32.load offset=4
i32.const 3
i32.shr_u
call $std/operator-overloading/Tester#constructor
)
(func $std/operator-overloading/Tester.shl (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
get_local $0
i32.load
i32.const 3
i32.shl
get_local $0
i32.load offset=4
i32.const 3
i32.shl
call $std/operator-overloading/Tester#constructor
)
(func $std/operator-overloading/Tester.pos (; 24 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.load
get_local $0
i32.load offset=4
call $std/operator-overloading/Tester#constructor
)
(func $std/operator-overloading/Tester.neg (; 25 ;) (type $ii) (param $0 i32) (result i32)
i32.const 0
get_local $0
i32.load
i32.sub
i32.const 0
get_local $0
i32.load offset=4
i32.sub
call $std/operator-overloading/Tester#constructor
)
(func $std/operator-overloading/Tester.not (; 26 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.load
i32.const -1
i32.xor
get_local $0
i32.load offset=4
i32.const -1
i32.xor
call $std/operator-overloading/Tester#constructor
)
(func $std/operator-overloading/Tester.excl (; 27 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
get_local $0
i32.load
i32.eqz
tee_local $1
if
get_local $0
i32.load offset=4
i32.eqz
set_local $1
end
get_local $1
)
(func $std/operator-overloading/Tester#inc (; 28 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
get_local $0
i32.load
i32.const 1
i32.add
i32.store
get_local $0
get_local $0
i32.load offset=4
i32.const 1
i32.add
i32.store offset=4
get_local $0
)
(func $std/operator-overloading/Tester#dec (; 29 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
get_local $0
i32.load
i32.const 1
i32.sub
i32.store
get_local $0
get_local $0
i32.load offset=4
i32.const 1
i32.sub
i32.store offset=4
get_local $0
)
(func $std/operator-overloading/Tester#postInc (; 30 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.load
i32.const 1
i32.add
get_local $0
i32.load offset=4
i32.const 1
i32.add
call $std/operator-overloading/Tester#constructor
)
(func $std/operator-overloading/Tester#postDec (; 31 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.load
i32.const 1
i32.sub
get_local $0
i32.load offset=4
i32.const 1
i32.sub
call $std/operator-overloading/Tester#constructor
)
(func $start (; 32 ;) (type $v)
(local $0 i32) (local $0 i32)
(local $1 i32) (local $1 i32)
(local $2 i32)
i32.const 72 i32.const 72
set_global $~lib/allocator/arena/startOffset set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset get_global $~lib/allocator/arena/startOffset
@ -1576,8 +1226,18 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/a2 set_global $std/operator-overloading/a2
get_global $std/operator-overloading/a1 get_global $std/operator-overloading/a1
tee_local $0
i32.load
get_global $std/operator-overloading/a2 get_global $std/operator-overloading/a2
call $std/operator-overloading/Tester.add tee_local $1
i32.load
i32.add
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.add
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/a set_global $std/operator-overloading/a
get_global $std/operator-overloading/a get_global $std/operator-overloading/a
i32.load i32.load
@ -1610,8 +1270,18 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/s2 set_global $std/operator-overloading/s2
get_global $std/operator-overloading/s1 get_global $std/operator-overloading/s1
tee_local $0
i32.load
get_global $std/operator-overloading/s2 get_global $std/operator-overloading/s2
call $std/operator-overloading/Tester.sub tee_local $1
i32.load
i32.sub
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.sub
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/s set_global $std/operator-overloading/s
get_global $std/operator-overloading/s get_global $std/operator-overloading/s
i32.load i32.load
@ -1643,8 +1313,18 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/m2 set_global $std/operator-overloading/m2
get_global $std/operator-overloading/m1 get_global $std/operator-overloading/m1
tee_local $0
i32.load
get_global $std/operator-overloading/m2 get_global $std/operator-overloading/m2
call $std/operator-overloading/Tester.mul tee_local $1
i32.load
i32.mul
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.mul
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/m set_global $std/operator-overloading/m
get_global $std/operator-overloading/m get_global $std/operator-overloading/m
i32.load i32.load
@ -1677,8 +1357,18 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/d2 set_global $std/operator-overloading/d2
get_global $std/operator-overloading/d1 get_global $std/operator-overloading/d1
tee_local $0
i32.load
get_global $std/operator-overloading/d2 get_global $std/operator-overloading/d2
call $std/operator-overloading/Tester.div tee_local $1
i32.load
i32.div_s
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.div_s
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/d set_global $std/operator-overloading/d
get_global $std/operator-overloading/d get_global $std/operator-overloading/d
i32.load i32.load
@ -1711,8 +1401,18 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/f2 set_global $std/operator-overloading/f2
get_global $std/operator-overloading/f1 get_global $std/operator-overloading/f1
tee_local $0
i32.load
get_global $std/operator-overloading/f2 get_global $std/operator-overloading/f2
call $std/operator-overloading/Tester.mod tee_local $1
i32.load
i32.rem_s
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.rem_s
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/f set_global $std/operator-overloading/f
get_global $std/operator-overloading/f get_global $std/operator-overloading/f
i32.load i32.load
@ -1778,8 +1478,18 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/n2 set_global $std/operator-overloading/n2
get_global $std/operator-overloading/n1 get_global $std/operator-overloading/n1
tee_local $0
i32.load
get_global $std/operator-overloading/n2 get_global $std/operator-overloading/n2
call $std/operator-overloading/Tester.and tee_local $1
i32.load
i32.and
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.and
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/n set_global $std/operator-overloading/n
get_global $std/operator-overloading/n get_global $std/operator-overloading/n
i32.load i32.load
@ -1812,8 +1522,18 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/o2 set_global $std/operator-overloading/o2
get_global $std/operator-overloading/o1 get_global $std/operator-overloading/o1
tee_local $0
i32.load
get_global $std/operator-overloading/o2 get_global $std/operator-overloading/o2
call $std/operator-overloading/Tester.or tee_local $1
i32.load
i32.or
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.or
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/o set_global $std/operator-overloading/o
get_global $std/operator-overloading/o get_global $std/operator-overloading/o
i32.load i32.load
@ -1846,8 +1566,18 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/x2 set_global $std/operator-overloading/x2
get_global $std/operator-overloading/x1 get_global $std/operator-overloading/x1
tee_local $0
i32.load
get_global $std/operator-overloading/x2 get_global $std/operator-overloading/x2
call $std/operator-overloading/Tester.xor tee_local $1
i32.load
i32.xor
get_local $0
i32.load offset=4
get_local $1
i32.load offset=4
i32.xor
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/x set_global $std/operator-overloading/x
get_global $std/operator-overloading/x get_global $std/operator-overloading/x
i32.load i32.load
@ -1880,8 +1610,22 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/eq2 set_global $std/operator-overloading/eq2
get_global $std/operator-overloading/eq1 get_global $std/operator-overloading/eq1
tee_local $1
i32.load
get_global $std/operator-overloading/eq2 get_global $std/operator-overloading/eq2
call $std/operator-overloading/Tester.equals tee_local $2
i32.load
i32.eq
tee_local $0
if
get_local $1
i32.load offset=4
get_local $2
i32.load offset=4
i32.eq
set_local $0
end
get_local $0
set_global $std/operator-overloading/eq set_global $std/operator-overloading/eq
get_global $std/operator-overloading/eq get_global $std/operator-overloading/eq
i32.const 1 i32.const 1
@ -1903,8 +1647,22 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/eq4 set_global $std/operator-overloading/eq4
get_global $std/operator-overloading/eq3 get_global $std/operator-overloading/eq3
tee_local $1
i32.load
get_global $std/operator-overloading/eq4 get_global $std/operator-overloading/eq4
call $std/operator-overloading/Tester.equals tee_local $2
i32.load
i32.eq
tee_local $0
if
get_local $1
i32.load offset=4
get_local $2
i32.load offset=4
i32.eq
set_local $0
end
get_local $0
set_global $std/operator-overloading/eqf set_global $std/operator-overloading/eqf
get_global $std/operator-overloading/eqf get_global $std/operator-overloading/eqf
if if
@ -1916,8 +1674,22 @@
unreachable unreachable
end end
get_global $std/operator-overloading/eq1 get_global $std/operator-overloading/eq1
tee_local $1
i32.load
get_global $std/operator-overloading/eq2 get_global $std/operator-overloading/eq2
call $std/operator-overloading/Tester.notEquals tee_local $2
i32.load
i32.ne
tee_local $0
if
get_local $1
i32.load offset=4
get_local $2
i32.load offset=4
i32.ne
set_local $0
end
get_local $0
set_global $std/operator-overloading/eq set_global $std/operator-overloading/eq
get_global $std/operator-overloading/eq get_global $std/operator-overloading/eq
if if
@ -1929,8 +1701,22 @@
unreachable unreachable
end end
get_global $std/operator-overloading/eq3 get_global $std/operator-overloading/eq3
tee_local $1
i32.load
get_global $std/operator-overloading/eq4 get_global $std/operator-overloading/eq4
call $std/operator-overloading/Tester.notEquals tee_local $2
i32.load
i32.ne
tee_local $0
if
get_local $1
i32.load offset=4
get_local $2
i32.load offset=4
i32.ne
set_local $0
end
get_local $0
set_global $std/operator-overloading/eqf set_global $std/operator-overloading/eqf
get_global $std/operator-overloading/eqf get_global $std/operator-overloading/eqf
i32.const 1 i32.const 1
@ -1952,8 +1738,22 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/gt2 set_global $std/operator-overloading/gt2
get_global $std/operator-overloading/gt1 get_global $std/operator-overloading/gt1
tee_local $1
i32.load
get_global $std/operator-overloading/gt2 get_global $std/operator-overloading/gt2
call $std/operator-overloading/Tester.greater tee_local $2
i32.load
i32.gt_s
tee_local $0
if
get_local $1
i32.load offset=4
get_local $2
i32.load offset=4
i32.gt_s
set_local $0
end
get_local $0
set_global $std/operator-overloading/gt set_global $std/operator-overloading/gt
get_global $std/operator-overloading/gt get_global $std/operator-overloading/gt
i32.const 1 i32.const 1
@ -1975,8 +1775,22 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/gte2 set_global $std/operator-overloading/gte2
get_global $std/operator-overloading/gte1 get_global $std/operator-overloading/gte1
tee_local $1
i32.load
get_global $std/operator-overloading/gte2 get_global $std/operator-overloading/gte2
call $std/operator-overloading/Tester.greaterEquals tee_local $2
i32.load
i32.ge_s
tee_local $0
if
get_local $1
i32.load offset=4
get_local $2
i32.load offset=4
i32.ge_s
set_local $0
end
get_local $0
set_global $std/operator-overloading/gte set_global $std/operator-overloading/gte
get_global $std/operator-overloading/gte get_global $std/operator-overloading/gte
i32.const 1 i32.const 1
@ -1998,8 +1812,22 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/le2 set_global $std/operator-overloading/le2
get_global $std/operator-overloading/le1 get_global $std/operator-overloading/le1
tee_local $1
i32.load
get_global $std/operator-overloading/le2 get_global $std/operator-overloading/le2
call $std/operator-overloading/Tester.less tee_local $2
i32.load
i32.lt_s
tee_local $0
if
get_local $1
i32.load offset=4
get_local $2
i32.load offset=4
i32.lt_s
set_local $0
end
get_local $0
set_global $std/operator-overloading/le set_global $std/operator-overloading/le
get_global $std/operator-overloading/le get_global $std/operator-overloading/le
i32.const 1 i32.const 1
@ -2021,8 +1849,22 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/leq2 set_global $std/operator-overloading/leq2
get_global $std/operator-overloading/leq1 get_global $std/operator-overloading/leq1
tee_local $1
i32.load
get_global $std/operator-overloading/leq2 get_global $std/operator-overloading/leq2
call $std/operator-overloading/Tester.lessEquals tee_local $2
i32.load
i32.le_s
tee_local $0
if
get_local $1
i32.load offset=4
get_local $2
i32.load offset=4
i32.le_s
set_local $0
end
get_local $0
set_global $std/operator-overloading/leq set_global $std/operator-overloading/leq
get_global $std/operator-overloading/leq get_global $std/operator-overloading/leq
i32.const 1 i32.const 1
@ -2040,7 +1882,15 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/shr set_global $std/operator-overloading/shr
get_global $std/operator-overloading/shr get_global $std/operator-overloading/shr
call $std/operator-overloading/Tester.shr tee_local $0
i32.load
i32.const 3
i32.shr_s
get_local $0
i32.load offset=4
i32.const 3
i32.shr_s
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/sres set_global $std/operator-overloading/sres
get_global $std/operator-overloading/sres get_global $std/operator-overloading/sres
i32.load i32.load
@ -2069,7 +1919,15 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/shu set_global $std/operator-overloading/shu
get_global $std/operator-overloading/shu get_global $std/operator-overloading/shu
call $std/operator-overloading/Tester.shu tee_local $0
i32.load
i32.const 3
i32.shr_u
get_local $0
i32.load offset=4
i32.const 3
i32.shr_u
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/ures set_global $std/operator-overloading/ures
get_global $std/operator-overloading/ures get_global $std/operator-overloading/ures
i32.load i32.load
@ -2098,7 +1956,15 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/shl set_global $std/operator-overloading/shl
get_global $std/operator-overloading/shl get_global $std/operator-overloading/shl
call $std/operator-overloading/Tester.shl tee_local $0
i32.load
i32.const 3
i32.shl
get_local $0
i32.load offset=4
i32.const 3
i32.shl
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/sres set_global $std/operator-overloading/sres
get_global $std/operator-overloading/sres get_global $std/operator-overloading/sres
i32.load i32.load
@ -2127,7 +1993,11 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/pos set_global $std/operator-overloading/pos
get_global $std/operator-overloading/pos get_global $std/operator-overloading/pos
call $std/operator-overloading/Tester.pos tee_local $0
i32.load
get_local $0
i32.load offset=4
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/pres set_global $std/operator-overloading/pres
get_global $std/operator-overloading/pres get_global $std/operator-overloading/pres
i32.load i32.load
@ -2157,8 +2027,16 @@
i32.const -2 i32.const -2
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/neg set_global $std/operator-overloading/neg
i32.const 0
get_global $std/operator-overloading/neg get_global $std/operator-overloading/neg
call $std/operator-overloading/Tester.neg tee_local $0
i32.load
i32.sub
i32.const 0
get_local $0
i32.load offset=4
i32.sub
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/nres set_global $std/operator-overloading/nres
get_global $std/operator-overloading/nres get_global $std/operator-overloading/nres
i32.load i32.load
@ -2193,7 +2071,15 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/not set_global $std/operator-overloading/not
get_global $std/operator-overloading/not get_global $std/operator-overloading/not
call $std/operator-overloading/Tester.not tee_local $0
i32.load
i32.const -1
i32.xor
get_local $0
i32.load offset=4
i32.const -1
i32.xor
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/res set_global $std/operator-overloading/res
get_global $std/operator-overloading/res get_global $std/operator-overloading/res
i32.load i32.load
@ -2228,7 +2114,17 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/excl set_global $std/operator-overloading/excl
get_global $std/operator-overloading/excl get_global $std/operator-overloading/excl
call $std/operator-overloading/Tester.excl tee_local $1
i32.load
i32.eqz
tee_local $0
if
get_local $1
i32.load offset=4
i32.eqz
set_local $0
end
get_local $0
set_global $std/operator-overloading/bres set_global $std/operator-overloading/bres
get_global $std/operator-overloading/bres get_global $std/operator-overloading/bres
set_local $1 set_local $1
@ -2269,7 +2165,19 @@
call $std/operator-overloading/Tester#constructor call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/incdec set_global $std/operator-overloading/incdec
get_global $std/operator-overloading/incdec get_global $std/operator-overloading/incdec
call $std/operator-overloading/Tester#inc tee_local $0
get_local $0
i32.load
i32.const 1
i32.add
i32.store
get_local $0
get_local $0
i32.load offset=4
i32.const 1
i32.add
i32.store offset=4
get_local $0
set_global $std/operator-overloading/incdec set_global $std/operator-overloading/incdec
get_global $std/operator-overloading/incdec get_global $std/operator-overloading/incdec
i32.load i32.load
@ -2294,7 +2202,19 @@
unreachable unreachable
end end
get_global $std/operator-overloading/incdec get_global $std/operator-overloading/incdec
call $std/operator-overloading/Tester#dec tee_local $0
get_local $0
i32.load
i32.const 1
i32.sub
i32.store
get_local $0
get_local $0
i32.load offset=4
i32.const 1
i32.sub
i32.store offset=4
get_local $0
set_global $std/operator-overloading/incdec set_global $std/operator-overloading/incdec
get_global $std/operator-overloading/incdec get_global $std/operator-overloading/incdec
i32.load i32.load
@ -2323,7 +2243,14 @@
set_global $std/operator-overloading/incdec set_global $std/operator-overloading/incdec
get_global $std/operator-overloading/incdec get_global $std/operator-overloading/incdec
tee_local $0 tee_local $0
call $std/operator-overloading/Tester#postInc i32.load
i32.const 1
i32.add
get_local $0
i32.load offset=4
i32.const 1
i32.add
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/incdec set_global $std/operator-overloading/incdec
get_local $0 get_local $0
set_global $std/operator-overloading/tmp set_global $std/operator-overloading/tmp
@ -2372,7 +2299,14 @@
end end
get_global $std/operator-overloading/incdec get_global $std/operator-overloading/incdec
tee_local $0 tee_local $0
call $std/operator-overloading/Tester#postDec i32.load
i32.const 1
i32.sub
get_local $0
i32.load offset=4
i32.const 1
i32.sub
call $std/operator-overloading/Tester#constructor
set_global $std/operator-overloading/incdec set_global $std/operator-overloading/incdec
get_local $0 get_local $0
set_global $std/operator-overloading/tmp set_global $std/operator-overloading/tmp
@ -2530,7 +2464,7 @@
unreachable unreachable
end end
) )
(func $null (; 33 ;) (type $v) (func $null (; 7 ;) (type $v)
nop nop
) )
) )

View File

@ -1,11 +1,7 @@
(module (module
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $iiv (func (param i32 i32)))
(type $iiiv (func (param i32 i32 i32))) (type $iiiv (func (param i32 i32 i32)))
(type $iifv (func (param i32 i32 f32)))
(type $iif (func (param i32 i32) (result f32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vii (func (param i32 i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
@ -22,10 +18,7 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $std/pointer/Pointer<Entry>#constructor (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/internal/memory/memset (; 1 ;) (type $FUNCSIG$vi) (param $0 i32)
get_local $0
)
(func $~lib/internal/memory/memset (; 2 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32) (local $1 i32)
get_local $0 get_local $0
i32.const 0 i32.const 0
@ -69,7 +62,7 @@
i32.const 0 i32.const 0
i32.store8 i32.store8
) )
(func $~lib/internal/memory/memcpy (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/internal/memory/memcpy (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
@ -973,7 +966,7 @@
i32.store8 i32.store8
end end
) )
(func $~lib/internal/memory/memmove (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (func $~lib/internal/memory/memmove (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -1176,45 +1169,12 @@
end end
end end
) )
(func $std/pointer/Pointer<Entry>#set:value (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32) (func $start (; 4 ;) (type $v)
get_local $1 (local $0 i32)
if (local $1 i32)
get_local $0
get_local $1
call $~lib/internal/memory/memmove
else
get_local $0
call $~lib/internal/memory/memset
end
)
(func $std/pointer/Pointer<f32>#set (; 6 ;) (type $iifv) (param $0 i32) (param $1 i32) (param $2 f32)
get_local $0
get_local $1
i32.const 2
i32.shl
i32.add
get_local $2
f32.store
)
(func $std/pointer/Pointer<f32>#get (; 7 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32)
get_local $0
get_local $1
i32.const 2
i32.shl
i32.add
f32.load
)
(func $std/pointer/Pointer<f32>#set:value (; 8 ;) (type $FUNCSIG$vi) (param $0 i32)
get_local $0
f32.const 1.399999976158142
f32.store
)
(func $start (; 9 ;) (type $v)
i32.const 8 i32.const 8
call $std/pointer/Pointer<Entry>#constructor
set_global $std/pointer/one set_global $std/pointer/one
i32.const 24 i32.const 24
call $std/pointer/Pointer<Entry>#constructor
set_global $std/pointer/two set_global $std/pointer/two
get_global $std/pointer/one get_global $std/pointer/one
i32.const 8 i32.const 8
@ -1392,8 +1352,17 @@
unreachable unreachable
end end
get_global $std/pointer/one get_global $std/pointer/one
set_local $0
get_global $std/pointer/two get_global $std/pointer/two
call $std/pointer/Pointer<Entry>#set:value tee_local $1
if
get_local $0
get_local $1
call $~lib/internal/memory/memmove
else
get_local $0
call $~lib/internal/memory/memset
end
get_global $std/pointer/one get_global $std/pointer/one
get_global $std/pointer/two get_global $std/pointer/two
i32.eq i32.eq
@ -1430,19 +1399,17 @@
unreachable unreachable
end end
i32.const 0 i32.const 0
call $std/pointer/Pointer<Entry>#constructor
set_global $std/pointer/buf set_global $std/pointer/buf
get_global $std/pointer/buf get_global $std/pointer/buf
i32.const 0
f32.const 1.100000023841858 f32.const 1.100000023841858
call $std/pointer/Pointer<f32>#set f32.store
get_global $std/pointer/buf get_global $std/pointer/buf
i32.const 1 i32.const 4
i32.add
f32.const 1.2000000476837158 f32.const 1.2000000476837158
call $std/pointer/Pointer<f32>#set f32.store
get_global $std/pointer/buf get_global $std/pointer/buf
i32.const 0 f32.load
call $std/pointer/Pointer<f32>#get
f32.const 1.100000023841858 f32.const 1.100000023841858
f32.ne f32.ne
if if
@ -1454,8 +1421,9 @@
unreachable unreachable
end end
get_global $std/pointer/buf get_global $std/pointer/buf
i32.const 1 i32.const 4
call $std/pointer/Pointer<f32>#get i32.add
f32.load
f32.const 1.2000000476837158 f32.const 1.2000000476837158
f32.ne f32.ne
if if
@ -1522,8 +1490,9 @@
f32.const 1.2999999523162842 f32.const 1.2999999523162842
f32.store f32.store
get_global $std/pointer/buf get_global $std/pointer/buf
i32.const 2 i32.const 8
call $std/pointer/Pointer<f32>#get i32.add
f32.load
f32.const 1.2999999523162842 f32.const 1.2999999523162842
f32.ne f32.ne
if if
@ -1561,7 +1530,8 @@
unreachable unreachable
end end
get_global $std/pointer/buf get_global $std/pointer/buf
call $std/pointer/Pointer<f32>#set:value f32.const 1.399999976158142
f32.store
get_global $std/pointer/buf get_global $std/pointer/buf
f32.load f32.load
f32.const 1.399999976158142 f32.const 1.399999976158142
@ -1587,7 +1557,7 @@
unreachable unreachable
end end
) )
(func $null (; 10 ;) (type $v) (func $null (; 5 ;) (type $v)
nop nop
) )
) )

View File

@ -2,8 +2,6 @@
(type $ii (func (param i32) (result i32))) (type $ii (func (param i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$j (func (result i64)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\11\00\00\00~\00l\00i\00b\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s") (data (i32.const 8) "\11\00\00\00~\00l\00i\00b\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s")
@ -54,11 +52,7 @@
end end
get_local $0 get_local $0
) )
(func $~lib/polyfills/bswap<u16> (; 2 ;) (type $FUNCSIG$i) (result i32) (func $~lib/polyfills/bswap16<i16> (; 2 ;) (type $ii) (param $0 i32) (result i32)
i32.const 43707
call $~lib/polyfills/bswap16<u16>
)
(func $~lib/polyfills/bswap16<i16> (; 3 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
i32.const 1 i32.const 1
tee_local $1 tee_local $1
@ -101,21 +95,9 @@
end end
get_local $0 get_local $0
) )
(func $~lib/polyfills/bswap<i16> (; 4 ;) (type $FUNCSIG$i) (result i32) (func $start (; 3 ;) (type $v)
i32.const 43707 i32.const 43707
call $~lib/polyfills/bswap16<i16> call $~lib/polyfills/bswap16<u16>
)
(func $~lib/polyfills/bswap<u32> (; 5 ;) (type $FUNCSIG$i) (result i32)
i32.const -573785174
)
(func $~lib/polyfills/bswap<u64> (; 6 ;) (type $FUNCSIG$j) (result i64)
i64.const -2464388556401798912
)
(func $~lib/polyfills/bswap16<u32> (; 7 ;) (type $FUNCSIG$i) (result i32)
i32.const -7816278
)
(func $start (; 8 ;) (type $v)
call $~lib/polyfills/bswap<u16>
i32.const 65535 i32.const 65535
i32.and i32.and
i32.const 48042 i32.const 48042
@ -128,7 +110,8 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
call $~lib/polyfills/bswap<i16> i32.const 43707
call $~lib/polyfills/bswap16<i16>
i32.const 65535 i32.const 65535
i32.and i32.and
i32.const 48042 i32.const 48042
@ -141,72 +124,6 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
call $~lib/polyfills/bswap<u32>
i32.const -573785174
i32.ne
if
i32.const 0
i32.const 48
i32.const 8
i32.const 0
call $~lib/env/abort
unreachable
end
call $~lib/polyfills/bswap<u32>
i32.const -573785174
i32.ne
if
i32.const 0
i32.const 48
i32.const 9
i32.const 0
call $~lib/env/abort
unreachable
end
call $~lib/polyfills/bswap<u64>
i64.const -2464388556401798912
i64.ne
if
i32.const 0
i32.const 48
i32.const 12
i32.const 0
call $~lib/env/abort
unreachable
end
call $~lib/polyfills/bswap<u64>
i64.const -2464388556401798912
i64.ne
if
i32.const 0
i32.const 48
i32.const 13
i32.const 0
call $~lib/env/abort
unreachable
end
call $~lib/polyfills/bswap<u32>
i32.const -573785174
i32.ne
if
i32.const 0
i32.const 48
i32.const 16
i32.const 0
call $~lib/env/abort
unreachable
end
call $~lib/polyfills/bswap<u32>
i32.const -573785174
i32.ne
if
i32.const 0
i32.const 48
i32.const 17
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 43707 i32.const 43707
call $~lib/polyfills/bswap16<u16> call $~lib/polyfills/bswap16<u16>
i32.const 65535 i32.const 65535
@ -235,30 +152,8 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
call $~lib/polyfills/bswap16<u32>
i32.const -7816278
i32.ne
if
i32.const 0
i32.const 48
i32.const 24
i32.const 0
call $~lib/env/abort
unreachable
end
call $~lib/polyfills/bswap16<u32>
i32.const -7816278
i32.ne
if
i32.const 0
i32.const 48
i32.const 25
i32.const 0
call $~lib/env/abort
unreachable
end
) )
(func $null (; 9 ;) (type $v) (func $null (; 4 ;) (type $v)
nop nop
) )
) )

File diff suppressed because it is too large Load Diff

View File

@ -4,12 +4,8 @@
(type $iiiv (func (param i32 i32 i32))) (type $iiiv (func (param i32 i32 i32)))
(type $ii (func (param i32) (result i32))) (type $ii (func (param i32) (result i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$v (func)) (type $FUNCSIG$v (func))
(type $FUNCSIG$ji (func (param i32) (result i64)))
(type $FUNCSIG$fi (func (param i32) (result f32)))
(type $FUNCSIG$di (func (param i32) (result f64)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\08\00\00\00\00\00\00\00\01\00\00\00\02") (data (i32.const 8) "\08\00\00\00\00\00\00\00\01\00\00\00\02")
@ -32,39 +28,7 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $~lib/array/Array<i32>#__get (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/internal/memory/memset (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $1 i32)
get_local $0
i32.const 24
i32.load
tee_local $1
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $1
get_local $0
i32.const 2
i32.shl
i32.add
i32.load offset=8
else
unreachable
end
tee_local $1
)
(func $~lib/internal/arraybuffer/computeSize (; 2 ;) (type $ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
get_local $0
i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
)
(func $~lib/internal/memory/memset (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
get_local $1 get_local $1
i32.eqz i32.eqz
@ -283,7 +247,7 @@
end end
end end
) )
(func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -345,7 +309,7 @@
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
get_local $1 get_local $1
) )
(func $~lib/internal/arraybuffer/allocateUnsafe (; 5 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/allocateUnsafe (; 3 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
get_local $0 get_local $0
i32.const 1073741816 i32.const 1073741816
@ -358,15 +322,21 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 1
i32.const 32
get_local $0 get_local $0
call $~lib/internal/arraybuffer/computeSize i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
tee_local $1 tee_local $1
get_local $0 get_local $0
i32.store i32.store
get_local $1 get_local $1
) )
(func $~lib/internal/memory/memcpy (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/internal/memory/memcpy (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
@ -1270,7 +1240,7 @@
i32.store8 i32.store8
end end
) )
(func $~lib/internal/memory/memmove (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/internal/memory/memmove (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
get_local $0 get_local $0
@ -1470,9 +1440,10 @@
end end
end end
) )
(func $~lib/internal/arraybuffer/reallocateUnsafe (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/arraybuffer/reallocateUnsafe (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32)
get_local $1 get_local $1
get_local $0 get_local $0
i32.load i32.load
@ -1490,11 +1461,15 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
get_local $2
call $~lib/internal/arraybuffer/computeSize
set_local $3
get_local $1 get_local $1
get_local $3 i32.const 1
i32.const 32
get_local $2
i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
i32.const 8 i32.const 8
i32.sub i32.sub
i32.le_s i32.le_s
@ -1517,14 +1492,13 @@
tee_local $3 tee_local $3
i32.const 8 i32.const 8
i32.add i32.add
tee_local $4
get_local $0 get_local $0
i32.const 8 i32.const 8
i32.add i32.add
get_local $2 get_local $2
call $~lib/internal/memory/memmove call $~lib/internal/memory/memmove
get_local $3 get_local $4
i32.const 8
i32.add
get_local $2 get_local $2
i32.add i32.add
get_local $1 get_local $1
@ -1557,7 +1531,7 @@
end end
get_local $0 get_local $0
) )
(func $~lib/array/Array<i32>#__set (; 9 ;) (type $FUNCSIG$v) (func $~lib/array/Array<i32>#__set (; 7 ;) (type $FUNCSIG$v)
(local $0 i32) (local $0 i32)
i32.const 0 i32.const 0
i32.const 24 i32.const 24
@ -1582,28 +1556,7 @@
i32.const 2 i32.const 2
i32.store offset=8 i32.store offset=8
) )
(func $~lib/array/Array<i64>#__get (; 10 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) (func $~lib/array/Array<i64>#__set (; 8 ;) (type $FUNCSIG$v)
(local $1 i32)
get_local $0
i32.const 64
i32.load
tee_local $1
i32.load
i32.const 3
i32.shr_u
i32.lt_u
if (result i64)
get_local $1
get_local $0
i32.const 3
i32.shl
i32.add
i64.load offset=8
else
unreachable
end
)
(func $~lib/array/Array<i64>#__set (; 11 ;) (type $FUNCSIG$v)
(local $0 i32) (local $0 i32)
i32.const 0 i32.const 0
i32.const 64 i32.const 64
@ -1628,28 +1581,7 @@
i64.const 4 i64.const 4
i64.store offset=8 i64.store offset=8
) )
(func $~lib/array/Array<f32>#__get (; 12 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (func $~lib/array/Array<f32>#__set (; 9 ;) (type $FUNCSIG$v)
(local $1 i32)
get_local $0
i32.const 88
i32.load
tee_local $1
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result f32)
get_local $1
get_local $0
i32.const 2
i32.shl
i32.add
f32.load offset=8
else
unreachable
end
)
(func $~lib/array/Array<f32>#__set (; 13 ;) (type $FUNCSIG$v)
(local $0 i32) (local $0 i32)
i32.const 0 i32.const 0
i32.const 88 i32.const 88
@ -1674,28 +1606,7 @@
f32.const 2.5 f32.const 2.5
f32.store offset=8 f32.store offset=8
) )
(func $~lib/array/Array<f64>#__get (; 14 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (func $~lib/array/Array<f64>#__set (; 10 ;) (type $FUNCSIG$v)
(local $1 i32)
get_local $0
i32.const 128
i32.load
tee_local $1
i32.load
i32.const 3
i32.shr_u
i32.lt_u
if (result f64)
get_local $1
get_local $0
i32.const 3
i32.shl
i32.add
f64.load offset=8
else
unreachable
end
)
(func $~lib/array/Array<f64>#__set (; 15 ;) (type $FUNCSIG$v)
(local $0 i32) (local $0 i32)
i32.const 0 i32.const 0
i32.const 128 i32.const 128
@ -1720,7 +1631,8 @@
f64.const 2.25 f64.const 2.25
f64.store offset=8 f64.store offset=8
) )
(func $start (; 16 ;) (type $v) (func $start (; 11 ;) (type $v)
(local $0 i32)
i32.const 280 i32.const 280
set_global $~lib/allocator/arena/startOffset set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset get_global $~lib/allocator/arena/startOffset
@ -1738,7 +1650,20 @@
unreachable unreachable
end end
i32.const 0 i32.const 0
call $~lib/array/Array<i32>#__get i32.const 24
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.load offset=8
else
unreachable
end
tee_local $0
i32.const 1 i32.const 1
i32.ne i32.ne
if if
@ -1750,7 +1675,22 @@
unreachable unreachable
end end
i32.const 1 i32.const 1
call $~lib/array/Array<i32>#__get i32.const 24
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.const 4
i32.add
i32.load offset=8
else
unreachable
end
tee_local $0
i32.const 2 i32.const 2
i32.ne i32.ne
if if
@ -1763,7 +1703,20 @@
end end
call $~lib/array/Array<i32>#__set call $~lib/array/Array<i32>#__set
i32.const 0 i32.const 0
call $~lib/array/Array<i32>#__get i32.const 24
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
i32.load offset=8
else
unreachable
end
tee_local $0
i32.const 2 i32.const 2
i32.ne i32.ne
if if
@ -1787,7 +1740,19 @@
unreachable unreachable
end end
i32.const 0 i32.const 0
call $~lib/array/Array<i64>#__get i32.const 64
i32.load
tee_local $0
i32.load
i32.const 3
i32.shr_u
i32.lt_u
if (result i64)
get_local $0
i64.load offset=8
else
unreachable
end
i64.const 3 i64.const 3
i64.ne i64.ne
if if
@ -1799,7 +1764,21 @@
unreachable unreachable
end end
i32.const 1 i32.const 1
call $~lib/array/Array<i64>#__get i32.const 64
i32.load
tee_local $0
i32.load
i32.const 3
i32.shr_u
i32.lt_u
if (result i64)
get_local $0
i32.const 8
i32.add
i64.load offset=8
else
unreachable
end
i64.const 4 i64.const 4
i64.ne i64.ne
if if
@ -1812,7 +1791,19 @@
end end
call $~lib/array/Array<i64>#__set call $~lib/array/Array<i64>#__set
i32.const 0 i32.const 0
call $~lib/array/Array<i64>#__get i32.const 64
i32.load
tee_local $0
i32.load
i32.const 3
i32.shr_u
i32.lt_u
if (result i64)
get_local $0
i64.load offset=8
else
unreachable
end
i64.const 4 i64.const 4
i64.ne i64.ne
if if
@ -1836,7 +1827,19 @@
unreachable unreachable
end end
i32.const 0 i32.const 0
call $~lib/array/Array<f32>#__get i32.const 88
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result f32)
get_local $0
f32.load offset=8
else
unreachable
end
f32.const 1.5 f32.const 1.5
f32.ne f32.ne
if if
@ -1848,7 +1851,21 @@
unreachable unreachable
end end
i32.const 1 i32.const 1
call $~lib/array/Array<f32>#__get i32.const 88
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result f32)
get_local $0
i32.const 4
i32.add
f32.load offset=8
else
unreachable
end
f32.const 2.5 f32.const 2.5
f32.ne f32.ne
if if
@ -1861,7 +1878,19 @@
end end
call $~lib/array/Array<f32>#__set call $~lib/array/Array<f32>#__set
i32.const 0 i32.const 0
call $~lib/array/Array<f32>#__get i32.const 88
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result f32)
get_local $0
f32.load offset=8
else
unreachable
end
f32.const 2.5 f32.const 2.5
f32.ne f32.ne
if if
@ -1885,7 +1914,19 @@
unreachable unreachable
end end
i32.const 0 i32.const 0
call $~lib/array/Array<f64>#__get i32.const 128
i32.load
tee_local $0
i32.load
i32.const 3
i32.shr_u
i32.lt_u
if (result f64)
get_local $0
f64.load offset=8
else
unreachable
end
f64.const 1.25 f64.const 1.25
f64.ne f64.ne
if if
@ -1897,7 +1938,21 @@
unreachable unreachable
end end
i32.const 1 i32.const 1
call $~lib/array/Array<f64>#__get i32.const 128
i32.load
tee_local $0
i32.load
i32.const 3
i32.shr_u
i32.lt_u
if (result f64)
get_local $0
i32.const 8
i32.add
f64.load offset=8
else
unreachable
end
f64.const 2.25 f64.const 2.25
f64.ne f64.ne
if if
@ -1910,7 +1965,19 @@
end end
call $~lib/array/Array<f64>#__set call $~lib/array/Array<f64>#__set
i32.const 0 i32.const 0
call $~lib/array/Array<f64>#__get i32.const 128
i32.load
tee_local $0
i32.load
i32.const 3
i32.shr_u
i32.lt_u
if (result f64)
get_local $0
f64.load offset=8
else
unreachable
end
f64.const 2.25 f64.const 2.25
f64.ne f64.ne
if if
@ -1922,7 +1989,7 @@
unreachable unreachable
end end
) )
(func $null (; 17 ;) (type $v) (func $null (; 12 ;) (type $v)
nop nop
) )
) )

View File

@ -4,7 +4,6 @@
(type $iii (func (param i32 i32) (result i32))) (type $iii (func (param i32 i32) (result i32)))
(type $iiiv (func (param i32 i32 i32))) (type $iiiv (func (param i32 i32 i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$v (func))
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
@ -1523,10 +1522,7 @@
end end
end end
) )
(func $~lib/allocator/arena/__memory_free (; 7 ;) (type $FUNCSIG$v) (func $~lib/string/String.fromUTF8 (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
nop
)
(func $~lib/string/String.fromUTF8 (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -1550,34 +1546,33 @@
i32.lt_u i32.lt_u
if if
get_local $2 get_local $2
tee_local $4 tee_local $3
i32.const 1 i32.const 1
i32.add i32.add
set_local $2 set_local $2
get_local $0 get_local $0
get_local $4 get_local $3
i32.add i32.add
i32.load8_u i32.load8_u
tee_local $4 tee_local $3
i32.const 128 i32.const 128
i32.lt_u i32.lt_u
if if (result i32)
get_local $6 get_local $6
get_local $3
i32.add
get_local $4 get_local $4
i32.store16 i32.add
get_local $3 get_local $3
i32.store16
get_local $4
i32.const 2 i32.const 2
i32.add i32.add
set_local $3
else else
get_local $4 get_local $3
i32.const 191 i32.const 191
i32.gt_u i32.gt_u
tee_local $5 tee_local $5
if if
get_local $4 get_local $3
i32.const 224 i32.const 224
i32.lt_u i32.lt_u
set_local $5 set_local $5
@ -1603,9 +1598,9 @@
i32.add i32.add
set_local $2 set_local $2
get_local $6 get_local $6
get_local $3
i32.add
get_local $4 get_local $4
i32.add
get_local $3
i32.const 31 i32.const 31
i32.and i32.and
i32.const 6 i32.const 6
@ -1618,17 +1613,13 @@
i32.and i32.and
i32.or i32.or
i32.store16 i32.store16
get_local $3
i32.const 2
i32.add
set_local $3
else else
get_local $4 get_local $3
i32.const 239 i32.const 239
i32.gt_u i32.gt_u
tee_local $5 tee_local $5
if if
get_local $4 get_local $3
i32.const 365 i32.const 365
i32.lt_u i32.lt_u
set_local $5 set_local $5
@ -1649,9 +1640,9 @@
unreachable unreachable
end end
get_local $6 get_local $6
get_local $3
i32.add
get_local $4 get_local $4
i32.add
get_local $3
i32.const 7 i32.const 7
i32.and i32.and
i32.const 18 i32.const 18
@ -1666,7 +1657,6 @@
i32.const 12 i32.const 12
i32.shl i32.shl
i32.or i32.or
tee_local $4
get_local $0 get_local $0
get_local $2 get_local $2
i32.const 1 i32.const 1
@ -1679,13 +1669,12 @@
i32.const 6 i32.const 6
i32.shl i32.shl
i32.or i32.or
tee_local $4 tee_local $3
get_local $0 get_local $0
get_local $2 get_local $2
i32.const 1 i32.const 1
i32.add i32.add
tee_local $2 tee_local $2
tee_local $5
i32.add i32.add
i32.load8_u i32.load8_u
i32.const 63 i32.const 63
@ -1693,19 +1682,19 @@
i32.or i32.or
i32.const 65536 i32.const 65536
i32.sub i32.sub
tee_local $4 tee_local $3
i32.const 10 i32.const 10
i32.shr_u i32.shr_u
i32.const 55296 i32.const 55296
i32.add i32.add
i32.store16 i32.store16
get_local $6 get_local $6
get_local $3 get_local $4
i32.const 2 i32.const 2
i32.add i32.add
tee_local $3 tee_local $4
i32.add i32.add
get_local $4 get_local $3
i32.const 1023 i32.const 1023
i32.and i32.and
i32.const 56320 i32.const 56320
@ -1726,9 +1715,9 @@
unreachable unreachable
end end
get_local $6 get_local $6
get_local $3
i32.add
get_local $4 get_local $4
i32.add
get_local $3
i32.const 15 i32.const 15
i32.and i32.and
i32.const 12 i32.const 12
@ -1743,13 +1732,12 @@
i32.const 6 i32.const 6
i32.shl i32.shl
i32.or i32.or
tee_local $4 tee_local $3
get_local $0 get_local $0
get_local $2 get_local $2
i32.const 1 i32.const 1
i32.add i32.add
tee_local $2 tee_local $2
tee_local $5
i32.add i32.add
i32.load8_u i32.load8_u
i32.const 63 i32.const 63
@ -1757,16 +1745,16 @@
i32.or i32.or
i32.store16 i32.store16
end end
get_local $3
i32.const 2
i32.add
set_local $3
get_local $2 get_local $2
i32.const 1 i32.const 1
i32.add i32.add
set_local $2 set_local $2
end end
get_local $4
i32.const 2
i32.add
end end
set_local $4
br $continue|0 br $continue|0
end end
end end
@ -1781,21 +1769,19 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
get_local $3 get_local $4
i32.const 1 i32.const 1
i32.shr_u i32.shr_u
call $~lib/internal/string/allocateUnsafe call $~lib/internal/string/allocateUnsafe
tee_local $0 tee_local $0
i32.const 4 i32.const 4
i32.add i32.add
tee_local $4
get_local $6 get_local $6
get_local $3 get_local $4
call $~lib/internal/memory/memmove call $~lib/internal/memory/memmove
call $~lib/allocator/arena/__memory_free
get_local $0 get_local $0
) )
(func $~lib/internal/string/compareUnsafe (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/internal/string/compareUnsafe (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
get_local $0 get_local $0
@ -1832,7 +1818,7 @@
end end
get_local $4 get_local $4
) )
(func $~lib/string/String.__eq (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/string/String.__eq (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
get_local $0 get_local $0
get_local $1 get_local $1
@ -1871,7 +1857,7 @@
call $~lib/internal/string/compareUnsafe call $~lib/internal/string/compareUnsafe
i32.eqz i32.eqz
) )
(func $start (; 11 ;) (type $v) (func $start (; 10 ;) (type $v)
i32.const 192 i32.const 192
set_global $~lib/allocator/arena/startOffset set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset get_global $~lib/allocator/arena/startOffset
@ -2115,9 +2101,8 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
call $~lib/allocator/arena/__memory_free
) )
(func $null (; 12 ;) (type $v) (func $null (; 11 ;) (type $v)
nop nop
) )
) )

File diff suppressed because it is too large Load Diff

View File

@ -7,9 +7,9 @@
(type $iii (func (param i32 i32) (result i32))) (type $iii (func (param i32 i32) (result i32)))
(type $iiv (func (param i32 i32))) (type $iiv (func (param i32 i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
@ -35,21 +35,7 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $~lib/symbol/Symbol (; 1 ;) (type $FUNCSIG$i) (result i32) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32)
(local $0 i32)
get_global $~lib/symbol/nextId
tee_local $0
i32.const 1
i32.add
set_global $~lib/symbol/nextId
get_local $0
i32.eqz
if
unreachable
end
get_local $0
)
(func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -111,21 +97,7 @@
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
get_local $1 get_local $1
) )
(func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $ii) (param $0 i32) (result i32)
i32.const 24
call $~lib/allocator/arena/__memory_allocate
)
(func $~lib/internal/arraybuffer/computeSize (; 4 ;) (type $ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
get_local $0
i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
)
(func $~lib/internal/arraybuffer/allocateUnsafe (; 5 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
get_local $0 get_local $0
i32.const 1073741816 i32.const 1073741816
@ -138,15 +110,21 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 1
i32.const 32
get_local $0 get_local $0
call $~lib/internal/arraybuffer/computeSize i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
tee_local $1 tee_local $1
get_local $0 get_local $0
i32.store i32.store
get_local $1 get_local $1
) )
(func $~lib/internal/memory/memset (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (func $~lib/internal/memory/memset (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
get_local $1 get_local $1
i32.eqz i32.eqz
@ -365,7 +343,7 @@
end end
end end
) )
(func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/arraybuffer/ArrayBuffer#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
get_local $0 get_local $0
i32.const 1073741816 i32.const 1073741816
@ -394,24 +372,19 @@
end end
get_local $2 get_local $2
) )
(func $~lib/map/Map<String,usize>#clear (; 8 ;) (type $iv) (param $0 i32) (func $~lib/map/Map<String,usize>#clear (; 5 ;) (type $iv) (param $0 i32)
(local $1 i32) get_local $0
i32.const 16 i32.const 16
i32.const 0 i32.const 0
call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/arraybuffer/ArrayBuffer#constructor
set_local $1
get_local $0
get_local $1
i32.store i32.store
get_local $0 get_local $0
i32.const 3 i32.const 3
i32.store offset=4 i32.store offset=4
get_local $0
i32.const 48 i32.const 48
i32.const 1 i32.const 1
call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/arraybuffer/ArrayBuffer#constructor
set_local $1
get_local $0
get_local $1
i32.store offset=8 i32.store offset=8
get_local $0 get_local $0
i32.const 4 i32.const 4
@ -423,9 +396,10 @@
i32.const 0 i32.const 0
i32.store offset=20 i32.store offset=20
) )
(func $~lib/map/Map<String,usize>#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) (func $~lib/map/Map<String,usize>#constructor (; 6 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32) (local $0 i32)
call $~lib/memory/memory.allocate i32.const 24
call $~lib/allocator/arena/__memory_allocate
tee_local $0 tee_local $0
i32.const 0 i32.const 0
i32.store i32.store
@ -448,7 +422,7 @@
call $~lib/map/Map<String,usize>#clear call $~lib/map/Map<String,usize>#clear
get_local $0 get_local $0
) )
(func $~lib/internal/hash/hashStr (; 10 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/hash/hashStr (; 7 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -485,7 +459,7 @@
end end
get_local $2 get_local $2
) )
(func $~lib/internal/string/compareUnsafe (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/internal/string/compareUnsafe (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
get_local $0 get_local $0
@ -522,7 +496,7 @@
end end
get_local $4 get_local $4
) )
(func $~lib/string/String.__eq (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/string/String.__eq (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
get_local $0 get_local $0
get_local $1 get_local $1
@ -561,7 +535,7 @@
call $~lib/internal/string/compareUnsafe call $~lib/internal/string/compareUnsafe
i32.eqz i32.eqz
) )
(func $~lib/map/Map<String,usize>#find (; 13 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/map/Map<String,usize>#find (; 10 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
get_local $0 get_local $0
i32.load i32.load
get_local $2 get_local $2
@ -604,37 +578,7 @@
end end
i32.const 0 i32.const 0
) )
(func $~lib/map/Map<String,usize>#has (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/map/Map<String,usize>#rehash (; 11 ;) (type $iiv) (param $0 i32) (param $1 i32)
(local $2 i32)
get_local $1
call $~lib/internal/hash/hashStr
set_local $2
get_local $0
get_local $1
get_local $2
call $~lib/map/Map<String,usize>#find
i32.const 0
i32.ne
)
(func $~lib/map/Map<String,usize>#get (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
get_local $1
call $~lib/internal/hash/hashStr
set_local $2
get_local $0
get_local $1
get_local $2
call $~lib/map/Map<String,usize>#find
tee_local $0
if (result i32)
get_local $0
i32.load offset=4
else
unreachable
end
tee_local $0
)
(func $~lib/map/Map<String,usize>#rehash (; 16 ;) (type $iiv) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -650,109 +594,106 @@
i32.shl i32.shl
i32.const 0 i32.const 0
call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/arraybuffer/ArrayBuffer#constructor
set_local $5 set_local $4
get_local $2 get_local $2
f64.convert_s/i32 f64.convert_s/i32
f64.const 2.6666666666666665 f64.const 2.6666666666666665
f64.mul f64.mul
i32.trunc_s/f64 i32.trunc_s/f64
tee_local $7 tee_local $6
i32.const 12 i32.const 12
i32.mul i32.mul
i32.const 1 i32.const 1
call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/arraybuffer/ArrayBuffer#constructor
set_local $6 set_local $5
get_local $0 get_local $0
i32.load offset=8 i32.load offset=8
i32.const 8 i32.const 8
i32.add i32.add
tee_local $3 tee_local $2
get_local $0 get_local $0
i32.load offset=16 i32.load offset=16
i32.const 12 i32.const 12
i32.mul i32.mul
i32.add i32.add
set_local $8 set_local $7
get_local $6 get_local $5
i32.const 8 i32.const 8
i32.add i32.add
set_local $2 set_local $3
loop $continue|0 loop $continue|0
get_local $3 get_local $2
get_local $8 get_local $7
i32.ne i32.ne
if if
get_local $3 get_local $2
i32.load offset=8 i32.load offset=8
i32.const 1 i32.const 1
i32.and i32.and
i32.eqz i32.eqz
if if
get_local $2
get_local $3 get_local $3
get_local $2
i32.load i32.load
i32.store i32.store
get_local $2
get_local $3 get_local $3
get_local $2
i32.load offset=4 i32.load offset=4
i32.store offset=4 i32.store offset=4
get_local $3 get_local $3
get_local $4
get_local $2
i32.load i32.load
call $~lib/internal/hash/hashStr call $~lib/internal/hash/hashStr
set_local $4
get_local $2
get_local $5
get_local $4
get_local $1 get_local $1
i32.and i32.and
i32.const 2 i32.const 2
i32.shl i32.shl
i32.add i32.add
tee_local $4 tee_local $8
i32.load offset=8 i32.load offset=8
i32.store offset=8 i32.store offset=8
get_local $4 get_local $8
get_local $2 get_local $3
i32.store offset=8 i32.store offset=8
get_local $2
i32.const 12
i32.add
set_local $2
end
get_local $3 get_local $3
i32.const 12 i32.const 12
i32.add i32.add
set_local $3 set_local $3
end
get_local $2
i32.const 12
i32.add
set_local $2
br $continue|0 br $continue|0
end end
end end
get_local $0 get_local $0
get_local $5 get_local $4
i32.store i32.store
get_local $0 get_local $0
get_local $1 get_local $1
i32.store offset=4 i32.store offset=4
get_local $0 get_local $0
get_local $6 get_local $5
i32.store offset=8 i32.store offset=8
get_local $0 get_local $0
get_local $7 get_local $6
i32.store offset=12 i32.store offset=12
get_local $0 get_local $0
get_local $0 get_local $0
i32.load offset=20 i32.load offset=20
i32.store offset=16 i32.store offset=16
) )
(func $~lib/map/Map<String,usize>#set (; 17 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/map/Map<String,usize>#set (; 12 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
get_local $1
call $~lib/internal/hash/hashStr
set_local $5
get_local $0 get_local $0
get_local $1 get_local $1
get_local $5 get_local $1
call $~lib/internal/hash/hashStr
tee_local $5
call $~lib/map/Map<String,usize>#find call $~lib/map/Map<String,usize>#find
tee_local $3 tee_local $3
if if
@ -837,7 +778,7 @@
i32.store offset=8 i32.store offset=8
end end
) )
(func $~lib/internal/hash/hash32 (; 18 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/hash/hash32 (; 13 ;) (type $ii) (param $0 i32) (result i32)
get_local $0 get_local $0
i32.const 255 i32.const 255
i32.and i32.and
@ -868,7 +809,7 @@
i32.const 16777619 i32.const 16777619
i32.mul i32.mul
) )
(func $~lib/map/Map<usize,String>#find (; 19 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/map/Map<usize,String>#find (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
get_local $0 get_local $0
i32.load i32.load
get_local $2 get_local $2
@ -911,7 +852,7 @@
end end
i32.const 0 i32.const 0
) )
(func $~lib/map/Map<usize,String>#rehash (; 20 ;) (type $iiv) (param $0 i32) (param $1 i32) (func $~lib/map/Map<usize,String>#rehash (; 15 ;) (type $iiv) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -927,109 +868,106 @@
i32.shl i32.shl
i32.const 0 i32.const 0
call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/arraybuffer/ArrayBuffer#constructor
set_local $5 set_local $4
get_local $2 get_local $2
f64.convert_s/i32 f64.convert_s/i32
f64.const 2.6666666666666665 f64.const 2.6666666666666665
f64.mul f64.mul
i32.trunc_s/f64 i32.trunc_s/f64
tee_local $7 tee_local $6
i32.const 12 i32.const 12
i32.mul i32.mul
i32.const 1 i32.const 1
call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/arraybuffer/ArrayBuffer#constructor
set_local $6 set_local $5
get_local $0 get_local $0
i32.load offset=8 i32.load offset=8
i32.const 8 i32.const 8
i32.add i32.add
tee_local $3 tee_local $2
get_local $0 get_local $0
i32.load offset=16 i32.load offset=16
i32.const 12 i32.const 12
i32.mul i32.mul
i32.add i32.add
set_local $8 set_local $7
get_local $6 get_local $5
i32.const 8 i32.const 8
i32.add i32.add
set_local $2 set_local $3
loop $continue|0 loop $continue|0
get_local $3 get_local $2
get_local $8 get_local $7
i32.ne i32.ne
if if
get_local $3 get_local $2
i32.load offset=8 i32.load offset=8
i32.const 1 i32.const 1
i32.and i32.and
i32.eqz i32.eqz
if if
get_local $2
get_local $3 get_local $3
get_local $2
i32.load i32.load
i32.store i32.store
get_local $2
get_local $3 get_local $3
get_local $2
i32.load offset=4 i32.load offset=4
i32.store offset=4 i32.store offset=4
get_local $3 get_local $3
get_local $4
get_local $2
i32.load i32.load
call $~lib/internal/hash/hash32 call $~lib/internal/hash/hash32
set_local $4
get_local $2
get_local $5
get_local $4
get_local $1 get_local $1
i32.and i32.and
i32.const 2 i32.const 2
i32.shl i32.shl
i32.add i32.add
tee_local $4 tee_local $8
i32.load offset=8 i32.load offset=8
i32.store offset=8 i32.store offset=8
get_local $4 get_local $8
get_local $2 get_local $3
i32.store offset=8 i32.store offset=8
get_local $2
i32.const 12
i32.add
set_local $2
end
get_local $3 get_local $3
i32.const 12 i32.const 12
i32.add i32.add
set_local $3 set_local $3
end
get_local $2
i32.const 12
i32.add
set_local $2
br $continue|0 br $continue|0
end end
end end
get_local $0 get_local $0
get_local $5 get_local $4
i32.store i32.store
get_local $0 get_local $0
get_local $1 get_local $1
i32.store offset=4 i32.store offset=4
get_local $0 get_local $0
get_local $6 get_local $5
i32.store offset=8 i32.store offset=8
get_local $0 get_local $0
get_local $7 get_local $6
i32.store offset=12 i32.store offset=12
get_local $0 get_local $0
get_local $0 get_local $0
i32.load offset=20 i32.load offset=20
i32.store offset=16 i32.store offset=16
) )
(func $~lib/map/Map<usize,String>#set (; 21 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/map/Map<usize,String>#set (; 16 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
get_local $1
call $~lib/internal/hash/hash32
set_local $5
get_local $0 get_local $0
get_local $1 get_local $1
get_local $5 get_local $1
call $~lib/internal/hash/hash32
tee_local $5
call $~lib/map/Map<usize,String>#find call $~lib/map/Map<usize,String>#find
tee_local $3 tee_local $3
if if
@ -1114,17 +1052,29 @@
i32.store offset=8 i32.store offset=8
end end
) )
(func $~lib/symbol/Symbol.for (; 22 ;) (type $FUNCSIG$i) (result i32) (func $~lib/symbol/Symbol.for (; 17 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32) (local $0 i32)
get_global $~lib/symbol/stringToId get_global $~lib/symbol/stringToId
if if
get_global $~lib/symbol/stringToId get_global $~lib/symbol/stringToId
i32.const 8 i32.const 8
call $~lib/map/Map<String,usize>#has i32.const 8
call $~lib/internal/hash/hashStr
call $~lib/map/Map<String,usize>#find
if if
get_global $~lib/symbol/stringToId get_global $~lib/symbol/stringToId
i32.const 8 i32.const 8
call $~lib/map/Map<String,usize>#get i32.const 8
call $~lib/internal/hash/hashStr
call $~lib/map/Map<String,usize>#find
tee_local $0
if (result i32)
get_local $0
i32.load offset=4
else
unreachable
end
tee_local $0
return return
end end
else else
@ -1153,37 +1103,7 @@
call $~lib/map/Map<usize,String>#set call $~lib/map/Map<usize,String>#set
get_local $0 get_local $0
) )
(func $~lib/map/Map<usize,String>#has (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/symbol/Symbol.keyFor (; 18 ;) (type $ii) (param $0 i32) (result i32)
(local $2 i32)
get_local $1
call $~lib/internal/hash/hash32
set_local $2
get_local $0
get_local $1
get_local $2
call $~lib/map/Map<usize,String>#find
i32.const 0
i32.ne
)
(func $~lib/map/Map<usize,String>#get (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
get_local $1
call $~lib/internal/hash/hash32
set_local $2
get_local $0
get_local $1
get_local $2
call $~lib/map/Map<usize,String>#find
tee_local $0
if (result i32)
get_local $0
i32.load offset=4
else
unreachable
end
tee_local $0
)
(func $~lib/symbol/Symbol.keyFor (; 25 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
get_global $~lib/symbol/idToString get_global $~lib/symbol/idToString
i32.const 0 i32.const 0
@ -1192,27 +1112,61 @@
if if
get_global $~lib/symbol/idToString get_global $~lib/symbol/idToString
get_local $0 get_local $0
call $~lib/map/Map<usize,String>#has get_local $0
call $~lib/internal/hash/hash32
call $~lib/map/Map<usize,String>#find
i32.const 0
i32.ne
set_local $1 set_local $1
end end
get_local $1 get_local $1
if (result i32) if (result i32)
get_global $~lib/symbol/idToString get_global $~lib/symbol/idToString
get_local $0 get_local $0
call $~lib/map/Map<usize,String>#get get_local $0
call $~lib/internal/hash/hash32
call $~lib/map/Map<usize,String>#find
tee_local $0
if (result i32)
get_local $0
i32.load offset=4
else
unreachable
end
else else
i32.const 0 i32.const 0
end end
tee_local $0 tee_local $0
) )
(func $start (; 26 ;) (type $v) (func $start (; 19 ;) (type $v)
(local $0 i32)
i32.const 168 i32.const 168
set_global $~lib/allocator/arena/startOffset set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset get_global $~lib/allocator/arena/startOffset
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
call $~lib/symbol/Symbol get_global $~lib/symbol/nextId
tee_local $0
i32.const 1
i32.add
set_global $~lib/symbol/nextId
get_local $0
i32.eqz
if
unreachable
end
get_local $0
set_global $std/symbol/sym1 set_global $std/symbol/sym1
call $~lib/symbol/Symbol get_global $~lib/symbol/nextId
tee_local $0
i32.const 1
i32.add
set_global $~lib/symbol/nextId
get_local $0
i32.eqz
if
unreachable
end
get_local $0
set_global $std/symbol/sym2 set_global $std/symbol/sym2
get_global $std/symbol/sym1 get_global $std/symbol/sym1
get_global $std/symbol/sym2 get_global $std/symbol/sym2
@ -1295,7 +1249,7 @@
unreachable unreachable
end end
) )
(func $null (; 27 ;) (type $v) (func $null (; 20 ;) (type $v)
nop nop
) )
) )

View File

@ -9,10 +9,8 @@
(type $iiF (func (param i32 i32) (result f64))) (type $iiF (func (param i32 i32) (result f64)))
(type $iiiii (func (param i32 i32 i32 i32) (result i32))) (type $iiiii (func (param i32 i32 i32 i32) (result i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
@ -63,17 +61,7 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $~lib/internal/arraybuffer/computeSize (; 1 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
get_local $0
i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
)
(func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -135,7 +123,7 @@
set_global $~lib/allocator/arena/offset set_global $~lib/allocator/arena/offset
get_local $1 get_local $1
) )
(func $~lib/internal/arraybuffer/allocateUnsafe (; 3 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
get_local $0 get_local $0
i32.const 1073741816 i32.const 1073741816
@ -148,15 +136,21 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 1
i32.const 32
get_local $0 get_local $0
call $~lib/internal/arraybuffer/computeSize i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
tee_local $1 tee_local $1
get_local $0 get_local $0
i32.store i32.store
get_local $1 get_local $1
) )
(func $~lib/internal/memory/memset (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/internal/memory/memset (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i64) (local $4 i64)
get_local $2 get_local $2
@ -391,11 +385,7 @@
end end
end end
) )
(func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$i) (result i32) (func $~lib/internal/typedarray/TypedArray<i8,i32>#constructor (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 12
call $~lib/allocator/arena/__memory_allocate
)
(func $~lib/internal/typedarray/TypedArray<i8,i32>#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
get_local $0 get_local $0
@ -417,7 +407,8 @@
i32.const 0 i32.const 0
get_local $0 get_local $0
call $~lib/internal/memory/memset call $~lib/internal/memory/memset
call $~lib/memory/memory.allocate i32.const 12
call $~lib/allocator/arena/__memory_allocate
tee_local $1 tee_local $1
i32.const 0 i32.const 0
i32.store i32.store
@ -438,7 +429,7 @@
i32.store offset=8 i32.store offset=8
get_local $1 get_local $1
) )
(func $~lib/internal/typedarray/TypedArray<i16,i32>#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i16,i32>#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
get_local $0 get_local $0
@ -463,7 +454,8 @@
i32.const 0 i32.const 0
get_local $0 get_local $0
call $~lib/internal/memory/memset call $~lib/internal/memory/memset
call $~lib/memory/memory.allocate i32.const 12
call $~lib/allocator/arena/__memory_allocate
tee_local $1 tee_local $1
i32.const 0 i32.const 0
i32.store i32.store
@ -484,7 +476,7 @@
i32.store offset=8 i32.store offset=8
get_local $1 get_local $1
) )
(func $~lib/internal/typedarray/TypedArray<i32,i32>#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i32,i32>#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
get_local $0 get_local $0
@ -509,7 +501,8 @@
i32.const 0 i32.const 0
get_local $0 get_local $0
call $~lib/internal/memory/memset call $~lib/internal/memory/memset
call $~lib/memory/memory.allocate i32.const 12
call $~lib/allocator/arena/__memory_allocate
tee_local $1 tee_local $1
i32.const 0 i32.const 0
i32.store i32.store
@ -530,7 +523,7 @@
i32.store offset=8 i32.store offset=8
get_local $1 get_local $1
) )
(func $~lib/internal/typedarray/TypedArray<i64,i64>#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i64,i64>#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
get_local $0 get_local $0
@ -555,7 +548,8 @@
i32.const 0 i32.const 0
get_local $0 get_local $0
call $~lib/internal/memory/memset call $~lib/internal/memory/memset
call $~lib/memory/memory.allocate i32.const 12
call $~lib/allocator/arena/__memory_allocate
tee_local $1 tee_local $1
i32.const 0 i32.const 0
i32.store i32.store
@ -576,7 +570,7 @@
i32.store offset=8 i32.store offset=8
get_local $1 get_local $1
) )
(func $std/typedarray/testInstantiate (; 10 ;) (type $iv) (param $0 i32) (func $std/typedarray/testInstantiate (; 8 ;) (type $iv) (param $0 i32)
(local $1 i32) (local $1 i32)
get_local $0 get_local $0
call $~lib/internal/typedarray/TypedArray<i8,i32>#constructor call $~lib/internal/typedarray/TypedArray<i8,i32>#constructor
@ -1007,7 +1001,7 @@
unreachable unreachable
end end
) )
(func $~lib/internal/typedarray/TypedArray<i32,i32>#__set (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/internal/typedarray/TypedArray<i32,i32>#__set (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
get_local $1 get_local $1
get_local $0 get_local $0
i32.load offset=8 i32.load offset=8
@ -1034,7 +1028,7 @@
get_local $2 get_local $2
i32.store offset=8 i32.store offset=8
) )
(func $~lib/internal/typedarray/TypedArray<i32,i32>#__get (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i32,i32>#__get (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $1 get_local $1
get_local $0 get_local $0
i32.load offset=8 i32.load offset=8
@ -1060,7 +1054,7 @@
i32.add i32.add
i32.load offset=8 i32.load offset=8
) )
(func $~lib/typedarray/Int32Array#subarray (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/typedarray/Int32Array#subarray (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
i32.const 1 i32.const 1
@ -1122,7 +1116,7 @@
i32.store offset=8 i32.store offset=8
get_local $2 get_local $2
) )
(func $~lib/internal/typedarray/TypedArray<f64,f64>#__set (; 14 ;) (type $iiFv) (param $0 i32) (param $1 i32) (param $2 f64) (func $~lib/internal/typedarray/TypedArray<f64,f64>#__set (; 12 ;) (type $iiFv) (param $0 i32) (param $1 i32) (param $2 f64)
get_local $1 get_local $1
get_local $0 get_local $0
i32.load offset=8 i32.load offset=8
@ -1149,7 +1143,7 @@
get_local $2 get_local $2
f64.store offset=8 f64.store offset=8
) )
(func $~lib/typedarray/Float64Array#subarray (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/typedarray/Float64Array#subarray (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -1197,7 +1191,7 @@
i32.store offset=8 i32.store offset=8
get_local $1 get_local $1
) )
(func $~lib/internal/array/insertionSort<f64> (; 16 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (func $~lib/internal/array/insertionSort<f64> (; 14 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
(local $6 f64) (local $6 f64)
@ -1287,16 +1281,14 @@
unreachable unreachable
end end
) )
(func $~lib/allocator/arena/__memory_free (; 17 ;) (type $FUNCSIG$v) (func $~lib/internal/array/weakHeapSort<f64> (; 15 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
nop
)
(func $~lib/internal/array/weakHeapSort<f64> (; 18 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
(local $6 i32) (local $6 i32)
(local $7 f64) (local $7 f64)
(local $8 i32) (local $8 f64)
(local $9 f64) (local $9 i32)
(local $10 i32)
get_local $2 get_local $2
i32.const 31 i32.const 31
i32.add i32.add
@ -1304,37 +1296,37 @@
i32.shr_s i32.shr_s
i32.const 2 i32.const 2
i32.shl i32.shl
tee_local $6 tee_local $4
call $~lib/allocator/arena/__memory_allocate call $~lib/allocator/arena/__memory_allocate
tee_local $8 tee_local $9
i32.const 0 i32.const 0
get_local $6 get_local $4
call $~lib/internal/memory/memset call $~lib/internal/memory/memset
block $break|0 block $break|0
get_local $2 get_local $2
i32.const 1 i32.const 1
i32.sub i32.sub
set_local $4 set_local $5
loop $repeat|0 loop $repeat|0
get_local $4 get_local $5
i32.const 0 i32.const 0
i32.le_s i32.le_s
br_if $break|0 br_if $break|0
get_local $4 get_local $5
set_local $6 set_local $4
loop $continue|1 loop $continue|1
get_local $6 get_local $4
i32.const 1 i32.const 1
i32.and i32.and
get_local $8 get_local $9
get_local $6 get_local $4
i32.const 6 i32.const 6
i32.shr_s i32.shr_s
i32.const 2 i32.const 2
i32.shl i32.shl
i32.add i32.add
i32.load i32.load
get_local $6 get_local $4
i32.const 1 i32.const 1
i32.shr_s i32.shr_s
i32.const 31 i32.const 31
@ -1344,29 +1336,28 @@
i32.and i32.and
i32.eq i32.eq
if if
get_local $6 get_local $4
i32.const 1 i32.const 1
i32.shr_s i32.shr_s
set_local $6 set_local $4
br $continue|1 br $continue|1
end end
end end
get_local $0 get_local $0
get_local $1 get_local $1
i32.add i32.add
get_local $6 tee_local $10
get_local $4
i32.const 1 i32.const 1
i32.shr_s i32.shr_s
tee_local $5 tee_local $6
i32.const 3 i32.const 3
i32.shl i32.shl
i32.add i32.add
f64.load offset=8 f64.load offset=8
set_local $9 set_local $8
get_local $0 get_local $10
get_local $1 get_local $5
i32.add
get_local $4
i32.const 3 i32.const 3
i32.shl i32.shl
i32.add i32.add
@ -1374,25 +1365,25 @@
set_local $7 set_local $7
i32.const 2 i32.const 2
set_global $~argc set_global $~argc
get_local $9 get_local $8
get_local $7 get_local $7
get_local $3 get_local $3
call_indirect (type $FFi) call_indirect (type $FFi)
i32.const 0 i32.const 0
i32.lt_s i32.lt_s
if if
get_local $8 get_local $9
get_local $4 get_local $5
i32.const 5 i32.const 5
i32.shr_s i32.shr_s
i32.const 2 i32.const 2
i32.shl i32.shl
i32.add i32.add
tee_local $6 tee_local $4
get_local $6 get_local $4
i32.load i32.load
i32.const 1 i32.const 1
get_local $4 get_local $5
i32.const 31 i32.const 31
i32.and i32.and
i32.shl i32.shl
@ -1401,26 +1392,25 @@
get_local $0 get_local $0
get_local $1 get_local $1
i32.add i32.add
get_local $4 tee_local $4
get_local $5
i32.const 3 i32.const 3
i32.shl i32.shl
i32.add i32.add
get_local $9 get_local $8
f64.store offset=8 f64.store offset=8
get_local $0 get_local $4
get_local $1 get_local $6
i32.add
get_local $5
i32.const 3 i32.const 3
i32.shl i32.shl
i32.add i32.add
get_local $7 get_local $7
f64.store offset=8 f64.store offset=8
end end
get_local $4 get_local $5
i32.const 1 i32.const 1
i32.sub i32.sub
set_local $4 set_local $5
br $repeat|0 br $repeat|0
unreachable unreachable
end end
@ -1430,98 +1420,89 @@
get_local $2 get_local $2
i32.const 1 i32.const 1
i32.sub i32.sub
set_local $4 set_local $5
loop $repeat|2 loop $repeat|2
get_local $4 get_local $5
i32.const 2 i32.const 2
i32.lt_s i32.lt_s
br_if $break|2 br_if $break|2
get_local $0 get_local $0
get_local $1 get_local $1
i32.add i32.add
tee_local $2
f64.load offset=8 f64.load offset=8
set_local $7 set_local $7
get_local $0 get_local $2
get_local $1 get_local $2
i32.add get_local $5
get_local $0
get_local $1
i32.add
get_local $4
i32.const 3 i32.const 3
i32.shl i32.shl
i32.add i32.add
tee_local $2
f64.load offset=8 f64.load offset=8
f64.store offset=8 f64.store offset=8
get_local $0 get_local $2
get_local $1
i32.add
get_local $4
i32.const 3
i32.shl
i32.add
get_local $7 get_local $7
f64.store offset=8 f64.store offset=8
i32.const 1 i32.const 1
set_local $5 set_local $6
loop $continue|3 loop $continue|3
get_local $5 get_local $6
i32.const 1 i32.const 1
i32.shl i32.shl
get_local $8 get_local $9
get_local $5 get_local $6
i32.const 5 i32.const 5
i32.shr_s i32.shr_s
i32.const 2 i32.const 2
i32.shl i32.shl
i32.add i32.add
i32.load i32.load
get_local $5 get_local $6
i32.const 31 i32.const 31
i32.and i32.and
i32.shr_u i32.shr_u
i32.const 1 i32.const 1
i32.and i32.and
i32.add i32.add
tee_local $6 tee_local $4
get_local $4 get_local $5
i32.lt_s i32.lt_s
if if
get_local $6 get_local $4
set_local $5 set_local $6
br $continue|3 br $continue|3
end end
end end
loop $continue|4 loop $continue|4
get_local $5 get_local $6
i32.const 0 i32.const 0
i32.gt_s i32.gt_s
if if
get_local $0 get_local $0
get_local $1 get_local $1
i32.add i32.add
tee_local $2
f64.load offset=8 f64.load offset=8
set_local $7 set_local $7
get_local $0 get_local $2
get_local $1 get_local $6
i32.add
get_local $5
i32.const 3 i32.const 3
i32.shl i32.shl
i32.add i32.add
f64.load offset=8 f64.load offset=8
set_local $9 set_local $8
i32.const 2 i32.const 2
set_global $~argc set_global $~argc
get_local $7 get_local $7
get_local $9 get_local $8
get_local $3 get_local $3
call_indirect (type $FFi) call_indirect (type $FFi)
i32.const 0 i32.const 0
i32.lt_s i32.lt_s
if if
get_local $8 get_local $9
get_local $5 get_local $6
i32.const 5 i32.const 5
i32.shr_s i32.shr_s
i32.const 2 i32.const 2
@ -1531,7 +1512,7 @@
get_local $2 get_local $2
i32.load i32.load
i32.const 1 i32.const 1
get_local $5 get_local $6
i32.const 31 i32.const 31
i32.and i32.and
i32.shl i32.shl
@ -1540,59 +1521,51 @@
get_local $0 get_local $0
get_local $1 get_local $1
i32.add i32.add
get_local $5 tee_local $2
get_local $6
i32.const 3 i32.const 3
i32.shl i32.shl
i32.add i32.add
get_local $7 get_local $7
f64.store offset=8 f64.store offset=8
get_local $0 get_local $2
get_local $1 get_local $8
i32.add
get_local $9
f64.store offset=8 f64.store offset=8
end end
get_local $5 get_local $6
i32.const 1 i32.const 1
i32.shr_s i32.shr_s
set_local $5 set_local $6
br $continue|4 br $continue|4
end end
end end
get_local $4 get_local $5
i32.const 1 i32.const 1
i32.sub i32.sub
set_local $4 set_local $5
br $repeat|2 br $repeat|2
unreachable unreachable
end end
unreachable unreachable
end end
call $~lib/allocator/arena/__memory_free
get_local $0 get_local $0
get_local $1 get_local $1
i32.add i32.add
tee_local $0
i32.const 8 i32.const 8
i32.add i32.add
tee_local $1
f64.load offset=8 f64.load offset=8
set_local $7 set_local $7
get_local $0
get_local $1 get_local $1
i32.add
i32.const 8
i32.add
get_local $0 get_local $0
get_local $1
i32.add
f64.load offset=8 f64.load offset=8
f64.store offset=8 f64.store offset=8
get_local $0 get_local $0
get_local $1
i32.add
get_local $7 get_local $7
f64.store offset=8 f64.store offset=8
) )
(func $~lib/internal/typedarray/TypedArray<f64,f64>#sort (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<f64,f64>#sort (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -1674,7 +1647,7 @@
end end
get_local $0 get_local $0
) )
(func $~lib/internal/typedarray/TypedArray<f64,f64>#sort|trampoline~anonymous|1 (; 20 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32) (func $~lib/internal/typedarray/TypedArray<f64,f64>#sort|trampoline~anonymous|1 (; 17 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32)
(local $2 i64) (local $2 i64)
(local $3 i64) (local $3 i64)
get_local $0 get_local $0
@ -1703,24 +1676,7 @@
i64.lt_s i64.lt_s
i32.sub i32.sub
) )
(func $~lib/internal/typedarray/TypedArray<f64,f64>#sort|trampoline (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<f64,f64>#__get (; 18 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
(local $1 i32)
block $1of1
block $0of1
block $outOfRange
get_global $~argc
br_table $0of1 $1of1 $outOfRange
end
unreachable
end
i32.const 1
set_local $1
end
get_local $0
get_local $1
call $~lib/internal/typedarray/TypedArray<f64,f64>#sort
)
(func $~lib/internal/typedarray/TypedArray<f64,f64>#__get (; 22 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
get_local $1 get_local $1
get_local $0 get_local $0
i32.load offset=8 i32.load offset=8
@ -1746,7 +1702,7 @@
i32.add i32.add
f64.load offset=8 f64.load offset=8
) )
(func $~lib/internal/typedarray/TypedArray<u8,u32>#__set (; 23 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/internal/typedarray/TypedArray<u8,u32>#__set (; 19 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
get_local $1 get_local $1
get_local $0 get_local $0
i32.load offset=8 i32.load offset=8
@ -1769,7 +1725,7 @@
get_local $2 get_local $2
i32.store8 offset=8 i32.store8 offset=8
) )
(func $~lib/typedarray/Uint8ClampedArray#__set (; 24 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/typedarray/Uint8ClampedArray#__set (; 20 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
get_local $0 get_local $0
get_local $1 get_local $1
@ -1787,7 +1743,7 @@
select select
call $~lib/internal/typedarray/TypedArray<u8,u32>#__set call $~lib/internal/typedarray/TypedArray<u8,u32>#__set
) )
(func $~lib/internal/typedarray/TypedArray<u8,u32>#__get (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<u8,u32>#__get (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $1 get_local $1
get_local $0 get_local $0
i32.load offset=8 i32.load offset=8
@ -1809,7 +1765,7 @@
i32.add i32.add
i32.load8_u offset=8 i32.load8_u offset=8
) )
(func $~lib/internal/typedarray/TypedArray<i8,i32>#fill (; 26 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i8,i32>#fill (; 22 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
(local $6 i32) (local $6 i32)
@ -1886,7 +1842,7 @@
end end
get_local $0 get_local $0
) )
(func $~lib/internal/typedarray/TypedArray<i8,i32>#__get (; 27 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i8,i32>#__get (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $1 get_local $1
get_local $0 get_local $0
i32.load offset=8 i32.load offset=8
@ -1908,24 +1864,7 @@
i32.add i32.add
i32.load8_s offset=8 i32.load8_s offset=8
) )
(func $~lib/array/Array<i8>#__get (; 28 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/typedarray/isInt8ArrayEqual (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $1
get_local $0
i32.load
tee_local $0
i32.load
i32.lt_u
if (result i32)
get_local $0
get_local $1
i32.add
i32.load8_s offset=8
else
unreachable
end
tee_local $0
)
(func $std/typedarray/isInt8ArrayEqual (; 29 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -1942,30 +1881,37 @@
block $break|0 block $break|0
get_local $0 get_local $0
i32.load offset=8 i32.load offset=8
set_local $3 set_local $4
loop $repeat|0 loop $repeat|0
get_local $2 get_local $2
get_local $3 get_local $4
i32.ge_s i32.ge_s
br_if $break|0 br_if $break|0
get_local $0 get_local $0
get_local $2 get_local $2
call $~lib/internal/typedarray/TypedArray<i8,i32>#__get call $~lib/internal/typedarray/TypedArray<i8,i32>#__get
i32.const 24 i32.const 255
i32.shl i32.and
i32.const 24
i32.shr_s
set_local $4
get_local $1
get_local $2
call $~lib/array/Array<i8>#__get
i32.const 24
i32.shl
i32.const 24
i32.shr_s
set_local $5 set_local $5
get_local $4 get_local $2
get_local $1
i32.load
tee_local $3
i32.load
i32.lt_u
if (result i32)
get_local $3
get_local $2
i32.add
i32.load8_s offset=8
else
unreachable
end
set_local $3
get_local $5 get_local $5
get_local $3
i32.const 255
i32.and
i32.ne i32.ne
if if
i32.const 0 i32.const 0
@ -1984,7 +1930,7 @@
end end
i32.const 1 i32.const 1
) )
(func $~lib/internal/typedarray/TypedArray<i8,i32>#fill|trampoline (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i8,i32>#fill|trampoline (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
block $2of2 block $2of2
block $1of2 block $1of2
@ -2009,7 +1955,7 @@
get_local $3 get_local $3
call $~lib/internal/typedarray/TypedArray<i8,i32>#fill call $~lib/internal/typedarray/TypedArray<i8,i32>#fill
) )
(func $~lib/typedarray/Int8Array#subarray (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/typedarray/Int8Array#subarray (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -2051,7 +1997,7 @@
i32.store offset=8 i32.store offset=8
get_local $1 get_local $1
) )
(func $~lib/internal/typedarray/TypedArray<i32,i32>#fill (; 32 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i32,i32>#fill (; 27 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
(local $6 i32) (local $6 i32)
@ -2139,28 +2085,7 @@
end end
get_local $0 get_local $0
) )
(func $~lib/array/Array<i32>#__get (; 33 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/typedarray/isInt32ArrayEqual (; 28 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
get_local $1
get_local $0
i32.load
tee_local $0
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $0
get_local $1
i32.const 2
i32.shl
i32.add
i32.load offset=8
else
unreachable
end
tee_local $0
)
(func $std/typedarray/isInt32ArrayEqual (; 34 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -2181,22 +2106,37 @@
i32.load offset=8 i32.load offset=8
i32.const 2 i32.const 2
i32.shr_u i32.shr_u
set_local $3 set_local $4
loop $repeat|0 loop $repeat|0
get_local $2 get_local $2
get_local $3 get_local $4
i32.ge_s i32.ge_s
br_if $break|0 br_if $break|0
get_local $0 get_local $0
get_local $2 get_local $2
call $~lib/internal/typedarray/TypedArray<i32,i32>#__get call $~lib/internal/typedarray/TypedArray<i32,i32>#__get
set_local $4
get_local $1
get_local $2
call $~lib/array/Array<i32>#__get
set_local $5 set_local $5
get_local $4 get_local $2
get_local $1
i32.load
tee_local $3
i32.load
i32.const 2
i32.shr_u
i32.lt_u
if (result i32)
get_local $3
get_local $2
i32.const 2
i32.shl
i32.add
i32.load offset=8
else
unreachable
end
set_local $3
get_local $5 get_local $5
get_local $3
i32.ne i32.ne
if if
i32.const 0 i32.const 0
@ -2215,7 +2155,7 @@
end end
i32.const 1 i32.const 1
) )
(func $~lib/internal/typedarray/TypedArray<i32,i32>#fill|trampoline (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i32,i32>#fill|trampoline (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
block $2of2 block $2of2
block $1of2 block $1of2
@ -2240,8 +2180,9 @@
get_local $3 get_local $3
call $~lib/internal/typedarray/TypedArray<i32,i32>#fill call $~lib/internal/typedarray/TypedArray<i32,i32>#fill
) )
(func $start (; 36 ;) (type $v) (func $start (; 30 ;) (type $v)
(local $0 i32) (local $0 i32)
(local $1 i32)
i32.const 624 i32.const 624
set_global $~lib/allocator/arena/startOffset set_global $~lib/allocator/arena/startOffset
get_global $~lib/allocator/arena/startOffset get_global $~lib/allocator/arena/startOffset
@ -2474,7 +2415,21 @@
i32.const 0 i32.const 0
set_global $~argc set_global $~argc
get_global $std/typedarray/af64 get_global $std/typedarray/af64
call $~lib/internal/typedarray/TypedArray<f64,f64>#sort|trampoline set_local $1
block $1of1
block $0of1
block $outOfRange
get_global $~argc
br_table $0of1 $1of1 $outOfRange
end
unreachable
end
i32.const 1
set_local $0
end
get_local $1
get_local $0
call $~lib/internal/typedarray/TypedArray<f64,f64>#sort
drop drop
get_global $std/typedarray/af64 get_global $std/typedarray/af64
i32.const 0 i32.const 0
@ -2953,7 +2908,7 @@
call $~lib/internal/typedarray/TypedArray<i64,i64>#constructor call $~lib/internal/typedarray/TypedArray<i64,i64>#constructor
drop drop
) )
(func $null (; 37 ;) (type $v) (func $null (; 31 ;) (type $v)
nop nop
) )
) )

View File

@ -2,7 +2,6 @@
(type $ii (func (param i32) (result i32))) (type $ii (func (param i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $v (func)) (type $v (func))
(type $FUNCSIG$i (func (result i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\t\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s") (data (i32.const 8) "\t\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s")
@ -68,56 +67,7 @@
end end
i32.const 0 i32.const 0
) )
(func $switch/doSwitchBreakCase (; 3 ;) (type $ii) (param $0 i32) (result i32) (func $start (; 3 ;) (type $v)
block $break|0
get_local $0
i32.const 1
i32.eq
br_if $break|0
i32.const 2
return
end
i32.const 1
)
(func $switch/doSwitchBreakDefault (; 4 ;) (type $ii) (param $0 i32) (result i32)
block $break|0
block $case1|0
get_local $0
i32.const 1
i32.ne
br_if $break|0
i32.const 1
return
unreachable
end
unreachable
end
i32.const 2
)
(func $switch/doSwitchFallThroughCase (; 5 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.const 1
i32.ne
if
i32.const 2
return
end
i32.const 1
)
(func $switch/doSwitchFallThroughDefault (; 6 ;) (type $ii) (param $0 i32) (result i32)
get_local $0
i32.const 1
i32.eq
if
i32.const 1
return
end
i32.const 2
)
(func $switch/doSwitchEmpty (; 7 ;) (type $FUNCSIG$i) (result i32)
i32.const 2
)
(func $start (; 8 ;) (type $v)
i32.const 0 i32.const 0
call $switch/doSwitch call $switch/doSwitch
if if
@ -286,185 +236,8 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 0
call $switch/doSwitchBreakCase
i32.const 2
i32.ne
if
i32.const 0
i32.const 8
i32.const 51
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 1
call $switch/doSwitchBreakCase
i32.const 1
i32.ne
if
i32.const 0
i32.const 8
i32.const 52
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 2
call $switch/doSwitchBreakCase
i32.const 2
i32.ne
if
i32.const 0
i32.const 8
i32.const 53
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 0
call $switch/doSwitchBreakDefault
i32.const 2
i32.ne
if
i32.const 0
i32.const 8
i32.const 62
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 1
call $switch/doSwitchBreakDefault
i32.const 1
i32.ne
if
i32.const 0
i32.const 8
i32.const 63
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 2
call $switch/doSwitchBreakDefault
i32.const 2
i32.ne
if
i32.const 0
i32.const 8
i32.const 64
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 0
call $switch/doSwitchFallThroughCase
i32.const 2
i32.ne
if
i32.const 0
i32.const 8
i32.const 73
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 1
call $switch/doSwitchFallThroughCase
i32.const 1
i32.ne
if
i32.const 0
i32.const 8
i32.const 74
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 2
call $switch/doSwitchFallThroughCase
i32.const 2
i32.ne
if
i32.const 0
i32.const 8
i32.const 75
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 0
call $switch/doSwitchFallThroughDefault
i32.const 2
i32.ne
if
i32.const 0
i32.const 8
i32.const 84
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 1
call $switch/doSwitchFallThroughDefault
i32.const 1
i32.ne
if
i32.const 0
i32.const 8
i32.const 85
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 2
call $switch/doSwitchFallThroughDefault
i32.const 2
i32.ne
if
i32.const 0
i32.const 8
i32.const 86
i32.const 0
call $~lib/env/abort
unreachable
end
call $switch/doSwitchEmpty
i32.const 2
i32.ne
if
i32.const 0
i32.const 8
i32.const 92
i32.const 0
call $~lib/env/abort
unreachable
end
call $switch/doSwitchEmpty
i32.const 2
i32.ne
if
i32.const 0
i32.const 8
i32.const 93
i32.const 0
call $~lib/env/abort
unreachable
end
call $switch/doSwitchEmpty
i32.const 2
i32.ne
if
i32.const 0
i32.const 8
i32.const 94
i32.const 0
call $~lib/env/abort
unreachable
end
) )
(func $null (; 9 ;) (type $v) (func $null (; 4 ;) (type $v)
nop nop
) )
) )

View File

@ -1,20 +1,11 @@
(module (module
(type $i (func (result i32)))
(type $v (func)) (type $v (func))
(memory $0 0) (memory $0 0)
(table $0 1 anyfunc) (table $0 1 anyfunc)
(elem (i32.const 0) $null) (elem (i32.const 0) $start)
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (func $start (; 0 ;) (type $v)
(func $void/anInt (; 0 ;) (type $i) (result i32)
i32.const 2
)
(func $start (; 1 ;) (type $v)
call $void/anInt
drop
)
(func $null (; 2 ;) (type $v)
nop nop
) )
) )